« first day (258 days earlier)      last day (3766 days later) » 

9:00 PM
0
Q: How to succinctly iterate over result of Underscore method when it can return an object OR array?

Sean AndersonConsider the following scenario using UnderscoreJS var firstArray = [ { selected: true }, { selected: false }, { selected: false} ] var secondArray = [ { selected: true }, { selected: true }, { selected: false} ] // Only one selected item, selected is an object: var selected = _.where(firstArr...

0
Q: Changing html element with click event: how to restore default state of element using jQuery if/else statement

DeBraidI have a click event that calls a function (below, txtResize) which makes some CSS changes to html text. (Acts on Text of 3 unique elements). Q: What is the best way to refactor this code to limit excessive if/else usage, AND restore the original state of ALL text elements once the user clicks a...

 
9:25 PM
1
A: follow-up review of a custom Undo Manager

Sergey BerezovskiyI think you should not clear _redoCommands stack when you are re-doing command. Actually you should be able to continue re-doing command until you will restore state when you called first undo command. You should clear redo-commands when completely new command arrives: public void ChangeState(Co...

0
A: Optimizing garbage collection for local objects

Bruno CostaNot that may be your issue but I would do your multiply algorithm with a loop: public Matrix4f multiply(final Matrix4f other) { float[] a = getElements(); float[] b = other.getElements(); float[] result = new float[a.length]; //assume a.length == b.length and that lines * column...

 
Hi all
 
Hi!
 
I've learned to not be a Scrooge and start voting on people with above 1k rep
I really want to get CR and code golf out of beta
 
0
Q: Implementation of the FNV-1a hash algorithm for 32- and 64-bit

Jesse C. SlicerAre there any improvements to these two classes which implement FNV-1a for hashing? Particularly, I'm looking for any reuse opportunities (possibly via a common abstract superclass derived from HashAlgorithm?). public sealed class Fnv1a32 : HashAlgorithm { private const uint FnvPrime = unche...

 
@Jamal Good thing I have a Pets SE account with almost 1k rep... I could vote to move it back
 
9:32 PM
Well, except on a beta site, you'll just have to flag it for migration. But I get your point. :-)
 
Yeah. :)
 
If, for instance, someone's cat somehow typed up a (working) program, that can be migrated to CR.
 
Hmm, but what if it's too good to be reviewed?
 
Then that cat needs a job!
 
Now, the question is whether all my answers are on-topic on pets.se ... ?
2
 
9:40 PM
That depends: are monkeys considered pets in any country?
 
My wife says "yes".
And she's always right./
 
Good enough for me.
Okay, ask a question, and I'll have it migrated. Just make sure there's enough , otherwise it may be closed as off-topic.
 
heading home - see y'all later (if my always-right wife agrees)!
 
I just noticed something rather odd: why is retailcoder's name in italics in here and no one else's is (well, Jamal's is blue, but I'm assuming that's due to being a moderator)?
(Or am I just being crazy?)
 
@Corbin - retail coder is an 'owner' of the room
 
9:49 PM
Ohhhhh, ok. Makes sense. Just thought I was going crazy for a second :)
 
Good spotting though.
Today is an RMD ;-) No 14, I think
 
Back.
 
Hello all!
 
Hello
 
Bye Bye
 
1
A: Hello world! without repetition

TimtechFugue From the esolang wiki: And you can listen to the source code.

 
11:14 PM
@brainbolt, please accept an answer. — Malachi Jan 10 at 15:04
@Malachi it worked, thanks!
@rolfl how many more to legendary? Surprised you crush everyone else?
 
Legendary at 150
Epic at 50.
Both still a long way off .... (epic at 50 is like crazy hard and all you get is a silver badge)
 
Back.
 
Daily vote limit reached, you can vote again in 39 minutes
 
@Corbin I didn't know I was showing up in italics. But yeah @StackExchange bot appointed me as an owner of the chatroom. I didn't bribe anyone, I swear!
4
 
@retailcoder you got my last daily +1
 
11:21 PM
Leaving again. So soon...
 
@retailcoder Riiiiggghhttt
:)
 
Yup, 40 more minutes for some of us. Now I know how Malachi feels...
 
Now I feel special :)
 
Yeah, but my name is blue!
 
Those are very long minutes. Time to eat, catch you later!
 
11:22 PM
Yeah, but I'm a monkey!
@retailcoder you are "special".
 
And a coffee mug!
 
0
Q: Recording audio in C

syb0rgThis is a program I wrote as a .wav audio recording library for Linux. It was developed on a Raspberry Pi, so that may affect the dependencies required.(1) I would prefer if reviews contained suggestions on cutting down the lines of code as much as possible, but all suggestions are acceptable. ...

Ohh, my SE reputation is nice and round at 9.4K!
 
I see that .... why do you want to cut down lines-of-code (LoC) ?
 
@rolfl I think error handling could be cut down a bit, but I'm not sure how to approach it.
And that would shorten my code a lot.
 
@retailcoder ???what do you mean it worked????
 
11:27 PM
@Malachi - the accept happened!
@syb0rg - I repeat: Why do you want to cut down on lines of code?
 
oh I see.
 
@rolfl I think it is too long of a program. Maybe I should remove that statement from my question.
 
@retailcoder check out this CodeGolf. codegolf.stackexchange.com/a/18745/9435
 
If you look at that code compared to my code in past questions, it is the longest by far.
 
@syb0rg - lots of code does not, in-and-of-itself, mean that it needs to be fixed. It just means the program may be doing more than your previous projects.
 
11:29 PM
1
Q: Recording audio in C

syb0rgThis is a program I wrote as a .wav audio recording library for Linux. It was developed on a Raspberry Pi, so that may affect the dependencies required.(1) I would prefer if reviews contained suggestions on cutting down the lines of code as much as possible, but all suggestions are acceptable. ...

 
@rolfl Perhaps. But if you look where I set all of the parameters and test for errors, it seems to get kind of repetitive. I think that could be changed.
@rolfl Do you think I should remove that preference from my question?
 
I think if there is a reason you need smaller code, you should tell us why... if there is no reason, then it is not a preference....
FOr example, you have a lot of magic numbers in there, and fixing that requires adding LoC.
 
@rolfl I'll just removed that request for now.
 
Back (again)
 
@Timtech Have you seen my newest question?
 
11:38 PM
@syb0rg Nope?
 
@Timtech It's the last thing @StackExchange posted in this room.
 
@syb0rg - in case you were wondering, the 'regulars' are all out of votes at the moment ...
 
Oh ok
I'M NOT A REG!
:D
 
@rolfl I figured that is why it only have one up-vote right now.
 
@syb0rg I see 2...
:)
 
11:39 PM
hehe
 
Anyone here heard of Lego Universe (video game)?
 
I'll just point to it later after everyone gets some votes again.
 
I'm helping recreate it since it was shut down
 
@Timtech On your own?
 
11:40 PM
Do you have the source code?
 
@syb0rg Of course not :)
I have friends... :\
 
@Timtech 404
 
k is l
sorry
 
Ah, I was surprised there was just one upvote too. Makes more sense now. I have a few comments on it, but I'm theoretically supposed to be working at the moment, so shall have to wait until later to review :(
 
@Corbin Sounds good.
@Corbin I suppose you were the one up-vote?
 
11:42 PM
One???
:S
 
@Timtech I meant first, whoops.
I know you were the second :)
 
afk
 
@syb0rg yeah, I was
 
@syb0rg Tag your question as ?
 
@200_success Done, thanks for pointing that out.
 
11:57 PM
@syb0rg Why don't you write(fd, hdr, sizeof(WaveHeader))? Are the fields not contiguous (well-packed) in memory?
 
@ChrisW Hmmm, maybe that is something that could be improved to get rid of some magic numbers.
I'll leave that for you to put in an answer. :)
 

« first day (258 days earlier)      last day (3766 days later) »