[ Launch: Tributary inlet ] 4981624 by seliopou
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
-- Boilerplate module for dynamic compilation, loading, and evaluation of | |
-- modules using the GHC API, v. 7.4.1. Note that the GHC API is subject to | |
-- change, so this file may not work for future versions. | |
-- | |
-- Load and play around with this file using: | |
-- | |
-- ghci -package ghc -XCPP GhcAPI.hs | |
-- | |
-- or | |
-- |
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
-- Boilerplate module for dynamic compilation, loading, and evaluation of | |
-- modules using hint. | |
-- | |
-- Load and play around with this file using: | |
-- | |
-- ghci -package hint HintExample.hs | |
-- | |
module HintExample where | |
import Language.Haskell.Interpreter |
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 dates = [...], | |
width = ..., | |
height = ...; | |
var xscale = d3.scale.linear().domain([0, dates.length]).range([0, width]); | |
var canvas = d3.select('#canvas') | |
.append('svg:svg') | |
.attr('width', width) | |
.attr('height', height); |
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> | |
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
rect { |
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> | |
<title>d3.js animation pattern</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script> | |
<script type="text/javascript" src="vis.js"></script> | |
<style type="text/css"> | |
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
<form> | |
<input id="back_detect" type="hidden" name="back_detect" value="" /> | |
</form> | |
<script type="text/javascript"> | |
/* Render vis, animating only if value is set to "" */ | |
vis("#canvas", $("#back_detect").val() == ""); | |
/* | |
* Set the value of the form field to "visited". Most browsers will |
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> | |
<title>d3.js example | circle packing in a rectangle</title> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<style type="text/css"> | |
</style> | |
</head> | |
<body> | |
<div id="canvas"></div> |
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 chart = (function() { | |
function copy(o) { | |
return Object.keys(o).reduce(function(no, k) { | |
no[k] = o[k]; | |
return no; | |
}, {}); | |
} | |
return function(defaults, _cstr) { | |
return function() { |
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"> | |
<title>twenty-five suns</title> | |
<style> | |
svg { | |
background: rgb(237, 237, 237); | |
} | |
path { |
OlderNewer