This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" href="css/style.css"> | |
<!--Picturefill--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'Helvetica Neue', Arial, Helvetica, sans-serif; | |
font-weight: 100; | |
letter-spacing: 1px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Graph = function() { | |
this.nodes = {}; | |
this.edges = {}; | |
}; | |
Graph.prototype.addNode = function(node) { | |
this.nodes[node] = node; | |
}; | |
Graph.prototype.contains = function(node) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Hello d3 World</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copyright: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copyright: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copyright: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Firth: https://codepen.io/Universalist/post/predicates-in-javascript | |
(function(predicateCombinators) { | |
// CPL predication | |
function and(p1, p2) { | |
return function(x) { | |
return p1(x) && p2(x); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global console: true */ | |
"use strict"; | |
/* | |
A vector type | |
Write a constructor Vector that represents a vector in two-dimensional | |
space. It takes x and y parameters (numbers), which it should save to | |
properties of the same name. | |
Give the Vector prototype two methods, plus and minus, that take another vector as a parameter and return a new vector that has the sum | |
or difference of the two vectors’ (the one in this and the parameter) x | |
and y values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// under Google Chrome 36 | |
Object.prototype.toString.call([]) | |
// "[object Array]" | |
Object.prototype.toString.call(function(){}) | |
// "[object Function]" | |
Object.prototype.toString.call({}) | |
// "[object Object]" | |
Object.prototype.toString.call(null) | |
// "[object Null]" |
OlderNewer