Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
d3.xml("/data/GoldenGate2012Results.xml", function(xml) { | |
var runners = d3.select(xml).selectAll("runner")[0]; | |
var table = d3.select("#presentation").append("table").attr("class","grid"); | |
var thead = table.append("thead"); | |
thead.append("th").text("Gender"); | |
thead.append("th").text("City"); | |
thead.append("th").text("Time"); | |
thead.append("th").text("Pace"); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>D3.xml Example</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style type="text/css"> | |
.chart div { | |
font: 10px sans-serif; | |
background-color: steelblue; | |
text-align: right; |
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
require 'formula' | |
class BsdgamesOsx < Formula | |
homepage 'https://github.com/ctdk/bsdgames-osx' | |
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz' | |
sha1 '31013cbc8fbad71f1e3e0b9b85fd7c943219a99b' | |
head 'https://github.com/ctdk/bsdgames-osx.git' | |
version '2.19.3' | |
depends_on :bsdmake => :build |
function ls --description 'List contents of directory' | |
command ls -lFG $argv | |
end | |
function subl --description 'Launches sublime text in a new window' | |
command subl -n $argv | |
end | |
function code --description 'Launches visual code studio in a new window' | |
command code -n $argv |
/* | |
What is the optimal way to print values of 2 arrays alternately? (every 5 sec) | |
* Items in both arrays could change at any given moment | |
* update to each array needs to be applied imminently | |
* if array is empty, it will not print any value (and move to the other array) | |
So if you start with following arrays | |
var arr0 = ['1','2','3'] | |
var arr1 = ['a','b','c'] | |
It would start printing |