Another Hilbert jigsaw treemap with all the regions and labels displayed. Readability is compromised.
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
import numpy | |
def hilbert(): | |
""" | |
Return NumPy array of shape (512, 3) containing successive coordinates | |
for a third-order three-dimensional Hilbert curve. | |
""" | |
a,b,c=numpy.indices((8,)*3).reshape(3,-1) | |
d=c[:8];r=abs(d-3>>1);g=(d^d>>1)*73;f=g[abs(d-1)&6] |
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
An example of [a space-filling curve layout](http://bl.ocks.org/nitaku/8772179) using [the Hilbert curve](http://bl.ocks.org/nitaku/6514960) to represent the *flare* software package classes. |
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
 |
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
//getters and settings done easy | |
var Circle = function(radius) { | |
this._radius = radius; | |
}; | |
Circle.prototype = { | |
set radius(radius) {this._radius = radius;}, | |
get radius() { return this._radius;}, | |
get area() { return Math.PI * (this._radius * this._radius);} | |
}; |
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
(ns hello-world.hello) | |
(defn- clj-map->js-map | |
"makes a javascript map from a clojure one" | |
[cljmap] | |
(let [out (js-obj)] | |
(doall (map #(aset out (name (first %)) (second %)) cljmap)) | |
out)) | |
(defn- attr [object attributes] |
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
//: Playground - noun: a place where people can play | |
import Foundation | |
func tablesOfTwo(x: Int) -> Int { | |
return 2 * x; | |
} | |
func tablesOfThree(x: Int) -> Int { | |
return 3 * x; |
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
public final static class CircBuf { | |
private ArrayList<String> circArray; | |
private int size = 6; | |
public CircBuf(final int size) { | |
this.size = size; | |
circArray = new ArrayList<String>(this.size); | |
} |
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
my %circ = ( | |
'(' => ')', | |
'[' => ']' | |
); | |
token circumfix_operation { (<circumfix_open>) <expression> (<circumfix_close>) <?{ %circ{$0} eq $1 }> } | |
token circumfix_open { @(%circ.keys) } | |
token circumfix_close { @(%circ.values) } |
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
<div class="pull-left">...</div> | |
<div class="pull-right">...</div> | |
<!-- Classes --> | |
<style type='text/css'> | |
.pull-left { | |
float: left !important; | |
} | |
.pull-right { |