flipping solution

flipping solution

error: pathspec 'src/4clojure/flipping.clj' did not match any file(s) known to git

--- src/4clojure/flipping.clj
+++ src/4clojure/flipping.clj
@@ -0,0 +1,38 @@
+;; Flipping out
+;; http://www.4clojure.com/problem/46
+
+;; Difficulty:	Medium
+;; Topics:	higher-order-functions
+
+;; Write a higher-order function which flips the order of the arguments of an input function.
+
+
+(defn __ [f]
+  (fn [a b] (f b a)))
+
+
+(= 3 ((__ nth) 2 [1 2 3 4 5]))
+
+(= true ((__ >) 7 8))
+
+(= 4 ((__ quot) 2 8))
+
+(= [1 2 3] ((__ take) [1 2 3 4 5] 3))
+
+
+;; 4Clojure copy paste
+(fn [f] (fn [a b] (f b a)))
+
+
+;; _artem_uv's solution:
+;; #(fn [x y] (% y x))
+
+;; _pcl's solution:
+;; (fn [f] (fn [l r] (f r l)))
+
+;; aceeca1's solution:
+;; #(comp (partial apply %) reverse list)
+
+;; adereth's solution:
+;; (fn [f]
+;;   (fn [& ps] (apply f (reverse ps))))


fix typos in database/create docstring

fix typos in database/create docstring

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/colophon/clarango.git/'


Note for simple contains not done yet.

Note for simple contains not done yet.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


add functions to read lines,words from file

error: pathspec 'src/bookmarks/files.clj' did not match any file(s) known to git

--- src/bookmarks/files.clj
+++ src/bookmarks/files.clj
@@ -0,0 +1,40 @@
+(ns bookmarks.files
+  (:require [clojure.string :refer [lower-case split
+                                    blank? split-lines]]
+            [clojure.java.io :refer [file]]))
+
+
+(defn split-line [line]
+  (vec (split (clojure.string/replace
+               line #"[.,()]" "") #"\s+")))
+
+(defn get-lines [file-path]
+  (remove blank? (split-lines (slurp
+                               (file file-path)))))
+(defn get-words [file-path]
+  (mapcat split-line (get-lines file-path)))
+
+(defn word-count [filename]
+  (count (get-words filename)))
+
+(defn word-frequency [word filename]
+  (let [w (lower-case word)]
+    (count (filter (fn [w1] (= w (lower-case w1)))
+                   (get-words filename)))))
+
+(defn isword-contains? [word line]
+  (let [w (lower-case word) coll (split-line line) ]
+    (loop [c coll]
+      (cond (empty? c) false
+            (= w (first c)) true
+            :else (recur (rest c))))))
+
+
+(defn grep1 [word filename]
+  (let [w (lower-case word)]
+    (into {} (filter (fn [[k v]] (isword-contains? w (lower-case v)))
+                     (zipmap (range) (get-lines filename))))))
+
+(defn index [filename]
+  (reduce (fn [x w] ( conj x [w (keys (grep1 w filename))]))
+          {} (get-words filename)))


(add search params description)

(add search params description)

fatal: unable to access 'https://github.com/fhirbase/fhirplace.git/': The requested URL returned error: 403


restored support for previous sdk versions without build-tools

Signed-off-by: Alexander Yakushev <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@bytopia.org>

--- src/leiningen/droid/utils.clj
+++ src/leiningen/droid/utils.clj
@@ -37,15 +37,28 @@
   Unix and Windows platforms."
   [sdk-path]
   (ensure-paths sdk-path)
+  ;; for now just try to infer whether we're having build-tools 17
   (let [bt-dir (first (.list (file sdk-path "build-tools")))]
-   {:dx {:unix ["build-tools" bt-dir "dx"]
-         :win ["build-tools" bt-dir "dx.bat"]}
-    :adb {:unix ["platform-tools" "adb"]
-          :win ["platform-tools" "adb.exe"]}
-    :aapt {:unix ["build-tools" bt-dir "aapt"]
-           :win ["build-tools" bt-dir "aapt.exe"]}
-    :zipalign {:unix ["tools" "zipalign"]
-               :win ["tools" "zipalign.exe"]}}))
+    ;; if bt-dir exists (i.e. non-nil) then, probably, it is not empty
+    ;; and therefore we can assume that we're running build-tools 17+ revision
+    (if bt-dir
+      {:dx {:unix ["build-tools" bt-dir "dx"]
+            :win ["build-tools" bt-dir "dx.bat"]}
+       :adb {:unix ["platform-tools" "adb"]
+             :win ["platform-tools" "adb.exe"]}
+       :aapt {:unix ["build-tools" bt-dir "aapt"]
+              :win ["build-tools" bt-dir "aapt.exe"]}
+       :zipalign {:unix ["tools" "zipalign"]
+                  :win ["tools" "zipalign.exe"]}}
+
+      {:dx {:unix ["platform-tools" "dx"]
+            :win ["platform-tools" "dx.bat"]}
+       :adb {:unix ["platform-tools" "adb"]
+             :win ["platform-tools" "adb.exe"]}
+       :aapt {:unix ["platform-tools" "aapt"]
+              :win ["platform-tools" "aapt.exe"]}
+       :zipalign {:unix ["tools" "zipalign"]
+                  :win ["tools" "zipalign.exe"]}})))

 (defn sdk-binary
   "Given the path to SDK and the binary keyword, returns either a full
@@ -53,10 +66,12 @@
   batch-files."
   [sdk-path binary-kw]
   (let [binary (get-in (sdk-binary-paths sdk-path)
-                       [binary-kw (if (windows?) :win :unix)])]
+                       [binary-kw (if (windows?) :win :unix)])
+        binary-str (str (apply file sdk-path binary))]
+    (ensure-paths binary-str)
     (if (.endsWith (last binary) ".bat")
-      ["cmd.exe" "/C" (str (apply file sdk-path binary))]
-      (str (apply file sdk-path binary)))))
+      ["cmd.exe" "/C" binary-str]
+      binary-str)))

 ;; ### Middleware section


Don't update resource attributes with metadata if it's not a 200 response

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Add naive clojure implementation - without validation.

error: pathspec 'other/main.clj' did not match any file(s) known to git

--- other/main.clj
+++ other/main.clj
@@ -0,0 +1,24 @@
+(ns roman-to-decimal.core)
+(use ['clojure.string :only '(split)])
+
+;;; This is a fairly messy implementation, since I have almost 0 expirence with
+;;; clojure. Please forgive me then, and please leave a note if you have tips or
+;;; comments.
+
+(defn roman-to-decimal [roman]
+  ;; Converts roman numbers represented as strings into decimal numbers
+
+  (defn iter [acc decimal i]
+    (if (= i (count decimal))
+      acc
+      (let [n (nth decimal i)
+            nxt-i (+ i 1)
+            nxt (nth decimal nxt-i 0)]
+
+      (if (> nxt n)
+        (iter (- acc n) decimal nxt-i)
+        (iter (+ acc n) decimal nxt-i)))))
+
+  (let [roman-map {"I" 1, "V" 5, "X" 10, "L" 50, "C" 100, "D" 500, "M" 1000}
+        decimal (map roman-map (rest (split roman #"")))]
+    (iter 0 decimal 0)))


Use collection find spec to eliminate (map first)

This query format gets rid of the nested single-element vectors that result from using the relation find spec and thus eliminate the need to map `first` over the results. See Datomic query docs for more info.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/partner-works.git/'


First version of dolly.clone namespace checked in.  Work in progress

error: pathspec 'src/dolly/clone.clj' did not match any file(s) known to git

--- src/dolly/clone.clj
+++ src/dolly/clone.clj
@@ -0,0 +1,252 @@
+(ns dolly.clone
+  (:require [clojure.string :as str]
+            [clojure.java.io :as io]
+            [clojure.tools.namespace.move :as move]
+            [dolly.namespace :as ns])
+  (:import (java.io File)))
+
+
+(defn copy-ns-file
+  "Copies the .clj source file (found relative to source-path) for the
+namespace named by the symbol ns-sym to a file for the same namespace,
+but relative to dest-path.
+
+WARNING: This function can overwrite any source file that was already
+at the destination!  Make sure you have a backup or version control."
+  [source-path ns-sym dest-path & [dry-run? source-path-abbrev dest-path-abbrev]]
+  (let [ns-fname (#'move/ns-file-name ns-sym)
+        old-file (io/file source-path ns-fname)
+        new-file (io/file dest-path ns-fname)]
+    (if dry-run?
+      (str (format "mkdir %s\n"
+                   (let [full-path (str (.getParentFile new-file))]
+                     (if dest-path-abbrev
+                       (str/replace-first full-path
+                                          (str dest-path File/separator)
+                                          dest-path-abbrev)
+                       full-path)))
+           (format "copy %s %s\n"
+                   (if source-path-abbrev
+                     (str source-path-abbrev ns-fname)
+                     (str old-file))
+                   (if dest-path-abbrev
+                     (str dest-path-abbrev ns-fname)
+                     (str new-file))))
+      (do
+        (.mkdirs (.getParentFile new-file))
+        (io/copy old-file new-file)))))
+
+
+(defn namespace-to-copy? [ns root-ns]
+  (or (= ns root-ns)
+      (let [^String ns-str (str ns)
+            ^String root-ns-str (str root-ns ".")]
+        (.startsWith ns-str root-ns-str))))
+
+
+(defn copy-namespaces-unmodified
+  "Scan through all files in directory source-path or one of its
+subdirectories.  For every .clj source file that contains an ns
+declaration with a namespace that is exactly ns-sym, or begins with
+ns-sym followed by a dot, copy them unmodified to a file that is
+rooted at the directory dest-path, and has the same relative path name
+after dest-path that the original does after source-path.
+
+The namespaces will first be checked that they correspond with the
+file names in which they occur.  If they do not, an error is returned
+and no files are copied.
+
+For example, if source-path is /source/path and it contains a file
+/source/path/one/two.clj, it will be an error if the namespace inside
+is anything other than 'one.two'."
+  [source-path ns-sym dest-path dry-run?]
+  (let [ns-info (ns/namespaces-in-dirs {:paths [source-path]})]
+    (if (:err ns-info)
+      ns-info
+      (if dry-run?
+        {:err nil
+         :dry-run-msgs
+         (cons
+          (format "Copy Clojure source files in namespace %s unmodified\n  from source path S='%s'\n  to dest path D='%s'\n"
+                  ns-sym source-path dest-path)
+          (for [[file ns] (:clojure.tools.namespace.file/filemap ns-info)]
+            (let [source-path-abbrev (str "S" File/separator)
+                  dest-path-abbrev (str "D" File/separator)]
+              (if (namespace-to-copy? ns ns-sym)
+                (copy-ns-file source-path ns dest-path
+                              dry-run? source-path-abbrev dest-path-abbrev)
+                (format "Don't copy namespace %s from S since it is not a 'sub-namespace' of %s\n"
+                        ns ns-sym)))))}
+        (doseq [[file ns] (:clojure.tools.namespace.file/filemap ns-info)]
+          (when (namespace-to-copy? ns ns-sym)
+            (copy-ns-file source-path ns dest-path dry-run?)))))))
+
+
+(comment
+(require '[dolly.clone :as c])
+(def tns-path "/Users/jafinger/clj/dolly/copy-deps/tools.namespace/src/main/clojure")
+(def staging-path "/Users/jafinger/clj/dolly/staging")
+(def o1 (c/copy-namespaces-unmodified tns-path 'clojure.tools.namespace staging-path true))
+(print (apply str (:dry-run-msgs o1)))
+(def o2 (c/copy-namespaces-unmodified tns-path 'clojure.tools.namespace.dir staging-path true))
+(print (apply str (:dry-run-msgs o2)))
+)
+
+
+;;(defn copy-namespaces
+;;  "Copy all .clj source files (found relative to source-path) for the
+;;namespaces that have names beginning with old-sym.  Copy them to new
+;;file with namespaces that begin with new-sym.  Replace all occurrences
+;;of the old name with the new name in all Clojure source files found in
+;;dirs.
+;;
+;;This is a purely textual transformation.  It does not work on
+;;namespaces require'd or use'd from a prefix list.
+;;
+;;WARNING: This function modifies your source files!  Make sure you have
+;;a backup or version control."
+;;  [source-path old-sym dest-path new-sym dirs]
+;;  (let [ns-info (ns/namespaces-in-dirs {:paths [source-path]})]
+;;    (if (:err ns-info)
+;;      ns-info
+;;      (do
+;;        (doseq [[file ns] (:clojure.tools.namespace.file/filemap ns-info)]
+;;          (when (namespace-to-copy? ns old-sym)
+;;            (copy-ns-file file ns old-sym new-sym source-path)))
+;;        (doseq [file (#'move/clojure-source-files dirs)]
+;;          (#'move/update-file file #'move/replace-ns-symbol
+;;                              old-sym new-sym))))))
+
+
+(defn move-ns-file
+  "Copied and modified from the version in tools.namespace.  This
+  version adds support for doing a 'dry run' that only describes what
+  it would do, without changing anything.  It also adds a dest-path
+  argument that can be used to move files to a completely different
+  'root' path in a project, in addition to changing the namespace.
+
+  Moves the .clj source file (found relative to source-path) for the
+  namespace named old-sym to a file for a namespace named new-sym,
+  relative to dest-path.
+
+  WARNING: This function moves and deletes your source files!  Make
+  sure you have a backup or version control."
+  [old-sym new-sym source-path dest-path]
+  ;; TBD: Add dry run option
+  (let [old-file (io/file source-path (#'move/ns-file-name old-sym))
+        new-file (io/file dest-path (#'move/ns-file-name new-sym))]
+    (.mkdirs (.getParentFile new-file))
+    (io/copy old-file new-file)
+    (.delete old-file)
+    (loop [dir (.getParentFile old-file)]
+      (when (empty? (.listFiles dir))
+        (.delete dir)
+        (recur (.getParentFile dir))))))
+
+
+(defn replace-ns-symbol
+  "Copied and modified from the version in tools.namespace.  This
+  version adds support for doing a 'dry run' that only describes what
+  it would do, without changing anything.
+
+  Given Clojure source as a string, replaces all occurrences of the
+  namespace name old-sym with new-sym and returns a map containing:
+
+    :new-source - modified source as a string
+
+    :num-symbols - number of 'symbols' found in input string source
+
+    :symbols - map of strings to integers, where the keys are
+      'symbols' found in the input string source, and the values are
+      the number of times that string was found in the input.  Can be
+      useful for debugging the 'symbol' matching code.
+
+    :num-replacements - number of times old-sym was found and replaced"
+  [opts source old-sym new-sym]
+  (let [old-name (name old-sym)
+        new-name (name new-sym)
+        num-symbols (atom 0)
+        symbols-found (atom {})
+        num-replacements (atom 0)
+        ;; A lossless parser would be better, but this is adequate
+        new-source (str/replace source @#'move/symbol-regex
+                                (fn [match]
+                                  (swap! num-symbols inc)
+                                  (swap! symbols-found
+                                         update-in [match] (fnil inc 0))
+                                  (if (= match old-name)
+                                    (do
+                                      (swap! num-replacements inc)
+                                      new-name)
+                                    match)))]
+    {:new-source new-source
+     :num-symbols @num-symbols
+     :symbols @symbols-found
+     :num-replacements @num-replacements}))
+
+
+(defn update-file
+  "Copied and modified from the version in tools.namespace.  This
+  version adds support for doing a 'dry run' that only describes what
+  it would do, without modifying any files.
+
+  Reads file as a string, calls f on opts, the string, plus any args.
+
+  If opts has a logical false value for the key :dry-run? (or no such
+  key), update-file then writes the value of f's :new-source key (f's
+  return value being a map containing this key) as the new contents of
+  file.  Avoids writing file if the content is unchanged."
+  [file opts f & args]
+  (let [old (slurp file)
+        m (apply f opts old args)
+        new (str (:new-source m))]
+    (when-not (:dry-run? opts)
+      (when-not (= old new)
+        (spit file new)))
+    m))
+
+
+(comment
+(use 'clojure.pprint)
+(require '[dolly.clone :as c])
+(def tns-path "/Users/jafinger/clj/dolly/copy-deps/tools.namespace/src/main/clojure")
+(def staging-path "/Users/jafinger/clj/dolly/staging")
+(def o1 (c/update-file (str tns-path "/clojure/tools/namespace.clj")
+                       {:dry-run? true}
+                       c/replace-ns-symbol
+                       'clojure.tools.namespace
+                       'eastwood.copieddeps.tns.clojure.tools.namespace))
+(def o1 (c/update-file (str tns-path "/clojure/tools/namespace.clj") {:dry-run? true} c/replace-ns-symbol 'clojure.tools.namespace 'eastwood.copieddeps.tns.clojure.tools.namespace))
+(pprint o1)
+(def o2 (c/copy-namespaces-unmodified tns-path 'clojure.tools.namespace.dir staging-path true))
+(print (apply str (:dry-run-msgs o2)))
+)
+
+
+(defn move-ns
+  "Copied and modified from the version in tools.namespace.  This
+  version adds support for doing a 'dry run' that only describes what
+  it would do, without changing anything.  It also adds a dest-path
+  argument that can be used to move files to a completely different
+  'root' path in a project, in addition to changing the namespace.
+
+  Moves the .clj source file (found relative to source-path) for the
+  namespace named old-sym to a .clj source file (relative to
+  dest-path) for the namespace named new-sym.  It also replaces all
+  occurrences of the old name with the new name in all Clojure source
+  files found in dirs.
+
+  This is a purely textual transformation.  It does not work on
+  namespaces require'd or use'd from a prefix list.
+
+  WARNING: This function modifies and deletes your source files!  Make
+  sure you have a backup or version control."
+  [old-sym new-sym source-path dest-path dirs opts]
+  ;; TBD: Add dry run option
+  (move-ns-file old-sym new-sym source-path dest-path)
+  (doseq [file (#'move/clojure-source-files dirs)]
+    (update-file opts file replace-ns-symbol old-sym new-sym)))
+
+
+
+;; TBD: Add function that repeats move-ns for multiple namespaces.


[WM] add docstring for rabbit-result->http-status

Explains what it does and its current deficencies.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/voter-registration-http-api.git/'


optimizing imports

optimizing imports

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/stupacki/api-chordbook.git/'


remove debug log statement

remove debug log statement

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


clean up logs from previous work

clean up logs from previous work


Solve 10 in Clojure

Solve 10 in Clojure

error: pathspec 'Problem010/Clojure/solution_1.clj' did not match any file(s) known to git

--- Problem010/Clojure/solution_1.clj
+++ Problem010/Clojure/solution_1.clj
@@ -0,0 +1,18 @@
+(defn prime? [n]
+  (.isProbablePrime (BigInteger/valueOf n) 10))
+
+(defn next-prime
+  [n]
+  (loop [candidate n]
+    (if (prime? candidate)
+      candidate
+      (recur (+ candidate 1)))))
+
+(defn prime-seq
+  ([] (prime-seq 2))
+  ([n] (cons n (lazy-seq (prime-seq (next-prime (+' 1 n )))))))
+
+(->> (prime-seq)
+     (take-while (partial > 2000000))
+     (reduce +)
+     (println))


Fixed sample test

Fixed sample test

fatal: unable to access 'https://github.com/truckerpath/icfpc-2017.git/': The requested URL returned error: 403


more complex sql :)

more complex sql :)

--- src-clj/acha/db.clj
+++ src-clj/acha/db.clj
@@ -32,19 +32,28 @@
   (insert! db :repo {:url "git@github.com:tonsky/datascript"})
   (insert! db :repo {:url "git@github.com:tonsky/41-socks"})
   (insert! db :repo {:url "git@github.com:tonsky/datascript-chat"})
-  (insert! db :repo {:url "git@github.com:tonsky/net.async"}))
+  (insert! db :repo {:url "git@github.com:tonsky/net.async"})
+  (insert! db :user {:name "Anders Hovmöller" :email "boxed@killingar.net"})
+  (insert! db :user {:name "Bobby Calderwood" :email "bobby_calderwood@mac.com"})
+  (insert! db :user {:name "Kevin J. Lynagh"  :email "kevin@keminglabs.com"})
+  (insert! db :user {:name "Nikita Prokopov"  :email "prokopov@gmail.com"})
+  (insert! db :user {:name "montyxcantsin"    :email "montyxcantsin@gmail.com"})
+  (insert! db :user {:name "thegeez"          :email "thegeez@users.noreply.github.com"})
+  )

 (defn get-repo-list []
-  (query db "select * from repo"))
+  (query db "SELECT r.*, count(a.id) AS achievements FROM repo r
+    LEFT JOIN achievement a ON r.id=a.repoid GROUP BY r.id"))

 (defn get-user-list []
-  (query db "select * from user"))
+  (query db "SELECT u.*, count(a.id) AS achievements FROM user u
+    LEFT JOIN achievement a ON u.id=a.userid GROUP BY u.id"))

 (defn get-ach-list []
-  (query db "select * from achievement"))
+  (query db "SELECT * FROM achievement"))

 (defn get-user-ach [id]
-  (query db (str "select * from achievement where userid=" id)))
+  (query db (str "SELECT * FROM achievement WHERE userid=" id)))

 (defn get-repo-ach [id]
-  (query db (str "select * from achievement where repoid=" id)))
+  (query db (str "SELECT * FROM achievement WHERE repoid=" id)))


First shot at translating a Spring XML bean file.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lprefontaine/Boing.git/'


Sample animation on google maps

Sample animation on google maps

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dominikzarzecki/meteor-impacts-timelapse.git/'


Desktop Applications

Desktop Applications

error: pathspec 'src/mark_volkmann_tutorial/desktop-app.clj' did not match any file(s) known to git

--- src/mark_volkmann_tutorial/desktop-app.clj
+++ src/mark_volkmann_tutorial/desktop-app.clj
@@ -0,0 +1,39 @@
+;; Desktop Applications
+;; http://java.ociweb.com/mark/clojure/article.html#DesktopApps
+
+;; Swing based GUI
+;; proxy macro - create Java object that extends Java class and implements interfaces
+
+(ns com.ociweb.swing
+  (:import
+    (java.awt BorderLayout)
+    (java.awt.event ActionListener)
+    (javax.swing JButton JFrame JLabel JOptionPane JPanel JTextField)))
+
+(defn message
+  "gets the message to display based on the current text in the text field"
+  [text-field]
+  (str "Hello, " (.getText text-field) "!"))
+
+; Set the initial text on name-field to "World"
+; and its visible width to 10.
+(let [name-field (JTextField. "World" 10)
+      greet-button (JButton. "Greet")
+      panel (JPanel.)
+      frame (proxy [JFrame ActionListener]
+              [] ; superclass constructor arguments
+              (actionPerformed [e] ; nil below is the parent component
+                (JOptionPane/showMessageDialog nil (message name-field))))]
+  (doto panel
+    (.add (JLabel. "Name:"))
+    (.add name-field))
+
+  (doto frame
+    (.add panel BorderLayout/CENTER)
+    (.add greet-button BorderLayout/SOUTH)
+    (.pack)
+    (.setDefaultCloseOperation JFrame/EXIT_ON_CLOSE)
+    (.setVisible true))
+
+  ; Register frame to liste for greet-button presses.
+  (.addActionListener greet-button frame))


Typed fields in deftype. Handing types as tags.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/shaunstanislaus/cljs2go.git/'


fix(env): rename env var to pool-control-period

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-Digital/pdg-core.git/'


fix ordering of checks to show correct rent status


remove duplicate `election-id` in destructuring

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-mail-works.git/'


Added a bit more comments to make sense of new utils

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


start histogram

start histogram

error: pathspec 'statspop/src/statspop/charts/hist.cljs' did not match any file(s) known to git


Add tests for padding implementation.

Add tests for padding implementation.

error: pathspec 'test/buddy/core/padding_tests.clj' did not match any file(s) known to git

--- test/buddy/core/padding_tests.clj
+++ test/buddy/core/padding_tests.clj
@@ -0,0 +1,55 @@
+;; Copyright 2015 Andrey Antukh <niwi@niwi.be>
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License")
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;     http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
+(ns buddy.core.padding-tests
+  (:require [clojure.test :refer :all]
+            [buddy.core.codecs :as codecs]
+            [buddy.core.bytes :as bytes]
+            [buddy.core.padding :as padding]))
+
+(deftest pkcs7-padding
+  (let [data (byte-array 10)]
+    (bytes/fill data 2)
+    (padding/pad! data 6)
+
+    (is (padding/padded? data))
+    (is (= (padding/count data) 4))
+
+    (padding/unpad! data)
+    (is (= 4 (padding/count data :zerobyte)))))
+
+(deftest tbc-padding
+  (let [data (byte-array 10)]
+    (bytes/fill data 2)
+    (padding/pad! data 6 :tbc)
+
+    (is (padding/padded? data :tbc))
+    (is (= (padding/count data :tbc) 4))
+
+    (padding/unpad! data :tbc)
+    (is (= 4 (padding/count data :zerobyte)))))
+
+(deftest zerobyte-padding
+  (let [data (byte-array 10)]
+    (bytes/fill data 2)
+    (padding/pad! data 6 :zerobyte)
+
+    (is (padding/padded? data :zerobyte))
+    (is (= (padding/count data :zerobyte) 4))
+
+    (padding/unpad! data :zerobyte)
+    (is (= 4 (padding/count data :zerobyte)))))
+
+
+


Failing bootstrap test.

Failing bootstrap test.

error: pathspec 'test/onyx/peer/bootstrap_test.clj' did not match any file(s) known to git

--- test/onyx/peer/bootstrap_test.clj
+++ test/onyx/peer/bootstrap_test.clj
@@ -0,0 +1,103 @@
+(ns onyx.peer.bootstrap-test
+  (:require [com.stuartsierra.component :as component]
+            [onyx.system :refer [onyx-development-env]]
+            [midje.sweet :refer :all]
+            [onyx.queue.hornetq-utils :as hq-util]
+            [onyx.peer.task-lifecycle-extensions :as l-ext]
+            [onyx.peer.pipeline-extensions :as p-ext]
+            [onyx.api]))
+
+(def id (java.util.UUID/randomUUID))
+
+(def config (read-string (slurp (clojure.java.io/resource "test-config.edn"))))
+
+(def env-config
+  {:hornetq/mode :udp
+   :hornetq/server? true
+   :hornetq.server/type :embedded
+   :hornetq.udp/cluster-name (:cluster-name (:hornetq config))
+   :hornetq.udp/group-address (:group-address (:hornetq config))
+   :hornetq.udp/group-port (:group-port (:hornetq config))
+   :hornetq.udp/refresh-timeout (:refresh-timeout (:hornetq config))
+   :hornetq.udp/discovery-timeout (:discovery-timeout (:hornetq config))
+   :hornetq.embedded/config (:configs (:hornetq config))
+   :zookeeper/address (:address (:zookeeper config))
+   :zookeeper/server? true
+   :zookeeper.server/port (:spawn-port (:zookeeper config))
+   :onyx/id id
+   :onyx.coordinator/revoke-delay 5000})
+
+(def peer-config
+  {:hornetq/mode :udp
+   :hornetq.udp/cluster-name (:cluster-name (:hornetq config))
+   :hornetq.udp/group-address (:group-address (:hornetq config))
+   :hornetq.udp/group-port (:group-port (:hornetq config))
+   :hornetq.udp/refresh-timeout (:refresh-timeout (:hornetq config))
+   :hornetq.udp/discovery-timeout (:discovery-timeout (:hornetq config))
+   :zookeeper/address (:address (:zookeeper config))
+   :onyx/id id
+   :onyx.peer/inbox-capacity (:inbox-capacity (:peer config))
+   :onyx.peer/outbox-capacity (:outbox-capacity (:peer config))
+   :onyx.peer/job-scheduler :onyx.job-scheduler/round-robin})
+
+(def hq-config {"host" (:host (:non-clustered (:hornetq config)))
+                "port" (:port (:non-clustered (:hornetq config)))})
+
+(def dev (onyx-development-env env-config))
+
+(def env (component/start dev))
+
+(def out-queue (str (java.util.UUID/randomUUID)))
+
+(defn my-inc [{:keys [n] :as segment}]
+  (assoc segment :n (inc n)))
+
+(def workflow {:in-bootstrapped {:inc :out}})
+
+(def id (str (java.util.UUID/randomUUID)))
+
+(hq-util/create-queue! hq-config out-queue)
+
+(defmethod p-ext/apply-fn [:input :onyx-memory-test-plugin]
+  [event] {:onyx.core/results [{:n 42}]})
+
+(def catalog
+  [{:onyx/name :in-bootstrapped
+    :onyx/type :input
+    :onyx/medium :onyx-memory-test-plugin
+    :onyx/consumption :concurrent
+    :onyx/bootstrap? true
+    :onyx/batch-size 2}
+
+   {:onyx/name :inc
+    :onyx/fn :onyx.peer.bootstrap-test/my-inc
+    :onyx/type :function
+    :onyx/consumption :concurrent
+    :onyx/batch-size 5}
+
+   {:onyx/name :out
+    :onyx/ident :hornetq/write-segments
+    :onyx/type :output
+    :onyx/medium :hornetq
+    :onyx/consumption :concurrent
+    :hornetq/queue-name out-queue
+    :hornetq/host (:host (:non-clustered (:hornetq config)))
+    :hornetq/port (:port (:non-clustered (:hornetq config)))
+    :onyx/batch-size 5}])
+
+(def v-peers (onyx.api/start-peers! 1 peer-config))
+
+(onyx.api/submit-job
+ (:log env)
+ {:catalog catalog :workflow workflow
+  :task-scheduler :onyx.task-scheduler/round-robin})
+
+(def results (hq-util/consume-queue! hq-config out-queue 1))
+
+(doseq [v-peer v-peers]
+  ((:shutdown-fn v-peer)))
+
+(component/stop env)
+
+(fact results => [{:n 43} :done])
+


[TH EN] log results of sending email

[TH EN] log results of sending email

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/email-works.git/'


Changed to use ID for event dispatch

Changed to use ID for event dispatch

Added more exception handlers

--- src/voipbridge/jtapi.clj
+++ src/voipbridge/jtapi.clj
@@ -18,7 +18,7 @@
 (defn get-dups[] dups)

 (defn debug-call [ ext n e ]
-  (log/debug ext  n  (bean e))
+  (log/debug ext n (.getID e) (bean e))
 )
 (defn reify-call-control-connection-listener [ext handler-fn]
   (log/info "reify-call-control-connection-listener" ext handler-fn)
@@ -105,30 +105,30 @@
   (log/info "reify-terminal-conn-listener" ext handler-fn)
     (reify
           TerminalConnectionListener
-        (terminalConnectionActive [ this e ](  debug-call ext "terminalConnectionActive" e) (handler-fn e))
+            (terminalConnectionActive [ this e ](  debug-call ext "terminalConnectionActive" e) (handler-fn e))
     		(terminalConnectionCreated [ this e ]( debug-call ext "terminalConnectionCreated" e))
     		(terminalConnectionDropped [ this e ]( debug-call ext "terminalConnectionDropped" e) (handler-fn e))
     		(terminalConnectionPassive [ this e ]( debug-call ext "terminalConnectionPassive" e))
-    		(terminalConnectionRinging [ this e ]( debug-call ext "terminalConnectionRinging" e) (handler-fn e))
+    		(terminalConnectionRinging [ this e ]( debug-call ext "terminalConnectionRinging" e))
     		(terminalConnectionUnknown [ this e ]( debug-call ext "terminalConnectionUnknown" e))
-    		(connectionConnected [ this e ]((do ( debug-call ext "connectionConnected" e) )))
+    		(connectionConnected [ this e ](debug-call ext "connectionConnected" e))
     		(connectionCreated [ this e ]( debug-call ext "connectionCreated" e) )
     		(connectionDisconnected [ this e ]( debug-call ext "connectionDisconnected" e) (handler-fn e))
     		(connectionInProgress [ this e ]( debug-call ext "connectionInProgress" e) )
     		(connectionUnknown [ this e ]( debug-call ext "connectionUnknown" e) (handler-fn e))
     		(connectionFailed [ this e ]( debug-call ext "connectionFailed" e) (handler-fn e))
-    		(connectionAlerting [ this e ]( debug-call ext "connectionAlerting" e) (handler-fn e))
+    		(connectionAlerting [ this e ]( debug-call ext "connectionAlerting" e))
     		(callInvalid [ this e ]( debug-call ext "callInvalid" e) (handler-fn e))
-    		(callEventTransmissionEnded [ this e ] ((do (debug-call ext "callEventTransmissionEnded" e (handler-fn e)))))
-    		(singleCallMetaProgressStarted [ this e ]( debug-call ext "singleCallMetaProgressStarted" e) (handler-fn e))
-    		(singleCallMetaProgressEnded [ this e ]( debug-call ext "singleCallMetaProgressEnded" e) (handler-fn e))
-    		(singleCallMetaSnapshotStarted [ this e ]( debug-call ext "singleCallMetaSnapshotStarted" e) (handler-fn e))
-    		(singleCallMetaSnapshotEnded [ this e ]( debug-call ext "singleCallMetaSnapshotEnded" e) (handler-fn e))
-    		(multiCallMetaMergeStarted [ this e ]( debug-call ext "multiCallMetaMergeStarted" e) (handler-fn e))
-    		(multiCallMetaMergeEnded [ this e ]( debug-call ext "multiCallMetaMergeEnded" e) (handler-fn e))
-    		(multiCallMetaTransferStarted [ this e ]( debug-call ext "multiCallMetaTransferStarted" e) (handler-fn e))
-    		(multiCallMetaTransferEnded [ this e ]( debug-call ext "multiCallMetaTransferEnded" e) (handler-fn e))
-    		(callActive [ this e ]( debug-call ext "callActive" e))
+    		(callEventTransmissionEnded [ this e ]  (handler-fn e))
+    		(singleCallMetaProgressStarted [ this e ]( debug-call ext "singleCallMetaProgressStarted" e))
+    		(singleCallMetaProgressEnded [ this e ]( debug-call ext "singleCallMetaProgressEnded" e))
+    		(singleCallMetaSnapshotStarted [ this e ]( debug-call ext "singleCallMetaSnapshotStarted" e))
+    		(singleCallMetaSnapshotEnded [ this e ]( debug-call ext "singleCallMetaSnapshotEnded" e))
+    		(multiCallMetaMergeStarted [ this e ]( debug-call ext "multiCallMetaMergeStarted" e))
+    		(multiCallMetaMergeEnded [ this e ]( debug-call ext "multiCallMetaMergeEnded" e))
+    		(multiCallMetaTransferStarted [ this e ]( debug-call ext "multiCallMetaTransferStarted" e))
+    		(multiCallMetaTransferEnded [ this e ]( debug-call ext "multiCallMetaTransferEnded" e))
+    		(callActive [ this e ]( debug-call ext "callActive" e) (handler-fn e))
     ))

 (defn- get-addresses [provider]
@@ -188,25 +188,25 @@
      (first (filter (fn[c] (= ext (.getName (.getAddress c))))
                     (.getConnections call)))
   )
-(defmulti transform-event (fn[event ext] (.getClass event)))
-
-(defmethod transform-event javax.telephony.events.TermConnActiveEv [event ext]
-  (log/info "transform-event" "TermConnActiveEv" ext)
+(defmulti transform-event (fn[event ext] (.getID event)))
+
+(defmethod transform-event 115 [event ext]
+  (log/info "transform-event" "TerminalConnectionEvent" ext)
   (let [ call (.getCall event )
         callers (get-callers-from-provider call)
          ]
     (log/info "transform-event!" "TermConnActiveEv" "callers" callers)
     (swap! jtapi-provider assoc-in [:calls ext ] call)
-    {:operation "call" :ext ext :body {:cause (.getCause event) :meta-code (.getMetaCode event) :callers callers}}
+    {:operation "call" :ext ext :body {:id (.getID event) :callers callers}}
     ))

-(defmethod transform-event javax.telephony.events.TermConnDroppedEv [event ext]
+(defmethod transform-event 117 [event ext]
         (swap! jtapi-provider assoc-in [:calls ext] nil)
-        {:operation "hangup" :ext ext :body {:cause (.getCause event) :meta-code (.getMetaCode event)}}
+        {:operation "hangup" :ext ext :body {:id(.getID event)}}
 )
 (defmethod transform-event :default [event ext]
-  (log/warn "transform-event" "default" ext event)
+  (log/warn "transform-event" "default" ext (.getID event ) event)
   )

 (defn call-listener-handler [ ext callback-fn event]
@@ -254,10 +254,12 @@
               ;;; (Thread/sleep 2000)
               ;;; (.drop ccc)
               (log/info "transfer" "completed" to from)
-                  {:operation "transfer" :ext from :body {:status "success" :to to}}
+              {:operation "transfer" :ext from :body {:status "success" :to to}}
             )))
     (catch Exception e
       (log/error "transfer" e)
+      (log/error "transfer" (.getStackTrace() e))
+      {:operation "transfer" :ext from :body {:status "failed" :to to }}
       )
     )
   )


Implicit recur

Implicit recur

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


consistent "let xform"

consistent "let xform"

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


test.check demo

test.check demo

error: pathspec 'test-check-demo.clj' did not match any file(s) known to git

--- test-check-demo.clj
+++ test-check-demo.clj
@@ -0,0 +1,93 @@
+; Copyright 2017 Google Inc. All Rights Reserved.
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+;     http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+(ns clfeat.core)
+
+(require '[clojure.test.check :as tc])
+(require '[clojure.test.check.generators :as gen])
+(require '[clojure.test.check.properties :as prop])
+
+(defn counting-sort [xs]
+  (let [len (+ (apply max xs) 1)
+        counts (int-array len)]
+    (doseq [i xs]
+      (aset-int counts i (+ 1 (aget counts i))))
+    (let [res (transient [])]
+      (doseq [i (range len)]
+        (if (> (aget counts i) 0)
+          (conj! res i)))
+      (persistent! res))))
+
+(counting-sort [42])
+(counting-sort [2 5 1])
+
+(defn sort-correctness [my-sort]
+  (prop/for-all [v (gen/vector gen/int)]
+                (= (my-sort v) (sort v))))
+
+(defn check-sort [my-sort]
+  (tc/quick-check 100 (sort-correctness my-sort)))
+
+(check-sort counting-sort)
+
+(defn counting-sort-2 [xs]
+  (if (empty? xs)
+    xs
+    (let [len (+ (apply max xs) 1)
+          counts (int-array len)]
+      (doseq [i xs]
+        (aset-int counts i (+ 1 (aget counts i))))
+      (let [res (transient [])]
+        (doseq [i (range len)]
+          (if (> (aget counts i) 0)
+            (conj! res i)))
+        (persistent! res)))))
+
+(check-sort counting-sort-2)
+
+(defn counting-sort-3 [xs]
+  (if (empty? xs)
+    xs
+    (let [maximum (apply max xs)
+          minimum (apply min xs)
+          len (+ (- maximum minimum) 1)
+          counts (int-array len)]
+      (doseq [i xs]
+        (let [index (- i minimum)]
+          (aset-int counts index (+ 1 (aget counts index)))))
+      (let [res (transient [])]
+        (doseq [i (range len)]
+          (if (> (aget counts i) 0)
+            (conj! res (+ i minimum))))
+        (persistent! res)))))
+
+(check-sort counting-sort-3)
+
+(defn counting-sort-4 [xs]
+  (if (empty? xs)
+    xs
+    (let [maximum (apply max xs)
+          minimum (apply min xs)
+          len (+ (- maximum minimum) 1)
+          counts (int-array len)]
+      (doseq [i xs]
+        (let [index (- i minimum)]
+          (aset-int counts index (+ 1 (aget counts index)))))
+      (let [res (transient [])]
+        (doseq [i (range len)]
+          (doseq [_ (range (aget counts i))]
+            (conj! res (+ i minimum))))
+        (persistent! res)))))
+
+(check-sort counting-sort-4)


add dom namespace

add dom namespace

error: pathspec 'src/cljs/infinitelives/utils/dom.cljs' did not match any file(s) known to git

--- src/cljs/infinitelives/utils/dom.cljs
+++ src/cljs/infinitelives/utils/dom.cljs
@@ -0,0 +1,25 @@
+(ns infinitelives.utils.dom)
+
+(defn as-str
+  "Coerces strings and keywords to strings, while preserving namespace of
+   namespaced keywords"
+  [s]
+  (if (keyword? s)
+    (str (some-> (namespace s) (str "/")) (name s))
+    s))
+
+(defn set-style!
+  "Set the style of `elem` using key-value pairs:
+      (set-style! elem :display \"block\" :color \"red\")"
+  [elem & kvs]
+  (assert (even? (count kvs)))
+  (let [style (.-style elem)]
+    (doseq [[k v] (partition 2 kvs)]
+      (.setProperty style (as-str k) v))
+    elem))
+
+(defn append!
+  "Append `child` to `parent`"
+  ([parent child]
+     (doto parent
+       (.appendChild child))))


Tests for settings.handlers.show-settings.

error: pathspec 'test/lunchlotto/settings/handlers_test.clj' did not match any file(s) known to git

--- test/lunchlotto/settings/handlers_test.clj
+++ test/lunchlotto/settings/handlers_test.clj
@@ -0,0 +1,12 @@
+(ns lunchlotto.settings.handlers-test
+  (:require [clojure.test :refer :all]
+            [cemerick.friend :as friend])
+  (:require [lunchlotto.settings.handlers :as handlers]
+            [lunchlotto.settings.models :as models]))
+
+(deftest settings-page
+  (testing "successfully render settings page"
+    (with-redefs [models/find-user-by-id (fn [_ _])]
+      (let [{:keys [:status :body]} (handlers/show-settings {})]
+        (is (= 200 status))
+        (is (.contains body "Settings"))))))


Configure prefetch counts

Configure prefetch counts

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/scheduled-message-works.git/'


refresh phase when it is expected to change

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojurecup/cc2014-frontend.git/'


add asciidoctor:1.5.2 dependency to new project

--- src/leiningen/new/cryogen/project.clj
+++ src/leiningen/new/cryogen/project.clj
@@ -16,6 +16,7 @@
                  [clj-rss "0.1.9"]
                  [me.raynes/fs "1.4.4"]
                  [crouton "0.1.2"]
+                 [org.asciidoctor/asciidoctorj "1.5.2"]
                  [cheshire "5.3.1"]]
   :plugins [[lein-ring "0.8.13"]]
   :ring {:init cryogen.server/init


map construction solved

map construction solved

error: pathspec 'src/4clojure/map_construction.clj' did not match any file(s) known to git

--- src/4clojure/map_construction.clj
+++ src/4clojure/map_construction.clj
@@ -0,0 +1,46 @@
+;; Map Construction
+;; http://www.4clojure.com/problem/61
+
+;; Difficulty:	Easy
+;; Topics:	core-functions
+
+;; Write a function which takes a vector of keys and a vector of values and constructs a map from them.
+
+
+(defn __ [a b]\
+  (into {} (mapv vector a b)))
+;;         (map list a b) ; this (list) dont work - but vector is ok
+;; ! it could be because of conj work diff on list and vector
+
+(sorted-map)
+
+(= (__ [:a :b :c] [1 2 3]) {:a 1, :b 2, :c 3})
+
+(= (__ [1 2 3 4] ["one" "two" "three"]) {1 "one", 2 "two", 3 "three"})
+
+(= (__ [:foo :bar] ["foo" "bar" "baz"]) {:foo "foo", :bar "bar"})
+
+;; 4Clojure copy paste
+#(into {} (mapv vector %1 %2))
+
+
+;; other solutions - my solution is one of the best ;)
+_artem_uv's solution:
+#(apply hash-map (interleave %1 %2))
+
+;; _pcl's solution:
+(fn [keys vals]
+  (last
+    (reduce
+      #(list
+        (rest (first %1))
+        (assoc (last %1) (ffirst %1) %2))
+      [keys (hash-map)]
+      (take (count keys) vals))))
+
+;; aceeca1's solution:
+(comp (partial apply sorted-map) interleave)
+
+;; adereth's solution:
+(fn [ks vs]
+  (reduce merge (map (fn [k v] {k v}) ks vs)))


Add tests for storages.

Add tests for storages.

error: pathspec 'test/datoteka/tests/test_storages.clj' did not match any file(s) known to git

--- test/datoteka/tests/test_storages.clj
+++ test/datoteka/tests/test_storages.clj
@@ -0,0 +1,106 @@
+(ns datoteka.tests.test_storages
+  (:require [clojure.test :as t]
+            [datoteka.storages :as st]
+            [datoteka.storages.local :as local]
+            [datoteka.storages.misc :as misc])
+  (:import java.io.File
+           org.apache.commons.io.FileUtils))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Test Fixtures
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn- clean-temp-directory
+  [next]
+  (next)
+  (let [directory (File. "/tmp/datoteka/")]
+    (FileUtils/deleteDirectory directory)))
+
+(t/use-fixtures :each clean-temp-directory)
+
+;; --- Tests: FileSystemStorage
+
+(t/deftest test-localfs-store-and-lookup
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        rpath  @(st/save storage "test.txt" "my content")
+        fpath @(st/lookup storage rpath)
+        fdata (slurp fpath)]
+    (t/is (= (str fpath) "/tmp/datoteka/test/test.txt"))
+    (t/is (= "my content" fdata))))
+
+(t/deftest test-localfs-store-and-get-public-url
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        rpath  @(st/save storage "test.txt" "my content")
+        ruri (st/public-url storage rpath)]
+    (t/is (= (str ruri) "http://localhost:5050/test.txt"))))
+
+(t/deftest test-localfs-store-and-lookup-with-subdirs
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        rpath  @(st/save storage "somepath/test.txt" "my content")
+        fpath @(st/lookup storage rpath)
+        fdata (slurp fpath)]
+    (t/is (= (str fpath) "/tmp/datoteka/test/somepath/test.txt"))
+    (t/is (= "my content" fdata))))
+
+(t/deftest test-localfs-store-and-delete-and-check
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        rpath  @(st/save storage "test.txt" "my content")]
+    (t/is @(st/delete storage rpath))
+    (t/is (not @(st/exists? storage rpath)))))
+
+(t/deftest test-localfs-store-duplicate-file-raises-exception
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})]
+    (t/is @(st/save storage "test.txt" "my content"))
+    (t/is (thrown? java.util.concurrent.ExecutionException
+                   @(st/save storage "test.txt" "my content")))))
+
+(t/deftest test-localfs-access-unauthorized-path
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})]
+    (t/is (thrown? java.util.concurrent.ExecutionException
+                   @(st/lookup storage "../test.txt")))
+    (t/is (thrown? java.util.concurrent.ExecutionException
+                   @(st/lookup storage "/test.txt")))))
+
+;; --- Tests: ScopedPathStorage
+
+(t/deftest test-localfs-scoped-store-and-lookup
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        storage (misc/scoped storage "some/prefix")
+        rpath  @(st/save storage "test.txt" "my content")
+        fpath @(st/lookup storage rpath)
+        fdata (slurp fpath)]
+    (t/is (= (str fpath) "/tmp/datoteka/test/some/prefix/test.txt"))
+    (t/is (= "my content" fdata))))
+
+(t/deftest test-localfs-scoped-store-and-delete-and-check
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        storage (misc/scoped storage "some/prefix")
+        rpath  @(st/save storage "test.txt" "my content")]
+    (t/is @(st/delete storage rpath))
+    (t/is (not @(st/exists? storage rpath)))))
+
+(t/deftest test-localfs-scoped-store-duplicate-file-raises-exception
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        storage (misc/scoped storage "some/prefix")]
+    (t/is @(st/save storage "test.txt" "my content"))
+    (t/is (thrown? java.util.concurrent.ExecutionException
+                   @(st/save storage "test.txt" "my content")))))
+
+(t/deftest test-localfs-scoped-access-unauthorized-path
+  (let [storage (local/localfs {:basedir "/tmp/datoteka/test"
+                                :baseuri "http://localhost:5050/"})
+        storage (misc/scoped storage "some/prefix")]
+    (t/is (thrown? java.util.concurrent.ExecutionException
+                   @(st/lookup storage "../test.txt")))
+    (t/is (thrown? java.util.concurrent.ExecutionException
+                   @(st/lookup storage "/test.txt")))))
+


Added clojush.problems.software.levenshtein.

error: pathspec 'src/clojush/problems/software/levenshtein.clj' did not match any file(s) known to git

--- src/clojush/problems/software/levenshtein.clj
+++ src/clojush/problems/software/levenshtein.clj
@@ -0,0 +1,87 @@
+(ns clojush.problems.software.levenshtein
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random util globals]
+        clojush.instructions.tag
+        clojure.math.numeric-tower)
+  (:require [clojure.string :as string]))
+
+(defn random-string
+  "Returns a random string of letters, digits, and spaces, of max length n."
+  [n]
+  (apply str
+         (repeatedly (lrand-int (inc n))
+                     (fn []
+                       (if (< (lrand) 0.2)
+                         \space
+                         (lrand-nth (map char (range 32 127))))))))
+
+(def levenshtein-atom-generators
+  (concat (list
+            (fn [] (- 100 (lrand-int 201)))
+            (tag-instruction-erc [:exec :integer :boolean :string :char] 1000)
+            (tagged-instruction-erc 1000)
+            'in1
+            'in2)
+          (registered-for-stacks [:integer :boolean :string :char :exec])))
+
+(defn generate-levenshtein-cases
+  []
+  (repeatedly 5 (fn []
+                  (let [str1 (random-string 100)
+                        str2 (random-string 100)]
+                    [[str1 str2] (levenshtein-distance str1 str2)]))))
+
+(def levenshtein-cases (atom (generate-levenshtein-cases)))
+
+(println "Initial test cases:" (pr-str @levenshtein-cases))
+
+(defn levenshtein-error
+  [program]
+  (let [behavior (atom '())
+        errors (doall
+                 (for [[[str1 str2] distance] @levenshtein-cases]
+                   (let [state (run-push program
+                                         (push-item str2 :input
+                                                    (push-item str1 :input
+                                                               (make-push-state))))
+                         top-int (top-item :integer state)]
+                     (when @global-print-behavioral-diversity
+                       (swap! behavior conj [top-int]))
+                     (if (number? top-int)
+                       (#(if (neg? %) (- %) %) (- top-int distance))
+                       1000))))]
+    (when @global-print-behavioral-diversity
+      (swap! population-behaviors conj @behavior))
+    errors))
+
+(defn levenshtein-report
+  "Not actually used to report; instead, change test cases."
+  [best population generation error-function report-simplifications]
+  (let [new-cases (generate-levenshtein-cases)]
+    (println "New test cases:" (pr-str new-cases))
+    (reset! levenshtein-cases new-cases)))
+
+(def argmap
+  {:error-function levenshtein-error
+   :atom-generators levenshtein-atom-generators
+   :max-points 1600
+   :max-genome-size-in-initial-program 400
+   :evalpush-limit 1600
+   :population-size 1000
+   :max-generations 300
+   :parent-selection :lexicase
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    }
+   :alternation-rate 0.01
+   :alignment-deviation 10
+   :uniform-mutation-rate 0.01
+   :problem-specific-report levenshtein-report
+   :print-behavioral-diversity true
+   :report-simplifications 0
+   :final-report-simplifications 5000
+   :max-error 5000
+   :use-single-thread false
+   })


Remove unnecessary function.

Remove unnecessary function.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


fix dumb typo

fix dumb typo

--- test/metabase/api/meta/table_test.clj
+++ test/metabase/api/meta/table_test.clj
@@ -29,7 +29,7 @@
           {:name "categories", :rows 75,   :active true, :id (mongo-data/table-name->id :categories), :db_id @mongo-test-db-id}
           {:name "checkins",   :rows 1000, :active true, :id (mongo-data/table-name->id :checkins),   :db_id @mongo-test-db-id}
           {:name "users",      :rows 15,   :active true, :id (mongo-data/table-name->id :users),      :db_id @mongo-test-db-id}
-          {:name "venues",     :rows 100,  :active true, :id {mongo-data/table-name->id :venues},     :db_id @mongo-test-db-id}}
+          {:name "venues",     :rows 100,  :active true, :id (mongo-data/table-name->id :venues),     :db_id @mongo-test-db-id}}
   (->> ((user->client :rasta) :get 200 "meta/table" :org @org-id)
        (map #(dissoc % :db :created_at :updated_at :entity_name :description :entity_type))
        set))


start query ns

start query ns

error: pathspec 'src/com/billpiel/mem_tracer/query.clj' did not match any file(s) known to git

--- src/com/billpiel/mem_tracer/query.clj
+++ src/com/billpiel/mem_tracer/query.clj
@@ -0,0 +1,11 @@
+(ns com.billpiel.mem-tracer.query)
+
+(defn entry->seq
+  [entry]
+  (lazy-cat [entry] (mapcat entry->seq (:children entry))))
+
+(defn query-cat
+  [qry-fn entry]
+  (->> entry
+       entry->seq
+       (keep #(when (qry-fn %) %))))


Adjusted parameter names in bootstrap helpers

--- src/shared/hyjinks/bootstrap.cljc
+++ src/shared/hyjinks/bootstrap.cljc
@@ -11,11 +11,11 @@

 (def row (div {:class "row"}))

-(defn grid-col [size span & content]
-  (div {:class (str "col-" (name size) "-" span)} content))
+(defn grid-col [screen-size width & content]
+  (div {:class (str "col-" (name screen-size) "-" width)} content))

-(defn col-xs [size & content] (grid-col "xs" size content))
-(defn col-sm [size & content] (grid-col "sm" size content))
-(defn col-md [size & content] (grid-col "md" size content))
-(defn col-lg [size & content] (grid-col "lg" size content))
-(defn col-xl [size & content] (grid-col "xl" size content))
+(defn col-xs [width & content] (grid-col "xs" width content))
+(defn col-sm [width & content] (grid-col "sm" width content))
+(defn col-md [width & content] (grid-col "md" width content))
+(defn col-lg [width & content] (grid-col "lg" width content))
+(defn col-xl [width & content] (grid-col "xl" width content))


Fix flaky test by using any-equatable

Fix flaky test by using any-equatable

The default generator can generate NaN which is not even equal to
itself. The service itself can accept NaN but we use any-equatable to
allow for generative testing.


more code cleanup

more code cleanup

--- src/metabase/api/org.clj
+++ src/metabase/api/org.clj
@@ -72,16 +72,15 @@
   (check (= org-id orgId) 400 (format "Org IDs don't match: %d != %d" org-id orgId)) ; why do we need to POST Org ID if it's already in the URL????
   (let-404 [{:keys [can_write] :as org} (sel :one Org :id org-id)]
     (check-403 @can_write)
-    (let [user (sel :one User :email email)]                                         ; find user with existing email - if exists then grant perm
-      (let [user-id (:id (or user
-                             (ins User
-                               :email email
-                               :first_name first_name
-                               :last_name last_name
-                               :password (str (java.util.UUID/randomUUID)))))]       ; TODO - send the welcome email
-        (grant-org-perm org-id user-id admin)
-        (-> (sel :one OrgPerm :user_id user-id :organization_id org-id)
-            (hydrate :user))))))
+    (let [user-id (:id (or (sel :one [User :id] :email email)                        ; find user with existing email - if exists then grant perm
+                           (ins User
+                             :email email
+                             :first_name first_name
+                             :last_name last_name
+                             :password (str (java.util.UUID/randomUUID)))))]         ; TODO - send welcome email
+      (grant-org-perm org-id user-id admin)
+      (-> (sel :one OrgPerm :user_id user-id :organization_id org-id)
+          (hydrate :user)))))

 (defendpoint POST "/:id/members/:user-id" [id user-id :as {body :body}]


Uploading to S3 using pre-signed URLs works

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jffry/imgcast.git/'


Enable folder move handler test

Enable folder move handler test

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


placeholder: a bit more of lazy sequence in Clojure

error: pathspec 'clojure/lazy_seq_again.clj' did not match any file(s) known to git

--- clojure/lazy_seq_again.clj
+++ clojure/lazy_seq_again.clj
@@ -0,0 +1,44 @@
+(defrecord Square [x y])
+(defrecord Delta [dx dy])
+(defrecord SpiralMemory [memory square delta steer-in dist])
+
+(defn make-spiral-memory
+  [] (->SpiralMemory {(->Square 0 0) 1} (->Square 0 0) (->Delta 1 0) 1 0))
+
+(defn adj-nn [x, y] (->Square      x  (inc y)))
+(defn adj-ne [x, y] (->Square (inc x) (inc y)))
+(defn adj-ee [x, y] (->Square (inc x)      y))
+(defn adj-se [x, y] (->Square (inc x) (dec y)))
+(defn adj-ss [x, y] (->Square      x  (dec y)))
+(defn adj-sw [x, y] (->Square (dec x) (dec y)))
+(defn adj-ww [x, y] (->Square (dec x)      y))
+(defn adj-nw [x, y] (->Square (dec x) (inc y)))
+
+(defn adjacency [{{x :x y :y} :square
+                  {dx :dx dy :dy} :delta}]
+  (case [dx dy]
+    [0  1] [(adj-nw x y) (adj-ww x y) (adj-sw x y) (adj-ss x y)]
+    [-1 0] [(adj-sw x y) (adj-ss x y) (adj-se x y) (adj-ee x y)]
+    [0 -1] [(adj-se x y) (adj-ee x y) (adj-ne x y) (adj-nn x y)]
+    [1  0] [(adj-ne x y) (adj-nn x y) (adj-nw x y) (adj-ww x y)]))
+
+(defn walk
+  [{{x :x y :y} :square
+    {dx :dx dy :dy} :delta :as spiral-memory}] (identity spiral-memory))
+
+(defn write
+  [{memory :memory
+    {x :x y :y} :square :as spiral-memory}] (identity spiral-memory))
+
+(defn write-next
+  [spiral-memory] (write (walk spiral-memory)))
+
+(defn write-until
+  ([predicate]
+   (write-until predicate (make-spiral-memory)))
+  ([predicate spiral-memory]
+   (lazy-seq
+    (cons spiral-memory (write-until predicate (write-next spiral-memory))))))
+
+(prn (take 1 (write-until "some predicate")))
+(prn (take 2 (write-until "some predicate")))


Try to prevent occasional concurrency problems in consumer tests

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Yleisradio/rabid.git/'


cleanup-symbols-after fbefore renamed as well


Added "AmountsIncludeTax" field to Payments and Receipts

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mprokopov/privat24-manager.git/'


button hacking

button hacking

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/couragelabs/coachbot.git/'


Adds language detection, for making data driven decisions about what to infer next

error: pathspec 'src/circle/languages.clj' did not match any file(s) known to git

--- src/circle/languages.clj
+++ src/circle/languages.clj
@@ -0,0 +1,70 @@
+(ns circle.languages
+  "programming language detection. Mainly used for determining what to infer next"
+  (:use [clojure.core.incubator :only (-?>)])
+  (:require [circle.util.fs :as cfs])
+  (:require fs)
+  (:use [arohner.utils :only (inspect)])
+  (:require [clojure.string :as str])
+  (:use [circle.util.seq :only (find-first)]))
+
+(def file-type-map {#".*\.clj" :clojure
+                    #".*\.rb" :ruby
+                    #".*\.rake" :rake
+                    #"^Rakefile$" :rake
+                    #"^Gemfile$" :bundler
+                    #".*\.py" :python
+                    #".*\.pyc" :python
+                    #".*\.js" :javascript
+                    #".*\.[ch]$" "C"})
+
+(defn detect-language [path]
+  (let [basename (fs/basename path)]
+    (-> (find-first (fn [[re type]]
+                      (re-find re basename)) file-type-map)
+        (second)
+        ((fn [extension]
+           (cond
+            extension extension
+            (seq (fs/extension basename)) (-?> basename (fs/extension) (str/replace #"^\." "") (str/lower-case) (keyword))
+            :else (-?> basename (str/lower-case) (keyword))))))))
+
+(defn file-info [filename]
+  "Returns a map of information about a file, like primary language, line count, etc"
+  ;; (println "file-info:" filename)
+  {:loc (cfs/line-count filename)
+   :file-count 1
+   :language (detect-language filename)})
+
+(defn remove-git [files]
+  (remove #(re-find #"/.git/" (str %)) files))
+
+(def remove-files #{#".pdf$"
+                    #".png$"
+                    #".gif$"
+                    #".jpg$"}) ;; don't count any file that matches these regex
+(defn remove-binary
+  "Don't"
+  [files]
+  (->> files
+       (remove (fn [f]
+                 (some #(re-find % (str f)) remove-files)))))
+
+(defn lang-histogram
+  "Returns a breakdown of language usage for all files in a given directory"
+  [dir]
+  (->> dir
+       (cfs/all-files)
+       (remove-git)
+       (remove-binary)
+       (map file-info)
+       (reduce (fn [data {:keys [language]
+                          :as file-data}]
+                 (update-in data [language] #(merge-with + %1 %2 ) (dissoc file-data :language))) {})))
+
+(defn all-repo-languages []
+  (->> (fs/listdir "repos")
+       (map #(fs/join "repos" %))
+       (map (fn [dir]
+              {:dir dir
+               :data (circle.languages/lang-histogram dir)}))
+       (take 3)))


String to int for Heroku environment vars

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/vincentstorme/clojureme.git/'


add chrome driver

add chrome driver

error: pathspec 'src/clj_webdriver/chrome.clj' did not match any file(s) known to git

--- src/clj_webdriver/chrome.clj
+++ src/clj_webdriver/chrome.clj
@@ -0,0 +1,444 @@
+(in-ns 'clj-webdriver.core)
+
+(import '[org.openqa.selenium.remote RemoteWebDriver])
+
+(extend-type RemoteWebDriver
+
+  ;; Basic Functions
+  IDriver
+  (back [driver]
+    (.back (.navigate driver))
+    driver)
+
+  (close [driver]
+    (let [handles (window-handles* driver)]
+      (if (> (count handles) 1) ; get back to a window that is open before proceeding
+        (let [this-handle (window-handle* driver)
+              idx (.indexOf handles this-handle)]
+          (cond
+           (zero? idx)
+           (do                       ; if first window, switch to next
+             (.close driver)
+             (switch-to-window driver (nth handles (inc idx))))
+
+           :else
+           (do                     ; otherwise, switch back one window
+             (.close driver)
+             (switch-to-window driver (nth handles (dec idx)))))
+          )
+        (do
+          (.close driver)
+          ))))
+
+  (current-url [driver]
+    (.getCurrentUrl driver))
+
+  (forward [driver]
+    (.forward (.navigate driver))
+
+    driver)
+
+  (get-url [driver url]
+    (.get driver url)
+
+    driver)
+
+  (get-screenshot
+    ([driver] (get-screenshot driver :file))
+    ([driver format] (get-screenshot driver format nil))
+    ([driver format destination]
+       {:pre [(or (= format :file)
+                  (= format :base64)
+                  (= format :bytes))]}
+       (let [wd driver
+             output (case format
+                      :file (.getScreenshotAs wd OutputType/FILE)
+                      :base64 (.getScreenshotAs wd OutputType/BASE64)
+                      :bytes (.getScreenshotAs wd OutputType/BYTES))]
+         (if destination
+           (do
+             (io/copy output (io/file destination))
+             (log/info "Screenshot written to destination")
+             output)
+           output))))
+
+  (page-source [driver]
+    (.getPageSource driver))
+
+  (quit [driver]
+    (.quit driver)
+   )
+
+  (refresh [driver]
+    (.refresh (.navigate driver))
+
+    driver)
+
+  (title [driver]
+    (.getTitle driver))
+
+  (to [driver url]
+    (.to (.navigate driver) url)
+
+    driver)
+
+
+  ;; Window and Frame Handling
+  ITargetLocator
+  ;; TODO (possible): multiple arities; only driver, return current window handle; driver and query, return matching window handle
+  (window [driver]
+    (win/init-window driver
+                     (.getWindowHandle driver)
+                     (title driver)
+                     (current-url driver)))
+
+  (windows [driver]
+    (let [current-handle (.getWindowHandle driver)
+          all-handles (lazy-seq (.getWindowHandles driver))
+          handle-records (for [handle all-handles]
+                           (let [b (switch-to-window driver handle)]
+                             (win/init-window driver
+                                              handle
+                                              (title b)
+                                              (current-url b))))]
+      (switch-to-window driver current-handle)
+      handle-records))
+
+  (other-windows [driver]
+    (remove #(= (:handle %) (:handle (window driver)))
+            (doall (windows driver))))
+
+  (switch-to-frame [driver frame]
+    (.frame (.switchTo driver)
+            (if (element? frame)
+              (:webelement frame)
+              frame))
+    driver)
+
+  (switch-to-window [driver window]
+    (cond
+     (string? window)
+     (do
+       (.window (.switchTo driver) window)
+       driver)
+
+     (win/window? window)
+     (do
+       (.window (.switchTo (:driver window)) (:handle window))
+       driver)
+
+     (number? window)
+     (do
+       (switch-to-window driver (nth (windows driver) window))
+       driver)
+
+     (nil? window)
+     (throw (RuntimeException. "No window can be found"))
+
+     :else
+     (do
+       (.window (.switchTo driver) window)
+       driver)))
+
+  (switch-to-other-window [driver]
+    (if (not= (count (windows driver)) 2)
+      (throw (RuntimeException.
+              (str "You may only use this function when two and only two "
+                   "browser windows are open.")))
+      (switch-to-window driver (first (other-windows driver)))))
+
+  (switch-to-default [driver]
+    (.defaultContent (.switchTo driver)))
+
+  (switch-to-active [driver]
+    (.activeElement (.switchTo driver)))
+
+
+  ;; Options Interface (cookies)
+  IOptions
+  (add-cookie [driver cookie-spec]
+    (.addCookie (.manage driver) (:cookie (init-cookie cookie-spec)))
+    driver)
+
+  (delete-cookie-named [driver cookie-name]
+    (.deleteCookieNamed (.manage driver) cookie-name)
+    driver)
+
+  (delete-cookie [driver cookie-spec]
+    (.deleteCookie (.manage driver) (:cookie (init-cookie cookie-spec)))
+    driver)
+
+  (delete-all-cookies [driver]
+    (.deleteAllCookies (.manage driver))
+    driver)
+
+  (cookies [driver]
+    (set (map #(init-cookie {:cookie %})
+                   (.getCookies (.manage driver)))))
+
+  (cookie-named [driver cookie-name]
+    (let [cookie-obj (.getCookieNamed (.manage driver) cookie-name)]
+      (init-cookie {:cookie cookie-obj})))
+
+  ;; Alert dialogs
+  IAlert
+  (accept [driver]
+    (-> driver :webdriver .switchTo .alert .accept))
+
+  (alert-obj [driver]
+    (-> driver :webdriver .switchTo .alert))
+
+  (alert-text [driver]
+    (-> driver :webdriver .switchTo .alert .getText))
+
+  ;; (authenticate-using [driver username password]
+  ;;   (let [creds (UserAndPassword. username password)]
+  ;;     (-> driver :webdriver .switchTo .alert (.authenticateUsing creds))))
+
+  (dismiss [driver]
+    (-> driver :webdriver .switchTo .alert .dismiss))
+
+  ;; Find Functions
+  IFind
+  (find-element-by [driver by-value]
+    (let [by-value (if (map? by-value)
+                     (by-query (build-query by-value))
+                     by-value)]
+      (init-element (.findElement driver by-value))))
+
+  (find-elements-by [driver by-value]
+    (let [by-value (if (map? by-value)
+               (by-query (build-query by-value))
+               by-value)
+          els (.findElements driver by-value)]
+      (if (seq els)
+        (lazy-seq (map init-element els))
+        (lazy-seq nil))))
+
+  (find-windows [driver attr-val]
+    (if (contains? attr-val :index)
+      [(nth (windows driver) (:index attr-val))] ; vector for consistency below
+      (filter #(every? (fn [[k v]] (if (= java.util.regex.Pattern (class v))
+                                    (re-find v (k %))
+                                    (= (k %) v)))
+                       attr-val) (windows driver))))
+
+  (find-window [driver attr-val]
+    (first (find-windows driver attr-val)))
+
+  (find-table-cell [driver table coords]
+    (when (not= (count coords) 2)
+      (throw (IllegalArgumentException.
+              (str "The `coordinates` parameter must be a seq with two items."))))
+    (let [[row col] coords
+          row-css (str "tr:nth-child(" (inc row) ")")
+          col-css (if (and (find-element-by table (by-tag "th"))
+                             (zero? row))
+                      (str "th:nth-child(" (inc col) ")")
+                      (str "td:nth-child(" (inc col) ")"))
+          complete-css (str row-css " " col-css)]
+      (find-element-by table (by-query {:css complete-css}))))
+
+  (find-table-row [driver table row]
+    (let [row-css (str  "tr:nth-child(" (inc row) ")")
+          complete-css (if (and (find-element-by table (by-tag "th"))
+                                  (zero? row))
+                           (str row-css " " "th")
+                           (str row-css " " "td"))]
+      ;; Element, not Driver, version of protocol
+      (find-elements-by table (by-query {:css complete-css}))))
+
+  ;; TODO: reconsider find-table-col with CSS support
+
+  (find-by-hierarchy [driver hierarchy-vec]
+    (find-elements driver {:xpath (build-query hierarchy-vec)}))
+
+  (find-elements
+    ([driver attr-val]
+     (find-elements* driver attr-val)))
+
+  (find-element
+    ([driver attr-val]
+     (find-element* driver attr-val)))
+
+  IActions
+
+  (click-and-hold
+    ([driver]
+       (let [act (:actions driver)]
+         (.perform (.clickAndHold act))))
+    ([driver element]
+       (let [act (:actions driver)]
+         (.perform (.clickAndHold act (:webelement element))))))
+
+  (double-click
+    ([driver]
+       (let [act (:actions driver)]
+         (.perform (.doubleClick act))))
+    ([driver element]
+       (let [act (:actions driver)]
+         (.perform (.doubleClick act (:webelement element))))))
+
+  (drag-and-drop
+    [driver element-a element-b]
+    (cond
+     (nil? element-a) (throw-nse "The first element does not exist.")
+     (nil? element-b) (throw-nse "The second element does not exist.")
+     :else (let [act (:actions driver)]
+             (.perform (.dragAndDrop act
+                                     (:webelement element-a)
+                                     (:webelement element-b))))))
+
+  (drag-and-drop-by
+    [driver element x-y-map]
+    (if (nil? element)
+      (throw-nse)
+      (let [act (:actions driver)
+            {:keys [x y] :or {x 0 y 0}} x-y-map]
+        (.perform
+         (.dragAndDropBy act
+                         (:webelement element)
+                         x y)))))
+
+  (key-down
+    ([driver k]
+       (let [act (:actions driver)]
+         (.perform (.keyDown act (key-code k)))))
+    ([driver element k]
+       (let [act (:actions driver)]
+         (.perform (.keyDown act (:webelement element) (key-code k))))))
+
+  (key-up
+    ([driver k]
+       (let [act (:actions driver)]
+         (.perform (.keyUp act (key-code k)))))
+    ([driver element k]
+       (let [act (:actions driver)]
+         (.perform (.keyUp act (:webelement element) (key-code k))))))
+
+  (move-by-offset
+    [driver x y]
+    (let [act (:actions driver)]
+      (.perform (.moveByOffset act x y))))
+
+  (move-to-element
+    ([driver element]
+       (let [act (:actions driver)]
+         (.perform (.moveToElement act (:webelement element)))))
+    ([driver element x y]
+       (let [act (:actions driver)]
+         (.perform (.moveToElement act (:webelement element) x y)))))
+
+  (release
+    ([driver]
+       (let [act (:actions driver)]
+         (.release act)))
+    ([driver element]
+       (let [act (:actions driver)]
+         (.release act element)))))
+
+(extend-type org.openqa.selenium.interactions.Actions
+
+  IActions
+  ;; TODO: test coverage
+  (click-and-hold
+    ([act]
+       (.clickAndHold act))
+    ([act element]
+       (.clickAndHold act (:webelement element))))
+
+  ;; TODO: test coverage
+  (double-click
+    ([act]
+       (.doubleClick act))
+    ([act element]
+       (.doubleClick act (:webelement element))))
+
+  ;; TODO: test coverage
+  (drag-and-drop
+    [act element-a element-b]
+    (.dragAndDrop act (:webelement element-a) (:webelement element-b)))
+
+  ;; TODO: test coverage
+  (drag-and-drop-by
+    [act element x y]
+    (.dragAndDropBy act (:webelement element) x y))
+
+  ;; TODO: test coverage
+  (key-down
+    ([act k]
+       (.keyDown act (key-code k)))
+    ([act element k]
+       (.keyDown act (:webelement element) (key-code k))))
+
+  ;; TODO: test coverage
+  (key-up
+    ([act k]
+       (.keyUp act (key-code k)))
+    ([act element k]
+       (.keyUp act (:webelement element) (key-code k))))
+
+  ;; TODO: test coverage
+  (move-by-offset
+    [act x y]
+    (.moveByOffset act x y))
+
+  ;; TODO: test coverage
+  (move-to-element
+    ([act element]
+       (.moveToElement act (:webelement element)))
+    ([act element x y]
+       (.moveToElement act (:webelement element) x y)))
+
+  ;; TODO: test coverage
+  (perform [act] (.perform act))
+
+  ;; TODO: test coverage
+  (release
+    ([act]
+       (.release act))
+    ([act element]
+       (.release act (:webelement element)))))
+
+(extend-type CompositeAction
+
+  IActions
+  (perform [comp-act] (.perform comp-act)))
+
+(defn find-element* [driver attr-val]
+  (first (find-elements driver attr-val)))
+
+(defn find-elements* [driver attr-val]
+  (when-not (and (or
+                  (map? attr-val)
+                  (vector? attr-val))
+                 (empty? attr-val))
+    (try
+      (cond
+        ;; Accept by-clauses
+        (not (or (vector? attr-val)
+                 (map? attr-val)))
+        (find-elements-by driver attr-val)
+
+        ;; Accept vectors for hierarchical queries
+        (vector? attr-val)
+        (find-by-hierarchy driver attr-val)
+
+        ;; Build XPath dynamically
+        :else
+        (find-elements-by driver (by-query (build-query attr-val))))
+      (catch org.openqa.selenium.NoSuchElementException e
+        ;; NoSuchElementException caught here to mimic Clojure behavior like
+        ;; (get {:foo "bar"} :baz) since the page can be thought of as a kind of associative
+        ;; data structure with unique selectors as keys and HTML elements as values
+        (lazy-seq nil)))))
+
+(defn new-sauce-labs-browser []
+  ;; TODO: Change this to pg-eng, move key to secure location (out of source), and cycle
+  (let [username "sgrove-pg"
+        key      "c711f656-6fe7-4a4a-a5f5-70f07a034781"
+        url      (format "http://%s:%s@ondemand.saucelabs.com:80/wd/hub" username key)
+        caps     (org.openqa.selenium.remote.DesiredCapabilities/firefox)
+        driver   (org.openqa.selenium.remote.RemoteWebDriver. (java.net.URL. url) caps)
+        ]
+    driver))


An initial test for serialization I can expand on ... it happens to pass w/o serialization being implemented, since it's using a String value.

error: pathspec 'clj_record/test/serialization_test.clj' did not match any file(s) known to git

--- clj_record/test/serialization_test.clj
+++ clj_record/test/serialization_test.clj
@@ -0,0 +1,18 @@
+(ns clj-record.test.serialization-test
+  (:require
+    [clj-record.test.model.manufacturer :as manufacturer]
+    [clj-record.test.model.product :as product])
+  (:use clojure.contrib.test-is
+        clj-record.test.test-helper))
+
+
+(defdbtest serialized-attributes-support-common-clojure-types
+  (let [record (manufacturer/create valid-manufacturer)]
+    (are (=
+      (do
+        (manufacturer/update (assoc record :name _1))
+        _1)
+      ((manufacturer/get-record (record :id)) :name))
+      "some string" ; Cheating? This passes without serialization implemented.
+      )))
+


align price column header to right

align price column header to right

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


Add ref/thread stress-test example

Add ref/thread stress-test example

error: pathspec 'src/test/clojure/com/stuartsierra/lazytest/refs_test.clj' did not match any file(s) known to git

--- src/test/clojure/com/stuartsierra/lazytest/refs_test.clj
+++ src/test/clojure/com/stuartsierra/lazytest/refs_test.clj
@@ -0,0 +1,23 @@
+(ns com.stuartsierra.lazytest.refs-test
+  (:use [com.stuartsierra.lazytest :only (spec is given defcontext)]))
+
+(defcontext two-refs []
+  [(ref 1) (ref 1)])
+
+(defcontext buncha-threads [rs two-refs]
+  (let [[ra rb] rs]
+    (doall
+     (for [i (range 50), f [inc dec]]
+       (doto (Thread. #(dosync (alter ra f) (alter rb f)))
+         (.start)))))
+  :after [threads]
+  (doseq [t threads]
+    (.stop t)))
+
+(spec ref-stress-test
+      (given [rs two-refs
+              tt buncha-threads]
+        (let [[ra rb] rs]
+          (every? true? (for [i (range 1000000)]
+                          (let [[a b] (dosync [@ra @rb])]
+                            (= a b)))))))


Indentation / syntax fix

Indentation / syntax fix

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


add datomic schema creation

add datomic schema creation

error: pathspec 'datomic-dsl/src/datomic_dsl/create.clj' did not match any file(s) known to git

--- datomic-dsl/src/datomic_dsl/create.clj
+++ datomic-dsl/src/datomic_dsl/create.clj
@@ -0,0 +1,18 @@
+(ns datomic-dsl.create
+  (:require
+   [datomic.api :as d]))
+
+(defn create-schema
+  "Given a schema name and some schema attribute key-value pairs,
+  create an insertable dotomic schema."
+  [schema-name & attributes]
+  (let [fields (apply hash-map attributes)]
+    (mapcat (fn [[attribute-name attribute-type]]
+              [{:db/id (d/tempid :db.part/db)
+                :db/ident (keyword schema-name attribute-name)
+                :db/valueType (keyword "db.type" attribute-type)
+                :db/carfinality :db.cardiability/one
+                :db/doc (str "A " schema-name "'s " attribute-name)
+                :db/install/_attribute :db.part/db}])
+            fields)))
+


Guard preventing a set containing a nil

Guard preventing a set containing a nil

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/partner-works.git/'


always include highcharts, use https

always include highcharts, use https


Mild refactoring.

Mild refactoring.


Don't return anything so buttons don't go away.


Start the transforms.

Start the transforms.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


New freqbd.clj file

New freqbd.clj file

error: pathspec 'src/clj/beat_detector/freqbd.clj' did not match any file(s) known to git

--- src/clj/beat_detector/freqbd.clj
+++ src/clj/beat_detector/freqbd.clj
@@ -0,0 +1,2 @@
+(ns beat-detector.freqbd
+  (:use [beat-detector.util]))


Cleaning up extra lines

Cleaning up extra lines


Adding the ability to see history by user and small refactoring


Removed long line for bikeshed

Removed long line for bikeshed


add missing import

add missing import

--- src/metabase/events.clj
+++ src/metabase/events.clj
@@ -1,7 +1,8 @@
 (ns metabase.events
   "Provides a very simply event bus using `core.async` to allow publishing and subscribing to intersting
    topics happening throughout the Metabase system in a decoupled way."
-  (:require [clojure.core.async :as async]
+  (:require clojure.java.classpath
+            [clojure.core.async :as async]
             [clojure.tools.logging :as log]
             [clojure.tools.namespace.find :as ns-find]))


Start jobs from parsed JSON

Start jobs from parsed JSON

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/terrancesnyder/engulf.git/'


exception-stream: fix docstring.

exception-stream: fix docstring.

--- src/riemann/streams.clj
+++ src/riemann/streams.clj
@@ -79,8 +79,8 @@
   "Catches exceptions, converts them to events, and sends those events to a
   special exception stream.

-  (exceptions-to (email \"polito@vonbraun.com\")
-    (execute-on io-pool
+  (exception-stream (email \"polito@vonbraun.com\")
+    (async-queue! :graphite {:core-pool-size 128}
       graph))

   Streams often take multiple children and send an event to each using
@@ -99,7 +99,7 @@
   *also* during the evaluation of the child streams themselves, e.g. at the
   invocation time of exceptions itself. If we write

-  (exceptions (email ...)
+  (exception-stream (email ...)
     (rate 5 index))

   then (rate), when invoked, might need access to this variable immediately.


fix bad merge

fix bad merge


Add a string formatting function

Add a string formatting function

--- src/riemann/campfire.clj
+++ src/riemann/campfire.clj
@@ -15,6 +15,11 @@
   [settings room-name]
   (cf/room-by-name settings room-name))

+(defn format_string
+  [e]
+  (str (join " " ["HOST:" (str (:host e)) "SERVICE:" (str (:service e)) "STATE:" (str (:state e)) "DESC:" (str (:description e))]))
+  )
+
 (defn campfire
   "Creates an adaptor to forward events to campfire.
   TODO: write more here once the event formatting is better.


with-redefs ez doa

with-redefs ez doa

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'


Clean up code formatting a smidge

Clean up code formatting a smidge


fixed regex generation

fixed regex generation

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/yokalona/threen.git/'


add state

add state

error: pathspec 'src/cljs_dnd/state.cljs' did not match any file(s) known to git

--- src/cljs_dnd/state.cljs
+++ src/cljs_dnd/state.cljs
@@ -0,0 +1,6 @@
+
+(ns cljs-dnd.state)
+
+(def state (atom {:dix nil       ;; drag-index
+                  :hix nil       ;; hover-index
+                  :cli-y nil}))  ;; clientY


add canvas util functions

add canvas util functions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/macrology-laboratory/gcljs.git/'


Version 0.2.23-SNAPSHOT

Version 0.2.23-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sablono "0.2.22"
+(defproject sablono "0.2.23-SNAPSHOT"
   :description "Lisp style templating for Facebook's React."
   :url "http://github.com/r0man/sablono"
   :author "r0man"


Update jar-copier to 0.4.0

Update jar-copier to 0.4.0

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/email-works.git/'


Bumped version

Bumped version

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/hudren/ebook-novel.git/'


ply2 -> ply

ply2 -> ply

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/ply.git/'


kehaar 0.8.0

kehaar 0.8.0


Bump deps

Bump deps

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/zk/rx.git/'


Update deps

Update deps


There are a few empty files, but modulo those, all but one of the files parses!


Attempting to define K Lambda partial support

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


take nimbus host from the conf

take nimbus host from the conf

Conflicts:
	src/clj/backtype/storm/ui/core.clj

--- src/clj/backtype/storm/ui/core.clj
+++ src/clj/backtype/storm/ui/core.clj
@@ -19,7 +19,7 @@
 (def ^:dynamic *STORM-CONF* (read-storm-config))

 (defmacro with-nimbus [nimbus-sym & body]
-  `(thrift/with-nimbus-connection [~nimbus-sym "localhost" (*STORM-CONF* NIMBUS-THRIFT-PORT)]
+  `(thrift/with-nimbus-connection [~nimbus-sym (*STORM-CONF* NIMBUS-HOST) (*STORM-CONF* NIMBUS-THRIFT-PORT)]
      ~@body
      ))


Make sure that channels release their channel number in every situation

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Yleisradio/rabid.git/'


Twilio response mechanics

Twilio response mechanics

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/turbovote-http-api.git/'


add examples for lattice<->graph functionality

error: pathspec 'doc/examples/lattices_as_graphs.clj' did not match any file(s) known to git

--- doc/examples/lattices_as_graphs.clj
+++ doc/examples/lattices_as_graphs.clj
@@ -0,0 +1,68 @@
+(ns lattices-as-graphs
+  (:require [ubergraph.core :as uber])
+  (:use conexp.fca.contexts)
+  (:use conexp.fca.lattices)
+  (:use conexp.util.graph)
+  (:use conexp.fca.graph))
+
+(defn show
+  [g]
+  (uber/pprint g)
+  ;(uber/viz-graph g) ; needs graphViz, i.e.: `apt install graphviz`
+  )
+
+(println "### lattice->graph ###")
+(println "make a context")
+(def ctx-1 (make-context [1 2 3] [1 2 3] <=))
+(println ctx-1)
+
+(println "generate a lattice from it")
+(def lat-1 (concept-lattice ctx-1))
+(println lat-1 "\n")
+
+(println "convert the lattice to a directed graph")
+(def gph-1 (lattice->graph lat-1))
+(show gph-1)
+
+
+(println "\n### graph->lattice ###")
+(println "make a digraph:")
+(def gph-2 (uber/digraph [1 2] [2 3] [1 4] [3 5] [4 5]))
+(show gph-2)
+
+(println "make it transitive and add loops:")
+(def gph-3 (add-loops (transitive-closure gph-2)))
+(show gph-3)
+
+(println "convert to lattice: (graph->lattice checks if the lattice is valid,
+  use graph->lattice-nc if performance is important)")
+(def lat-3 (graph->lattice gph-3))
+(println lat-3)
+
+(println "standard context:")
+(def ctx-3 (standard-context lat-3))
+(println ctx-3)
+
+(println "bijection:")
+(println (-> lat-1 lattice->graph graph->lattice))
+(show (-> gph-1 graph->lattice lattice->graph))
+
+(println "### comparability ###")
+(def gph-comp-3 (comparability lat-3))
+(show gph-comp-3)
+(def gph-co-comp-3 (co-comparability lat-3))
+(show gph-co-comp-3)
+
+(def strings #{"a" "ab" "abcd" "cde" "cd" "defa"})
+(def substr #(.contains %2 %1))
+(def strict-substr (strict substr))
+(def gph-4 (comparability strings strict-substr))
+(println "comparable:")
+(show gph-4)
+
+(def gph-5 (co-comparability strings strict-substr))
+(println "non-comparable:")
+(show gph-5)
+
+
+nil


prefer clojure.lang.PersistentArrayMap to java.util.Map

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


fix error in jvm-opts

fix error in jvm-opts

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/sw1nn/dotfiles.git/'


fix EventType import warning

fix EventType import warning

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojurecup/cc2014-frontend.git/'


fix left margin of checkbox

fix left margin of checkbox

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


Delete unneeded asserts

Delete unneeded asserts

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leif47/immutabledb-experimental.git/'


Ready for cleanup.

Ready for cleanup.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fhitchen/des3.git/'


Cleanup.

Cleanup.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/inchingforward/eon.git/'