echo dir %1 > %systemroot%\system32\ls.bat
Wednesday, May 20, 2015
Create ls command for Windows cmd
In order to enable cmd on Windows run ls command just run from command line this:
Javascript D3 good basic explanation
http://synthesis.sbecker.net/articles/2012/07/08/learning-d3-part-1
JavaScript D3 - example how the function(d, i) works
http://jsfiddle.net/M8nK8/
==HTML==
<script src="http://d3js.org/d3.v3.min.js"></script>
<section></section>
===JS D3==
var data=[10,20,30,40];
var lis = d3.select("section")
.append("ul")
.selectAll("li")
.data(data)
lis.enter()
.append("li")
.text(function(d,i){ return "item n° "+i+" has value: "+d})
==HTML==
<script src="http://d3js.org/d3.v3.min.js"></script>
<section></section>
===JS D3==
var data=[10,20,30,40];
var lis = d3.select("section")
.append("ul")
.selectAll("li")
.data(data)
lis.enter()
.append("li")
.text(function(d,i){ return "item n° "+i+" has value: "+d})
JavaScript D3 - forEach() vs each() function
The main takeaway is that, using.each()
you get access to 3 things you need:d
,this
andi
. With.forEach()
, on an array (like in the example from the beginning) you only get 2 things (d
andi
), and you'd have to do a bunch of work to also associate an HTML element with those 2 things. And that, among other things, is how d3 is useful.
http://stackoverflow.com/questions/13465796/d3-javascript-difference-between-foreach-and-each
Subscribe to:
Posts (Atom)