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
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |
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
| _lein_test() | |
| { | |
| local curw | |
| COMPREPLY=() | |
| curw=${COMP_WORDS[COMP_CWORD]} | |
| if [ -d test ]; then | |
| COMPREPLY=($(compgen -W '$(cd test; find * -name \*.clj | sed "s/.clj\$//" | sed "s/_/-/g" | sed "s|/|.|g")' -- $curw)); | |
| return 0 | |
| 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
| _lein_test() | |
| { | |
| local curw | |
| COMPREPLY=() | |
| curw=${COMP_WORDS[COMP_CWORD]} | |
| if [ -d test ]; then | |
| COMPREPLY=($(compgen -W '$(cd test; find * -name \*.clj | sed "s/.clj\$//" | sed "s/_/-/g" | sed "s|/|.|g")' -- $curw)); | |
| return 0 | |
| 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
| (ns com.freiheit.clojure.appengine.appengine-local | |
| (:use | |
| [compojure.http routes servlet helpers] | |
| clojure.contrib.test-is | |
| compojure.server.jetty | |
| [clojure.contrib def str-utils duck-streams]) | |
| (:require | |
| [clojure.contrib.logging :as log]) | |
| (:import | |
| [com.google.appengine.api.labs.taskqueue.dev LocalTaskQueue] |
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 com.freiheit.clojure.appengine.appengine-local | |
| (:use | |
| [compojure.http routes servlet helpers] | |
| clojure.contrib.test-is | |
| compojure.server.jetty | |
| [clojure.contrib def str-utils duck-streams]) | |
| (:require | |
| [clojure.contrib.logging :as log]) | |
| (:import | |
| [com.google.appengine.api.labs.taskqueue.dev LocalTaskQueue] |
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
| # my new favorite bashrc function | |
| # quickly inspect source files in style | |
| function pless { | |
| pygmentize $1 | less -r | |
| } | |
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
| # my new favorite bashrc function | |
| # quickly inspect source files in style | |
| function pless { | |
| pygmentize $1 | less -r | |
| } | |
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
| // See comments below. | |
| // This code sample and justification brought to you by | |
| // Isaac Z. Schlueter, aka isaacs | |
| // standard style | |
| var a = "ape", | |
| b = "bat", | |
| c = "cat", | |
| d = "dog", |
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
| ; Copyright (c) Jonas Enlund. All rights reserved. | |
| ; The use and distribution terms for this software are covered by the | |
| ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | |
| ; which can be found in the file epl-v10.html at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by | |
| ; the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| (set! *warn-on-reflection* true) |
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 a) | |
| (use '[clojure.contrib.io :only (make-parents spit delete-file)]) | |
| (use '[clojure.contrib.shell :only (sh)]) | |
| (use '[clojure.contrib.str-utils :only (re-split str-join)]) | |
| (defn- convert-fn-meta-into-javadoc | |
| [impl-ns prefix mname pclasses rclass is-static?] | |
| (let [m (meta (resolve (symbol (str (str impl-ns) "/" prefix (str mname))))) | |
| {:keys [file line doc]} m |
OlderNewer