4 karma · joined Oct 12, 2016 (10y ago) · 5 submissions
comment 10y ago · link · parent
> Obama: And you just have to have somebody close to the power cord. [Laughs.] Right when you see it about to happen, you gotta yank that electricity out of the wall, man.
Do we seriously think that it would be that easy? I think an a "generalized" AI, if aware of the ability for a human to remove its power and so that as a bad thing, would not be stopped by unplugging it. By the point you realized you needed to unplug it, it would have already convinced a human that to help it spread and it would have found other sources of power.
comment 10y ago · link · parent
Localized custom validation messages for the provided pattern should be added as part of HTML spec. Someone should follow up on that, because it'll probably be too much of a waste of time for me.
In the meantime, this works and gets around a bug in FF: http://stackoverflow.com/a/20189012
<input type="text" id="username" required placeholder="Enter Name"
oninvalid="this.setCustomValidity('Enter User Name Here')"
oninput="setCustomValidity('')" />
where setCustomValidity could provide any text, even localized text from some other source like a DB, potentially, since it's JS. Requires a modern browser, though.> Sure, you might not need javascript. But maybe you should still use it.
Yes, but if you are writing for a general audience, make sure it's accessible: http://webaim.org/techniques/javascript/
Someone should put together a site that, given a set of browser restrictions the user provides, gives examples of each of these to show the most accessible and standards-compliant version of the code to use, minimizing external libraries required, with and without localization, because not everyone has the resources to provide localized content, unless localization could be provided by a built-in library in the browser or OS, which would be another great project.
Yes, there are sites that provide a matrix of supported browsers, but I don't think that would be as simple to use; developers like copy-and-paste examples, for better or worse, e.g. StackOverflow.