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
;; -*- Mode: Lisp; Syntax: Common-Lisp -*- | |
;;; Package Management | |
(in-package :cl-user) | |
(defpackage :hige | |
(:use :cl | |
:drakma) | |
#+ABCL (:shadow :y-or-n-p) | |
(:export #:pin |
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 org.clojars.making.cloudure.conv | |
(:import (org.apache.hadoop.io IntWritable LongWritable DoubleWritable Text)) | |
) | |
(defmulti conv class) | |
(defmethod conv :default [x] | |
x) | |
(defmacro defconv [conv-map] |
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
(defmacro definc [x] | |
`(do ~@(map (fn [i] `(defn ~(symbol (str "inc" i)) [y#] (+ ~i y#))) (range x)))) | |
(defmacro cond10 [x] | |
`(cond ~@(reduce into [] (map (fn [i] `((= ~x ~i) ~(str "hoge" i))) (range 10))))) | |
(defmacro def-with-log [fname args & body] | |
`(defn ~fname ~args | |
(println "begin" '~fname ~@args) | |
(let [ret# (do ~@body)] |
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
(declare fizz) | |
(declare buzz) | |
(defn fizz-buzz-1 [n] | |
(when (> n 0) | |
(print n " = ") | |
#(fizz n))) | |
(defn fizz [n] | |
(if (zero? (rem n 3)) |
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.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.BitSet; | |
import java.util.Random; | |
public class BloomFilter<E> { | |
private BitSet bf; | |
private int bitArraySize; | |
private int numHashFunc; |
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 main; | |
import jp.sf.amateras.mirage.annotation.PrimaryKey; | |
public class Category { | |
@PrimaryKey | |
public Long id; | |
public String name; |
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 hoge; | |
import clojure.lang.Counted; | |
import clojure.lang.IFn; | |
import clojure.lang.IKeywordLookup; | |
import clojure.lang.ILookup; | |
import clojure.lang.ILookupThunk; | |
import clojure.lang.IMapEntry; | |
import clojure.lang.IObj; | |
import clojure.lang.IPersistentCollection; |
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 hoge; | |
import clojure.lang.Counted; | |
import clojure.lang.IFn; | |
import clojure.lang.IKeywordLookup; | |
import clojure.lang.ILookup; | |
import clojure.lang.ILookupThunk; | |
import clojure.lang.IMapEntry; | |
import clojure.lang.IObj; | |
import clojure.lang.IPersistentCollection; |
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 hoge; | |
public final class Hoge | |
{ | |
public final Object x; | |
public final Object y; | |
public final Object z; | |
public Hoge(Object paramObject1, Object paramObject2, Object paramObject3) | |
{ |
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
#!/bin/sh | |
##------------------------- | |
## configurable params | |
##------------------------- | |
PROJECTNAME=$1 | |
if [ "$PROJECTNAME" == "" ];then | |
PROJECTNAME=`basename \`pwd\`` | |
fi | |
JAVAVERSION=1.7 |