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
export version=1.5.3 | |
if [ "$#" -gt 0 ] ; then | |
export version="$1" | |
fi | |
echo "Installing Dropbox SDK version $version" | |
wget https://www.dropbox.com/static/developers/dropbox-java-sdk-$version.zip | |
unzip dropbox-java-sdk* | |
cd dropbox-java-sdk* |
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
(defproject streamhubstats "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:main streamhubstats.core | |
:dependencies [ | |
[org.clojure/clojure "1.5.1"] | |
[clj-http "0.7.6"] ; https://github.com/dakrone/clj-http | |
[clj-time "0.5.1"] ; https://github.com/seancorfield/clj-time |
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 imaging.core) | |
(import 'java.awt.image.BufferedImage) | |
(use 'clojure.java.io) | |
(import '[javax.swing JFrame JLabel ImageIcon]) | |
(defn setpxl [^BufferedImage image data] | |
(let [h (.getHeight image) | |
w (.getWidth image)] | |
(.setRGB image 0 0 w h ^ints data 0 w) |
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/aysylu/loom | |
(require-lib '[[aysylu/loom "0.4.2"]]) | |
(use 'loom.graph) | |
(use 'loom.io) | |
; define the graph | |
(def g (graph [1 2] [2 3] {3 [4] 5 [6 7]} 7 8 9)) | |
; view the graph if you have graphviz included |
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
(require 'frak) | |
(frak/pattern ["foo" "bar" "baz" "quux"]) | |
; #"(?:quux|foo|ba[zr])" | |
(frak/pattern ["Clojure" "Clojars" "ClojureScript"]) | |
; #"Cloj(?:ure(?:Script)?|ars)" | |
(frak/pattern ["skill" "skills" "skull" "skulls"]) | |
; #"sk(?:[ui]lls?)" |
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
var | |
i:int = 0 | |
proc tak(x, y, z:int):int = | |
if x <= y: | |
y | |
else: | |
i = i + 1 | |
tak(tak(x-1, y, z),tak(y-1, z, x),tak(z-1, x, y)) |
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 Tak { | |
static long number = 0; | |
public static long tak(long x, long y, long z) { | |
if (x <= y) | |
return y; | |
else | |
number ++; | |
return | |
tak(tak(x-1, y, z),tak(y-1, z, x),tak(z-1, x, y)); |