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
<html> | |
<body> | |
<script type='text/javascript' src='http://d3js.org/d3.v3.min.js'></script> | |
<script> | |
array = [ | |
{ 'a': 1, 'b': 2 }, | |
{ 'a': 42, 'b': 7 }, | |
{ 'a': 15, 'b': 3 }, | |
{ 'a': 32, 'b': 8 }, | |
{ 'a': 26, 'b': 15 }, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="WEB_MODULE" version="4"> | |
<component name="NewModuleRootManager" inherit-compiler-output="true"> | |
<exclude-output /> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
</module> |
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 testCell = function (current, test) { | |
var actor = current.piece; | |
var target = test.piece; | |
if (current == test && (!current.maze || actor.is('C'))) { | |
return 'empty'; | |
} |
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
process.nextTick(function () { | |
var contents = ''; | |
tuple.contents.forEach(function (file) { | |
var oneFile = fs.readFileSync(sourcePath + file + '.js', 'utf-8'); | |
if (debug) | |
contents += oneFile | |
else | |
contents += jsmin.jsmin(oneFile); | |
}); | |
fs.writeFile(targetPath + tuple.name + '.js', contents, errbacker.create(log.error)); |
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
uint8_t my_sqrt(uint16_t input) { | |
uint16_t res = 0; | |
uint16_t one = 1u << 14; | |
while (one > input) one /= 4; | |
while (one != 0) { | |
if (input >= res + one) { | |
res += one; | |
input -= res; |
This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.
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
!function() { | |
var d3 = { | |
version: "3.4.4" | |
}; | |
if (!Date.now) Date.now = function() { | |
return +new Date(); | |
}; | |
var d3_arraySlice = [].slice, d3_array = function(list) { | |
return d3_arraySlice.call(list); | |
}; |
OlderNewer