« first day (990 days earlier)      last day (3326 days later) » 

00:00
RELOAD! There are 1661 unanswered questions (94.5611% answered)
0
Q: Javascript Breakout Game

DracunosI'm a novice programmer who is very new to Javascript, and animation/graphics, and I have this breakout game on my flask website. I tried to do as much as I could from scratch, and I'm unsure if my physics system and especially collision detection are done reasonably well. I get little collision...

00:28
@CaptainObvious HOLY CARP that's a lot of JavaScript
I still don't quite understand how it works in JS when you wrap something in (function() { /* some code here */ }());
Some of the weirdest syntax I've seen so far (and that includes Lisp)
00:45
I discovered the smallest known backrake in Game of Life.
I believe so at least.
0
Q: Checking whether a number is a power of 10

jcmIs there a better way to check whether a number is a power of 10? This is what I've implemented: public class PowersOfTen { public static boolean isPowerOfTen(long input) { if (input % 10 != 0 || input == 0) { return false; } if (input == 10) { ...

Whoops. I found someone discovered a smaller backrake a year ago.
@Phrancis it's basically an anonymous function that gets executed immediately, thus it's never assigned to a variable besides the temporary variable
(function test(){ var b = 4 })();
console.log(test); // undefined
console.log(b); // undefined
var completed = (function test(){
    var b = {};
    b.name = "test";
    return b;
})();
console.log(b); // undefined
console.log(completed); // {name: "test"}
You might consider posting this to codereview.stackexchange.comjacob 51 secs ago
It's a great way to execute a huge massive amount of code and 'be rid' of it when it's finished working
00:58
Didn't realize there is a code review site. Thanks for the suggestion — Dimurof82 30 secs ago
@Quill Ah, OK, makes sense. Is it executed once the page is loaded, or even before that, i.e., ASAP (literally) when the page is called?
whenever the javascript engine gets around to reading it
you can attach that to an onload method if you want too
He's abusing the IIFE structure in the question, you pretty much are supposed to build the entire class/prototype in the IIFE and return it
not to mention it's inline code
Check the 19th byte for a programmer's edition of LOTR.
@Quill It just dawned on me that this looks almost exactly like SQL... e.g., DECLARE @myVar INT = (SELECT Foo FROM Bar WHERE Id = 42);
yeah, just like that
01:12
So the variable is really an expression rather than a value
the return type is value rather than expression
if I had var test = (e => console.log(e));
that's an expression
oh wait, it is an expression
IIFE: Immediately Invoked Function Expression
</fail>
01:16
2
Q: Read through a log file to find "Fail" lines

Dimurof82Please bear with me, I'm only about a week into Python. This code is something that I wanted to do once I completed the chapters dealing with opening and reading files, and RegEx. I always feel like I'm over complicating the code. Please take a look and let me know if this is sound and where it ...

What is the vital advantages and disadvantages of #pragma once versus older include guards?
@Gustavo6046 Compatibility.
@EBrown Really? I would have thought the include guards to be more compatible....
> In the C and C++ programming languages, #pragma once is a non-standard but widely supported.....
@rolfl That's what I meant to say. I'm sorry.
Thanks :)
I'll never more use #pragma once.
01:30
@Gustavo6046: See (click the link, not the title:
In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current source file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including: less code, avoidance of name clashes, and sometimes improvement in compilation speed. == Example == File "grandparent.h" File "parent.h" File "child.c" == Advantages == The most common alternative to #pragma once is to use #define to set an include guard macro, the name of which is picked...
Btw it's sleep time, good night :)
night
> (include guards are) ... more complicated, possibly less efficient, and prone to error as there are no mechanisms to prevent a programmer accidentally using the same macro name in more than one file, which would result in only one of the files being included. This problem renders #pragma once to be advantageous. Since the compiler itself is responsible for handling #pragma once, the programmer cannot make errors which cause name clashes.
Oh yes I think I'll then use #pragma once even though I was told not to do it in one of MyAntSim reviews.
If you are using Visual Studio, then just #pragma once. That is the default there.
01:32
I am using Code::Blocks MinGW.
Night :)
Night.
night
I thought this was pretty interesting
02:04
wat
incoming @Duga paranoid report
...
possible answer invalidation by Mat's Mug on question by Mat&#39;s Mug: codereview.stackexchange.com/posts/117116/revisions
@Duga bless you
@Duga seconded. the answer is borderline NAA anyway
This answer doesn't really review the code, it's more like a (set of?) feature request - feel free to create an issue on the project's GitHub repository. /moderator-hat -- that said these are pretty nice ideas :-) — Mat's Mug ♦ 11 hours ago
should I mod-delete it?
I feel like I'm in a conflict of interest on that one
maybe leave it for someone else then
I NAA flagged it.
a few of our users are near priviledge upgrades, there should be more users with delete priviledges soon
I'm at 13k, and I don't have delete privileges.
I think I need 20k for full delete privs.
02:13
oh that's right, 10k is seeing deleted posts
I've got to start answering to get up there.
If I get to 25.5k this year, I'm going to volunteer for one of the Best Of bounties.
I want to get my SO rep up to 5k this year and my CR rep up to 15k this year
I've got an inspection to post on CR, but I'm too tired to write a description just now.
0
Q: Read function that properly handles interrupts

ultraThis function is meant to be used for reading files. It returns all bytes asked unless EOF is reached. It handles interrupts and returns -1 on errors. //safe function to read all bytes asked, only returns less bytes if EOF static ssize_t read_all(int fdes, void *buffer, size_t size) { ssize_t ...

02:39
Is it acceptable if I post some code with a known shortcoming?
does it work as intended?
Like, a feature that is so important it could almost be viewed as a bug?
more specifically?
Because I just realized that my assignment value inspector will flag a value in an if that looks like this:
if condition
    value = True
else
    value = False
That first assignment will be flagged.
02:41
My first suggestion would be to make the page just render data in the right order. But if you don't own the server or the HTML, then you could try something like they have here and instead of binding to onclick simply run the sort function on page load. — mr rogers 42 secs ago
bwahaha nice bug!
I think you need to fix that first
LOL, I know, right?
OK.
This is going to be much, much harder than I originally thought.
I will need to account for gotos too, I suppose.
it's always harder than we think it is
Yeah.
"code paths" is what you're looking for
02:43
@Mat'sMug nice but the bottom font is a bit blurry, you could consider moving it down and centering it and making it larger tho, I guess
Yup. So, for each scope in the stupid thing, I need to construct a graph of every possible execution.
Then, I need to determine if a value is assigned twice iff it is assigned twice in every possible execution.
Other than that, as has been mentioned, Stack Overflow isn't the ideal place for this; on the Stack Exchange network, Code Review would have been more appropriate. — TeaDrivenDev 24 secs ago
-1
Q: Python Beginner : Class

macI'm trying to understand classes by just writing a simple code to print the color while when the users enters "1" class Automobile: def __init__(self, color): self.color = color def get_color(self, color): input("Enter number") if self.color == 1: print(...

03:00
@Mat'sMug Shading on the bottom half seems excessive
Especially the last line
better?
Yeah
damn, the .png never looks as neat as the .pdn
Also that^
Reduce the glow.
03:02
drags tab to other monitor ....they look the same...
that's more like the way it looked on my other screen
Oooooo very sexy (for PowerShell)
Is the tag in PowerShell tag wants YOU! necessary?
maybe not
Alternate e.g. PowerShell wants YOU!
03:07
looks empty without it though
and well, the ad links to the tag page
hmm, hold on
BTW.Waiting
@Hosch250 Why don't you at least make your own?
How's that?
03:12
@Phrancis Pff, I just thought it was sort-of similar.
@Mat'sMug ^
@Quill I think the blue BG stands out to much, personally
@Quill Center the "2nd", at least.
Also, make it a bit smaller.
03:13
Make what a bit smaller?
The "2nd".
Also, do we really want to advertise our chatroom? I predict the help trolls will increase by 5-fold.
I suppose more nice-people will come too.
6 hours ago, by Mat's Mug
make one, people will vote accordingly!
I think we should more give custom invitations.
@Quill OK. I think I will be forced to downvote, but go ahead.
sure, no worries
@Hosch250 @Quill different discussion than that related to the ads themselves
03:15
@Phrancis Still .
But, I've got to go now anyway.
"tag" is implied now :)
@Mat'sMug The "powershell" doesn't stand out enough.
hmm true
03:16
@Hosch250 I realize that, I just think that conversation and the "ads" conversation don't necessarily belong together
@Hosch250 catch you later
@Mat'sMug the tag is not very legible, can you make it pop out a bit more?
trying
it's hard to do without defacing it
Can you... er... what's it called... emboss it (the tag logo) a bit?
Funny, I was just thinking about how to make a PS ad when I popped in here.
03:19
:)
"Power up your PowerShell" or "Add power to your PowerShell" or something.
get-reviewed
it's a bit more crisp like this
> Maximum Power(shell)
this gradient tool is hard to get good
there's a gradient tool?
(jk)
03:20
(LOL)
(;-;)
@Mat'sMug Looks better
I'm thinking of dropping the "needs YOU!" part altogether now
Do it
how's that?
03:22
needs YOU!
Much better.
ignore the photoshop window part, I couldn't be bother editing it out for a screenshot
any comments on the font?
It looks nice.
no tagline?
why should people click on it?
@Quill Please change the light blue background to something more neutral, like grey or white... my opinion
03:24
I think this is it
Do we have a generic site ad?
A lot of sites have ads for the site itself.
there's one for the Twitter account
0
Q: Script that scrapes Facebook pages for their "likers", gets UID and Name and puts it in a csv

n1c9#!/usr/bin/env python # Nick Tucker, [email protected] # Facebook Scraper - enter URL like 'https://www.facebook.com/search/206792926015200/likers' # Required dependencies: selenium from time import sleep from creds import * from selenium import webdriver from selenium.webdriver.common.keys i...

a gray version, @Phrancis ^
thoughts?
> Enter the 2nd Monitor. Beware, there's no way out! (other than a kick-mute)
03:28
@Quill I personally like this last one best so far
Me too. I'm really leaving now.
@Hosch250 catch you later :-)
later!
@Mat'sMug surely there's gotta be a better tag line then that?
surely
03:29
It's true, but still....
while (!isGoodEnough) {
   tagline = taglineFactory.Create();
   isGoodEnough = eval(tagline);
}
var gimmeTehTag = new TagLine(Things.SecondMonitor);
I wouldn't vote for it
It's a proposal meta, downvotes are normal
It's better to have downvotes than no votes at all
03:59
now that was a dumb bug
ambiguousIdentifier :
    (IDENTIFIER | ambiguousKeyword)+
    | L_SQUARE_BRACKET (.+)+ R_SQUARE_BRACKET
;
"make ambiguousIdentifier be more permissive and allow anything between square brackets" was taken quite too literally
crap, how do I fix this
@morven, You can edit your commit before submitting it to code review by using git reset HEAD^ and then make a new commit after you finish your changes.. — merlin2011 37 secs ago
great website too
we should totally make a community ad for stack overflow
the tag line can be "BROKEN CODE GOES HERE"
04:17
^^ NICE!!
lol
not sure SO mods would appreciate that wording though
that's why it isn't in my photoshop window right now :P
I do mine with Paint.NET :)
is a meta cr community ad valid?
@SimonForsberg depends on too many factors. Some Scala constructs are less efficient but many are aat least as efficient and some are more efficient. However, the usual guidelines for code development apply.
04:34
@Quill why not?
0
Q: Write a method named getExponent(n, p) that returns the largest exponent x such that px evenly divides n. If p is <= 1 the method should return -1

user3789184Write a method named getExponent(n, p) that returns the largest exponent x such that p^x evenly divides n. If p is <= 1 the method should return -1. getExponent(162, 3) returns 4 because 162 = 21 * 34, therefore the value of x here is 4. if n is 27 and p is 3 return 3 because 33 divides 27 eve...

we should expect other sites to start posting their ads on our community-ads meta anytime soon, too
yikes
I'm thinking something like that. just not horrible
maybe you could have a go, @Mat'sMug
04:42
I might have an idea eventually
enough ads for me tonight :)
I killed the room?
It looks a bit better with more blur and less orange
It turns out Orange is a really hard colour to overlay with white
Oh weird. The room said something about no messages being posted since my last one.
Even after I reloaded the page.
@Quill I wonder if we could use the site logos
04:46
I'd say we could, inter-SE it'd be fine
maybe it's worth asking on MSE
I'd upvote that
I need to make the RD ad retina-sized
yes
I was about to PSA the meta thread over in PPCG chat, but then I realised a code golf ad would probably be downvoted to past hell
05:03
0
Q: Checking For Existence of a Possible Combination of values in an Array which Sum to a Given Value

Ahmad RagabThis is a solution to a variation of the coin change problem, I think. The code works, to the best of my knowledge, but I do not understand how the last if check: if (i & (1 << j)) { combinationSum += arr[j]; } works in this algorithm (see below). I ran into it working through a tutorial. ...

Unfortunately this is off-topic for Code Review, as questions seeking an explanation of someone else's code are off-topic. — Quill 21 secs ago
@Quill The idea of having such an ad is good. Text on text is horribly unreadable, though.
Yeah, I know. I'm thinking of something better
if you've got any suggestions, I'm always open to hear them
Maybe use a combination of an image of some confused person, plus the SO and CR logos.
lol ..I like that
05:13
Bottom one is funnier, but the top one is Public Domain.
that sounds cool
Easier to just complain about yours — Wipqozn 15 hours ago
@Mat'sMug you should totally remake that python CR ad. and in C#
^ that is cool
05:29
@Quill wasn't mine
it still could be remade
@Hosch250 & @Quill hey guys. No. haven't had much to contribute with the latest chatter-to-knowledge-ratio restrictions :D
ratio restrictions? oh, right
How is it going with you guys.
OK. How's it going over there?
05:38
@Quill something similar to Signal-to-noise ratio sort of thing :)
Been working on lots of electrical projects lately so less C# and more C (boring stuff you know :D)
Ignore the gray part (photoshop's window)
@200_success am I cramming too much in the corner?
can see that you guys are developing some sort of a banner
Monking
Ads for the site.
Minking.
We're doing the 2016 community ads: meta.codereview.stackexchange.com/q/6539/23788
@Heslacher hey
05:41
nice
@Quill I'd just plain replace the site names with the site logos
would be less crowded
@Heslacher monking!
Night.
night
Can you make an ad telling SO that voting to close as off-topic because it belongs on CR is off-topic?
lol
05:49
There, finally got that right.
another gradient: i.sstatic.net/mVI99.png
@Quill I like the plain one a bit better.
I was thinking about adding a more subtle gradient: i.sstatic.net/pHqJs.png
(see above)
if we used the community github page more, we could make one for that
> This 2nd Monitor doesn't improve your productivity
06:05
possible answer invalidation by G. Pacete on question by G. Pacete: codereview.stackexchange.com/posts/116855/revisions
TTQW
06:16
'sup?
That was meant for my browser url bar
But monking
nearly everything on the starwall is by @Quill or @Mat'sMug and both of them have one star.. have you guys been starring each other all night :P
Or all morning, in @Quill's case
lol
06:33
TTGTB
0
Q: How to design a Node script for web scrapping in order of performance?

diegoaguilarI got some MySQL database with 270k+ rows with some school information, like school official registration, city, state, etc. I'm always looking at http://www.mejoratuescuela.org, the way I could request: http://www.mejoratuescuela.org/escuelas/index/01FLS0009O where the last is the school regist...

Zak
Zak
Monking @all
Zak
Zak
06:54
Thank you, I will modify my code accordingly. I did not know about Code Review Stack Exchange. I will start using it more often! — Oscar Anthony 8 hours ago
hey @Zak hey @DanPantry
Zak
Zak
@Heslacher Hey
07:12
Pretty much @DanPantry
Except it's 5pm here
Also morning @Zak and @DanPantry
07:26
0
Q: Refactor database method to decrease complexity and length

DavidThe method SaveGroupStepPermissions(...) is a database API class. If an error occurs within the method the exception is trapped. Whether this is good design or not is not the scope of this question as I need to adhere to product guidelines. I feel that this method is to complex and too lenghty. ...

07:44
@DrZeuso: That's a question for the CodeReview site. But I would move the Special block to a separate non-public method and then use a switch statement instead of if statement for the other check. — jgauffin 46 secs ago
07:54
user image
3
I have coffee.. Good morning.
@200_success that looks pretty good
It rhymes too!
A little less preachy than "Read this!"
0
Q: Calculator in HTML,CSS,JS

AshokkumarI am new to Javascript and HTML. I have written a code for calculator function, so review my code and points out pros and cons in it.Thanks in advance. (function ($) { var shiftflag = 0; var fontreducer = 0; $.fn.close = function () { $("#dragging").remove(); }; ...

0
Q: Restricting types not related through inheritance without using instanceOf by creating own class heirarchy

shrewquestRestricting types not related through inheritance without using instanceOf by creating own class heirarchy Need to interact with a key value data store, will convert to object before putting but need to convert back to fields after getting from DB with Function, something about this wrt inherita...

08:09
@200_success looks neat
08:54
nice
0
Q: Delete orphaned SIDS + change fullcontroll

oliver.gfI need to delete all the orphaned SIDs in the ACLs of about 20 shares (between 100GB/6TB) and change full control of users groups to other permissions (modify or read/execute). I have done this script but I'm pretty sure it's easy to improve. Any advice? $root = "\\192.168.1.1\folder" $log = "C:...

0
Q: Python 3 - better iterate over list or over range of indexes?

Byte CommanderUsing Python 3 (3.5 to be exact), I want to iterate over a two-dimensional list. I have the choice to either iterate over the list content directly, or to iterate over the list indexes (range(len(my_list))), both using nested for loops. Which one is performing faster and/or with lower memory ...

> What the caterpillar calls the end, the rest of the world calls a butterfly - Lao Tzu
Interesting quote on my Momentum dashboard this morning
Naruto answer; accepted non-selfie answer with 0 score: JavaScript ajax formquestion editor
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Archiving an SQL table of sessions and statistics
09:16
0
Q: Hackerrank challenge - Dictionaries and Maps in Erlang

vbalazsThis question is really similar to an existing one in Ruby. So the task is also the same: Day 8: Dictionaries and Maps! The problem is that on Hackerrank my solution only passes the first and last testcases. All the other ones between them are timing out (>12s!). I tried to use map instead of di...

0
Q: How to get metadata dictionary for only one file at a time instead of all files?

xavierI have written this funcion in order to extract metadata from a .flac file, but the output is the metadata for all the .flac files in the directory. How can I get one file at a time so I can keep on working with its metadata on this same function ? 1 import os, re, rarfile, mutagen 2 3 XP...

09:30
tfw you have to log a helpdesk call to get VS Enterprise on the network because the firewall keeps corrupting the installer.
lol
have you used Jekyll before, @DanPantry?
@Quill in passing, why?
I've more experience in Hexo
I'm running it for the blog I'm setting it up and the liquid system is pretty cool
@Heslacher yeah, that one is pretty good
09:59
Amazing, it's not the installer being corrupted, VS is just hanging up
There are too many things you should understand before taking advantage of a code review. If you are willing to learn, look at this Gist I just wrote — Raffaele 24 secs ago
Monking @all
monking @Mast
@Quill Got an explanation with this? Do you understand it's at least incomplete and only there to indicate I think something like that should be the solution?
return arr.sort((function(a, b) { return a - b; });).reduce(function(a, b) { /* */ });
{ return a - b; }
you can't have a semicolon in the middle of a oneliner, like that
10:12
> arr.sort((function(a, b) { return a - b; });).reduce(function(a, b) { /* */ })
;
SyntaxError: missing ) after argument list
    at Object.exports.createScript (vm.js:24:10)
    at REPLServer.defaultEval (repl.js:225:25)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:417:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:210:10)
    at REPLServer.Interface._line (readline.js:549:8)
the comment wasn't clear enough, apologies
I think I can remove the semi-colon without invalidating any answers. If so, I probably should for completeness sake.
The last part of Barry's answer was what I was aiming at.
it's an example of what you'd want. should be fine
No one has really noticed the extra semi-colon
But it breaks your code, so I would remove it ;-)
@DanPantry Quill did ^^
10:13
Except @Quill
this is why you don't try & shove everything into a oneliner
:p
Like other commentors have suggested, arrow functions would be good here
Just kidding. It was a good question :-)
> Gauss was once interrupted in the middle of a problem and told that his wife was dying. He is purported to have said, "Tell her to wait a moment till I'm done"
possible answer invalidation by Mast on question by Mast: codereview.stackexchange.com/posts/117166/revisions
3
10:15
Twitter down anyone`?
Thanks for pointing out the brokenness @Quill
jip twitter finally down ;)
Stuff I learn.
sorry, I should've done it in chat
@chillworld @Käsebrot and nothing of value was lost!
10:16
@Käsebrot you can like it on FB
@DanPantry I'm not on twitter ;)
I have a twitter account just so I can say I've used it and that I hated it
@Duga Mwuahahaha.
@DanPantry I have one, but I rarely use it. Never posted a thing on it.
I never saw the point
Same here.
Anything you can say in 155 characters is not worth saying
10:17
You do realize most chat comments are less than that, right?
Which he says, in 58 characters
for me it is a very fast way to inform myself
Probably a question for Code ReviewFrancesco Pitzalis 14 secs ago
possible answer invalidation by user1610950 on question by user1610950: codereview.stackexchange.com/posts/117200/revisions
10:33
@Duga answer invalidation is correct, is the OP who added more info
0
Q: Secret Santa Application : Practical Interview Test

brianfI was given a practical task as part of an interview for a front-end developer position. There is a follow up interview and I'm looking for some constructive criticism / tough love to help me prepare. The guidelines were: - Should work on IE8 - Use CDN's for external libraries - Use whicheve...

10:47
Monking
Monking
hmmm.. I think I got a design problem there...
mockito is my new friend
@Pimgd don't overdo it :)
too late >=D
10:52
+1, too many mocks spoil the broth
Monking
Interesting query
possible answer invalidation by Bassie on question by Bassie: codereview.stackexchange.com/posts/117154/revisions
@Duga handled

« first day (990 days earlier)      last day (3326 days later) »