« first day (213 days earlier)      last day (3809 days later) » 

12:02 AM
^^ wow this guy has been flooding SE with unanswerable questions.
 
12:51 AM
I wonder how close I am to [badge:pundit]...
 
@retailcoder|------------------|
That close......
 
@rolfl woah, that close?!
lol
Actually, what's your scale? I'm sure it's more like |---|
monkey, monkey-ee, monkey, monkey-ee.. don't you know you're gonna shhhock the mon-key
 
Nah, five '-' count for one '=', so, in '=' terms you are |===| close
 
lol
 
Which makes me about |###########| close to [badge:Legendary]
@retailcoder I can't see a way to search for your current proximity.
 
12:59 AM
Ah, now I understand!
there's no way of doing that until the data explorer is up :(
 
1:23 AM
got my Enthusiast badge!!!
both here and on StackOverflow
 
@Malachi nice! 70 days to fanatic! :)
 
Now don't skip a day in Texas!
 
I know there's already a meta post for this, but that would be my take at CR's artwork/logo - thoughts?
 
1:48 AM
0
Q: Valid and safe use of SpinLock in Singleton?

markmnlIs this a valid and safe use of using .NET's SpinLock? public static class SingleRandom { private static Random random; private static bool gotLock; private static SpinLock spinLock; static SingleRandom() { random = new Random(); } public static int Next() ...

 
2:04 AM
0
A: What should our logo and site design look like?

retailcoderI'm thinking of a more sober design, something like this:

 
2:29 AM
@retailcoder - you had better spell it right! ....
(kidding).
 
@rolfl spell what right?
 
3:01 AM
w - h - a - t
Bed time.
 
What up? I got this awesome app for my windows 8 tablet that work got me, but I have to pay to stay logged in all the time
and the keyboard is above the text input box all the time
 
And apart from you calling it an 'awesome app', what's awesome about it? sounds like it's c-r-a-p
2
 
3:31 AM
Does this make any sense?
// arrange
var results = new ConcurrentBag<int>();
var iterations = 1000;

// act
Parallel.For(0, iterations, o =>
{
results.Add(SingleRandom.Next());
});

// assert
Assert.AreEqual(iterations, results.GroupBy(e => e).Count());
 
3:46 AM
^^ guts are telling me "no dude, random doesn't mean unique" -- but I had to run like 6M iterations (6x calling this method 1000 times with iterations set to 1000) before I ran into a single repeated result.
 
@rolfl it is crap. except for the awesomeness. i guess that I haven't used very many apps either though
@rolfl I won't miss a day in Texas!!
 
@200_success did you see this question? Can you answer it and/or destroy my answer? codereview.stackexchange.com/questions/36542/…
 
4:20 AM
@retailcoder Why are you asking me? I have 4 C# answers to my name, all of which are not C# specific. Anyway, @Jesse's comment looks good.
@retailcoder The Random documentation has a weird tidbit: "Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe."
 
@200_success for some reason I think I've always seen you as some language-agnostic guru :) ..and yeah I've seen that statement on MSDN, for several types.
 
@retailcoder I've actually been wondering who is the most well rounded user. I'm trying to develop a Data Explorer query to answer that (when CR is eventually supported by Data Explorer). However, that query is still a work in progress, since I don't have a good statistical measure of well roundedness yet.
’@retailcoder The technique in stats.stackexchange.com/a/10716 falls apart when there are negative values, which makes me very suspicious.
 
4:43 AM
@200_success users who derive their scores the most evenly across their tags. - wouldn't a user that answered 1 question tagged with , and derive 100% of their rep evenly from all of their tags?
 
@retailcoder I know. As I said, work in progress.
 
I think < 200 rep users will end up being trimmed from your results - the SE user rep leagues don't count them, roughly looks like a reasonable threshold.
0
A: What should be the name of our main chatroom?

retailcoderThe 2nd Monitor We all [hopefully - if not you're missing out!] work with at least two monitors. I noticed I keep the chat window open on my 2nd monitor [almost] all the time. Having a 2nd monitor is also quite handy during an actual peer review.

And... it's a wrap, see y'all tomorrow!
 
5:24 AM
0
Q: Searching in an array in less than O(n) time

user3011937I've an array where each element is either one less or one greater than the preceding element. I've to search an element in it in less than O(n) time. I've implemented it like this: public int searchArray(int[] arr, int i, int elem) { if (i > arr.length - 1 || i < 0) { return -1; ...

 
 
1 hour later…
6:46 AM
0
Q: Error in Firefox for undefined event

moloi am having a problem, this code does not function in Firefox but functions fine in IE function num_press(e) { var event = e || window.event; var assumed = event.target.value || event.srcElement.value; // alert (" assumed " + assumed); if (pointPressed) { //alert (" fraction numbe...

 
7:06 AM
0
Q: Editing code to model problem?

hecI have the following problem to solve, "A company wants to see a printout of the gross payroll for each of its 7 departments. The output should be a list of the seven departments and the total gross payroll (rate times hours) for each department. Be sure to validate the input data. If a line of ...

 
 
2 hours later…
9:01 AM
0
Q: what is connectionless protocol in UDP?

user2984410I know the difference between the TCP and UDP but I am confused during transmission between client and a server. why it is said that connectionless protocol and How it is related during the real time transmission of data ??

 
 
1 hour later…
10:10 AM
0
Q: Unit of Work with Generic Repository Pattern MVVM, vol. 2

J.MarciniakContinuation of this question: Unit of Work with Generic Repository Pattern MVVM @retailcoder maybe you can help, again ;) I have made some modification: Interfaces don't force to implement IDisposable Remove the finalizers Rebuild UoW Here's code: FeedRepository: internal class FeedRepos...

 
10:36 AM
0
Q: Is this a good structure for my website?

ScottI have been building a site using php and would like advice to improve the structure of my site and the best way to lay out my code for SEO. I'm also a little concerned about echoing large chunks of HTML and how SEO will work with my structure. Ok here's my structure... My site contains many pa...

0
Q: i need to make a function that reverse the order of lines in a file by using stack in python

user3060225class stackfile: def __init__(self): self.file=open('c:/Users/ahmed/Desktop/Edit1.txt','r+') def push (self,line): self.file.write(line) def pop (self): return self.file.read() def is_empty(self): return self.file.read()=="" def filename (self): return self.file.name def filec...

 
10:57 AM
0
Q: Copying Dictionary collection into an array

DigantaHi I want to minimize the following code: private string getAllCommandLineOptionsAsString() { string s = ""; var cmdOptionsList = commandOptionDictionary.ToList(); foreach (var cmdOptions in cmdOptionsList) { s += cmdOptions; } return s; } I am aware of the string.Join(string separator,...

 
 
1 hour later…
12:18 PM
I cant even edit code on this thing, that fancy tickmark mark thing is no where to be found on this keyboard
 
backtick.... or more formally, the grave ... that's what ``` is
 
12:39 PM
hmmm I 'stole' an accept : codereview.stackexchange.com/questions/36547/… .... I almost, almost feel bad .... (I stole it from David Harkness0
 
0
Q: How to find php url

user32898So, I make Regex to find any url on site, uses php. Reg = new System.Text.RegularExpressions.Regex("((http|https)://([a-zA-Z0-9-]{1,}[/]?))?[/]?([a-zA-Z0-9-]{1,}[.](php|html))((/[a-zA-Z0-9-]{1,}){1,}[/]?){0,}([?]([a-zA-Z0-9]{1,}=[a-zA-Z0-9\"><();/.,]{1,}&?){1,})?"); Is this code optimal or may...

 
1:00 PM
@retailcoder - answered another C# question ... maybe at some point I can score [badge:generalist]
 
1:18 PM
@rolfl I know you can!
..What question?
 
1
A: Finding PHP URL

rolflUsing regex to match a URI is never a good solution... as you have discovered, you now have two problems (the base problem, and the regex problem). In this case, you should use the language features to help you.... (bear in mind I am a Java person, so I may have some syntax errors).... try { ...

 
0
Q: Better way to compare hash values in ruby?

daxI have a method that checks to see if a set of given items should have discounts applied and if so, determines and returns the discount def get_discounts @items.each do |name, attr| @specials.each do |special| while name == special.sale_item && attr[:quantity] >= special.quantity ...

 
huh, just noticed, different computer... and my (ding) is back
 
lol
 
So, how bad is my C# answer, I see it did not score an up-vote from you, but you may be out-of-ammo
peer pressure?
 
1:30 PM
Good one. I like regex too, and you're right about the hammer/nail part. I've seen people trying to parse XML with them...
I haven't done web dev in 2 years, and when I did, I was learning the language and framework... not very familiar with the web namespaces. I need to fix that.
 
I maintain an XML-related project, the things I have seen people do to XML ..... :(
 
Or worse: HTML
 
Afternoon all! Tried really hard to find a way to kill this Zombie: codereview.stackexchange.com/questions/36483/…
 
@SimonAndréForsberg upvoted, nice one
 
@QuentinPradet Hi Quentin, and thanks :)
 
1:44 PM
@QuentinPradet Hello! I hope you don't mind, @StackExchange bot has appointed me as the new room owner :)
 
nope, that's fine, and I'm glad to see activity
 
@rolfl I give up! There's no way I can keep up with your ever increasing reputation.
 
Anything wrong with my answer here or just nobody who could make sure I was correct? codereview.stackexchange.com/a/36280/11227 (it had an open bounty when I answered)
 
@QuentinPradet make sure you spend some stars while you're here, I'm sure having a few [badge:outspoken] awarded on the site is a good sign :)
Me & have nothing in common.
 
Already spent stars here, no worries.
@retailcoder not yet :)
 
1:49 PM
@QuentinPradet the bounty probably expire.
 
yeah, it did
 
if the bounty expired recently and hasn't been manually awarded there's a grace period for the bounty owner to still award it manually
otherwise you'll get half the bounty
 
yeah what @retailcoder said
if you guys see funny messages from me it is because i am on that windows 8 tablet at the airport
 
@QuentinPradet I can give you an upvote because I see it is helpful, but erlang and I have as much as common as @retailcoder and erlang.
 
@Malachi the win8 tablet writes funny messages, or there's something in the air in that airport?
 
1:59 PM
Just found out that the "tags" tab of a given user is actually quite helpful to understand the languages and technologies he likes (except for me ^_^)
(Thanks for the upvotes)
Oh, Winston Ewert no longer is overall #1. Again highlights the retention issue
 
10
Q: Winston Ewert is no longer a moderator?

JamalI've just now noticed the missing diamond on his profile, along with this: There's no announcement on Meta, and this just seems like an abrupt change. I'm not sure how long ago this was, either. But I probably should've suspected something when it seemed to take a tad longer for my recent mo...

 
I had missed it indeed.
 
@retailcoder well this is south dakota. so yes and yes
 
Not sure why meta.codereview.stackexchange.com/questions/491/… was put on hold, with complete disregard for the reasons it was opened (not even a comment on the reason it was closed).
 
@QuentinPradet @Jamal is surely going to come by at one point or another, he's just got his brand new vacuum cleaner, he might swallow a sock or two.
I mean you can ask him in person when he comes around :)
2
 
2:11 PM
Thanks! We knew it wasn't a great fit for meta when we created it, but something like that can be useful I think, especially in Python.
 
Anyone knows how to implement lazy-loading in an IRepository<T> implementation?
1
Q: Unit of Work with Generic Repository Pattern MVVM, vol. 2

J.MarciniakContinuation of this question: Unit of Work with Generic Repository Pattern MVVM I have made some modifications: Interfaces aren't forced to implement IDisposable Removed the finalizers Rebuilt UoW FeedRepository: internal class FeedRepository<T> : IFeedRepository<T>, IDisposable where...

I don't want to tell the poor guy that I'd scrap his entire code and use EF as-is...
 
@QuentinPradet I agree. I feel that something like that can be helpful for Java too. We could write general questions like "How can I avoid the singleton pattern?", "What should I think about when naming my variables?", etc. I think such questions can be as highly voted as some classic StackOverflow questions
 
I don't agree. I think they should be posted as questions on the main site, like John Saunders did:
196
Q: What is a NullReferenceException and how do I fix it?

John SaundersI have some code and when it executes, it throws a NullReferenceException, saying, "Object reference not set to an instance of an object.". What does this mean, and what can I do about it?

...and self-answered of course :)
 
@retailcoder Yes. I agree about that too. I think they belong on the main site and not on meta.
 
with psuedo code?
 
2:22 PM
@Malachi Noob code looks like a noob's code
 
lol
 
@Malachi I'm hitting 2K today :) [well I'll try real hard]
2
 
i won'r be anaweeing any questions on this tablet today
 
yeha yu beterr nnnot
 
@retailcoder You'd better not answer any questions either, not with that spelling.
 
2:25 PM
@SimonAndréForsberg oops I forgot: </sarcasm>
 
@retailcoder oops I also forgot: </sarcasm>
 
<sarcasm>
...
 
yeah i see what you guys mean about that post from stack overflow
 
</sarcasm>
 
anyway i have to go get on a plane
 
2:27 PM
@Malachi you've been wrapped :)
 
@retailcoder carp
 
lol
 
0
Q: How can i solve my constructor injection code architecture

Patrick MageeThe current code solves the issue I had when trying to use Property Injection. Problem: Every module must use Constructor Injection because of a circular reference that occurs when not using Constructor Injection with my factories and trying to use Property Injection Reason: A module requires a...

 
@QuentinPradet: I've closed that post because I couldn't quite see how it related to Code Review itself, as described in the close reason. I didn't delete it nor lock it since it contained useful information.
 
@Jamal perhaps it should be migrated to the main site and locked?
 
2:38 PM
@retailcoder: I could do that, with a historical lock.
 
seems appropriate. @QuentinPradet do you agree?
 
Here's the original meta discussion meta.codereview.stackexchange.com/q/474/11227
It's not on-topic on the main site anyway, does not contain code to review
Why wouldn't another moderator in two years close the question on the main site?
 
@retailcoder: Actually, it won't let me directly migrate it to the main page, so I may just have to lock it on Meta.
 
makes sense
 
We thought about the Python tag wiki too for this, but I don't think it's possible to link to subpart of a tag wiki
 
2:41 PM
@QuentinPradet: I've had that tag killed on Meta since it served no real purpose. The now-deleted comments suggested that it was made to give syntax-highlighting, but it didn't work. MSO doesn't have such a tag, either.
 
@Jamal What tag?
oh
 
@QuentinPradet: Python.
 
no I meant the Python tag on main
 
@QuentinPradet I think it's a lot better to use questions and answers for it than tag wikis. Perhaps it's time we create some general questions and answers on the main site for this purpose, or create a meta question to bring up the subject again?
 
Oh no, that one is intact on the main site. :-)
 
2:43 PM
@Jamal speaking of killed tags, I think I made a mistake with .
 
Everybody agrees that questions and answers are better than tags, but currently it does not make sense on main or on meta. I'd favor meta, but if you want it on main, go for it
 
@QuentinPradet why wouldn't it make sense?
 
on main it does not make sense because it would be closed as offtopic :)
on meta well... it's not discussing about the site
 
@retailcoder: I was thinking about that a bit, but I also wasn't sure if it was in my position to discourage its creation. Even if it was a mistake, it's not a big deal. It can always be burninated.
 
you mean BURNINATED
 
2:46 PM
Indeed. :-)
 
no, I think he means (removed)
 
lol
 
@retailcoder: Anyway, you may retag those questions if you wish.
I will also ask a community manager to migrate the Python Meta post to the main site (which should be possible).
 
@Jamal done.
 
@Jamal Wouldn't a meta question be more appropriate first?
 
3:00 PM
@QuentinPradet: It could be. I'm willing to hear opinions on that before I consider asking a community manager. Even if it contains no code, it can still work on the main site as long as it's historical-locked.
 
@Jamal Wouldn't that prevent new answers?
 
@QuentinPradet: Yes, but since it's still off-topic, it shouldn't accept new answers. I'm still keeping it visible because people could find it useful.
 
I think perhaps that question itself might not be a good Q & A, but perhaps each answer in the question could be it's own on-topic question and answer.
 
The whole point is to be able to add new answers! I don't know about other languages but newcomers to Python all make the same mistakes
@SimonAndréForsberg Sure, that would work too
 
That applies to Java too, I believe.
 
3:04 PM
If we allow new answers on this post, we might as well allow it on any others without code. A historical lock indicates that it is useful, but is not considered on-topic. SO has some examples of these, although they're even more off-topic.
 
It's not off-topic, that's the point: it's not a question that appeared by accident, and people did agree to create this question
I wouldn't compare it to "nice questions on SO that are now off-topic"
 
On-topic for the main site or for Meta?
 
This meta-discussion needs a meta-discussion ,..... in order to decide whether the meta-discussion should be discussed....
4
 
@Jamal the question would be off-topic on main, I wouldn't want to see it die there
It would be off-topic everywhere according to the rules, we agreed when creating it that it would be a special case
 
@QuentinPradet: I agree there. However, by die, do you mean not noticed very well? The same may be said about Meta, considering there would be no language tag for it on Meta.
 
3:10 PM
Not noticed, not linked anymore, yeah, but above all not updated :)
I do agree that it was dying
@rolfl So who's going to write it? :)
 
I may ask some community managers if they can weigh in, but they may not be able to do so since they're not accustomed to this site. Our mod room is quite inactive as well, so I may not hear from the others too soon.
 
3:22 PM
"Code Review General Room" is boring. not enough participation on this one:
1
Q: What should be the name of our main chatroom?

retailcoderOur main chat room is currently called Code Review General Room, with "General discussion about Code Review." for a description. I propose The Zombie Hunters' Lounge, but I'd like the community to post their ideas here (1 per post, include why it's the best name), the one with the highest number...

 
@Malachi I see my suggestions are not appreciated (pleased it was you who took the bullet, and not me....):
-1
A: What should be the name of our main chatroom?

MalachiFrom rolfl's Comment to another Question, I suggest The Ready Room

Ouch!
 
It's missing a link to that "another question" :)
 
@QuentinPradet I think it's intended as "another answer". @Malachi has those "blame the win8 tablet" moments...
 
Oooh, I got complimented ... (much better than an up-vote ;-) ) :
"A good programmer knows how to use recursion. A great programmer knows when not to." --Anonymous — Plutor 2 hours ago
2
 
oh that's good
 
3:30 PM
And that also brings up my max-200 rep for the day.
 
[badge:legendary], one day at a time...
 
Oh, and a [badge:nice-answer].
 
3:50 PM
Pops has spoken..... and locked & hold
 
Two locks on one post. :D
Community User, would you like to add yours as well? Locking party!!!
 
@rolfl is there a return; statement in JavaScript? like, can you invert a condition to reduce nesting?
 
/me wouldn't want an OOP logo (meta.codereview.stackexchange.com/a/1209/11227), it wouldn't fit with many languages here. (otherwise nice attempt)
 
@retailcoder - get it through your thick ... Java and Javascript like Car and Carpet .. ;)
 
@rolfl I remember that. So you know no JS?
@QuentinPradet thanks!
 
4:03 PM
0
Q: Javascript null/undefined checking

datatestThis looks pretty messy. I need a check an input for seat, but I can't guarantee it has a value (one may not be chosen for example). If the seats aren't in a certain color it goes to seat basic(1), otherwise seat premium (2) var seat = $("input[id*=" + seatPrefix + "]"); if (seat != 'unde...

 
@retailcoder It seems pixelised though... do you know why?
 
@QuentinPradet uh, because I'm a bad graphist and Paint.NET isn't PhotoShop? :p
@QuentinPradet actually, looking at the top-voted answer there, I'm not that bad :)
(and it has it as codeReview();)
@rolfl your recursiveness quote / compliment made me wonder, is this proper usage of recursion?
2
A: How can I speed this VBA code up?

retailcoderYour printAllReports method does almost everything that's possible to do with the Outlook API (ok maybe not), except printing anything. You basically have what we call a monolith, and that's bad because as your program changes, you are tempted to just keep adding and adding and adding, until the ...

 
4:36 PM
@retailcoder: only 14 away from 2K! :D
 
@Jamal yeah I know!! :D ... I KNOW!!!
 
prepares to issue whistle and badge
 
...although I'm answering things in unfamiliar tags and/or stuff I'm iffy about - I might earn myself a downvote or two :)
lol
 
No free donuts and coffee, though. Sorry.
jk
 
Whistles!!!!
@retailcoder - there ya go, welcome to 2K
 
4:48 PM
woah when did that happen!! I missed it!
upvote+accept on a recent answer :)
GOOGLE!!!
* I mean YAHOO!!
 
.... silly SE: You can perform this action again in 1 seconds
Now, make sure you read the instructions carefully!
 
Will do!
 
@retailcoder I found it hard to find the review tools tab... stared at it for a while before I realized where I had to click!
 
 
lol^2
 
4:53 PM
(but please only shoot questions, not people)
 
ZOMBIES not questions. Questions are boring.
 
Just not answers, though. :-) Only 4Kers can help delete answers.
 
lol Questions with Extreme Votes - 10 Searching in an array in less than O(n) time
So a [badge:nice-answer] is suspicious here huh?
 
... who polices the police .... hmmmm
 
@rolfl
in Weekend CR Challenge, 16 hours ago, by retailcoder
@Jamal nothing against you, but community managers are a couple notches above moderators, at least in my mind :)
shoot. wrong link
in Weekend CR Challenge, 16 hours ago, by retailcoder
it's like 2K users are municipal police, pro-tem mods are state police, and community managers are FBI! :)
 
4:57 PM
There's another one: devs. They have more control of the system than even community managers.
Also, what about elected diamonds mods?
 
@Jamal we don't have those. Yet.
 
I mean in general. But I suppose they would be state police as well. Same powers.
 
Aside from this, you get the ability to do inline tag edits on questions. - so cool
Milestone - Users: 30,023 / ok half of those are < 200 rep and have < 2 posts, but still...
Ooh and I can see ghosts too!
(that's deleted posts)
 
5:13 PM
Which includes lots of spam. :P
 
Huh, someone has given a technically better answer than me..... and his answer needs some 'lovin'
1
A: Searching in an array in less than O(n) time

Cruncherpublic static int search(int[] array, int start, int end, int target) { if(array[start] == target)return start; if(array[end] == target)return end; if(Math.abs(array[start]-target) + Math.abs(array[end]-target) >= end-start+1) return -1; int middle = (start+end) / 2; ...

 
@rolfl [badge:sportsmanship]?
 
Actually, it's a toss-up.... I think .... naahhh... his answer is just a recursive version of mine.
Mine is neater.
 
5:36 PM
0
Q: A regex in Java. Latin letters, digits, dots, and minus signs

Maksim DmitrievThere is a user login, and the requirements are the following: The login must start with a Latin letter. The login must finish with either a Latin letter or a digit. There may also be digits, dots, and minus signs in the login. Min. login length is 1. Max. login length is 20. Here is my Jav...

 
6:10 PM
0
Q: Loading an image resource from a sub-domain?

Sean AndersonI have a hierarchy like: index.html /share/index.html /img/myImage.png share/index.html is on a sub-domain (http://www.share.foo.com instead of http://www.foo.com). I would like to access myImage.png from both domains. So far, I've only been able to find one way to manage this. From index....

 
Zombie with active user:
0
Q: Building a generic context menu using BackboneJS. I need help figuring out how to generically bind events

Sean AndersonI've taken a stab at making a context menu using BackboneJS. Here's the overall structure: Collections: /collection/contextMenuGroups /collection/contextMenuItems Models: /model/contextMenu /model/contextMenuGroup /model/contextMenuItem Views: /vi...

 
General question, so, I have maxed out my rep for the day (unless I get more accepted answers), but, if someone up-votes an answer, is there some place I can see that activity since it won't show up in my rep-page?
 
6:27 PM
I wouldn't know personally. There may be info about it on MSO.
 
Ahh I still see them on my rep page .... like this:
 
@rolfl like what?
 
 
Hey look who just landed!
 
You just wanted to show us that +135. ;-)
 
6:33 PM
The 245 is better, I think .... ;-)
 
@rolfl we posted the same number of answers :)
..and I have yet to hit that rep cap!
 
I've never even come close.
 
11-20 and 11-22 I hit 150, that was my peak :/
 
Quality .... (who am I kidding.....).... though I do have 26 accepted answers of the 70.
That normally counts for 25-rep in itself.
 
I don't think I've ever hit 100, but I'm also not the best C++ reviewer nor are there too many on this site.
 
6:38 PM
15
 
@retailcoder - normally an accepted answer is also upvoted by the asker too.
 
@rolfl how do you count accepted answers? manually? -- normally yeah, but that's not how you get [badge:tenacious] and [badge:unsung-hero]... the former of which I got on SO a little while ago :s
I have 15 accepted answers
(26-15)*15=165 => 2006+165 = 2171 => 2616 - 2171 = 445 => about 45 upvotes more than me
 
@retailcoder i will look at this later i am going to favorite it right now
 
Hey, I have 2 cool SO badges, unsung hero, and tumbleweed (and also tenacious)
 
going to sign off again though battery is alread past half dead
 
6:47 PM
Win**blows**
 
lol. i have 15 accepted answers on cr
 
@Malachi same here :)
 
can't wait until i am on my laptop tonight. i am running easy linux ubuntu 12.12 i think
 
I (somehow) have 29.
 
@Malachi so you're in TX now?
 
6:51 PM
0
Q: Best way to merge multiple functions that do the same thing in jquery

darcherI'm rather new to jquery but managed to get some social links to open in a new controlled window instead of new tab. My question is I have a few functions that do the same thing, now the below code works, but there has to be a better method. I did review the question and answer at jQuery, Two cl...

 
i am in denver
 
That's Colorado right?
 
yes
 
Even closer to Texas. :-)
 
The last @StackExchange-posted question seems borderline.
Actually I think it's fine
 
6:59 PM
Oh my.
If you are threatening to kill a #stackoverflow moderator for taking away your falsely-gained, imaginary internet points, you need therapy.
 
Hey, @Malachi, here's some Microsoft technology that hands-on-experience would be really useful....
 
7:13 PM
lol
Mood data was provided to the wearer via a smartphone app in order to highlight when "emotional eating" was likely to occur.
 
Is the cup half-full or half empty?
 
0
Q: I feel as if my quicksort can be made more efficient, but what?

KenI just learned the quicksort algorithm and tried to implement it, but it feels dirty: #include <iostream> #include <stdlib.h> #include <time.h> void quicksort(int list[], int low, int high) { if(low >= high) return; else { int pivot = low, i = low, j = high; ...

 
7:33 PM
@rolfl Unlikely. More likely it's 49% full or 51% full.
@Malachi I have 17.
 
@Donald.McLean: Hi!
 
When I first started following Code Review regularly, there pretty much was no chat.
 
And now half the interesting stuff is here!
 
Sadly, we're the only bunch who hang out here. But I suppose many may feel they won't fit in or something.
 
Meh, we come here to whine about the users and the moderators.
Like, seriously, someone downvoted an answer of mine, ruined my 245 daily rep, and did not comment... how rude!
 
7:38 PM
I never worry about fitting in with other people. It's a form of arrogance that only self-assure introverts suffer from.
2
 
Donald, you spend your time in Astronomy and SciFi, you have us beat in the geek department ;-)
 
@rolfl: and the moderators I'll pretend I didn't hear that. :P
 
I think there's only been a couple of cases where I had uncomplementary things to say about moderators, but that was years ago, before I had ever heard of SO or SE.
 
@Donald.McLean ... the chat room here is civil, and until I showed up, mostly polite ;-)
 
There was one case where the site owner made his girl friend a chat moderator and she liked to kick people "just because I felt like it".
 
7:47 PM
@Donald.McLean: rolfl answered CR's first question with a Necromancer badge.
 
@Donald.McLean ... I had something similar a long time ago on a BBS (auggie - augsberg).
back when the internet was that thing before the world-wide-web.
 
There was a time when I knew quite a few US Army people in Augsberg.
 
@Donald.McLean hi! are you in for the next ? :)
 
Yeah, before the wall came down... god I feel old.
 
@retailcoder Depends. There's this place called "reality" and in that place I have a real life and family.
@rolfl I was in Berlin 1983-1985 and 1987. I would love to go back and see how it has changed.
I actually answered a question. Haven't had a chance to do that in a while.
 
7:55 PM
It's a trick if you want upvotes, to come here and let people know ... ;p
 
I got my first Nice Question from that challenge. If I didn't have finals next week, I would give it another go.
 
I have trolled for votes before - especially near a milestone. :-) But I wasn't doing that this time.
 
@Jamal what are you talking about .... ? RPSLS?
 
@rolfl I'm 11 years older than you.
 
@rolfl: Yeah.
 
7:58 PM
I see that, but you've put stuff in space, so, for an old guy, you still rate the 'cool' rating.
Hey, that weekend-challenge is classic, it shows the distribution of 'eyes' quite nicely... the C++ and C# solutions get the upvotes, but I am one-short on the nice-question for the Java side.
 
13
Q: Searching in an array in less than O(n) time

user3011937I've an array where each element is either one less or one greater than the preceding element. I've to search an element in it in less than O(n) time. I've implemented it like this: public int searchArray(int[] arr, int i, int elem) { if (i > arr.length - 1 || i < 0) { return -1; ...

On that question, LarsH is right - the answer submitted by Taemyr is the only one that correctly answers the O(n) part of the question.
However, your answer is good in other ways, @rolfl.
 
@Donald.McLean I actually agree with you (but, only because there are two questions, one in the title (which is less than O(n)) and the other question is at the foot of his text: It is working fine. But can it be improved? Specifically, is there a way to do it iteratively?
I think I answer those last two questions (which, as far as I am concerned are the real ones the OP wanted answered).
@Jamal - stop peeing on my parade... I just answered my first C++ question... and you ... you .... well, never mind... you're right.
2
 
8:15 PM
@rolfl: You want peeing? Okay! downvotes :P
 
I have 1 vote left for today, where do I pee?
 
Pick Me! ... Pick Me!!! .... just kidding, I'm maxed out... save it for later ;-)
 
0
Q: get city and state using zip code, scrape in python

dwsteinI'm looking for any and all feedback on quality, style and efficacy of the code. If there's a simple way to get the deader put it, I'd love to hear that. The code is used to take zip codes from a csv file and and spit back out the city and state where available. here's the code: import sys imp...

 
8:30 PM
Just got the CR Newsletter .... RPSLS features very prominently.....
 
0
Q: c sorting large struct array and printing to screen

Chris lastI'm having trouble sorting a struct array and then printing it to screen. When I run the code in Visual Studio 2012, it doesn't print AT ALL. I've spent hours figuring it out, and debugging mode is very buggy. I really need to know why it isn't doing what I tell it to do. #define _CRT_SECURE_NO_...

 
@rolfl how come? I only get it on Thursdays!!
Just got a [badge:nice-question] for the CR Weekend Challenge meta-post - watch next week's newsletter be filled with Fizz-Buzz-Banana questions!
 
9:08 PM
Wait, what does the Banana output correspond to? 15?
 
@Jamal that's the fun part: it's whatever you want it to be!
 
Yay! :D
 
Seriously, anyone other than @rolfl received the newsletter? I got SO's newletter, not CR's!
 
@Jamal - I think that, for you, it should be: the largest prime factor is less than 10 and that you should code it in assembler
 
@rolfl: I can try it in x86 assembly, but I'll use something different for Banana. It'll still be challenging considering division (or modulus in this case) is irritating to code.
 
9:18 PM
@retailcoder Yup, I got the newsletter. 5 of 7 top new questions are about RPSLS, nice :)
 
That's so not fair.
 
@retailcoder I can forward the mail to you if you want it :P
What IDE are you using for C#, @retailcoder?
 
At work, VS2010 Pro with ReSharper 7.1, at home, VS2012 Express on the desktop, VS2010 Pro with ReSharper 6.1 on the laptop
I miss VS2010 Ultimate from my web dev days!
 
Ugh.... And what if I don't want to use Visual Studio?
I used to have it, but I uninstalled it. Thinking that I didn't need it any more
 
lol
I guess you could use Mono, but I've never tried that
 
9:28 PM
@SimonAndréForsberg VS Express is free, why not use that?
 
@SimonAndréForsberg That's why you get ReSharper. JetBrains is full of smart people who know how to make great development products.
 
^^ and it integrates with GitHub
 
There's also the extreme way of using any text editor to write your code and compile it from command line using csc.exe
 
@svick I remember that I didn't like the interface of Visual Studio a lot. It never did as I wanted! :P
Perhaps I should use C++ instead for this week, how about a C++ IDE?
 
Visual C++ 2010 Express.
 
9:31 PM
@SimonAndréForsberg my first use of VS2012 was .......I'm still looking for an appropriate word.. but I somehow got a bit used to it and it's a lesser pain. But I like 2010 better still.
 
@SimonAndréForsberg Then there are alternatives like MonoDevelop or SharpDevelop, but I never used any of them.
 
Oh how I wish I could use Eclipse for all my programming needs... :)
I'm leaning towards C++ or Ruby at the moment for the challenge. Feels like I know enough C# for now.
 
@SimonAndréForsberg If I had to use Eclipse I would be tempted to go back to vi.
But that's just a personal preference thing. Eclipse and I just never got along.
 
@Donald.McLean Haha, never used vi actually (or well, once... but that almost doesn't count).
Eclipse and I got along right from the start I think. Then I liked it even more and more. But alright :)
 
9:36 PM
That's why I use IDEA, which feels so completely natural when I use it that it's like an extension of my own brain.
 
@Donald.McLean JetBrains put the brains in VS and the Intelli in IntelliSense!
 
I'm glad there's still a couple of days left until the weekend :P
 
we're not totally settled on what the next challenge is going to be. Leaning towards fizz-buzz-banana but it's only Tuesday..
 
allright, gotta head home - catch y'all later!
 
9:50 PM
I will leave also for now. Probably won't be here tomorrow, so I'll see you all Thursday :)
 
Heading to the gym. Goodnight all.
 
Cheers ....
 
10:12 PM
0
Q: Do I need to improve this code?

campagnolo_1Just created a winform that exports a datagrid to excel. Originally the file was never shown, but I was asked to give the option. So I put in a checkbox and modified the code. Is my if/else statement at the end enough or should I go about it a different way? Code: private void buttonExpo...

0
Q: Getting limited user input, with echo

user32926I've written a code snippet that will get a (max.) 14 character string from the user input, and while the user is typing, simultaneously echo it out to the screen. It seems a bit long and ugly, so I was wondering if any of you would happen to have ideas on how to shorten, and generally optimize ...

 
10:46 PM
0
Q: Copying data to a .txt, but making it look nice?

user3029809This is probably horribly sloppy, but here it is! This is a section from a large (imo) GUI program I am making. The below code is what triggers when a specific button is pressed. def calc_platenumber(self): customer_firstname = str(self.customer2_entry.get()) customer_lastname = str(se...

 
11:37 PM
This question was post here and Stack overflow. I think it is ontopic here and off topic there ... Except it was answered there. What should be done?
1
Q: Need a better way to mass modifying css Class

codinI have a huge collection of list elements. the concept is that the user can select only two items from that collection. I am showing a check/Uncheck as an image infront of the list item, just for visual purposes that the list is selected or not. The image is defined in a class, so I have to switc...

 
@JamesKhoury: If it's on-topic here, then nothing more can be done. The OP can still be asked if a code review is still desired here.
 
0
Q: Java - Please review my Huffman String and File Compressor/Decompressor

Danny RancherI recently finished my attempt of implementing the Huffman algorithm in Java to create a string and file compressor/decompressor. Whilst I am pleased with the results, compression seems a little slow (compared to the much faster decompression). I am also looking for ways to increase the compres...

 
11:56 PM
@Jamal It is asking for code to be written but it is review of working code. Would you consider it on topic?
 
@JamesKhoury: You're right; it is asking for code. It's off-topic, then.
 

« first day (213 days earlier)      last day (3809 days later) »