« first day (268 days earlier)      last day (3736 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
@EOF I'm trying to get it to return EOF. Either way, if my code does not receive numerical input, it fails.
 
@rolfl: Democratic monkey!
 
almost electorate monkey.... just ... have ... to.... vote!
RELOAD!
 
EOF
@syb0rg either way, checking whether an int is zero is no easier than checking whether it is equal or less than zero. I'd go with nr <= zero.
 
@EOF But that will include returned error values.
 
EOF
@syb0rg So? Seems to me this is what you would want.
 
12:07 AM
@EOF Really? Why? If scanf returns anything other than 0, I want to fail as invalid input.
 
@syb0rg - you need to unplug your dummy port.
if it is 0 then it never scanned the %i
it will be 1 for a successful scan
Thus, anything <= 0 is an error condition.
 
EOF
@syb0rg no, for scanf("%i", &nr), you want the return value to be == 1, because that will mean one receiving argument was successfully assigned, which is what you need.
 
@rolfl I'm running on low power, most of the cognitive processes have been shut down. I need a nap.
 
s/nap/slap/g
 
But yes, now I see my problem.
 
EOF
12:24 AM
Well, I gotta go. Got a Monday ahead, gotta sleep. Bye everyone!
 
@EOF Bye! Come again!
 
12:55 AM
@Jamal Have you seen 200_ on chat recently?
 
@syb0rg: Not that I recall. He may have been on yesterday. Why do you ask?
 
@Jamal I was just trying to ping him, and noticed I couldn't. That usually means he hasn't been on in a while.
 
If it's important enough, I can super-ping him.
 
Nah, it's just that he downvoted the Fibonacci answer of mine, and I wasn't fully sure why. And I'm pretty sure that I fixed what he was talking about, so I was wondering if he could remove it.
 
Oh. In that case, you can just ping him in that comments section.
 
1:01 AM
I did. He hasn't responded.
Plus, I think it would be a rather long conversation, which would be better to have on chat.
 
Yes, you can still bring him here after he responds.
 
@syb0rg - daily vote limit reached. you can vote again in 22 hours.
 
@rolfl Already?
 
Yeah, I founf a neat trick is to find a subject I am not very familiar with, and browse that tag's questions. If the question resonates with me, it gets an upvote, if I think 'badly asked' it gets a downvote, if it's above my head, I skip it. was on the menu tonight.
Also, I am getting close to the end of my endurance.... I need to get back to bed.
Doing the not-familiar route means I don't feel obliged to answer the questions, and I vote on the quality of the question, rather than an expert-bias I would have for things like Java.
@Jamal - This is hitting the SE Hot Questions list:
13
Q: Java method - levels of abstraction

prometh07Robert C. Martin in his Clean code states that functions should do only one thing and one should not mix different levels of abstraction. So I started wondering whether the code below meets these requirements (I assume the answer is negative). Which one is better? public void run() { isRunni...

 
Indeed. :-) Last I checked, it was #2.
 
1:34 AM
> You've earned the "Electorate" badge. See your profile.
4
 
@rolfl Well done. One more day and I would have had you.
 
Yeah, I had a head start on you..... I know.
I beat you by a nose, but the first gold badge is a great reward regardless....
 
Hmm, we should find another competition to compete against.
 
Woohoo! Next prospective gold badge... the gold Java tag badge?
 
I was 100 question votes ahead at the beginning ..... and only 16 ahead at the end.
 
1:46 AM
@syb0rg: I wonder if those answers (from the questions you're editing) should receive votes. They may be affecting our unanswered count. Moreover, please remember to edit them little by little each day or so, after the previous ones have been pushed down.
 
@Jamal I would up-vote them, but I have run out of votes. I will do so tomorrow. Also, I only edit around 5 at a time.
 
@syb0rg: That's a good limit. They can get fixed over time, and I'll give votes as I see fit.
 
1:59 AM
Sooo close to a silver medal:
24
A: What should we consider for next year's Winter Bash?

syb0rgThere was a question asked here recently: What are the fantasy secret hats you'd wish to get? It would be neat to see some of those community-created hat ideas included next year.

 
0
Q: Trim white space from string

CeleritasThis function is intended to remove leading and trailing whitespace from a string. How can it be made more efficient? For example, can the two for loops be combined into one? string trim(string str) { int i = 0; for (char c : str) { if (!isspace(c)) break; ...

 
2:20 AM
@syb0rg - good answer!
 
2:46 AM
0
Q: Determine if a std::string has all the same char C++

user473973I'm working on an algorithm to determine if a std::string has all of the same character. Here is what I have: bool string_has_all_of_the_same_chars(const std::string& s) { return std::all_of(s.begin(), s.end(), [&s](char ch) { return ch == s[0]; }); } Are there any improvements that can be...

 
@Corbin: Feel free to kick me with this one:
0
A: Trim white space from string

JamalWhen I tested your function with this string input: " c a t " I got no output. This could mean that substr() isn't returning anything to trimmed. Moreover, you're right that this can be done with just one loop. There are many ways to write such a function, but here's one method I ca...

 
"This function is intended to remove leading and trailing whitespace from a string. "

That's not what your review trim() does. It removes all whitespace, not just leading/trailing.
 
Oh yeah. I'll see if I can fix that.
 
If I'm using boost, I typically just use boost's trim(). Otherwise, I just plop in one or all of these: stackoverflow.com/a/217605/567864
 
Yeah, that's also why I put in the STL code. I've never quite experimented with this particular type of trimming, but I do recall a very similar question about the same thing.
 
2:58 AM
0
Q: Writing Traverse Instance for Option

Kevin MeredithWorking on an exercise from Functional Programming in Scala, I implemented a Traverse instance for Option: override def traverse[G[_],A,B](oa: Option[A])(f: A => G[B])(implicit G: Applicative[G]): G[Option[B]] = oa match { case None => G.unit(None) case _ => { val a: ...

0
Q: Implementing Option#map2

Kevin MeredithWorking on an example from Functional Programming in Scala, I'm working on Option#map2: override def map2[A, B, C](fa: Option[A],fb: Option[B])(f: (A, B) => C): Option[C] = { (fa, fb) match { case (None, _) => None case (_, None) => None case (_, _) => Some(f(fa.get, fb.get)) // ru...

 
 
1 hour later…
4:19 AM
0
Q: Can this DbGeography calculation be done better?

AlexGiven the following piece of code, can it be done better: public object DistanceFrom( IEnumerable<Coordinate> coordinates) { IEnumerable<DbGeography> addresses = coordinates.Select( c => DbGeography.FromText(String.Format("POINT ({0} {1})", c.Longitude, c.Latitude)));...

 
5:05 AM
0
Q: Create arraylist on driver class

user35627I don't quite understand what I'm doing and what I'm doing wrong. Please help me to fix/finalize my code. I am supposed to create at least 3 Student objects with input data of your choice to initialize all the data fields of a Student object using the constructors of the classes. Declare an...

 
5:30 AM
0
Q: Java GUI code with Swing Timer

PM 77-1I have the following questions for the below code: Is there a simpler implementation of an on-screen counter? I made CountTimer inner class since it's tightly coupled with the GUI part anyway. What would be the best way to uncouple them? package count_timer; import java.awt.*; import java....

 
 
1 hour later…
6:45 AM
0
Q: Keeping track of answers within a program without knowing how many questions will be answered

Syntax_ErrorI have been trying to figure out how to display something like "You answered 7 out of 8 problems correctly. Your score is 95.5% with a grade of A." in my program. I have written most of it, but now have spent some time searching the internet for a way. I'm not familiar with arrays. My program is...

 
7:11 AM
0
Q: Array manipulation exercise

sc_rayWhile trying to learn more about arrays in C, I tried to write some code that did the following: - Read a stream of numbers from the stdin and store them in an array Print the array in the order the numbers have been stored, i.e. Print the original array Print the array in reversed order. Sort...

 
7:34 AM
Hey all, I need a good sample of mangled indentation in a CR post to test my indentation fixer. Will show up in CR in a few days =D.
Any suggestions?
 
Good morning everyone.
 
Morning!
 
For mangled indentation, why not check Stack Overflow? It's full of that. @sqykly
Just on a side note: I just googled "Clean indentation of Jekyll output".
 
Not as much volume, though - I need a big fat CR code block with a mix of spaces and tabs
 
0
Q: Markup of a blog page build with Jekyll

kleinfreundCurrently building my personal site using Jekyll, inuitcss and GitHub Pages. I'd like to hear your thoughts on the markup of my blog page and its post pages. What do you think about handling logo's like this? Also I'm not sure about the headings. The page-title probably should be part of the mai...

 
7:43 AM
I come back to you, if I see something.
 
sweet, thanks. I'm sure I could find a good one if I go through some old revisions of old posts - should I maybe look for posts edited by mods?
 
Probably. But on CR it's more likeley edits leave the indentation etc untouched because it may be part of the reviewing
It's going to need some patience, but you will find examples. ;)
 
Yeah, I'll just start digging down the front page, maybe find something to review along the way
 
Hello!
 
7:52 AM
Good morning, you two. @SakhalTurkaystan @Jamal
Good morning @Simon
 
@kleinfreund: It's very late at night for me. :-) Just getting some stuff done.
 
Well, I will get used to where you guys come from and greet accordingly xD
 
@Jamal you don't happen to remember editing a post with really awful indentation problems this evening?
 
It's 9am here. :p
 
9:00 here too
 
7:54 AM
1:55 AM here.
 
Shouldn't you be sleeping? :x
 
@kleinfreund You can't accept your own answer until after a couple of days anyway :)
 
That's okay. If I can, I do it. Maybe someone else wants to answer.
 
Yes, but I'm a night owl. :-P I'm washing dishes this late while merging a question here. Oh, and I'm running the fan in my room because my old little vacuum cleaner nearly started letting out smoke.
 
o.o
 
8:00 AM
Yeah, it scared the crap out of me. I was afraid it would electrocute me.
 
Phew... This is how a Monday shouldn't start.
 
I also have class in 8 hours...
 
It's finally snowing in Germany. It really pisses me off. Wasting several minutes getting your car out of that crap.
I have class in 2 hours... Starting late today. But from Wednesday to Friday I have classes from 7am. :/
seven.
AM.
 
O_O
I don't even have any more 8 AM classes this semester.
But I have a Friday class.
 
Don't get me wrong, I'm usually getting up early. I'm not sleepy when I do. But 7 am is just not right.
 
8:04 AM
No it is not.
 
factory workers get up at 5 AM :-p
 
Yikes! I don't remember the last time I had to wake up that early.
 
If you don't remember your history you are doomed to repeat it again ;)
3
 
D:
 
8:25 AM
Bye, folks. Later.
 
@kleinfreund Simple solution: Don't get a car :)
 
Bye!
 
@Jamal You leaving too?
Hi to everyone btw, I have finished reading the chat history now ^^
 
@SimonAndréForsberg: I might as well. I'm late for bed. :-P
 
8:32 AM
@Jamal Sleep a bit for me too please, I'm not fully awake yet I believe
 
I also have fencing class tomorrow, but I have been able to get by with little sleep.
 
9:25 AM
1
Q: Making lines with SVG and JavaScript

AlienArraysI just started trying out SVG the other day. Eventually I hope to be able to know how to do what SE does with their reputation graphs. For now, I've just been trying to set up an easier way to make lines. I think my below code is decent, but please let me know what I can improve on or what I'm d...

 
9:37 AM
@Simon I have a car for 3 years now. Don't want to miss it. But this is the ugly part of it.
 
10:10 AM
0
Q: Can someone Improve this Stored Procedure Logical or coding

SharePointerI got this SP, If anyone can improve it, I changed variable names for some reason, SQL Server 2000 I am working on USE [DBName] ALTER PROCEDURE [dbo].[Table_GetSomething] @name nvarchar(50), @Cooltree nvarchar(10), @aID int, @bID int = 0 AS BEGIN -- SET NOCOUNT ON added t...

 
11:01 AM
0
Q: Checking for true or false

user3239713I have a conditional check in my HTML, that returns a value when the variable is set to TRUE or FALSE. Unfortunately, I hardcoded the variable to TRUE and it still returns the value that belongs to FALSE. This is my code: <tr> <td>Vermelding op Funda?</td> <td style="background-...

 
 
2 hours later…
1:13 PM
Good morning
 
Afternoon!
 
0
Q: Managing loop in bash

Kishan Sarsecha GajjarTwo difference scenario in bash program, First Here i am breaking loop in function testFunc. #!/bin/bash function testFunc { if [ some condition ] ; then break fi } while [ 1 ] do testFunc done Second : In this case, testFunc will return some value, and handling the l...

 
1:28 PM
0
Q: Maintain database sequence after drag and drop

Dave JarvisBackground A User Interface provides people with the ability to rearrange rows of an HTML <table> element using jQuery's sortable API. I have exposed a stored procedure to facilitate updating the database to reflect the user-defined order. The function prototype is declared as: item_move(p_item...

 
2:14 PM
Hello!
 
@lol.upvote hello to you too
 
Time for some answers feed:
0
A: Create arraylist on driver class

Roddy of the Frozen PeasFrom the requirements you list, it appears that you need to do the following: Create a class called Student that contains the Student's full name. Override the toString() method of the Student class Create an ArrayList to hold Student objects Instantiate Student objects and add them to the Arra...

2
A: Printing a week range string in Python

unholysamplerVariable Names: week_0 and week_1 are not helpful names. Firstly, neither contains an object that represents a week. More importantly, what makes week_0 different from week_1? Seeing numbers used as a suffix makes me think that they are just generic values that could be stored in a list. Howeve...

2
A: Java GUI code with Swing Timer

unholysamplerGUI: My preference is to have one ActionListener per button. This way you won't have to deal with checking the source before performing an action. Naming the method GUI() doesn't follow naming conventions. Methods should start with a lower case letter. initGUI() would be a better name as it a...

1
A: Number format in JavaScript

M.J. Saedysince you don't want rounding, treat as string rather than number... function strange(number){ var n=0; if (number !== 0) { nParts = number.toString().split(/\.|,/); if (nParts[1]){ n=nParts[1].length; n = n <=2 ? 2 : n==3 ? 3 : 4; ...

5
A: Determine if a std::string has all of the same character

Olaf DietscheYou could simply use find_first_not_of bool string_has_all_of_the_same_chars(const std::string& s) { return s.find_first_not_of(s[0]) == std::string::npos; } Update: This works only, when the string is not empty. A complete version would also test empty bool string_has_all_of_the_same_...

2
A: VLC media player watchdog daemon

ChrisWueJust a few simple things: This: strcpy (name, "org.mpris.MediaPlayer2.vlc-"); sprintf (buf, "%d", pid); strcat (name, buf); can be written as sprintf(name, "%s%d", "org.mpris.MediaPlayer2.vlc-", pid); removes the need for buf and makes it a bit cleaner. In general your error logging is ...

2
A: Allow changing the properties of a mutable controller in a thread safe way

hochoAnother option is to create ControllerInfo with mutable properties and a Clone method which would return a copy of the instance. Then on the ControllerInfo Info set, simply call the Clone method and set _info to the clone of the object passed in. private ControllerInfo _info; public Info { ...

3
A: Concurrent multi-server pinging in Java

Cengiz CanHere's an example adapted to your case which uses ThreadPoolExecutor. This example allows a configurable throughput while establishing TCP connections to servers. Checking Future.get() for each submitted worker thread ensures that no servers are checked more than others. What happens here: T...

0
A: Minimal Game of Life in C#

apieceoffruitI am known for a bit of the ole' over engineering but in the interest of separation of concerns I would be inclined to distill the project into it's core elements. e.g internal interface GameOfLifeRenderer { GameOfLife GameOfLife { set; } int CellWidth { get; } int CellHeight { get...

0
A: Rational arithmetic calculator

tinstaaflHad a few thoughts on your code. Your code doesn't accept a '%' to quit. Changing the menu to accept a '%' makes the rest of it inconsistent. so making all the input match the operation and changing the enum to reflect the character values instead of arbitrary ones helps with this. You're par...

0
A: Printing a week range string in Python

Gareth Rees1. Comments on your code There's no docstring. What does the week_string function do, and how should I call it? In particular, what is the meaning of the dt argument? You've put your test cases at top level in the script. This means that they get run whenever the script is loaded. It would be b...

1
A: Array manipulation exercise

vishram0709@sc_ray pretty good effort if you are new to C programming. A few points in your code which you can improve: 1) Taking array values from command-line is not good. Its better you use scanf and proper data-type. Below are logs when I pass a very long int value as cmd-line argument. It fail...

0
A: Node.js equivalent of cat -n or nl

konijnIt seems you need through and split to do the piping right. You do not need sprintf as you could build the number formatting yourself. You also do not need fs, you do not use it anywhere. Something like var through = require('through'); var split = require('split'); var linenum = 0; function ...

0
A: JavaScript Quiz App

konijnQuite nice! A general thought is that you could always store the correct answer first, and then show the possible answers in a random manner to make your code more DRY. Furthermore: Since you do not use the id anywhere, you can leave this out: "' id='choice" + (i + 1) + You could put scoreCon...

 
Hey @sim!
 
2:29 PM
0
Q: A package for the DOM - v2

www.arcmarks.comThis is a follow up to : A package for the DOM I've added in better comments, changed some identifiers and made the code more DRY. It also has better organization so you can skip to the parts you want or have time to read. /*********************************************************************...

 
anyone with me on this?
can you try to break this up into several questions please, and just link them together. this is very long, and you even stated that you can skip to the parts that are worth reading. so please break it up into several questions. — Malachi 4 mins ago
 
It is long, but it's a follow-up, so perhaps there's little/nothing left to review.
@Malachi I suggest, point him to meta.codereview.stackexchange.com/questions/75/… and asking him to identify what specific lines of code he wants review, or what his specific concerns are, so that reviewers can review with an eye to his specific concerns.
 
@ChrisW I agree, but there might be plenty to review in each section, and nobody is seeing it because of the length of the code block on the question.
he already deleted it....
 
0
Q: node.js Passport Wrapper 2

Loki AstariFirst attempt was done here: My second attempt (now using jslint to make sure the spacing is correct and have incorporate the majority of the feedback from previous attempt). /* * Export single function that creates the passportControl object * The function has two parameters: * app: ...

 
@Malachi OP deleted it
I had just broken down the code into multiple blocks...
 
2:37 PM
yeah. I voted to close....
 
Is it possible somehow to see the distribution of answers and questions? For example, how many percent of our users only ask questions? Or something like "the 1% of answerers are responsible for x% of the answers, and the top 1% question askers are responsible for x% of the questions". Would such a query make sense?
Because I have a feeling that certain users only ask questions, and they should perhaps consider "giving something back". Without being forced to do so of course, but still...
 
I smell a SEDE query brewing
Any [insertLanguageHere]Developer in mind? ;)
 
@lol.upvote @Jamal all he does is Edit
 
Hey @rolfl got his shiny new gold badge!
 
@SimonAndréForsberg At least one of the people who asks the most questions (60++ questions) only asks questions. So ... what?
 
2:53 PM
@ChrisW I just thought that Code Review could theoretically one day become a site where everyone asks and no one replies. So I wanted to be sure that those who answer can handle the incoming questions.
 
@Malachi The question was undeleted. I added a comment.
 
0
Q: Is this the right way to make app available to all RequireJS modules without circular dependencies?

Dan AbramovMy app module bootstraps a Backbone.js application. I need app to be available in every other view for easy access to router, triggering navigation, etc. I never ported an app to RequireJS before, and I got stuck on circular dependency problem, and this answer isn't quite clear to me, so I'm not...

 
@SimonAndréForsberg I don't see how you can? (how you can can be sure, nor how you can ask questioners to answer too)
 
I am not sure what CR will look like in the future, but I still think it could be interesting stats.
And how to ask questioners to answer too is easy: Post on meta. As I said though, of course we can't force them. But it would be nice if they would start answering themselves, I mean, they must have learned something from all the reviews they've got to their own code. I bet they sometimes would be able to detect the same patterns in other people's code.
 
1
A: Trim white space from string

tinstaaflIf readability and maintenance is a concern something like this might help: const string whitespace = " \t\f\v\n\r"; string test = " test1 test2 test3 \n\n"; int start = test.find_first_not_of(whitespace); int end = test.find_last_not_of(whitespace); test.erase(0,start); test.erase((end -...

 
2:58 PM
I wonder whether anyone has discussed it on meta-SO. It's not only a CR-specific topic.
 
@SimonAndréForsberg that would be the death & burrial of CR
 
@lol.upvote Which is why we need to be sure that we're not heading in that direction.
 
no need to look at it "by user" - aggregated Q's vs A's will take care of that. Actually the A/Q ratio takes care of that. And yes, we need it to improve!
 
A different fix (if an intervention is necessary) could be to start closing questions which people can't or don't want to answer.
 
I don't agree with this. A number of "zombies" were answered > 2 years later.
Closing on-topic posts "because they're not answered" just isn't right, can't be good.
 
3:02 PM
@lol.upvote True that, but it would still be interesting to see the stats of top questioners vs. top answerers (I feel that top answerers is more actually)
 
I think the figures are more meaningful if aggregated.
 
@ChrisW I have to agree with @lol here, "can't or don't want to answer" is not a real reason to close posts.
I think the figures are more interesting if not. :)
 
You said "death and burial of CR". If you weren't kidding, prior to that is when some intervention might be indicated.
 
I mean, what good is a code-reviewing site without any reviewers?
 
chirp
 
3:05 PM
lol
 
0
Q: Nesting versus GOTO: which is better to avoid?

Jeff GohlkeI once had a piano teacher. I asked him how he did certain things with the keys, what his brain was doing while he performed a certain technique, and how he managed to process it as quickly as he did. He looked at me strangely for a moment and then finally answered, "I'm so far beyond even thin...

 
Any ideas to make questions easier to review?
Get stricter about enforcing the "What makes a good question?" standards, for example?
 
@lol.upvote You really gotta stop doing that... you never said "ret" with your previous name, so don't think that the name change allows it.
 
ret
 
@ChrisW Or possibly raise the bar for up-voting questions (Did you hear that @rolfl and @syb0rg?)
 
3:08 PM
@ChrisW being stiff about the rules is twofold - we look like a hard-to-get-into community (like SO), but overall quality goes upwards.
I think we do need to be stiff about the rules.
 
I think we need to have more examples of very good questions
 
We are stiff about the rules. I'm suggesting the ability to change the rules (new rule: questions must be 'well-asked' as defined in faq) if you ever need to adjust the question-to-answer ratio.
 
I am hoping that my next CR question will be one of the best ones this site has ever seen.
 
That's the spirit!
Hello sleepy fencer!
 
@ChrisW I don't think we need to enforce that rule yet. But I think that an important thing is the "Code should include a description what the code does" meta-post
 
3:16 PM
So should code-only questions be closed/punished?
I think they should just be downvoted.
 
If you're going to downvote, ideally leave a comment saying why.
 
Punished? yes. closed? not necessarily.
 
There are indeed many unanswered questions still out there, and I have cleaned out as much as I can. I too agree that closing unanswered but answerable questions isn't good.
 
I'm not suggesting a change: suggesting you could change in the future if you decide you need to.
 
Makes sense.
I think a good CR question is one that helps the reviewers review.
 
3:22 PM
1
A: Rich Text on multiple iFrames

konijnThere is a quite bit wrong with this code, the loops are possibly the least of it. A ton of commented out code and console.log statements, please clean this up Inconsistent indenting, you indent with 1, 4 or 0 spaces, pick one ( I suggest 2 ) The underline button, it does not work The italics b...

2
A: Array manipulation exercise

vishram0709@sc_ray pretty good effort if you are new to C programming. A few points in your code which you can improve: Taking array values from command-line is not good. Its better you use scanf and proper data-type. Below are logs when I pass a very long int value as cmd-line argument. It fails to stor...

1
A: Functional Re-Write in Scala: Rows of Strings with a Max Width

David P.This is much more "Functional" than my first attempt: def combineStrings(strs: List[String], maxLen: Int) : List[String] = { import scala.collection.mutable.StringBuilder strs.map(_.trim).filter(_.nonEmpty) .aggregate(List[StringBuilder]())({ (lbs, s) => s.length match...

1
A: Optimizing numpy gmean calculation

Gareth Rees1. Checking your claim You claim that "these both outperform scipy's gmean implementation", but I can't substantiate this. For example: >>> import numpy >>> data = numpy.random.exponential(size=5000) >>> from timeit import timeit >>> timeit(lambda:fast_gmean(data), number=10000) 5.540040018968284

1
A: Nesting versus GOTO: which is better to avoid?

200_successYour first excerpt is fine, and it is better than your second. Your second excerpt is worse because of the deeper nesting. (Also, if you were to choose nesting anyway, I'd invert the conditions to put the shorter code branch first to reduce mental workload when reading the code.) Consider why ...

 
Its just the opposite, I want the structure reviewed. Will it scale well? Are there any blatant errors. I can split this up in to separate questions but it looks like someone already split it up inside this question. Let me know. — www.arcmarks.com 6 mins ago
@lol.upvote SIGH
 
Hi-level structure/architecture review is off-topic.
~> Programmers.SE
 
Well, if he already has implemented a structure, that's reviewable isn't it?
 
0
Q: A package for the DOM - Wraps

www.arcmarks.comI have a DOM library that I've broken up into multiple parts. I will likely put these parts in internal IIFE's as modules. This is the wraps module. The reason I wrapped these functions is so that I could build them out later. Currently they don't provide any functionality beyond the native c...

0
Q: A package for the DOM - Ajax

www.arcmarks.comProvides 3 types of normal ajax - get, post, and post for form data. Also provides serialized ajax (get style) using a queue. Please review the correctness of this code. /************************************************************************************************** AJAX */ // ... snip ...

 
@Malachi You got your wish: it is being reposted as separate questions.
 
3:37 PM
Great.
 
Hmm, more JS questions..
I am going to need a lot more coffee
5
 
0
Q: A package for the DOM - Events

www.arcmarks.comPlease provide feedback on the correctness of this code. It should handle older versions of IE but how far back it goes I have not determined yet. /************************************************************************************************** EVENTS */ // ... snip Priv.functionNul...

 
@Jamal was that a Sarcastic "great." if so you forgot your Sarcastic tags
 
That user's Q/A ratio is going up!
 
@lol.upvote Hanging steady at infinity.
4
 
3:47 PM
16/0... err... InvalidOperationException (head blows up)
 
@Malachi: Yeah, I did forget them... <-- that wasn't sarcasm
 
Time to go home. See you.
 
later!
 
@lol.upvote starting to sounds like, ....hey where is that little Raspberri Pi guy?
 
spent his 40 votes and went away..
 
3:50 PM
syb0rg
haven't seen him in a while....
 
3
A: Nesting versus GOTO: which is better to avoid?

200_successYour first excerpt is fine, and it is better than your second. Your second excerpt is worse because of the deeper nesting. (Also, if you were to choose nesting anyway, I'd invert the conditions to put the shorter code branch first to reduce mental workload when reading the code.) Consider why ...

1
A: Nesting versus GOTO: which is better to avoid?

ChrisWI agree with @200_sucess that the first version is better. An alternative may be a subroutine: for(String line : lines) { AddLine(line, values); //...and so on with still more processing } void AddLine(String line, Map<String, String> values) { if(line.charAt(0) == '#') { L...

1
A: javascript for controllers of multiple audio tags

konijnThis is good code for a new coder. Some observations: I am not sure why you add a pause button through JavaScript, you could have this button declared simply in the HTML. doAudios -> misnomer, since it deals with 1 audio at a time, so doAudio makes more sense. You seem to go through a lot of e...

3
A: Nesting versus GOTO: which is better to avoid?

BobbyA different way is to let these pairs be represented by a class, which itself has a static factory method that will return null on failure. public final class Pair { private String key; private String value; public Pair(key, value) { this.key = key; this.value = valu...

 
@konijn, could you help me to create a nice fun gallery for a website. or point me in the right direction of one that will load fast? I have tons of pictures that are going to go on each page.
@konijn, I want to have something free, (it's for a Non Profit Org) but still ultra cool and will allow them to look through previews of all the pictures and stuff
 
4:06 PM
0
Q: DRY - Pass in parameters instead of multiple functions

Delmon YoungI can't quite figure out the best way to approach this. I have two jquery objects that both are used to set cookies. I then parse the JSON and set a cookie that is either the users height or the users weight. This works fine but I feel like there is an extreme amount of redundant code here that c...

 
@Jamal here's a Sarcastic tag you can use: -_-
Great! -_-
;-) works as well
 
4:22 PM
1
A: Getting list of colours from image in lab format

Gareth Rees There's no docstring for get_histogram. What does this function do? What kind of object should I pass for the img argument? You import skimage.io.imread and PIL.Image but you don't use either of them. This comment doesn't seem relevant: #histogram = plt.hist(img.flatten(), bins=100, facecolor='...

I'm not interested in advice on style - identifier names, whitespace, etc. I've updated the question to reflect this, so you can remove those bullets as well. — www.arcmarks.com 22 mins ago
^^ I'm putting him in his place.
@www.arcmarks.com reviewers are free to comment on any aspect of the code you post, not just what you deem useful. — lol.upvote 6 secs ago
^^ aah. feels better.
WTF?
Please disassociate this question from my account.www.arcmarks.com 1 min ago
right its your content, take it. — www.arcmarks.com 3 mins ago
 
Hey everyone. :)
 
Hey @kleinfreund!
 
Had/having a good day?
 
so-so...
working with a stupid .net library that has a strong name key, and just now I realized I can't debug the thing, the version that's running is the version that's installed, not the version I'm seeing in my IDE. FML.
 
4:37 PM
Hahaha. The British internet filter blocked code.jquery.com: thinkbroadband.com/news/…
Oh, that's a bummer. :x
Would you believe me I don't have internet on my mobile phone?
 
I would. I'd also think you need a data plan.
Hey! Look who's here!
 
@Malachi Here I am
@SimonAndréForsberg What did you have in mind for this?
 
@syb0rg I missed you
@lol.upvote said something that i thought you would say @syb0rg
 
Hello you two. :)
A data plan?
 
yeah, like, how don't you have Internet on your phone in 2014?
 
4:43 PM
Too expensive for use in foreign countries.
 
Yup. I feel a bit socially degraded because I can't use two-factor authentification.
 
@kleinfreund Why not?
 
Well, I guess I could. But then I would need to bring this stupid phone everywhere. And I rather leave it at home/in my bag.
 
47
A: When should I deploy my assemblies into the GAC?

CheesoQuestion: When should I deploy my assemblies into the GAC? Answer: Never Actual, honest, Real Answer: Hardly Ever Discussion Only drop things into the GAC when multiple apps on the machine will use the assembly, and when the assembly is foundational (likely to be used by multiple apps...

Great. Now how do I deploy to GAC when I'm forced to?
 
Any tips on attracting some answers on my questions?^^
I'm not saying "more answers" because the only answer I got so far was my own one. :x
 
4:55 PM
@kleinfreund Post your questions here. Then your question will most likely attract upvotes which will draw more views which will draw someone to answer your question. Ideally.
 
But the upside: Malachi commented and kinda started a discussion about whether to have a seperate SCSS tag or not and somehow got me into the chat. ;)
 
Also, bounties.
 
I posted my first question a few days ago and the second one this morning.
 
If I had the votes I would have thrown them at that question.
 
Wow... this "arcmarks.com" and his questions "A [package|class] for" in his general question format. :D
Let me know if you guys have some HTML/CSS stuff to review. But you seem to be more into the real programming thing, right?
 
5:07 PM
If it is code and it works, we are into it.
3
 
And I'm back.
 
@kleinfreund I also don't have internet on my phone. Don't want to get it either.
 
@Donald.McLean Well hello!
 
Hello!
 
5:11 PM
@syb0rg Just considering your competition of upvoting questions :)
 
0
Q: Correctness of calculations with struct timespec

AlecI've noticed some discrepancies in timings in our system, and I'm trying to narrow down what could be causing them. I'm reviewing out time abstraction, and as far as I can determine it's fine. Am I missing anything, and is it portable (besides being constrained to POSIX)? typedef struct timesp...

0
Q: Rolling Average class sanity check

ToryI just want to make sure that my Rolling (Moving) Average class is understandable and reasonably thread safe. My main questions are: Is having totalCounts as a long just for a potential edge case overkill? Is checking to see if the number of observed counts is 1 (and thus, just return the obse...

 
@SimonAndréForsberg I do take care in what questions I up-vote. They do have to mean a certain quality check.
If that quality can be fixed by an edit, I edit it and up-vote the question.
If it can't, the question usually needs to be closed.
 
My FIOS was out all weekend. No phone, TV or internet. Major pain.
 
@kleinfreund HTML/CSS stuff to review? Take a look at one of my pages, stats.minesweeperflags.net - does it look like I spend a lot of time on my CSS? :)
 
HA!
Standard Times New Roman in sight!
Just let me know if you want to work on this (design wise).
 
5:17 PM
@kleinfreund Are you offering to work for free?
 
I'm not a professional yet and need to learn many things about web development/design. Working on some actual things is good practise and in some doesn't necessarily provide some income for me.
 
knowledge is money!
 
Knowledge is a tool.
 
2
A: Handling serial port with select and local socket

William MorrisOn your questions: There are some oddities in your code, for example, the use of non-blocking sockets. Detecting disconnected clients is difficult. I'm not that familiar with UNIX-domain sockets, but I imagine they are much the same as Internet-domain sockets. You probably need either to set ...

 
Using a tool can give you money in return.
 
5:19 PM
Knowledge is rewarding?
 
Sure.
 
@kleinfreund If you' (damn enter key)
2
 
:D
Feel free to rip it off and push "send" instead.
 
If you are willing to work for free, I'd be happy for all the help I could get! (And as you possibly have seen, I probably need all the help I can get as well)
 
If you feel you have the time to give me some information about this site and what you think could be improved, you can drop me line. Probably going to have some free time over the weekend.
 
5:24 PM
0
Q: simplify the if and else code in C#

SivaRajiniI have below type of codes in one function public void func() { if (!string.IsNullOrEmpty(customerpay) && !string.IsNullOrEmpty(warrantypay) && !string.IsNullOrEmpty(maintanceplan)) { if (customerpay == "Include" && warrantypay == "Include" && maintanceplan == "Incl...

 
@kleinfreund Absolutely!
 
I wish I could find a C programmer to work for with me for free
4
 
Star for "work for with"
dang.
how is the markdown syntax for strike through?
 
--- stuff ---
with no spaces
 
@ChrisW Welcome to 2K.
 
5:30 PM
0
Q: macro that interchanges 2 arguments of type t

Ionut Grt. Define a macro swap(t, x, y) that interchanges two arguments of type t.(Block structure will help.) The ideea is that a variable defined in a block structure exists only inside the block structure. So, I can create a temporary variable without affecting the code. Here is my solution: #incl...

 
Thank you, syb0rg.
Just 5 bullets left today.
 
That C question was pretty easy to answer @StackExchange
 
Out of ammo.
2
 
5:50 PM
@SimonAndréForsberg Fixed my answer to work for more types.
 
Pulling a @lol now:
0
A: Git command: push the latest commit and email the diff in colour

Gareth Rees1. Introduction I'm just going to comment on the part of your program (the first few lines of the main function) where you parse the command-line arguments. You'll see that there's plenty here for one answer. 2. Comments on your code I don't like the specification of this program. It does two...

 
2 votes left
 
3 hours left
(until bedtime)
 
Already accepted!
2
A: Macro that interchanges 2 arguments

syb0rgIf you are using gcc, we can use the typeof() keyword(1) to get rid of one of the arguments. Also, add a do-while so the macro to be used in contexts where it would otherwise be problematic. #define swap(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0) You could also use an exclusive...

 
0
A: Simplifying conditional statements for transaction code

lol.upvoteWell the first condition could be reversed, immediately reducing the nesting level: if (string.IsNullOrEmpty(customerpay) || string.IsNullOrEmpty(warrantypay) || string.IsNullOrEmpty(maintanceplan)) { return; } // rest of conditions This code looks like sample code, but I'll say it anyway:...

1
A: Simplifying conditional statements for transaction code

pokeYou could do it like this: public void func() { if (string.IsNullOrEmpty(customerpay) || string.IsNullOrEmpty(warrantypay) || string.IsNullOrEmpty(maintanceplan)) return; if (customerpay != "Include" && warrantypay != "Include" && maintanceplan != "Include") return; ...

 
5:58 PM
4 votes left...
 
@lol.upvote Holy mother of I-don't-know-what!
 
Thank you.
It looks pretty.
 
Heya
 
@ChrisW: You need a gold badge. ;-)
 
And no more rep.
 
00:00 - 18:0018:00 - 00:00

« first day (268 days earlier)      last day (3736 days later) »