273 karma · joined Sep 15, 2013 (13y ago) · 129 submissions
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
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 # => 0comment 4y ago · link · parent
https://en.wikipedia.org/w/index.php?title=Category:Living_p...
comment 4y ago · link · parent
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.comment 4y ago · link · parent
> 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.
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
comment 5y ago · link · parent
For example, Fluent (https://projectfluent.org/, used by Firefox), or MediaWiki's localisation system (https://www.mediawiki.org/wiki/Localisation#Message_paramete...).
comment 5y ago · link · parent
(The toggle only appears on small devices, as on larger devices there is no section collapsing.)
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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.
comment 6y ago · link · parent