minitech

Canada

Age: 18

If you don’t use code formatting for emphasis, we can probably be friends.

48m
comment Git Rebase or Git Merge?
It’s clean. Whether it’s cleaner than a rebase is up to your tastes. Of course, if you can’t manage to do the rebase, it doesn’t really matter which is cleaner, does it?
1h
comment Git Rebase or Git Merge?
Just merge video-upload into new-ui? That’s what merging is for. If the rebase won’t be clean, it’s not worth it to rebase.
2h
awarded Enlightened
3h
awarded Nice Answer
4h
comment How to most efficiently generate string from array of objects in javascript?
@Setsuna: .map is doing the same thing under the hood, but it will likely perform “worse” because of the function calls. With 2,000 items, however, you won’t notice any difference, and your original version is probably best in that regard (except for the final substring).
6h
comment Why use printf("mystring\n") instead of just puts("mystring")?
It’s not that hard to change puts to printf.
6h
comment Why use printf("mystring\n") instead of just puts("mystring")?
Because people don’t know about puts.
6h
comment How to most efficiently generate string from array of objects in javascript?
It’s true for the current versions of all major web browsers. But anyway, it’s an implementation detail, so you should add a note about when your advice applies.
6h
comment How to most efficiently generate string from array of objects in javascript?
“Yes, using string concatenation in a loop is costly. The string grows for each iteration, and each time you have to copy the entire previous string to create the new version.” Modern JavaScript engines are smart about this, and push/join tends to be slower. See stackoverflow.com/questions/7299010/….
6h
answered How to most efficiently generate string from array of objects in javascript?
7h
comment Is sha1sum still secure?
There is a good reason to prefer SHA-256 much of the time: SHA-512 digests are really long.
21h
comment Javascript code trick :What's the value of foo.x
@AndyHu: foo.x refers to the x of the old foo. bar also refers to the old foo. x does not exist on the new foo.
21h
revised Javascript code trick :What's the value of foo.x
When you say “left to right” but mean “right to left”
22h
comment Javascript code trick :What's the value of foo.x
@soulcheck: See update.
22h
revised Javascript code trick :What's the value of foo.x
Cite the spec!
22h
comment Javascript code trick :What's the value of foo.x
@soulcheck: It is mandated by the standard. Finding important parts now. (It’s also somewhat mandated by common sense – consider (x = {}).y = x)
22h
answered Javascript code trick :What's the value of foo.x
1d
answered JS - self invoking function vs regular function
1d
comment Calling other super method directly when coming from sub
@Bergi: They’re class methods, I think (@).
1d
comment JavaScript onclick event not working in IE9 and below
Try taking it out of onload as a first step; since your script is at the bottom of <body>, you don’t need to wait for any events to start using elements that exist in <body>.
1 2 3 4 5