Month: August 2015
Guice Documentation
Drawing Trees using d3.js
This is a great article on how to construct plant like images from simple rules in d3:
Generating artificial plants using stochastic Lindenmayer systems with d3.js
This could be the basis of a tamogotchi game.
Minimal Groovy neo4j client
@Grab(‘org.codehaus.groovy.modules.http-builder:http-builder:0.7.2’)
import groovyx.net.http.RESTClient
import groovy.json.JsonSlurper
def authToken = ‘neo4j:password’.bytes.encodeBase64().toString()
def auth = “Basic: $authToken”.toString()
// send Cypher statement to Neo4j Server
def client = new RESTClient( ‘http://localhost:7474’, ‘application/json’ )
client.defaultRequestHeaders.’Authorization’ = auth
def body = “””{
“statements” : [ {
“statement” : “CREATE (wordsworth:Author {firstname:’William’, lastname: ‘Wordsworth’})”
} ]
}”””
def resp = client.post( path : ‘/db/data/transaction/commit’, body : body )
println resp.data.toString()