« first day (767 days earlier)      last day (3241 days later) » 

12:00 AM
There are 1394 unanswered questions
3
 
below 1400 again ^^
 
@Quill JavaScript, VB and Access tables together? Ouch...
2
Access is wonky enough on its own merits, throw JavaScript in the mix is just asking for problems!
Small consolation I guess. I don't know that server side JS is any better than PHP
 
@QPaysTaxes On closer inspection, I'm not even sure it's his own code.
 
Ah, now I see why my edit wasn't so great: I edited out an actual indicator of the question being off-topic.
Otherwise, I probably would've just closed it shut right away.
 
I'm voting to close this question as off-topic because it is not seeking a review at all. Asking us to discern how easy another Ruby programmer (of who knows what skill level) would be able to understand this code is not only outside the scope of Code Review, but also extraordinarily opinion based. — nhgrif 8 secs ago
 
12:11 AM
yesterday, by Duga
There are 1391 unanswered questions
yesterday, by rolfl
@Duga PROGRESS!!!
^^^ just sayin ....
 
I smell an exploding bear trap...
 
I understand, but the post itself isn't the place to do it.
 
Chat room is probably best place, IMHO
 
So, here we have a crisis on a question that was asked 15 months ago.....
Also, I deleted an answer which is actually probably a review.
.... it just did not look like it in the queue
 
12:16 AM
@rolfl You deleted an answer which perfectly answers the question asked... but the question asked is off-topic.
 
I saw that...
 
The answer you deleted is a sign of the problem with the question.
 
Not a bad analysis.
 
@rolfl I was thinking that as well. Still, 200 did point out that the question was off-topic, and I should've caught that before considering an edit.
 
12:17 AM
review ^^^
 
Double negative ducky
 
Oh, review queue. Makes sense.
 
Not a good CR answer, but it certainly addresses the question, no?
 
I am torn.... ;-)
 
Yeah. That ^ and that ^^. At least it made me laugh.
 
12:19 AM
We have Jamal, 200, and me all looking, I guess... maybe I can be a chicken and let them decide ;-)
 
Question is:
1. Not seeking a review.
2. Unclear what asking (what skill level is the Ruby programmer you are asking about?)
3. Primarily opinion-based.
4. Not seeking comments on any/all aspects.
5. Asker is not the owner/maintainer.
2
 
It's almost like it is off-topic?
 
I'm not certain what there is to debate. What about the question makes it even remotely on-topic?
 
;-)
@nhgrif The only thing to debate is the timing.... it is 15 months old whihc may grandfather in some of the issues
 
It won't get auto-deleted.
So it's either close it or historical lock it.
Leaving it open isn't an option.
 
12:21 AM
> Elsewhere, there was a question about finding an elegant solution to a particular problem, and the following solution was presented.
 
I'd rather let the community close it. Having a moderator do it would just fan the flames.
 
I would have left it when I saw @Jamal's edit, but as it stands, it's blatantly off topic.
 
@200_success well said (and well thought)
 
@200_success Yes, and you would already be disqualified since you've answered it.
 
@200_success I've posted my close vote... I'm just waiting for four more.
 
12:23 AM
I am inclined to undelete that answer, though. @200 / @Jamal ... agree?
 
I tried undelete voting it, but moderator delete, so no dice.
 
At least then, even if closed, it can accrue votes.... and community feedback
 
I'm upvoting that answer.
 
And if it's closed, I wouldn't even care about the bad title. I rarely edit closed questions.
 
Deleted answer.
Yes.
 
12:24 AM
(oh, also, @200_success, I have never actually confirmed that @200 pings you.... does it?
 
It'd be pretty funny if all 5 close votes used a different option off that list I made...
 
yes
 
I'm voting to close this question as off-topic because this is not your code. — RubberDuck 1 min ago
 
AFAIK the pings use something like regex and a partial string match in SE databases
So @QPays should ping you
 
minimum 3-letters
if they are unique
 
12:28 AM
@Q test
 
and not case sensitive
@phr hi
 
So, I can be pinged with @nhg?
 
but @ph not
@nhg yes
 
Cool.
Works out to my initials.
 
Hey GreenAsJade ;-)
 
12:29 AM
@ro so you can't ping multiple users by accident then, nice
 
I agree this should be closed because it's not my code, and the rules say that it has to be. I can't delete it (it has answers) but I have flagged it. — GreenAsJade 1 min ago
So we can just mod close it then anyway.
 
It's closed now
@GreenAsJade - apologies for your question being ground through the cogs of title cleanups
Occasionally it causes unintended consequences
 
It was mostly my fault for not noticing at first that it was off-topic. To me, titles stick out more, and that first line somehow didn't alert me.
 
Of course it was your fault ... ;-)
I have to run for dinner ... ;-)
bye!!!
 
Bye!
 
12:34 AM
> I don't really agree that asking whether it is easy to understand is off topic - surely that's part of what code review is for. But fortunately we don't have to debate that for this question
Hmm
Asking whether or something is easy to understand or not isn't really on-topic.
Asking how to make something easier to read (and understand) is on-topic.
There's a subtle but important difference I think.
Besides, the former is a "yes"/"no" question, which doesn't make for great answers.
 
0
Q: JUnit testing for Calculator in Java

DimaSanI made a simple calculator. I would also like to write some simple unit tests for my CalculatorEngine class. I had to make some of my private methods as package-private over this. How is it usually better to do it - to enhance access modifier or to make inner test class? And what another more c...

 
@QPaysTaxes Harsh
 
Why would anyone waste their life trying to teach just HTML...
 
12:50 AM
Gotta start somewhere
 
But why can't the internet look like the 90s?
 
Have either of you seen the nineties? You're both super young, right?
 
But, but... ^^
 
@EthanBierlein You can still get high quality webpages like that when you use Adobe Dreamweaver!
Hey @nhgrif, have you looked at developing for the Apple Watch, seeing as you're swift with Swift?
They just announced watchOS 2 as well
 
@EthanBierlein Netscape Navigator! Nice!
2
 
1:00 AM
@Quill I know what they've announced. I get paid to watch WWDC.
Although, I'm not working next 3 days and probably won't keep up with WWDC that much for next 3 days.
And I have not touched Apple Watch really.
 
It seems like a lot of apps are getting watch counterparts recently
 
Any HTML junkies around? Just got a simple question
Looking to add browser tab icon to a page I'm working on, I don't really know what to look for
 
@Phrancis A favicon?
Like the CR Logo in the browser tab for here?
 
^^ these
 
1:06 AM
That would be a favicon
 
OK thanks :)
Looks easy enough, although I'll bet I can find a way to do it wrong (I'm usually good at finding those)
 
0
A: Top wiki pages as an app

nhgrifThe first thing I would have done in accomplishing this task is probably something very big that really cost you. Each row in the table should contain: wiki title, wiki url, wiki thumbnail image One of the absolute first things I would have done would be to create a class to represent the...

^ that's actually a Code Review answer this time guys.
Touch up is for fixing cars and things. Touch down is worth 6 points. — nhgrif 38 secs ago
Free "too chatty" flag.
 
1:43 AM
WHEE I'M HAPPY
BECAUSE CACTUS HAS ERROR REPORTING NOW. IT LOOKS GREAT.
ERROR

=============================================

CLASS DATA: { 'choices3': {},
  'desc_enter': 'Description on enter.',
  'desc_exit': 'Description on exit.',
  'name': 'Name Goes Here 2'}

=============================================

STACK TRACE: Traceback (most recent call last):
  File "C:\Users\xxxxxxxxx\Desktop\Cactus\cactus\errors.py", line 18, in wrapper
    return function(self, *args, **kwargs)
  File "C:\Users\xxxxxxxxx\Desktop\Cactus\cactus\position.py", line 35, in _check_class_data
 
SELECT 'Awesome!' AS [Response];
 
Oh, no, my username doesn't change. I just edited out.
 
It's one letter off?
English is weird like that, you can't look at a word and just know how to say it
You can with most other languages[]
 
WOW
 
1:51 AM
SUCH WOW. MANY AMAZE
 
> Say—said, pay—paid, laid but plaid.
^^ instant LOL
English language definitely requires a large buffer
 
2:08 AM
Hello, please support Cactus: github.com/ShearOfDoom/Cactus. Thank you! :)
Shhhhh...
 
2:24 AM
0
Q: Make sure linux watchdog driver will disarm itself after receiving magic char

user1450181I'm kind of new to coding on linux; just checking if the following code does what I think is does. #include <zlib.h> int ConfigWatchdogNowayoutIsSet(void) { bool found = false; char *buf = NULL; gzFile *config = gzopen("/proc/config.gz", "r"); ...

 
I'm going to perform a magic trick now.
Who would like to see?
 
> raises hand!
 
Okay, here goes.
Hello @JonSkeet
@Phrancis ^^
 
Wut
 
Me justed pinged Jon Skeet.
 
2:30 AM
I got that part ;p
You might actually get a response, I think the Skeet man actually cares to respond to people on SE
 
Wow. It's a magic trick though, so.... :/
 
What's so magical about it?
 
It's, just, magic.... DON'T DENY THE LAWS OF THE UNIVERSE
 
@EthanBierlein Just FYI, you can't ping a person unless they've been in the room before.
I don't believe skeet's ever been in here.
 
Aww, well, hmm...
Well. Bah. He hasn't been in here.
 
2:38 AM
Wow, getting ridiculously close to SO being over 50 million comments
 
@QPaysTaxes Many of those questions are off-topic, too.
 
@EthanBierlein this one's better, no SELECT * ;)
Who in their right mind would use their actual IP address as their user name? #JustSaying
@54.224.239.54: Not without seeing a short but complete program demonstrating the problem, no. I suggest you try to come up with one, and put it in a new question. — Jon Skeet Jun 6 at 15:12
 
2:54 AM
See spam, flag it.
Point it out to others if you feel inclined.
The spam handling is actually relatively efficient, there are a few systems in place.
There's an 'attack' of sorts going on at the moment, but people who flag spam really help, so do it.
 
@rolfl All sites, or just some?
 
@Phrancis Mostly meta.se at the moment.
 
0
Q: Testing console.log output using assert.deepEqual in NodeJS

markisnilI'm new to testing and NodeJS and I'd like to test the output in console.log using assert.deepEqual to test whether or not the result has correct data. For example, I've written a code that flatten multidimensional array. var mixedArray = [0, {1: 2}, 3, [4, 5, [6, 7]], 8]; function flatten(arr...

 
As it happens, it's the one that's modded by the CM's, so they're slow ;-)
 
@rolfl Is it primarily, questions, answers, comments... etc.?
(i.e., which one(s) )
 
2:58 AM
I believe mostly questions, but, as i say, the spam folk are rapid responders... you likely won't catch much.
 
Oh, I thought you meant that with a hint of sarcasm
> Moving on...
 
0
A: Run loop for a text-based adventure game

Ethan Bierlein You shouldn't store the version of your game in a variable. Preferably, you should create a file, name something like info.txt, fleshed out with useful information. For example, it could look something like this. version=v0.01 ... The function run should be renamed to main, just to stay...

 
Night @QPaysTaxes
 
Night @QPaysTaxes dude :)
 
3:06 AM
Hi, and welcome to Code Review - where working code is reviewed. Are you asking for help to write the unit tests (which makes this question off-topic because the code does not yet work), or have you just forgotten to include them as part of your question (in which case it's off-topic because the code is not included in the question)? Do you need to edit in the code? — rolfl ♦ 9 secs ago
@QPaysTaxes I e-mailed the Canadian Prime Minister, and CC'd the Foreign affairs minister. Got responses from both.
Night
 
Night @rolfl
 
For those with see-delete:
0
Q: Testing console.log output using assert.deepEqual in NodeJS

markisnilI'm new to testing and NodeJS and I'd like to test the output in console.log using assert.deepEqual to test whether or not the result has correct data. For example, I've written a code that flatten multidimensional array. var mixedArray = [0, {1: 2}, 3, [4, 5, [6, 7]], 8]; function flatten(arr...

and
 
@Phrancis Thanks for the star!
 
Jun 6 at 6:21, by Captain Obvious
0
Q: Flatten multidimensional array

markisnilI am trying to flatten an array within an array without using .concat or .reduce(). For example: input: [1, [2, [[3, 4], 5], 6]] output: [1, 2, 3, 4, 5, 6] So here's my code: https://jsfiddle.net/4wn5qc0b/1/ I honestly don't trust the result I see in console.log, so I'd like to use assert.de...

 
@DonPolettone from foo import bar.* implies that you are importing every class in bar, even those you don't need. It's better to instead import only what you need, and leave the rest alone (so they are not put in memory, and things like that). A lot of IDEs handle that for you, in some way or another, and save you a lot of typing. — Phrancis 8 mins ago
^^ Is this right?
I know Eclipse does that for me, mostly (but for Java, not Python)
 
3:12 AM
There are IDE's for python? (serious question).
 
Pretty sure Eclipse can do Python...? (never tried)
Wouldn't be surprised if IntelliJ did too
Looks like JetBrains Python IDE is the most popular IDE candidate for Python... Also PyDev... google.com/…
 
@EthanBierlein Jon hasn't been in chat here recently, so he didn't get the ping.
 
Yup, ik
 
VS has Python tools.
Python comes with an IDE of sorts - IDLE.
More like a text editor with syntax highlighting, though.
 
That you can directly run the file from.
 
3:25 AM
Can I ask for a quick hand with some SQL?
 
Arg. Waiting for support staff to email you back is a pain in the ***
 
I have a table that looks like this: |sport_username|sport_1|sport_2|...|sport_6 and I need to have output like: |sport_username|sport_1| (newline) |sport_username (same username as above)|sport_2| up to six times for each user depending on whether or not sport_(num) is null
 
@Quill Just a sec
 
@Quill The trick is to have a table sport_username|sport_number|sport
 
@rolfl They have up to six preferences
 
3:30 AM
So?
 
Is sport_(num) referencing sport_1, sport_2 etc.?
 
rolfl 1 rowing
rolfl 2 rugby
rolfl 3 squash
rolfl 4 skiing
rolfl 5 cricket
rolfl 6 zombieklilling
4
 
Starred for the last item.
 
klilling?
 
pedanticness....
crap, son fell out of bed... gotta tweet befor ei run ;-)
3
 
3:32 AM
If so, you could probably use UNION although it's a bit verbose
 
@Phrancis sport_(num) is a shorthand for each column and is a varchar not an id
 
@Quill what dbms?
 
Many-to-many relationships are fun
 
Access
 
Ouch...
 
3:35 AM
You're on your own ;-)
Seriously, though, that's not a dbms ;-)
 
@Quill Do you have a timestamp column of some kind?
 
No
 
Set up a union and a subselect....
can you do subselects in a from clause?
 
SELECT DISTINCT
    sport_username
  , sport_1
FROM [your table]
WHERE sports_username = 'foo'
UNION
SELECT DISTINCT
    sport_username
  , sport_2
FROM [your table]
WHERE sports_username = 'foo'
UNION
-- etc.
 
That' won't fix the null-sport_6 when the user does not have that many ... ;-)
 
3:37 AM
@rolfl I think you can in Access, though it's clunky (like everything else in Access)
 
need a condition on that too
 
Instead of WHERE sports_username = 'foo' it could be: WHERE sport_1 IS NOT NULL
 
SELECT DISTINCT
    sport_username
  , sport_1
FROM [your table]
WHERE sports_username = 'foo'
AND sport_1 IS NOT NULL
UNION
SELECT DISTINCT
    sport_username
  , sport_2
FROM [your table]
WHERE sports_username = 'foo'
AND sport_2 IS NOT NULL
UNION
-- etc.
^^ meant to edit message, but too late.
 
It's Access, it's a real PITA
I wrote a 1K+ LOC query that I could have written in probably about 10-12 lines in TSQL
The lack of support for SQL standard stuff in Access is pretty appalling
 
3:42 AM
This is related to that horrible mess of VBscript and JS I mentioned earlier
I strongly recommended AJAX and C# data handlers instead
 
The key with Access SQL is you need to make sure your CTRL, C and V keys are working good on your keyboard
3
It has literally no syntactic sugar, everything has to be thoroughly explained to the stupid computer. And comments are not supported, so... more fun.
 
Thanks for that @Phrancis
 
But I might know a few tricks, so LMK if I can help
On the flip-side, Access is really fast once you have thoroughly explained to it what you need it to actually do, so that's a plus... I guess...
 
@Phrancis access is only fast because the data is, by default, small
 
@rolfl Fair point. I haven't used it on actual DBMS-sized data sets (millions/billions of records) so I don't really know
I've handled sets in the tens of thousands of records range with Access, but that's relatively small
 
3:54 AM
If you looking for better performance for working code you might want to use code review. — Spencer Wieczorek 52 secs ago
 
@Phrancis table-size limited to 2GB, result-size of query limited to 1Gb for access 2010
that's small
 
That is small indeed, all things considered
(let alone the fact it innocently doesn't tell you that ... Do I need to go back on my 30K+ records data cleanups now?)
> If Access returns a query, and you export that query to Excel... Does Excel know you're missing thousands of records?
 
0
Q: Perl - Convert "String" sqrt(#) into numerical value

GageI had to come up with a way to convert sqrt(#) into its actual numeric value because before I would have an array containing elements such as, for example, [sqrt(3), -sqrt(3), 1] If I tried to multiply, I would get the error Argument "-sqrt(3)" isn't numeric in multiplication (*) So here below...

0
Q: capslock on jquery

Pekka$("input[type='password']").keypress(function(e) { var isUp = (kc >= 65 && kc <= 90) ? true : false; // uppercase var isLow = (kc >= 97 && kc <= 122) ? true : false; // lowercase // event.shiftKey does not seem to be normalized by jQuery(?) for IE8- var isShift = ( e.shiftKey ) ? ...

 
@TODO: Convince Microsoft to make better products.
 
Late accept! :D Oh, it's two-away, too.
 
4:04 AM
Someone took time out of their day to write this "answer" ^^
 
@Phrancis At least he self-deleted
 
@Phrancis "Hm... perhaps I shouldn't make someone do my homework after all..."
 
@Quill I can respect cleaning up your own mess
 
I have never seen a work of fiction so perfectly capture the out-of-nowhere shock of discovering that you've just bricked something important because you didn't pay enough attention to a loose wire.
4
 
4:09 AM
LOL... I think
@Jamal { I think { a ( mostly ) { formatting review } { is definitely { appropriate ( here ) } } } }
{ message.content.write ( "But that's just my opinion" ); }
 
4:25 AM
This feels like it belongs on codereview.stackexchange.com... There are quite a few rudimentary errors. — nonsensickle 17 secs ago
 
Shhh...
 
0
Q: Global constant shared variable in C

TimI have few global constant variables that I need to include in few source files //constant.h extern const uint8_t TOTAL_TIME; extern const char *SCHOOL_NAME; //constant.c const uint8_t TOTAL_TIME = 100; const char *SCHOOL_NAME = "hello world!"; //file1.c #include "constant.h" uint8_t x = 0; i...

 
@CaptainObvious Looks kinda hypothetical.
 
@nonsensickle Code Review is for improving working code. Broken code is very much off-topic there! — 200_success 25 secs ago
I dont ask for code review, I am just interested why that one line causes error! — Ophelia 14 secs ago
 
Seems there's this weird mentality on SO where "bunch of codez!" == "send to Code Review"
(at least, some users there)
 
"Retards" is offensive to some, I'd recommend against using that word
 
Sorry. Let me rephrase that. Place where the misinformed and trolls live.
 
Monking @all
 
Monking @Heslacher
 
hey @EthanBierlein
 
4:46 AM
Your question might be more suitable for codereview.stackexchange.com. But I doubt they would appreciate you just dumping lots of code there without any explanation. — vesan 42 secs ago
@vesan is right. Please see our Please see our help centerHeslacher 6 secs ago
 
5:12 AM
Night
 
0
Q: Script that parses the Chase.com page for my recent payments

ChipperymanI wrote this code earlier to parse Chase.com's online transactions page. It's written in WinForms. stepBtn is a button that starts this wb is a WebBrowser that is already navigated to the page. Can you guys give me advice? Primarily looking for for optimizations, but any other advice would ...

0
Q: Optimizing Android Custom WebView

user3859356I have made a custom webview which is used to open a very heavy site in terms of database. The webview uses custom code for Upload Files using Upload Handler Class. I need Suggestions on How can I optimize my code for Better Performance. Features Necessary.(Current Custom Webview Written Below d...

1
Q: FizzBuzz CodeEval

n0tionThis is from an east challenge from code eval: Write a program that prints out the final series of numbers where those divisible by X, Y and both are replaced by “F” for fizz, “B” for buzz and “FB” for fizz buzz. INPUT SAMPLE: Your program should accept a file as its first argument. The file c...

 
@rolfl Lol ... I'm pretty sympathetic to the efforts folk make to have the sites clean and tidy. I'm a bit relieved it's so obviously off topic because the code is not mine, so I don't have to take a principled stand to defend it being on topic despite the other arguments presented against it ;)
 
5:44 AM
Thank you for your understanding.
 
6:01 AM
0
Q: Ring buffer for audio processing (follow up)

Alex ZywickiThis question is a follow up in regards to the comments suggested in a previous post regarding a Ringbuffer implementation in C++ for audio processing. Ring buffer for audio processing template <typename T> class Array { public: Array(); Array(std::size_t const& cap); Array(Array<T>...

 
6:32 AM
Monking "all
 
monking @Mast
 
0
Q: Efficient Sum of Primes

n0tionI wrote this simple implementation of the sum of primes for the code eval Challenge Description: Write a program which determines the sum of the first 1000 prime numbers. I would like to know of a better - more efficient - way of implementing the solution. import java.lang.Math; pu...

0
Q: creating dictionary of multiple result

nlperI am creating list of dictionary from two different result, I have written this code, I appreciate if any improvement suggested redditFile = urllib2.urlopen("http://www.bing.com/images?q="+word) redditHtml = redditFile.read() redditFile.close() soup = BeautifulSoup(redditHtml) productDivs = sou...

 
6:50 AM
Mmmmmmonking
 

« first day (767 days earlier)      last day (3241 days later) »