« first day (346 days earlier)      last day (3665 days later) » 

12:00 AM
RELOAD!
0
Q: C Makefile boilerplate

syb0rgThis is the current Makefile that I use with my C projects. Here is what I would like to be reviewed: Reusability - is this Makefile easy to use for multiple separate projects with minimal modification? Organization - is this Makefile organized in a logical and readable way? Dynamics - are the...

 
0
Q: C Makefile boilerplate

syb0rgThis is the current Makefile that I use with my C projects. Here is what I would like to be reviewed: Reusability - is this Makefile easy to use for multiple separate projects with minimal modification? Organization - is this Makefile organized in a logical and readable way? Dynamics - are the...

 
12:57 AM
@200_success The more you know. :-P That is the first time I've seen main() without a return type.
 
Well what a day
 
@Jamal I can't tame the formatting. Pleas attend. — user58697 49 mins ago
Ha. Looks like I'm pretty known. :-)
 
1:55 AM
Could use some support with this SO question:
0
Q: Producing an erroneous WAV file

syb0rgI have some code that captures audio using the PortAudio library, and then tries to package it into the WAV codec. I then attempt to convert that file to a FLAC file codec, but it keeps telling me it's not a valid .wav file. wav.h: #include <stdint.h> #include <string.h> /** * @struct WaveHe...

 
2:10 AM
0
Q: Move/Attrs Tester Environment

Nicholas HazelI have a few objectives (which are working fine, but I want tips in case I can improve it). Let me try to make this as clear as possible, as this is a much larger project: There are three move categories: Hammer (10 damage) Scythe (5 damage) Meditate (0 damage) I will be having hundreds of ...

 
 
2 hours later…
3:44 AM
0
Q: Avoiding globals in gumball machine class

DrewP84I'm planning to transition from years of forced procedural programming to OOP. I decided I'd start off small with a little gumball machine object to get my bearings. Everything seems to run ok, but I feel strange having all these globals in my class. Code in action here. Two questions: Is ...

 
 
1 hour later…
4:50 AM
One more upvote for a new user, please:
 
5:12 AM
Can anyone make sense of this question?
2
Q: Should I differentiate object types by calling methods via variables?

k0pernikusI have three JavaScript objects. The first one serves merely as a prototype. The other two are implementation of a specific type. var MainPrototype = {}; var SpecificType = $.extend(Object.create(MainPrototype)); var OtherSpecificType = $.extend(Object.create(MainPrototype)); I am missing the...

 
0
Q: Speeding up and fixing Phone Numbers from CSVs with Regex, Python

Xodarap777I've hodgepodged together an attempt to extract all phone numbers from all CSVs in a directory, regardless of where they are and what format they're in. I want all phone numbers to be printed to a compilation CSV with no repeat elements in the format 8885551234 with NO leading ones. EG, 1 (510)...

 
I think @JosephtheDreamer is right to ask, "what is the goal of this code?" I'd vote to close as "unclear what you're asking", but I hesitate to wield my binding vote.
 
 
3 hours later…
7:45 AM
0
Q: Reading keyboard input

MunkybunkyThis is how I read the keyboard in my game: @Override public void keyPressed(KeyEvent key) { keypressed=true; if (key.getKeyCode() == KeyEvent.VK_UP) { keyup=true; } if (key.getKeyCode() == KeyEvent.VK_DOWN) { keydown=true; } if (key.getKeyCode(...

 
@Jamal thanks for the edit ;)
 
@Vogel612 No problem. :-) That's the first time I've ever corrected an idiom, too.
 
8:01 AM
@Jamal well that's the difference between a native and a learner ;)
 
True. Although I am a native, my English is not flawless.
 
0
Q: Comparing phone numbers across CSVs Python

Xodarap777(continuation from Speeding up and fixing phone numbers from CSVs with Regex) I'm pulling all of the phone numbers from all CSVs in two different directories, outputting them in a single simple format to two different files, and then comparing those two files for which numbers are in one but not...

 
8:37 AM
 
G'morning
 
Hello :)
 
Did Conway's game of life make it to the hot topics?
 
Yep, at the very top.
 
Cool :) I should read that question later today
(and answers obviously)
 
8:42 AM
Every answer (except one posted just now) has earned Nice Answer, and the OP has earned Nice Question. I've never seen that happen right in front of my eyes.
 
JDOM's github looks interesting, for a newcomer like me, trying out github with the TCG challenge
I wonder, can anyone on a github repo open an issue? Does the issue need to be approved by one of the collaborators before it becomes an official issue?
 
@skiwi no clue...
you wanna try it?
 
I can try on yours
 
sure...
make it meaningful, though
 
What would be a meaningful one?
Well, looks like I can create it
Would be surprised if I'd get an error at the very last point
So let's just assume that and don't litter our issue reporting? :p
 
8:51 AM
nah it should be fine...
you could make a "feature request", That I should catch and Handle exception in main.
 
Okay! :p
or a different fun one ^^
seems like it went through
It worked I see?
You know that when comitting code. You can actually add things like "Fixes #1" or "Closes #1" in the commit message, and it automatically closes the report
 
yea. I just closed that, and it was not marked as fixed..
 
I had my first issue already yesterday
You can even see the linked commit = linked code from it :D
Heh, Java 8 is interesting
String[] stringArray = streamString.toArray(size -> new String[size]);
the size -> new String[size] is a lambda function converting an int to a String[]
But String[] stringArray = streamString.toArray(String[]::new); also works
It strikes me just now that an array seems to behave exactly like a normal class, except that it uses square brackets instead of round ones to construct itself.
This is how I roll... Presentation for uni project in 2,5 hours, need to leave in about 30 minutes and just now finished the final report...
 
9:31 AM
0
Q: json list dropdown selector for car shop

joanetI'm trying to do a listdown selector for choose a car model by the user of my shop. but not I access the models of the second trademark. Specifically do not work from the Audi A3 model. I don't know what i'm doing wrong. I would appreciate a push. Thanks in advance a lot ! attached code in jsFi...

 
Argh, after reading the CR question, I also want to do a remake of Conways Game Of Life!
 
0
Q: Converting Anonymous To Dynamic

Md.lbrahimI have 2 extension methods like following that takes Anonymous type objects and returns it after converting into ExpandoObject which falls under Dynamic I guess. public static dynamic ToExpando1(this object AnonymousObject) { IDictionary<string, Object> expando = new ExpandoObject(); ...

 
 
1 hour later…
10:41 AM
0
Q: Multicriteria sort array javascript

aduchI have an array of objects that I must sort based on two criteria. I've come up with a solution but I'd like to know if there is a better way to do it. Assume a list of devices: [ {"battery_level": 0.45, "network_status": "ok"}, {"battery_level": 0.45, "network_status": "ok"}, {"bat...

 
That Converting Question is tempting me to vote to Close...
 
11:05 AM
0
Q: Refactoring advice for responsive jQuery restaurant menu system

Sam HolguinRelative newcomer to jQuery as it'll show. I have a working restaurant menu system - as the user selects a menu it slides into view. The build is responsive, I've used the 'Debounced Resize() jQuery Plugin', however in implementing the responsive code I feel my code has become clunky, and it nee...

 
Monking CRitters
 
Mokning @Rolfl
 java.lang.RuntimeException: Unable to set internal state on a private field. Please report to mockito mailing list.
meh.
You got any advice on the usage of Mockito / Whitebox by chance?
nevermind...
found it.. Damn inconsistent naming.
 
0
Q: my first SDL/C++ pong clone

user40711this is my first time writing game in c++/sdl and i dicided to post the code here so you guys can tell me what am i doing wrong. main.cpp #include <SDL.h> #include "Game.h" int screenWidth = 640; int screenHeight = 480; const char* title = "Pong Clone"; Game game; int main(int argc, char* ar...

 
11:20 AM
hey
 
hey
 
40 mins to presentation...
 
9 minutes to the half-hour
 
good luck ;)
 
Topic of presentation?
 
11:22 AM
do you perhaps have misc tips for using github? github.com/skiwi2/TCG
It's to represent some website I made for a project
(on university)
 
Been using GitHub for a few years now.... but I am far from being a power-user.... no real tips from me.
 
It's worth 10 weeks of study points (quarter of the year), ssh I made the website + presentation + report within 8 clock hours
 
0
Q: Simple grid system made out of css columns - your thoughts

LeoI have been researching and experimenting with HTML5 and CSS3. I was aiming to create a very simple but efficient tiled gallery / grids. So some sort a grid system that I can layout anything inside. Below is what I have created, what are your opinions? I also have a question, why the distributin...

 
@skiwi That can be both a good thing and a bad thing.
 
I'm wondering if we could create some coding challenge where the goal is to work together on a project, using github for example.. one issue though is that the code should preferably in one language >.<
Well I've checked and what I had made covers what I should've made
 
11:25 AM
JDOM ... ?
.... but seriously, find an open-source project you can believe in.
Lucene, Solr, are Apache projects using Java/
very 'hot' right now.
 
JDOM-8? ^^
 
@skiwi I am willing to contribute to that ;)
 
@Vogel612 What is that?
 
JDOM-8
It's a good opportunity for me to learn java8 ;)
 
It might be interesting to look at possibilities :o But I think for that I should first become familiar with JDOM itself
And also become familiar with what XML is actually being used for in the industry
 
11:30 AM
0
Q: Optimization of Jquery code, also how to optimize it with explaination?

shaikhuufunction vid() { var vid = $(".videoBg"), btn = $(".wVid"), wrap = $(".home"); $(wrap).css({ "margin-top": "220px" }); $(vid).addClass('active'); $(btn).on("click", function() { var vidH = $(vid).height(); if ($(vid).hasClass('active')) ...

 
Nice answer by new user:
1
A: Trying to use "this" to refer to a class's instance variable inside a function within the class's method in JavaScript

user106379The "that" solution works well, but you can also bind your function to this : function UserGoogleMap($mapElement) { this.$mapElement = $mapElement; this.map = {}; this.marker = null; this.coords = new google.maps.LatLng(25.2697, 55.3095) this.initMap = function () { google.maps.e...

 
I am wondering, if I ever get the chance to develop an OCR at work, should I push them into making it opensource? (And explaining the benefits of opensource), or not say anything and let it be closedsource..
And cool, I see (according to icons) that meta.CR is not in beta... If only it were true
 
OCR?
 
Optical character recognization
Transforming text in an image to plain text
 
I'd say it depends on how they want to use it...
If it's supposed to be sold, they definitely shouldn't.
If they want to just use it, and not sell it, they definitely should ;)
 
11:36 AM
As far as I know it is going to be used in some backend software
which I happen to be developing there right now..
Currently we use the Tesseract OCR, it's one of the best, but it could be better
On the other hand, if I would actually be able to make a very good OCR, then why not actually offer an OCR service from a companies point of view...
It's a real situation though, I can have an internship in about 9 months there, but the work to be done should be sufficiently hard enough to actually be allowed for an university internship
What I do currently (automatic processing of scanned invoices) fullfills that property, however that may be done in 9 months
Oh great, product activation failed of microsoft powerpoint :D I hope it won't be bugging me in the presentation
gotta get rolling now
 
12:04 PM
@Jamal Welcome to 10K ... ;-)
12
 
Congrat @Jamal :)
 
Hello to those I missed this morning! :)
 
hey Morwenn
 
What's up?
 
0
Q: Reading data from excel sheet with ExcelDataReader

user3488442Major concerns: The list of catches in my main program Throwing of exceptions The overall construction of the code, code quality Should I encapsulate my ExcelData class within ReadInData, or keep it like it is? Because this is code for a company, I changed the names of a couple of classes, so...

 
12:23 PM
599
Q: Catch multiple Exceptions at once?

Michael StumIt is discouraged to simply catch System.Exception, instead only the "known" Exceptions should be caught. Now, this sometimes leads to unneccessary repetetive code, for example: try { WebId = new Guid(queryString["web"]); } catch (FormatException) { WebId = Guid.Empty; } catch (Overflow...

anyone who wants it, here is a relevant SO-Question for the excel question:
not in the mood to write an answer :(
 
@Jamal Congratz
 
That's only half the answer ;-) And the other half is beyond my C# knowledge.
 
12:46 PM
@Mat'sMug marking this for you, so you also have the link as soon as you show up ;)
 
@Jamal congrats!
 
monking
 
Monking @Ben
you want that -question?
 
@Vogel612 the caching one?
 
nah, the last @StackExchange one.
 
12:58 PM
it has been answered
or
that
:D
 
0
Q: OO design choice and single responsibility principle

PJanssenI'm currently refactoring an application which periodically downloads content from various sources (http, ftp, sql, etc). There is a schedule which controls the times during which the application can be active. For example, it can download content between 8AM and 16PM. The application has been wr...

 
@Vogel612 you're not in the mood for it?
 
nope..
@StackExchange not a single line of code!!
Move to Programmers
2
Suggesting migration, as soon as OP reacts.
 
@Vogel612 on a quick glance it looks like it
 
Hello and welcome to Code Review! As the name implies, we review code. Unfortunately your question does not contain Code. Given the case, you already have written code, please include it, instead of the UML Diagram. In case you have not written code yet, you are probably better off asking on Programmers. Please make sure to read their [on-topic section] before posting, though. — Vogel612 44 secs ago
 
1:04 PM
@Vogel612 +1'd it
@rolfl Pin it!
 
monking!
 
Monking!
 
just got a notification, what's up?
hey @Jamal hit 10K! Congrats!!
 
@Mat'sMug I was wondering whether you'd like to answer the question on reading data from an excel sheet.
 
A bit late but grats on 10k @Mat'sMug
 
1:08 PM
@Vogel612 I'll take a look at that one
@Marc-Andre thanks! :)
 
why am I the only person that has Favorited this?
Monking!(@Late)
 
0
Q: Checking if file is within a directory for security

hexafractionI have a security manager I'm writing for a Java program, and within the checkRead method, I wish to only allow reads to files within a given directory. The basis of it is that it will get a canonical file for the input (which is actually a string as per the method contract). It will then begin ...

 
hey @Malachi :)
 
@Mat'sMug Hello
 
you should see my draft answer on this one, ...I'm in such a mood today!
 
1:22 PM
0
Q: Managing several payment means in my Rails 3.2 app : is my data-model right?

JejekenyI'm trying to manage several means of payment in my Rails 3.2 application. Let's say I have 2 means : Credit Cards & Bank Transfers (BIC), working with 2 different payment providers. Those means both contain a reference string that will be sent to the payment provider to trigger new payments lat...

 
I did not get to making my calculator last night. :(
I want to try and implement something like what my answer states. I think it would be fun
1
A: Very basic calculator using methods

Malachiyour flow is a little clunky. if I were going to calculate something I would do it in this order Number1 then operator then Number2 This way I know what I am doing, especially when playing with Division I think you should ask for the first number then ask for the operation and then ask fo...

 
Hey @Mat'sMug ;-) Monking to QC ..
 
@rolfl mods can see unposted drafts? ;)
first sentence: I think this is abusing anonymous types, dynamic and extension methods.
 
We can see everything
Nice shirt, BTW
3
 
@Mat'sMug that is off topic
that person is asking for code to be written
 
1:27 PM
revision 1 was, I think the edited version is reviewable.
 
> How can I make this code more compact with Linq? Because I am not being able to cast if I write Linq and not getting the desired result.
 
(just posted my answer now)
 
that is the sentence I am seeing
 
> What your original code does, had side-effects (assigning a value into an array index) - LINQ stands for Language-INtegrated Query, querying objects isn't something that should have side-effects, hence assigning expando[property.Name] can't work in a Select call.
Maybe I'm softening.
 
out of ammo, getting a sportmanship badge is hard work
 
1:30 PM
dang @Konijn
sportsmanship is hard to get, I think I got it though....
 
@Malachi reading through that answer again... Where is your basic calculator?
 
@konijn yeah, that was a fun one to hunt for :)
 
8 mins ago, by Malachi
I did not get to making my calculator last night. :(
@Vogel612
 
whoops...
Oh well it was a long day filled with work...
and I just had 2 coffees ..
 
I put one of my games into Vacation mode though. so I will be writing some sort of code. all my other games I have automated Don't tell
 
1:33 PM
~Q)
 
getting pseudo-random upvotes left and right... +90 today, 1 answer posted today (real-life day, not SE day)... !
 
@konijn did you vote on one of my answers this morning @konijn?
BTW.Work
4 more C# Votes and I get the shiny Bronze C# Badge!!!
 
Nice! Well done @Malachi!
 
I would probably get [badge:c++11] if I edited the C++11 questions I answered that were not tagged C++11...
2
 
@Morwenn do it
@Mat'sMug thanks
but I really have to BTW.Work
lol
 
1:37 PM
@Malachi It does not feel honest.
 
I need 53 more C# answers to qualify for a goldie :)
@Morwenn do it, or I'll do it myself (and that won't be pretty) :p
 
@Morwenn if they are truly questions and are missing the tag then it's not dishonest
 
Ok, let's go...
 
- I know sweet nothing of C++ and/or differences between C++11 and anything else C++-esque
4
 
I tag questions based on what they are
@Mat'sMug it has Semicolons it's a real language
 
1:40 PM
@Morwenn If questions are incorrectly tagged, then re-tag them.
 
@rolfl It would be too horrible: I often have no idea whether C questions use C99 or C89 with compiler extensions.
 
Well, then don't .... ;-)
 
@Malachi I think I voted on a number of your questions
 
@konijn thank you
 
@Malachi It's a win win, you get rep, I just got a sportsmanship badge ;)
 
1:47 PM
@konijn it is a tricky one to get. I do have it as well
 
0
Q: How to optimize this code?

SalahI have a old code that look like this: public void checkSomething() { if(cond1) { doItemThree(); if(cond2) { doItemFour(); } return; } doItemOne(); doItemTwo(); doItemThree(); doItemFour(); } NOTE: Item four is not act...

0
Q: PyHangman, a Python Hangman game

DaimyoKirbyI'm working on adding a few features to my hangman game, and I just implemented two-player gameplay, in the form of one player chooses the word to be guessed while the other player guesses said word. I got it to work in my program, but I feel like how I did it is a bit messy since it has largely...

 
@StackExchange that java question is mostly pseudo-code.
 
@konijn "I use this bookmark so often, shedding some more light on it's existence can only help. Also, I need a certain bronze badge."
Too bad I have already upvoted it ;)
 
Ok, done.
6~7 questions retagged.
 
0
Q: Falling Rocks Game

mihayloffI have implemented the Falling rocks game on c#. The instructions are simple: Don't get hit by rocks. The game is running quite well, however there are some bugs that occur and furthermore, I would like to receive advice whether I could make the code less complicated if possible. using S...

 
1:56 PM
That one looks a little bit off-topic too...
we really must look like we put up the exploding bear traps.
 
Current rep .... 22345 ... that's a nice number.
 
"however there are some bugs that occur "
"I would be grateful for a reasonable explanation. "
 
In short: ~40 points for the c++11 badge just by correctly retagging questions...
 
@rolfl 22448 would be nicer ;)
 
@Mat'sMug oh well that would definitely be cheating...
2
2 4 4 8
 
1:58 PM
now's that cheating?!
 
is more probable.
The field is just 4 Panels wide.
 

« first day (346 days earlier)      last day (3665 days later) »