« first day (284 days earlier)      last day (3747 days later) » 
00:00 - 23:0023:00 - 00:00

12:00 AM
@Jamal You can edit the boilerplate close-reason text, can't you? Maybe adding a hyperlink to codereview.stackexchange.com/help/on-topic would be helpful and absolve me from feeling I ought to post that link manually as a comment.
 
I may have to go to StackOverflow with this bug, it's getting annoying.
 
I can, but such changes require the approval of two moderators. If you feel this is a worthwhile change, you can propose it on Meta.
 
@Jamal Agree with the clear() comment. Generally for things like containers you'd still use raw pointers, however.
 
@Yuushi: Oh, right. I wasn't quite sure about that one. I can go ahead and edit it out or change something.
Should I just leave that as a general note, but mention that raw pointers are okay for containers?
 
Is there some reason I am not seeing that the Shortest path algorithm is too slow question should be closed?
 
12:09 AM
@Jamal Sure, leaving it as a note seems reasonable
 
Hmm, hopefully my post will not be ridiculed.
 
It's currently marked as 'not working', but why? I have not seen anything....
 
Alright.
 
hrm, where did you read about returning an int from size()?
 
I would post a link to the question here, but I don't want to give away my code quite yet :P
12 views, no votes...
 
12:16 AM
@Yuushi: I've also made some additional notes. Looks okay?
0
A: Optimising LinkedList class - Part 2

JamalSize Normally I'd say right away that size should return an std::size_t instead of an int, but some recent collaborations amongst top C++ experts (including Bjarne Stroustrup himself) have revealed that this can be problematic due to signed/unsigned mismatch. In your implementation at least, yo...

 
Phew, 1 upvote. That means that my question isn't too horrible.
2
 
@Jamal Checking for self-assignment in the move assignment operator is a bit of a hairier question than for a simple copy assignment operator
If you want to read a (really) long post about it: stackoverflow.com/questions/9322174/…
but yeah, I think your post looks good
 
@rolfl It looks like JV needs to get out a bit more based on his recent messages to you in chat.
 
flagged
 
@Yuushi: Interesting. If it's still not widely-accepted, then I can at least post that link and also mention that my code should be considered carefully.
 
12:25 AM
@syb0rg he stepped over a line in the bakery, and I flagged him... see what happens.
@Jamal - as a mod, can you see the history behind chat messages in all chat rooms?
 
@rolfl: I believe so. Diamonds are considered mods on all chat rooms, even private ones on other sites.
 
K, just checking, nice to know that
 
If Howard Hinnant says so, I'm happy to just go with what he says on the matter
 
That is some good info to know. I'm still quite new to C++11, especially move semantics, so I should've been more cautious.
 
12:32 AM
This is generally something you only have to think about when designing low-level stuff like containers though
this is another reason why smart pointers make life much easier
using smart pointers means you can just do Class& operator=(Class&& rhs) = default
and it'll all work itself out
 
Nice.
 
1:01 AM
@syb0rg - it appears to be safe to return to the bakery
 
@rolfl For now.
 
0
Q: Long constructors, inheritance, class method constructors

OxinaboxMy class uses takes functions as a parameter. 6 of them. And numerous other parameters. Almost all of the fields have default values. It also has a class method that, to create a instance of the class with 2 of the fields initialised randomly. It has a subclass that cheats a bit making 2 of the...

 
1:53 AM
I'm looking at some freelancing jobs right now, and some of them look like they are paying a lot for some really simple stuff.
 
2:11 AM
0
Q: Fibonacci series, topdown and bottom up approaches, stairway climbing

JavaDeveloperI have solved fibonacci series and then used the topdown and bottom up approaches to solve it. Also I have included the stairway climbing question as follows "You are climbing a stair case. Each time you can either make 1 step or 2 steps. The staircase has numStairs steps. Returns In how many di...

 
2:46 AM
@rolfl not posted:
Hi JavaDeveloper, I find it's very cool that you seem to put every single line of code you write on this site for review. But as you do so you're collecting votes, and votes turn into reputation score, which turns into priviledges. If you like this site, please spend some of those 40 votes you get to spend every day, it's the site's economy, and it's how the site's health is ultimately measured.
Code Review is a beta site, we'd like to see it graduate. Thank you for your numerous contributions, please check this out: meta.codereview.stackexchange.com/questions/1041
Should I?
 
where would you put that ?
with an @ in chat ?
 
@lol.upvote I would include an invite to chat. He seems like a pretty active user besides the upvoting.
 
I dont know, I really upvote the interesting JS questions , which is like 1 out of 3
and every now and then I review the users on chat, if they have 4 vote questions, I will make it 5 votes, it's a bit of drag to me really
@rolfl if you wonder where those 3 nice answer badges come from, now you know ;)
 
@syb0rg 6 months, 1.2K rep, 79 questions, 50 votes (1 question!). 0 answers, 0 edits suggested, 0 reviews, 0 meta activity. Active?
 
@lol.upvote His activity recently has spiked. I've noticed more questions from him recently.
 
2:55 AM
also, on a related note, our first page looks horrible, so many unanswered questions!! What is going on ? Are we getting too popular?
 
we need the new users to get reviewin' too, otherwise we won't be able to keep up. this could well be our next big challenge.
(unless we all turn into bunnies, of course!)
(or monkeys)
 
It doesn't help that 1/3 of the questions are closed or migrated.
 
@syb0rg true..
 
1/3? really?
 
@lol.upvote 1/3 actually.
5/15 on the front page are closed or migrated.
 
2:58 AM
ah, that's where you get your metric from!
I have 45+ Q's on my front page
 
Yeah, I was thinking the same, chatting from an iPad?
 
I see 7 on-hold or migrated
 
Nah, I just have the number of questions displayed per page set really low for some reason.
 
15% with a higher Q's/page :)
 
13/50
26%
@lol.upvote How are you only getting 15%?
 
3:02 AM
last on-hold I'm seeing:
1
Q: What is the difference in these implementations?

Josh BuedelWhile porting some C# to F# I wrote this code: let permutations = permutators |> Seq.map (fun p -> p.FindCandidatesViaRefactoringPermutations(new TargetInfo( pattern, method1), extraction)) |> Seq.concat |> Seq.filter (fun (p:CloneDesc) ->

 
Are there Java guru's here?
 
One's asleep and the other is ...uh, eating bananas
 
I have not done Java since 1.4, but still, if(condition)doSomething should have a linebreak between ) and doSomething right ?
otherwise it's just terrible code
to me at least
 
Yes. Debatable on the terrible code though.
Depends on the programmer really.
It also can depend on the language.
In C, it is more accepted. In Java, it's a no-no.
 
I have to watch myself to avoid doing if(condition) return; in C#
and do
if (contition)
{
    return;
}
instead...
 
3:06 AM
eh, curlies are overrated in any language when I write for money
 
So, Stack Overflow was of no help with my bug... they just called me crazy and told me my code worked.
 
but I cant stands a missing newline
 
so
if (condition)
    return;
is ok?
 
I find that less acceptable than the first case: if(condition) return;
 
or is
if (condition)
    { return; }
better?
 
3:11 AM
really?
 
Only 48 more C++ points until the silver badge. :-)
 
if (condition)
  return;
All the way ;)
plus indentation of course
 
@lol.upvote Not for my sake.... let him find his way.
 
@SimonAndréForsberg just played [#AI_Third], I thought I was losing but then the AI failed to see that it had an opportunity to block my winning move, so I won. Was that the hardest?
(no rush ^^)
 
@konijn ... thanks for the +1's .... just FYI, nice answer @score 10-upvotes ;-)
 
3:20 AM
oh
hmmmm
 
But you have been scoring mega +1's from me recently .... but have a ways to go on the recent answers to score nice.... but you should be raking in the revivals!
 
I have been, king of revival I am
2
 
Revival 'only' needs +2 ;-)
 
Yeah, it's pretty easy
 
Well, not really, because the unanswered ones are normally the hard ones....
 
3:24 AM
@konijn: You do know that's a Java---Script--- question, right? ;-)
 
:P
 
Darn, it didn't work.
 
you deserve it for the hard work of digging them up.
And thanks for answering a JDQ. you got my +1
 
There really should be a Gravedigger badge for this.
5
 
my new strategy is to Jamal them, especially the node and angular ones, so that they appear again on the front page
3
 
3:25 AM
lol
 
afk
 
ASIP ... (auto-star in progress).
OK, I'm off like a prom dress.... sweet dreams, all.
 
Boo-yah, take that Stack Overflow! I never needed your help anyways!
 
A hashtag tag? Internet explodes
3
I just came back to this window and saw at least three new stars...
 
3:41 AM
 
Aww, my killed bug revived an older bug... :(
 
Apparently still up ... @syb0rg - did you remove your SO question?
 
@rolfl I did. All the comments were telling me that there was nothing wrong with my code, even though their was.
Why?
 
I thought I would look up how you explained the bug .... I presume you fixed it ?
What was it?
 
@syb0rg debugging is often like playing whack-a-mole: you whack one, another pops up!
3
 
3:50 AM
@rolfl I did. I'll show you some of my logic code to explain:
for (int count = 0; count < ROWS*COLS && !winner; count++)
	{
		int player = (count % 2) + 1;
		printBoard(board);
		printf("current xBound: %d, current yBound: %d\n", xBound, yBound);
		printf("Player %d, enter the coordinates (x, y) to place %c: ", player, (player==1) ? 'X' : 'O');

		do
		{
			scanf("%d, %d", &x, &y);
			printf("Character at position: %c", board[x][y]);
			x = abs(x);
			y = abs(y);
			if (board[x][y] != '-')
			{
				printf("There is already an %c there.  Re-enter: ", board[x][y]);
There used to be an if condition after the '-' checking one to check if a move was "in bounds".
And for some reason, I could not get the continue to work.
So I extracted the bounds logic to it's own method:
int isInvalidMove(int x, int y, int xBound, int yBound)
{
	return (((x >= xBound * 3 + 3 || x < xBound * 3) && (y >= yBound * 3 + 3 || y < yBound * 3)) && (xBound > 0 && yBound > 0));
}
And put that as a test condition of the do-while loop.
 
I recall .... and putting it in a method 'fixed' it?
That makes no sense... to me that is not fixing a bug, but putting lipstick on a pig.
 
Well, now I can't get the first test condition with a continue in it to work.
So I can overwrite the previous move.
@rolfl I'm not sure if you can answer this, but how would you have fixed it?
 
You have only fixed a bug if you can explain why it broke.... you have not adaquately explained why it went wrong, so you can't have fixed it ... right?
all you have done is swept it under a rug, and hopefully you won't trip over it later... ;-)
 
@rolfl I'm not fully sure why it broke myself. Even with debugging, it wasn't making sense.
 
and now you have anoter problem that does not make sense ... right?
It's probably just a different symptom of the same problem you had before.
 
3:58 AM
I'm pretty sure they are the same problem too.
I just have no clue on how to remedy it.
It is an issue with the continue, I think.
My debugging shows that it is going into the if test condition, but for some reason is skipping over the continue. Odd.
 
If you think that, then why not remove the continue, and turn the first if(){} if(){} in to a if() {} else if () {}
 
@rolfl I think I figured it out. The code continues properly, goes to the while condition to test if it should loop, and results in it exiting the loop.
It's the nature of the do-while loop.
 
also, you should not be using the x/y values until they have been verified 'in-bounds'... the if (board[x][y] != '-') condition is broken if x/y are illegal
@syb0rg let me be your rubber duck!
2
you need to add the board[x][y] != '-' condition to the while as well....
 
@rolfl But then it get's harder to print messages to direct the user as to what they should do.
 
give me a sec....
got an idea.
Try this for size
		do
		{
			ok = 0;
			scanf("%d, %d", &x, &y);
			x = abs(x);
			y = abs(y);

			if (x > ROWS - 1 || y > COLS - 1)
			{
				printf("Grid (%d,%d) is out of big-grid bounds...  Re-enter: ", x, y);
			}
			else if (board[x][y] != '-')
			{
				printf("There is already an %c at (%d,%d).  Re-enter: ", board[x][y], x, y);
			}
			else if (((x >= xBound * 3 + 3 || x < xBound * 3) && (y >= yBound * 3 + 3 || y < yBound * 3)) && (xBound > 0 && yBound > 0))
			{
				printf("Your move (%d,%d) was out of mini-grid bounds.  Re-enter: ", x, y);
 
4:19 AM
@rolfl Great minds think alike, I already implemented that while you were thinking ;)
	for (int count = 0; count < ROWS*COLS && !winner; count++)
	{
		int player = (count % 2) + 1;
		printBoard(board);
		printf("current xBound: %d, current yBound: %d\n", xBound, yBound);
		printf("Player %d, enter the coordinates (x, y) to place %c: ", player, (player==1) ? 'X' : 'O');

		do
		{
			scanf("%d, %d", &x, &y);
			printf("Character at position: %c\n", board[x][y]);
			x = abs(x);
			y = abs(y);
			if (((x >= xBound * 3 + 3 || x < xBound * 3) && (y >= yBound * 3 + 3 || y < yBound * 3)) && (xBound > 0 && yBound > 0))
 
good, but you should still be validating x and y before referencing them in printf("Character at position: %c\n", board[x][y]); ... what if someone enters x=1000000
 
Implemented, and got rid of that pesky function call in two places.
Thanks for the mini-review session.
 
np. bed
 
Oh, crap. I have a math test tomorrow.
 
Calc 3?
 
4:26 AM
Discrete math II.
 
Sounds fun ;)
Good luck, I'm off.
 
Bye!
 
4:42 AM
what are you learning at the moment in DMII?
 
We've just finished with the pigeonhole principle. Probability is after that.
 
Finished with basic combinatorics then?
 
Yes. I've actually taken this class once before, but I failed it badly. That professor wasn't too good.
 
ah that's a shame. I think discrete is actually quite enjoyable :(
 
Some of this math is just too ambiguous for me. I keep questioning if I'll really make it as a CS major.
 
4:56 AM
I had the opposite problem: after trying CS1, I really didn't enjoy it or any of the lecturers. So I did nothing but math :)
 
I prefer the programming aspect most of all, but sadly neither of my classes are of that type this semester.
 
oh well, all I can say is stick with it, and ask questions if you get stuck :)
 
@jamal !!! Bed !!!
 
Test tomorrow!
 
5:15 AM
ok I need to go so that I have some stars to give out tomorrow....lol
goodnight all
 
Night!
 
0
Q: Java: Client Sends XML, Server Parses XML, Queues Up and Executes Commands

DigitalEyeI recently had a Java interview where I was asked to write a client-server application. I don't code primarily in Java, but with my preliminary Java knowledge, I thought I built a reasonable working solution. After evaluating my solution, I was told that I wasn't going to be interviewed further. ...

 
5:40 AM
0
Q: Review My C Factorial Code

user3237895It took me a while to figure out how to write this code, but I'm glad to say that I did eventually figure it out. Can someone tell me what they think about it. Is it well written? What could have been done better? Note that I am going through excercises in a book; I know there's a math.h that pr...

 
5:52 AM
0
Q: Print routes on the stairway when only 1 or 2 steps are possible

JavaDeveloperGiven a staircase with N steps, you can go up with 1 or 2 steps each time. Output all possible way you go from bottom to top. Looking for code review, best practices, optmizations etc. Complexity: O(2^n) public final class StairRoutes { private StairRoutes() {} /** ...

 
6:37 AM
Hey, Corbin.
 
hello
 
I'd be offline now, but I have a math test tomorrow. :-/ I'm also surprised my answer for the factorial post hasn't received an upvote yet.
 
 
2 hours later…
8:19 AM
0
Q: Exposing WCF Service with dynamic search operation

user1552869I have this WCF service providing search functionality - to be used by our client in his web application. There can be any number of search parameters and possible nesting of AND/OR operations. Could you please have a look and share some ideas on if I can make it more client-friendly? <con:Se...

 
 
1 hour later…
9:26 AM
0
Q: Sleeping in Delphi

user3058029I am programming a rotator using Delphi, with two different angles: azimuth and elevation. Up to now I am testing, so I tried to move the rotator 1 by 1 degree in azimuth and elevation. The rotator starts in (0,0) and finishes in (30,30). Another important thing is that I need to pause or sleep ...

 
9:44 AM
0
Q: Making a minishell in C. How to improve error control with feoh and ferror?

Trouble-llingI've written this minishell but I'm not sure I'm making a correct control of the errors. Could you give me some advice? #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #define LINE_LEN 50 #define MAX_PARTS 50 int main () { char* token; char str[LINE_LEN]; c...

0
Q: Optimize YUV channel splitting function

iKrizCurrently this method is needs optimization if anyone is willing to help please do :) The input pointer *data contains the data that needs to be split into different arrays and put in yuvInput each pixel is 32 bytes 4 * 8 note the (j*4) to break it up per pixel segment the 4th byte is the alpha c...

 
9:56 AM
0
Q: Continuously receive messages async from Azure Service Bus Queues

sitereactorI'd like to get input on my approach of continuously receiving messages from an Azure Service Bus queue using the async part of the library. My main concern being whether its "safe" to use Task.Factory.StartNew to process the incoming messages and then continue to call the Action's to continue re...

 
10:36 AM
0
Q: Jquery function bug - wordpress search button doesnt work

andersonIDI'm not a coder and I'm just trying to learn some basics. I have a wordpress site with a search form but the button to click and get result, is not working. I had some problems with other plugins, so I'm using jquery 1.6.0 thats every other things works fine. www.briquesi.com.br/fatornobre Her...

 
10:55 AM
0
Q: Creating a Deprecated/Obsolete behavior for methods in a JavaScript library

Stephen JamesA friend of mine has a popular open source JavaScript library which is quite well used in the community. He is now going through a process of refactoring and applying best practices and conventions and is wanting to upper case all constructor functions. So in the past where he may have defined ...

 
11:20 AM
@rolfl Yeah, well... as I said... it's never to late to edit. Or you can post another answer if you would like. :)
 
Can't ... Post ... an .... answer.... CR is 'hanging'.
 
11:35 AM
@lol.upvote That is exactly one of the AI bugs I need to sort out. Thanks for posting the history link (I knew it would come in handy)
@rolfl hanging? That can't be good...
room topic changed to The 2nd Monitor: General discussion about Code Review. [addicted-to-cr] [just-saying-hi] [monkey-business] [my-code-is-compiling]
 
0
Q: Please Review this code of annotation parsing

user2907171Here is i have implemented code for parsing annotation /** * @Route(path="sample \n test",code,value,boolean,test) * @access(code=false) * @sample as asdad asd * asd */ function sample() { } $refelection = new ReflectionFunction("sample"); $pattern = "/@(\w+?)(.*?)/U"; preg_match_all($p...

 
11:59 AM
@SimonAndréForsberg about time!
 
12:19 PM
0
Q: Trying to understand a Joomla plugin

user204415I found a cool Joomla plugin to rate article. So I bought it. But the plugin is not working well. I found 2 problems: -When I my vote is more than 5, it display this message: Article Rating: Invalid Rating: 10 You already rated this Article today! -When I give the first vote to an art...

 
Haha, this is a lovely user
Thanks sir, I've changed the topic's title — user204415 1 min ago
New title:
0
Q: Off Topic: Trying to understand a Joomla plugin

user204415I found a cool Joomla plugin to rate article. So I bought it. But the plugin is not working well. I found 2 problems: -When I my vote is more than 5, it display this message: Article Rating: Invalid Rating: 10 You already rated this Article today! -When I give the first vote to an art...

This question appears to be off-topic because it is about other-peoples non-working trying-to-understand code that's not included within the question itself. — Simon André Forsberg 3 mins ago
Could it be any more off-topic?
 
Well, that's entertaining.
 
12:51 PM
I'm back. You have been warned.
4
 
Warning appreciated, @Donald.McLean.
 
Why would you ask an off-topic question and put the words "off topic" in the title? That's just asking for a smackdown.
 
Off-topic was added to the title (by the asker) only after the fact was pointed out to the asker.
 
1:19 PM
Completely random information: The currency in the Philippines is in short form labeled PHP
 
0
Q: Review implementation of Stack in C: push,pop then push to another stacker

jamesI have a "Truck" and a "Stacker" both using stack. The user is able to allocate the size of the truck(i have used malloc) and the stacker size with be a fixed size of 5. I am able to push values to the Truck, but how do I pop the top of the truck and push it into the Stacker? P.S Need some help t...

 
Hello everyone. :)
@Simon Hey. I've read your messages. I come back to you later.
 
Answered a question, and had a +1 in less than 20 seconds ... huh.
 
It appeared right into my face.. gave it a quick read.. upvoted.
 
Well, that's convenient ;-)
 
1:31 PM
Hi, @kleinfreund
 
Good morning CR
 
Good afternoon, rabbit!
 
Hey @konijn
 
0
Q: How can I refactor my code, so it's cleaner and more succinct?

AmirI've written this as part of my contact form on my website. It checks to see if required inputs are empty, if so adds a red warning color and text. It also checks the email field for a properly formatted email. This code works 100%, but somehow I feel like I'm repeating myself and I am not sure...

 
1:55 PM
Just checked a random StackOverflow newest questions page. 50% of the questions are off-topic.
No wonder their close queue is growing...
 
2:29 PM
Hi everyone!
 
Hey @Marc-Andre
 
Max rep reached
9.39 AM..
 
Good job.
 
that was early...
 
2:48 PM
upvoted Herr Kleinfreund a bit
 
Do you have some suggestions of music that I could listen at work ?
 
Celine Dion?
 
No please
 
Die Antwoord?
..... enter the ninja!
 
My girlfriend sing it sometimes ... and oh god
 
2:50 PM
@konijn Thank you^^
 
Not like celine, is it .... ?
 
monkey, stop.
 
@rolfl Oh not at all!
 
@Marc-Andre - this is what happens when you ask for recommendations for music ;-)
 
@Marc-Andre Do you get distracted by regular music that catches your attention, etc.?
 
2:51 PM
0
Q: Inset Text Shadow Review

user1668270HTML <body> <!-- Introduction to the text shadow property --> <div class="container one"> <h1>The Dark Knight</h1> </div> <!-- Show the inset shadow 'hack' --> <div class="container two"> <h1>The Dark Knight Rises</h1> </div> </body> CSS body{ ...

 
As an ex south african ..... I hjave to say that Die Antwoord is a little 'weird'.
But it's like a train wreck... I have to watch/listen
 
@kleinfreund Not really, I'm mostly using music as a background, to cancel other noise
 
Here.... this is safe for work, if the sound is on headphones .... ;-)
 
If I need to focus on something, I sadly have to turn regular music off. Only some ambient-like stuff is possible then.
 
@rolfl I don't know what to say.... it's humm special ...
 
2:54 PM
Catchy tune though....
 
Yeah I don't know quite why but I can't stop it.
@kleinfreund Totally understand. My problem is there is so much noise around me that it's sometimes hard to concentrate even with ambient music. And we don't have access to online radio.
 
Okay, that's understandable as well.
 
Hah, I love that chat has jquery support, just do $("img").remove() in the console and the chat is SFW again
on an unrelated note, from Stinking Badges : Some sites do not yet qualify for generalist, there must be at least 40 tags with 200 questions. This site has 28 total tags with 200 questions.
We need 12 more tags folks
 
CSS has 187. It'll enter soon then.
 
@konijn I have a query for that ..... somewhere.
 
c#, really...
 
3:16 PM
60 rep and four badges this morning. Thanks, Santa! Oh, and "edit queue" complete.
 
@Jamal yeah, lots of vote in a few hours too, not sure what's going on :)
 
Thanks @QuentinPradet
 
I wonder if JD has been catching up still?
 
0
Q: Counting words / lines in Ruby - more compact / idiomatic way?

Sebastian N.I solved this problem in Ruby: Write an utility that takes 3 command-line parameters P1, P2 and P3. P3 is OPTIONAL (see below) P1 is always a file path/name. P2 can take the values: “lines” “words” “find” Only P2 is “find”, then P3 is relevant/needed, otherwise it is n...

 
Hello @Quentin
 
3:23 PM
Hey
@konijn great job with those JS questions, looks like I upvoted the last missing 2012 one :)
 
@QuentinPradet - good zombie kill .... [badge:revival].
 
and /me is now a trusted user. :)
 
hehe.... congrats, yes....
 
Congrats!
 
thanks
 
3:33 PM
I have no clue what the author wants to have reviewed there.
1
Q: Inset Text Shadow Review

user1668270HTML <body> <!-- Introduction to the text shadow property --> <div class="container one"> <h1>The Dark Knight</h1> </div> <!-- Show the inset shadow 'hack' --> <div class="container two"> <h1>The Dark Knight Rises</h1> </div> </body> CSS body{ ...

 
2502 total edits so far. O_O
 
3:48 PM
;]
@QuentinPradet
 
4:38 PM
Did I miss something? Has 2nd monitor died?
 
I hope not!
 
K... just checking.
 
5:12 PM
Hm... there was no test today. It's on Friday. Yay!
On a separate now, I'm thinking that and should be merged. What are your thoughts?
 
gah .... booby-trapped lunch .... there was a chilli !!!
3
 
whistles
 
Guess it's time to check out the "Hot Questions" .... ;-)
Is it just me, or has the qualification for Hot Questions been lowered? Currently CR has:
4
Q: Checking input and email field

AmirI've written this as part of my contact form on my website. It checks to see if required inputs are empty, if so adds a red warning color and text. It also checks the email field for a properly formatted email. This code works 100%, but somehow I feel like I'm repeating myself and I am not sure...

 
There's also this:
5
Q: Print routes on the stairway when only 1 or 2 steps are possible

JavaDeveloper Given a staircase with N steps, you can go up with 1 or 2 steps each time. Output all possible ways you go from bottom to top. I'm looking for code review, best practices, optimizations etc. Complexity: O(2n) public final class StairRoutes { private StairRoutes() {} ...

Hm... regarding the network tag thing, I may just post on Meta.
Quite off-topic:
-1
Q: When I run this forms program in C# the result in the textbox is 0000000000. How do I fix?

Peteusing System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication6 { public partial class Form1 : Form ...

 
-1
Q: When I run this forms program in C# the result in the textbox is 0000000000. How do I fix?

Peteusing System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication6 { public partial class Form1 : Form ...

 
5:26 PM
@Jamal Agreed
 
0
Q: Is duplicate testing preferred over a call that would usually be moot?

B. Clay ShannonTo test incoming data for string values that are too large for the "database" (MS Access), I could do this: private void SaveToMSAccess(InventoryItem invItem, string dbContext) { invItem = TruncateVerboseStringMembers(invItem); . . . } private InventoryItem TruncateVerboseStringMember...

 
Huh.... our DNS servers have gone down... I can only go to places that are cached .... good thing I come here often, it's about the only thing I can do ;-)
 
Boss I'm sorry the only thing I'm able to do is to chat, not my fault! :D
3
 
Thing is, I can't even check my work mail.... ;-)
@syb0rg - feeling brave joining the bakery ... huh?
 
@rolfl Somewhat, yeah. If the discussion gets off-topic, then I will direct it back so that is is on-topic.
 
5:35 PM
I have tried that, and it seems to have succeeded.
 
0
Q: Should the networking tags be merged?

JamalWe have two networking-related tags: network-programming (27 questions, wiki) networking (5 questions, no wiki) Since any on-topic networking-related questions would relate to code itself (nothing otherwise on-topic on Network Engineering SE), I assume we only need one. Plus, one question al...

 
Thoughts?
0
A: Should the networking tags be merged?

syb0rgI would agree with the merging of the two tags, however, I would merge network-programming into networking. Why? This is Code Review. The "programming" part of the first tag is redundant, because you have to program in order to produce code. Just my two cents.

 
Valid point. I tend to look towards the larger tag, but that would not always be the best master tag.
 
5:54 PM
-1
Q: Reverse a 64bit integer in Java

Songtao ZExample: 00010111 -> 11101000 public long reverse(long x) { long r = 0; int i = 0; while (x > 0) { int bit = 0x0001 & x; r += bit << (63 - i); x >> 1; i++; } return r; } Can someone review my code and provide any comments or suggest a better ...

 
6:07 PM
Is it just me or this question, even if asked in a good way produce a lot of off-topic answer ? It seems more like a debate about the nature of javascript instead of reviewing the code ? codereview.stackexchange.com/questions/30701/…
 
It does seem to be getting some questionable answers, especially the last one. I would've also provided a better title had the OP actually mentioned what it does.
 
I have a question about this:
2
Q: Changing text with a click event: how to restore default state of text in jQuery if/else statement

DeBraidI have a click event that calls a function which makes some CSS changes (acts on Text in 3 unique text elements). The function (below) works, but is lacking a 'restore default' function (to return the text to its original state), AND is in dire need of refactoring. Q: How can the original st...

 
Possible invalidation?
 
nope. that's not what I was going to ask..^^
 
Darn. :-P
 
6:14 PM
It's jQuery which changes a CSS property. But the CSS on their isn't really reviewable. Is still appropriate then?
Probably yes.
 
Well IMHO, it is appropiate, even if there is no .css to review it could play a part in a review. Like you should use the property y instead of property x. something like that.
 
Was just asking out of curiosity how to deal with situations like these.
 
@rolfl: If you're going to ask why you were initially downvoted for the the 64bit question, it's because someone flagged your answer as offensive. I won't mention names, though.
 
6:33 PM
@Jamal Only diamond-mods see offensive flags?
 
@SimonAndréForsberg: Yes, along with spam.
 
1
Q: Script to checkout multiple repositories to a certain commit hash

aviI am writing a script which checkout a git repo to certain commit hash, do something and switch back to master. The purpose of this script is to take homework solutions of students from bitbucket. Note that all the repos are under same bitbucket account. There is a master bitbucket account which ...

0
Q: Incorrect output in Caesar Cipher

user3235786Hi I am trying to implement caesar cipher but I'm not getting the expected output. Kindly help me to identify what's wrong with the code P.S I'm a beginner to C Key: 3 Input: Hello Output: KNUUX Expected Output: KHOOR #include #include #include #include #include int mai...

 
@StackExchange C question is off-topic.
 
A bit strange that regular users don't get notified about spam flags. One would think that those would be easiest to identify and do something about.
 
@SimonAndréForsberg: These flags are also put at the top of the flag queue and are very serious. A mishandling of these flags can cause some damage.
 
6:39 PM
I guess it's because of the impact of spam/offensive flags. If I'm not wrong there is loss of reps if you're found "guilty"
 
So, if a question gets closed, do people loose rep on answers?
 
@Jamal Good point.
 
@konijn: No, the answers remain intact. Only deletion affects this, if:
1.) the answer has fewer than 3 upvotes
2.) the answer is younger than 6 months
Or any post in general. If more than 3 upvotes and older than 6 months, rep is retained, even upon deletion.
 
1 and 2, or 1 or 2 ?
and
 
1 and 2.
It could be a score of 3 instead of three upvotes by itself, but I'm not too certain. It should be mentioned somewhere on MSO.
 
7:12 PM
0
Q: Under cc by-sa 3.0, will SE give me the source code if I wanted to imitate the Code Review beta for in-house purposes?

Mark LaREZZAI was wondering, since the license aligns with being able to use the layout / design, as long as credit is given, if I would be able to see the source code of how to program the Question/Coding format. (Can you already do that?) I am not concerned with the "Voting" aspect of the site, but rather...

0
Q: Code Review: Printf array

user3100814I am trying to print the elements of an array into a table but I'm having trouble formatting the array elements itself. See code below, perhaps there is a better solution than what I'm currently using? import java.util.Scanner; public class RainFall{ public static void main(String args[]) { ...

 
@Jamal ^^^ Stack Overflow is migrating crap to us ("Code Review: Printf array").
The printf() argument count doesn't match up.
 
7:32 PM
@200_success: Well, it does seem on-topic (but the "having trouble" part is suspicious). Perhaps it can at least be edited into better shape.
By the way, I'm wondering if we should decide on the three-tag burninate request soon.
 
0
Q: Which Web API routing attribute style is preferred?

B. Clay ShannonYou can do it this way: [Route("api/DeliveryItems/{ID:int}/{CountToFetch:int}")] ...calling it like so: http://localhost:28642/api/deliveryitems/N/N ...which has the benefit of the routing attribute documenting exactly which args the methods needs. Or you can do it this way: [Route("api/D...

 
^ appears to be primarily opinion-based.
 
7:49 PM
There is no code to review too :S
 
^ Also more of a design review than a code review question.
 
Sweden to StackExchange - Hello? Testing testing, one-two-one-two...
 
Hej!
 
@home, got net
 
0
Q: Solve a maze in the form of a 2D array using BFS. Suggestions for improving coding style greatly appreciated

dxhtype indices = int * int type 'a grid = 'a array array module TupleOrdering = struct type t = int * int let compare = fun a b -> compare a b end module IndicesMap = Map.Make(TupleOrdering) module ImmutableQueue = struct type 'a queue = 'a list * 'a list let empty_queue...

 
8:04 PM
@200_success A Swedish-speaking fish? It's a babelfish!
 
@Jamal - thanks for the head's up on the 64bit question. Out of interest, did 'funky' things happen? From what I can see in my 'rep' page, I still have a downvote applied to that answer, but there are no actual downvotes. It also appears to be messing up the daily rep-cap calculations ... (i.e. I appear to be 2-rep short of what I would expect). This is purely an out-of-interest question... I may adjust some of my SEDE queries... depending on the answer
(oh, and lesson to learn is 'don't answer off-topic questions').
 
@rolfl: I'm not quite sure if your rep was corrected, but you can always go to codereview.stackexchange.com/reputation to perform a rep recalc.
 
Huh.... never seen that!
 
And according to my data, your rep wasn't recalculated today.
 
Well, even I know that. :p
 
8:10 PM
OK, that page disagrees with my web-based page..... that page looks 'right'.
 
8:27 PM
0
Q: Solve a maze in the form of a 2D array using BFS - Haskell

dxhSuggestions for improving coding style are greatly appreciated. import qualified Data.List as L import qualified Data.Map.Strict as M import qualified Data.Vector as V type Queue a = ([a], [a]) emptyQueue = ([], []) pushListToAnother fromLst toLst = L.foldl' (\ys x -> (x:ys)) toLst fromLst ...

 
9:03 PM
Aaaand my internet seems to be stable again.
Asked my third question on the AI beta site today. Four up-votes so far. Yay. It is related to some code that I will put up on review soon, so you might see a Code Review question in your future (perhaps Friday, or sometime during the weekend)
Goodnight folks. I'll tell you to go to bed tomorrow morning, @Jamal.
By the way, from my experience on the AI private beta this MSO post deserves more attention:
5
Q: Add the “review” link in the topbar on "private beta" sites if I am able to review any review queue

hims056I committed and joint http://relationships.stackexchange.com in private beta. As per private beta privilege page casting close and reopen votes requires only 1 reputation. So anyone is able to access close votes and reopen votes review queues. But there is no link of the review page in the top ba...

 
0
Q: Queue in C, optimization for add function

EmzI would prefer if more experienced users could give pointers on how I can optimize and think better when writing code. Using Homework Questions as reference, as this is a homework related question. This should fall into the second category. I know the code is working and that no memory is leakin...

 
9:46 PM
I'm trying Area 51 for the first time. For now, I'm just committing to Moderators.
 
Wow that's a good one. I guess they'll have a tag, with a synonym :)
> How do you deal with a back-seat moderator? Someone who isn't a moderator, but enforces rules.
that's an issue?
 
I think that mostly has to do with those who just handle flags and doesn't do anything actively alongside the community. So... the opposite of me, at the moment.
 
On SE, everybody is encouraged to be a "backseat moderator" - the privileges page can't be more explicit about that. It's good that the proposal isn't limited to SE, although they'll have to strive to stay off the grounds of... MSO/MSE!
 
Considering MSO and MSE will eventually be separated places, that would be likely. It would serve as a nice reference site for everyday moderation, especially when the moderator chatroom is idle.
 
10:17 PM
0
Q: Help speeding up my first Bash script

AdamALThis is my first more-than-1-line script. It takes an inputfolder and a file prefix and get all the files matching. For the first of the files, the script grabs the first line and appends an extra label string and puts that into $data. For all files (including the first), it takes the second line...

 
10:41 PM
0
Q: Suggestions for shortening this python code?

Ryan HarperI was wondering if this script in Python could be shortened? Code: import random def var(): strength = 10 skill = 10 dice4 = 0 dice12 = 0 dice_score = 0 character_name = "" attr_list = [character_name, strength, skill] character_name = str(input("Please enter y...

 
10:53 PM
0
Q: Is there a way to shorten a set of conditionals like this?

Andrew FontI have a long set of IF statements that basically set a null object Value to 0, I feel that because i am doing the same action each time their has to be a simple way to make this allot shorter. It just looks like something i wouldn't normally see in code. My code looks like this: if ($data->sl1...

 
00:00 - 23:0023:00 - 00:00

« first day (284 days earlier)      last day (3747 days later) »