« first day (302 days earlier)      last day (3723 days later) » 

12:09 AM
0
Q: Random number guessing game

sunflowerI'm working on a random number guessing game. I'm done with the code and it's working, but there is a part that I want to make better. I declared an instance of a Guess class I created, and now how to make this part more efficient. int counter = 0; do { myGuess.UserGuess = Get...

 
12:21 AM
4 more upvotes, and we will have a 20K'er!
 
on answers :)
410 upvotes and we could have another one
3
 
CR now has 1 20K user :)
10
 
And now to give palacsint 410 more upvotes. :P
 
409
:)
 
Anonymous
Code Reviewers
 
12:35 AM
thanks
 
Anonymous
how did you generate those site activity graphs?
 
Stack Exchange Data Explorer.
 
Anonymous
@syb0rg i know, but, what query?
 
@PatoSáinz I'm not sure what graph you are talking about exactly.
 
@Pato It's the monkey's voting and activity graph
 
12:42 AM
@Mat'sMug Did you see this answer?
4
A: Customer MapReduce implementation

PatI'm not familiar with MR best practices, but here are some JS-specific comments. Key Points DRY - that emit code is repeated all over the place and has only slight changes - parameterize what varies and put it all in a function You are repeating your loops - either do everything in one loop fo...

 
nice, 1 vote short of hitting 200... but I'm already ;)
 
Already!?!
Holy moly...
We're barely 45 minutes into the day...
 
Another great answer by a very new user:
1
A: Random number guessing game

Kyle SmithI think a way to make this code generally more efficient and predictable is to have your classes have a more defined role. For example, it seems like you're defining an instance of Guess as myGuess, then externally loading in a random number (RndNum), and the current guess (UserGuess = GetUserGu...

 
Anonymous
I don't want to play Code Review.SE Call of Duty
 
Anonymous
12:44 AM
I wanna Code Review.SE Battlefield
 
hmm... I guess you could always fork the query? :)
A napalm strike on that one and 2 users change brackets:
2
Q: Refactor to reduce code duplication

MyTitleI have four methods like these (here are only two of them): def checkLeft(clickedIndex: Int): Option[Int] = { val leftIndex = clickedIndex - 1 if (leftIndex >= 0 && clickedIndex % field.width != 0 && isEmptyCell(leftIndex)) Some(leftIndex) else None } def checkRig...

 
pew-pew
BSHTCHK
2
 
@syb0rg this is my attack plan: codereview.stackexchange.com/…
 
@Mat'sMug I like it. I'll see what I can do.
 
@syb0rg: Robot acronym?
 
12:49 AM
I would expect a gun that reloads like BSHTCHK to shoot more ...uh, violently than just pew-pew ;p
(or I got the joke wrong?)
 
Ehh, I was trying to simulate an explosion... time to rework my audio simulator. :/
 
"ka-boom" has always been quite effective...
 
Not enough pizazz :P
 
Gravity
 
Inertia
 
Anonymous
12:52 AM
 
Anonymous
vim users^
 
I must say, you manage to find and post some of the weirdest images.
 
spooky
worm-hands?
 
Anonymous
:o
 
How do you find this stuff lol.
 
Anonymous
12:54 AM
@syb0rg 4ch library
 
google up "3d animation fail" I guess
 
Lots of answering going on, especially with zombies! :-)
 
Almost changing tiers:
Keith Nicholas, Auckland, New Zealand
990 2 8
 
@syb0rg these ones too (bottom of page):
I'll make another reading for the doughnut chart tomorrow when SEDE updates. I'm sure the yellow chunk has grown again (1K), and that the gray part (500) isn't losing ground.
wow this guy has pretty much the same story as mine:
ok maybe not.
I started at 12 with a Commodore-64, VB6 came after. But I'm still stuck in C# and lovin' it.
his SO account:
 
^^^ Addicted.
 
I have literally upvoted everything he has posted already.
 
me too!
amazing the number of users between 200-299
^^ most users on this page are 1 vote short of 200 (verify if they're active before you shoot!)
 
Lol, @200_success is starting to imitate my style :P
6
A: Command line reverse polish calculator

200_successWhat you did well Taking advantage of the shell to split your expression into tokens is smart. It saves you from the trouble of having to write a tokenizer. Beware, though, of a usability issue with Unix shells, where * and \ have special significance and need to be quoted or escaped. Bugs ...

 
@syb0rg seen this?
6
A: Capture with User32.dll or hook?

Mat's Mug It's very fast, but I wonder if hooking into the API (DirectX) and getting the buffer will be faster than this (I don't know how to do that, though). I don't know either. What you have here, probably hasn't been reviewed yet, because there's essentially nothing blatantly wrong with it. W...

I think your "style" is the new thing ;)
 
Ya'all noticed that Loki is now 20K, right?
 
1:11 AM
@rolfl I cast the make-him-a-20Ker-vote...
 
Brb, dinner.
 
0
Q: Should delete pointers in Qt5

user3314865I am relatively new to the Qt framework and I was wondering if i should delete pointers in my program because I know that in c++ that if memory is not return it could lead to memory leak but i am not sure if the same applies to Qt. #include "mainwindow.h" #include <QApplication> #include <QText...

 
@Jamal ONLY TODAY: accepting bounties too! :D
 
@palacsint this one ends in 3 days:
10
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...

 
640 unanswered!
 
1:24 AM
@palacsint are you going to accept Grace Note's answer?
16
Q: What are the advantages of graduation?

palacsintI've seen a lot of activity about graduation recently. What are the (possible) benefits (and disadvantages) of a graduated site?

 
@Mat'sMug Yeah, I guess, but I'll read the comments before
 
0
Q: Intranet PHP application code review

teunaI'm more of an IT guy (no CS course) with a strong and passionate relationship with Unix and I love KISS. I'm writing an application to help my coworkers with their daily tasks. Every now and then I get request from coworkers to add functionality to help them, most of the time I will turn an Exc...

 
@Jamal you beat me to it!
 
Maybe you can find something else. I have a feeling that very first line is noise.
 
I think seeing "code review" in the title has damaged my sight.
Just spent another 100pts here:
9
Q: Stream that opens an HTTP GET and then acts like a normal C++ istream

Loki AstariNeeded a quick stream to get JSON objects. #ifndef THORSANVIL_SIMPLE_STREAM_THOR_STREAM_H #define THORSANVIL_SIMPLE_STREAM_THOR_STREAM_H #include <istream> #include <mutex> #include <condition_variable> #include <vector> #include <curl/curl.h> #include <string.h> namespace ThorsAnvil { nam...

 
1:35 AM
@Mat'sMug: Go ahead and take care of this one. ;-)
0
Q: Counting number of nodes between two nodes

Vijay BhoreThis is my first question at code review. Below, i have listed my solution to find out the count of nodes between two nodes in a circular linked list. Please provide your review about it. Thanks in advance. public class CountNodesBetweenTwoNodes { Node first; Node fifth; private class Node<...

 
Perfect!
 
3
Q: Counting number of nodes between two nodes

Vijay BhoreThis code counts the number of nodes between any given two nodes in a circular linked list. Any feedback is appreciated: public class CountNodesBetweenTwoNodes { Node first; Node fifth; private class Node<Item> { Item item; Node next; } public static void main(String[] args) ...

 
1:50 AM
WTH is the buzz with recently?
like, is there a I'm not aware of?
 
Good question. Looks like there were 11 such tagged questions last month.
 
@Mat'sMug I'm attempting to recruit some people to review Loki's question that you placed a bounty on. Hopefully that bounty is incentive enough.
 
I should have thrown 200?
 
Idk, they are a hard group to recruit from :/
 
From SO, you mean?
 
1:57 AM
Loki himself could earn it with a self-answer, in the worst case...
 
@Jamal Yeah. There are too many people in the room, so there are too many sub-conversations going on.
 
@syb0rg Create a chatroom "Who wants a bounty?"
 
@Mat'sMug: You could ask him if he could self-answer. If so, you could still award the bounty.
 
@Jamal I didn't bother, because merely placing the bounty got him notified.
 
Ah, I didn't know that.
 
2:00 AM
Hmm, some users seem interested, but don't have enough knowledge to review it.
 
@syb0rg did you mention that a perfectly acceptable review was to go through "right decisions made"?
 
Hence why none of us can review it. :-/ He's too experienced for many people.
 
@Mat'sMug Expand on what you mean.
 
@Mat'sMug: You mean like this?
18
Q: "Your code seems fine" answers?

edorianI want to ask your opinion on how we should handle submitted question with code that is fine. I assume that will be the case for very view of the submitted review requests since everyone likes and dislikes other things and some will will have feedback that differs from "seems fine to be". What...

 
@syb0rg I mean, most people think "reviewing code" is "listing things that could have been done better" - when you're facing near-perfect code, a perfectly acceptable answer/review can be to ..^^^^^ that.
 
2:05 AM
I'm pinging some higher rep users to see if they want to review it... hopefully that doesn't go bad. :P
Oh, I may have found a winner.
 
And this user is okay with the current bounty?
 
I think so.
Jerry Coffin, Colorado Springs, CO
3.1k 6 19
 
damn I can't format my code block in my new answer .... I cant format code block when I'm using a list number
 
@Marc-Andre What are you trying to accomplish?
 
I cant include the first line and the last line in one of my code block in my answer...
 
2:12 AM
@Marc-Andre This?
3
Q: More elegant way to integrate code snippets into blockquotes?

syb0rgI like to quote instructions and comments from other sites in my answers. A lot of the time, these quotes will have code snippets in them. Right now the integration for them doesn't look right to me; here is an example. The small code snippets can't exist in the blockquote itself on their ow...

 
So it's 8 spaces to format the code ?
 
In any type of list, yes.
 
Thanks @Jamal!!!
 
@syb0rg: Ah, him. He's really good. I'm surprised his tag score isn't higher than mine here.
@Marc-Andre: No problem. :-)
 
Good to know! Thanks @syb0rg!
 
2:13 AM
@Jamal If you take a look at his SO account, it's insane.
 
Yes, eight spaces within a numbered or bulleted list.
 
@200_success I noticed some new styling in your answers: codereview.stackexchange.com/a/43055/27623
Looks nice. There seemed to be another user who has a similar style to that, but I can't quite pick their name out of the air...
 
@Marc-Andre same for a quote block I think
 
@Marc-Andre - was answering when you answered too ... I repeat some of the things you say... sorry
 
@Mat'sMug @Marc-Andre Take a look at how my answer is written by clicking "Edit":
20
A: Total income program

syb0rgThings you did well: You used the function gets_s, which is a C11 function. Not many people use this standard yet because it is newer. I was surprised to see it in your code. Your organization of the prototype functions is good. You initialize your variables as soon as you create them in some ...

Then you will see how to do some stuff and the output it produces.
@Vogel612 Hello! You seemed to sneak on here again without me noticing!
 
2:23 AM
@syb0rg had to dig up answers a little
2
A: MySQL in Vb to update every field of every page of a form in the database

Mat's MugI'm hoping all that's missing from your code is Sub DoSomething at the top and End Sub at the bottom. That's a very lengthy procedure you have here, and aside from the length itself, one sign is the "need" to append numbers to your identifiers (conn0, cmd0, rdr0, insertQuery2, ...). Naming Gett...

 
@Mat'sMug Yep. And then to indent it so it is inline with a list, you just add a space before >
 
I think you made a typo, could you check my comment on your answer ?
@rolfl No worry, it's nothing! good answer!
You've suggested some of my suggestion nice! I was on a good track !
 
@syb0rg shame on you, inverting codeblocks and blockquotes...
 
@Vogel612 ???
 
You could specify language-all instead of language only.
 
2:27 AM
Blockquote means the code is the OP's code
Codeblocks only are my code.
 
Oh well its 3:30 am..
Please dont expext too much right now..
Also i am on mobile, which makes it even harder to keep track.
Well.. heading to bed.
Have a good hunt @all
 
Good night @Vogel612
 
I've just noticed this:
1
A: Yet another C++ Json Parser

Quentin PradetThe code looks good: nothing to add or remove.

 
@Jamal I saw that. I'm not really sure what to do with it...
 
I might just keep it.
 
2:36 AM
I don't know enough where I could downvote him as wrong... so I just left it.
 
Ohh Loki is now 20k!
 
yeah, I had the same realization earlier ... but then found this is well-known here
 
Winston Ewert is next in line with 18K+.
 
Well I'm a bit late on the news then!
 
200 and palacsint are next.
 
2:48 AM
@syb0rg Don't think that you're getting special treatment. =)
2
A: Is this code an efficient implementation of Reservoir Sampling?

200_successA few random notes: FileNotFoundException is a subclass of IOException. Declaring both FileNotFoundException and IOException is redundant. The Sampler() constructor can be omitted, since it is just the default constructor that would have been implicitly defined anyway. Your sampler() method is ...

 
Unless people go through Winson's histore
 
And then you @rolfl :D
 
That's probably the only way. It's unfortunate that this is even necessary.
 
@Jamal … only if he picks up the pace like @palacsint did.
 
We may be able to help them and you get to 20K in time. It's not like it's the only thing keeping us back from graduation.
 
2:54 AM
I figure if you each award a 1K bounty on an answer of mine ... ;-) ....
 
That's a lot of cheddar.
 
Well, you do want to graduate... right ... ;-)
 
@Jamal If you're hinting at artificial wealth redistribution — don't.
 
I agree ... FWIW.
 
@200_success: I'm not. I was mentioning that rather large bounty amount (which, technically, cannot be done with one bounty).
 
3:06 AM
@rolfl you got the accepted answer! I really like your implementation!
one day, I'll have the accepted answer :P
 
@Marc-Andre thanks. ... you don't have one yet?
Yes you do ... ;-)
6
A: Parsing structured text in Java

Marc-AndreI'll first suggest you that the raw format that you use to store your data, use a different separator than a white-space. This will simplify the code since we are sure that we have unique separator. Your TreeEntry should encapsulate his fields in getter and setter. Public field in a class is not...

 
Yeah one, but everytime you're answering on a question I've answered, you always "beat" me to be accepted ! (It's because you always have a good and complete answer) One day I will :P
 
@rolfl Speaking of that, a "winner" was never chosen for this question:
20
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 ...

 
Technically, 200_success was the winner, in my eyes:
Calling this a "diamond" is not inaccurate. In fact, squares as diamonds are new and exciting! — 200_success Jan 30 at 12:43
 
and thanks Santa! Got one more privilege!
 
3:14 AM
ho ho ho
 
And I'll go to bed! Good night @all! And thanks for everything !
 
Goodnight!
 
Bye!
 
> SEDE:
> The data is updated early every Monday morning around 3:00 UTC. The last update was 46 secs ago.
SEDE, ahead of its time
 
3:59 AM
If anyone in here is familiar with Qt, please take a look at this, and let me know if I've talked out of my ass. I'm assuming the typical C++ logic/rules apply to Qt objects. Looks like normal "Java-syndrome", but maybe Qt objects are expected to be dynamically allocated for some reason or other.
0
A: Should I delete pointers in Qt5?

CorbinShort answer: yes, you need to delete all of them. Longer answer: In such a trivial application, it doesn't matter since the OS will clean up the memory anyway when the program exists, but in general, yes, you do need to delete the objects. You are not using a special memory system here, or ...

 
You've answered! :-) Nah, I'm not familiar with Qt, otherwise I would've answered it by now.
 
I looked through their docs quite a bit and it seems that the fairly standard memory management ideas apply, but you never know.
i'm 99.99999% sure it's java syndrome
 
Someone (else) seems to like your answer.
 
Someone else does ;-)
 
:D
 
4:03 AM
Here are some others, in case you haven't seen them:
5
Q: Reimplementation of C++ vector

JosephI previously attempted to make a C++ vector here, yet it was not very successful. Now I have made a basic reimplementation of it, so I'm checking that it is fine, and that I will not have to re make it again. Note: I also implemented an allocator class, but it works the same as the std:: equival...

4
Q: Are there any memory issues with this Eigen QR wrapper?

Leslie FaulknerI am writing a wrapper to Eigen QR for my personal use and I am wondering if there are any memory leaks or undocumented behavior in my implementation, especially in the function get_QR(). The answer is as expected. This is related to my previous question here. using std::cout; using std::endl; ...

And off-topic:
0
Q: How to generate an array/list from an output using .split()?

MadeonI just started picking up Python (2.X) and here I'm trying to "isolate" useful data set from a file so that I can do calculation. I get to print out lines of data (numbers) by splitting the dictionary like this: for n in lines: mesh1=n.split()[3] print mesh1 I would get the da...

 
Yeah, I looked through that vector one earlier but it seems to have already been covered. Will have to look at the others though.
 
I could've pointed out some of that obvious stuff, but I didn't bother to read through at first. Oh well.
 
0
Q: How to generate an array/list from an output using .split()?

MadeonI just started picking up Python (2.X) and here I'm trying to "isolate" useful data set from a file so that I can do calculation. I get to print out lines of data (numbers) by splitting the dictionary like this: for n in lines: mesh1=n.split()[3] print mesh1 I would get the da...

 
I actually have written a standard-conformant vector implementation myself before so am curious to look through that one in detail at some point
 
4:16 AM
The OP likes your answer, too. :-)
...but hasn't upvoted it.
 
4:36 AM
0
Q: Lexical Analyzer: Is this the right way?

user 2745681I'm doing a lexical analyzer for my programming language and I don't know if I'm doing it right. Can anyone can help me with this or suggest a better way of doing it. Heres my Code: #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<ctype.h> #include<string.h> struct node { ch...

 
5:03 AM
Finally was able to answer a question:
1
A: Lexical Analyzer: Is this the right way?

syb0rgThings you could improve: Variables/Initialization: You shouldn't use global variables. *front = NULL, *rear = NULL; The problem with global variables is that since every function has access to these, it becomes increasingly hard to figure out which functions actually read and write these...

 
You should also mention void main(). I can delete my comment after that.
 
0
Q: Magic 8 ball game

srikanthI'm trying to implement magic 8 ball game which produces random answers with out any GUI. Here is the code . Since i'm a newbie to a vb.net i might have not written the program up to the coding standards. Module Module1 Private recognizer As SpeechRecognizer Sub Main() While (Tr...

 
@Jamal Was already in my revision, I had to push something out so 200 wouldn't get all of the votes ;)
Still working on revising a few things, such as his arrow code
 
Darn. I could've pointed out many of those things as well. Eh, I have to work on homework anyway.
Yeah, the arrow code...
 
5:22 AM
looks like i was late to the tokenizer party :)
i wish i could come up with a better explanation of my answer. it's hard to word "your approach is completely wrong" in an articulate way sometimes :/
 
That's why I'm so reluctant to review his one method he's requesting be reviewed.
 
yeah
he's looking for an in depth answer, and the only real answer is "start over"
DFAs are not meant to be created by hand
especially not as a bunch of nested if statements
 
I'm trying to come up with a combination of a for loop and a switch, but I can't compile to test if it works.
 
ideone :)
 
Well, now I'm wondering if this code even works...
 
5:31 AM
Yours or his?
 
His... he must have a very relaxed compiler.
 
ah
 
Yep!
 
he's using MSVC from the use of conio.h
 
(I know Loki will "flip" when he sees this code)
 
5:33 AM
which means it's likely very badly validated C
especially if it's an older version of MSVC
 
5:51 AM
Wow. Someone actually gave a review on a Loki Astari question. It has some really awesome points:
2
A: Stream that opens an HTTP GET and then acts like a normal C++ istream

Jerry CoffinI have a few comments that are unrelated to the synchronous/asynchronous and/or header-only nature of the code. parameters bools I don't like passing bools as parameters. I really dislike a function like your SimpleSocketStreamBuffer constructor that take multiple bools. You need to do a fair ...

 
He really should stick around more often, especially in case I leave some questionable answers of my own. I also suppose we shouldn't bother to have him answer Loki's other new question.
And it's kinda strange seeing Loki's code hit hard like that. I'm certainly not used to that.
 
Yeah, it's definitely a bit odd haha
Gives me hope though. Even Loki, god of C++, writes fallible code :)
 
Yet, I still trust his advice, even for the more basic stuff. I credit much of my C++ understanding to him.
 
Updated my answer, and found that the OP is most likely compiling his C code as C++ code.
 
Great...
 
6:02 AM
I let him have it for that... :P
 
And I'm guessing it's his instructor who is okay with void main(). I actually had one like that myself.
 
Whenever malloc() is cast, it is a sure sign that you are compiling C code as C++ code.
I really want to talk to this professor. I feel as if they have no clue what they are doing.
They must be self-taught, and then never gone onto the internet and used Google when they had an error or warning.
I am interested, how much of this was taught to you by your instructor? Specifically, did your instructor teach you to use void main(), compile C code as C++ code, etc.? — syb0rg 13 secs ago
@Corbin I may have recruited him :P
 
@syb0rg :D
it's amazing how many professors are horrible at software development. (Well, really it's not surprising. CS is by no means software development. but still. it's a pretty integral tool.)
 
I wonder if I can recruit someone for the C# bounty question.
 
I'll go warn Jon Skeet and Eric Lippert. :P
 
6:15 AM
They aren't on the chat right now.
Few people are actually.
 
0
Q: kindof() - inheritance made easy, my own make inheritance tool

exebookhttps://github.com/exebook/kindof I created this simple inheritance tool for JavaScript, could any one with deep knowledge in JavaScript prototyped inheritance review it?

 
6:54 AM
@syb0rg: Beat me to the rollback. :-)
 
Hey @JerryCoffin
 
Hey! Thanks for reviewing that code today.
 
@syb0rg It can be a sign of ancient code (or an ancient coder). Before ANSI invented void *, malloc return a char *, and assigning to anything but a char * required a cast.
@syb0rg Hello.
@Jamal Sure. Given how much of other people's code he reviews, Loki certainly deserves at least one answer when he asks a question.
 
@JerryCoffin Hmm, interesting. But my assumption should be correct, right?
Compiling C as C++?
 
Agreed. Next to you, he's one of our best C++ reviewers. I have the second-highest tag score, but it doesn't say much about my knowledge.
 
6:57 AM
Hey @user2745681
 
Hey :)
 
@syb0rg Mostly, yes. Like I said, only the ancients even remember C before void * was added (and most of us who remember it still haven't written code that way in decades).
 
@user2745681 First of all, you are going to have to "re-base" your code. You need to compile C code as C code.
 
Yes, I change the file type to .CPP to .C and compile it in DevC++..
*from
 
@syb0rg There was, for a while, kind of a push for writing (most) C so it would also compile as C++. While I can see why it was advocated, I (for one) never really thought it was a good idea. You largely end up with the worst of both worlds.
 
7:01 AM
@user2745681 What were the problems you were having?
@JerryCoffin 274K on SE? That's quite some rep.
 
@syb0rg I'll take your word for it. About the only time I notice my rep is if the number on some site happens to be a palindrome or something like that.
 
lol
 
I spent years on Usenet answering questions, so this whole "reputation" idea's still kind of new/foreign to me. Has been somewhat effective at times though--I worked pretty hard at answering a lot of questions on SO to get the Legendary badge.
 
I kinda gave up on SO after a while, too harsh. I moved on to the beta sites.
First it was Raspberry Pi, and now it is Code Review.
And I dabble a bit in Code Golf.
 
Same here for SO. I've asked and answered a few questions there, but now I mostly help with flagging and editing.
 
7:11 AM
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\Users\Ben\Desktop\LEX.c" -o "C:\Users\Ben\Desktop\LEX.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Users\Ben\Desktop\LEX.c: In function `isEmpty':
C:\Users\Ben\Desktop\LEX.c:15: error: wrong type argument to unary exclamation mark

C:\Users\Ben\Desktop\LEX.c: In function `enqueue':
C:\Users\Ben\Desktop\LEX.c:29: error: wrong type argument to unary exclamation mark
C:\Users\Ben\Desktop\LEX.c:30: error: incompatible types in assignment
 
@user2745681 If you switched to using typedef, you have to compare all of the structure members to NULL.
2
Q: How to check if structs are initialised or not

nubelatypedef struct dict_pair { void *key; void *value; struct dict_pair *head; struct dict_pair *tail; } dict; dict* NewDictionary(void) { dict *dictionary = malloc(sizeof(dict_pair)); dictionary->head = null; dictionary->tail = null; } int main(void) { dict *dictionary = NewDiction...

 
@user2745681 Right now your code won't (dependably) compile as C, but doesn't take advantage of being C++ either. Do you have to write it as C, or is C++ allowed? If C is required, you almost certainly want to use a C compiler so you don't accidentally write code that's allowable in C++, but not in C.
 
7:27 AM
All right, I think I'm done for tonight.
See y'all!
@JerryCoffin I'm hoping to see you as a regular here, it was good talking to you. :)
 
Later!
 
@syb0rg I'll try to drop by at least semi-regularly. G'night.
 
Thanks @syb0rg
 
7:56 AM
0
Q: Python implementation of prime modular square root

PhongI did an implementation of the Tonelli-Shanks algorithm as defined on wikipedia. I put it here for review and sharing purpose. Legendre Symbol implementation (http://en.wikipedia.org/wiki/Legendre_symbol): def legendre_symbol(a, p): """ Legendre symbol Define if a is a quadratic res...

 
Morning!
 
8:20 AM
0
Q: PHP OOP UserAuthenticator Class

NyxI've been a PHP procedural programmer for several years but I'm trying to learn OOP and I'm getting a bit confused with some patterns and principles. I would appreciate if you guys could give me some tips and advices. interface LoginAuthenticator { public function authenticate(UserMapper $us...

 
 
2 hours later…
9:58 AM
@Jamal You missed a spot
1
Q: PHP OOP UserAuthenticator Class

NyxI've been a PHP procedural programmer for several years but I'm trying to learn OOP and I'm getting a bit confused with some patterns and principles. I would appreciate it if you could give me some tips and advice. interface LoginAuthenticator { public function authenticate(UserMapper $userM...

The title ^^
Doesn't have to say PHP, does it?
 
No it doesn't. Still good to remove it.
 
 
2 hours later…
12:16 PM
0
Q: How can I make this program loop?

user3370628import javax.swing.JOptionPane; import java.util.Random; public class JackAndPoy { public static void main(String[] args) { String computerSide, userSide; JOptionPane.showMessageDialog(null, " Play the Game \"Rock, Paper, Scissors?\""); compu...

 
12:29 PM
@StackExchange Could be a great Code Review question, but that's not what he's asking about.
 
12:40 PM
What is the point of commenting on SE?
or is there no functional point ;)
 
0
Q: Bezier-Curves C++

NaClI made a function which creates bezier-curves of grade n. What do you think? float interpolate(float n1, float n2, float prec) { return n1 + ((n2-n1) * prec); } std::vector<Vector2f> make_bezier(const std::vector<Vector2f>& anchors, double accuracy=10000.0) { if(anchors.size()<=2) ...

 
Hello. :)
 
12:58 PM
0
Q: Two methods for finding a sprite in sprite sheet C++, which is better?

SeanI have two snippets of code that I would like you to look at. I can't figure out which of the two is most efficient (or better practice, if applicable). I'm currently finding the row and column of a sprite in a sprite sheet in order to render it to the screen; which works find and dandy. However,...

 
1:16 PM
-1
Q: How to make a survey web project in java

user2999726I want to make a survey web project in java,but ı don't know where ı will start because I haven't made any project in web application.Could you help me? and give me any suggestion.

 
Hey @kleinfreund
 
Heya @Simon
 
@skiwi We just like making fun of @StackExchange bots around here
How's it going?
 
It's alright. And you?
Doing some jQuery stuff on my tumblog. Nothing too fancy. :p
It's Sunday after all.
Listening to a real chilly Mix which has some decent Jazz in the end.
I wonder if Germans/not native English speaking people know what NSFW means..
 
1:39 PM
Well I'm quite alright.
Once they here it they probably realize what it means. It took me a while to realize it's Not Safe For Work
 
Well, they'll get the idea after clicking that link anyway. :p
 
2:22 PM
0
Q: Sending n requests in one time

David SilvaI need to test my new functionality (thread safe in my B2B system) by sending about 100 requests in one time. public class B2B_Test { // ... @Test public void test() throws Exception { Runnable[] runners = new Runnable[size]; Thread[] threads = new Thread[size]; ...

 
2:41 PM
@user2745681 Were you able to get it working?
 
3:02 PM
Ah okay @SimonAndréForsberg about SE bot
 
I just answered a Java question on SO, and was reminded why I stopped doing that..
 
:o what happened?
 
It's just that there are always 5 answers
even if answers 3, 4, and 5 are identical to answer 2.
 
0
Q: Python - How to optimize code

Mohammad Areeb SiddiquiI have this python program for calculating lebniz of 'pi'. I am not able to shorten it more. Can anyone here optimise/shorten it? s,a,b=0,[],[] for i in range(int(input())):a.append(input()) for x in a: for j in range(int(x)):s+=pow(-1,int(j))/((2*int(j))+1) b.append(s) s=0 for i in ...

 
And the real answer is actually "Why are you keeping all of this in memory at all? You should be using a database..."
 
3:12 PM
I usually don't even bother to answer such question
for now I"m focusing on questions where Java 8 is involved, or giving alternative answers since Java 8 will become relevant very soon
 
Yeah... I guess I'll go back to not answering Java questions.
 
I don't know if your xpesire is what java though
expertise*
 
No, it's not at all.
 
then I can agree as you'd need to put in quite some effort
 
Well, I have the bronze Java badge on SO. I know enough Java to answer some questions. It's just... the Java crowd on SO, I find a bit annoying.
 
3:18 PM
How you got the badge and I don't :(
 
lol. I answer a lot of questions.
 
I wonder if I can see how close I am to the badge
 
3:30 PM
0
Q: What do yout think about my pascal triangle program in python?

user3369335def printTrg(rows): r1 = [1] r2 = [1, 1] trg = [r1, r2] r = [] if rows == 1: r1[0] = str(r1[0]) print(' '.join(r1)) elif rows == 2: for o in trg: for a in range(len(o)): o[a] = str(o[a]) print((' ')*(2-(a+1)),...

 
@skiwi 21-more upvotes on answers on Java-tagged questions gets you the badge
 
104 more Java answers and 542 more up-votes on my Java answers will get me the golden badge.
 
3:58 PM
ciao all
 
Hello @rolfl, @geomo, @skiwi, @nhgrif
 
Hello @all
 
@SimonAndréForsberg can i ask you one thing ?
 

« first day (302 days earlier)      last day (3723 days later) »