core.async 1.2.599-SNAPSHOT (in development)
chan
close!
buffer
dropping-buffer
sliding-buffer
unblocking-buffer?
| (require '[clojure.spec.alpha :as s]) | |
| ; ============================== | |
| (s/def ::foo int?) | |
| (s/def ::bar ::foo) | |
| (s/form ::foo) ;=> clojure.core/int? | |
| (s/form ::bar) ;=> clojure.core/int? |
| // Nota bene: Add @JsonIgnore to MultiPart fields | |
| public static final ObjectMapper MAPPER = new ObjectMapper() | |
| .configure(FAIL_ON_UNKNOWN_PROPERTIES, false) | |
| .configure(FAIL_ON_EMPTY_BEANS, false); | |
| public static final TypeReference<Map<String, Object>> | |
| MAP_TYPE_REF = new TypeReference<>() {}; | |
| public static Map<String, Object> toMap(Object obj) { |
core.async 1.2.599-SNAPSHOT (in development)
chan
close!
buffer
dropping-buffer
sliding-buffer
unblocking-buffer?
| ;; Vanilla | |
| (defn is* | |
| [results] | |
| (assert (seq results)) | |
| (test/is | |
| (if (some? :failure results) | |
| (do | |
| (println "\nFailed specs:") | |
| (doseq [{:keys [sym failure]} results |
| (with-test | |
| (defn ->and | |
| [id-col id-val rec] | |
| (if id-val | |
| (reduce-kv | |
| (fn [ret col val] | |
| (if val | |
| (-> ret | |
| (update 0 #(str % " AND " (name col) " = ?")) |
| ;; https://nakkaya.com/2009/11/18/unit-testing-in-clojure/ | |
| (defmacro with-private-fns [[ns fns] & tests] | |
| "Refers private fns from ns and runs tests in context." | |
| `(let ~(reduce #(conj %1 %2 `(ns-resolve '~ns '~%2)) [] fns) | |
| ~@tests)) | |
| (with-private-fns [org.foo.bar [fn1 fn2]] | |
| (deftest test-fn1..) | |
| (deftest test-fn2..)) |
| ;; String containing bulk space(s) | |
| (s/def ::bulk-space-string | |
| (s/with-gen | |
| (s/and string? #(re-find #"\t|\n|\r| +" %)) | |
| #(gen/fmap | |
| str/join | |
| (gen/vector | |
| (gen/one-of | |
| [(gen/string) |
Create folder C:\Users\USER\.lein with
bin with file lein.batself-installs with file leiningen-VERSION-standalone.jarprofiles.clj with content: {:user {:java-cmd "C:\\Program Files\\Java\\jdk-VERSION\\bin\\java.exe"}}Computer -> Properties -> Advanced system settings -> Environment Variables -> User variables for USER
Path -> Edit...;) C:\Users\USER\.lein\bin| Debugger entered--Lisp error: (quit) | |
| redisplay_internal\ \(C\ function\)() | |
| Debugger entered--beginning evaluation of function call form: | |
| * (normal-top-level) | |
| Debugger entered--entering a function: | |
| * message("Back to top level") | |
| * normal-top-level() |