Skip to content

Instantly share code, notes, and snippets.

@hoschi
hoschi / another.js
Created April 13, 2012 09:43 — forked from dukex/jasmine.js
qUnit Vs Jasmine
describe("menu", function () {
beforeEach(function(){
var ac = $('#menu1').menu();
var item0 = $("li:eq(0) a");
});
it("should has should have aria features", function() {
var item;
expect(ac.hasClass("ui-menu ui-widget ui-widget-content ui-corner-all")).toEqual(true);
expect(ac.attr("role")).toEqual("listbox");
@hoschi
hoschi / index.html
Created August 10, 2012 09:50
d3 voronoi sample
<!DOCTYPE html>
<html>
<body>
<div id='chart'>
</div>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.9.6"></script>
<script type="text/javascript">
var width = 960,
height = 500;
@hoschi
hoschi / index.html
Last active July 2, 2018 18:23 — forked from mbostock/.block
Testing scale with very long labels
<!DOCTYPE html>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
svg {
font: 10px sans-serif;
}
.axis {
@hoschi
hoschi / index.html
Last active December 22, 2015 15:58
testing deep selection and data grouping
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="http://d3js.org/d3.v3.js"></script>
<script>
var data = ['foo', 'bar']
@hoschi
hoschi / index.html
Created September 9, 2013 13:59
testing data join 'states' with deep selection
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="http://d3js.org/d3.v3.js"></script>
<script>
function chartIt(data) {
@hoschi
hoschi / index.html
Last active December 25, 2015 14:29 — forked from mbostock/.block
Example how it looks without 'defined' usage.
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path, .axis line {
fill: none;
diff --git a/xmonad.hs b/xmonad.hs
index fbf7b5e..4c8cef6 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -23,6 +23,7 @@ import Control.Monad (filterM,liftM, join)
import Data.IORef
import Data.Monoid
import Data.List
+import Data.Bits
@hoschi
hoschi / README.md
Last active December 26, 2015 09:59 — forked from mbostock/.block
SVG Path transition

This example demonstrates path interpolation using SVG's getPointAtLength feature. The source path and the target path are sampled uniformly using a configurable precision in pixels (here, 4px). During the transition, the path is replaced with a piecewise linear curve, or polyline, for easier interpolation. When the transition finishes, the path is restored to the original cubic Bézier. This technique is handy because it works for any path expressible with SVG's path data mini-language.

See also the circular shape tweening example.

@hoschi
hoschi / README.md
Last active December 26, 2015 23:49 — forked from mbostock/.block
This example demonstrates how to rotate axis labels by 45° using post-selection. With funny bounce effect :)

This example demonstrates how to rotate axis labels by 45° using post-selection. With funny bounce effect :)

@hoschi
hoschi / index.html
Last active August 29, 2015 14:03 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
fill: none;
stroke: #666;
stroke-width: 1.5px;
}