An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.
This example has moved to .
http://bl.ocks.org/bruceharris/8423028
This simple line chart is constructed from a TSV file storing the closing value of AAPL stock over the last few years. The chart employs conventional margins and a number of D3 features:
- d3.tsv - load and parse data
- d3.time.format - parse dates
- d3.time.scale - x-position encoding
- d3.scale.linear - y-position encoding
- d3.extent - compute domains
- d3.svg.axis - display axes
Meteor namespacing, specifically package scope variables, don't seem to work as described in the namespacing section of the docs.
From what I can tell, when the var keyword is omitted, actual globals are created. (I'm running 0.6.5)
To run this:
$ meteor create globalcheck
then copy these files into globalcheck
(overwriting the default files)
package net.bruceharris.test.inheritance; | |
import static org.junit.Assert.assertEquals; | |
import org.junit.Assert; | |
import org.junit.Test; | |
public class InheritanceTest { | |
private Child c = new Child(); |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Jasmine Spec Runner</title> | |
<link rel="shortcut icon" type="image/png" href="lib/jasmine-1.2.0/jasmine_favicon.png"> | |
<link rel="stylesheet" type="text/css" href="lib/jasmine-1.2.0/jasmine.css"> | |
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine.js"></script> | |
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine-html.js"></script> |
When I ask interview candidates to explain what prototypes mean in JavaScript, the response is often something like this
Here's my attempt to explain it succinctly.
I think it's important to draw the distinction between 2 related concepts: the prototype property of functions, and the prototype of an object
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodePen · A Pen by bruceharris</title> | |
<!-- | |
Copyright (c) 2012 Bruce Harris, http://codepen.io/bruceharris | |
Permission is hereby granted, free of charge, to any person obtaining |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodePen · A Pen by bruceharris</title> | |
<!-- | |
Copyright (c) 2012 Bruce Harris, http://codepen.io/bruceharris | |
Permission is hereby granted, free of charge, to any person obtaining |