273 karma · joined September 15, 2013
I'm surprised that the authors decided to, and were able to, slip in this little euphemism.
from collections import defaultdict
m = defaultdict(int)
m["nonexistent"]
len(m) # => 1
There are examples of the opposite too, though. Ruby's Hash does not insert the entry: m = Hash.new(0)
m["nonexistent"]
m.length # => 0https://en.wikipedia.org/w/index.php?title=Category:Living_p...
Here is an example to illustrate:
console.log('a')
(1 < 2) ? console.log('b') : console.log('c')
You might expect this to output 'a', then 'b'. However, it instead outputs 'a' and then throws an error like this: Uncaught TypeError: console.log(...) is not a function
...because a semicolon was not inserted at the end of the first line. location.href = location.href;> Given the code we've found that depends on NULL argv, I think we likely can't make the change outright, so we're down this weird rabbit hole of trying to reject what we can and create work-around behaviors for the cases that currently exist.
For better or worse, the title and the link is just a discussion prompt. The guidelines all but state that you're not expected to read it before commenting:
> https://news.ycombinator.com/newsguidelines.html
> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."
In this case, someone should probably edit the title.
For example, Fluent (https://projectfluent.org/, used by Firefox), or MediaWiki's localisation system (https://www.mediawiki.org/wiki/Localisation#Message_paramete...).
(The toggle only appears on small devices, as on larger devices there is no section collapsing.)
My guess is that it was easier to set up that way at the time, and then the configuration was kept when a mobile version was integrated into MediaWiki itself.
There are plans to merge the domains (https://phabricator.wikimedia.org/T214998), although they are vague and stalled.
For example, I worked on a rich text editor, and we wanted to put a bar with text formatting tools above the touch keyboard. This is not possible in the browser: your webapp cannot measure the keyboard or the remaining available viewport (and the keyboard's size depends on the input method and the iPhone model).
Another example I experienced is when we wanted to have full-screen dialogs with buttons at the bottom. If you do that, then the users have to tap your buttons twice, because the first tap only expands Safari's browser UI, and your buttons near the bottom of the screen only work while that UI is expanded.
My impression is that the developers (or perhaps the remaining single developer, as mentioned elsewhere in this thread) has lost interest in maintaining it, rather than been unable to continue.
Does that exist? I have never seek a 4k (or better) display smaller than 24", and I'd love to buy one.
https://github.com/wikimedia/VisualEditor/blob/master/src/ve...
contains = hasCompare || rnative.test( docElem.contains ) ?
function( a, b ) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!( bup && bup.nodeType === 1 && (
adown.contains ?
adown.contains( bup ) :
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
));
} :
function( a, b ) {
if ( b ) {
while ( (b = b.parentNode) ) {
if ( b === a ) {
return true;
}
}
}
return false;
};