« first day (1162 days earlier)      last day (2858 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
RELOAD! There are 2517 unanswered questions (92.9343% answered)
 
0
Q: nonstd:: non standard classes

AaronNGrayI am looking for people's opinions on my use of a set of non standard "standard classes". Basically I am working on a 'modern' C++ Lexical Analyser and Parser Generator duo to replace flex and GNU Bison which will work as a library and tool combination. Anyway to cut to the chase I have a number ...

 
jrh
12:53 AM
4
Q: Custom list to avoid out of memory exceptions

TheLethalCoderThe following class is a helper to avoid OutOfMemoryException exceptions being thrown when the list is to large so that it is added onto the large objects heap. To do this it adds the items onto the heap as smaller arrays contained inside of a list. Some quick notes: I prefer not to use var. T...

I'd like to write a comment asking why he implemented IDsposable on a List but I haven't got sufficient rep
 
@zaftcoAgeiha : It might needed to be done from within a python application itself, like in my case and the reason I came here for : ) . I did the same using "sed command" invoked on the shell from python script but my code reviewer didn't want to spawn a new process for such a simple thing..... Both have pros and cons, like in python file needs to be read in memory and can be an issue for large files but I need to get my code checked in : ) — ViFI 42 secs ago
 
jrh
I think what he was trying to do was to add that as a convenience method, e,g., if you just loaded a hundred Bitmap s and you wanted to get rid of them all at once
 
It won't do anything except make your code easier to read. I didn't even know you had an issue to be honest, you never mention one in your question. Sounded like you wanted a code review. — dan 18 secs ago
 
jrh
1:18 AM
there's also some kind of serious bug in his IEnumerable implementation
if I add 10 integers to his list and do a foreach over it it keeps going well beyond 10 entries
 
2:00 AM
So, I go a notification about a badge on meta, which got me looking at a post there, which in turn got me going to codecrap.org, where I found codecrap.com/content/8205 .... Sometimes people are actually brilliant.
3
 
2:45 AM
possible answer invalidation by Jonathan Portorreal on question by Jonathan Portorreal: codereview.stackexchange.com/posts/134097/revisions
 
3:04 AM
0
Q: Mail Service Implementation Using Razor Engine & MailMessage

Mike AndersonThis is a very basic Mailer service that I put together after finding out that MVC Mailer doesn't play nice with MVC 5. public class MailerService { private const string domainEmail = "admin@mydomain.com"; private void Send(MailMessage mailMessage) { using (var smtpClient = n...

 
3:15 AM
0
Q: Python Tabletop Initiative Tracker

AlexanderI wrote my first Python program today after working through a few books. I decided to build a group initiative tracker for our D&D group and was hoping to get some feedback. Critiques on code efficiency, formatting, suggestions etc would be appreciated. My plan is to eventually take this from a c...

 
@jrh Late response, but it sounds like maybe you should just write an answer pointing out those problems
 
 
1 hour later…
4:47 AM
-2
Q: hi help me to loop my code please

user110950import java.util.Scanner; public class Act1{ public static void main(String[] args){ int cardNumber = 8161992; int pin = 1234; String name = "Kate"; char gender = 'F'; double accountBalance = 1000.00; boolean accountActive = true; int getCardNumber; in...

 
4:59 AM
this should be posted in codereviewguradio 44 secs ago
 
5:29 AM
This belongs on code review. — mplungjan 50 secs ago
 
5:45 AM
This would probably do better over at codereview codereview.stackexchange.comJesper Juhl 32 secs ago
 
0
Q: Newbie, crashes with error. Why?

Douglas KnappThis code is from a tutorial and it says it should run but it does not. I get these errors. Why? Does this have something to do with python 2 VS 3? How do I fix it? Thanks! Traceback (most recent call last): File "BounceGame.py", line 8, in class PyManMain: File "BounceGame.py", line 31...

 
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com. — nnnnnn 45 secs ago
 
6:12 AM
A slightly earlier draft of the same program is up for review but it's easier to read on GitHub with line numbers and syntax highlighting. — luser droog 5 secs ago
 
7:08 AM
0
Q: Multi Producer - Single Consumer

Vishnu Reddy/*Hello All I have written code for multi producer single consumer code with bounded buffer. 1. Please review the code and suggest for any improvements or mistakes 2. I Welcome all your valuable suggestions */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> #incl...

 
possible answer invalidation by janos on question by Neelesh Salian: codereview.stackexchange.com/posts/131927/revisions
 
7:38 AM
0
Q: Bilingual code for removing a specific character and its neighbors from a string

CodesInTheValleyAssume we have an string that contains the character 'c'. This character can be located anywhere within the string. The exercise is to remove 'c', and the characters that, if exist, are on its immediate left or right. I have devised an algorithm, assuming that 'c' = '*', which its flowchart can b...

 
7:48 AM
0
Q: Calling TWITCH API and displaying online/offline users of a channel

isoscelesI've got this working almost to where I want it. The part I can't get right may be due to the programming so I'd like to get a review. I'm making JSON calls to the Twitch API that sends back a list of people who are streaming video on code camps channel on the Twitch website. I have a semi pop...

 
8:10 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: XML/HTML batch generator
 
-1
Q: homework c assignment

drixmeQuestion (15 marks) You’re required to build a game ‘Boom-The-Battleship’ in C program that fulfil the below requirements/rules: • The mission of the player that plays the game is to find the battleship of your enemy through a masked out map. • The game should have a 20 rows x 60 columns si...

 
9:17 AM
> You will need to use multi-subscripted array
A what?
 
I guess he mean a multidimensional array
 
That would make sense, since he's shooting at a 2D board.
 
9:55 AM
0
Q: Guess how many are in the jar game in Java - Take 2

Nilzone-Original question can be found here I took the advice I got to heart, and re-wrote it. Once again I'd appreciate any advice as to how I can improve this using best practices. Jar.java package com.tn.jar; public class Jar { private String itemName; private int numberOfItems; priva...

 
10:07 AM
Monking
 
If you have working code and ask for improvement you should better ask at SE Code Review. — πάντα ῥεῖ 1 min ago
 
@Duga RBA, possibly incoming.
Monking @DanPantry
 
10:45 AM
0
Q: C++ code compiles successfully in ideone but gives Compilation error in Spoj EC_CONB

Gaurav KumarHere is the code https://ideone.com/JwjssZ which is my solution of http://www.spoj.com/problems/EC_CONB. If there is a compilation error in the code, it should appear in ideone also but it doesn't. Can I get a little help here? Thanks.

 
10:58 AM
@DanPantry hey there
how was mandatory company sports day
 
11:09 AM
0
Q: Gives correct output but slow

Raghav RaghavendraI'm new to this competitive programming world. This morning I came across this question, which required the time to be less than 1 sec. But my code runs for 1.000069 sec, thereby rejecting my solution. Question: There are N chocolate boxes, and you will be given with a chocolate index for wh...

 
11:19 AM
@Quill mandatory
and not very fun
I just stood around
bonus points for having to navigate through massive crowds to get home because everyone was queued up along the city center to await the welsh football team's return
if I was claustrophobic before...
 
@DanPantry stood around dreaming of all the rep you could've been getting
 
@Quill lol :) of all the code I could be writing.
I've been interested in writing a very basic Pokémon battle sim the past couple days, nto really sure where to start though. the actual sim would be easy, it's the whole taking-in-of-turns etc thing that isn't.
I know there is already one, but this might teach me a good deal about FSM etc so it would be interesting to write my own.
 
FSM is cool, good way to get into writing tokenizers
@DanPantry sounds like a good community challenge ;-)
 
I don't think it would be feasible to recommend it as a full community challenge, but maybe something cut down a bit. Perhaps a simple battle sim that allows for 2 players to take turns (could be AI or another player, it doesn't matter)
you're welcome tos uggest it as your own, but I don't think I could come up with a formal challenge that would either be too challenging or too easy
 
meh, a battle sim probably isn't all that hard
both players submit an action, sort actions by parent pokemon's speed, apply actions, return to submit stage
if you tried to write some kind of syntax, then maybe it would be a bit harder ;-)
 
There's a good enum library for es6 as well: 2ality.com/2016/01/enumify.html
 
I'm really enjoying this ATM
 
Zak
May I suggest: "Rock-Paper-Scissors-Lizard-Spock"
Ooh. Now I'm thinking of "arbitrary-number-of-moves, arbitrary-number-of-players Rock-Paper-Scissors"
 
@DanPantry If you want to learn about FSM, the Wikipedia article on it has some good info
3
 
@Quill god damn it
 
Zak
11:50 AM
@Quill I got sucked into reading the whole thing. Not even mad, it's hilarious.
 
I like that New Zealand allow marriages and the US won't even recognise it
 
This question is better suited for CodeReview. — trincot 1 min ago
@trincot Looking at it I agree. Codereview or DBA though? — alkis 25 secs ago
 
0
Q: MVC - One userprofile for company and person

MilanoI would appreciate if you tell me your opinion on this solution. The point is that I'm creating a web page which has two types of users with very similar permissions. Person and Company. The main difference is in their attributes and probably different billing. I've created only one userprofile...

 
12:05 PM
@Quill @Vogel612 tried putting it into a community-challenge. Didn't get enough votes.
Well, a DFA really, but close.
 
I'm voting to close this question as off-topic because it's asking us to do a code review on working code. Code Review would possibly be a better fit, but make sure to review their help center before asking. — theB 41 secs ago
 
12 hours ago, by Duga
RELOAD! There are 2517 unanswered questions (92.9343% answered)
We are close to reaching sub-93%.
 
Btw, this question would be better suited for codereview.stackexchange.comJesper Juhl 30 secs ago
Also note, if you have working code and want to ask for ways improving it you should better ask at SE Code Review. — πάντα ῥεῖ just now
1.) include the code as text, not as an image. 2.) questions about optimization are good on Code ReviewJorn Vernee 26 secs ago
 
12:30 PM
Janos endorsing me for Javascript
what is this troll behaviour
 
huh?
 
12:51 PM
monking :)
@JeroenVannevel you're right, I should have double-checked on your JavaScript experience
hm, nada. looks like I screwed up
 
Let's call it precognition. Now please learn JavaScript
7
 
Supercool and helpfully commented. I wish I could contribute to a code review, but I'm a novice. My only comment on the markup is that if you want to emphasize the user it seems to me that leaning more heavily on HTML and CSS could be useful. (In paritcular, the tag names, the ability to specify an external style sheet, and the CSS synatx for style sheets.) Finally, you are probably aware of anastigmatix.net/postscript/Hyphenate.html but just in case. — Alan 54 secs ago
Supercool and helpfully commented. I wish I could contribute to a code review, but I'm a novice. My only comment on the markup is that if you want to emphasize the user it seems to me that leaning more heavily on HTML and CSS could be useful. (IViz, tag names, external style sheet, and the CSS synatx for style.) Also: anastigmatix.net/postscript/Hyphenate.html just in case you missed it. Finally, have you using restructured text as your markup? It seems you would like your raw documents to be very readable, and the (Python) parsing code is public domain and well tested. — Alan 36 secs ago
 
1:10 PM
@janos his javascript experience is enough to sound correct when he trolls Dan
 
in my defense, LinkedIn should really have given me better options (to endorse)
 
@zʏᴀʙiɴ101 It already is sub-93%.
@janos My recruiter told me I should start using LinkedIn. Almost choked on my coffee...
 
@Quill which is all anyone needs, really
 
Speaking of js, React is really nice
 
@Mast seems like a sensible advice
 
1:24 PM
@janos I used to use it. Until I got swamped by requests from Indians.
 
> synatx
 
@Mast ouch
 
I hadn't even finished university at that point, but I was quite sure LinkedIn was not the way for me.
 
you never know through which channel your next dream job might find you
 
True.
Networking is the hardest part of keeping in the game, at least for me.
 
1:28 PM
not sure though if LinkedIn has ever helped me with anything so far
 
@Mast What'a the Zombiw rate right now?
on mobile, can't type correct
 
@zʏᴀʙiɴ101 The unanswered rate is above 7%, as you linked.
Not sure what the zombie rate is.
Not sure whether that's relevant either.
 
92.9343% < 93%
 
Exactly.
Sub 93.
 
To be sub 93, the zombie rate has to be above 93%.
 
1:32 PM
@zʏᴀʙiɴ101 That's not the zombie rate, that's the answered rate.
 
Ah k ;(
 
Zombies are questions without upvoted answers.
 
0
Q: C# Linq Split IEnumerable by Predicate

Heman GandhiIn order to divide an IEnumerable in C# by a predicate, I implemented the following (in a static class): public static IEnumerable<IEnumerable<T>> SplitBeforeIf<T>(this IEnumerable<T> input, Func<T, bool> pred) { //This exists to store the predicate satisfier, which I kept as //the first...

0
Q: Simple inbox functionality using Javascript and Ajax

Ashkan PourghasemSo I've been developing a simple CMS both for practical use and learning about Laravel, and I decided to implement a simple service that makes it possible for the administrators to send messages to one another. However, the finished javascript code, while completely functional, ended up being a b...

 
and unanswered includes questions with answers if all answers have 0 score
There used to be a page with a quick summary of the number of users, questions, answered % etc. It was in the sidebar. I cannot find it anymore. Is it hidden for graduated sites?
 
@janos Are you referring to the Area 51 page?
 
1:42 PM
@Mast no, I'm referring to the Site Stats box on not-yet-graduated sites, for example vi.stackexchange.com
 
@janos Yea, those are gone.
It's the same stats though.
 
Questions about performance of working code belong on codereview.stackexchange.com. — Spencer Wieczorek 25 secs ago
 
@Mast Are you sure? It says 94% answered rate, while Duga thinks it's ~92%
 
@janos Duga says it's just under 93.
Blame caching and different methodologies for the rest.
Perhaps Area 51 only counts questions older than X days.
 
or the numbers were frozen, like the rep of the active users at the time of graduation
 
1:50 PM
I wasn't comparing Duga with Area 51 though, but Area 51 with the stats on the main sites of beta.
@janos You may very well be right there. It's right on the Area 51 sites...
> At the end of beta, this site had...
My bad :-)
Explains why the questions/day is so low.
 
If your code executes as expected, this question may belong to codereview.stackexchange.com rather then SO... — Bob__ just now
Oh, didnt know codereview was a thing. I was wondering why all the down votes. I'm not sure how compatible smart pointers are with Unreal Engine but I'll keep them in mind as I move forward :) — Ozzadar 41 secs ago
 
hi N3buchadnezzar
 
@janos How is it going
 
thanks, just chilling on a Saturday afternoon
and you?
 
2:06 PM
just got home. Need to pack again, sigh
Just trying to catch a break and eat some
 
0
Q: Storing more than one information into one Node in a singly linked list

MinchaeI'm trying to add several information into one Node in a singly linked list... How do I do that? After asking the user for several vehicle information: plateNo(String), vehicleType(String), serviceType(String) I will have to store this information for each vehicle. I have to use a singly linke...

 
@CaptainObvious Not sure if serious or not...
One reasonable way to do it would be to use a database
 
Perhaps he's trying not to use a database.
BAM, have a close vote.
 
2:41 PM
0
Q: Using while loop as main conditional for Hi-Lo game

V ChauI am new to Java and StackExchange in general, but wanted to get some input on the code below for a CS class I am taking. It is a program that plays the Hi-Lo guessing game with numbers. A user may choose to quit midgame by entering 0 and then they are prompted to play again if they choose. If ...

 
3:03 PM
Little activity such sad
 
@N3buchadnezzar It is usually quite quiet on the weekends
@janos lol
@JeroenVannevel What's your linkedin/
So I can not endorse you for JS.
:^)
nvm, found it
 
curious I didn't have you yet
 
Lmao, quality shitpost on LinkedIn:
> At 39 lost all his money ( circa £3.60ish) . But despite all the adversity and through shear determination .. he managed to complete his first Novel ! ....He plans to read a 2nd very soon
 
or @EBrown for that matter
all 2ndmon people added me a year ago
 
Ah, that's why then. I'm a 2ndmon robot, not a person
 
3:25 PM
0
Q: Comparison in JavaScript does not work

Two JuncosI am working through the Free Code Camp projects. I am not asking for a solution. I am asking for a review of my code that doesn't work. In one project called "Pairwise" there is a given array of numbers and a single given number for input. You go through the array and add two numbers in the ar...

 
@Mast "At the end of beta, this site had...", I don't think that's updated anymore.
 
2 hours ago, by Mast
> At the end of beta, this site had...
I noticed.
 
Alright, good :)
 
jrh
3:42 PM
@Phrancis okay, I'll work on an answer, it might take a while though. I've never implemented IEnumerable or IEnumerator but I think I can figure it out
I usually return Lists
 
@jrh List implements Ienumerable, so it would be as simple as changing List<T> to IEnumerable<T>
The downside of this though is that if you are relying on any of the mutable methods of list (.Add) - IEnumerable<T> doesn't support those.
 
jrh
thanks Dan, I'm talking about this question though codereview.stackexchange.com/questions/134279/…
when I was going through his code I noticed that foreach isn't working
 
Is it just me or does that question not make sense?
 
jrh
I'm spending some time getting familiar with exactly what the CLR does in a foreach, and in what cases you need to actually do something with Dispose
 
Every .NET app has at most 1.5GB or 2GB heap size or something like that
 
jrh
3:54 PM
@JeroenVannevel it's not just you, yeah
 
whether you allocate that in the LOH or Gen1/Gen2 doesn't make a difference. It's all counted together
 
> The following class is a helper to avoid OutOfMemoryException exceptions being thrown when the list is to large so that it is added onto the large objects heap.
 
jrh
though I was able to allocate 16 GB worth of data to the list
 
Can someone please explain why you would ever want to do this?
3
 
LOH is good, provided it's a longlived object. Still it seems like a curious solution
 
3:55 PM
@t3chb0t The list is being loaded from a file, the object is so large that it gets added onto the Large Object Heap that has different memory managements. By adding the arrays into the list it isn't added onto the LOH and avoids the exception — TheLethalCoder yesterday
 
I'm with @DanPantry.
 
I guess that sort of makes sense, if the list is being loaded from a file
 
There's usually no need to store 16 GB of data in a list in the first place.
2
 
But... one does then have to ask: is there no way to use a Stream to load it and then split up teh workload amongst many processes in the first place?
 
If you read from a file, read bit by bit and then yield return
 
3:56 PM
I think trying to load 16GB of anything into memory is probably a bad idea unless you're using a database.
IOW, unless OP gives more info, I think he has an XY problem
 
jrh
my whole computer slowed down to a crawl when I did that
 
@DanPantry My guess is that there is a way, but some programmer doesn't know about it
@DanPantry s/unless/even if/
 
jrh
and it only works on a x64 build
there's definitely something odd about the premise
 
Could you explain a bit more about why you're loading that large amount of data in the first place? Is there no way you can load in the data via a stream and split up the work amongst many processes? I'd imagine you might get better bang for your buck than trying to hamfist your way into going past CLR limits. — Dan Pantry 5 secs ago
 
jrh
it sort of reminds me of trying to make a 200 GB array in C
 
3:58 PM
I also don't understand why OP doesn't use var.
var is great when the type is unambiguous.
Otherwise you end up with Java but in a different naming convention (which may be a good or bad thing, depending on your viewpoint)
but, really, without further info, it sounds like he's trying to reinvent the wheel instead of using Stream
 
jrh
another thing I wanted to ask him is why he is having his list implement IDisposable
that strikes me as really odd, I wouldn't expect SomeList<Bitmap>.Dispose to dispose all of the bitmaps in there
 
I believe the reason he is doing that is to execute Dispose on all elements within the list when the list is disposed itself
That's kinda bastardised because you can see he's checking that at runtime when he could work it into a generic constraint..
public class ChunkedList<T> : IEnumerable<T>, IDisposable
This could become...
public class ChunkedList<T> : IEnumerable<T>, IDisposable where T : IDisposable
but it seems he wants the IDisposable thing to be optional, which violates SRP.. very confusing overall
 
jrh
should he implement a finalizer?
 
I wouldn't use a finaliser in this case if his concern was deterministic memory management
Finalisers in C# are undeterministic - they are called when the object is destroyed. That could be a long time after you as a programmer decide it should be
Dispose is useful for when you are trying to deal with non-managed resources like database connections or whatever
Those types of resources have extra "things" to them that can't be removed just by simply removing the object from memory, like, well, database connections, file handlers, w/e
 
jrh
I guess it seems a little inconsistent to me, on one hand the List implements Dispose but not finalize if Dispose isn't called
I'd sort of prefer that the List not care about freeing up its entries at all though
 
4:06 PM
finalizers are for unmanaged resources
if there's nothing unmanaged then you shouldn't implement it
that being said: the proper default IDispose implementation does provide an implementation for the finalizer
 
jrh
I know, what the OP of the question did was implement Dispose on the List which Disposes all of its entries
i.e., in case it was a List<Bitmap>
personally if I make a List<Bitmap> I'm okay with doing foreach(Bitmap bitmap in Bitmaps) bitmap.Dispose()
instead of MyBitmapList.Dispose()
 
eh I'm talking crap. Dispose is for unmanaged stuff as well
nevermind
 
jrh
IMO the List.Dispose method is kind of deceptive
 
@JeroenVannevel AFAIK Dispose is explicitly for unmanaged resources
 
jrh
what if I stored a bitmap as a private field somewhere? It would have seemed to just disappear
 
4:09 PM
You can't rely on when the finaliser is called, but that may be a considerable amount of time after when you want the connection to be closed (in my example).
@jrh It's extremely deceptive. In my very short review I mentioned that OP should either make the Dispose behaviour more obvious, or do away with it altogether.
In the words of the Rust masterrace (@skiwi), this behaviour would not be allowed as it's not safe
Esp if it crosses multiple threads, that just seems like a really bad idea
 
jrh
yes
I was thinking of giving an example of a picture viewer as a List<Bitmap>
if you temporarily load the bitmaps into a list for some reason, and then the list gets disposed
WHOOPS suddenly DisposedExceptions
even though there might still be active references that were once valid
 
I have a feeling this question is going to go HNQ though
 
jrh
HNQ?
 
Hot Network Questions
 
jrh
I think it already did
 
4:13 PM
@DanPantry Whicj
 
..lol
 
jrh
oh geez
 
5
Q: Custom list to avoid out of memory exceptions

TheLethalCoderThe following class is a helper to avoid OutOfMemoryException exceptions being thrown when the list is to large so that it is added onto the large objects heap. To do this it adds the items onto the heap as smaller arrays contained inside of a list. Some quick notes: I prefer not to use var. T...

 
Wow, anyone seeing the disputes around this?
Turns out OP plugged their own article and linked to it as a source when asking the question lol
he also linked same website on another question he asked.. incoming hammer for self promotion?
 
4:19 PM
0
Q: Divide decimal by range of fractions, and then convert the fraction that is closest to a whole number to a mixed fraction

OwenMy program will divide the decimal (30.0575) by a range of fractions (1/1, 1/2, 1/3, ..., 1/48) leaving me with list of improper fractions that look like this: > 1/1 * 30.0575 > 1/2 * 60.115 > 1/3 * 90.1725 > ... > 1/48 * 1442.76 My program will then "pick out" the improper...

 
2
Q: C# Linq Split IEnumerable by Predicate

Heman GandhiIn order to divide an IEnumerable in C# by a predicate, I implemented the following (in a static class): public static IEnumerable<IEnumerable<T>> SplitBeforeIf<T>(this IEnumerable<T> input, Func<T, bool> pred) { //This exists to store the predicate satisfier, which I kept as //the first...

Both of the answers on this question are code-only. :( I don't like it. But I don't know how to respond to it either
 
Zak
50 year old code from the lunar lander ^^
 
@Zak lol
 
@syb0rg Hope it's OK that I criticized your review in my own review..? :)
Or is that bad etiquette?
 
possible answer invalidation by Tomb on question by Tomb: codereview.stackexchange.com/posts/132055/revisions
3
 
4:30 PM
@Duga lol.
for some values of "possible"
rolled back
 
Should this be closed? "oth these points are done in the function Offline_Markov, which I am not sure if does the separations correctly."
 
@StewieGriffin It just means you have to have a duel to the death. Nothing serious.
7
 
@N3buchadnezzar He looks terrifying on the profile pic, but I've got the tools, including mind-control devices, time machines and rocket launchers...
 
@StewieGriffin You should mention why numel is preffered over length. I have used matlab for a few years, but someone not familiar with the software probably dont. The reason I have heard is that numel is much faster for matrices.
 
Will do :)
 
4:34 PM
The machine versus the evil baby, who will win?! You decide.
 
haha :)
I think this graph should suffice =) stackoverflow.com/q/3119739/2338750
 
How is it going @StewieGriffin?
 
Good good =)
 
good good
 
Posted two reviews the last two hours... Record for me :)
 
4:38 PM
"Often people use max(A), when they want to find the maximum value of all columns in a matri"
"Often" here should be "usually" no?
 
@N3buchadnezzar Sadly, yes... :/
 
My English is horrible, so be wary of any advice :p
 
Hehe, I didn't think it was about the grammar, but rather if it was something that happened often, or usually...
Usually > Often... And sadly, usually was more correct in this context.
And my English is probably horribler :P
 
@StewieGriffin I'm fine with all criticism, as long as it's constructive! :-)
6
 
@syb0rg Pfft! You're just afraid of the "duel to death"!
 
4:59 PM
@StewieGriffin :p
 
0
A: Calling TWITCH API and displaying online/offline users of a channel

Dan PantryPick a style guide. Your whitespace is truly amazingly horrific. I'm not sure why you have 7 lines of whitespace or your for loop declaration is on a different indent to your closing brace for it, but try and keep things consistent. A lot of your code would be a lot more readable if you kept y...

3rd review in the past couple days ^
 
@DanPantry Remember to upvote the question!
 
@DanPantry You're on a roll.
 
This is ten percent luck, twenty percent skill
 
@DanPantry Just by reading chat it looks like that OP is really wanting some undefined behavior
 
5:03 PM
@StewieGriffin can't debate sadly, mobile rn
 
Though to what extent does a language like C# or Java allow undefined behavior?
 
@N3buchadnezzar What's the other 70%?
@skiwi Think really hard about what you just asked.
Really hard.
 
Fifteen percent concentrated power of will
Five percent pleasure, fifty percent pain
And a hundred percent reason to remember the name!
 
@skiwi Probably threads
Since bounds checking is all the rage in Java, right?
 
5:28 PM
@DanPantry Perfectly imperfect.
 
0
Q: File Upload - Node Streams

ronagI'm implementing a file upload using a nodejs. I've got fully functional code. However, it feels overly complicated and I'm hoping there would be an easier way to implement the same thing? In particular what I want to achieve is Write the request to a file Send upload progress information S...

0
Q: Pairwise programming challenge - Free code camp

konijnChallenge: Given an array arr, find element pairs whose sum equal the second argument arg and return the sum of their indices. If multiple pairs are possible that have the same numeric elements but different indices, return the smallest sum of indices. Once an element has been used, it cannot b...

0
Q: simple React and Flux application

bittenPlease view the code in a repo here: https://github.com/bitttttten/react/tree/prototype/app I'm just trying to learn the basics of React and Flux, and the above code works and I can see it works nicely. I have a few questions, however: Why do you often see that people take their actions out o...

 
@EBrown ¯\_(ツ)_/¯
 
@DanPantry It was a play on your whitespace comment.
 
Ahh
 
Oh good point theB, didnt realize there was a section for code review. Its fine to close it. How do i do that? — dave317 1 min ago
 
5:35 PM
Added an ES6 section for it too.
Monking @Mat'sMug
I know you're here... you just replied to my answer.. ;-)
My average score on the js tag is 5 per post.. I think that's okay
-1
Q: simple React and Flux application

bittenPlease view the code in a repo here: https://github.com/bitttttten/react/tree/prototype/app I'm just trying to learn the basics of React and Flux, and the above code works and I can see it works nicely. I have a few questions, however: Why do you often see that people take their actions out o...

Code behind link
 
:-)
 
@DanPantry OP has added his code into question @Mast
 
6:10 PM
Ugh. I hate mathematicians. They area great at maths, but so horrible at programming.
How am I supposed to understand what your code does when you have zero comments, and only single letter variables? Uuuuuughhh
2
 
@N3buchadnezzar From your profile: "Studying to be a teacher and obtain a degree in mathematics."
What are you trying to say?
 
In other news...
@Duga now supports commit push on bitbucket
 
@user2296177 Most mathematicians :p
 
@SimonForsberg TS!
 
@zʏᴀʙiɴ101 RSA
 
6:15 PM
@EBrown Thanks :3
 
@N3buchadnezzar Your highest rated question has 23 upvotes, and your example in the question has a result of 23. As a mathematician, what are the probabilities?
 
0
Q: Can the help page on what a good answer is be updated with specifics?

pacmaninbwThe How do I write a good answer? page seems to be generic SE help page rather than specific to Code Review, can this page be updated with specifics? Is there a help page on how not to answer a question? I know this question has almost been asked before with this question. Two things prompted me...

 
@user2296177 Greater than zero
However there is a flaw in your logic. My most upvoted questions is about beheading knights, not cracking nuts with sledgehammers ;)
 
@N3buchadnezzar Oh, I had it by newest, woops.
 
#SuchPopularMuchVotesWow
2
 
6:26 PM
This may be above your payscale but you should have a look at Searching values of range X in range Y. — Jeeped just now
 
0
Q: Red Dotted Lines Everywhere

James.BOk so I wrote this code a little while ago and ran it a bunch of times trying all possible combinations just to make sure it all works and it worked fine and no errors came up but now when I bring it up in eclipse it shows red dotted lines under like the class name, the equals' and equalsIgnoreCa...

 
@Duga Sassy
 
@DanPantry I know, reverted downvote.
 
So apparently the PPCG folks have Community Ads now, I added one for Brainduck but what someone else said made me think:
in The Nineteenth Byte, 1 min ago, by Downgoat
@SimonForsberg >_> i have a bad feeling it's gonna be "stop writing bad code and come to CR"
anyone up for writing a CR Community ad on PPCG? :)
8
 
@SimonForsberg @Phrancis, interested?
 
6:48 PM
We're making progress already
in The Nineteenth Byte, 30 secs ago, by Downgoat
I'm so sorry >_> I posted an CR answer ;_;
 
Anyone here used to the html <template> element?
I'm writing a review and I'm trying to suggest using a templating library but it seems the template element is throwing a bit of a spanner in the works
gist.github.com/danpantry/21ee615e8a36fb555d0a69dcac8efb48 - note the comment on line 8. For the life of me I can't work out why everything after thati s escaped (but nothing else is).
It appears to be because td is only expecting flow content and <% isn't a valid HTML element, so it goes bang.
Which.. in hindsight makes sense because template should be valid HTML, not just an arbitrary string..
...I just fixed my own problem. nvm
 
0
Q: my c++ vector implementation

Will LevineI started this because I thought it would be a fun and easy way to brush up on my C++. It turned out to be a lot more complicated than I thought. I learned about std::allocator and move constructors and other things I had never seen before, so it was a good learning exercise. The interface is ba...

 
00:00 - 19:0019:00 - 00:00

« first day (1162 days earlier)      last day (2858 days later) »