A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
(function (name, definition){ | |
if (typeof define === 'function'){ // AMD | |
define(definition); | |
} else if (typeof module !== 'undefined' && module.exports) { // Node.js | |
module.exports = definition(); | |
} else { // Browser | |
var theModule = definition(), global = this, old = global[name]; | |
theModule.noConflict = function () { | |
global[name] = old; | |
return theModule; |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" /> | |
<!-- when.js Promises implementation --> | |
<script src="https://raw.github.com/cujojs/when/master/when.js"></script> | |
<!-- Unit testing and mocking framework --> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script> |
Wess-MacBook-Pro:bin wfreeman$ cat test.cypher | |
create (m {name:"m"}); | |
create (n {name:"n"}); | |
Wess-MacBook-Pro:bin wfreeman$ ./neo4j-shell -c < test.cypher | |
Welcome to the Neo4j Shell! Enter 'help' for a list of commands | |
NOTE: Remote Neo4j graph database service 'shell' at port 1337 | |
neo4j-sh (?)$ create (m {name:"m"}); | |
+-------------------+ |
(function(root){ | |
root.getScript = function(url) { | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = url; | |
document.head.appendChild(script); | |
} | |
}(window)); | |
getScript('http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.js'); |
import os | |
import sys | |
import io | |
import tarfile | |
import urllib.request | |
ARCHIVE_URL = 'http://d.pr/f/YqS5+' | |
Reveal.configure({ | |
keyboard: { | |
40: 'next', | |
38: 'prev' | |
} | |
}); |
A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.
The scope of a variable is the region of the program in which you can directly access the variable:
if (true) {
let x = 123;
}
Here, the scope of x
is the then-block of this if-then-else statement.
https://twitter.com/snookca/status/1073299331262889984?s=21
“In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”
Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows.
(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)
So the big deal about css-in-js (cij) is selectors.