Skip to content

Instantly share code, notes, and snippets.

Anthony Grimes Raynes

Block or report user

Report or block Raynes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test.clj
(ns main.main)
(defn main [] (println "Hello, World!"))
View test.clj
(ns main.main)
(defn main
([name] (println (str "Hi there, " name)))
([] (main "World!")))
View test.clj
(require 'swank.swank)
(swank.swank/ignore-protocol-version "2009-05-17")
(swank.swank/start-server "/tmp/slime.17534" :encoding "iso-latin-1-unix")
Clojure 1.1.0-alpha-SNAPSHOT
user=> java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V (pprint.clj:1)
user=> user=> java.lang.Exception: No such var: swank.swank/ignore-protocol-version (NO_SOURCE_FILE:3)
user=> user=> java.lang.Exception: No such var: swank.swank/start-server (NO_SOURCE_FILE:5)
View cipher.clj
(ns cipher)
(def alphabet-nums (apply hash-map (interleave (range 1 27) "abcdefghijklmnopqrstuvwxyz")))
(def alphabet-chars (apply hash-map (interleave "abcdefghijklmnopqrstuvwxyz" (range 1 27))))
(defn is-letter? [s]
(if (re-find #"(?i)[a-z]" (.toString s)) true false))
(defn shift-char
"Shifts the given Character down the alphabet by three."
View cipher.clj
(ns cipher
(:use [clojure.contrib.def :only (defnk)]))
(def alphabet-nums (apply hash-map (interleave (range 1 27) "abcdefghijklmnopqrstuvwxyz")))
(def alphabet-chars (apply hash-map (interleave "abcdefghijklmnopqrstuvwxyz" (range 1 27))))
(defn is-letter? [s]
(if (re-find #"(?i)[a-z]" (.toString s)) true false))
(defn shift-char-forward
View cipher.clj
(ns cipher
(:use [clojure.contrib.def :only (defnk)]))
(def alphabet-nums (apply hash-map (interleave (range 1 27) "abcdefghijklmnopqrstuvwxyz")))
(def alphabet-chars (apply hash-map (interleave "abcdefghijklmnopqrstuvwxyz" (range 1 27))))
(defn is-letter? [s]
(if (re-find #"(?i)[a-z]" (.toString s)) true false))
(defnk shift-char-forward
View *scratch*
QUOTE
QUOTE
QUOTE
Dude, I have nothing against you personally. From what I have read you seem nice enough. I have known some witches and pagans in my day, and have called some friend. Don't feel a need to take what I say personally. smile.gif
You haven't said anything against me personally. I don't have anything against you whatsoever. There are just certain things that bother me. I honestly didn't mean to offend you, if I did.
Takes a lot to offend me bro. I am a soldier, at the front lines of this war. This is what I do. I just wanted to make sure you didn't take it hard. smile.gif were cool.
View *slime-repl clojure*
; SLIME 20091016
user> (shift-char-forward \a)
; Evaluation aborted.
user> (shift-char-forward 1)
; Evaluation aborted.
user> (shift-char-forward 1)
; Evaluation aborted.
user> (shift-char-forward 1)
; Evaluation aborted.
user> (ns cipher)
View cipher.clj
(ns cipher
(:use [clojure.contrib.def :only (defnk)]))
(def alphabet-nums (apply hash-map (interleave (range 1 27) "abcdefghijklmnopqrstuvwxyz")))
(def alphabet-chars (apply hash-map (interleave "abcdefghijklmnopqrstuvwxyz" (range 1 27))))
(defn is-letter? [s]
(if (re-find #"(?i)[a-z]" (.toString s)) true false))
(defnk shift-char
View caesers.cs
public string Encrypt(string word)
{
word.ToLower();
string encryptedWord = "";
char[] split = word.ToCharArray();
foreach (char character in split)
{
switch (character)
{
case 'a': encryptedWord += "d"; break;
You can’t perform that action at this time.