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
;;These functions are equivalent | |
;; the :as :map isn't quite right, it returns a map with key to a vector of | |
;; values when I should just have key to value, so we adjust it, | |
;; TODO: there must be a better way | |
(defn- headers-to-map1 [headers] | |
(loop [out {} left headers] | |
(let [cur (first left) | |
key (first cur) | |
val (second cur) |
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 abcdef.core) | |
(set! *warn-on-reflection* true) | |
;(def a [:a :b :c :d :e :f]) | |
;(def m :m) | |
;(def answer [:f :a :b :c :d :e]) | |
(defn number-from-digits [digits] | |
(let [digits-r (reverse digits)] | |
(loop [digit 1 accumulator 0 left digits-r] |
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
public class ReadStdout implements Runnable { | |
BufferedReader pipe; | |
Process process; | |
private Poster poster; | |
public ReadStdout(Process p) { | |
process = p; | |
} |
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.garytrakhman; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class ThreadTest { | |
List<String> strings = new ArrayList<String>(); |
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
public class apeshit { | |
List<> myList = new ArrayList<>(); | |
JButton button; | |
button.addActionListener( new ActionListener() { | |
public void actionPerformed ( ActionEvent event ){ | |
myList = new ArrayList<>("bullshit", "bullcrap"); | |
} | |
}); | |
} |
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.garytrakhman.common; | |
public class FinalTest { | |
private String test; | |
{ | |
// works | |
new Runnable() { | |
@Override | |
public void run() { |
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
user=> (time (let [_count (atom 0)] | |
(dotimes [a 10000000] (swap! _count inc)))) | |
"Elapsed time: 1292.590795 msecs" | |
nil | |
user=> (time (let [] | |
(dotimes [a 10000000] (inc a)))) | |
"Elapsed time: 81.46009 msecs" | |
nil |
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 splinter.test.core | |
(:use splinter.core | |
clojure.test | |
clojure.repl | |
clojure.java.io)) | |
(def PREFIX "testsuite/") | |
(defn test-fn [infile] | |
(let [a (str PREFIX infile ".ttl") |
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
https://github.com/heroku/heroku-buildpack-clojure | |
http://devcenter.heroku.com/articles/labs-user-env-compile | |
http://devcenter.heroku.com/articles/config-vars | |
LEIN_BUILD_TASK=compile :all | |
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
<link rel="stylesheet" href="/static/vendor/css/blueprint/screen.css" type="text/css" media="screen, projection" /><link rel="stylesheet" href="/static/vendor/css/blueprint/print.css" type="text/css" media="print" /> <!--[if lt IE 8]><link rel="stylesheet" href="/static/vendor/css/blueprint/ie.css" type="text/css" media="screen, projection" /><![endif]--> |
OlderNewer