3,588 karma · joined December 26, 2009
_.forEach(array, function(item) {
doSomething();
if (condition) {
// exits iteration early
return false;
}
});
This is just not possible with native `Array#forEach` – you’d have to use a plain `for` loop with a conditional `break` statement instead, or rewrite your code to use `Array#some`.Would you mind sharing the code to your solutions as gists so we can link to them from the write-ups repository? You got some very nice scores.
ECMAScript 6 fixes that, mostly. See http://mathiasbynens.be/notes/javascript-unicode for details.
Here’s a slightly more in-depth blog post on the many issues this causes, and how to avoid them in JavaScript: http://mathiasbynens.be/notes/javascript-unicode Some of these problems are briefly mentioned in the above post, too.
3. Since these emails are sent by the Google Scholar back-end, through Google’s legitimate servers, such a phishing mail would be more likely to bypass email client spam filters (compared to, say, an attacker registering google-scholar-hax.net and sending phishing emails from there).
4. The affected emails would still have Google’s DKIM email signature, proving that it was sent by Google (which would be impossible from a custom attacker-controlled domain). In other words, an attacker could send an email containing any HTML he wants, to any academic email address, and Google still puts a stamp on it saying “this is legit”.
Here’s an even more extreme version with no HTML at all: http://mathiasbynens.be/notes/css-without-html (read it + try the demo in Firefox)
Dropbox has offered selective sync for a while now.
If you’re calling JavaScript features slow or fast based on absolute measurements, you’re doing it wrong. Read up on JavaScript benchmarking. Create and run some jsPerf tests on various devices and browsers, and compare the results. You’ll quickly find that absolute numbers are meaningless in this case.
> People often throw around the statement “The DOM is slow”. This is a completely false statement. Utterly stupid. Look: http://jsfiddle.net/YNxEK/. Ten THOUSAND divs in about 200 milliseconds.
How is that even an argument? Just because you can insert a fragment containing 10k <div>s in 200 milliseconds doesn’t mean that the DOM is not slow compared to other operations in JavaScript.
DOM operations are still the slowest operations you can perform using JavaScript in a web browser.
This has been discussed here before: http://news.ycombinator.com/item?id=4411696
In any other situation I’d call it a slash.
Wow. Just because there’s a Stack Overflow tag for it doesn’t mean that Jeff knows about it. It’s a community-driven site.
$ grep -c -i "titanic\'" iphonelist.txt
166
It’s only 190 if you include names like “Titanic’s iPad”, but those aren’t funny.For example:
(1.1536999999997645e-10).toString(33).match(/[a-z]+/g)[81]; // 'oops'
More here: https://gist.github.com/1153826