« first day (954 days earlier)      last day (3066 days later) » 

12:06 PM
0
A: JavaScript: Simulating the process of removing multiple videos at once from a YouTube playlist

Quill for (var i = playlistIndex.length - 1; i >= 0; i--) That's not how we do for loops. for (var i = 0, length = playlistIndex.length; i < length; i++){ Including 1 as the second parameter in splice is the same as not including the second parameter at all. playlist.splice(playlistIndex[i],...

23 minutes
 
Why `for (var i = 0, length = playlistIndex.length; i < length; i++){`
and not `for (var i = 0; i < playlistIndex.length; i++){`?
 
because declaring the length in the loop is better
 
Well I assumed that, but I don't know javascript that well, what about it is better?
 
for arrays with millions and millions of entries it would strain the system to lookup the length every time
so you declare the length in the loop, there's not that potential strain, and the length variable is removed after the loop is through
 
possible answer invalidation by Ekult3k on question by Ekult3k: codereview.stackexchange.com/posts/113676/revisions
 
12:15 PM
Ah of course, that makes sense.
 
@Duga um wtf
Thank you very much for various useful tips. I can learn so much from your answer. — pourrait puet-etre 59 secs ago
now that brings a smile to my face
 
@Quill That user's name means "could maybe" in French
 
that's interesting
c'est si bon
 
(though they spelled it a bit wrong)
 
I don't speak french, although I wouldn't mind learning it after I get at a n3 Japanese level
 
12:25 PM
I asked the same question on code review site. I got some very good review comments to do this. You can check the question here codereview.stackexchange.com/questions/102289/…Sandeep 17 secs ago
 
@Quill Immediate +1 for referring to the wiki of ArnoldC to explain best practices.
 
thanks :-)
see the ending of the post though
big shocker
I almost >!d it
 
You may want to declare language: none on that answer :)
 
meh
 
12:36 PM
I'm not sure where that bug comes from though, it prints Fizz AND Buzz perfectly fine here.
 
Oh I already did that declare, haha
 
@Mast that's not what the loop suggests
it's a three layered if - else statement
 
@Quill Have you tried running it?
 
uh no
 
Try running it. I'll debug it back at home to be sure, but I'm very confident it's working exactly as it should.
I did encounter that problem and found a fix for it, the fix should be in the code in the question.
 
12:39 PM
> missing IT'S SHOWTIME on the first line
 
@Quill You need it when starting the main, not earlier.
 
The functions are defined above it.
 
that's what this online compiler said
 
The compiler is flawed. It works with the official compiler.
Perhaps I'm abusing a bug in the official compiler. Who knows.
Works On My PC
 
12:44 PM
why was this deleted
its sister post wasn't deleted
its sister post actually described the post I'm talking about
it literally referenced functions not in the one
> if (arg[0] != "eve"
&& arg[0] != "eve,")
return;
wtf
@Mast, you're right, it compiles...
 
@Quill :-)
 
and mine doesn't
 
Are all bugs accounted for now or is there one open?
 
I can't actually understand why your code works ;-;
3
 
@Mast it can
I'm restructuring my answer now
I got rid of the part about the bug, but the rest is valid
 
@Quill Why did you 'wtf' that code?
 
a) formatting b) the check
 
How would you do it/improve it?
 
if (arg[0].replace(",", string.Empty) != "eve")
{
    return;
 
1:10 PM
Thank you
 
um okay
just to say
I'm also writing a review for that Q
 
0
Q: Multithreaded Mandelbrot Generator Ver 3

Rick DavinI thought Ver 2 was fairly solid but ending up modifying all but one method for Ver 3. Performance for Generate is the same, but I was able to simplify the method even further. SaveImage is now 12X faster. New to this version is the ability to specify how many ranges to be used when using TPL ...

 
hi
anyone knows what "a type safe accessor" means
I'm coding a challenge and one of requirements is
"Type safety is important and having a type safe accessor to properties is a requirement"
 
In computer science, type safety is the extent to which a programming language discourages or prevents type errors. A type error is erroneous or undesirable program behaviour caused by a discrepancy between differing data types for the program's constants, variables, and methods (functions), e.g., treating an integer (int) as a floating-point number (float). Type safety is sometimes alternatively considered to be a property of a computer program rather than the language in which that program is written; that is, some languages have type-safe facilities that can be circumvented by programmers who...
 
1:30 PM
I still don't understand. Assume that I have a Repository class which is just a wrapper of a Map<String, Object>
class Repository{
Map<String, Object> keyValueMap;
}
 
Zak
@HungTran Type-safety = "If I give you an input in a data type other than the expected one, will your program handle it safely?
Or: "Can I cause unexpected errors / erroneous output in your program by feeding it unexpected data types"
 
-2
Q: .net c# asp.net construct a hiearchy/ tree Structure

vineethi i have below structure of the table/dataset wanted to draw the tree like structure ssName ssName CaptionName sn1 NULL abc1 sn1 NULL abc2 sn2 NULL abc3 sn3 ssn1 def1 sn3 ssn2 def2 sn3 ssn3 def3 Tree would be like Sn1 abc1 abc2 Sn2 ...

 
@Zak: i got your point. But in the context of the assignment, I'm not sure what it means
Let's say I have this class and I'm supposed to provide a get method to retrieve a value from Repository
class Repository{
Map<String, Object> keyValueMap;
}
Is this one considered as not type-safety

public Object getValue(String key) {
return keyValueMap.get(key);
}
I forget to mention. I'm coding with java
 
@HungTran - what is the data you are storing in the Map? The key is a String, but what type of data is the Value?
Your Generic indicates Object ... but, I doubt that you are actually storing new Object() instances
 
2
A: Launching an interpreted script

Jon EricsonConsider starting the child process in a sandbox. /usr/bin/perl is likely safe from a malicious user since /usr/bin is typically looked down by the root user(es). But /home/demetri/bin/awklikeperl.pl could be replaced if the owner is not careful with permissions. Putting the process in a sandb...

if you want a hat, comment!
 
1:41 PM
@rolfl
 
@Hung
 
the type is any class
I'm thinking they requires me to provide a method

<T> public T getValue(String key, T clazz) {
Object object = keyValueMap.get(key);
// attempt cast Object to T
return (T) object;
}
 
Well, how are you supposed to use the class when you get it out? If it is an Integer, for example, you then have to Cast it to Integer to use it, and that cast is not type safe
That's a good start to the solution, using a generic method with the input clazz parameter.
Out of interest, for that, you should use clazz.isInstance(...)
Then, you can use clazz.cast(...) ....
What that does is relocate the type-safe checks in to the getValue method... it does not eliminate the typesafety problem, it relocates it. But, That's probably good enough.
 
Hello friends.
Oh, winterbash has started? CRAP
 
yes, it just move the type check into the method, not solve the main problem
 
1:48 PM
To solve the problem, you need to get rid of the Object in the generics.
 
I can't as it's part of the challenge that Repository can hold any value type
 
If that "ugly" code works, then why are you trying to fix it? It's not horrible, and you can always finish the program and then post it on CodeReview for better syntax — Ekult3k 54 secs ago
While we're on the question of best practices, you may want to start adding spaces between the "if" and "(". Coupling this minor code style change to adhere to java coding conventions will make even the pickiest code reviewer (me) have nothing to say about your if statements. oracle.com/technetwork/java/javase/documentation/…Russ 56 secs ago
 
@rolfl: thanks a lot man
 
@rolfl, not doing many hats today?
 
@HungTran Well, then, you're on your own there: Here's a guaranteed broken model you have to fix, but you can't change the model ...!
@Quill - I'm doing the minimum at the moment. Real life is busy
 
1:53 PM
Fair enough, good luck with that :-)
 
50/50 odds on me picking up the pace later.
 
Good afternoon guys!
 
hello
 
Zak
007 hat sounds fun.
 
also hard, we haven't figured it out yet
 
Zak
1:58 PM
I think Thor's hammer will likely be the hardest to get on CR (probably less so on meta)
 
maybe
 
Finally, I did it ^^
Passed my exam
 
Nice work!
also nice car
I'm 42 off rep capping CR and 15 off meta.se
 
@skiwi Not sure what's more scary, you, or you with a license, or you with hat-007 - license to kill!
 
@Quill Give me 5 years and I'll ride it again ;)
@rolfl hehe
 
2:04 PM
oh ;-;
@rolfl license to hammer
 
@skiwi You have to relicense every 5 years?
 
No, this was my driving lesson car, not my own unfortunately :P
 
ooh I know that question
 
morning!
 
2:07 PM
Yeah, someone already wrote a decent answer on it but I think there's more to say.
Morning, @TopinFrassi
 
@TopinFrassi hi
 
@skiwi "I passed my exam! looks grumpy"
 
@DanPantry Ah come on, it's not that bad
 
@skiwi Great work!
 
@DanPantry this one?:
1
A: Non-generalized Site Generator

Joseph the DreamerThis is normal behavior, especially to newcomers to the web - the "do everything in JavaScript after you discover its power". ANYTHING else. I'm just learning JS now, so any advice about style/idioms/whatever would be appreciated. Sometimes it's just best done where it should be done - mark...

 
2:07 PM
@skiwi 8) congrats though
@Quill Yes
 
I'm not a photonice person :P
 
I wrote the mediocre one below it
I need to improve it later
 
I didn't see that comment answer
 
@DanPantry! I need you to send me an email for the secret santa, lol. I don't have your email address
 
ouch
 
2:08 PM
@TopinFrassi dan@lambdaexpression.io
It's on my SO profile so I don't mind giving it out.
@Quill sorry <3
 
@DanPantry Thanks!
 
You should totally all upvote my post so I get a hat hahaha
 
God damnit.
I join 2nd monitor, my productivity instantly goes down
 
-1
Q: Best way to check if timespan of different persons overlapps or not

silly questionsMy current implementation, class Person { int id; String name; LocalDate start; LocalDate end; /*getters and setters*/ ... } private void checkForTimespanOverlaps(List<Person> persons) { final int totalPersons = superiorSalesAgentHasFunctionDTOs.size(); Loc...

 
I hate to ask for code review, but can someone see if this small portion looks troublesome? Intended use is a read only pointer return.
http://pastebin.com/9BCraSrY
 
2:12 PM
@CaptainObvious there I wanted to get my hat, but I had to downvote :-(
 
@TorbenC Don't hate to ask for code reviews, I mean, that's what we do :-) but if you want a good code review, you should try asking it as a question on the main site instead of in chat.
 
that ^^^^
 
You're likely to get far more comprehensive reviews on the main site than you will in chat.
 
Okay :) Thank you very much Dan!
 
just make sure to post the entire relevant section of your working code, of course.. which means no // elsewhere comments.
 
2:14 PM
Will do, thank you again!
 
Secret Santa Folks, the invitations have been sent! You will receive an email very shortly to join the group. As long as you do not answer this email, the draw will not be done. So please be quick
7
If some mod could ping that message. That'd be great!
 
@Vogel612 can you pin that?
thanks
 
Thanks!
 
NP :)
 
hurrrrrrrr derp. I can't log onto my email from this PC because I don't have my passwords synced. I'll log over sometime later today
 
2:23 PM
oh @Phrancis! what a surprise!
 
@DanPantry I had the same problem :p Had to use my cellphone 4G to go on my email address. lol
 
I think Code Review is better for your situation. Stack Overflow is for specific questions. — Thoughtful Cat 36 secs ago
 
@Duga I don't know why referring to CR even crossed their minds.
 
This would be off-topic for Code Review for two reasons: 1) Code is not included in the post, and 2) OP is seeking help/explanation on how to do something. See A guide to Code Review for Stack Overflow users before recommending it. — Phrancis 45 secs ago
 
Correct. Good catch — Heslacher 40 secs ago
lol :-)
 
2:31 PM
;-)
@Quill about the boat hat, did you delete your comment after you got it ? I have only found one post here on CR and it didn't had a comment from you.
 
I did delete it afterward
 
ok
 
some people said it was only one per post
but that might've been at a time
 
@Quill someone was faster
 
Yeah, :-) 3fast5u
 
2:36 PM
Sanic.
Gotta go fast.
> A group of wolves is called a pack. A group of crows is called a murder. A group of developers is called a merge conflict.
 
Lol
 
Zak
@DanPantry Join the secret santa group already :p
 
@Zak Am I not in it?
 
I'm done mine, just now actually
 
Zak
@DanPantry You need to go through a link in the email you just got.
 
2:42 PM
> hurrrrrrrr derp. I can't log onto my email from this PC because I don't have my passwords synced. I'll log over sometime later today
 
For many 2nd Monitor regulars, that recent chat messages section would say "lol ⭐ 5" and "gosh I'm out of stars again ⭐8" — Mat's Mug 51 secs ago
 
Zak
@DanPantry It's fine. You're not holding it up. yet.
 
> But my teacher create todo in code and i need to fix it, but i do not understand those todo. I need really help to Code Review. So i need your help to "CODE REVIEW" my shit-code. Thank you for your attention!
 
s/shit-code/shitpost
?
 
2:45 PM
-13, ouch
 
@Mast
 
Look at the revision history... ;-)
 
It'th wabbit theathon was by far the best question I've ever seen on this site. — Ekult3k 1 min ago
 
you can't pull me in the hatter business, @DanPantry
 
7 upvotes on such an incorrect comment? :S
 
2:46 PM
@Mat'sMug :-D
At least some people think it's a good question, good.
 
I'm a big fan of @rolfl's hat..
 
@DanPantry Not enough flair.
 
I just need two more upvotes on CR to rep cap for the day:-)
I'd better write another review
 
everybody got Hairboat's Revenge?
 
@Mat'sMug have you?
 
2:52 PM
I don't
 
@Mat'sMug I should get it any minute now.
Blame caching.
 
@Quill yup :)
 
nice
 
comment on any of Jon Ericson's posts
 
Jon who?
 
2:54 PM
SE staff member
 
Jon Ericson ♦, Downtown Burbank
141 5
 
I need to write a good question on mobile
 
@Phrancis Presumably he's the one who invented the Hairy Abby hat last year.
 
and he has one, single post on CR
 
@Mat'sMug He does?
Darn. How did I miss that.
So, are we allowed to spam the heck out of that answer?
That can't be right...
 
2:56 PM
Nice answer, but posted way too long ago. We need more of those, feel free to contribute again anytime! :) — Mat's Mug ♦ 5 secs ago
 
We can always delete the comments later
 
@Mast FOR TEH HATZ!!
 
I agree with the Mug here. Where did you go? There's plenty more questions to answer :-) — Mast 6 secs ago
@Phrancis sees flagfest commencing the 1st of January
 
@Mast you can't two at a time
 
@Quill I can't two what at what time?
 
Zak
2:57 PM
@Mast Technically, from midday on 31 Dec
 
can't have two comments on the same Jon post at once
the second commentor won't get the badge
 
@Quill Yes you can.
 
Zak
@Quill Are you sure?
 
Yeah, Tavern on the Meta were talking about it for a while
 
huh?
 
2:59 PM
I got my revenge hat on MSE on a question which was already commented on.
So, I call bullshit.
 
^^
 
Zak
@Quill How long might caching delay my hat?
that would definitively answer it.
 
idk 15 mins max probably
 
 
> You earned ... well that ^^
 
3:01 PM
@Quill ^^
Tell the Tavern they're talking out of their behinds again.
 
@janos @rolfl @DanPantry @EthanBierlein sign up with the secret santa email
 
@Quill Already did ^^
 
@Quill I'm writing a review bugger off >8(
4
 
NO, secret santa nowwwww
I'm the aussie here, I should be telling you to bugger off
 
I'm just here for the hats. — Dan Pantry 7 secs ago
 
3:03 PM
I've already got the hat, I just thought I'd join the shitposting — Quill 5 secs ago
 
@Quill You're mean.
 
and?
 
LOL, all the comments got removed
 
Zak
huh. Did the system auto-remove my comment, or is somebody cleaning up the comments on that question?
 
There's a hat for giving +200 bounties on other questions? :p
 
3:05 PM
I assume the latter.
 
Zak
@TopinFrassi Only one way to find out!
 
@TopinFrassi only on C# questions, maybe?
 
@TopinFrassi don't think so
@RubberDuck did one earlier
didn't get a special hat
 
@Quill I assume that's why Toppin asked..
 
Maybe it's just coincidence. :p
 
3:06 PM
since there's a second +200 bounty opened just a few hours later...
 
and no, he didn't get a hat
in Tavern on the Meta on Meta Stack Exchange Chat, 35 secs ago, by Jason C
@Quill You know, if I were to talk out of my behind I'd just get cake everywhere.
 
First bounty from Mat'sMug and second from RubberDuck
 
@Heslacher I think Mat's was before WinterBash
IIRC
 
I know there's a hat to close questions, but that shouldn't be in the "Close" queue.
 
oh my god
StackOverflow doesn't support the ```` tags
I've written my entire review in them
 
3:08 PM
for what?
inline code?
 
yes
You have to use four indents instead
 
ah, ctrl-f, ctrl-r
 
@DanPantry You could do a find/replace for the kind that SO/SE does support
There's an HTML-comment-like syntax
 
Github flavoured markdown, please, SO
 
no, I didn't put up the bounty for a hat. just because I found it looking for old posts to edit, I edited it, and then thought it would be nice if it had better answers. it's a beautifully over-engineered factory with plenty to say about, and yet the only answer didn't really cover anything.
 
3:12 PM
To be honest, I think Jon is going for Peer Pressure with this one:
-12
Q: Display starred chat messages on a user's site profile

Jon EricsonEver since chat was introduced as a third place, it's been a bit of a third wheel. Many people have entirely functional experiences asking and answering questions without ever finding chat rooms. Even if their comments are moved to chat, it's not obvious that there's an entire world of chat hidin...

 
0
A: Non-generalized Site Generator

Dan PantryLet's start on a few of the things you explicitly asked questions on before moving over to the code itself. Are my comments good? I'm coming from Java, and tried to use a Javadoc-like notation, but there doesn't seem to be any way to access the comments besides manually checking the source. The...

First review in ever..
And it was cut off by the evil Secret Santa crew
8
I would love to have some of my starred chat comments on my profile lol
Who wouldn't want gandalf et al appearing on their professional profile
thanks santa
brb relogging to windows
 
Zak
@DanPantry (secretly) "Ho Ho Ho"
 
-1
Q: Counting number of inversions in an array

spiderbatSo I am trying to count number of inversions in an array. Two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j... However I get correct answer only when array size is very less(<=5), o/w I get less than the actual answer..Obvioulsy I am missing a case or two, but I have spent h...

 
@CaptainObvious off-topic broken code
 
3:20 PM
@CaptainObvious Closed.
 
slammed shut
 
FCITW
 
Zak
Now we just need a duplicate-question so I can get my Mjölnir
 
I reworded it, it should be okay now
3 mins ago, by Captain Obvious
-1
Q: Counting number of inversions in an array

spiderbatSo I am trying to count number of inversions in an array. Two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j... However I get correct answer only when array size is very less(<=5), o/w I get less than the actual answer..Obvioulsy I am missing a case or two, but I have spent h...

 
The status on this question is still not resolved. Not a single CR regular responded on it IIRC.
86
Q: Let me see stars

fredleyHere is how the chat sidebar looks, annotated with how interesting/useful stuff is: On my monitor, I can usually only see the top two or three starred items, but I want to see more. Could something be added so that I could: Reorder chat sidebar items? Collapse chat sidebar items? Scroll the ...

 
3:25 PM
@Markus questions like this (i.e. working code) are not necessarily on topic here. Consider asking on codereview.stackexchange.com — TheLethalCoder 51 secs ago
 
@Mast Fredley made a chat plugin to do it
 
Hodofhod did as well.
 
@Barry @SuperBiasedMan @Phrancis @Mast @Mat'sMug what do you think of the update on this, it could be reopened.
 
Where did you get that hat? Where did you get that tile?
Isn't it a nobby one, and just the proper style?
I should like to have one Just the same as that!
Where'er I go, they shout "Hello! Where did you get that hat?"
Sorry, I had to
 
@Quill Not sure, and I smell you're fishing for a hat here.
 
3:27 PM
maybe I am, nonetheless
I'm sure a month is long enough to get 'I'm batman'
 
It's a quite crappy question.
 
Hosch and two others got it today
 
Thank you for clarifying. Sorry for ignorantly submitting the question. I will remove it at once. — spiderbat 5 mins ago
 
it works for some cases
 
Mat's beat me to it.
 
3:28 PM
> 5 mins ago
10 secs ago, by Quill
> 5 mins ago
 
@Quill I CAN READ!
 
takes 5 mins to find the delete button
and either way
lol chill
 
@Quill Where did your name go?
 
idk, aaggh!!!! hidden
-2
Q: Minecraft which takes many processor

Enzo Lodsmy minecraft sets a great deal of my processor when I open him would have you a solution I have already tried to reinstall Java but it did not work

saw this on the gift ideas page of the secret santa:
 
lol
 
3:31 PM
sorry that's the one
 
@Quill LOL
 
user image
4
n-no... amazon... i'm not like that
 
@Quill it's not like I like nicolas cage.. baka
 
lol
 
If you are having performance issues with correctly working code, you should consider asking this question on code review. According to their help page, question are on-topic there "If you are looking for feedback on a specific working piece of code from your project in the following areas… * Best practices and design pattern usage * Security issues * Performance * Correctness in unanticipated cases" — azurefrog 29 secs ago
 
@Quill Still off-topic to me
 
0
Q: Android app hates hats

Mat's MugI don't hate hats. Proof: Yet, the Android app isn't showing them: Saw this post from 2013 asking for hats in the Android app, and this one from 2014, also saying essentially "it's not worth it". Fine. Except, the iFolks got their hats on this year: That's religion-based discrimination...

 
Zak
@Jamal You should find a reason to edit that final answer. Then you'll have written/edited every part of that Q/A
 
Zak
Today's been fun. My "Projects on the go" List almost double between 9am and 12am. My "Urgent projects on the go" tripled.
 
@Zak Hard to find something to edit on this one.
Let's also work on this query, especially the posts one away from a silver badge.
 
Zak
I got my silver badge in my sleep :)
2
 
@Zak see! Sleep is good for you!
grats!
 
@Quill Uh, what? It's still broken code.
 
3:51 PM
it works in some cases as the question said
 
Sure. bool isPrime(int x) { return true; } also works in some cases.
8
 
A stopped clock is right twice a day ;-)
6
 
@rolfl really not the same
 
actually...yes.
 
feel free to vtd btw
 
3:52 PM
meh. roomba picks it up..
 
it's clearly not getting deleted by the op any time soon
 
Would you guys mind helping me get a hat by upvoting this comment? codereview.stackexchange.com/questions/83942/…
Thank you, that's enough.
 
Can anybody over here upvote on Blender.SE? Trying to get 007
6
A: Is it possible to animate which characters of a text object are assigned to a material?

NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇBlender 2.76: This appears to currently be an unavailable feature. Some workarounds could be to assign a different material to each letter and animate the colors of the individual materials, but there is no built in way to do this.

 
@Hosch250 What's the hat for comment upvoting?
 
there's not
 
3:56 PM
It should get me the silver Pundit badge.
 
it's a badge for silver that he was going for
 
@NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ That's good?
 
Ah.
 
Zak
@NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ Let us know if it succeeds
 
I mean, if we're soliciting votes here, I got a few answers pretty close to 25 and could use a silver badge too...
 

« first day (954 days earlier)      last day (3066 days later) »