This file contains hidden or 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
<dependency> | |
<groupId>com.sun.grizzly.osgi</groupId> | |
<artifactId>grizzly-httpservice-bundle</artifactId> | |
<version>1.9.9-SNAPSHOT</version> | |
<!-- Or for latest released version RELEASE --> | |
</dependency> |
This file contains hidden or 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
<dependency> | |
<groupId>com.sun.grizzly.osgi</groupId> | |
<artifactId>grizzly-httpservice</artifactId> | |
<version>1.9.9-SNAPSHOT</version> | |
<!-- Or for latest released version RELEASE --> | |
</dependency> |
This file contains hidden or 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
diff --git a/project.clj b/project.clj | |
index adac2b2..3c05f8f 100644 | |
--- a/project.clj | |
+++ b/project.clj | |
@@ -1,6 +1,6 @@ | |
(defproject fnparse "2.2.4" | |
:description "A library for creating functional parsers in Clojure." | |
- :dependencies [[org.clojure/clojure "1.0.0"] | |
- [org.clojure/clojure "1.0.0-SNAPSHOT"]] | |
+ :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] |
This file contains hidden or 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 mystr | |
"With no args, returns the empty string. With one arg x, returns | |
x.toString(). (str nil) returns the empty string. With more than | |
one arg, returns the concatenation of the str values of the args." | |
{:tag String} | |
([] (println "0:") | |
"") | |
([#^Object x] (println "1: x:" x) | |
(if (nil? x) "" (. x (toString)))) | |
([x & ys] (println "2: x: " x ", ys: " ys) |
This file contains hidden or 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 test-clean | |
(:refer-clojure :exclude [compile]) | |
(:use [leiningen.core :only [read-project defproject]] | |
[leiningen.deps :only [deps]] | |
[leiningen.clean :only [clean]] | |
[leiningen.compile :only [compile]] :reload-all) | |
(:use [clojure.test] | |
[clojure.contrib.set] | |
[clojure.contrib.java-utils :only [file]])) |
This file contains hidden or 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 serv (:use compojure)) | |
(defroutes greetings | |
(GET "/" | |
(html [:h1 "Hello World"])) | |
(ANY "*" | |
(page-not-found))) | |
(def server (run-server {:port 8080} "/*" (servlet greetings))) |
This file contains hidden or 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
#!/bin/bash | |
pidfile=$WHERE_YOUR_PIDFILE_IS_LOCATED | |
if [ -e $pidfile ]; then | |
pid=`cat $pidfile` | |
if kill -0 >/dev/null 2>&1 $pid; then | |
echo "Already running" | |
exit 1 | |
else | |
rm $pidfile | |
fi |
This file contains hidden or 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
2010-05-17 11:26:26 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.3-b01-101 mixed mode): | |
"Attach Listener" daemon prio=9 tid=0x0000000102135000 nid=0x114fe6000 waiting on condition [0x0000000000000000] | |
java.lang.Thread.State: RUNNABLE | |
"Swank REPL Thread" prio=5 tid=0x00000001024f8000 nid=0x1155bf000 waiting on condition [0x00000001155bd000] | |
java.lang.Thread.State: WAITING (parking) | |
at sun.misc.Unsafe.park(Native Method) | |
- parking to wait for <0x00000001094a4508> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) |
This file contains hidden or 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
(doseq [[fn-name fn-doc] [testname "sample doc" anothername "detailed documentation"]] | |
`(defn ~fn-name ~fn-doc [a] a)) |
This file contains hidden or 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.ning.http.client.AsyncCompletionHandler; | |
import com.ning.http.client.AsyncHttpClient; | |
import com.ning.http.client.Request; | |
import com.ning.http.client.Response; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.Future; | |
public class Problem { |
OlderNewer