This file contains 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
(defn parse-vlf [buffer] | |
(loop [bytes 0, first true, number 0, multiplier 1, byte (.get buffer)] | |
(let [number (+ number (* (bit-and byte 0x7f) | |
(int (Math/pow 2 (* bytes 7))))) | |
[multiplier number] (if (and first (not= 0 (bit-and number 1))) | |
[-1 (- number 1)] | |
[1 number])] | |
(if (= 0 (bit-and 0x80 byte)) | |
[(* (/ number 2) multiplier) buffer] | |
(recur (+ 1 bytes) false number multiplier (.get buffer)))))) |
This file contains 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
package com.geni.solr; | |
import java.sql.SQLException; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import org.apache.solr.handler.dataimport.Context; | |
import org.apache.solr.handler.dataimport.DataImporter; | |
import org.apache.solr.handler.dataimport.DataSource; |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configure id="geniGedcom" class="org.mortbay.jetty.webapp.WebAppContext"> | |
<Set name="contextPath">/geni-gedcom</Set> | |
<Set name="war"> | |
<SystemProperty name="jetty.home" default="."/>/webapps/geni-gedcom-0.0.1.war</Set> | |
</Configure> |
This file contains 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
d3.json(uri, function(json) { | |
var myData = data(); | |
force | |
.nodes(myData.nodes) | |
.links(myData.links) | |
.start(); | |
var link = svg.selectAll("line.link") | |
.data(force.links()) |
This file contains 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
(defn generate-method-block [heading ns methods] | |
(let [methods (name methods)] | |
(html [:p.route-type heading] | |
(anchor ns methods)))) | |
(defn generate-top | |
"Generate top-level page." | |
[ns-prefix suffix] | |
(let [nss (filter (partial re-find (-> ns-prefix str re-pattern)) | |
(map str (all-ns)))] |
This file contains 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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[remote "origin"] | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
url = [email protected]:lancepantz/thylucene.git | |
[branch "master"] |
This file contains 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 graph.servlet | |
(:gen-class :extends javax.servlet.http.HttpServlet :exposes-methods {init initSuper})) | |
(defn -init [self config] | |
(debug "init called") | |
(debug self) | |
(.initSuper self config)) |
This file contains 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
function e { | |
if [ "$1" != '' ]; then | |
touch $1 | |
fi | |
open -a /Applications/Emacs.app $1 | |
} |
This file contains 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
(deftask clean | |
"Remove cake build artifacts." | |
(ant Delete {:verbose true} | |
(add-fileset {:dir (file) :includes "*.jar"}) | |
(add-fileset {:dir (file) :includes "*.war"})) | |
(add-fileset {:dir (file ".cake" "run") :includes "*"}) | |
(doseq [dir ["classes" "build" "test/classes"]] | |
(clean-dir (file dir))) | |
(when (= ["deps"] (:clean *opts*)) |
This file contains 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
(defn base-file [& path] | |
(str (apply file "variants" "base_conf" path))) | |
(defile "variants/bare/conf/schema.xml" (base-schema)) | |
(defile "variants/bare/conf/data-config.xml" (base-data-config)) | |
(defile "variants/bare/conf/synonyms.txt" #{(base-file "synonyms.txt")} | |
(cp (base-file "synonyms.txt") *File*)) |
NewerOlder