« first day (221 days earlier)      last day (2173 days later) » 

4:00 AM
@rolfl The parser from the robot side of me glossed over that...
 
Zombie stabbed:
-1
Q: Please help me refactor this exception handling

SuparsI received this piece of code and this is horrible. I need your help to refactor this: try { SomeOperation(); } catch(IllegalArgumentException iaEx) { try { iaEx.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); throw new CustomeExceptio...

 
I'll start calling all the C# crap 'pseudocode' from now on .... humpf
2
 
Hmm. Is this real code? throw new CustomeException("Custome Message 1"); -
 
If he has created his own class called CustomeException, yes.
public class CustomeException extends Exception {...}. It is common, and encouraged.
 
would be public class CustomeException : Exception { ... } ;)
 
4:08 AM
That way you can catch (CustomeException ce) {...} ....
 
Absolutely. And do SomeOperation();.
 
where SomeOperation is excise C# ... or, is that exorcise....
 
wth
lol
Not saying it's incorrect C# - just saying it's clearly dumbed-down placeholder code that's been trimmed to illustrate only a specific point; the code can't be reviewed that way, it's not the code we have, it's a conceptual idea of what it looks like from a try/catch perspective.
 
@retailcoder - just checking ... you do know it is a Java question... right?
 
I ...just freakin' noticed.
 
4:13 AM
And here I was thinking you were trying to be clever ... ;-)
 
Duck-type what I just said
Not saying it's incorrect Java - just saying it's clearly dumbed-down placeholder code that's been trimmed to illustrate only a specific point; the code can't be reviewed that way, it's not the code we have, it's a conceptual idea of what it looks like from a try/catch perspective.
(Java is ducked-typed right?)
 
Actually, it makes for a relatively good SSCSE
@retailcoder ... java is not duck-typed
 
SSCSE?
@rolfl now I can tell the car from the carpet :)
 
SSCCE typo.
 
Socially Sensible Creative Commons Empathic?
 
4:17 AM
@retailcoder Dead on.
Are you just really good at guessing these things or what?
 
14
Q: SSCCE: How to provide examples for programming questions

YarI saw this today. It's a description of Short, Self Contained, Correct (Compilable), Example. This would be a useful reference for many as a guideline for how to make code usable in questions on StackOverflow. It's based on these 4 points * Short (Small) - Minimize bandwidth for your example, ...

dweebs
 
Short Self Contained Correct Example - yeah, was on the tip of my tongue.
 
@syb0rg Yeah, I'm in it. I have an rpi that i tinker with from time to time.... figured i might as well join :)
 
Noun[edit]
dweeb (plural dweebs)
(US, slang, pejorative) A boring, studious, or socially inept person. [From 1968.]
 
Huh, that's not very close to the meaning I have ... which is more inclusive of adjectives like irritating, adolescent.... you know...
 
4:22 AM
monkey see, monkey do :p
^^ like that?
I've pulled a @Malachi (out of stars!)
3
Well that was entertaining :) I'm out, good night @all!
 
Cheers.
 
I think I am going to go too. I wonder if @retailcoder lives in a similar time-zone as me...
 
4:59 AM
0
Q: How to optimize the code in order to reduce the loading time of page?

PHPLoverI'm using PHP, MySQL, Smarty, jQuery, etc. for my website. I'm using a MVC architecture to develop the website. Now in one of the functionality I'm fetching a large amount of data and perform some processing on it. Then I'm returning the finally processed data from model to the controller and ass...

0
Q: Scala for processing files in a directory tree

bstpierreI'm new to Scala, and would appreciate any notes about a better approach, correctness, or style. /** * Call proc(f) for each file in the directory tree rooted at dir. * * proc will not be called for directories, just for files. */ def traverse(dir: File, proc: File => Unit): Unit = { di...

 
6:01 AM
0
Q: rand number generator with limits in ruby

JohnMerlinoI have an array of 1000 numbers, randomly generated. 10 of those numbers must be between 0-9 (including 0 and 9), and 10 of those numbers must be between 991 and 1000 (including 991 and 1000). This is what I came up with: arr = [] 980.times do arr << (11..989).to_a.sample end arr2 = [] 10.tim...

 
 
2 hours later…
7:32 AM
0
Q: Code Review +: How to efficiently extract Key Value and load to C# dictionary/HashMap from large files [File Size grows] - ASP.NET

user3089806Please do the code review and suggest better algorithm to efficiently extract key/value from Files using multithread. Input : FormNGFAddTab:First add Tab control inside Tabs control.परीक्षण OutPut : Key : FormNGFAddTab Value : First add Tab control inside Tabs control.परीक्षण Separator : ':...

 
 
2 hours later…
9:15 AM
0
Q: Task send options: Send Now, Send Later, Repeat (viewmodel)

Roman PushkinI'm writing a code for my application: you can create a task, and you can choose the moment when you want to send this task (to some kind of user): Send now Send later Repeat You can select from above options. If you choose send later, you'll be prompted for a date: And there are variety...

 
 
2 hours later…
11:10 AM
0
Q: String Extention improvement

develop codeI am creating a string extension to validate some input. My scenario is when we have a string it will format it according to following guideline. If the sample string is “One Two Three Four Five” and the length is <=20 return same. If more than 20 then “One Two Three F Five”. If still length is m...

 
11:48 AM
0
Q: What is the future of this site?

Dmitri ZaitsevWith the recent closure of the site "On Startups" and seeing this site still in Beta I have to ask what is its future? Is it under threat of similar fate? Site “On Startups” is closed - what to do now?

 
 
2 hours later…
1:22 PM
0
Q: Looping Strategy: Change behaviour after first iteration

Martin WygasI have often encountered the following situation. I want to call a method in a Loop, but want to skip the call at the first run. It do not have to be a method, it also can be some lines of code that I want to skip. Here is one example: I have a file which looks like that. headline:headline1 con...

 
@rolfl Your Code Review took more than two hours, but it took me a lot more than that to write the code you reviewed!
 
1:39 PM
@syb0rg UTC-05:00 Eastern :)
@SimonAndréForsberg ^^ theoretical star
 
@retailcoder ^^ theoretical thanks
 
@SimonAndréForsberg you're theoretically welcome!
 
@SimonAndréForsberg - I am sure it did .... if it came accross as complaining, forgive me... I am not complaining about reviewing your code... I am complaining about the sense of 'entitlement' that some of the new posters to CR have ... like they can demand that we do something for them .. ;p
I don't want to feel like doing the review is expected of me, that's all.
 
@rolfl You have a theoretical good point there!
I think Code Review, just like SO, will probably get several "(re)write my code" "questions" ("demands" might be a better word here). As you said earlier:
12 hours ago, by rolfl
@syb0rg - it's a delicate thing, CodeReview.... you cannot come here asking us to improve your code... but, you can ask us what you got wrong.
Although since you've answered all my four questions so far, I don't know what else to expect by now :P
 
Should we have a meta-post like "Theory of a CR Answer: What to Expect from a Review"?
^^ plugged "theory" :)
 
1:52 PM
0
Q: How do I write this piece of BASIC the correct way in PHP?

TheRealWitblitzI simply have this equation in an old BASIC script: NRSLATHOR=INT(LSLATVER/PITCHVER-.8) How do I write it so I get expected results in PHP? This is old BASIC, and as far as I know it does Integer Division. Can you provide an example, please.

0
Q: How to write shorter (and/or less) if, elif, else, and print statements?

codehorseHow can I write this shorter? (while keeping the same functionality and outputs to console) def review(): v1 = value_of_current_cards(hand_one) v2 = value_of_current_cards(hand_two) v3 = value_of_current_cards(hand_three) vd = value_of_current_cards(hand_dealer) if number_of...

 
@retailcoder - that sounds like a good idea.
 
@rolfl ...in theory.
 
This one gives me a sense of deja-vu.
0
Q: How do I write this piece of BASIC the correct way in PHP?

TheRealWitblitzI simply have this equation in an old BASIC script: NRSLATHOR=INT(LSLATVER/PITCHVER-.8) How do I write it so I get expected results in PHP? This is old BASIC, and as far as I know it does Integer Division. Can you provide an example, please.

in theory.
 
That's not exactly a code review.
 
@Donald.McLean no, it is not, but it is exactly:
-2
Q: I need help with integer division in PHP

TheRealWitblitzI had a bit of code in BASIC I needed to convert, but specifically this following line has me stumped atm: NRSLATHOR=INT(LSLATVER/PITCHVER-.8) In PHP I'm attempting to do an integer division but I get different results from similiar input values. For example one: $length = 1590; $pitch = 50;...

Jamal is on the ball today.
 
1:58 PM
How long are we theoretically going to keep this up before it officially becomes a theoretical meme?
 
@SimonAndréForsberg done.
 
@retailcoder But you're not really out of stars for today already, are you?
 
Yes, I pulled a @Malachi last night :)
 
I gotta find that question that started this theory thing... The one with the theoretical code
Here it is:
-1
Q: Classes in Python

user3034084I am trying to create a class about birds with a few different methods. This is just theoretical code. Is there anything that is inherently wrong with the code from a syntactical or semantics point of view? If so, please fix. class Bird(object): def __init__(self, Height, Weight, HasFeathe...

 
Yes!!
 
2:06 PM
Added the origin to the meme post
lol, napalm strike. Haven't seen that one before
A total of 6 items in the review queue!
 
2:24 PM
0
A: What is the future of this site?

retailcoderThat's an unfortunate outcome, sorry to hear that. On the bright side, failed betas have all their data available in the Data Explorer, so you can mine it and possibly learn more about what went wrong. As for Code Review, arguably a not-so-good fit for the StackExchange Q&A format (works pretty ...

@SimonAndréForsberg yeah I've been slacking on the review queues lately.. sorry about that.
Queues cleared
 
I love your meta-posts, @retailcoder :)
 
@SimonAndréForsberg thanks! (oddly an upvoted was retracted just a couple seconds after you said that)
 
wasn't mine
must have been a theoretical one
 
guess so
 
No theoretical star on that? (theoretical-(theoretical-star)-whoring)
 
2:36 PM
Ooo, ooo, ooo. I love reviewing.
 
^^ theoretical star on that :)
 
But I'm not going to review Python questions.
 
I have and in my ignored tags. Not for me either.
 
I have 44 ignored tags, but many of them are variations of other ignored tags (python, python3 and django).
 
I have no ignored tags. Ignored tags are for people who don't want to learn :)
This question feels off-topic, anyone agrees?
0
Q: Article JSON format review

Justin808I'm looking for a review of my article JSON format. This will be used to both transfer documents via ajax calls as well as store the document in NoSQL. Do you see any issues? Are there any gotchas with it? Anything you would do differently (and why)? Other comments? { type: 'article', t...

 
2:49 PM
@SimonAndréForsberg would it be on-topic if he included a class that the JSON deserialized to?
 
wish I could take back my upvote on this question, think I am going to vote to close soon. codereview.stackexchange.com/q/36932/18427
 
@retailcoder Perhaps. Seems like all he wants right now is a format review, not a code review
 
@SimonAndréForsberg you go ahead and redirect him to formatreview.stackexchange.com
 
@retailcoder Yeah, I'm aware that page doesn't exist. But that doesn't change whether or not it's on or off topic here.
 
@retailcoder you didn't like my newest C# answer? the one about the incrementation? BTW you don't even need all 3 parts of the declaration, you can do just a (int i =0; i < 100) and then increment inside the loop in side of an if statement where it goes up if a condition is met or down if it isn't met, and other such things like that.
 
2:53 PM
It might be a better fit for programmers, actually. (not sure)
 
@SimonAndréForsberg It's a question of time. I already have more things I want to do than I have time to do them in, so I have to prioritize, and contributing in areas where I have some actual proficiency seems more useful to me than fumbling around in places where I am mostly clueless.
 
@Donald.McLean Good point there. I also have more things I want to do than I have time to do, but I'm not as good at prioritizing
 
@Malachi again, POLS - a for loop is rightfully expected to be written in the shape of for(int i = 0; i < UPPER; i++)... no?
 
@retailcoder - it depends how old you are.
 
I asked a question on maths.SE now, but they get a lot of questions over there so my question might fade away and become [badge:tumbleweed]
0
Q: Combinations for a collection which should hold x items, where there are y types and z of each type

Simon André ForsbergThis is related to this question, but I plan on writing a more clear question, using smaller numbers for examples, and I want to understand how to approach the problem rather than having an answer for one case. Example Let's say that you have three different types of items, for simplicity sake ...

 
2:59 PM
For example, I am very familiar with for(;;) { ....}, but nowdays people di 'while(true) {...}`
 
@rolfl the for loop? forgot to mention, it's
while(true) is more readable than for(;;)
 
@retailcoder I don't think for always have to be in that "classic" format, sure people are used to it but there might be other use-cases for a for-loop besides that
 
I hardly use a for loop anyway - more often than not the loop can be written as a foreach
I really need to need the value of i to make a for loop.
 
I also tend to use foreach, but I still use regular for-loops quite often
 
@SimonAndréForsberg that's because Java doesn't have LINQ :p
 
3:02 PM
That was one of the things I found weird in Scala - no for loops.
 
@Donald.McLean wtf?
 
yeah, wtf?
 
@retailcoder yeah yeah yeah :P
 
In Scala, "1 to 10" defines a collection, that you then foreach over.
 
^^ makes sense
 
3:05 PM
@Donald.McLean At least there are some kind of while statements, I hope?
 
There are a lot of bells and whistles also.
 
wtf?
@retailcoder In C#, if you want to fill an array with values one-by-one, can you use a foreach or do you use for?
 
@SimonAndréForsberg Yes, it's very much like Java in most respects. In fact, you can write perfectly good Java code in Scala after you learn the handful of basic syntactic differences.
 
@SimonAndréForsberg you'd ask yourself why am I not using a List<T> instead of an array first.
var list = thisEnumerableContainsTheValues.ToList();
 
@retailcoder Sure, good point. And if you answer no to the "Do I want to use a List<T>" question?
@Donald.McLean Yeah, Scala builds upon Java or something, doesn't it?
 
3:09 PM
I have seen this before (in Java): List<Byte> bytes = new LinkedList<Byte>();
I almost crelled.
(cry/yell combination).
 
@SimonAndréForsberg Scala started out as a set of Java extensions, and it still runs in the JVM. It's also fully compatible with existing Java libraries.
The compatibility is handy, as I can run my Scala web apps in any Java web server.
 
@Donald.McLean OK, thanks. I wanted to look into Scala, but I just can't come up with any project I would like to do in it. And... you know, more things I want to do than I have time to do...
 
@Donald.McLean out-of-interest, are there any 'features' of Scala that are not possible with Java?
 
@rofl Traits are awesome
 
If your values are in an IEnumerable already, then you just call .ToList() and you have your list, or .ToArray() and they're copied into an array. The answer to "do I want to use a List<T> instead" is yes if you want an index-based collection to which you can add/remove values. @SimonAndréForsberg
 
3:12 PM
@rolfl And it could have worked with a simple byte[] instead, I suppose? Horrible.
well hey there, @amon. Gotta say I loved your answer to the recent Java question about HTML output
 
@rolfl In actuality, no - since it is Java byte code after all, but in practice, some things, such as Traits would be very painful to do in Java.
 
I gotta look up traits...
 
@amon hitting 2K today? :)
 
@retailcoder I do hope so :)
 
And there are some aspects of the Scala pattern matching that dramatically simplify code that is just fricking ugly in Java.
 
3:15 PM
@amon there. Welcome to 2K!!
 
@SimonAndréForsberg Yes, simple byte[] would be fine, instead the LinkedList does the autobox, creating a 32-byte object for each byte value, then the LinkedList has a Node, which is another 32bytes... so, an of 1K byte[] is instead represented as a 64K List.
 
^^ wow.
 
@rolfl ugh
 
0
Q: Reduce the size of this code futher

Prudhvi Dharmanahttp://www.spoj.com/problems/SIZECON/ This is the problem and my code for this is main() { int n,s=0,tc; gets(&tc); while(tc--){ scanf("%d",&n); s+=(n>0)?n:0; } printf("%d",s); return 0; } And removing all spaces and indentations it comes at 96 characte...

 
Congratulations to 2K, @amon
 
3:16 PM
@amon - happy holidays!
 
umm, thanks all around
 
@rolfl Wow. I guess sometimes it's good to have a clue.
 
OK, traits allows for default implementations of some methods. Like IsNotSimilar = !IsSimilar. But then I have to ask: Why have a IsNotSimilar in the first place?
I understand that improving readability might be one thing, but... is that it?
 
@retailcoder I agree with @rolfl there are instances where you would want to write the loop differently than the norm, there are always exceptions, the way I wrote it looks almost exactly like what the OP wants to do and looks a lot cleaner than the other options that were presented apart from using count++ inside the array declaration.
 
@Donald.McLean - I once 'fixed' some code that was storing a Map<Integer,Integer> data structure by replacing it with 2 arrays. The extra 4GB of memory I saved was enough to 'make it work', and it was faster as well because Garbage-collection was avoided (even though the 'index' mechanism was a binary search instead of a hash key...)
I have often found performance problems when people use java.util.* Collections naively.
 
3:21 PM
Actually, the real power of traits is to add functionality to a class through multiple inheritance. It can be used like a mixin.
 
@Donald.McLean - just ask @SimonAndréForsberg - ;-)
 
0
Q: BASIC INT() as PHP output problematic

TheRealWitblitzI simply have this equation in an old BASIC script: NRSLATHOR=INT(LSLATVER/PITCHVER-.8) I've written this piece of code but it seems problematic: $NRSLATHOR = (int)((int)($LSLATVER / $PITCHVER) - .8); I get varying results when I run it through various scenarios, it essentially returns the ...

 
oohhhh. round 3 ?
 
Yup, round 3
 
One day he's going to join chat .. then what?
 
3:25 PM
lol
before of after being post-banned?
 
@rolfl He needs more rep to participate in chat (thankfully)
 
Maybe we should migrate his question back to SO.....
Oh, there's a limit?
 
@SimonAndréForsberg can still read the transcript I think
 
@Donald.McLean Ah... I'm starting to see a good use case now. So you could have a trait as int someStandardMethod(SomeClass obj) { obj.doSomething(); } (translated to Scala, of course) and then have several classes that extends this "trait" and all of them have that method?
@retailcoder Yup. Let him read. I have nothing to hide. He does start to annoy me though
 
meeting. gotta go.
 
3:29 PM
Huh, he's had answers on SO. not sure what his problem is:
1
A: Discrepancy between BASIC INT and PHP int, how to resolve?

ShaiThe BASIC is using integer division, as well as reducing the final result to an int, so you'll want to mimic this in PHP (PHP converts to float by default, rather than reducing to an int). This means that at BOTH stages (the division, and the subtraction) you'll want to reduce the value to an in...

Oh, I don't think that answer is right though...
even though he's commented:
You are my hero dude. — TheRealWitblitz 2 days ago
 
@SimonAndréForsberg
(1) Traits are a good way to implement a strategy pattern: a trait could have a method `carryOutStrategy()` which requires the methods `stepA()` and `stepB()`.
(2) Traits can be used so that each trait has a single responsibility. An object with multiple responsibilities could inherit from different traits. Imagine a `GuideDog` that inherits a `guide` method from the `Guide` trait, and a `bark` method from class or trait `Dog`.
 
I think this is more than a XY problem, this is a XY person. He first asks about X, then asks about Y, and then he mixes things up and everything becomes unclear, wrong, and off-topic.
 
I added the POLA Description and link to my answer, @Nobody & @retailcoder
 
@amon Nice example about the strategy pattern. Just a question: Can a trait define instance variables that should be available?
 
@rolfl, I mentioned your answer too
 
3:38 PM
@SimonAndréForsberg Traits can generally have state of their own. However, they can only require the presence of methods (but in some languages, there is no difference between methods and fields).
 
@Malachi spent my last vote on you :)
 
@amon Guide dogs are not supposed to bark .... hmmmm ;-)
 
I'm guessing I should just keep this on this site, assuming it would get trashed on SO.
-3
Q: I need help with integer division in PHP

TheRealWitblitzI had a bit of code in BASIC I needed to convert, but specifically this following line has me stumped atm: NRSLATHOR=INT(LSLATVER/PITCHVER-.8) In PHP I'm attempting to do an integer division but I get different results from similiar input values. For example one: $length = 1590; $pitch = 50;...

 
Jamal, old buddy, old pal... how's the stats .. ;p
@Jamal which one is that, the first, second, or third?
 
@amon No difference between methods and fields? You mean like properties in C# / ActionScript / among others that use getters and setters, such as obj.property = 42; actually calls obj.setProperty(42);? Or is there anything else you mean here?
 
3:40 PM
@rolfl: It sucked. :/ Perhaps I can do better next time (if there will be need to be a next time).
@rolfl: Beats me, but I think a question ban will kick in soon.
 
@Jamal Yeah, judging by his SO questions, don't migrate his questions. Perhaps migrate the user himself... to China or something.
 
.... poor china.....
2
 
@SimonAndréForsberg Exactly. I have a multi-threaded app with much of what's happening being transactionish. I have a special trait that defines "begin" and "end" methods that put special tagged entries into the log. This allows me to find all debug from anywhere in my code that belongs to that transaction (since they're all on the same thread).
 
@SimonAndréForsberg Yes, like that. Some languages like Scala make even less difference between methods and fields (which has to do with the emphasis on immutability).
 
The benefit I see is that these questions will keep from dying.
 
3:46 PM
0
Q: sorting strings in one dimensional array. Review

varsh/* * Strings are given in one dimensional array. * Each string is of size s and there are n strings. * Sort them. * Example: water|cat--|five-|ball-- ball--|cat--|five-|water */ - public class QuestionOne { char[] mInput = {'w','a','t','e','r','c','a','t','-','-','f','i','v','e','-',...

 
Anyone knows how to use LIMIT in the SE data explorer?
@Donald.McLean @amon Thanks. I feel that I understand what Scala is a bit more now. Seems useful. (Still don't know any project I would like to do in it though)
 
Weekend-challenge type stuff? I had a blast porting a bit of Java to Scala a few weekends ago.
 
@SimonAndréForsberg For me, the killer feature of Scala is actors. They make it easy to do multi-threading without fear.
 
Yeah, one or two weekend challenges definitely. But I also want to do them in Python, Ruby, C++, and other languages I want to learn better :)
These data explorer queries I am writing doesn't seem right... Although they work. Feels like I am using aggregation in a weird way... Maybe I should post a question on Code Review for them? :)
 
4:40 PM
0
Q: Learning OOP javascript - critique my class that creates a 'favourites' list

DAC84I'm trying to improve my javascript coding style and want to start writing my code more object-oriented. The code below is getting a JSON-stringified list of locations from a cookie and appending a li to a list for each location. I would appreciate some helpful critique and any general pointers. ...

 
5:12 PM
-1
A: Finding the sum of all positive integers given a set of integers

cat_baxterFound this nice one: s;main(i,c){for(;c--;i>0?s+=i:0)scanf("%d",s?&i:&c);printf("%d",s-1);}

I didn't vote to delete this because it could be recoverable, even if it is an answer to an off topic question, and I down voted because of the length of the answer
does that seem right to you guys?
@Jamal you might want to lock this question, check the revisions, kind of a judgment call. codereview.stackexchange.com/q/36932/18427
 
@Malachi - your action on the golf-answer seems appropriate to me.
 
5:28 PM
0
Q: I have a few problems with an extension for datepicker (jQuery) that I have created for date format change

Jean-Nicolas Boulay DesjardinsHere is a screenshot of what I am trying to accomplish: Here is a demo: http://jsfiddle.net/GJdpe/ First is there a better for doing this: Inside of my datepicker options I have this: onChangeMonthYear: function() { customEvent(); } Here is customEvent(): var customEvent = ...

 
@Malachi: I've considered that, but I feel the "thanks" issue is not enough of a reason to lock a question. The OP isn't being destructive; just stubborn. I'll keep thinking about it.
 
5:45 PM
@Jamal I hear that....lol
 
Unless the editing is for a serious issue, it's just best to let the author have it their way (even though "I thank the dedicated time" makes no sense in English). This was mentioned somewhere on MSO.
 
@Jamal it is probably important to them to let us know they are truly thankful I guess
@Jamal, you could probably look through codereview.stackexchange.com/questions/tagged/contest-problem and close most of these and get rid of that tag
 
If you look at his SO posts, you can sort of see the idea. Looks like that won't be changing, but it's just one user.
I can clean them up, but that tag doesn't have to correspond to code-golfing. It could just be code from a school competition and the OP wants it improved.
 
@Jamal almost looks like he is filling out a form before he submits the question..
@Jamal I hear that. I was thinking that right after I hit enter....lol
@Jamal I was going to edit that answer and include a wiki link
0
Q: Improve performance for "Unfriendly Numbers" problem

ThejaThis is my Java code for the Unfriendly Numbers problem. It passes the first 3 testcases, remaining 3 cases failed showing time limit Exceeded. Problem Statement : There is one friendly number and N unfriendly numbers. We want to find how many numbers are there which exactly divide the friendl...

 
@Malachi: You could just add it as your own comment now.
 
5:58 PM
@Jamal just did...lol
 
6:11 PM
@rolfl 14 upvotes, less than 6 hours. And I'm out of ammo.
 
@retailcoder Nice tags for the chat room, I just noticed them
 
^^ theoretical star :)
 
LOL monkey business.
 
That was suggested by you-know-who :)
 
Voldemort?
 
6:21 PM
The monkey himself!
 
Well... it's better than "upvote the monkey," I suppose. :P
 
@Jamal you gave that monkey quite a beating yesterday, I never matched that score of yours!
(spank the monkey mini-game)
 
Shhhh! That might've been rolfl's uncle or someone else.
 
mon-key, monkey-ee, mon-key, monkey-ee
 
I don't know if this is relevant anymore, given that Silverlight is dead, but
for those of you who are coding geniuses .
 
6:31 PM
@Malachi what works in Silverlight also works in WPF (not always vice-versa).
And that's a very, very cool way of graphing out SO data :)
 
@retailcoder - I am so not going to make it .....
I have so much work to do today, it's rediculous.
 
WARNING! Monkey at work.
3
 
I do have a pending answer for a question that's not yet finished.... but ...
 
 
Just to spite you guys I should probably try harder ....
 
6:41 PM
@rolfl I thought you were at like 3999 rep on CR? did they all downvote you or something?
 
@Malachi no, @Jamal said he's use his powers to rep-cap @rolfl at 3999. Pretty soon we'll see if that happened :)
(ding! ding! ding!)
 
@retailcoder gotcha
 
Maybe you guys should find some things to upvote just to see whether @Jamal's cap works ... ;-) ?
 
0
Q: Python tkinter gui

AnthonyIm making a little python script that reads a text file and puts it on a html page, I haven’t finished that part yet but ive been working on the gui with tkinter. Is my code sloppy? from Tkinter import * import time from datetime import datetime #init variables global r r = 0 global delay delay...

 
@rolfl yes I am semi-reading your answers before I vote
 
6:53 PM
@Malachi - you know I was joking, right.... though I'm not about to say no ....
 
@rolfl 100 answers!
 
@retailcoder - yeah, I see that now.
So, 17 up-votes on my 2 questions, so that's 85 rep there, and 3906 rep total, (minus 101 when joining) which makes an average of 3720/100 or 37.2 rep per answer on average.
Plus and moinus a few here and there for editing and down-voting.
 
7:09 PM
The easier way would be to count upvotes and divide by 100.
You have avg. 3.x votes/answer, which is nice :)
 
but that misses accepts.
 
True.
Maybe @Jamal can sort it out... oh no, wait, he failed his stats...
 
;-)
Probability Density Function? What the heck is that? :-P
 
o.O
 
0
Q: C String - new function to detect user's anger - thoughts?

PhilThis was the most humerus coding I've ever done. It's for my string library in C. It detects if the user is angry to various degrees, namely str_isHeated(). Why? Ever play a text-based game and you're swearing at the computer by typing, typing multiple '!!!', and the computer responds very dumb? ...

 
7:18 PM
^^ lol
 
U mad, bro?
 
It's a meme.
 
7:34 PM
0
Q: AJAX Code Review

Jarolin VargasI wrote my first AJAX script that brings content from other pages without refreshing the entire page and i just want to see if improvements can be added to it, or if i'm doing something not recommended. $(function(){ // content container content loader $("#nav-tabs-list a").click(function() { ...

 
retardcoder...
 
7:53 PM
I have added a second answer to the 'odd' in-place memory sorting of an array of char....
0
A: Sorting strings in a one dimensional array

rolflOK, taking in to consideration that memory footprint is a concern, then there is some scope for improvement. First, lets get through some of the basics.... Firstly, your code has a bug, It fails to sort data with duplicates: 'w','a','t','e','r','c','a','t','-','-','b','a','l','l','-','f','i','v...

 
5 more upvotes...
 
Uhmmm 2 things ... thanks, and you have ammo? Are you OK?
 
no ammo, just counting how fast you get to 4K :)
 
8:10 PM
0
Q: Open source angularjs pouchdb model persistence layer - release ready?

marfarmaI'm considering releasing a library as a bower module. Are there issues with code quality, missing test cases, that need to be addressed first? Perhaps it's not a good candidate for public release. If so, why not? What level of documentation would you want for something like this? I've seen ...

0
Q: Normalization: is it done good?

user33352I am creating game review database. I am new at this, but I am trying my best. Little bit about database: The system is simple, user fill out php form, where he is insert his name, email when choose feedback between is it good or bad and leave a comment/suggestion. I am adding photo how it looks ...

 
8:22 PM
1
Q: any suggestions on shortening this python code?

user3092741I have created a program which rolls a dice according to the amount of sides that the user enters. Here is my code: def var(): import random dicesides = int(input("Please enter the amount of sides you want the dice that is being thrown to have. The dice sides available are: 4, 6 and 12...

 
3 upvotes...
 
may i ask algorithmic questions here related to programming ?
 
Hi! you mean here in chat or here on the main site? (stupid question I know)
nice avatar btw!
 
@StackExchange @rolfl are you writing a review for this? looks almost closable to me...
 
@lEGenDRy saw that :p
 
8:27 PM
:p...so can i expect the answer ?
 
@lEGenDRy try, worst case is everybody ignores your question :)
 
0
Q: Weekend Challenge: Ruby Poker Hand Evaluation

FlambinoI'm late to this weekend challenge (sorry), but since it's all in good fun, I hope that's ok. I'm no poker player, though, so I may have completely overlooked something. The Hand class does the evaluation, and calculates (among other things) a score array which is ordered for possible comparison...

 
ok then my question is: we are given a tree (undirected acyclic graph ) with N nodes and N-1 edges. Nodes can be either white or black , initially all white . given m query of 2 types . 1) either we can toggle the color of node 2) output number of nodes that are connected to given node such that all nodes in that path have same color as that of given node . I thought of heavy-light Decomposition of Tree for answering query in logn time but im not able to come up with a solution.
 
@lEGenDRy post it and we will explain whether it is a good fit or not
 
@Malachi you just pulled a @StackExchange :p
 
8:30 PM
@200_success - updated the wiki answer with new results.
 
@retailcoder did that on purpose....lol I wanted that linked to my question I was asking @rolfl
 
@Malachi - I was thinking about it. Ihave to whore some more.... (cool rhyme).... and it struck me as 'low-hanging fruit'.
 
@lEGenDRy wow I need another coffee! @rolfl what do you think?
 
.... reading....
 
Me and Big O aren't big buddies
 
8:33 PM
ok
 
@lEGenDRy - that is a comp-sci question of (theoretically) brain-munging complexities.
 
@rolfl I did what I could in the short time, but I am at work. so not Normal.....
 
@rolfl yup...its a competitive programming question .... need some efficient algorithm which can answer each query in O( log n) complexity
 
@lEGenDRy - I think you are missing some things in there. Like I don't understand how nodes swap to black, and where the start point of your path is.
@lEGenDRy this is not the sort of thing I have done in the past 20 years.... Have you considered programmers.se?
 
@rolfl : nope
 
8:38 PM
They would be a good place to go: Have a look at their whiteboard:
 
oh sorry....i hv already asked there :p
 
(we're probably funnier anyway)
 
@lEGenDRy - Actually, rather look at their help page:
 
(at least the monkey is)
 
@rolfl no luck there too....but thanx anyways :)
 
8:42 PM
@lEGenDRy good luck, and come back anytime!
(^^ that didn't mean "kthxbye")
 
hehe :D ...
but actually im logging off...so bye :p
 
@lEGenDRy post a question there on the main site not in chat. elaborate it well following the site rules.
 
But if it's a contest... isn't that somewhat like cheating?
 
8:59 PM
@Malachi Normalization ≫ database normalization. I think that tag wiki you wrote may be to narrow, or may belong to .
 
In a math-y context, there are loads of examples. For example, probability density functions are *normalized* so that the integral over the function equals 1.

Whenever something can have multiple representations, then one representation with certain domain-specific properties may be called a “normal form”.
Hmm, the SO tag wiki talks about DB normalization, but acknowledges “other contexts”.
 
9:30 PM
@amon, then we should replace with on all of those questions that pertain to database normalization
 
@Malachi I'm not sure of that – so I raised the topic here to find consensus first. DB-normalization is the primary meaning of “normalization” in the context of most programs.
 
@amon I don't think that we are going to be normalizing any mathematical formulas, I think in the context of code review it will pertain to Database normalization. but I am glad that you brought it up
 
@Malachi Ok, seems sensible.
My confusion is probably just some fallout from spending the better part of yesterday mathematically normalizing some frigging polynomials…
 
I think this discussion should happen on meta ^^
 
and I am out of stars
@retailcoder do it. I have to get some work done. I might have some more VBScript code for you to review shortly
 
9:54 PM
0
Q: Duplicate methods in Java

user2517280My question is probably quite basic but something I've never had to do before, so I'm assuming it's possible in Java (I'm sure it is and I just don't know how). Essentially I have 3 objects which I want to manipulate (3 BufferedImages). For example I want to be able to change the brightness and c...

0
Q: R: Simplifying loop for Incidence Matrix

merilleinI had to work in the Transport Problem and we're asked to try to make the fastests codes for big matrixes, so we're advised to try to avoid loops. And the only one I've got and I cannot imagine how to simplify it is this one for making an Incidence matrix (with 1s,0s and -1s) like that: b<-...

 
@rolfl Thanks for updating
http://codereview.stackexchange.com/a/36870/9357
Vertical axis is nanoseconds per element?
 
10:13 PM
I think that I have sufficiently answered the OP's question this time @rolfl
0
A: Normalization: is it done well?

Malachi in normal form you shouldn't have the comment Column in your user table. you need to have a unique identifier in all of your tables a Foreign Key is what matches another table's Primary Key you should have a table that looks like this (forgive my blatantly bad syntax) CREATE TABLE FeedBack {...

 
Just got back, and was reading through... you kept editing while I was reading!
You now have my upvote ;-)_
I think it's homework too.
@200_success - vertical axis is milliseconds for X iterations of Y-sized array.
 
@rolfl thank you, after looking at it like 3 times and then when he said that it was pretty clear.
 
You should ask whether he needs 3 entities, or three relationships ... ;-)
 
@rolfl lol
@retailcoder I think we should see if there are any more VBScripters in our new audience.
1
Q: Script to grab information from XML inside of Word inside of third party application

MalachiThis was a revision, made when the code failed after an update (at least that is what I think happened). So I fixed it and now it works, but I think that this code can be written better and more efficiently, and perhaps made easier to read. Note that VBScript/VBA/VB6 isn't (aren't) my primary la...

 
@Monkey-people (everyone, that is). I added a note to the weekend challenge proposals meta question stating that late submissions are fine. Although I hope people won't submit things in advance, we can't really prevent that either.
 
10:25 PM
@SimonAndréForsberg it's a code review site, maybe if no one knew what it was ahead of time and we had an unveiling time set then...
 
Yes exactly, it is a code review site. So preventing people from submitting code for review (whenever they decide to do it) wouldn't make any sense.
 
@retailcoder you should look at this, it was posted in February and it is similar to our last weekend challenge.
1
Q: How to tell the NPC what hand it has?

JeffPosted my question here: http://stackoverflow.com/questions/14710039/vbscript-poker-game-what-hand-do-i-have Here is the full code: 'buy a blank deck of cards 'declare variables dim defaultDeck(51) dim trueDeck(51) dim isUsed(51) numPlayers = 1 numCards = 12 intMyHand = 0 '0 through numPlayers...

@rolfl it's for an exam, check the comment I just left, it almost had to be a double decker
 
0
Q: Creating a reusable C#.NET Oracle Query Builder - Returning Dictionary for custom format

PyntDisclaimer My first post to code review, and I'm a fairly new C#.NET developer. Feel free to not be gentle so I can move forward. I hope this post meets the requirements set forth o.O Also is "wrapper" the proper term? What I'm trying to accomplish I write a metric ton of queries for an Orac...

 
10:44 PM
@rolfl: I may just delete this answer eventually if the poster doesn't ever respond.
0
A: C# Multi level HTML TagBuilder object - Design pattern Review needed

Frank public override string ToString() { var inner = string.Empty; if (InnerTags.Count > 0) { foreach (var tag in InnerTags) { inner += tag.ToString(); } this.InnerHtml = inner; } return ...

 
@Jamal kill it, seen Oct 22 at 15:39 on stackoverflow
 
@Jamal I agree with @Malachi If the user comes back and is angry, it can be recovered anyways.
 
or they can repost it, if they remember posting it in the first place
@Jamal no votes on it in like 2 years.
 
@syb0rg: As a mod, I can also add a comment that will show up as a notification.
When the answer is deleted.
 
@Jamal Direct them to a chatroom or meta if they come back and decide to fix the answer.
 
10:53 PM
Chat and Meta would require additional rep (20 and 5 respectively).
 
1
Q: Simpler method to detect int overflow

chuxTo detect int overflow/underflow in C, I use the below code. What might be simpler and portable code? (That is: fewer tests) Assume 2's complement and don't use wider integers. int a,b,sum; sum = a + b; // out-of-range only possible when the signs are the same. if ((a < 0) == (b < 0)) { i...

 
@Jamal They can't comment on deleted questions, right?
 
No, but they'll see the notification.
 
@syb0rg Not even @Jamal can do that I believe :)
 
Maybe tell them in a comment to flag the question for moderators to look at when he changes it.
 
10:55 PM
@SimonAndréForsberg: Mods can comment on deleted posts.
 
@Corbin Did you finish that project of yours in time?
 
0
Q: Which way should i write those methods?

v_7I've got a homework that is about methods. So first part is " Write a method that prompts the customer for the car type. There are three acceptable car types(E:Economy,M:Midsize,F:Full size).Your method will return a valid car type. ". But the thing that I don't understand is ,should i read from ...

 

« first day (221 days earlier)      last day (2173 days later) »