b- IndexClj edit** - wiki at8a.....

; ;{{{ ((defn index [] (handle "" (fn [] (if (.equals "/" (.getPathInfo request)) (str "

Citizens

" "" (apply str (map (fn [x] (str "" (apply str (map (fn [y] (str "")) (range 8))) "")) (range 1))) "" "
" (if (and (< y 8) (= x 0)) (let [person (get ["RainerWasserfuhr" "YvonneSchubert" "DanielPoodratchi" "RicardaDHerbrand" "ChristineSchlinck" "HeidiGallinat" "RalfLippold" "SimonKoeppl" "UteMoritz" ] (- 7 y))] (str "" ) ) ) "
More...
" "

RecentEvents

" (let [hConf (new org.apache.hadoop.hbase.HBaseConfiguration) hTable (new org.apache.hadoop.hbase.client.HTable hConf "EventLog")] ((defn scanRow [zz] (let [next (.next zz)] (if next (let [eventType (new String (.getValue (.get next "log:EventType")))] (str "
  • " (.format (new java.text.SimpleDateFormat "yyyy-MM-dd HH:mm:ss") (getTimestamp next)) ": " (if (.equals "LogIn" eventType) ; TODO: WikiName from MindId table: (str "" "RainerWasserfuhr (MindId " (new String (.getValue (.get next "log:MindId"))) ") logged in.")) (if (.equals "LogOut" eventType) (str "" "RainerWasserfuhr (MindId " (new String (.getValue (.get next "log:MindId"))) ") logged out.")) (if (.equals "JoinNow" eventType) (str ;; http://www.flickr.com/photos/14947022@N06/3648161073/ "" (new String (.getValue (.get next "log:WikiName"))) " wants to join NooPolis. check now.")) "
  • " (scanRow zz)))))) (.getScanner hTable (into-array ["log:"])) ) ) ) )) "")) ) ;}}}