A sunburst is similar to the treemap, except it uses a radial layout. The root node of the tree is at the center, with leaves on the circumference. The area (or angle, depending on implementation) of each arc corresponds to its value. Sunburst design by John Stasko. Data courtesy Jeff Heer.
This file contains hidden or 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
from game import Directions | |
n = Directions.NORTH | |
s = Directions.SOUTH | |
w = Directions.WEST | |
e = Directions.EAST | |
fringe = util.Stack() | |
closed = set() | |
def makeNode(state, prevActions=[], action=False): |
This file contains hidden or 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
[1, 2, 3] | |
.map(function (num) { | |
var listItem = document.createElement('li'); | |
listItem.textContent = num; | |
return listItem; | |
}) | |
.reduce(function (acc, cur) { | |
acc.appendChild(cur); | |
return acc; | |
}, document.createElement('ul')); |
This file contains hidden or 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 charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<p>Most object-oriented languages are actually class-based.</p> | |
<p>Javascript is object-oriented in the sense that you can create Objects without Classes.</p> | |
<p>Every Object in JS is created via a Constructor, implicitly or explicitly.</p> |
This file contains hidden or 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 charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// Closure - transporting a function outside of another function's scope. The returned function keeps reference to the inner scope, even when it is used somewhere else. |
This file contains hidden or 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 charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var myObj = { |
This file contains hidden or 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
// rendering the content of a variable | |
li.tweet | |
img(src= tweet.profile_image_url) | |
h5= tweet.from_user_name | |
p= tweet.text | |
// executing some JS and conditionally render one line or the other | |
- var tweets = link._tweets.length || null; | |
ul.meta |
This file contains hidden or 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
// tell express where to find our jade templates | |
app.set('views', path.join(__dirname, '../views')); | |
// tell express to use jade to compile view files | |
app.set('view engine', 'jade'); | |
// now we can call response.render(), just like jade.render() | |
app.get('/', function(request, response) { | |
response.render('layouts/index.jade'); | |
}); |
This file contains hidden or 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
// file index.jade | |
html | |
head | |
block head | |
body | |
block content | |
// file view.jade | |
extends index.jade |
This file contains hidden or 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
h1 This is a heading! | |
h2.warning This is a warning | |
p.info this is a paragraph, with an image nested inside, at the end. | |
img(src='http://some.url') | |
<h1>This is a heading!</h1> | |
<h2 class="warning">This is a warning</h2> | |
<p class="info">this is a paragraph, with an image nested inside, at the end.<img src="http://some.url"></p> |
NewerOlder