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 main.main) | |
(defn main [] (println "Hello, World!")) |
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 main.main) | |
(defn main | |
([name] (println (str "Hi there, " name))) | |
([] (main "World!"))) |
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 '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) |
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 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." |
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 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 |
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 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 |
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
; 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) |
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 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 |
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
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. |
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 string Encrypt(string word) | |
{ | |
word.ToLower(); | |
string encryptedWord = ""; | |
char[] split = word.ToCharArray(); | |
foreach (char character in split) | |
{ | |
switch (character) | |
{ | |
case 'a': encryptedWord += "d"; break; |