« first day (935 days earlier)      last day (3089 days later) » 

12:00 AM
RELOAD! There are 1648 unanswered questions (94.3249% answered)
I just want to point out that intellij-support.jetbrains.com/hc/en-us/articles/… is the official answer to what should be in .gitignore, and this workaround goes against this. You lose some ability to share project properties to all developers, such as inspections/lint settings that we use to prevent some standard bad-practices before even getting to code review. You can just add /.idea/misc.xml to the .gitignore file to solve this. — Matt Quigley 29 secs ago
 
0
Q: Validation optimization in node.js for beginners

azngunit81I come from a PHP object oriented framework background (Larvel, Symfony, Silex...). With that, validation comes in pre-built classes mechanism in a framework that validates for you parameters that you define and validates against. If it fails validation, you don't proceed. Example from Laravel: ...

 
I suggest you to ask for review at codereview, because I see a lot of design flaws concerning the tags that you defined on the question. Just to mention few: "separation of concerns", but you are both reading and processing in the same class, "encapsulation", but your class produces nothing to the user - you've hidden everything. — user3707125 47 secs ago
 
12:20 AM
@Hosch250 That looks really good
 
12:30 AM
0
Q: C++ implementation of Linked List

Michal PorvazníkI tried to implement a linked list, but calling the search method of class Linked, I keep getting this error: malloc: *** error for object 0x7f9511d00000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Could somebody explain this to me? Also, any othe...

 
12:42 AM
Episode MCMMLXXII - The Linked List Strikes Back
6
 
I would go see that movie
 
Just not the 1971 prior episodes huh
 
no, I'd need to get the rest of the story
like why is this linked list striking back?
and what is it striking back at?
 
...
I guess that's told in Episode MCMMLXIX - Attack of the Fizzbuzz
3
 
 
12:47 AM
Coming up: The F-Sharp Awakens
And that's enough
 
Now I would love to see that
F# ftw
 
1:02 AM
0
Q: A polling method and nested loop

hina10531Development Environment C# Entity Framework 6 ASP.NET MVC5 SignalR for bidirectional communication with IIS8.5 Simple Explanation There are 12 gates. Using our face recognition system, we check every person who tries to enter each gates. My MVC web application is to show the result data to...

 
1:28 AM
Nov 3 at 3:25, by Ethan Bierlein
@Phrancis LINKED LISTS! LINK 'EM! UNLINK 'EM! STICK 'EM IN ANOTHER LINKED LIST!
 
lol, I remember that
good 'ol Lord of The Rings references
 
I was totally not picturing this from LOTR... maybe more from a cheesy late night TV product ads placement
 
0:23 in, you'll see what I'm referencing
 
Oh lol. That was a bit of a stretch but I get it now
 
@Phrancis It better.
 
1:34 AM
Well, off I go for a while
 
See you.
If you notice, I decided to leave Person out. It was kind of causing problems.
My professor would probably say it needed denormalizing at that point anyway.
 
1:54 AM
Sorry for my professor, I feel. Three times today, I have emailed her.
Counting responses, that is not.
 
2:17 AM
Good experiences with Git, I do not have.
 
Command line or GUI?
 
Back... now the proud owner of a PS4... except I can't play it yet :D
(don't have a HDMI-input-capable video device handy)
 
Nice
Well, I've been having handy dandy troubles regarding gravity for the past half hour or so.
 
Gravity as in physics?
 
yes
I just don't understand how moons can magically orbit planets without being influenced too much by the parent star(s).
 
2:32 AM
Well, tell us more
 
Either that, or I'm just incapable of finding the right orbital speeds for things.
Although, that doesn't really matter.
I could care less if there's a moon or something
 
Have you factored in momentum (from the moons' orbit(s))?
 
it's just so cool to watch bodies move around while all being influenced by each other's gravity
 
Yeah, that part is really f***ing cool
 
@Mat'sMug I JUST FOUND OUT AN AWESOMENESS WITH C#6.0!
> All you need now is a call to Invoke prefixed by a null-conditional operator. You no longer need to assign the delegate instance to a local variable in order to be thread safe or even to explicitly check the value for null before invoking the delegate.
 
2:35 AM
If you give me maybe a half an hour I can probably get a really cool video of it in action.
 
If you use Handler?.Invoke you no longer need to make a local copy.
 
Now, I just have to find a screen recorder
 
I'm so excited.
 
oooh that's right I can record an app on Windows 10
nvm
 
@EthanBierlein Well, your call. I warn you though, my reaction to them might be "Yeah, that part is really f***ing cool"
 
2:36 AM
it'll be up in a little bit ;)
 
Wait... you can... record an app... on Windows 10... and you can't on OS X? (at least, not very easily)
BLASPHEMY!
 
2:51 AM
@EBrown it's thread-safe?
 
@Phrancis nope ;)
just press Windows Key + G, hit the little red button, and you've got yourself a screen recorder
 
I'd think foo?.Bar() is just syntactic sugar for if (foo != null) foo.Bar(); ...which isn't thread-safe
 
Okay, this may take a little longer than expected @Phrancis
There are quite a few different "scenarios" I want to demonstrate
 
@EBrown you could also assign the event to an empty delegate at declaration; no need to check for null, and it's thread-safe
and works in C# 2.0
 
@EthanBierlein No pressure m8
 
3:11 AM
@EBrown it's not thread-safe. codeblog.jonskeet.uk/2015/01/30/…
well hold on.. it's thread-safe in that you're not getting the NRE.. but it's more complicated than that. read on ^^ :)
 
Zak
3:30 AM
This question is heavily downvoted. I assume because it was originally Off-Topic. Seeing as it's now a reasonable On-Topic question, could we please get some upvotes?
 
nice answer @Zak!
(OP already had my upvote)
 
Zak
@Mat'sMug I always feel bad when I stop at a couple pages' worth of answer thinking "There's so much more I could point out here"
But at some point, you're just overloading the OP with things to think about.
 
when that happens, think "other reviewers will come along"
 
Zak
@Mat'sMug Very true :)
My system is now to have a heirarchy of topics (urgent problems > Variable Naming > Magic Variables > refactoring > memoization (arrays vs worksheets etc.) and so on.)
And stop when I get to some length of answer
Also has the advantage that I get lots of practice writing about the most urgent review topics
 
I always go with the feeling of the moment
at least once I've written a whole frakkin' blog-entry-grade review off a single line of code
 
Zak
3:41 AM
@Mat'sMug Oh sure, that heirarchy is hardly set in stone :) but I find it a useful framework for getting started
@Mat'sMug Now I definitely want a link :)
 
crap.. I have 633 answers to search..
 
Zak
@Mat'sMug If it'll be a pain, don't worry about it
 
haha found it
11
A: RPSLS game revisited. Is my design better than previous attempts?

Mat's MugI'm going to leave a broader review to other answers, and only focus on a single line of code: throw new Exception("Gesture is sealed"); Don't do that. There are really two alternatives to throwing exceptions. One is to throw an existing exception, derived from System.Exception. This is tr...

user:23788 is:answer "single line"
14 results, easy enough :)
 
Zak
I decided I'm going to make a serious crack at making the 2nd user rep page before we get our site design finalised.
So expect to see quite a lot of stuff from me
 
great!
 
Zak
3:46 AM
I'm just hoping I've got about 4 weeks.
 
(good luck! it's going to be a race there, between users at the edge of 2nd and 3rd pages!)
 
Zak
Really wish I'd found CR a year ago but oh well, work with what you have and all that
And, if all else fails, bribe someone into selling me theirs :)
 
lol
 
@EthanBierlein I think all those physics are, truly badass
 
Thanks! :)
 
3:48 AM
Always seems like they're going to smash into each other and make lots of confetti :D
 
I could implement that... :P
Anyways, I'm going to play a little planetside 2, and then head to bed
 
Ok, enjoy that amazingly fun game
Owait
misread
 
do I sense some /sarcasm?
 
No no
 
oh lol
alrighty then
 
3:50 AM
I read "little planetside 2" as "little big planet 2"
 
Well, you know. Ps2 is still a fun game.
And it's FREE!
 
No doubt, I just feel very awkwardly out of context lol
 
(with the option to pay for a monthly membership just like every other mmo :P)
 
I want to write a VBA program to solve this kind of questions. -- great! Get started, write something, and when you get stuck on a specific issue, ask Stack Overflow if you can't find an answer! Good luck! — Mat's Mug 13 secs ago
 
Well... nevermind then
you know something isn't right when your laptop's fan is louder than the audio coming from the laptop
 
Zak
3:59 AM
@EthanBierlein I love MMOs, which is why I avoid them like the plague
Without fail, they end up consuming my free time
 
@Zak Well, right now MMOs are my lifeblood
I spent 7 straight solid hours playing Planetside 2 last weekend
with, a few exceptions, namely food, drink, bathroom, etc.
 
Zak
I remember when I played Travian competitively
16 hours a day, every day, for a whole summer
 
wow
that's at least 1500 hours
 
Zak
with a guy from india and another from the US to cover it 24/7
 
of course, I knew a guy who actually spent a full solid year's worth of time playing GMod
 
Zak
4:02 AM
We built some truly glorious things
 
which, isn't an mmo, but still
 
Zak
which part of Travian is not Massively Multiplayer or online?
 
oh, I was talking about gmod
not Travian
 
Zak
Oh, completely missed that :)
 
lol, that's okay
 
Zak
4:04 AM
But yeah, my favourite run ever: We decided to take the Gauls (the faction optimised for Defence) and run them as an alpha-raider.
 
gonna be honest
never played travian
 
Zak
This was nearly a decade ago now
 
understood about 50% of that sentence :P
 
Zak
they'd just introduced artifacts (insanely powerful account bonuses, but only until some other alliance comes and takes it off you)
 
still, sounds rather epic
is it similar to OGame?
 
Zak
4:05 AM
So we built a huge raiding operation (not supposed to be possible with Gauls)
Took the fastest cavalry in the game
 
niiice
 
Zak
Took control of the 3 x speed artifact
And suddenly, we have a pure-cavalry army, capable of attacking from one edge of the server world to the other, in 90 minutes flat.
In a game where a big assault can easily take 24hrs to arrive
@EthanBierlein ish
 
I bet that came as a rather nasty surprise to your opponent
 
Zak
It was FUN
for about 3 days
 
lol
dammit
 
Zak
4:08 AM
then alliances #2-4 teamed up and smashed it into oblivion
 
wait, who got smashed, you or your opponent?
 
Zak
we did
When 200 strong players team up against you
 
Zak
you don't really survive that
My alliance put up a valiant defence
and we fatally weakened a lot of players
 
sounds like it was a death blow to your alliance
 
Zak
4:10 AM
Quite the contrary
we were 1 account
 
ah, right
 
Zak
Sure, it hurt us quite a lot
and our alliance poured a lot of defensive troops into it
but we took a lot of our opponents forces with us
 
that's still a plus I guess
 
Zak
absolutely
Travian is very much a game where you can be big and powerful by yourself, but the game is won and lost by Alliances
 
well, that sounds like quite a fun game
 
Zak
4:13 AM
it is. But it's like a drug addiciton
total abstinence, or I'll just get drawn back in
 
all good games are like that
the secret is moderation
 
Zak
@EthanBierlein Sure, but MMOs don't conveniently pause for you to take a week off
 
Well. some can sort of do things like that
 
Zak
and I'm far too competitive to accept a passive play style
 
In the case of Ps2, all you really have to do is log in, spawn your player, and start fighting
Is it cool if I tell a "magical" story from my experience from Ps2?
I've got a pretty interesting one
 
Zak
4:15 AM
Nothing else seems to be going on, so go right ahead
 
Alright, cool.
So first off, I'm just going to explain a couple things:
In ps2, there are 3 unique factions. I'm not going to bother listing them off, but yeah.
And essentially, you're given a continent, and the goal is for one faction to take control of the entire continent.
So me and about 35 other members of my faction were holed up in a bio lab, which looks something like this:
 
Zak
Cool.
 
So, here we are, we essentially have control of the bio lab, but a bunch of infiltrators from another faction, which have a special cloaking ability, kept sneaking in and trying to re-capture the bio lab.
So, this went on for about half an hour.
After that half hour, the infiltrators gave up, and left.
For about 5 minutes, there wasn't much happening.
about 15 people had left to go capture other areas, and a few that stayed had gone idle in the spawn rooms
 
Zak
I'm guessing you were still there?
 
So, here we are, some of us, including me, standing on the little platform you can see in the picture, and all of a sudden, out of nowhere, a fighter crashes directly into the platform and kills at least 6 people, including me.
So, here we are, 6 people dead and pending respawn, all of a sudden a bunch of players from the rival faction using "mini-mech-suits" break into the bio lab and begin recapturing it.
Pretty soon the majority of players from each faction that was fighting were present at the bio lab, trying to defend it.
At this point, there were at least 10 fighters shooting at each other in the sky, and upwards of 50 people, in, and around the bio lab, fighting on the ground.
So, at this point, it's been over an hour since my faction had first initially captured the bio lab.
At this point the number of players had dwindled to maybe about 30 on each side, and at this point my faction was winning overall.
About 15 minutes later, most of the players from the rival faction had fled and we finally captured the bio lab again.
Now, that's not all though:
While we had been so preoccupied with keeping the bio lab, we had failed to watch out and keep our other control points safe.
The 3rd faction that had not been fighting at the bio lab had captured the majority of the continent, and now controlled it.
Needless to say, many of the members of my faction were a little ticked off.
 
Zak
4:26 AM
I can imagine :)
 
Anyways, the story is over now. :)
That's one of the reasons I really like ps2. You can wage battles that feel like all-out war, but you don't have to deal with massive lag, or wait a couple days.
 
Zak
Sounds pretty fast-paced
 
It's also a combination of three genres as as well. MMO, FPS, and RPG.
Oh, it is fast-paced ;)
 
Zak
A travian server takes about a year from start to end
 
I mean, I can see how with Travian you get a more "realistic" time frame for battle. I think that's pretty cool.
Although some part of me just gets bored if I don't have something to attack or take over for a while.
If you have the time, and think it's interesting I'd highly recommend you check it out. If not, that's okay too. :)
 
Zak
4:31 AM
@EthanBierlein It sounds like something I'd really enjoy. Which is why I'm going to stay as far away as I possibly can :)
 
lol
fair enough
if that's the case, you might want to stay really far away from it.
it is, after all, free-to-play.
well, goodnight fellow CRitters
time to get some much-needed rest
 
@Sarutobi0997 Post your code here codereview.stackexchange.com that might help. — cbinder 52 secs ago
 
5:01 AM
1
Q: jquery - refactor code assistance

user3354539I have some JS code that when the user clicks the add button, some text is displayed to a textarea. The code seems to be working OK. However, I realize I must refactor the code so that I am using only the one on click function instead of the six that I have for each of the 6 add buttons. I have...

 
5:23 AM
0
Q: Using actionPerformed() to call different methods per radio button selection

h3rrmillerMy Java is very rusty and I have been unlucky finding a better way to accomplish this task. I have two different methods which get called based on which radio button is selected. Is there a cleaner way to store/determine which radio button is currently selected in order to call the appropriate ...

 
5:41 AM
0
Q: Combining MySQL Left Join results

OgreuchaI'm trying to get the End result. I already done it with 2 different queries. Is there a better way without UNION or which one is the best? Table_1 +-------+--------------+--------------+--------------+ | id | column_1_1 | column_1_2 | column_1_3 | +-------+--------------+-------------...

 
5:52 AM
Monking
 
6:18 AM
And now let's assume one advocated modern C++, sits in a code review and is found out having had to change concept checkers which had already passed a proof of concept. (No. Better not). — decltype_auto 58 secs ago
 
6:40 AM
Do you use line numbers in #VBA? How?
aw, doesn't onebox the poll :(
 
7:03 AM
Monking
@Duga Interesting question.
@EthanBierlein Back when continents didn't lock a biolab fight could take over a day.
 
@EBrown Having data that looks like code means that it's easy to write LISP code that evaluates code that was generated on the fly. Because the abstract syntax tree is just a bunch of nested lists as well.
 
Zak
Blergh. Having a bad reaction to my pills this morning. not fun.
 
Detractors could say that having humans write source code in AST form sucks.
 
Zak
Also, Monking
 
You OK?
 
Zak
7:17 AM
I'll be fine. Just every so often (currently about once every 3 weeks or so) they'll cause some combination of heartburn, nausea, headaches and assorted unpleasant-but-not-inherently-dangerous side effects.
 
Have you mentioned it to your pharmacist?
 
Zak
@200_success Not yet. Up until this month it was relatively mild (usually just heartburn) but last 2 times have been distinctly worse.
So I'll be bringing it up with them
My prescriptions due for renewal anyway
 
Yeah, do that. It's their job to know this kind of stuff, and maybe they can recommend something better.
 
7:36 AM
0
Q: ARP implementation. How can I increase performance?

KarthikI am a beginner in C and did this code to do implement ARP. 3 threads are there - one to respond/receive any arp packet targeted to me, one to refresh arp table on a periodic basis, and one to transmit packets present in the buffer. ARP table is implemented in a hash table. The sensitive areas a...

 
 
1 hour later…
8:49 AM
monking :) I am in need of someone who is good with hardware...
@Zak Anti depressant side effects?
 
@DanPantry we're programmers, what do you expect?
 
@Vogel612 true, but best to ask :)
 
but Mast is doing something with embedded IIRC
 
Looking to go for a new graphics card
AC: syndicate (bought it last night) is struggling with my current and my current is 3 years old so its due for an upgrade anyway
 
8:50 AM
+1 thank you
didnt know that existed
 
it's rather new
 
Ahhh
good ol' beta blue
 
I randomly saw a community ad for them, that's why I know :D
 
monking @all
 
monking @chillworld
 
8:56 AM
@DanPantry I'm an electronics engineer, talk.
Ah, PC hardware. Well, that's not too difficult. As Vogel said, Hardware Recommendations is quite proficient at that. But make sure your PSU can handle your new card.
 
The PSU is pretty decent, I believe its a 700w
 
@DanPantry Add it to the question.
Oh, you did add it to the question.
I have good experiences with the MSI Twin Frozr versions, got a GTX 560-Ti in my desktop (hasn't been used in a year though). Decent hardware.
 
0
Q: Removing duplicate code from very similar functions with different input

MajakI have two functions for writing data to binary file using BinaryWriter. The first function has single data object as argument and looks as below: // write single data object to binary file public void AddHeaderToIndexer(string path, RollHeader header) { bool isDone = false; ...

 
user image
2
If it doesn't fit, you're not trying hard enough.
 
@Mast not everyone has the tools to make an impromptu case-mod
 
9:09 AM
A woodsaw, ironsaw, couple of pliers, two pieces of wood, 5 bolts and a screwdriver. Oh, and a flex riser card to connect it to the motherboard, but I didn't make that one myself :-)
 
My graphics card only just fit in my current PC
I had to take out all the wiring and then rewire everything because one chunky wire was preventing me from fitting it in
 
possible answer invalidation by Oscar Guillamon on question by Oscar Guillamon: codereview.stackexchange.com/posts/111581/revisions
 
I'd also really like to downsize my case too because this one has pretty bad air flow and looks awful. alas. :(
 
@DanPantry Would this fit?
 
I was looking at the 960 earlier. How would that compare to the 650? I don't have much of a grasp on numbser but that has the same amount of video ram that my current 650 has
 
9:11 AM
@Duga doesn't invalidate the given answer...
 
nvm :) theres a graph
270mm.. hm
it might fit
would be a tight squeeze
I think thats the same size as the 650 ti
Uh, no, I'm way off, the 650 ti is 142mm
Ah bugger
All of my measurements will be off
My card is refurbished and has two fans - not one
the 650 ti I linked only has a singular fan
I think its safe to say then that, yes, the 960 should fit
 
@DanPantry It should be good enough.
Sure, it's not a TITAN, but hey.
 
Would it last at least the next 18 months, though?
 
Depends on what you want to do with it ^^
I don't think this will fit your case.
But that would most definitely last 18 months unless you're going to do insane things.
 
@Mast lol
that card is 1mm smaller than the card you suggested :)
 
9:17 AM
Wut?
The height is slightly more, the rest is smaller, yes.
But do you think it would fit?
 
Maybe you should post your review to codereview.stackexchange.comdkg 40 secs ago
 
@Mast well
the difference is only 1mm in terms of length (which is the big issue)
960 is 267x139x36 - 970 is 266x129x43
the sizes are practically identical
if the 960 fits, the 970 definitely will
That said, another big difference is the price.
the 970 performs significantly better than the 960 but is it worth an extra £90 :p
And the performance on the 960, at least from the graph, doesn't look very striking compmared to the 650 when you compare the difference between the 960 and 970
 
The 970 is significantly better than the 960. Not making that step now would mean you'll have to replace your card earlier next time.
 
That's what I am weighing now
 
Unless you're planning on getting a new rig in not too long anyway, of-course.
 
9:27 AM
I've upgraded my PC bit by bit. The only things that haven't been upgraded recently are the gfx and proc
the cpu I think is still "good enough" for what I'm doing
in other words,n o, I probably won't be buying a new rig in the near future
 
@Ike, Thanks for the effort and long answer, but this was not meant to be a code review (it's not even the real code), and you did not answer my question - Was there any "memory violation" here? I don't know who's "we" in "we don't want that", you altered my constructor without explaining why and then it forced altering all the rest. I understand how altering the ctor like you did induce the other changes, but I do want it like that. — elad 40 secs ago
 
@Duga false alarm, but wow, 3 comments in that little time? he seems a bit angry
 
9:40 AM
@Mast I bought the 970.
 
hey @Vogel612
 
hiya... can I help you?
 
-1
Q: saving string into a file c# (the data in the file should be in 2 coulmns x,y)

avishaiywhen i save the string into a file i get a file that all the data is in 1 line(row) instead of 2 coulomns . how do i save the string to a file that all the data will be in 2 coulomns (x,y) using (System.IO.StreamWriter file = new System.IO.StreamWriter(path + "test.txt", true)) ...

 
@Vogel612 nah, just saying hello when switching to this tab
 
9:47 AM
@Vogel612 I see your problem - you're using Micro$$$$ ;-)
I kid, of course
 
@DanPantry meh... it's actually not me, but the people I work for, since the users of the hardware are accustomed to windows
and it's not really a problem anymore, but interesting nontheless
 
Monking
 
Monking, @skiwi
 
What's good about this day?
 
@skiwi I spent £250 on a graphics card. That's pretty good IMO
 
9:56 AM
I hope that's for a GTX 970 or better
 
monking @skiwi
 
@skiwi It is for the GTX 970 :)
Now I might actually be able to play GW2 or AC above 20fps.
 
Good, NVidia is life
I'm on GTX 770 and Fallout 4 does occasionally have framedrops but also often at 60 fps... Still need to download a driver update du efor a few months though :D
 
0
Q: mapping associative array with another associative array

Hamid Richárd AlliliI found a way to solve my problem, but I want to see if there is any better or clear solution for this. I have two associative arrays like this: $person= [ "A" => [ "sur" => "a", "fir" => "andras" ], "C" => [ "sur" => "b", "fir" =

0
Q: Node bot to send out reminder-emails if a team member doesn't submit their weekly schedule

chapatiThis CalendarService is part of a little node-bot I wrote today which sends out reminder-emails if a team member forgets to submit his weekly schedule in time. Calendar backend is using Google Calendar. Written in ES6 using babel-node. Interested in feedback, what I could simplify, where are th...

 
If the 770 plays fallout 4 at 60fps I should be golden with the 970 (or does it not work like that?)
 
9:59 AM
I think I might dislike rebooting my PC less if Firefox didn't take 5 minutes to boot
@DanPantry I think it works like that, though not sure if there's rebrands going on
I think the 970 has more RAM by default, not sure which edition you have though
 

« first day (935 days earlier)      last day (3089 days later) »