Permalink
Browse files

Merge branch 'release/0.1.2.1'

  • Loading branch information...
2 parents fb48656 + 56fc0fa commit 4513b79c18c1addb903ce20ad8d4a0620ee67087 @amalloy amalloy committed Apr 24, 2011
Showing with 38 additions and 7 deletions.
  1. +1 −1 README.md
  2. +2 −2 project.clj
  3. +33 −2 src/foreclojure/data_set.clj
  4. +2 −2 src/foreclojure/problems.clj
View
@@ -42,7 +42,7 @@ vaguely like this:
* Alan Malloy (amalloy)
* Anthony Grimes (raynes)
* Carin Meier (cmeier)
- * Clint Harrison
+ * Clint Harrison (clinteger)
Problem sources:
View
@@ -1,4 +1,4 @@
-(defproject foreclojure "0.1.2"
+(defproject foreclojure "0.1.2.1"
:description "4clojure - a website for lisp beginners"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
@@ -9,7 +9,7 @@
[org.clojars.christophermaier/congomongo "0.1.4-SNAPSHOT"]
[org.jasypt/jasypt "1.7"]
[amalloy/utils "[0.3.7,)"]
- [clj-github "1.0.0-SNAPSHOT"]
+ [clj-github "1.0.1"]
[ring "0.3.7"]
[clj-config "0.1.0"]
[org.apache.commons/commons-email "1.2"]]
@@ -8,7 +8,7 @@
{:_id 1
:title "Nothing but the Truth"
:times-solved 0
- :description "This is a clojure form. Enter a value which will make the form evaluate to true. Don't over think it! If you are confused, see the <a href='/directions'>getting started</a> page."
+ :description "This is a clojure form. Enter a value which will make the form evaluate to true. Don't over think it! If you are confused, see the <a href='/directions'>getting started</a> page. Hint: true is equal to true."
:tags ["elementary"]
:tests ["(= __ true)"]})
@@ -560,4 +560,35 @@
:tags ["medium" "seqs" "core-functions"]
:tests ["(= (__ [1 1 2 3 2 1 1]) {1 4, 2 2, 3 1})"
"(= (__ [:b :a :b :a :b]) {:a 2, :b 3})"
- "(= (__ '([1 2] [1 3] [1 3])) {[1 2] 1, [1 3] 2})"]})))
+ "(= (__ '([1 2] [1 3] [1 3])) {[1 2] 1, [1 3] 2})"]})
+
+ (insert! :problems
+ {:_id 56
+ :title "Find Distinct Items"
+ :times-solved 0
+ :restricted ["distinct"]
+ :description "Write a function which removes the duplicates from a sequence. Order of the items must be maintained."
+ :tags ["medium" "seqs" "core-functions"]
+ :tests ["(= (__ [1 2 1 3 1 2 4]) [1 2 3 4])"
+ "(= (__ [:a :a :b :b :c :c]) [:a :b :c])"
+ "(= (__ '([2 4] [1 2] [1 3] [1 3])) '([2 4] [1 2] [1 3]))"]})
+
+ (insert! :problems
+ {:_id 56
+ :title "Find Distinct Items"
+ :times-solved 0
+ :restricted ["distinct"]
+ :description "Write a function which removes the duplicates from a sequence. Order of the items must be maintained."
+ :tags ["medium" "seqs" "core-functions"]
+ :tests ["(= (__ [1 2 1 3 1 2 4]) [1 2 3 4])"
+ "(= (__ [:a :a :b :b :c :c]) [:a :b :c])"
+ "(= (__ '([2 4] [1 2] [1 3] [1 3])) '([2 4] [1 2] [1 3]))"
+ "(= (__ (range 50)) (range 50))"]})
+
+ (insert! :problems
+ {:_id 57
+ :title "Simple Recursion"
+ :times-solved 0
+ :description "A recursive function is a function which calls itself. This is one of the fundamental techniques used in functional programming."
+ :tags ["elementary" "recursion"]
+ :tests ["(= __ ((fn foo [x] (when (> x 0) (conj (foo (dec x)) x))) 5))"]})))
@@ -24,7 +24,7 @@
(from-mongo
(fetch :problems
:only [:_id :title :tags :times-solved]
- :sort {:id 1})))
+ :sort {:_id 1})))
(defn mark-completed [id code & [user]]
(let [user (or user (session/session-get :user))
@@ -108,7 +108,7 @@
[:tr
[:th "Title"]
[:th "Tags"]
- [:th "Count"]
+ [:th "Times Solved"]
[:th "Solved?"]]]
(let [solved (get-solved (session/session-get :user))
problems (get-problem-list)]

0 comments on commit 4513b79

Please sign in to comment.