-- mode: markdown --
TODO!
lip? mouth? backtalk? guff? sauce?
Leading contender: sauce
(defn dir-descendants | |
"Creates a lazy sequence of files by recursively walking | |
a directory tree and returning all the files it finds." | |
[dir] | |
(let [children (.listFiles (File. dir))] | |
(lazy-cat | |
(map (memfn getPath) (filter (memfn isFile) children)) | |
(mapcat dir-descendants | |
(map (memfn getPath) (filter (memfn isDirectory) children)))))) |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
using System.Drawing; | |
using System.Threading; | |
using Timer = System.Windows.Forms.Timer; | |
using System.IO; |
(ns com.wangdera.slideshow | |
(:use [clojure.contrib.test-is]) | |
(:import (java.io File) | |
(javax.imageio ImageIO) | |
(javax.swing JFrame JPanel Timer) | |
(java.awt Dimension Frame Color) | |
(java.awt.event ActionListener WindowAdapter))) | |
(def imagelist (atom [])) | |
(def current-image (atom nil)) |
(defn cartes5 | |
[a b & [c & ds :as more]] | |
(let [so-far | |
(for [x a y b] | |
[x y])] | |
(if more | |
(recur so-far c ds) | |
(map flatten so-far)))) |
(defn nfe-test [] | |
(try | |
(let [nums (map #(Integer/parseInt %) ["1" "2" "1234123412341234"])] | |
(when (every? #(< 3 %) nums) | |
nums)) | |
(catch NumberFormatException nfe nil))) | |
(nfe-test) ;; throws NumberFormatException, but I would expect it to | |
;; return nil |
(ns repro.core | |
(:use [clojure.contrib.io :only [reader]]) | |
(:gen-class)) | |
(defn -main [& args] | |
(println (line-seq (reader (first args))))) |
git push heroku master | xclip -selection clipboard | |
Counting objects: 70, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (53/53), done. | |
Writing objects: 100% (57/57), 6.97 KiB, done. | |
Total 57 (delta 29), reused 0 (delta 0) | |
-----> Heroku receiving push | |
-----> Clojure app detected | |
-----> Installing Leiningen |
1) Refine search can search for income ranges | |
Failure/Error: page.number_of_leads.should == initial_results | |
expected: 876 | |
got: 68 (using ==) | |
# ./spec/acceptance/refine_search_acceptance_spec.rb:147:in `block (2 levels) in <top (required)>' | |
2) Refine search can search for home value | |
Failure/Error: page.number_of_leads.should == initial_results | |
expected: 876 |
1) Refine search can refine the search with sliders for zipcode radius and age | |
Failure/Error: results_for_18_to_22_year_olds.should < results_for_30_mile_radius | |
expected: < 12416 | |
got: 12416 | |
# ./spec/acceptance/refine_search_acceptance_spec.rb:54:in `block (3 levels) in <top (required)>' | |
# ./app/models/setting.rb:63:in `with_temp_setting' | |
# ./spec/acceptance/refine_search_acceptance_spec.rb:22:in `block (2 levels) in <top (required)>' | |
2) Refine search can search for income ranges |