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
(import '(com.jme.app SimpleGame AbstractGame$ConfigShowMode) | |
'(com.jme.scene Node) | |
'(com.jme.scene.shape Sphere) | |
'(com.jme.bounding BoundingBox) | |
'(com.jme.math Vector3f)) | |
(doto (proxy [SimpleGame] [] | |
(simpleInitGame [] | |
(println "=== starting...") | |
(.attachChild (.getRootNode this) |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("code.google.com") { | |
a[href="/u/achim.passen/"], | |
a[href="/u/richhickey/"], | |
a[href="/u/Chousuke/"], | |
a[href="/u/chouser/"], | |
a[href="/u/stefan.bodewig/"], | |
a[href="/u/scgilardi/"] | |
{ |
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 n01se.net.graph.issues | |
(:import (java.text SimpleDateFormat ParsePosition) | |
(java.util GregorianCalendar Calendar) | |
(org.jfree.chart ChartFrame)) | |
(:use [clojure.zip :only (xml-zip node)] | |
[clojure.contrib.lazy-xml :only (parse-trim)] | |
[clojure.contrib.zip-filter.xml :only (xml-> attr text)] | |
[clojure.contrib.seq-utils :only (reductions)]) | |
(:require [clojure.set :as set] | |
[clojure.contrib.zip-filter :as zf] |
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 isPal [string] | |
(let [lower (.toLowerCase string)] | |
(= (seq lower) (reverse lower)))) |
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
(import '(java.net URL) '(java.io InputStreamReader BufferedReader)) | |
(defn get-url [x] | |
(with-open [a (-> (doto (-> x URL. .openConnection) | |
(.setRequestProperty "User-Agent" "clojurebot")) | |
.getInputStream InputStreamReader. BufferedReader.)] | |
(apply str (take-while identity (repeatedly #(.readLine a)))))) |
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 print-markdown-doc | |
"This is a modified version of print-doc which outputs the documentation in markdown format." | |
[v] | |
(let [{:keys [ns name arglists macro doc]} (meta v)] | |
(into [(format "###%s###" name) ""] | |
(->> (str " *" (ns-name ns) "/" name "*\n\n" | |
" :::clojure\n" | |
" " arglists "\n\n" | |
(when macro "*Macro*\n") | |
" " doc) |
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
; toy immutable sorted set | |
(defn xseq [t] | |
(when t | |
(concat | |
(xseq (:l t)) | |
[(:root t)] | |
(xseq (:r t))))) | |
(defn xconj [t v] |
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 message-map [msg1] | |
(reify | |
clojure.lang.IDeref | |
(deref [] msg1) | |
clojure.lang.IKeywordLookup | |
(getLookupThunk [k] | |
(let [getter (->> (name k) | |
(replace-by #"(?:^|-)(.)" #(.toUpperCase (nth % 1))) | |
(str "get") | |
symbol) |
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 joy.proxytest) | |
;;== evilbase | |
(gen-class | |
:name joy.proxytest.evilbase | |
:prefix "evilbase-" | |
:post-init ctor | |
:methods [[tragedy [] void]] | |
:impl-ns joy.proxytest) |
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
(-> | |
(javax.xml.parsers.SAXParserFactory/newInstance) | |
.newSAXParser | |
(.parse (java.io.ByteArrayInputStream. | |
(.getBytes "<foo>bar</foo>")) | |
(proxy [org.xml.sax.helpers.DefaultHandler] [] | |
(startElement [_ _ n _] | |
(prn n))))) | |
; "HTML" | |
; "HEAD" |