« first day (208 days earlier)      last day (3803 days later) » 
00:00 - 14:0014:00 - 00:00

12:13 AM
This was a tough one
1
Q: Simplifying the if else statement

user2809564I am trying to simplify the below if else statement, and I think it can be done. Algorithm is like this - If user_ptr exists, then lock attrmap, find user_ptr. And if it is a batch, then don't ping. And else if user_ptr doesn't exists and if it is not a batch, then do other stuff. But ...

I really don't believe there is a better way (except possibly those I've written in my answer) to simplify this
 
12:27 AM
Tomorrow is a big day for me:
member for 29 days
visited 29 days, 29 consecutive
seen 7 secs ago
hehe
 
12:47 AM
Good thing I've started retagging a bit today. It reminded me of a self-answer I could've posted (which I've already done). Turns out that computer architecture really is helpful for programming.
 
I will pretend I understand what you're on about, @Jamal
Dinner! (Ding!!!) (at the door, ordered in today).
 
@rolfl: And I will pretend... something.
 
@Jamal You can pretend that a baby unicorn will not die now: (removed)
 
1:02 AM
@SimonAndréForsberg: Okay, but just this once.
@rolfl, are you aiming towards Legendary? :-)
 
And so another day comes to an end. Goodnight
 
 
1 hour later…
2:23 AM
0
Q: Using Guava to reduce code complexity (and possibiliy to improve readability) of null check and assign default value

neoBelow is my java code with some complexity, String input; double a; if (null != input && !input.isEmpty()) { a = Double.parseDouble(input); } else { a = defaultValue; } With Guava, we can compress the code from 5 lines into a 'single' line, a = Double.parseDouble( Objects.fir...

 
2:43 AM
Hello, is anyone here?
[...criquets chirping...]
 
hello
 
(Removed)
 
Hi @Paul!
@rolfl is alive!!
Anyone familiar with XAML/WPF?
 
I apologise to all the Unicorns (baby or otherwise).
2
Hey, @Paul... did you hear that you can get 4 special internet points if you find an answer (any answer) in [tag:cobol] and vote it up?
(hehehe)
 
2:58 AM
necromancer .... necromancer .... necromancer .... necromancer
 
missing 1 vote eh?
 
Yeah.... and it would be 'neat' to score necromancer on COBOL ...
Necromancy is a form of magic involving communication with the deceased – either by summoning their spirit as an apparition or raising them bodily – for the purpose of divination, imparting the means to foretell future events or discover hidden knowledge. The term may sometimes be used in a more general sense to refer to black magic or witchcraft. The word "necromancy" is adapted from Late Latin necromantia, itself borrowed from post-Classical Greek νεκρομαντεία (nekromanteía), a compound of Ancient Greek νεκρός (nekrós), "dead body", and μαντεία (manteía), "prophecy or divination"; ...
bringing back the dead.....
of course, I can't be too obvious about it.
I wonder which will be my first silver badge .... necromancer, or enthusiast
 
lol necromancer in 1 vote, enthusiast in 1 day... tough one..
 
@SimonAndréForsberg - congrats on Java badge....
 
12 voters so far this week. What's up people? VOTE VOTE VOTE!!
 
3:12 AM
 
@Jamal oh that's awesome
 
Look up "COBOL humor"
 
There's a cc-wiki baboon that shows up and says "upvote me!"
 
I remember the gool ol' days when monkeys went bananas over bananas, not upvotes. But they all do know how to program in COBOL.
 
@Malachi at this rate, in 2 days I'll have caught up on your year total votes :)
Still would be nice to have a [badge:necromancer] awarded in
 
3:21 AM
0
Q: 'Bumping' Zombies

rolflIn the quest to work through the backlog of zombies it is apparent that some of the questions are complicated, 'exotic', or very involved. For example, this question: I know I set up my Vbo/vba and indices wrong (currently runs, but slowly) involves graphics acceleration with OpenGL. It struck m...

 
If another COBOL question isn't posted within six months or so, the tag will die automatically.
 
vote mine up soon then!
 
@rolfl: I'd give a more relevant title since 'zombie' isn't official SE terminology that everyone understands.
 
Done
 
@rolfl that question is like 2 weeks old, how is that months? (well yeah 2 weeks unanswered is 13.9 days too many)
 
3:27 AM
It's an example... there are plenty of other ones.
Pedantic so-and-so's here.
 
Devil is in the details!
 
Now you're going to tell me the next example should be closed because the code does not work!
 
@rolfl (ding!) I commented on the first one: This is a lot of code, you may want to consider breaking it down into several, more specific questions.
I think that's why it hasn't been answered yet. Too much code, the casual reviewer runs.
 
2
Q: 'Bumping' Stale / Unanswered questions (and their asker!)

rolflIn the quest to work through the backlog of unanswered questions it is apparent that some of the questions are complicated, 'exotic', or very involved. For example, this question: I know I set up my Vbo/vba and indices wrong (currently runs, but slowly) involves graphics acceleration with Java an...

 
That's sort of the point.... and if an asker can answer their own question it's win/win/win
 
3:32 AM
@StackExchange slowpoke
 
We get a user back.... we get an answer ... we get to vote, and they get some rep
 
Mind you, @rolfl and @SimonAndréForsberg aren't the casual reviewer - the casual reviewer doesn't get a tag badge in their first month.. right?
 
It took me at least seven months to get mine.
 
I wonder if I can hit 2K within the month!
2 days, I should make it.
All I need are some decent questions ... ;-)
 
I think the next example should be closed because the code does not work...
 
3:39 AM
@Jamal - you make me feel old ... there you are, a ♦ and 2 years ago you were half my age.... :(
 
@rolfl: Eh, I suppose it makes it for my lack of coding knowledge and leadership skills.
 
leadership skills will be useful for the rest of your life .... work on them. Always (OK, putting the wise-old-fool-facade away now).
One of the interns at work was in a minor fender bender .... came to me for advice... felt like saying "well son, watch your following distance, drive defensively, and brake harder".
 
@rolfl: I'm a better communicator online, yet I'm still surprised I'm about a week into moderatorship and have done relatively well. Then again, it doesn't seem to be a challenge with a small site.
 
The bonus of the internet is that people's prejudices are abstracted away ... people won't see your name/avatar and think 'kid', or look at my avatar and think 'fool'. They just take things as they happen, rather than as they expect.
That's how zuckerbergs succeed, and pead's get caught by 40-yr-old policemen pretending to be 14-yr-old girls.
So, you have to try hard to ruin an online reputation ....
 
Well, I suppose this is a start. I really wanted this position, but it was only sheer luck as Winston Ewert happened to be elevated to an industry position.
Unless you're a politician using Twitter.
 
3:49 AM
Take it and run with it. it will become a burden at some point, and you have to recognize when the time is right to move on.... and don't have a conscience about it when the time happens.....
Right now it is a good thing. So use it
 
Indeed. I really want to put my mark on this side (in a good way), even if it doesn't ultimately help lead to site graduation. That is a team effort, though. One (or three) moderators cannot do all the work.
 
Atta boy! (and, for the record, you have my confidence)
(whatever that's worth).
Here's three dead baby unicorns:
(Removed)
hehe
 
 
is that... a baboon that ate baby unicorns?
 
girl baby unicorns!
 
3:56 AM
or Voldemort on Halloween?
 
All of the above!
 
Horny devil!
 
lol
 
When Voldemort got sent to limbo or wherever, his punishment included being transformed into a unicorn.
(spoiler alert)
 
hey check this out.
 
3:58 AM
(wait, too late)
 
3
A: Is it Typical for Large Software Companies to Not Document or Refactor Code?

rolflA perspective which I don't believe has been covered in other answers (yet) is the cost of change in three areas: testing re-familiarization opportunity cost A company with a large product will need to test all changes. These test procedures need to be tracked over multiple axes: different pl...

 
Why thanks, @Malachi - I score +3 on my first contrib to programmers!
 
Programmers is Fun. check out this answer
 
What answer>
Waiting .....
Waiting....
Dopler is red.
 
1
Q: Should Android development be done on Windows or OSX? Is there any difference?

makerofthings7I have the option to install the Android SDK on Windows or OSX. Which platform provides a better (easier) development experience? To keep this constructive, I'm looking for any difference that eliminates compatibility issues, ease of debugging, or compatibility with 3rd party utilities.

sorry
 
4:05 AM
Yeah, I saw that question ... did you point to it the other day?
 
probably
 
I used linux as my primary workstation from 2004 through last year. Then I had to use PowerPoint almost every day, and it did not play nice with KVM....
Now I have two primary workstations!
 
I need a keyboard for my Windows laptop so I am using ubuntu 12.10
on a different laptop
 
American Thanksgiving? Site is awful slow.
i.e. no new questions....
 
Fun fact: I'm at 251 consecutive days on CR so far. O_O
2
 
4:17 AM
meh ... that's nothing. I have never missed a day.
;-)
 
 
lol
 
laptop is dying.... gotta go.
laters.
 
Byes!
 
@rolfl later
 
4:21 AM
The Q&A site hungover.stackexchange.com doesn't seem to exist…yet.
(yes I did click that link)
 
@retailcoder I did too
 
@Jamal I think you own the CR all-time record for fanaticness.
 
Considering I haven't yet been here for a year, I'm sure there's someone out there with a higher number.
 
Just dug up (that's past tense for "dig up" right?) some code from my first DI app - C# review anyone?
0
Q: First attempt at dealing with command-line args

retailcoderA little while ago I was fiddling with dependency-injection and came up with this small WPF application that I can launch with command-line arguments. Not only this was my first experiment with DI, it was also my first experiment with parsing command-line arguments. The result works nicely, but ...

That's what happens when you drop out of CS.
 
I'm still an undergrad in CS, and my math classes are starting to kick my butt.
(plus, this site is way more fun than stats)
 
4:27 AM
If I hadn't dropped out, I'd be like 9-10 years into professional programming.
 
:-(
 
I learned most of my .net in books (and SO), started 2 years ago!
 
I've learned much of my C++ from SE!
 
Long live @StackExchange!!
(it's late, going to bed - bye everyone!)
 
1
Q: First attempt at dealing with command-line args

retailcoderA little while ago I was fiddling with dependency-injection and came up with this small WPF application that I can launch with command-line arguments. Not only this was my first experiment with DI, it was also my first experiment with parsing command-line arguments. The result works nicely, but ...

 
4:32 AM
Bye!
 
@Jamal I am still here
and I think that I am going to look at Retail coder's code
 
@Malachi: You may look at my self-answer as well. I might add something to it soon.
0
A: Improving remake of factoring/prime factorization calculator

JamalFactors::calculate() can be improved by: eliminating the cast to float and call to std::sqrt() avoiding the call overhead can help with speed the casting was only necessary for the function making the loop condition an integer type loop conditions shouldn't be floating-point incrementing t...

 
@Jamal, I am not a C++ person.
otherwise I would
I am thinking that I am going to learn Java or something like that so I can work through a logic and design book that I have for OOP
 
@Malachi: That's fine. I thought the logic would be more understandable.
 
I will take a look at it, but I have like 4 other questions still open and I have to get rid of all my favorites too.....lol
 
4:44 AM
Okay. There's unfortunately very few C++ reviewers here, but I think my code is more efficient.
 
I don't know
I am actually thinking that I want to learn more C# because I don't think that I learned near enough in school
 
Learn from Jon Skeet! ;-)
 
I will have to look him up. honestly I haven't read any of his stuff, or know who he is really
 
He has the highest rep on SO, probably all of SE. Over 625K!
 
@Jamal you and palac undeleted an answer? codereview.stackexchange.com/a/10981/18427
 
4:56 AM
@Malachi: Yes. I haven't found a reason why it should've remained deleted (except that it looks a little hard to read).
 
the Answerer deleted it though.
I am editing it right now
 
5:12 AM
0
Q: Building an histogram array in PHP

AlanChavezI'm visualizing my stored data in an histogram similar to this one: However, I'm sure that my code smells a lot! So I'd like to have your opinion on how to make it better. Here's my current code: $listings = array( array('Price' => 10), array('Price' => 10), ...

 
@Jamal, I did what I could to that answer
 
That could help.
 
5:30 AM
I added a Tag to the question too
 
5:59 AM
0
Q: Stuck at a logical problem, perhaps other way to write it

user2738336I have a process file (process.php) and it processes forms on my site. I use small hidden fields inside the forms such as: <input type="hidden" name="sub_log_in" value="1" /> And then inside the process class, I usually do something like this: /* Log_in button was pressed */ if (isset...

0
Q: What could have been done better in this HTML pasting app I made?

phillips1012The full source tree is here: https://github.com/phillips1012/pasteHTML index.coffee as of the time of posting this: #!/usr/bin/env coffee config = require "./config" sugar = require "sugar" express = require "express" jade = require "jade" minify = require "express-minify" mongodb = require ...

 
6:20 AM
0
Q: Sudoku solver in c not working properly

goromlagcheI have written this sudoku solver in C. But it is not working properly, Any help? #include<stdio.h> int sudoku[9][9]; int check(int sudoku[][9], int row, int col, int sol) { //checking in the grid int row_grid = (row/3) * 3; int col_grid = (col/3) * 3; int i, j; for(i=0; i<...

 
6:45 AM
You've earned the "Electorate" badge. See your profile.
2
 
0
Q: Need some feedback on my java projects

MalikDzI would like to get some feedback on my code so I can know where to improve and what im good at. source code : https://github.com/MalikDz/PersonnalProjects/tree/master/JavaProjects ps: Sorry for my bad english

 
7:31 AM
@Malachi: Congrats! Awesome avatar, too. ;-)
 
@Jamal, Thanks. I have been using this avatar on a game that I play.
I created it on Plants Vs. Zombies
I figured that it was fitting.
we will see what @retailcoder thinks of it in the morning
 
It is a great game!
Anyway, I just came in here to congratulate you. I need to go to bed now.
 
me too.
catch you tomorrow
 
You, too. Goodnight.
 
0
Q: Maths not calculating properly? new to java

user3034947Heres the entire code. The total pay doesn't seem to subtract properly during the IF condition? what am i missing? suggestions please import java.util.Scanner; public class SalaryPay { public static void main(String[] args) { Scanner sc = new Scanner(System.in); //declaration of field...

 
Max
7:49 AM
Morning
 
0
Q: Improve my copying of csvFile c#4

user231465I need to merge some large csv files but I feel that the way I am doing it is not optmized. It gets a number of csvfiles and creates one public static void MergeFiles(IEnumerable<string> csvFileNames, string outputPath) { var sb = new StringBuilder(); bool hasHeader = false; foreac...

1
Q: Is there a way to make this script faster?

MattThis is roughly what my data file looks like: # Monid U B V R I u g r i J Jerr H Herr K Kerr IRAC1 I1err IRAC2 I2err IRAC3 I3err IRAC4 I4err MIPS24 M24err SpT HaEW mem comp Mon-000001...

 
 
3 hours later…
10:42 AM
0
Q: Enable ctrl+c and ctrl+v buttons in the function

user3045390I want to add the code to enable ctrl+c and ctrl+v in the function, the numbers are enabled and the alphabets are disabled. This function is used in the textbox, where the ctrl+c and ctrl+v are to be enabled but not the alphabets. I tried various things, but could not get through it. Any help in ...

 
@Malachi Barely recognize you with that new avatar
@Max Morning
@rolfl You're 260 rep ahead of me now. I don't think I will be able to catch up with you. Well done :)
@retailcoder It's only a bronze java-badge! I want at least silver! :)
@retailcoder You do realize that the people who are here in the chat are already voting quite often? (Not retailcoder-often perhaps, but still...)
 
11:16 AM
0
Q: html code working in PC browser but not in mobile browser

JqueryLearnerThis is my first visit to this site.I have developed a web app using jsp/servlet.This is working perfectly in computer browsers but not working in mobile phone browsers.I am using bootstrap but still its not working. There are 5 tabs but not a single tab is not opening.When you click any of the t...

 
Max
11:29 AM
@SimonAndréForsberg More like lunch :P
 
@Max Yeah, I have to agree with that. That's strange.... I'm not used to people around here being in approximately the same timezone as I.
@Max In about two hours probably, @retailcoder will stop by and say "Morning!"
 
Max
It's nice having someone in here to talk too. It's been empty all morning :(
 
@Max We live in the wrong timezone
 
Max
Whats the right timezone?
 
5-6 hours before mine.
 
Max
11:38 AM
So where from Sweden are you?
 
Western part. About 1 hour by car north of Gothenburg
 
in India it's evening here
:D
 
Max
Marstrand?
@tintinmj hi
 
@tintinmj Good evening. (Honestly had no idea you lived in India)
 
hello to all
@simon :O u didn't know?
 
11:40 AM
@Max Marstrand is not so far away from here, but it's more closer to Gothenburg
 
i think my nickname is not like an indian :P
 
@tintinmj Had no idea. Hadn't looked at your user profile until now :)
 
oh
 
@tintinmj Judging by your GitHub profile, I see you're working a bit on Android. But it doesn't seem like you've answered any Android questions on CR though.
 
actually
i started android last year
 
11:51 AM
ok
 
and dropped pretty early cause my laptop got hung very fast
so i dropped working on android
 
Oh, ok. That explains it
 
and the project you saw in my github profile, i forked from vogella
@simon you know C?
 
@tintinmj A bit yes, I never use it though. My main accomplishment in it was to translate a bunch of code from C to Pascal. I understand it a whole lot better than I code it, but I could probably code it too.
 
oh no then u may have seen my ugly hangman C code :/
 
11:56 AM
@tintinmj I saw that you had hangman code, but I didn't read it. Now I gotta read it....
 
well after reading it don't blame me
:P
I warned you
earlier :D :P
 
@tintinmj Well... How should I put this....? If you would have posted it as a code review question I can imagine one or two things to write in an answer... :)
 
I think all will say only one thing SRP and DRY
 
Max
Maybe you should KISS instead? ;) hehe
hahaha
 
@tintinmj And also "Indent your code properly", among other things...
 
12:02 PM
@simon about indentation
i copy pasted the code from codeblocks to github
and something messed up
my indentation
it was perfectly ok in codeblocks
 
whats 'code review'
 
@all does anybody know how to put my LinkedIn button into my profile ?
 
yeah
 
@Ethan how?
 
link me to your page
 
12:06 PM
<a href="http://in.linkedin.com/pub/anirban-nag/45/595/628">

<img src="http://s.c.lnkd.licdn.com/scds/common/u/img/webpromo/btn_myprofile_160x33.png" width="160" height="33" border="0" alt="View Anirban Nag's profile on LinkedIn">

</a>
this is my linkedin button code
and this is my profile
@Ethan anything?
 
wait
 
ok thanks for your time :D
 
@Ethan Code Review is a question and answer site for sharing code from projects you are working on
for peer review.
 
@tintinmj sorry I don't think I can help right now
 
hmm that's ok
 
12:15 PM
its 4 am anyway here in ca, good night everyone
 
@Ethan I'd say good afternoon but sure, goodnight!
 
yea what is it 1 pm there?
2 pm
 
@Ethan 1:16 pm
 
i was close
lol
good night
 
Max
@Ethan night
 
12:24 PM
0
Q: Is there a way to force the review of a suggested edit?

WolfI've made this suggestion that fixes an error in a question. It's pending since about 15 minutes, but maybe this delay is normal for this site? If not, is there a way to stimulate the review process?

 
does anybody know how to make a profile info like this guy?
http://meta.stackoverflow.com/users/144009/leniel-macaferi
 
Bwahahahah..... and good morning to all
 
good morning
by profile i mean how to add linkedin/G+/github button?
 
0
Q: Why is entity references still be included in properties is their a better way to achieve this code

David BuckleyAs you can see below im going through the property of an entity to get the field names and values for an audit trail system however its bringing back the references to the object that is passed ie careerReference=System.Data.Objects.DataClasses.EntityReference`1 absanal=HallmarkSolutions.PAMS.In...

 
I thought you were going to say 'obnoxious bible-thumping html-blinking over-complicated and tl:dr'
 
12:32 PM
:( I don't know HTML
 
Max
<a href="http://www.linkedin.com/in/tintinmj" rel="nofollow"><img src="http://i.stack.imgur.com/a0yCH.png" alt="LinkedIn"></a>
that should work
if codereview lets you insert html..
dunno
you may need to change the href from tintinmj to whatever your linkined profile is
 
hmm i'm ggogling
*googling
 
Max
or you know, you could try by adding that into your profile info :P
 
0
Q: Specify the `review` meta-tag, or burninate it

Simon André ForsbergThree questions have used the review here on Meta CR so far. I find however that this tag is very vague. Is it about the review queues, is it about Code Reviewing itself (which is what the entire site is about) or is it something entirely different? I find this tag completely useless at the mome...

 
@rolfl God ettermiddag
 
12:38 PM
Takk
OK, limits of my 'scandanavian' of any sort reached.... I am better at languages like COBOL .... ;p
 
@rolfl I am probably better in Afrikaans than in COBOL :P
 
Max
nice just got a new office char!
 
@Max keep matches out of the office!
 
Max
haha sure
 
@Max Which char was that? 'C' perhaps?
 
Max
12:49 PM
lol
too much coding gets to your head
I meant chair, obviously! :P
 
Obviously, the char he should have gotten is the missing 'i' char...!
 
Max
ah, how very true!
 
sorry to disturb all
 
@tintinmj we are all disturbed already
 
@Max your code works but the button doesn't link back to my linkedin profile
@rolfl very true
 
Max
12:54 PM
@tintinmj as I said, you might need to change the href to whatever your linkedin profile is
in the href string, replace "tintinmj" with whatever your linkedin username is
 
yes i did
change to my original public profile link
 
Max
oh but you have no anchor element
you need a <a> element wrapping your <img> element
 
@tintinmj Bless you! (you got a cold)?
 
@rolfl he he
it's cold out here
 
Max
@tintinmj try this jsfiddle.net/Lc99b
 
12:57 PM
@tintinmj how much snow do you have?
 
@rolfl in india no snow
@Max same issue
 
@tintinmj ahh, so it's not cold out there .;-)
 
Max
@tintinmj seems like SO removes <a> elements, huh?
 
@Max then how could he have like this
Leniel Macaferi, Volta Redonda - Rio de Janeiro - Brazil
30.7k 9 86 165
 
Max
@tintinmj dunno... :P
 
1:00 PM
:'(
 
Max
let me try for myself
 
ok
 
Try the standard markup [ text (or image url ] ( followed by link target )
 
Max
check my profile
it links
 
hmm but i want the button
 
Max
1:01 PM
are you sure you are adding the <a> elements too?
those are what links.. the <img> is just an image
@tintinmj check my profile now
i got a linkedin link
sorry no :p
 
@Max yess that's what i'm talking about
not linking back to my profile just showing the button
 
Max
check now
it works..
 
OMG how?
 
Max
@tintinmj What you need to do is to highlight your <img> tag and then use the editor to insert a hyperlink
 
worked like a charm
:D
 
Max
1:08 PM
np
that will be 100$
:D
 
bankrupt :P
 
Max
:(
 
@Max you recieved my gift?
 
Max
gift?
where do i see my recieved gifts?
 
didn't see any change?
 
Max
1:16 PM
i got more reputation?
 
shhhh ;)
 
Max
hehe thanks! :)
 
1:30 PM
dropping by to say 'morning! (am I that predictable?)
@SimonAndréForsberg
 
@retailcoder Morning! :)
 
(good afternoon!)
 
@retailcoder Yes, that's better :)
I am not a morning person anyways...
 
Coming from someone who mentions me at 6:30am, sounds weird. Globalization eh?!
1 vote left to spend today, I'll be much more quiet - might actually get something done at work :)
 
at last made by profile like i wanted. Thanks to all
 
Max
1:39 PM
my name is not "all"
:p
 
@Max thanx
it rhymes :P
 
Max
hm not really :p
 
lol
[thanks manx]
 
@retailcoder Yeah, you'd better get something done now, before Rolf comes and says Ding!
 
still haven't disabled desktop notification. I just can't.
@Malachi had a facelift?
2
 
1:45 PM
0
Q: JQuery to construct elements

RoddyI'm new to JQuery, and am using it to dynamically construct chunks of a page. The HTML this code creates is what I want, but I'm not sure if the way I'm generating it is sensible or idiomatic. function setupIndex() { $(document.body).append($("<img/>", {src : 'logo.png'})); var div = $("<div/>

 
Welcome, @Foobar
 
hi
 
@Foobar Killed any zombies recently? :)
 
"ooh I'm liking this"
 
00:00 - 14:0014:00 - 00:00

« first day (208 days earlier)      last day (3803 days later) »