« first day (233 days earlier)      last day (3782 days later) » 
00:00 - 20:0020:00 - 00:00

12:01 AM
0
Q: Python model for a "snake"-like game

ThomasI wrote a python model for the game "snake" that I'm not really satisfied with. My intention was to separate the game logic from the drawing and input handling (which worked quite well) but I've got several points which I don't know how to solve better. To use this model one needs to initializ...

 
for some reason MonoDev doesn't like my Constructor....???
 
12:23 AM
Hi guys! What did I miss?
 
Retag party! :D
 
Wait I posted the only WEC entry this week?
..and it was self-answered!
I think it's time to post a meta about whether we should keep this going on, or break for the Holidays..
 
10
Q: What are the fantasy secret hats you'd wish to get?

Loïc Faure-LacroixI had for some days the fantasy of getting a grinch hat. I know there is a hat when you only do upvotes in a day and believed it could make sense to have the same kind of hats for downvotes only. It would be the grinch hat. The programmer that ruined christmas. What are the fantasy secret hats y...

 
12:50 AM
^^ nice!
Lego hats:
The house Jack built - Made 10 edits on own post. — retailcoder 56 secs ago
 
inb4 monkey hat
 
No chance of that!
 
the lol-hat
^^ posted 10 chat posts saying "lol"
 
See, I hit 5K today ;)
 
Post "lol" as a chat message, receiving 100 stars.
 
12:53 AM
Also scraped an inch of ice off the car, drove 300km, and survived ;-)
2
Then took a 3 hour nap ;-)
 
Productive monkey!
 
Took some time to load up some code in to the github as well, but screwed up more than I fixed, it seems.
 
@Jamal you're kidding right, we need like 90 more chat users!
 
0
Q: Bioinformatics: Genome string clump finding problem

richnisI am trying to solve a bioinformatics problems from a Stepic course. The problem posed: find clumps of the same pattern within a longer genome. Motivation: Identifying 3 occurrences of the same pattern within a window of length 500 within a genome allows biologists to find the "replication orig...

 
That's the point! :-) If it's too easy, then there will be a wall of lols.
 
12:56 AM
Movie time .... ta ta all. (whitehouse down!)
 
Have fun!
 
1:12 AM
^^ @Jamal
^^ gotcha! Mods do it: it's socially acceptable to post "lol" as a chat message :)
 
@retailcoder I think there might be more submissions later (not from me though). Both the past weeks has had late submissions.
 
bah, we'll see. Should I make a meta-page for #5?
 
@rolfl I did take a little look on some of your Sudoku code on github. I will try to get my C# code up there as well. I found many things of your Sudoku code excellent, but there are some things I was thinking about if there might be better approaches. But overall, nice job.
@retailcoder I can't speak for everybody, but personally I will take a break from Weekend Challenge for the holidays.
 
@retailcoder: Well, I can certainly stop posting lol, and it appears we can also cancel stars.
 
what? a moderator can cancel a star?
talk about star-power!
 
1:17 AM
That could be helpful for @Malachi
 
@retailcoder: Have you tried it, as a room owner? I'm not sure if they can do it, though.
 
It is too late to undo this operation click here to remove the notification bar
 
Okay, but please don't flag message; they show up to all mods across SE. I'll remove them myself.
 
of course, of course
In fact, I've never flagged a message at all on chat.
@retailcoder say something stupid so I can flag your message
 
1:22 AM
This comes to mind:
106
Q: Flags in chat are defective by design

Benjamin GruenbaumYes, I know the topic has been discussed before. I know that Meta already has threads that complain about how flagging doesn't work. I wanted to give a practical example. Today, a user came in to the JavaScript chat and asked the following question: Hey guys, as soon as I embed javascript,...

 
Well, let's hope I don't have to flag a message...
 
@SimonAndréForsberg Congrats on your hard-earned [badge:populist] :)
 
Although I think that even if there was a message that I could flag, I would probably forget about flags being a possible "solution"
@retailcoder Thanks, and thank you for probably having done more work than me to get people to vote on those answers :)
Anyways, as always it is late here. Good night folks.
 
10 pages of "lol" in the search results...
 
I did flag a chat message once. When this user popped up and posted a link and the next post said "it's an ad", I flagged as spam. The link was randomly uncalled for.
@SimonAndréForsberg good night!
@Jamal what search results?
 
1:27 AM
Of chat messages consisting of "lol"
 
@Jamal I know that. Where? On CR chat?
OMG
 
Yeah.
 
I like that "10 pages of "lol" in the search results..." comes up in the search results :)
233 are by me!!
 
Congrats? :P
 
150 from @Malachi
34 from @Jamal
41 @SimonAndréForsberg
I totally own this!
(shame on me)
 
Not completely
 
Oh well. It's not really a big deal. If it were actual spam or such, then it would be a big deal.
 
Yeah, spam is crap content, crap content isn't spam... I guess.
 
Unless, of course, the lol is a hyperlink to a spam site.
 
1:50 AM
@SimonAndréForsberg can get Marauder hat now if the OP changes their accepted answer on the holy mother of loops post!
Hot18 sounds more like the name of a website I can't visit at work. — retailcoder 50 secs ago
2
 
Why did I have to go to that site...
 
Is it me or getting Robocop on CR is like, impossible?
 
Seems like it. We'll likely need a new user posting a late spam answer.
Or any answer considered low-quality.
 
I'm looking at hats I don't have yet, and ... I don't think I can get any more. (except the "presence hats" for voting on xmas+NY
everybody is scared to give away rep for bounties here...
 
2:05 AM
Become a mod, and you'll get another one. ;-)
 
not sure I'd make a good mod. lol.
 
Eh, I'm still learning. For an exception-handler, I'm sure being a persistent one.
 
just flagged a non-answer
(I wonder how close to Conspiracy Theorist I am now)
 
Find some bad content to flag, and you may get there.
 
uh, you mean bad content, right?
 
2:10 AM
I meant it as legitimate enough for flagging, but yeah, you're right.
 
I think I have 10 useful flags since WB2013 has started.
 
'Tis a shame that even with a good question migrated, its answers can still be crap...
 
Why hasn't this one been migrated to Programmers??
9
Q: Why is this code so much faster (relatively) in IE7?

Andy FHere's some code that I ran through jsperf to assess its performance. The first test (named EvalLengthBefore++ in the images below) is the way I would consider normally looping through the elements of an array: var arr = []; for (var x = 0; x < 1000; x++) { arr.push(Math.random()); } var len ...

 
Again, too old.
 
I know, but back in October, was a wait-and-see - turned into a wait-and-fell-into-the-cracks :/
 
2:20 AM
Through search, it was hard for me to find those code-only questions. Great finds! Keep it up, and you can eventually earn Deputy.
 
magical super-ninja-search: answers:5
Questions with 5+ answers are crap-magnets
..and I should get my Conspiracy Theorist hat anytime now :)
 
That is true! Haha. Well, it's great that someone else is helping as well. So much crap from '11.
 
right. I need 44 more flags :)
 
Well, that's the advantage of being slow to earn rep: plenty of time to flag-to-close.
 
I don't flag-to-close - I vote to close..
flagging for closing is so for the common of mortals..
 
2:27 AM
Right. Back when I was still below 500, I would flag a lot of off-topic posts. Easy flags. Just like flagging crappy programming questions on MSO.
 
I'm defender of the realm ya know!
 
Well, at least we'll still have enough rep to vote post-graduation.
 
(got my conspiracy theorist hat :)
yeah
I hope I get to 3K soon, without too much whoring
 
But no moderator tools.
 
bah
you'll be elected as a mod anyway :)
25 hats: #22 SE-wide :)
 
2:29 AM
Yeah, but I do want to plan for the worst. If that happens, then I'll need all the (legitimate) rep I can get.
 
the worst would be if the site collapses if we let it be for a month... but I don't think this would happen either.
 
Me, neither. SO has our back, too. Probably the greatest sight would be our own front page custom design and such.
 
I'd probably have a heart attack if I let CR go for a month and came back to see it a graduated site!
 
I'd feel the same if I came back and saw hundreds of questions needing emergency editing. :/
 
I'm sure there's a secret hat if you earn all the regular hats
and I can't earn "early user" :(
 
2:39 AM
None of us can, but at least the newbies can still have a chance to join the fun. :-)
 
2:58 AM
1
A: What are the fantasy secret hats you'd wish to get?

retailcoderBINGO! Earned all hats in the same row, column, or diagonal. Hats are arranged in a grid with 5 columns (B-I-N-G-O). Clear a row, column or diagonal and say "BINGO!". Only awarded once per user. I realize this one stands no chance against Darth Vador, Gandalf, or even a LEGO brick. But loo...

@Jamal this one needs a better title:
9
Q: My C++ Code Needs A Review

Fahad UddinI have tried another program in C++.Excluding the point that the class definition should be in a separate header file,is there anything that needs to be improved? /* Date:5th January 2011 Programmer:Fahad */ #include <iostream> #include <string> using namespace std; class Persons //A...

 
I will see what I can do.
 
3:15 AM
flag-capped.
@Jamal flagging "Not an answer" for answers that don't attempt to review code is ok right?
 
On this site, I think so. But if it's not a clear NAA, a custom flag wouldn't hurt.
 
flag-capped means can't flag anything anymore, right?
 
I think so. But for every 10 helpful flags (helpful minus declined), you get an extra flag.
For here, are some of those answers comparing the original and the "edit" as if it's some kind of best-practice question?
 
which?
 
3:23 AM
^^ comment?
Is there a way to know how many edits you have?
 
The whole question. It won't let me paste the question link itself for some reason.
Yes, there are different ways.
Are you looking for total edits, or edits towards badges?
 
I want to know how close I am to S&W :)
Regarding the question, I think the edit should overwrite the original placeholder code. Without that edit the post would be off-topic per today's standards
 
Go to the suggested review queue, and hover the mouse cursor over that little progress bar at the top. It'll display progress bars for various badges.
 
70 edits
Far from [badge:copy-editor], but S&W is 80 right?
 
True. I'm not sure why one answerer is saying "the first version." Is he referring to the first code block?
Yes, it's 80.
 
3:28 AM
Probably
I smell a new hat
 
Oh well. The answers are not reviewing anyway.
 
can you just delete the question?
 
I may just close it as unclear.
I find it hard to believe this question didn't come from SO:
4
Q: Need to simplify the code

Alexandrepublic override string ToString() { string returnValue; if (!string.IsNullOrWhiteSpace(Country)) returnValue = string.Format("{0}", Country); else return returnValue; if (!string.IsNullOrWhiteSpace(City)) ...

Look at those answers.
 
Yeah I flagged a couple there. Unbelievable.
I just added a to a question, only to realize two seconds later that it was already tagged with . I think is encompassed with and we don't need it.
Or we need a tag for every design pattern / "principle" out there.
@Jamal I'd flag this one as NAA:
2
A: Refactor Windows Form code to follow MVC

Lars-ErikMy experience is that the MVP pattern works better with Windows Forms. It is more or less the same principle. It also makes it easier to create a WebForms application with the same logic. Have a look at the following articles: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter ht...

 
3:51 AM
Ouch. I went 5 days without gaining any rep.
 
bah, happens
you're a mod, doesn't matter :)
BTW I've just edited a very poor title of yours!
 
True. But who can resist imaginary Internet points?!?
It was my first question! :P
 
nice!
I'm surprised you hadn't fixed that title yet!
 
I guess I just wanted my past noobness to show. ;-)
(but at least I didn't add "thanks")
(although I did end up invalidating answers...)
 
yeah, old you would have been closed by new you?
 
3:55 AM
Nah, I would've been rolled back. And that's what concerns me. After all that time, I had to catch my own invalidation. No one else caught that.
On SO... big deal. There are tons of questions. On here, we need to keep up the quality.
 
We've raised the bar this year @Jamal, we've raised the bar...
 
Nearly three years and still in beta. I do not want to see this site die, but I'm just one person.
 
I was tempted to close that one. Old question, no context as to what it does, nothing but "try this" answers, and apparently there was a little dispute over copied answers.
 
Yeah how can a question with a downvoted LokiAstari answer be a good question?!
 
4:03 AM
@retailcoder: I can actually think of one.
 
@rolfl Seriously, it's like @Jamal said: "try this" answers aren't reviews, and the OP abandoned it.
 
3
Q: Roman numerals to decimal

JustinThis is an assignment for class. I would like to know how to improve my code. It is a program to convert Roman numerals to it's decimal equivalent. This is what I have so far. There must be a better way of distinguishing between ex. 'IV' and 'VI' than what I have currently written. #include <ios...

 
Ugh. What to do with this?
0
Q: I'm torn between conditionals and abrupt return functions

ThomasReggiWhich one of these two is better? This one: middleware.response_redirect = function(){ return function (req, res, next){ var redirect = function(){ if(req.form.redirect) return url.parse(req.form.redirect); return { protocol: "http", ...

 
0
Q: I'm torn between conditionals and abrupt return functions

ThomasReggiWhich one of these two is better? This one: middleware.response_redirect = function(){ return function (req, res, next){ var redirect = function(){ if(req.form.redirect) return url.parse(req.form.redirect); return { protocol: "http", ...

 
But I will not act on his answer as it could be an abuse of my powers.
 
4:04 AM
I disagree ... asker had (obvious) repeating code clusters, asked for how to restucture, got multiple answers that were suggesting slight variations on the same theme that there is no real way to eliminate all of it, and then acknowledged that as an edit.
 
I just saw where I was mentioned. I saw the cancel stars and the number of starred messages....lol
oh my gosh
 
@Malachi you cannot simply start replacing all the lol's with omg's now.
 
@rolfl: In that case, I can still undelete it.
Uh oh.
 
wut
 
We can't delete a question if ll the reviews say 'you're doing it the best that can be done'
 
4:07 AM
@rolfl the way I see it, that question has no reviews, just a bunch of code-only answers. Feels like SO.
 
@rolfl what you mean I can't say OMG instead of lol?
 
I see it as a legitimate CR question: Here's my code, it works, it has redundancies, please review.
I see the answers all suggesting different alternatives (unless you consider loki vs. loki who appear to think they have the same answers).
My vote is woth just 1, but Jamal is super-user. I want to know why in this case ... ;-)
I think it's a case for Meta?
 
Nah, it's okay. It's an old question anyway. I can undelete it.
 
Sure, it has some fuzziness, but nothing near as cut and dry as yuou make it sound.
('you' being @retailcoder)
 
@rolfl I agreed with deleting the question. My issue was with the answers :p
 
4:15 AM
The answer that came up in my review queue that was flagged as low quality, was actually one I would upvote (and when I went to upvote it, the whole question was gone!).
 
I was the one who deleted the whole thing, so it's not just him. It is true that it's still on-topic, but also lacks context. Would closing it suffice? I can always flag it for another moderator to review it.
 
Close-voted:
0
Q: I'm torn between conditionals and abrupt return functions

ThomasReggiWhich one of these two is better? This one: middleware.response_redirect = function(){ return function (req, res, next){ var redirect = function(){ if(req.form.redirect) return url.parse(req.form.redirect); return { protocol: "http", ...

 
@rolfl Here.
 
Hi, I voted to close as 'opinion-based', because as it stands, you're not asking for your code to be reviewed, but whether snippet A is better than snippet B. This kind of question leaves little room for reviewing code. I would suggest editing the post so as to reflect the actual code you have. — retailcoder 33 secs ago
 
Sorry, I was at work and left my browser open with the chatroom tab loaded.
 
4:17 AM
Hey @syb0rg - looking for assistance on my mess ups on GH.
 
Am I being a PITA with that close vote?
 
@rolfl I saw some emails while I was at work, and it looks like your comments were good.
I see that 300 chat comments were made while I was gone...
What did I miss?
 
@syb0rg funny, I asked the same after almost a whole day off CR :)
 
Yeah, so he wants in, but for some reason, he's the only 'public' person, was that me? .... actually, he's not public any more .....
 
@retailcoder I'm interested in what went on.
 
Two new tags, more deleted non-answers, and my oldest CR question was vandalized edited by @retailcoder. :P
3
 
@rolfl How do I know if they are public?
@Jamal Thanks for the update.
 
So, I reopened the issue:
https://github.com/CodeReviewCommunity/CodeReviewCommunity.github.io/issues/9
because there are also issues of creating teams for repositories he wants to join, but he also can't see teams he's not a member of.
Basically, it appears that non-owners can't see what teams there are, unless they are a member.
(of the team)
 
@rolfl Odd, I wonder how I can change that.
Sidenote: I'm finally on Christmas break!
2
 
Congratulations ... ;-) I noted you said you were working on a Sunday!
 
4:23 AM
@rolfl Yeah, I live quite the hectic life.
 
@syb0rg - public members vs. private:
 
@rolfl I'm wondering whether this page is relevant or not:
 
I am not sure whether he se it to public as soon as I added him, but I don't believe so.
 
Should I publish membership of all the owners?
I don't see any point of us not being public.
 
I would agree to that, but you may want to ask the individuals.
Anyway, it appears that 'teams' may be unnecessary
Give everyone 'pull' permissions on everything.
 
4:28 AM
@rolfl Not pull and push?
 
Why would we want to 'box' people in certain ways?
push, sorry, push.
whatever, but not admin
Need to open a request to create a new repository is about as restrictive as it should be
 
@rolfl I don't think they can merge if they have both the ability to pull and push.
I do agree with that it should be less restrictive.
 
@rolfl: I have decided to undelete that question (now edited), despite the answers. It it ends up collecting close or delete votes, so be it. I'm not sure too many people will pay attention to it anyway.
 
@rolfl I am questioning the point of teams now... I thought it would organize the code, which it kind of does, but not to the extent I thought it would.
 
@Jamal / @retailcoder Thanks, I think. I want the site to be 'quality' but the battle should be fought against the not-so-fuzzy isses. Deleting questiokns with 4 upvotes should be thought through carefully, and when the ansers have close to 10 upvotes too ...
Need to cut the crap with a scalpel, not an axe.
3
@syb0rg I am not sold on the team concept either ... it 'boxes' people, and they don't need that.
 
4:34 AM
@rolfl I wish that owners of organizations on Github had a bit more flexibility and options available to them.
 
They sort of do, they can host their own system ;-)
 
@rolfl Admins should have the ability to look at and join teams...
Ahh, there is a caveat at the bottom
Note: Admin teams don't administer the entire account. For example, you can't add or remove users in different teams.
That's silly.
 
NAA, admitted by owner:
1
A: Converting base-10 numbers into base-26 letters

ArielInstead of doing it yourself, use this: http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php and http://www.mpir.org/ also see: http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/ Then gmp_strval(number, 36) Or 62 (instead of 36) to use both upper and lowerc...

 
@retailcoder: Almost to S&W? :-)
 
@Jamal 3 more :)
 
4:41 AM
0
Q: Operator overloading

JustinI am trying to write my own vector class, using overloading for certain operations such as input/output of elements and push_back(). How would I overload the addition operator? Right now, I have it cout the individual elements of the array after summing each element of two vectors, but I would l...

 
^^ I think it's asking for code to be written
but I retracted my last close vote so I'll pass on this one
 
Not much code to review anyway (only counting what's embedded).
 
I lol'd at this one - do you guys get the cartoon reference?
2
Q: Can I jump like this?

user3829In my nested for loops below, it is sometimes necessary to exit the outer loop and then continue program execution. Since loop labels and other goto-like constructions are heavily discouraged, I'm a bit afraid of raptors. Is this usage OK? Is there a better way to structure the program? my @obje...

 
Nice title.
 
Indeed
 
4:47 AM
0
Q: I need to know simple procedure for Deployment of elasticsearch-search server with chef-solo

shailendra pathakI need to know simple procedure for Deployment of elasticsearch-search server with chef-solo.

 
2 more...
bah, tomorrow.
Good night!
 
Goodnight!
 
@retailcoder Good night.
 
5:07 AM
Yay!
( ) In Soviet Russia, you contact recruiters! — Jamal 7 hours ago
 
@rolfl I asked the community to comment on whether teams should be kept or not:
3
A: CR Community Goes to GitHub!

syb0rgPlease visit the GitHub Code Review Community page for more information on joining the group. Please state what language/team(s) you would like to be added to when you open an issue. If your reputation on Code Review any StackExchange site is greater than or equal to 2000, you will be added to t...

I'll look at the responses in the morning. Night all!
 
Night!
 
 
2 hours later…
6:54 AM
0
Q: Re-Learning how to Code

MalachiThis little bit of code is just some code that I wrote from a flowchart at the beginning of a programming and logic book that I have added some to. I tried to create it as an object, I would like a review on what I am doing and if I am doing it right, and what I could do better. I want you to l...

and I am off to bed. catch you guys tomorrow.
 
0
Q: Re-Learning how to Code

MalachiThis little bit of code is just some code that I wrote from a flowchart at the beginning of a programming and logic book that I have added some to. I tried to create it as an object, I would like a review on what I am doing and if I am doing it right, and what I could do better. I want you to l...

 
What's Intermediate for?
 
7:44 AM
0
Q: How to loop through the combination in an beautiful way

pocI want to combination the elements in different lists. For example. Here are 3 lists. list_a : [ 1,2,3 ] list_b : [ 4,5,6 ] list_bb : [ 14,15,16 ] list_c : [7,8] list_cc : [17,18] Because list_b and list_c is mutual exclusive. Only one of them will exists in the output list. And list_bb on...

 
8:32 AM
0
Q: Constructing a binary tree in java

VINI am constructing a binary tree. Let me know if this is a right way to do it. If not please tell me how to?? I could not find a proper link where constructing a general binary tree has been coded. Everywhere BST is coded. 3 / \ 1 4 / \ 2 5 This is the binary tree which i want to ma...

 
 
1 hour later…
9:40 AM
0
Q: Div moves over previous div resize

user2269908I have two divs that display side by side on a normal widescreen. I need to have them display below one another on mobile. Normally on a device resize the second of two floating left divs falls underneath the previous. <div id="container"> <div class="text">blahblahblah</div> <div class="image"><

 
 
3 hours later…
12:15 PM
@retailcoder is also a horrible name for a variable tag.
 
0
Q: css center data tables

mfinkelstineI need help with my html/css code if some can please review and let me now what is wrong with it, Im trying to build system information page, until now everything is ok with 1 "Stand Information", when I Tried to add another "Stand Information" the page is stopped being centered and the "Data res...

 
@Jamal For that particular question you talked about there, I'd say the context was enough for that particular question. (The question being codereview.stackexchange.com/questions/4669/… )
 
1:20 PM
5k in 52 days, well done @rolfl
 
1:40 PM
0
Q: So this is Christmas, and what have we done?

Simon André ForsbergAs 2013 comes to an end, I thought it was time that someone other than retailcoder reflected about what has happened around here. Looking back on a regular week in January, 2013, the top user earned 217 rep. Looking back at a not so randomly selected week in February, the top user earned 535 rep...

 
@StackExchange Thank you!
 
Hey I got Pundit overnight!!
 
@Jamal we have beginner, I think we should have and probably or
 
@Malachi beginner is supposed to advice reviewers to 'go easy' on the questions and direct the answers to a beginner. How should a reviewer adjust to reviewing 'pro' code? Ir the lack of a 'beginner'/'intermediate'/'pro' level.
Also, who determines when a beginner becomes intermediate, etc.
 
1:51 PM
@Malachi I think intermediate and pro/professional is unnecessary, if a question doesn't have beginner, it's automatically something else.
 
Aslo, just because people get paid (pro) does not mean they are not beginners.
 
@rolfl Monkeys decide!
2
 
good points @SimonAndréForsberg and @rolfl
 
I asked plenty of noob questions when I started learning Scala, and I'm still learning.
2
 
2:33 PM
SO is a tough crowd, anyone want to downvote this answer for me so I can delete and get a badge?
-2
A: GoogleWebAuthorizationBroker Throws Exception in C#

Malachilooks to me like you have the variable named wrong This... credidential = await GoogleWebAuthorizationBroker.AuthorizeAsync( new Uri("ms-appx:///Assets/client_secrets.json"), new[] { Uri.EscapeUriString(CalendarService.Scope.Calendar) }, ...

 
2:47 PM
@Malachi Done
 
@SimonAndréForsberg thanks.
it was a good answer, then he said that is the name of his variable. but the link shows that the variable name should be what I said it should be.... idk, I don't think that the guy knows what he is doing??? I shouldn't judge though, I don't know what I am doing half the time either
 
@Malachi I think that the name of the variable doesn't matter at all. That can't cause that exception.
 
the exception talks about "non success" it could be anything "System.Exception: The process terminated unexpectedly."
I am thinking that the Application isn't talking to the google host.
not sure I am using the right terminology, but I gotta run be back later
 
3:21 PM
0
Q: struct.unpack on a bytearray that works under Python 2.6.6, 2.7 and 3.3?

d33tahGiven the test code: import struct buf = bytearray(b'\xef\xf8\t\xf2') number = struct.unpack("<I", buf)[0] How do I cleanly make it work both under Python 2.6 and Python 3.3? The problem is that struct.unpack in Python 2.6 seems to expect a str object (not unicode), so the only way I managed t...

0
Q: Can you optimize this easy game?

Mitulát bátiI've been writing a simple code just for fun: This is a simple WinForms application you can measure your typing speed with. There are three controls on it, doing the following: rtbResults - The one where you need to be as quick as possible. :-) textBox1 - The one where you submit the reference...

0
Q: How unnecessary is 600 lines of code for this rather simple program? I'm learning...

ZionmooseAs a student of C# right now, I am trying my best to get a grasp on many of the systems being taught. I just completed Week 1 of a C# 102 class and the class was assigned a bit of homework. I am curious, from a beginners point of view how you might restructure this code to make it better readable...

 
4:10 PM
0
Q: Is calling a function from within another to alleviate duplicitous code the best solution?

Brook JuliasI am writing up a class to handle various templates to be used in a web application. Each template contains various placeholders which will need to be replaced at the time of the build. I a wondering if the method I am using is the best solution, or if I should consider something else. At the mom...

 
Tough crowd today ..... huh?
 
hi
 
hi
 
I saw that!
 
stars to burn ....
 
4:25 PM
Well, I got my first Mortarboard and Good Answer on MSO this morning. It may never happen again, so I need to savor this moment.
3
 
RSA
congrats
 
Posting funnies on MSO really does brighten the mood. Although it's associated with SO, the folks are pretty laid-back.
 
 
1 hour later…
5:28 PM
0
Q: Reading file from JTextFied

user2978804I have written a gui in Java and when you click one of the button a new gui window pops up (using a event listener class and calling it in the main class). I would like to display the contents of a text file in this new popup window, but can't seem to be able to get it to work. Any advice much a...

 
5:41 PM
0
Q: Simple text search algorithm

EpicPineappleBasically, this code takes a keyword and an array of strings, then sorts them based on two things: the number of characters shared with the key, and the distance between them.(As a side note, would this properly be called a sort, not a search?) def search(key, list) # Format for everything pushe...

 
5:55 PM
@SimonAndréForsberg: Oh, I thought you were kidding! I'll do that right now. :-)
 
0
Q: Condense multiple if statements with or operators?

CharlieI created a weather widget in javascript that requests the current weather from Yahoo. The weather request returns a code which corresponds with a current weather image. I don't like Yahoo's images, so I use my own CSS classes that correspond with my own images. Consequently, the following code r...

 
6:35 PM
Hello @SimonAndréForsberg
 
@Jamal Me, kidding? Nonono :)
@Jamal Nicely done, @Community
Hello, @syb0rg
 
Downloading Battlefield 3, lets hope my computer can handle to graphics load.
 
@Jamal should have put the conspiracy theorist hat on him
 
Done!
 
6:51 PM
nice
nice
 
7:03 PM
Gah. 'Thanks for reviewing', myeah, just click that up vote thingy button dude..
never mind
 
@tomdemuyt - he don't have the rep to upvote ;-)
(That was my upvote BTW).
 
thanks!
that is kind of silly
 
He needs 2 more - 15 allows upvotes
 
one ought to be able to upvote an answer
I upvoted his answer
should be good now
*question
 
What question are we talking about?
 
7:06 PM
"What? You want vote up? Aren't my thanks enough???"
 
3
Q: First jQuery Plugin - SmoothSlider - Would appreciate a code review

emgeeI've been working with jQuery, mostly consuming plugins and using bits and pieces here and there for other functionality. Anyways, I wrote some standalone functionality in jQuery for a project and decided to convert it to a plugin as an exercise for myself. Note, it's not a full blown plugin, I d...

 
;)
 
@tomdemuyt What, you hadn't already upvoted his question ... ;-) Shame on you!!!! ;-)
if it was good enough to answer, it should be good enough to upvote ... just saying ;-) (all very jest-ful, etc.).
2
Maybe I can whore-up enough interest in this question to give the guy enough rep to up-vote too:
2
Q: WinForms typing speed game

Mitulát bátiI've been writing a simple code just for fun: This is a simple WinForms application with which you can measure your typing speed. There are three controls on it, doing the following: rtbResults - The one where you need to be as quick as possible. textBox1 - The one where you submit the referen...

 
I love how when someone posts a question or answer here, it warrants an automatic upvote from me.
 
I upvoted, you were right
Especially since the code was production ready for me
 
7:13 PM
@tomdemuyt: I've needed to edit that question anyway, and someone may upvote your answer for Revival.
 
Oh, I missed that it was a headshot too.
 
Yep
I am going over all open /old JavaScript questions
 
Good kill. and you even 'woke the dead'.
 
what we need is a node.js expert
The first page of open js questions is getting very node.js centric
since that is not my forte at all
 
If you reach 10, you'll have Nice Answer, Necromancer, and Enlightened.
 
7:16 PM
Revival! Thx guys
 
I'm still in the process of retagging some questions, but I'll do so gradually.
 
7:32 PM
0
Q: Feedback Requested : “Game” Engine Requirements System

CielI am/have been building a game for a long time now. The game is a web browser based system, and data is stored using JSON stored in RavenDB. One thing I am very constantly running into as a problem is the notion of Requirements. Anyone who has played a game, particularly an RPG, is probably fami...

 
7:43 PM
Eh
For the game engine, I think most RPG developers delegate this to script..
 
0
Q: Counting last number

user3125969(please write with c# console application).Given array .Counting the same number of the last number . Example . If input (1 2 3 4 2 2 3 2),i want to count 2 because 2 is the last number of this array. Result is( 2 is 3 time )because i don't need to count the last number.

 
00:00 - 20:0020:00 - 00:00

« first day (233 days earlier)      last day (3782 days later) »