« first day (271 days earlier)      last day (3751 days later) » 
00:00 - 16:0016:00 - 00:00

12:18 AM
@syb just now I realize what you said. I'll see what I can do!
 
12:31 AM
Now that everyone has votes again:
2
A: Calculate the number of moves requires for a knight chess piece

syb0rgA few notes (with efficiency aside, as you said): Your defined ABS surrounded by parenthesis is not the usual way that C programmers declare macros so that they aren't problematic. #define ABS(a) do { typeof (a) _a = (a); _a > 0 ? _a : -_a; } while(0) Why are all of your single letter variabl...

Also, if you don't want to vote on my answer, please spare a vote for the question.
 
12:46 AM
both upvoted ^^
 
Why do so many people like making an ABS macro
use math.h people!
3
 
@Yuushi YES!
Maybe I should have mentioned that...
 
actually, that whole ABS macro confuses me
 
@Yuushi Why is that?
 
why the use of typeof? :/
 
12:53 AM
For double and float types maybe?
 
0
Q: Am I getting the right information about installed SQL Server Instances?

Jerry DodgeI'm building an installer package for our software using Inno Setup. As a part of this, I'm also building a few different DLL's in Delphi XE2 to accommodate for some of the common tasks required by the installer. One of those is querying and manipulating settings on these instances. I intend to s...

 
shouldn't be necessary for floating point types
 
@Yuushi The <math.h> abs() function is failing with them.
 
yeah, need to use fabs() with floating point values
however, #define ABS(x) ((x) > 0 ? x : -x) will work fine with integer or FP
comparisons automatically upcast, so if you pass in a double, it'd be the same as x > (double)0
 
@Yuushi You are right... time for an edit.
 
1:03 AM
which can also be really nasty. unsigned x = 1; if(x > -1) { // This won't be executed }
 
@Yuushi There aren't too many cases where unsigned should be used though.
 
@syb0rg True, but it's something that can really catch people out who don't know about it :)
 
@Yuushi Would using typeof really affect portability that much?
 
That being said, I think visual C++ implements typeof as well, although I'm not sure
 
@Yuushi It is part of the C99 standard as well (I think)
 
1:15 AM
@syb0rg Hrm, I don't think so, or I can't find anything on it being included at least
 
Is this as a comment too harsh?
I don't think recursion is a good solution for this problem at all. You're initial solution is better. `When you have a problem and you think " I know I'll use recursion" you now have an infinite number of problems.`
 
0
Q: Need help cleaning up this piece of code

razrunelordif is_complete == true #If there are time stamps get between time stamps if start_date && end_date tasks = Task.find(:all, :include => [:task_observer, :job, :contact], :conditions => ["contact_id = ? and completed_date IS NOT NULL and DATE(completed_date) between ? and ?", contact_id, st...

0
Q: How would an experienced Ruby programmer rewrite my mini game?

Jumbalaya WantonI'm writing a small guessing game. I'm writing a points calculation algorithm. I wrote the following, and it works. But I feel like I'm bringing over procedural background into Ruby, or not leveraging Ruby properly. How would an experienced Ruby programmer approach the problem? You can test the...

 
@JamesKhoury Why not just "I don't think using recursion here is wise. You're initial solution is better."
Recursion does have its places you know.
For example:
5
Q: Brute Force Algorithm in C

syb0rgThis is a simple brute force algorithm I have in C. All the program does it print out every possible combination of the given alphabet for the given length. I would prefer suggestions on how to improve the algorithm, or decrease run-time. Any other suggestions are acceptable though. #include <...

 
@JamesKhoury I thought it was just "now you have another problem"... it's actually an infinite amount of crap, like a shit canon aimed at a fan?
 
@syb0rg clang certainly complains at me
abs_test.c:8:5: warning: implicit declaration of function 'typeof' is invalid in
C99 [-Wimplicit-function-declaration]
 
1:22 AM
@Yuushi GCC (using Xcode) was telling me to set the default standard to C99. So that is why I thought that.
 
@syb0rg yes, although I find most of the time I can do without recursion.
@lol.upvote Thats an interesting analogy.
 
@JamesKhoury Very true. It most cases is will also be more efficient to do it without recursion.
There are few where recursion will actually be a bit faster.
As in my example above.
 
@syb0rg I actually have a peice of my company's "enterprisey" solution I'd like to take recursion out of. Haven't gotten the permission yet.
 
Depends on the language. I think "When you have a problem and you think " I know I'll use recursion" you now have an infinite number of problems." goes overboard
 
2
Q: Python script to touch files of a particular pattern in all folders of a given name

benjymousThe intent of this script is to hunt down all "*/testResults/*.xml" files and touch them, so that our build system doesn't issue errors that the files are too old (it's entirely intentional that tests are only re-run when the libraries they change have been modified) import fnmatch import os imp...

 
1:25 AM
@JamesKhoury You should do time tests to see which is faster. Compare your solution to the current solution in your companies code.
 
@syb0rg I've run some tracing that determined some of the code is executed between 2 and 16 times for a common situation. (i.e. not an edge case.)
 
@JamesKhoury So it sounds like it needs improving.
 
Yes but it works.
 
Works != works well ;)
 
Work == Good enough
 
1:45 AM
Good enough title? I can't quite think of anything else.
0
Q: Task observer implementation

razrunelordI need help cleaning up this piece of code. if is_complete == true #If there are time stamps get between time stamps if start_date && end_date tasks = Task.find(:all, :include => [:task_observer, :job, :contact], :conditions => ["contact_id = ? and completed_date IS NOT NULL and DATE(com...

 
Ask the OP what the code does? Seems OK to me but I'm no ruby expert.
 
I know almost 0 ruby, but surely if is_complete == true could just be if is_complete?
 
@Jamal Looks good to me.
 
@Yuushi since thats what the next line looks like I'd agree.
I think its just getting a record from the db that matches?
 
@Jam test
Which one of you did that ping?
Did it even ping one of you?
 
1:51 AM
It did ping me.
 
@JamesKhoury Did it ping you ^^^
 
I have the chat window taking just a little more than half the ...2nd monitor, and your names read "Jama" and "Jame" ;)
 
@syb0rg yes. because I was the last Jam* to enter?
 
and "Yuus"
 
@JamesKhoury No. Jamal was.
I can ping two people at once :)
 
1:53 AM
Oh ... Well I got pinged. Theory disproved.
 
so if we all call ourselves @lol.something and someone says "@lol" in the chatroom, we all get pinged!
 
@JamesKhoury That's what I was testing. I'm actually surprised that I can ping two people at once.
@lol.syb0rg
But then someone will abuse that and I will get a gazillion inbox messages.
 
@lol.robot
 
Yes... you could then elite-ify people by creating a group name
 
haha
CR "clans"?
2
 
1:55 AM
Clan vs Clan war?
 
@lol vs @fml. Round one. Fight!
 
Clash of Clans?
 
I'll be in the C++ clan.
 
@cpp
 
The monkey can be by himself in the COBOL clan.
 
1:57 AM
@old @ape
 
monkey clan vs lol clan?
@lol.upvote did you just ping yourself?
 
that's like vs
I can't do that (ping myself)
 
1
Q: Print an ASCII diamond?

tadamsonTakes width specified by user and prints diamond of that width. Uses only three four loops, but could I reduce that further? Is that the more elegant solution? public class Diamond { static boolean cont = true; public static void main (String[] args) { Scanner input = new Scanner(System.in)...

 
It's not nice of you guys to talk about me like that. @cob
 
Wasn't me.
 
2:07 AM
sorry mate
 
you will be.... 'mate'.
 
[pri]mate
 
@Jamal Ditto.
 
@lol .... you on team @edw or team @jac
 
hahahahaha
haha ha ahem
 
2:08 AM
Also, @Jamal an edit was just passed on the ASCII diamond that undid some of your work.
No thanks to Santa...
Santa, Los Angeles, CA
123 4
Jk, he fixed some indentation stuffs.
 
We have a Santa!!
 
@syb0rg: I've just fixed it.
 
the ascii diamond question looks like one of my first year uni projects.
 
I have a method that I pulled from some code of mine, but I'm not completely sure how to explain it.
 
@syb0rg not sure how to explain its purpose?
 
2:15 AM
@JamesKhoury No, I'm just trying to connect the dots between the OPs code and my code, and then explain why mine is better :P
 
@syb0rg because you wrote it of course!
 
@JamesKhoury Yeah... ;)
 
I feel that I may be able to point out some minor things in that ASCII question, but they may be too minor. I wouldn't be bothered to test the code anyway.
 
Who actually tests code?
3
 
Here is the answer, point out if I should connect more dots in my answer.
0
A: Print an ASCII diamond

syb0rgThere are a few things that we can do to clean this up. This is something I would extract to its own method. Handle getting the user input in the main() method, and then pass that on to the drawDiamond() method. Your for loops are divided into iterating over lines, spaces, and marks. We can s...

 
2:20 AM
I hardly do. I've actually ran about one or two programs prior to review.
 
It's been a while since I have reviewed Java.
Hopefully I didn't approach it too much from a C standpoint.
 
Looks nice. Input definitely shouldn't be done there, and the OP's nested loops make little sense.
 
Thanks.
 
Looks close enough to C and C++ anyway. Some differences, though.
 
oops wrong room!
 
2:30 AM
@Jamal That's half the reason I answered it. The only real differences would be the abs function and the printing functions.
 
Right.
@syb0rg: Perhaps you can take a stab at this similar question? 200 and I already answered it, but it doesn't look like it was sufficient advice, based on the OP's updated code.
 
@Jamal I would probably recommend to the OP to ask a new question in that case. But sure, I can take a look at it.
 
Looks like you're only about 120 rep away from moderator tools!
 
I can't hit that today though, I would rep-cap.
Tomorrow maybe?
 
Yeah, I know, not today. There's plenty of time.
 
2:43 AM
@rolfl Came in to steal my thunder ;)
2
 
I was way ahead of you, and was peeved when I was part way done and '1 new answer' popped up ... thief.
3
 
@rolfl Will it make you less peeved if I upvote you :P
 
That always makes me nervous as well. Going for the fastest gun there is really tempting.
 
@syb0rg Never
 
It would be best, if you want Sportsmanship. ;-)
 
2:45 AM
@rolfl I'll do it anyways :)
 
See, for a monkey, peeved is about as long as our attention span ... Oh ... Banana!
2
 
sigh
 
@syb0rg ..... sqr ... really? That makes me think square root. Just sayin.
But it's good to suggest the method.
 
@rolfl Change to width?
 
Not sure, but also, your program will be about 33% slower than the original ... ;-)
 
2:49 AM
@rolfl Really? How?
Usually I can pick up on these kinds of things.
 
you do about 33% more System.out.print(' ').
 
Yeah... but if you turn it to its side, it looks like a space ship!
 
@rolfl Ahhh. Perhaps I can reduce that...
Keep in mind I didn't compile this before I posted it.
 
@syb0rg - you have to get to know me better.... for me, performance is priority... I have learned to spot these things.... in this problem though, who really cares?
 
Eh, I never compile my code anyway. Then again, I hardly write complete code in answers.
 
2:52 AM
Also, you should porobably know that 'my' solution is about 'n' times faster than yours, where n is the width.
 
@rolfl I am usually more of a security guy first, then performance.
I test for a lot of corner cases.
 
@syb0rg accuracy is a forgone conclusion..... my speciality is fast accuracy. Hell, if you want the wrong answers fast, I can do that faster than anyone else too.
 
Here we are:
0
Q: Weekend-Challenge Reboot

lol.upvoteIn December 2013 we held a bunch of weekly weekend-challenge events, which was fun, and generated posts that made it to the site's newsletter, week after week. One may want to tweak this query so as to filter posts created before December 30th, 2013. Some weekend-challenge stats up to that date:...

0
A: Weekend-Challenge Reboot

lol.upvoteThe Ultimate Tic-Tac-Toetm Tic-Tac-Toe is boring. Let's code The Ultimate Tic-Tac-Toe, a whole different story. Uh, what? Each turn, you mark one of the small squares. When you get three in a row on a small board, you’ve won that board. To win the game, you need to win three smal...

 
Hmm, Tic-Tac-Toe knocks out C as a programming option.
Upvoted anyways because it seems cool.
 
really?
 
2:56 AM
@lol.upvote It would be very hard to implement.
Multiple long files.
 
If I attempt that (probably at a later time), I'll stick to procedural C++.
 
we have all of February!
 
Oh yeah, I forgot!
I'm gonna have a fun time finding out how to print that thing...
 
0
Q: Does this code follow standard Java?

user3246453I need a review on this. public class App { public static int pos; public static String getLotNo; public static String getExpDt; public static String getItemNo; public static String getTrimItemNo(String itemNo) { return itemNo.trim(); } public static String ...

 
@rolfl I think I figured out how to make it a bit faster, but it requires more for loops.
Probably more of a hassle to explain and implement like you said.
 
3:06 AM
3
Q: Weekend-Challenge Reboot

lol.upvoteIn December 2013 we held a bunch of weekly weekend-challenge events, which was fun, and generated posts that made it to the site's newsletter, week after week. One may want to tweak this query so as to filter posts created before December 30th, 2013. Some weekend-challenge stats up to that date:...

 
oh dear
 
Wow, that's... pretty late.
 
13 minutes.
 
Ultimate tic-tac-toe: my mind is blown
5
 
I'll take a crack at it this weekend hopefully.
 
3:12 AM
@syb0rg it's ongoing all month, take your sweet time!
 
This will hopefully get more people involved.
 
forget about coding it ... I want to play it!
 
@Jamal you'd be amazing to swap the SEDE post with the CRWEC-Reboot one on the CB :)
2
 
So, no more featured for the SEDE post?
 
..or any another one of mine? :)
 
3:21 AM
The votes one is already featured, so I can remove it from SEDE.
 
My daughter got her red belt Karate tonight, and we went to dinner to celebrate (@lol, Montannas), nd they have paper-covered tables. My 8-year-old son and I played a game the whole way through.... on the table.
It was actually, really, really fun, and remarkably interesting.
I think you can count me in on this one.
5
 
Yes!!!
You're going to reuse these weird characters you carefully researched for your Sudoku grid?
 
3:44 AM
The ASCII diamond question scores are @rolfl: 4 @syb0rg: 5 @op: 6.
 
The winner is the one with the check-mark ... ;-)
3
 
0
Q: Tool for automatically correcting indentation and formatting of CR & SO code

sqyklyThis is my tentative solution to How can I prepare my code so that I can paste it formatted? If you need to copy and paste code into the question or answer textarea when solving someone's problem, describing your own, or fixing someone else's formatting, this tool will correct the indentation of...

0
Q: Reading from text file with RegexMatch

inikiBelow is the method that I have written for reading from a text file. While reading, I need to match line string to given regex and if it matches then I need to add the line string to a collection. private static void GetOrigionalRGBColours(string txtFile) { string tempLineValue; Regex ...

 
4:19 AM
100th answer posted!
3
and... it's a wrap. ciao!
 
Cya.
 
Bye!
 
1
Q: Is this Fibonacci function right?

user3251564Is this a correct method to do Fibonacci with recursion? function fibb($limit,$first_numer=0,$second_number=1){ echo $first_numer."\n"; echo $second_number."\n"; if($limit > 0){ fibb($limit-2,$first_numer+$second_number,($first_numer+$second_number+$second_num...

 
4:50 AM
2
Q: Finding missing number from series

user3251564This code will accept user input from the command line. The first user can enter the limit of series. e.g: user may enter 5 After that, the user will be prompted for 5 numbers of a series. e.g: 2 4 8 10 12 Here in this series, 6 is missing, so I am going to find the missing series from comm...

 
 
1 hour later…
5:51 AM
0
Q: Is it a good idea to keep Request querystring as a property?

AthulMy code snippet is like this: public static string EventId { get { return HttpContext.Current.Request["eventId"]; } } And I will call this property EventId whenever I need it. Is it a good practice?

0
Q: Generating complex report from database view vs EF

Jenish RabadiyaI need to create report from database and I am having two below mentioned approach for the same. Created a Database view and call that view from entity model to get the data and display that data on web page. I already have entity model of the database so write the business logic to generate re...

 
 
1 hour later…
7:10 AM
0
Q: Reading a configuration file in c#

now he who must not be named.The configuration file of my app is similar to, <?xml version="1.0" encoding="utf-8" ?> <Items> <Item Name="Coffee" Cost="10" Image="itemCoffee.png" /> <Item Name="Tea" Cost="10" Image="itemTea.png" /> <Item Name="Vada" ...

 
7:22 AM
0
Q: Reviewing my project?

TumsI have a small project I'm working on in an area I'm not comfortable with (web development). I would like someone to review my code. I can try to split it up, but I would prefer someone looked at the project as a whole. It doesn't look like this is the right place. Can someone refer me to where I...

 
 
1 hour later…
8:40 AM
0
Q: Allow users to add custom queries to Mustache variables

Fez VrastaI'm writing an application that will be managed by my team, it uses Mustache.php as template engine. I have a PHP file that makes an array of variables and functions that is passed to the Mustache parser to populate the template. I even provide a system to override partials of my template to ed...

 
9:04 AM
0
Q: Sending SQL DataRow instead of an object

SharePointerNormally, I create a class object library and then populate it's properties across solutions, e.g. from a website to a wcf web services, referencing class dll in both solutions. But I just realized someone using a DataRow with same columns as object's properties and sending it across methods as ...

 
9:34 AM
0
Q: Copy a linkedlist with an arbitrary pointer

JavaDeveloperThe full question description is found http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/. Looking for code review, optimization, clean code etc. public class CopyArbit<T> { private Node<T> first; private Node<T> last; private int size; public CopyArbit() {...

 
 
1 hour later…
10:48 AM
I estimated that a feature would take 12 working hours to add... 5 hours later... Done!
 
11:16 AM
Cool, 7 hours of code reviews!
 
I don't think meta-answers are posted to the Answers feed, so ...
0
A: Weekend-Challenge Reboot

ChrisWI suggest doing the UTT challenge in two parts: On the first weekend, design the game (and choose a winning design) Next weekend, implement the game (matching the design/requirements decided on the first weekend) Benefits: More like real-life (design before code) Inter-operable implementati...

Also I'm in two minds about this question:
1
Q: Reviewing my project?

TumsI have a small project I'm working on in an area I'm not comfortable with (web development). I would like someone to review my code. I can try to split it up, but I would prefer someone looked at the project as a whole. It doesn't look like this is the right place. Can someone refer me to where I...

On the one hand, it's a "shopping" (perhaps even spam) question and should therefore be closed. OTOH it's on-topic (code review) and posted to Meta.
@lol.upvote I don't understand your recent comment/question?
 
11:35 AM
0
Q: Java MDB Calculator, is it right? any improvements? different approach.,,

user35892import java.util.Properties; import javax.ejb.EJBException; import javax.ejb.MessageDrivenBean; import javax.ejb.MessageDrivenContext; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.Queue; import javax.jms.QueueConnection; import java...

 
@200_success Ready for your answer: I think discussion (posts from other people) has finished, otherwise.
 
12:04 PM
A co-worker just said that he found this PHP function in code that he's working with function load($foo, $bar), don't you just love those parameter names?
 
12:22 PM
@SimonAndréForsberg - I worked with a guy who somehow managed to make his code read like tolkein. There was always a frodo, bilbo, gandalf, smaegol, etc. The variables had character-embodied references.... the gandalf variable was the wizard variable - did some sort of magic. Mordor was the name of a 2D array, whatever.... Somehow, it always worked (the code and the naming convention), and did not make the code any more complicated.
4
(unless you did not know the characters.... but that's just daft).
Also, this was before the movies.
@All ... Hot question on it's way....: codereview.stackexchange.com/questions/40417/…
 
12:37 PM
@rolfl Speaking of variable names, I just found a local variable called ape here...
 
1:00 PM
What's with all the swastikas?
 
@Donald.McLean See these MSO questions: 1, 2‌​. You're currently seeing the aftermath. And simply refresh the page to remove 'em.
 
How refreshing.
 
@Donald.McLean It's been two busy days for our beloved chat room, to say the least...
 
1:16 PM
Yes, and I've been too busy to follow it all.
 
1:33 PM
I think you should be happy about that.
 
@syb0rg Well done, robot!
 
0
Q: Is that correct example of unsafe publication?

Oleg KandaurovThere are many examples of unsafe publication on the web. But I cannot find a complete program for reproducing it. I wrote an example but I do not sure whether it correct or not. And in case of correctness on what hardware and vm flags it should be reproducible? import static java.lang.Thread....

 
Getting rep-capped should be no difficulty for you, considering you're a robot.
 
@SimonAndréForsberg Yeah, I only answered two questions recently.
Also, for some reason I can only vote 39 times today:
 
@syb0rg darn! You're only one upvote away from 2K
 
2:22 PM
@amon Yeah, I have to wait till tomorrow for mod tools.
 
… unless an answer gets accepted
 
@syb0rg I only answered two questions recently - that's 2 more than at least 90% of CR users I'm sure (haven't queried SEDE to check) ;)
2
 
Yeah, it's been six days now since I answered anything :/
 
@amon Is that one way you can beat the rep cap?
 
@syb0rg Accepted answers and bounties don't count for rep-capping
 
2:25 PM
@syb0rg The rep-cap only caps votes, not accepts or bounties. I don't know about accepted edit suggestions
 
^^ was going to say
 
I was wondering how @rolfl was sometimes beating the rep cap.
 
sometimes?
 
Speaking of @rolfl, he is trying to steal my thunder again...
5
A: Calculate the number of moves requires for a knight chess piece

rolflO(1) Discussion Is it possible to calculate the distance in O(1) time complexity? Yes, it is. This problem is called the "Knight's distance" problem, and googling it find a number of references. This problem was posed as part of the South African "Computer Olympiad" in 2007 for high-schoo...

Good answer, I would give it an upvote if I had one (not that it would help his rep right now anyways.)
 
@syb0rg Accepted answers, accepted answers, and more accepted answers.
 
2:27 PM
@rolfl doesn't hit the rep cap. He takes it down to its freakin' knees and says "dude I'm scoring 300 rep today and you don't have a say!"
 
@rolfl is hustlin' the reputation.
 
R.E.S.P.E.C.T.
 
Don't you forget it.
 
Now you can all go an downvote this C# answer:
0
A: Reading from text file with RegexMatch

rolflOne significant performance problem here is that you are doing two String operations on every line (well, almost every one). First, the line match, second the split. The second operation is also creating new String instances.... it is actually quite simple to bring this down to a single operatio...

 
2:31 PM
I'm out of votes, I'll see what I can do about that later :)
 
^^^ ditto
 
Well, you can tell me here whether it's plain wrong ;-)
 
doesn't look plain wrong, but I only glanced at it
not everybody is working on systems that take 30 minutes to launch!
 
@lol.upvote The public static mainJFrame.getThisFrame() method, returning the instance of mainJFrame, is called from 154 locations in the code. In 16 different classes.
@lol.upvote I believe it was 10 minutes to launch, then 30 minutes to get results
 
right
that's quite a nice useful method!
 
2:36 PM
Note also that mainJFrame does not correspond to the naming conventions
 
Refactor/Rename?
 
@lol.upvote Yeah, if you want all the classes everywhere to do whatever they want with everything
 
Hi @Malachi!
 
@lol.upvote hey
 
0
Q: Need your advice about scopes in JavaScript, review

blackbird-I would like to connect this "JS" to Bugzilla (example: bugzilla.mozilla.org or landfill.bugzilla.org). I started to learn JS language today and I would like to ask you: How can i do not the bad things in global scope? How should I use function (in var or not)? Please show the examples of ...

 
2:38 PM
Anyone tell me what is wrong with this? I am not seeing it....maybe I skimmed again though.
9
Q: Calculate the number of moves requires for a knight chess piece

AlecIt's possible to work out the number of moves required to move from (0, 0) to (A, B) for a knight on an infinite chess board in O(1) time. This is an attempt at a solution to do it in O(n) time, where n is the number of moves required. Disregarding inefficiency, are there any mistakes? #define ...

 
@Malachi - it comes from my answer (linked by syborg above) and the ideone it points to.
 
@Malachi What do you mean by what is wrong with it?
 
NEVERMIND, I just need to read the answers....lol
 
@syb0rg - he's presumably doing the close queue.
 
Why is it getting close votes?
Aww, no rep for that upvote :(
 
2:41 PM
but i better get to work
 
But I get a badge :)
 
@syb0rg I will take it back until later, but you have to remind me...lol
 
@syb0rg - that question peeved me ... I spent a lot of time trying to play with the C (not my natural language), only to find that the code is really, really broken.
 
I VTCed because IMO the code in the OP doesn't return the correct answer.
 
@rolfl Yeah, on first glance I thought it would work, and then I actually compiled and tested it.
 
2:44 PM
@lol.upvote mainJFrame.getThisFrame().getOap1().getProgressBar().setValue(0);
 
@ChrisW that is a good reason to VTC
anyway I will be back later
 
@Malachi I'll do my best to remember :)
 
@ChrisW .... did you see the Ideone I put together for it? ideone.com/Akyx2M
It will irritate me if the asker gets 'nice question' for such a broken POS.
The KD answers in the ideone are wrong as well, BTW... not sure why.
 
@rolfl I didn't see that. IMO the code should never return -1: am I wrong?
 
No, you are right.... and it should never return 0 for move from (0,0) to (1000,0) either.
 
2:47 PM
True too.
 
@rolfl Downvoting it just to make sure he doesn't
 
Another uncounted upvote on the diamond question.
Rep-caps kinda suck.
 
tell me about it..... ;-)
 
I noticed that he's asking "Are there any mistakes?" i.e. "Does my code work?". Shouldn't he test that before coming here?
 
FWIW, I think I would be +1K without the cap.
 
2:48 PM
It doesn't help that it only took my under half of a day to reach it too.
 
I should do the math.
@syb0rg - so, what's your rep today?
Only 200?
 
@rolfl Yeah, neither of the two questions I answered have been accepted.
Nor have there been any other accepts on other answers of mine.
 
OK, cough230 cough230....
2
 
I haven't reached 200 any single day for the whole year yet!
 
I scored 190 the day someone decided to make me a trusted user...
 
3:03 PM
This question is going to reach 1K views soon.
12
Q: Print an ASCII diamond

tadamsonThis takes a width specified by user and prints a diamond of that width. It uses only three for loops, but could I reduce that further? Is there a more elegant solution? public class Diamond { static boolean cont = true; public static void main (String[] args) { Scanner input ...

 
My one day record is 379, Jan 24 was a glorious day
3
 
That's a good one .... and hard-won bounties are worth it.
Which reminds me....
... not yet ..... question eligible for bounty in 3 hours
 
@rolfl which question?
 
39
Q: Flag offensive user profile

rolflThis has been raised many times, and marked duplicate, but recent circumstances have not been the same as before (I believe), and it is time to revisit the question with a different perspective... especially since there was debate in the linked MSO question as to whether the MSO question itself i...

Me to FireFox: Close tabs to the right
FF: You are about to close 52 tabs, are you sure you want to continue?
Me: Frag Spree!
 
52 tabs!?
 
3:09 PM
@syb0rg hopefully it won't be closed by then...lol
 
I thought 12 tabs was a lot.
2
 
@syb0rg I have 2 browsers open with 12 tabs total. but normally I have about 3 browsers open with somewhere between 20-40 tabs total, in chrome....
I have been trying to limit it lately though. but now I have more RAM and a SSD Hard Drive. so I think I might see how far I can push this thing now that it's also a 64 bit machine... lol {Work Machine}
 
It turns out, I only have 51 tabs open.
 
How do you people find what tab to navigate to?
 
@syb0rg they open a new one
3
 
3:13 PM
I have a pattern for where all the important stuff is. The rest I just look for, or open a new one.
17 of my tabs are for SE/SO.
 
@Donald.McLean I only have two, one for the actual sites, one for chat.
 
20 or so are for library and other programming documentation.
 
@Donald.McLean Ahh. Why don't you just favorite them?
 
Bookmarks FTW!
 
Google+, Facebook, Gmail, weather.gov, Wikipedia
@syb0rg The doc pages are usually open to specific relevant places.
 
3:18 PM
@Donald.McLean Ahh. I thought you had a reason.
Here is one of my bookmarks: en.wikipedia.org/wiki/Special:Random
Random Wikipedia page every time.
 
No, I have SE, I don't need any more time sinks.
 
0
Q: Codeigniter view within a view

user3077706I'm calling a view into a view. Am I doing correctly, or is this a bad practice? <div class="tab-pane" id="tab_1_2"> <div class="portlet "> <div class="portlet-title"> <div class="caption"> <i class="icon-reorder"></i> Nuevo Usuario </div> ...

 
Last night's table-cloth at dinner.... ;-)
 
Nice! Already practising? :)
 
taking it for a spin.... yeah.
against my 8yr old
 
3:27 PM
How did it go?
 
I was O ... won, but just
 
Hello everyone. Everything alright?
Why do people have so much tabs open? :O
 
@kleinfreund They have 64-bit machines...
 
Doesn't everyone these days have 64-bit machines?
 
@rolfl Well gratulations for winning your first round of Ultimate TTT :)
 
3:32 PM
I'm asking more in the direction of why someone would need this much open tabs.
 
@kleinfreund Hello.
 
@rolfl If we will have some common interface / IO / whatever and we make bots, my bot is gonna crush yours!
@kleinfreund It has two close votes for non-working code, can't really tell why exactly
 
Ah I see.
I can think of the questions asked in the post are a bit too much like "How do I do this?" instead of "How can I do this better?".
Out for 15 minutes. See you.
 
@kleinfreund What does anyone need a 64-bit machine for (apart from helping to cache a database in RAM)?
 
3:40 PM
Anyone previously reading my comment on this answer, should please revisit it... this is a clever little ASCII Diamond loop.
1
A: Print an ASCII diamond

Marc SelisYou can indeed do it in one loop. As I don't speak Java, so I'll use C# syntax. public static void Main() { string valueString; int width; do { Console.Write("Width:"); valueString = Console.ReadLine(); } while (!int.TryParse(valueString, NumberStyles.Integer,...

 
0
Q: Please review my tornado pymongo code

aviI am writing a tornado app in which a user can maintain his products whishlist. Typically the a 'user' document will contain following fields: email_id name tracked_products The tracked_products here is a list which maintains the wishlist. Following is my code: To find tracked_products of ...

 
Welcome to CR! Make sure you read our help center on-topic section; we can't (won't) write code for you, but we will happily review your working code :) I'm not voting to close this question, but you might want to edit it so as to make it clearer what the posted code does exactly, and what you expect to be reviewed. — lol.upvote 23 secs ago
 
^ I like to post a link to What makes a good question?
 
@ChrisW good point
done
 
You commented on but didn't vote (for or against) my answer on meta about UTT, "design before code". No opinion about whether it's a good idea?
 
3:56 PM
@ChrisW I think we (the core CR community) should use to show examples of what good CR questions are - we shouldn't post anything off-topic, nor bend any on-topic rules.
 
0
Q: Improving PHP/MySQL Security

danielsmileI've been building a system for inputting and monitoring shifts for casual staff, who work across multiple sites with the ability to generate accounting information. I've had some help from Stack Overflow in building this project, as I had no prior knowledge of PHP or MySQL, and each time I post...

0
Q: Monopoly: Creating a monopoly board

Elton FrederikI am creating a Monopoly board game using HTML, CSS, PHP, JS and JQuery. I am doing this to develop my web development skills. I have cut the project into sections. So this question will only deal with creating the board. First here is my JS Fiddle. Board size The board size is determined by...

 
Time to quit work for today, see you in about an hour!
 
Bye!
@ChrisW I mean high-level design questions should be posted on Programmers.
 
@lol.upvote That's a fair comment.
 
00:00 - 16:0016:00 - 00:00

« first day (271 days earlier)      last day (3751 days later) »