need to 'cd' to script/build path; better tests for existence of shen sources

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/'


Moved the byte buffer comparison into a macro.

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/altamiracorp/honeycomb.git/'


return deleted preference

return deleted preference

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/voting-method-works.git/'


Updated keywords and copyleft year.

Updated keywords and copyleft year.

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/danielfm/licensator.git/'


(number operations)

(number operations)

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/fhirbase/fhirplace.git/'


correct comp typo

correct comp typo

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/'


added arities.clj

added arities.clj

error: pathspec 'clojure_dmap/utilities/arities.clj' did not match any file(s) known to git

--- clojure_dmap/utilities/arities.clj
+++ clojure_dmap/utilities/arities.clj
@@ -0,0 +1,9 @@
+
+(defn arities [v]
+  (->> v
+    meta
+    :arglists
+    (map #(remove #{'&} %))
+    (map count)))
+
+


change unsubscribe to `put` request

change unsubscribe to `put` request

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/'


chore(request): set default conn-timeout to 2000

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/'


Remove all the statuses as a single transaction

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-works.git/'


comment out -cached-rf method in protocol (will be using -cached-rf-plan)

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/'


Simple refactoring

Simple refactoring

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/acessocard/microscope.git/'


Typo error

Typo error


:fallen_leaf: Solved semi-sub optimally

:fallen_leaf: Solved semi-sub optimally

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/whatever/Euler.git/'


Create interceptor to authenticate calls from AWS


WIP API routes

WIP API routes

error: pathspec 'webui/src/webui/routes/api.clj' did not match any file(s) known to git

--- webui/src/webui/routes/api.clj
+++ webui/src/webui/routes/api.clj
@@ -0,0 +1,35 @@
+;;  API RESTful Iridescence Smart connector
+;;  Copyright (C) 2015 eCaresoft Inc
+;;  Ernesto Angel Celis de la Fuente <developer@celisdelafuente.net>
+;;
+;;  This file is part of Iridescence Smart Connector
+;;
+;;  Iridescence Smart Connector is free software: you can redistribute it
+;;  under the terms of the GNU Affero General Public License as published by
+;;  the Free Software Foundation, either version 3 of the License, or (at
+;;  your option) any later version.
+;;
+;;  This program is distributed in the hope that it will be useful,
+;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;  GNU Affero General Public License for more details.
+;;
+;;  You should have received a copy of the GNU Affero General Public License
+;;  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(ns webui.routes.api
+  (:require [webui.layout :as layout]
+            [compojure.core :refer :all]
+            [clojure.java.io :as io]))
+
+(defn save-workspace []
+  (layout/render
+    "home.html"))
+
+(defn load-workspace []
+  (layout/render "about.html"))
+
+(defroutes api-routes
+  (context "/api" []
+    (POST "/" [] (save-workspace))
+    (GET "/" [] (load-workspace))))


WIP resources macro

WIP resources macro


shop api settings

shop api settings

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/'


Started adding tests around caching in order to start expiring it

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/qu-platform/qu-core.git/'


Add ns `com.nomistech.clojure-the-language.c-000-log.s-2017-08`

error: pathspec 'test/com/nomistech/clojure_the_language/c_000_log/s_2017_08.clj' did not match any file(s) known to git

--- test/com/nomistech/clojure_the_language/c_000_log/s_2017_08.clj
+++ test/com/nomistech/clojure_the_language/c_000_log/s_2017_08.clj
@@ -0,0 +1,45 @@
+(ns com.nomistech.clojure-the-language.c-000-log.s-2017-08
+  (:require [clojure.inspector]
+            [midje.sweet :refer :all]))
+
+;;;; ___________________________________________________________________________
+;;;; Stuart Halloway on REPL-Driven Development -- Chicago Clojure - 2017-06-21
+;;;; - https://vimeo.com/223309989
+
+;;;; Also see your org notes.
+
+;;;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+;;;; Hook into REPL
+
+;;;; Code that didn't work well for me in Cider.
+
+
+;;;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+;;;; Socket REPL
+;;;; - Clojure 1.8+.
+
+#_
+(clojure.core.server/start-server {:port 9999
+                                   :name "my-socket-repl"
+                                   :accept 'clojure.core.server/repl})
+
+;; In a shell:
+;;     telnet localhost 9999
+
+
+;;;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+;;;; Inspect random things
+
+(clojure.inspector/inspect-tree {:a 1
+                                 :b {:c 2
+                                     :d {:e 3}}})
+
+;; Evaluate eg
+
+#_
+(/ 0 0)
+
+#_
+(-> *e
+    Throwable->map
+    clojure.inspector/inspect-tree)


fix building path

fix building path

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/max-neverov/ads-client.git/'


Removed unnecessary TODOs

Removed unnecessary TODOs

And cleaned up some formatting to respect the 80

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 table inntekt etter skatt 04751.

Add table inntekt etter skatt 04751.

error: pathspec 'src/clj_simple_chart/ssb/data/inntekt_etter_skatt_04751.clj' did not match any file(s) known to git

--- src/clj_simple_chart/ssb/data/inntekt_etter_skatt_04751.clj
+++ src/clj_simple_chart/ssb/data/inntekt_etter_skatt_04751.clj
@@ -0,0 +1,78 @@
+(ns clj-simple-chart.ssb.data.inntekt-etter-skatt-04751
+  (:require [clojure.data.json :as json]
+            [clojure.test :as test]
+            [clj-http.client :as client]
+            [clojure.pprint :refer [pprint]]
+            [clj-simple-chart.csv.csvmap :as csv]
+            [clojure.string :as string]))
+
+(def url "http://data.ssb.no/api/v0/no/table/04751")
+(defonce metadata (client/get url))
+(test/is (= 200 (:status metadata)))
+(def metadata-body (json/read-str (:body metadata) :key-fn keyword))
+(def variables-readable (mapv keyword (mapv :text (:variables metadata-body))))
+(test/is (= [:hushaldningstype :statistikkvariabel :år] variables-readable))
+
+(def variables (:variables metadata-body))
+
+(defn show-variable [variable]
+  {:pre [(some #{variable} variables-readable)]}
+  (let [full-variable (->> (:variables metadata-body) (filter #(= (:text %) (name variable))) (first))
+        codesTexts (:valueTexts full-variable)
+        codes (:values full-variable)
+        reverse-lookup (zipmap codesTexts codes)
+        sorted-codesTexts (sort codesTexts)]
+    (doall (map (fn [txt]
+                  (println txt "" (get reverse-lookup txt)))
+                sorted-codesTexts)))
+  ::empty)
+
+(defn get-code-for-variable [variable readable]
+  {:pre [(some #{variable} variables-readable)]}
+  (let [v (first (filter #(= (name variable) (:text %)) variables))
+        codes (:values v)
+        codesTexts (:valueTexts v)
+        reverse-lookup (zipmap codesTexts codes)]
+    (if (= ::none (get reverse-lookup readable ::none))
+      (throw (Exception. (str "Could not find " readable " for variable " variable)))
+      (get reverse-lookup readable ::none))))
+
+(defn code [variable]
+  {:pre [(some #{variable} variables-readable)]}
+  (->> variables
+       (filter #(= (name variable) (:text %)))
+       (first)
+       (:code)))
+
+(def qq [{:code (code :hushaldningstype) :selection {:filter "item" :values [(get-code-for-variable :hushaldningstype "Alle hushald")]}}
+         {:code (code :statistikkvariabel) :selection {:filter "item" :values [(get-code-for-variable :statistikkvariabel "Inntekt etter skatt (kr)")]}}
+         {:code (code :år) :selection {:filter "all" :values ["*"]}}])
+
+(def q {:query qq :response {:format "csv"}})
+
+(defonce response (client/post url {:form-params q :content-type :json :as :byte-array}))
+(test/is (= 200 (:status response)))
+(test/is (= "text/csv; charset=Windows-1252" (-> response :headers (get "Content-Type"))))
+(def resp (String. (:body response) "Windows-1252"))
+(def parsed (csv/csv-map resp))
+(def data (:data parsed))
+(def columns (:columns parsed))
+
+(def columns-non-value (->> columns (remove #(.startsWith (name %) "Inntekt etter skatt"))))
+
+(test/is (= 1 (count data)))
+(test/is (= 1 (count columns-non-value)))
+
+(defn make-row [{hushaldningstype :hushaldningstype
+                 :as              row}]
+  (reduce (fn [o [k v]]
+            (if (some #{k} columns-non-value)
+              o
+              (conj o {:hushaldningstype hushaldningstype
+                       :år (string/join (take-last 4 (name k)))
+                       :value (read-string v)}))) [] row))
+
+(def parsed-data (->> data
+                      (mapv make-row)
+                      (flatten)
+                      (sort-by :år)))


add deci_wobble synth example

add deci_wobble synth example

error: pathspec 'src/overtone/examples/synthesis/deci_wobble.clj' did not match any file(s) known to git

--- src/overtone/examples/synthesis/deci_wobble.clj
+++ src/overtone/examples/synthesis/deci_wobble.clj
@@ -0,0 +1,30 @@
+(ns overtone.examples.synthesis.deci-wobble
+  (:use overtone.live))
+
+;; Adapted from the Decimator Wobble Base described here:
+;; http://www.phrontist.org/2010/06/decimator-wobble-bass/
+
+(defsynth deci-wobble []
+  (let [temp-freq (/ 140 60 3)
+        trig      (impulse temp-freq)
+        note      (demand trig 0 (dseq [40 43 47 47 40 37 43 28] INF))
+        note      (slew:kr note 300 20)
+        num-smp   (/ (sample-rate) temp-freq)
+        rate      (/ (* 2 Math/PI) num-smp)
+        rate      (* rate 0.5 (demand:kr trig 0 (dseq [0.5 6 6 12 2 8 6 12] INF)))
+        wobble    (lag (cos (phasor:ar trig rate Math/PI (* 2 Math/PI))) 0.01)
+        sub       (* (lin-lin wobble -1 1 0 1)
+                     (sin-osc (/ (midicps note) 2 )))
+        sub       [sub sub]
+        snd       (+ (var-saw (midicps note) :width (lin-lin wobble -1 1 0.45 0.55))
+                     sub)
+        snd       (decimator snd 20000 (lin-lin wobble -1 1 1.2 8))
+        snd       (moog-ladder snd (lin-lin wobble -1 1 (midicps note) 25000) (lin-lin wobble -1 1 0.03 0.1))
+        snd       (* 0.75 [snd snd])
+        snd       [(delay-c snd 1 (lin-lin wobble -1 1 0 0.0012)) (delay-c snd 1 (lin-lin wobble -1 1 0.0012 0))]
+        snd       (* snd (linen:kr trig 0.01 2 (/ 1.3 temp-freq) :action NO-ACTION))
+        ]
+    (out 0 snd)))
+
+;; to play:
+;; (deci-wobble)


Function rename for clarity

Function rename for clarity


disallow a few more characters in topology names

--- src/clj/backtype/storm/daemon/nimbus.clj
+++ src/clj/backtype/storm/daemon/nimbus.clj
@@ -794,6 +794,13 @@
 (defn- thriftify-executor-id [[first-task-id last-task-id]]
   (ExecutorInfo. (int first-task-id) (int last-task-id)))

+(def DISALLOWED-TOPOLOGY-NAME-STRS #{"/" "." ":" "\\"})
+
+(defn validate-topology-name! [name]
+  (if (some #(.contains name %) DISALLOWED-TOPOLOGY-NAME-STRS)
+    (throw (InvalidTopologyException.
+      (str "Topology name cannot contain any of the following: " (pr-str DISALLOWED-TOPOLOGY-NAME-STRS))))))
+
 (defserverfn service-handler [conf inimbus]
   (.prepare inimbus conf (master-inimbus-dir conf))
   (log-message "Starting Nimbus with conf " conf)
@@ -820,8 +827,7 @@
     (reify Nimbus$Iface
       (^void submitTopology
         [this ^String storm-name ^String uploadedJarLocation ^String serializedConf ^StormTopology topology]
-        (if (.contains storm-name "/")
-          (throw (InvalidTopologyException. "Topology name cannot contains slashes")))
+        (validate-topology-name! storm-name)
         (check-storm-active! nimbus storm-name false)
         (swap! (:submitted-count nimbus) inc)
         (let [storm-id (str storm-name "-" @(:submitted-count nimbus) "-" (current-time-secs))


Added Mike's reducer problem.

Added Mike's reducer problem.

error: pathspec 'src/main/cljc/clojure_club/playground/reducer_problem.clj' did not match any file(s) known to git

--- src/main/cljc/clojure_club/playground/reducer_problem.clj
+++ src/main/cljc/clojure_club/playground/reducer_problem.clj
@@ -0,0 +1,40 @@
+(ns clojure-club.playground.reducer-problem
+  (:require [clojure.core.reducers :as r]))
+
+(defn work-proxy [input]  (Thread/sleep input)  1)
+
+(def work-proxy-thunk (partial work-proxy 1000))
+
+(defn counter [thunk]
+  (thunk))
+
+;Think of work proxy as set amount of calculation we want to do.
+;What I was trying to do was get the reducers to run each thunk in parallel.
+; I can do this with pmap, but if I try to use transducers, it seems its immediately realized.
+
+;(time (count-state-reducer 40))
+;"Elapsed time: 40019.119145 msecs"
+;Note this is the same time as count-state, probably because the thunks aren't
+;execute in parallel, but during the r/map?
+(defn count-state-reducer [limit]
+  (->>  (repeat work-proxy-thunk)
+        (r/take limit)
+        (r/map counter)
+        (r/fold +)
+        ))
+
+;(time (count-state-better 40))
+;"Elapsed time: 4006.483026 msecs"
+(defn count-state-better [limit]
+  (->> (repeat work-proxy-thunk)
+       (take limit)
+       (pmap counter)
+       (reduce +)))
+
+;(time (count-state 40))
+;"Elapsed time: 40020.016874 msecs"
+(defn count-state [limit]
+  (->> (repeat work-proxy-thunk)
+       (take limit)
+       (map counter)
+       (reduce +)))


add QOS defaults of 10 for all the incoming event services and incoming services, minor refactoring


add signature extraction and add parser for rare 'def fn' forms

--- scripts/get-symbol-metadata/src/core.clj
+++ scripts/get-symbol-metadata/src/core.clj
@@ -114,34 +114,93 @@
 ;; Form Parsing
 ;;------------------------------------------------------------

-(defn parse-fn-or-macro
+(defn parse-defn-or-macro
+  [form]
+  (let [name- (second form)
+        docstring (let [ds (nth form 2)]
+                    (when (string? ds)
+                      (fix-docstring ds)))
+        attr-map (let [m (nth form (if docstring 3 2))]
+                   (when (map? m) m))
+        rest-forms (drop (cond-> 2 docstring inc attr-map inc) form)
+        signatures (if (vector? (first rest-forms))
+                     (take 1 rest-forms)
+                     (map first rest-forms))]
+    {:name name-
+     :docstring docstring
+     :signatures signatures}))
+
+(defn parse-def-fn
+  [form]
+  (let [name- (second form)
+        m (meta name-)
+        docstring (let [ds (:doc m)]
+                    (when (string? ds)
+                      (fix-docstring ds)))
+        signatures (when-let [arglists (:arglists m)]
+                     (when (= 'quote (first arglists))
+                       (second arglists)))]
+    {:name name-
+     :docstring docstring
+     :signatures signatures}))
+
+(defmulti parse-form*
+  (fn [form]
+    (cond
+      (= 'defn (first form))
+      "defn"
+
+      (= 'defmacro (first form))
+      "defmacro"
+
+      (and (= 'def (first form))
+           (list? (nth form 2 nil))
+           (= 'fn (first (nth form 2 nil)))
+           (not (:private (meta (second form)))))
+      "def fn"
+
+      :else nil)))
+
+(defmethod parse-form* "def fn"
+  [form]
+  (assoc (parse-def-fn form) :fn-or-macro "function"))
+
+(defmethod parse-form* "defn"
+  [form]
+  (assoc (parse-defn-or-macro form) :fn-or-macro "function"))
+
+(defmethod parse-form* "defmacro"
+  [form]
+  (assoc (parse-defn-or-macro form) :fn-or-macro "macro"))
+
+(defmethod parse-form* nil
+  [form]
+  nil)
+
+(defn parse-common
   [form ns- repo]
-  (let [fn-or-macro ({'defn "function" 'defmacro "macro"} (first form))
-        docstring (when fn-or-macro
-                    (let [ds (nth form 2)]
-                      (when (string? ds)
-                        (fix-docstring ds))))
-        m (meta form)
+  (let [m (meta form)
         lines [(:line m) (:end-line m)]
         num-lines (inc (- (:end-line m) (:line m)))
         source (join "\n" (take-last num-lines (split-lines (:source m))))
         filename (subs (:file m) (inc (count repo-dir)))
         github-link (get-github-file-link repo filename lines)]
-    (when fn-or-macro
-      {:ns ns-
-       :fn-or-macro fn-or-macro
-       :name (nth form 1)
-       :docstring docstring
-       :source source
-       :filename filename
-       :lines lines
-       :github-link github-link
-       })))
+    {:ns ns-
+     :source source
+     :filename filename
+     :lines lines
+     :github-link github-link}))
+
+(defn parse-form
+  [form ns- repo]
+  (when-let [specific (parse-form* form)]
+    (let [common (parse-common form ns- repo)]
+      (merge specific common))))

 (defn parse-api
   "Parse the functions and macros from the given repo file"
   [ns- repo file]
-  (keep #(parse-fn-or-macro % ns- repo) (get-forms ns- repo file)))
+  (keep #(parse-form % ns- repo) (get-forms ns- repo file)))

 (defn get-imported-macro-api
   [ns- repo file macro-api]
@@ -183,6 +242,7 @@
     [(cljsdoc-section "Name" (:name item))
      (cljsdoc-section "Type" (:fn-or-macro item))
      (cljsdoc-section "Docstring" (:docstring item))
+     (cljsdoc-section "Signatures" (join "\n" (:signatures item)))
      (cljsdoc-section "Filename" (:filename item))
      (cljsdoc-section "Source" (:source item))
      (cljsdoc-section "Github Link" (:github-link item))]))


use :require instead of :use

use :require instead of :use

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/yle-api-template.git/'


Added kinetic base build

Added kinetic base build

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

--- src/build/ros_kinetic_base.clj
+++ src/build/ros_kinetic_base.clj
@@ -0,0 +1,8 @@
+(ns build.ros-kinetic-base
+  (:use arl-docker.util
+        arl-docker.dsl))
+
+(def spec {:name :ros-kinetic-base
+           :version "1.0"
+           :base "nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04"
+           :depends #{:mirrors :ros-pcl :cppdev :user-entry :matlab-runtime}})


Created level namespace to expanding on the level functionality.

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

--- src/cljs/clojuroids/level.cljs
+++ src/cljs/clojuroids/level.cljs
@@ -0,0 +1,24 @@
+(ns clojuroids.level
+  (:require
+   [clojuroids.roid :as roid]))
+
+(def time-to-next-level 100)
+
+(defn create-roids [state n]
+  (let [roid-count (inc n)]
+    (-> state
+        (assoc-in [:objects :roids] (roid/create-roids roid-count))
+        (assoc :last-roid-count roid-count)
+        (assoc :level-timer nil))))
+
+(defn check [state]
+  (let [roids (get-in state [:objects :roids])]
+    (if (= 0 (count roids))
+      (let [timer (:level-timer state)
+            n (:last-roid-count state)]
+        (cond
+         (= nil timer) (assoc state :level-timer time-to-next-level)
+         (= 0 timer)   (create-roids state n)
+         (> timer 0)   (assoc state :level-timer (dec timer))
+         :else state))
+      state)))


add firsts l

add firsts l

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/carolove/clojure-ring-app.git/'


small change for consistency

small change for consistency

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/jtbeckha/alda.git/'


core module

core module

--- src/cellf/core.cljs
+++ src/cellf/core.cljs
@@ -0,0 +1,7 @@
+(ns ^:figwheel-always cellf.core
+    (:require [om.core :as om :include-macros true]
+              [om.dom :as dom :include-macros true]
+              [cljs.core.async :refer [<! >! take! put! chan timeout]]
+              [cellf.media :as media])
+    (:require-macros [cljs.core.async.macros :refer [go-loop]]))
+


www/CitationsResource.clj: started implementation of docid/citations resource

error: pathspec 'src/org/altlaw/www/CitationsResource.clj' did not match any file(s) known to git

--- src/org/altlaw/www/CitationsResource.clj
+++ src/org/altlaw/www/CitationsResource.clj
@@ -0,0 +1,78 @@
+(ns org.altlaw.www.CitationsResource
+  (:gen-class :extends org.restlet.resource.Resource)
+  (:require [org.altlaw.db.content :as content]
+            [org.altlaw.db.privacy :as privacy]
+            [org.altlaw.www.case-pages :as pages]
+            [org.altlaw.www.render :as rend]
+            [org.altlaw.util.date :as date]
+            [org.altlaw.util.courts :as courts]
+            [clojure.contrib.stacktrace :as stack])
+  (:import (org.restlet.resource Variant StringRepresentation ResourceException)
+           (org.restlet.data MediaType Language CharacterSet Reference Status)
+           (org.apache.solr.client.solrj SolrQuery)))
+
+
+(declare *solr*)
+
+(def *default-fields*
+     (into-array ["doctype" "docid" "name" "citations"
+                  "date" "court" "size"]))
+
+(defn get-document-query [docid]
+  (doto (SolrQuery. (str "docid:" docid))
+    (.setQueryType "standard")
+    (.setFields *display-fields*)))
+
+(defn execute-search [query])
+
+(defn get-document
+  "Searches Solr for the document with the given docid.
+  Returns a SolrDocument.
+  Throws ResourceException 404 if not found, or 410 if removed."
+  [docid]
+  (if (privacy/removed? docid)
+    (throw (ResourceException. Status/CLIENT_ERROR_GONE))
+    (let [response (.query *solr* (get-document-query docid))
+          results (.getResults response)]
+      (if (zero? (.getNumFound results))
+        (throw (ResourceException. Status/CLIENT_ERROR_NOT_FOUND))
+        (first results)))))
+
+(defn prepare-html-document
+  "Given a SolrDocument, returns a document map suitable
+  for use by case-pages/gen-case-page"
+  [doc]
+  {:docid (.getFieldValue doc "docid")
+   :name (.getFieldValue doc "name")
+   :date (.getFieldValue doc "date")
+   :court (.getFieldValue doc "court")
+   :citations (.getFieldValues doc "citations")
+   :html (content/get-content-string (.getFieldValue doc "html_content_sha1"))})
+
+(defmulti represent (fn [docid media-type] media-type))
+
+(defmethod represent MediaType/TEXT_HTML [docid media-type]
+  (StringRepresentation.
+   (pages/gen-case-page
+    :text (prepare-html-document (get-document docid)))
+   MediaType/TEXT_HTML
+   Language/ENGLISH_US
+   CharacterSet/UTF_8))
+
+;;; RESOURCE METHODS
+
+(defn -isModifiable [this] false)
+
+(defn -getVariants [this]
+  [(Variant. MediaType/TEXT_HTML)])
+
+(defn -represent [this variant]
+  (try
+   (binding [*solr* (.. this getContext getAttributes (get "org.altlaw.solr.server"))]
+     (let [docid (.. this getRequest getAttributes (get "docid"))]
+       (represent docid (.getMediaType variant))))
+   (catch Exception e
+     (if (and (instance? org.jets3t.service.S3ServiceException
+                         (stack/root-cause e)))
+       (throw (ResourceException. Status/CLIENT_ERROR_NOT_FOUND e))
+       (throw e)))))


[WM] fix indentation of vote-tomorrow-test ns


Add Rumford reducers examples.

Add Rumford reducers examples.

error: pathspec 'test/com/nomistech/clojure_the_language/reducers_rumford_test.clj' did not match any file(s) known to git

--- test/com/nomistech/clojure_the_language/reducers_rumford_test.clj
+++ test/com/nomistech/clojure_the_language/reducers_rumford_test.clj
@@ -0,0 +1,256 @@
+;;;; From http://ianrumford.github.io/blog/2013/08/25/some-trivial-examples-of-using-clojure-reducers/
+;;;; and the corresponding gist at https://gist.github.com/ianrumford/6333358
+
+(ns com.nomistech.clojure-the-language.reducers-rumford-test
+  (:require [clojure.core.reducers :as r]
+            [clojure.string :as string]
+            [midje.sweet :refer :all]))
+
+;; The Families in the Village
+
+(def village
+  [
+   {:home :north :family "smith" :name "sue" :age 37 :sex :f :role :parent}
+   {:home :north :family "smith" :name "stan" :age 35 :sex :m :role :parent}
+   {:home :north :family "smith" :name "simon" :age 7 :sex :m :role :child}
+   {:home :north :family "smith" :name "sadie" :age 5 :sex :f :role :child}
+
+
+   {:home :south :family "jones" :name "jill" :age 45 :sex :f :role :parent}
+   {:home :south :family "jones" :name "jeff" :age 45 :sex :m :role :parent}
+   {:home :south :family "jones" :name "jackie" :age 19 :sex :f :role :child}
+   {:home :south :family "jones" :name "jason" :age 16 :sex :f :role :child}
+   {:home :south :family "jones" :name "june" :age 14 :sex :f :role :child}
+
+   {:home :west :family "brown" :name "billie" :age 55 :sex :f :role :parent}
+   {:home :west :family "brown" :name "brian" :age 23 :sex :m :role :child}
+   {:home :west :family "brown" :name "bettie" :age 29 :sex :f :role :child}
+
+   {:home :east :family "williams" :name "walter" :age 23 :sex :m :role :parent}
+   {:home :east :family "williams" :name "wanda" :age 3 :sex :f :role :child}
+   ])
+
+
+;;;; ___________________________________________________________________________
+
+;; Examples 1 - how many children?
+
+;; Example 1 - create the reducers map function to return 1 if a child, else 0
+(def ex1-map-children-to-value-1 (r/map #(if (= :child (:role %)) 1 0)))
+
+;; Example 1 - use redcue to add up all the mapped values
+(r/reduce + 0 (ex1-map-children-to-value-1 village))
+
+
+;;;; ___________________________________________________________________________
+
+;; Example 2 - how many children in the Brown family?
+
+;; Example 2 - select the members of the Brown family
+(def ex2-select-the-brown-family (r/filter #(= "brown" (string/lower-case (:family %)))))
+
+;; Example 2 - compose a composite function to select the Brown family and map children to 1
+(def ex2-pipeline (comp ex1-map-children-to-value-1 ex2-select-the-brown-family))
+
+;; Example 2 - use reduce to add up all the  Brown children
+(r/reduce + 0 (ex2-pipeline village))
+;; =>
+2
+
+;;;; ___________________________________________________________________________
+
+;; Example 3 - how many children's names start with the letter J?
+
+;; Example 3 - selecting (filtering) just the children
+(def ex3-select-children (r/filter #(= :child (:role %))))
+
+
+;; Example 3 - selecting names beginning with "j"
+(def ex3-select-names-beginning-with-j (r/filter #(= "j" (string/lower-case (first (:name %))))))
+
+;; Example 3 - mapping the  entries in a collection to 1
+(def ex0-map-to-value-1 (r/map (fn [v]  1)))
+
+(into [] (ex3-select-children village))
+
+;; Example 3 - create the three step pipeline function
+
+(def ex3-pipeline (comp ex0-map-to-value-1
+                        ex3-select-names-beginning-with-j
+                        ex3-select-children))
+
+;; Example 3 - reduce the village with the pipeline function
+(r/reduce + 0 (ex3-pipeline village))
+;; =>
+3
+
+;;;; ___________________________________________________________________________
+
+;; Example 4 - making a collection how many children's names start with J?
+
+;; Example 4 - a pipeline to just filter children with names starting with "j"
+(def ex4-pipeline (comp ex3-select-names-beginning-with-j
+                        ex3-select-children))
+
+;; Example 4 - create a vector with the "j" children
+(into [] (ex4-pipeline village))
+;; =>
+[{:age 19, :home :south, :name "jackie", :sex :f, :family "jones", :role :child}
+ {:age 16, :home :south, :name "jason", :sex :f, :family "jones", :role :child}
+ {:age 14, :home :south, :name "june", :sex :f, :family "jones", :role :child}]
+
+
+;;;; ___________________________________________________________________________
+
+;; Example 5 - average age of children on or below the equator
+
+;; Example 5 - select the children
+
+;; Example 5 - map :home to latitude and longitude
+(def ex5-map-home-to-latitude-and-longitude
+  (r/map
+   (fn [v]
+     (condp = (:home v)
+       :north (assoc v :lat 90 :lng 0)
+       :south (assoc v :lat -90 :lng 0)
+       :west (assoc v :lat 0 :lng -180)
+       :east (assoc v :lat 0 :lng 180)))))
+
+;; Example 5 - select people on or below the equator i.e. latitude <= 0
+(def ex5-select-people-on-or-below-equator (r/filter #(>= 0 (:lat %))))
+
+
+;; Example 5 - count the number of children
+(def ex5-no-children-on-or-below-the-equator
+  (r/reduce + 0
+          (ex0-map-to-value-1
+           (ex5-select-people-on-or-below-equator
+            (ex5-map-home-to-latitude-and-longitude
+             (ex3-select-children village))))))
+
+
+;; Example 5 - sum the ages of children
+
+(def ex5-select-age (r/map #(:age %)))
+
+(def ex5-sum-of-ages-of-children-on-or-below-the-equator
+  (r/reduce + 0
+          (ex5-select-age
+           (ex5-select-people-on-or-below-equator
+            (ex5-map-home-to-latitude-and-longitude
+             (ex3-select-children village))))))
+
+;; Example 5 - calculate the average age of children on or below the equator
+(def ex5-averge-age-of-children-on-or-below-the-equator (float (/ ex5-sum-of-ages-of-children-on-or-below-the-equator ex5-no-children-on-or-below-the-equator )))
+
+
+;;;; ___________________________________________________________________________
+
+;; That was fun but why bother
+
+;; Example 6 - comparing the performance of reduce and fold
+
+;; Example 6 - time reduce adding up Example 5's ages
+(time (r/reduce +
+                (ex5-select-age
+                 (ex5-select-people-on-or-below-equator
+                  (ex5-map-home-to-latitude-and-longitude
+                   (ex3-select-children village))))))
+;; =>
+"Elapsed time: 0.091714 msecs"
+
+
+;; Example 6 - time fold adding up Example 5's ages
+(time (r/fold +
+              (ex5-select-age
+               (ex5-select-people-on-or-below-equator
+                (ex5-map-home-to-latitude-and-longitude
+                 (ex3-select-children village))))))
+;; =>
+"Elapsed time: 0.185448 msecs"
+
+
+;;;; ___________________________________________________________________________
+
+;; Example 7 - all the relatives visit the village!
+
+;; Example 7 - make some visitors
+
+(def ex7-fn-random-name (fn [] (rand-nth ["chris" "jim" "mark" "jon" "lisa" "kate" "jay" "june" "julie" "laura"])))
+(def ex7-fn-random-family (fn [] (rand-nth ["smith" "jones" "brown" "williams" "taylor" "davies"])))
+(def ex7-fn-random-home (fn [] (rand-nth [:north :south :east :west])))
+(def ex7-fn-random-sex (fn [] (rand-nth [:m :f])))
+(def ex7-fn-random-role (fn [] (rand-nth [:child :parent])))
+(def ex7-fn-random-age (fn [] (rand-int 100)))
+
+(def ex7-visitor-template
+  {:home ex7-fn-random-home
+   :family ex7-fn-random-family
+   :name ex7-fn-random-name
+   :age ex7-fn-random-age
+   :sex ex7-fn-random-sex
+   :role ex7-fn-random-role})
+
+(defn ex7-make-visitor [] (into {} (for [[k v] ex7-visitor-template] [k (v)])))
+
+(defn ex7-make-visitors [n] (take n (repeatedly ex7-make-visitor)))
+
+(def ex7-visitors (ex7-make-visitors 100))
+;;(def ex7-visitors (into [] (ex7-make-visitors 1000000)))
+
+;; Example 7 - count the visiting Brown children using reduce
+;;(time (r/reduce + 0 (ex2-pipeline ex7-visitors)))
+;; =>
+"Elapsed time: 238.448041 msecs"
+
+;; Example 7 - count the visiting Brown children using fold
+;;(time (r/fold + (ex2-pipeline ex7-visitors)))
+;; =>
+"Elapsed time: 64.788173 msecs"
+
+;; Example 7 - count the visiting Brown children using core map, filter and reduce
+;; (time (reduce + 0
+;;               (map #(if (= :child (:role %)) 1 0)
+;;                    (filter #(= "brown" (string/lower-case (:family %))) ex7-visitors))))
+;; =>
+"Elapsed time: 223.55717 msecs"
+
+
+;; WHat else can you do with fold?
+
+;; A simple folder where both the reducer and combiner is +
+;;(r/fold + (ex2-pipeline ex7-visitors))
+
+;; A fold supplied with the chunk size, a combiner and a reducer
+;;(r/fold the-chunk-size (r/monoid the-combiner-function the-init-function) the-reducer-function)
+
+
+;;;; ___________________________________________________________________________
+
+;; Example 8 - find the avaerage age of visiting children with names beginning "j"
+
+;; Example 8 - create a collection of vistsors with name beginning with "j"
+(def ex8-visitors-collection (into [] (ex4-pipeline (ex7-make-visitors 100))))
+
+;; Example 8 - create the reducer to sum the ages and number of people in that chunk
+(def ex8-reducer
+  (fn [s v]
+    {:total-people (+ (get s :total-people 0) 1)    ;; add 1 to number of people seen
+     :total-age (+ (get s :age 0) (get v :age))}))  ;; and add their ages
+
+;; Example 8 - create the combiner to calculate the average age
+(defn ex8-combiner
+  ([] {}) ;; note this is the init value for each reduced chunk
+  ([a b]
+     (let [total-people (+ (get a :total-people) (get b :total-people))
+           total-age (+ (get a :total-age) (get b :total-age))
+           average-age (float (/ total-age total-people))
+           ]
+       {:total-people total-people
+        :total-age total-age
+        :average-age average-age})))
+
+;; Example 8 - now run the fold to perform the calculation
+(r/fold ex8-combiner ex8-reducer  ex8-visitors-collection)
+;; =>
+{:total-people 28, :total-age 1314, :average-age 46.92857}


We need to keep :links :_collaboration_roots around

 We need them so that insertion can look them up in the parent though get-entities.

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 channel for check-your-registration sending

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/'


minify garden css when not dev

minify garden css when not dev

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/'


Web Applications

Web Applications

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

--- src/mark_volkmann_tutorial/web-app.clj
+++ src/mark_volkmann_tutorial/web-app.clj
@@ -0,0 +1,53 @@
+;; Web Applications
+;; http://java.ociweb.com/mark/clojure/article.html#WebApps
+
+;; libs:
+;; Noir: MVC, Enlive, Framework One
+;; Compojure
+;; all based on Ring
+;; get from git, JARs, build with ANT
+
+;; Compojure Hello, World!
+(ns com.ociweb.hello
+  (:use compojure))
+
+(def host "localhost") ; -> better host =
+(def port 8080)
+(def in-path "/hello")
+(def out-path "/hello-out")
+
+(defn html-doc
+  "generates well-formed HTML for a given title and body content"
+  [title & body]
+  (html
+    (doctype :html4)
+    [:html
+     [:head [:title title]]
+     [:body body]]))
+
+; Creates HTML for input form.
+(def hello-in
+  (html-doc "Hello In"
+            (form-to [:post out-path]
+                     "Name: "
+                     (text-field {:size 10} :name "World")
+                     [:br]
+                     (reset-button "Reset")
+                     (submit-button "Greet"))))
+
+; Creates HTML for resutl message.
+(defn hello-out [name]
+  (html-doc "Hello Out"
+            [:h1 "Hello, " name "!"]))
+
+(defroutes hello-service
+  ; The following three lines map HTTP methods
+  ; and URL patterns to response HTML.
+  (GET in-path hello-in)
+  (POST out-path (hello-out (params :name)))
+  (ANY "*" (page-not-found))) ; displays ./public/404.html by default
+
+(println (str "browse http://" host ":" port in-path))
+; browse http://localhost:8080/hello
+
+(run-server {:port port} "/*" (servlet hello-service))


Added dynamic select

Added dynamic select

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/skprasadu/crud-ui-framework.git/'


removed sonatype maven repo

removed sonatype maven repo

--- project.clj
+++ project.clj
@@ -32,7 +32,7 @@
    [ring/ring-devel "1.0.1"]
    ]
   :ring {:handler ruuvi-tracker.core/dev-app}
-  :repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"}
+  ;;  :repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"}
   )


Version 121-SNAPSHOT

Version 121-SNAPSHOT

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/tobias/clojars-web.git/'


update dependencies

update dependencies

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/LiquidLandscape/d3om-ts.git/'


Using existing environments

Using existing environments

We can’t get it to work with the latest Tomcat AMI (yet)


next ver

next ver

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/janraasch/esigrate.git/'


lein doo now works

lein doo now 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/tiagoantao/turtle.git/'


bump version to 3.5.1

bump version to 3.5.1

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/'


chore(core): update core to 2.5.1

chore(core): update core to 2.5.1

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-BIT/restQL-server.git/'


Create project.clj

Create project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,16 @@
+(defproject Watchlist "0.1.0-SNAPSHOT"
+  :description "Find and add movies to your Watchlist"
+  :dependencies [[org.clojure/clojure "1.5.1"]
+                 [ring "1.2.0"]
+                 [hiccup "1.0.3"]
+                 [enlive "1.1.1"]
+                 [compojure "1.1.5"]
+                 [org.clojure/java.jdbc "0.2.3"]
+                 [mysql/mysql-connector-java "5.1.6"]]
+  ;:dev-dependencies[[org.clojure/java.jdbc "0.2.3"] ]
+  ;:java-source-path "src/myjava"
+  :java-source-paths ["src/myjava"]
+             :aot :all
+  :ring {:handler adder.pages/app}
+  :plugins [[lein-ring "0.8.6"]])
+  :resource-path "resources/"


bump version to 2.8.18

bump version to 2.8.18


Version 0.5.4

Version 0.5.4

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


Aukera gehiago dev-en

Aukera gehiago dev-en

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/'


Working on problem 101...

Working on problem 101...

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

--- src/project_euler/problem_0101.clj
+++ src/project_euler/problem_0101.clj
@@ -0,0 +1,67 @@
+(ns project-euler.problem-0101)
+
+;; If we are presented with the first k terms of a sequence
+;; it is impossible to say with certainty the value of the next term,
+;; as there are infinitely many polynomial functions that can model the sequence.
+
+;; As an example, let us consider the sequence of cube numbers.
+;; This is defined by the generating function,
+;; un = n^3: 1, 8, 27, 64, 125, 216, ...
+
+;; Suppose we were only given the first two terms of this sequence.
+;; Working on the principle that "simple is best" we should assume a linear relationship
+;; and predict the next term to be 15 (common difference 7).
+;; Even if we were presented with the first three terms, by the same principle of simplicity,
+;; a quadratic relationship should be assumed.
+
+;; We shall define OP(k, n) to be the nth term of the optimum polynomial generating function
+;; for the first k terms of a sequence.
+;; It should be clear that OP(k, n) will accurately generate the terms of the sequence for n ≤ k,
+;; and potentially the first incorrect term (FIT) will be OP(k, k+1);
+;; in which case we shall call it a bad OP (BOP).
+
+;; As a basis, if we were only given the first term of sequence,
+;; it would be most sensible to assume constancy; that is, for n ≥ 2, OP(1, n) = u1.
+
+;; Hence we obtain the following OPs for the cubic sequence:
+
+;;    OP(1, n) = 1	1, 1, 1, 1, ...
+;;    OP(2, n) = 7n−6	1, 8, 15, ...
+;;    OP(3, n) = 6n2−11n+6     	1, 8, 27, 58, ...
+;;    OP(4, n) = n3	1, 8, 27, 64, 125, ...
+
+;; Clearly no BOPs exist for k ≥ 4.
+
+;; By considering the sum of FITs generated by the BOPs (indicated in red above),
+;; we obtain 1 + 15 + 58 = 74.
+
+;; Consider the following tenth degree polynomial generating function:
+
+;; un = 1 − n + n^2 − n^3 + n^4 − n^5 + n^6 − n^7 + n^8 − n^9 + n^10
+
+;; Find the sum of FITs for the BOPs.
+
+(defn poly-mult [xs xj]
+  (vec (map +
+            (conj xs 0)
+            (map #(* % (- xj)) (cons 0 xs))
+            )))
+
+(defn lagrange-basis [xs j]
+  (let [xj (nth xs j)]
+    (->> xs
+         (map-indexed (fn [m xm] [m xm]))
+         (remove (fn [[m _]] (== m j)))
+         (reduce (fn [[ps denom] [_  xm]]
+                   [(poly-mult ps xm) (* denom (- xj xm))])
+                 [[1] 1])
+         ((fn [[ps denom]]
+            (map #(/ % denom) ps)))
+         )))
+
+(defn lagrange-interpolation [xs ys]
+  (->> ys
+       (map-indexed (fn [j y]
+                      (map #(* y %) (lagrange-basis xs j))))
+       (reduce #(map + %1 %2))
+       ))


accept html excaped characters in title

accept html excaped characters in title

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/'


Generating languages

Generating languages

error: pathspec 'src/civs/model/language.clj' did not match any file(s) known to git

--- src/civs/model/language.clj
+++ src/civs/model/language.clj
@@ -0,0 +1,7 @@
+(ns
+  ^{:author ftomassetti}
+  civs.model.language)
+
+(defn generate-language []
+  (com.github.langgen.SamplesBasedLanguageFactory/getRandomLanguage))
+


Use the latest handle errors

Use the latest handle errors

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/form-works.git/'


Make ocd-id level regexes more robust

Make ocd-id level regexes more robust

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/electorate-works.git/'


Adding domains to secretary role.

Adding domains to secretary role.

--- src/clj/freefrog/governance.clj
+++ src/clj/freefrog/governance.clj
@@ -259,34 +259,64 @@
 (defn is-lead-link? [role-name]
   (= lead-link-name role-name))

+(defn is-core-role? [role-name]
+  (#{lead-link-name secretary-name} role-name))
+
 (defn- add-to
-  "Abstract function that adds anything to a set-of-things in a role in a
+  "Very abstract function that adds things to things in a role, making sure
+   that if a core role is being manipulated, it is made to be present.
+   Performs collection-op on the collection, or the given empty-collection
+   if it doesn't exist."
+  [circle role-name which-things empty-collection collection-op thing & args]
+  (let [circle (if (and (is-core-role? role-name)
+                        (role-missing? circle role-name))
+                 (add-role circle (map->Role {:name role-name}))
+                 circle)]
+    (validate-things circle role-name which-things thing contains?
+                     "%s '%s' already exists on role '%s'")
+    (let [things (get-entity circle role-name which-things)
+          circle (if things
+                   circle
+                   (update-role circle role-name assoc which-things
+                                empty-collection))
+          add-args (into [thing] args)]
+      (update-role-raw circle role-name [which-things] collection-op
+                       add-args))))
+
+(defn- remove-from
+  "Removes a thing from a collection of things in a role, making sure that
+   if a core role is being manipulated, and becomes empty, it gets removed
+   altogether. Performs collection-op on the collection."
+  [circle role-name which-things collection-op thing]
+  (validate-things circle role-name which-things thing (comp not contains?)
+                   "%s '%s' doesn't exist on role '%s'")
+  (let [result
+        (remove-and-purge circle role-name which-things collection-op thing)]
+    (if (and (is-core-role? role-name)
+             (empty? (get-entity result role-name which-things)))
+      (remove-role result role-name)
+      result)))
+
+(defn- add-to-set
+  "Abstract function that adds anything to which-set-of-things in a role in a
    circle. Performs all validation and so forth. Creates the set if it doesn't
    exist. The sets that can be manipulated are defined in sets-of-things."
-  [circle role-name set-of-things thing]
+  [circle role-name which-set-of-things thing]
   (validate-not (is-lead-link? role-name)
                 (format "May not add %s to '%s'"
-                        (sets-of-things set-of-things) role-name))
-  (validate-things circle role-name set-of-things thing contains?
-                   "%s '%s' already exists on role '%s'")
-  (let [things (get-entity circle role-name set-of-things)
-        circle (if things
-                 circle
-                 (update-role circle role-name assoc set-of-things #{}))]
-    (update-role-entity circle role-name [set-of-things] conj thing)))
-
-(defn- remove-from
+                        (sets-of-things which-set-of-things) role-name))
+  (add-to circle role-name which-set-of-things #{} conj thing))
+
+(defn- remove-from-set
   "Abstract function that removes a thing from a set-of-things in a role in a
    circle. Performs all validation and so forth. Removes the set if it's empty."
   [circle role-name set-of-things thing]
-  (validate-things circle role-name set-of-things thing (comp not contains?)
-                   "%s '%s' doesn't exist on role '%s'")
-  (remove-and-purge circle role-name set-of-things disj thing))
+  (remove-from circle role-name set-of-things disj thing))

 ;; ## Role Collection Manipulation Functions ##
 ;; These functions are critical to maintaining namespace encapsulation. Simply
-;; allowing an external actor to call directly into the "add-to" and
-;; "remove-from" functions artificially constrains this namespace from
+;; allowing an external actor to call directly into the "add-to-set" and
+;; "remove-from-set" functions artificially constrains this namespace from
 ;; easily being able to cause these functions to differentiate themselves from
 ;; one another should they need to, adding a heavier burden on future
 ;; maintainers.
@@ -294,35 +324,29 @@
 (defn add-role-domain
   "Add a domain to a role in the given circle."
   [circle role-name domain]
-  (add-to circle role-name :domains domain))
+  (add-to-set circle role-name :domains domain))

 (defn remove-role-domain
   "Remove a domain from a role in the given circle."
   [circle role-name domain]
-  (remove-from circle role-name :domains domain))
+  (remove-from-set circle role-name :domains domain))

 (defn add-role-accountability
   "Add an accountability to a role in the given circle."
   [circle role-name accountability]
-  (add-to circle role-name :accountabilities accountability))
+  (add-to-set circle role-name :accountabilities accountability))

 (defn remove-role-accountability
   "Remove an accountability from a role in the given circle."
   [circle role-name accountability]
-  (remove-from circle role-name :accountabilities accountability))
+  (remove-from-set circle role-name :accountabilities accountability))

 (defn add-role-policy
   "Publish a policy to grant/revoke access to a domain on the given role in
    the given circle. If you give a domain, that will be added, too."
   ([circle role-name policy-name policy-text]
-    (let [circle (if (and (is-lead-link? role-name)
-                          (role-missing? circle role-name))
-                   (add-role-to-circle circle lead-link-name)
-                   circle)]
-      (validate-things circle role-name :policies policy-name contains?
-                       "%s '%s' already exists on role '%s'")
-      (update-role-entity circle role-name [:policies] assoc policy-name
-                          {:name policy-name :text policy-text})))
+    (add-to circle role-name :policies {} assoc policy-name
+            {:name policy-name :text policy-text}))
   ([circle role-name policy-name policy-text domain]
     (let [with-added-policy (add-role-policy circle role-name policy-name
                                              policy-text)]
@@ -338,11 +362,4 @@
 (defn remove-role-policy
   "Remove a policy from a role in the given circle."
   [circle role-name policy-name]
-  (validate-things circle role-name :policies policy-name (comp not contains?)
-                   "%s '%s' doesn't exist on role '%s'")
-  (let [result
-        (remove-and-purge circle role-name :policies dissoc policy-name)]
-    (if (and (is-lead-link? role-name)
-             (empty? (get-entity result role-name :policies)))
-      (remove-role result role-name)
-      result)))+  (remove-from circle role-name :policies dissoc policy-name))


Tweak.

Tweak.

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/crispy-tatertot.git/'


Add LP solver interface + tests

Add LP solver interface + tests

error: pathspec 'src/edu/berkeley/ai/util/lp.clj' did not match any file(s) known to git

--- src/edu/berkeley/ai/util/lp.clj
+++ src/edu/berkeley/ai/util/lp.clj
@@ -0,0 +1,205 @@
+;; This file provides code to construct, modify, and solve (via external
+;; solvers) linear programming problems.
+
+;; Variables are arbitrary objects, with .equals equality semantics. (?)
+
+;; Linear combinations are represented as maps from vars to multipliers.
+
+;; Objective is just a linear combination, to be *maximized*
+
+;; Constraint set is map from linear combinations to interval vectors,
+;; i.e. [nil 3] means c <= 3, [1 2] means 1 <= c <= 2.
+
+;; Bounds is like constraints, but instead of LC have just vars.  Every
+;; var must be mentioned.  Can map to nil for unbounded.
+
+
+(ns edu.berkeley.ai.util.lp
+  (:use clojure.test [edu.berkeley.ai.util :as util])
+  (:import [java.util HashMap] [java.text DecimalFormat]))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;                               Basic Definitions
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn make-lp [bounds objective constraints]
+  {:class ::LP
+   :constraints constraints
+   :objective   objective
+   :bounds      bounds})
+
+(defn fix [obj size]
+  (.substring (str obj "                                           ") 0 size))
+
+(defn make-mps-namer
+  "Make a function that maps from .equal objects to unique MPS names."
+  [] {:forward (HashMap.) :backward (HashMap.) :count (atom 0)})
+
+(defn obj->name [namer obj]
+  (let [#^HashMap forward  (:forward namer)
+	#^HashMap backward (:backward namer)
+	count              (:count namer)]
+    (or (.get forward obj)
+      (let [n (swap! count inc)
+	    name (.substring (str n "        ") 0 8)]
+	(.put forward obj name)
+	(.put backward name obj)
+	name))))
+
+(defn name->obj [namer name]
+  (let [x (.get #^HashMap (:backward namer) name)]
+    (when-not x (throw (RuntimeException. (str name " not a defined name in LP."))))
+    x))
+
+(def *mps-dec-format* (doto (DecimalFormat. "#.#######E0") (.setPositivePrefix "+")))
+(defn encode-mps-num [n]
+  (let [s (.format #^DecimalFormat *mps-dec-format* (double n))]
+    (assert (<= (.length s) 12))
+    (.substring (str s "            ") 0 12)))
+
+
+(defn lp->mps*
+  "Turn the lp into an MPS file string.
+   Returns [mps-file-string namer var-order]"
+  [lp]
+  (let [bounds      (:bounds lp)
+	constraints (:constraints lp)
+	objective   (:objective lp)
+	namer       (make-mps-namer)
+	out         (StringBuilder.)
+	cols        (HashMap.)]
+    (.append out (str (fix "NAME" 14) "LP\n"))
+
+    (.append out "ROWS\n")
+    (.append out " N  REWARD  \n")
+    (doseq [[var mul] objective]
+      (.put cols var (cons (str "    " (obj->name namer var) "  REWARD    " (encode-mps-num mul) "\n") (.get cols var))))
+    (doseq [[c [l u]] constraints]
+      (let [c-name (obj->name namer c)]
+	(doseq [[var mul] c]
+	  (.put cols var (cons (str "    " (obj->name namer var) "  " c-name "  " (encode-mps-num mul) "\n") (.get cols var))))
+	(.append out
+		 (cond (= l u)   " E  "
+		       (and l u) " G  "
+		       l         " G  "
+		       u         " L  "
+		       :else     " N  "))
+	(.append out c-name)
+	(.append out "\n")))
+
+    (.append out "COLUMNS\n")
+    (doseq [[var var-cols] cols
+	    col var-cols]
+      (when-not (contains? bounds var) (throw (RuntimeException. (str "Undefined variable " var))))
+      (.append out #^String col))
+
+    (.append out "RHS\n")
+    (doseq [[c [l u]] constraints
+	    :when (or l u)]
+      (.append out "    RHS1      ")
+      (.append out (obj->name namer c))
+      (.append out "  ")
+      (.append out (encode-mps-num (or l u)))
+      (.append out "\n"))
+
+    (.append out "RANGES\n")
+    (doseq [[c [l u]] constraints
+	    :when (and l u (not (= l u)))]
+      (.append out "    RANGE1    ")
+      (.append out (obj->name namer c))
+      (.append out "  ")
+      (.append out (encode-mps-num (- u l)))
+      (.append out "\n"))
+
+    (.append out "BOUNDS\n")
+    (doseq [[v [l u]] bounds]
+      (if (or (.get cols v) (contains? objective v))
+       (let [v-name (obj->name namer v)]
+	(.append out
+		 (cond (not (or l u)) " FR "
+		       (= l u)        " FX "
+		       l              " LO "
+		       :else          " MI "))
+	(.append out "BOUNDS1   ")
+	(.append out v-name)
+	(.append out "  ")
+	(when l (.append out (encode-mps-num l)))
+	(.append out "\n")
+
+	(when (and (or l u) (not (= l u)))
+	  (.append out
+		   (cond u         " UP "
+			 :else     " PL "))
+	  (.append out "BOUNDS1   ")
+	  (.append out v-name)
+	  (.append out "  ")
+	  (when u (.append out (encode-mps-num u)))
+	  (.append out "\n")))
+       (println "Warning: skipping variable" v [l u] "which does not appear in obj or constraints.")))
+
+    (.append out "ENDATA\n")
+    [(.toString out) namer (keys cols)]))
+
+;; glpk gives us back
+; n-rows n-cols
+; stat stat rew   (stat = 1 for unsolvable, 2 for solvable ??)
+; ROWS (bla bla bla)
+; COLS (status val marginal?)
+
+(defn solve-lp-glpk
+  "Solve the LP and return [var-binding-map sol-max-reward].  Returns nil for infeasible.
+   Requrires GLPK (gnu LP solver kit) on the path."
+  [lp]
+  (let [[mps-file-data namer var-order] (lp->mps* lp)
+	in-file (util/fresh-filename "/tmp/lp")
+	out-file (str in-file ".out")]
+    (util/spit in-file mps-file-data)
+    (util/sh "glpsol" "--max" "-w" out-file "--mps" in-file)
+    (let [[[rows cols] [stat1 stat2 rew] & body] (map #(read-string (str "[" % "]")) (util/read-lines out-file))]
+      (cond (= stat1 stat2 1) nil ;infeasible
+	    (= stat1 stat2 2) ; solved
+	      [(into {} (map (fn [[status val marginal] var] [var val]) (drop rows body) var-order)) rew]
+	    :else ;huh?
+	      (throw (RuntimeException. (str "Unknown result statuses from glpk: " stat1 " "  stat2)))
+	      ))))
+
+
+(defn solve-lp-clp
+  "Solve the LP and return [var-binding-map sol-max-reward].  Returns nil for infeasible.
+   Requrires CLP (COIN_OR LP solver) on the path."
+  [lp]
+  (let [[mps-file-data namer var-order] (lp->mps* lp)
+	in-file (util/fresh-filename "/tmp/lp")
+	out-file (str in-file ".out")]
+    (util/spit in-file mps-file-data)
+    (util/sh "clp" "-max" "-import" in-file "-solve" "-solution" out-file)
+    (let [[[status] [obj val rew] & body] (map #(read-string (str "[" % "]")) (util/read-lines out-file))]
+      (assert (is (= [obj val] '[Objective value])))
+      (cond ;(= stat1 stat2 1) nil ;infeasible
+	    (= status 'optimal)
+	      [(into {} (map (fn [[_ _ val _] var] [var val]) body var-order)) (- rew)]
+	      ;; NOTE negation of reward due to apparent bug in CLP's handling of max.
+	    :else ;huh?
+	      (throw (RuntimeException. (str "Unknown result statuses from clp: " status)))
+	      ))))
+
+
+
+
+
+(def *wiki-lp*
+     (make-lp {:xone [nil 4] :ytwo [-1 1] :zthree nil}
+	      {:xone 1 :ytwo 4 :zthree 9}
+	      {{:xone 1 :ytwo 1} [nil 5] {:xone 1 :zthree 1} [10 nil] {:ytwo -1 :zthree 1} [7 7]}))
+(def *wiki-lp-sol* [{:ytwo 1, :zthree 8, :xone 4} 80])
+
+(deftest test-glpk
+  (is (= (solve-lp-glpk *wiki-lp*) *wiki-lp-sol*)))
+
+(deftest test-clp
+  (is (= (solve-lp-clp *wiki-lp*) *wiki-lp-sol*)))
+
+;; Wikipedia example
+;; (println (lp->mps (make-lp {:xone [nil 4] :ytwo [-1 1] :zthree nil} {:xone 1 :ytwo 4 :zthree 9} {{:xone 1 :ytwo 1} [nil 5] {:xone 1 :zthree 1} [10 nil] {:ytwo -1 :zthree 1} [7 7]})))
+


Stub for the module irc_bot.clj

Stub for the module irc_bot.clj

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

--- src/emender_jenkins/irc_bot.clj
+++ src/emender_jenkins/irc_bot.clj
@@ -0,0 +1,16 @@
+;
+;  (C) Copyright 2016  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns emender-jenkins.irc-bot)
+
+(require '[irclj.core :as irc])
+


Without animations

Without animations

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/just-cloud/uxtweet-client.git/'


Hiru erabiltzaile gehitu

Hiru erabiltzaile gehitu


fixing a failing unit test on Windows

fixing a failing unit test on Windows

The test did not take into account that the resolution of HTTP-date used in the last-modified HTTP header has a presision of one second while the .lastModified property of a file has millisecond precision.

--- test/yada/file_resource_test.clj
+++ test/yada/file_resource_test.clj
@@ -34,7 +34,8 @@
   (let [resource (io/file "test/yada/state/test.txt")
         handler (yada resource)
         request (request :get "/")
-        response @(handler request)]
+        response @(handler request)
+        last-modified-second-precision (parse-date (format-date (java.util.Date. (.lastModified resource))))]

     (testing "expectations of set-up"
       (is (exists? resource))
@@ -49,7 +50,7 @@

     (testing "last-modified"
       (let [d (get-in response [:headers "last-modified"])]
-        (is (= (java.util.Date. (.lastModified resource)) (parse-date d)))))
+        (is (= last-modified-second-precision (parse-date d)))))

     (testing "conditional-response"
       (let [r @(handler (assoc-in request [:headers "if-modified-since"]


got the stats

got the stats

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/burner-432e4b5d76/scrapefruit.git/'


Coerce Joda time obj to j.u.Date obj

Coerce Joda time obj to j.u.Date obj

...in voter-info data timestamp so it serializes to an #inst in EDN.

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/'


Update test to mock latest-reg-status

Update test to mock latest-reg-status


CMR-4212: Updated db migration to change variable_name to VARCHAR(80) NOT NULL in cmr_variables table.

error: pathspec 'metadata-db-app/src/migrations/056_update_variable_name_length.clj' did not match any file(s) known to git

--- metadata-db-app/src/migrations/056_update_variable_name_length.clj
+++ metadata-db-app/src/migrations/056_update_variable_name_length.clj
@@ -0,0 +1,17 @@
+(ns migrations.056-update-variable-name-length
+  (:require
+   [config.mdb-migrate-helper :as h]))
+
+(defn up
+  "Migrates the database up to version 56."
+  []
+  (println "migrations.056-update-variable-name-length up...")
+  (h/sql "alter table METADATA_DB.cmr_variables modify variable_name VARCHAR(80) NOT NULL"))
+
+
+(defn down
+  "Migrates the database down from version 56."
+  []
+  (println "migrations.056-update-variable-name-length down...")
+  ;; We don't want to roll back the length change
+  (h/sql "alter table METADATA_DB.cmr_variables modify variable_name VARCHAR(80) NULL"))


Only add headers if they are present

Only add headers if they are present

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/notification-works.git/'


refactore: remove unused code

refactore: remove unused code

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/demas/cowl.git/'


adding reporter as module

adding reporter as module

error: pathspec 'trackit-riemann/project.clj' did not match any file(s) known to git

--- trackit-riemann/project.clj
+++ trackit-riemann/project.clj
@@ -0,0 +1,12 @@
+(defproject samsara/trackit-riemann (-> "../trackit.version" slurp .trim)
+
+  :description
+  "TRACKit! A Clojure developer friendly wrapper for Yammer's Metrics library."
+
+  :url "https://github.com/samsara/trackit"
+
+  :license {:name "Apache License 2.0"
+            :url "http://www.apache.org/licenses/LICENSE-2.0"}
+
+  :dependencies [[com.aphyr/riemann-java-client "0.4.1"]
+                 [com.aphyr/metrics3-riemann-reporter "0.4.1"]])


Better naming.

Better naming.

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/'


add election id so we can look up electorate on update


[TH DG] declare events topic, notification queue


paren closing weirdness

paren closing weirdness


Module containing DB specification

Module containing DB specification

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

--- src/emender_service/db_spec.clj
+++ src/emender_service/db_spec.clj
@@ -0,0 +1,21 @@
+;
+;  (C) Copyright 2016  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns emender-service.db-spec
+    "Namespace that contains configuration of all JDBC sources.")
+
+(def emender-service-db
+    {:classname   "org.sqlite.JDBC"
+     :subprotocol "sqlite"
+     :subname     "emender-service.db"
+    })
+


add twitter.clj

add twitter.clj

error: pathspec 'src/ghostly/momonga/twitter.clj' did not match any file(s) known to git

--- src/ghostly/momonga/twitter.clj
+++ src/ghostly/momonga/twitter.clj
@@ -0,0 +1,43 @@
+(ns ghostly.momonga.twitter
+  (:import (twitter4j Status
+                      Twitter
+                      TwitterException
+                      TwitterFactory)
+           (twitter4j.auth AccessToken
+                           RequestToken)))
+
+(def *twitter* (TwitterFactory/getSingleton))
+
+
+(defn post [msg]
+  (.updateStatus *twitter* msg))
+
+
+(defn home-timeline
+  ([]
+     (.getHomeTimeline *twitter*))
+  ([pg]
+     (.getHomeTimeline *twitter* pg)))
+
+
+(defn friends-timeline
+  ([]
+     (.getFriendsTimeline *twitter*))
+  ([pg]
+     (.getFriendsTimeline *twitter* pg)))
+
+
+(defn make-paging [& {page :page cnt :count since-id :since-id max-id :max-id}]
+  (cond
+   ((every? nil? [page cnt since-id max-id])
+    (Paging.))
+   ((every? nil? [cnt since-id max-id])
+    (Paging. page))
+   ((every? nil? [since-id max-id])
+    (Paging. page cnt))
+   ((nil? max-id)
+    (Paging. page cnt since-id))
+   ((every? nil? [cnt max-id])
+    (Paging. page since-id)
+    (:else
+     (Paging. page cnt since-id max-id)))))


Adds blank test file.

Adds blank test file.

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

--- test/essay/core_test.clj
+++ test/essay/core_test.clj
@@ -0,0 +1,7 @@
+(ns essay.core-test
+  (:require [clojure.test :refer :all]
+            [essay.core :refer :all]))
+
+(deftest a-test
+  (testing "FIXME, I fail."
+    (is (= 0 1))))


Implement full Context protocol in Reader type constructor

--- src/cljx/cats/monad/reader.cljx
+++ src/cljx/cats/monad/reader.cljx
@@ -36,8 +36,8 @@

 (deftype Reader [mfn]
   proto/Context
-  (get-context [_]
-    reader-monad)
+  (get-context [_] reader-monad)
+  (get-value [_] mfn)

   #+clj  clojure.lang.IFn
   #+cljs cljs.core/IFn


Add stub for sieve

Add stub for sieve

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

--- exercises/sieve/src/sieve.clj
+++ exercises/sieve/src/sieve.clj
@@ -0,0 +1,5 @@
+(ns sieve)
+
+(defn sieve [] ;; <- Arglist goes here
+      ;; your code goes here
+      )


delete; start reimplement

delete; start reimplement

fatal: remote error: upload-pack: not our ref cea276442cf0c4a3a176cebec86f14fa47d3934d
fatal: the remote end hung up unexpectedly


Added print in core.clj respond method

Added print in core.clj respond method

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/OttoJursch/sched-system.git/'


first pass at joins

first pass at joins

Signed-off-by: Chris Granger <5654cde260ae99bc4d30054171b8bcd902efd19a@gmail.com>

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

--- src/aurora/join.cljs
+++ src/aurora/join.cljs
@@ -0,0 +1,201 @@
+(ns aurora.join
+  (:require [aurora.btree :refer [tree iterator key-lt key-lte key-gt key-gte]])
+  (:require-macros [aurora.macros :refer [typeof]]))
+
+(defn lt [a b]
+  (if (== a nil)
+    false
+    (or (and (identical? (typeof a) (typeof b))
+             (< a b))
+        (< (typeof a) (typeof b)))))
+
+(defn filled-key-compare [as bs fill]
+  (let [as-len (alength as)
+        bs-len (alength bs)]
+    (assert (== as-len bs-len) (pr-str as bs))
+    (loop [i 0]
+      (if (< i as-len)
+        (let [a (aget as i)
+              b (aget bs i)
+              a (if (nil? a)
+                  (aget fill i)
+                  a)
+              b (if (nil? b)
+                  (aget fill i)
+                  b)]
+          (if (identical? a b)
+            (recur (+ i 1))
+            (if (or (and (identical? (typeof a) (typeof b))
+                         (< a b))
+                    (< (typeof a) (typeof b)))
+              bs
+              as)))
+        as))))
+
+(defn fill! [as fill]
+  (dotimes [ix (alength as)]
+    (aset as ix (or (aget as ix) (aget fill ix))))
+  as)
+
+(deftype MagicIterator [iterator map map-len ^:mutable cur-key ^:mutable cur-seek ^:mutable marked]
+  Object
+  (mark [this]
+        (set! marked node))
+  (rewind [this]
+          (set! (.-node iterator) marked)
+          (set! (.-ix iterator) 0)
+          (set! (.-end? iterator) false))
+  (key [this]
+       (.-cur-key this))
+  (val [this]
+       (.val iterator))
+  (next [this]
+        (.next iterator)
+        (.set-key this))
+  (set-key [this ]
+           (when-let [found (.key iterator)]
+             (loop [ix 0]
+               (when (< ix map-len)
+                 (let [map-ix (aget map ix)]
+                   (if-not (nil? map-ix)
+                     (aset cur-key ix (aget found map-ix))
+                     (aset cur-key ix nil)))
+                 (recur (inc ix))))))
+  (seek [this key]
+        (loop [ix 0]
+          (when (< ix map-len)
+            (let [map-ix (aget map ix)]
+              (when-not (== map-ix nil)
+                (aset cur-seek map-ix (aget key ix))))
+            (recur (inc ix))))
+        (.seek iterator cur-seek)
+        (.set-key this)
+        ))
+
+(deftype MagicIteratorWrapper [iterator map ^:mutable marked]
+  Object
+  (mark [this]
+        (set! marked node))
+  (rewind [this]
+          (set! (.-node iterator) marked)
+          (set! (.-ix iterator) 0)
+          (set! (.-end? iterator) false))
+  (key [this]
+       (.key iterator))
+  (val [this]
+       (.val iterator))
+  (next [this]
+        (.next iterator))
+  (seek [this key]
+        (.seek iterator key)))
+
+(defn ->keys [iterators keys len]
+  (dotimes [x len]
+    (aset keys x (.key (aget iterators x)))))
+
+(defn find-least [keys len tuple-len min-fill]
+  (loop [ix 1
+         col 0
+         least (-> (aget keys 0)
+                   (aget 0))]
+    (if (>= ix len)
+      (do
+        (aset min-fill col least)
+        (let [next (inc col)]
+          (if (< next tuple-len)
+            (recur 0 next nil))))
+      (let [cur (-> (aget keys ix)
+                    (aget col))]
+        (recur (inc ix) col (if (lt cur least)
+                              cur
+                              least))))))
+
+(let [fill (array)]
+  (find-least #js [#js [0 1 2] #js [nil 1 4] #js [nil 0 3]] 3 3 fill)
+  (find-least #js [#js [0 1 2] #js [8 nil 10] #js [nil 9 10]] 3 3 fill)
+  fill)
+
+(defn find-greatest [iterators keys len results min-fill]
+  (loop [ix 1
+         greatest (aget keys 0)
+         found? true]
+    (if (>= ix len)
+      (if found?
+        (let [root (aget iterators 0)]
+          (.push results (.slice greatest 0))
+          (.next root)
+          (.key root))
+        greatest)
+      (let [comped (filled-key-compare greatest (aget keys ix) min-fill)]
+        (println "greatest: " comped (identical? comped greatest))
+        (recur (inc ix) comped (and found? (identical? comped greatest)))))))
+
+(defn magic-iterator
+  ([tree] (let [itr (iterator tree)]
+            (MagicIteratorWrapper. itr (.key itr) (.-root tree))))
+  ([tree map]
+   (let [itr (MagicIterator. (iterator tree) map (alength map) (array) (array) (.-root tree))]
+     (.set-key itr)
+     itr)))
+
+(defn seek-all [iterators len key]
+  (loop [ix 0]
+    (if (< ix len)
+      (let [cur (aget iterators ix)
+            cur-key (.key cur)]
+        (when (key-lt cur-key key)
+          (.seek cur key))
+        (when-not (.-end? cur)
+          (recur (inc ix))))
+      true)))
+
+(defn join [iterators]
+  ;;TODO: iterators have to be in order
+  ;;TODO: not resetting yet
+  (let [len (alength iterators)
+        results (array)
+        keys (array)
+        min-fill (array)
+        tuple-len (alength (.-map (aget iterators 0)))
+        start (let [arr (array)]
+                (dotimes [x tuple-len]
+                  (.push arr false))
+                arr)]
+    (loop [key start]
+      (when key
+        (println "key: " key)
+        (when (seek-all iterators len key)
+          (->keys iterators keys len)
+          (println keys)
+          (find-least keys len tuple-len min-fill)
+          (println "Min: " min-fill)
+          (recur (find-greatest iterators keys len results min-fill)))))
+    results
+    ))
+
+(comment
+
+  (let [tree1 (tree 10)
+        _ (dotimes [i 10]
+            (let [i (+ i 0)]
+              (.assoc! tree1 #js [i (+ i 1) (+ i 2)] (* 2 i))))
+        tree2 (tree 10)
+        _ (dotimes [i 10]
+            (let [i (+ i 7)]
+              (.assoc! tree2 #js [i (+ i 2)] (* 2 i))))
+        tree3 (tree 10)
+        _ (dotimes [i 10]
+            (let [i (+ i 8)]
+              (.assoc! tree3 #js [(+ i 1) (+ i 2)] (* 2 i))))
+        itr1 (magic-iterator tree1)
+        itr2 (magic-iterator tree2 #js [0 nil 1])
+        itr3 (magic-iterator tree3 #js [nil 0 1])
+        ]
+    ;(.seek itr2 #js [0 0 0])
+    ;(.key itr2)
+    (println tree1)
+    (println tree2)
+    (println tree3)
+    (join #js [itr1 itr2 itr3])
+    ))
+


Add debugging components

Add debugging components

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

--- src/cljs/hacker_agent/debug.cljs
+++ src/cljs/hacker_agent/debug.cljs
@@ -0,0 +1,46 @@
+(ns hacker-agent.debug
+  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
+  (:require [reagent.core :as r :refer [atom]]
+            [clojure.set :as set]
+            [clojure.data :as data]
+            [secretary.core :as secretary :include-macros true]
+            [goog.events :as events]
+            [goog.history.EventType :as EventType]
+            [weasel.repl :as ws-repl]
+            [cljs.core.async :as async :refer [put! chan <! >! close!]]
+            [hacker-agent.utils :as utils]))
+
+(defonce debug-chan (chan))
+
+(declare field field-list)
+
+(defn debug-view [state]
+  [:div.console
+   [:h4 "Debug Console"]
+   [field-list @state]])
+
+(defn field [field]
+  (let [collapse? (atom true)]
+    (fn [field]
+      (let [[k v] field]
+        [:div
+         [:p [:b (when-not @collapse?
+                   {:on-click #(reset! collapse? true)
+                    :style {:cursor :pointer
+                            :text-decoration :underline}})
+              (clj->js k)]
+          ": "
+          (if @collapse?
+            (if (map? v)
+              [:span {:on-click #(reset! collapse? false)
+                      :style {:cursor :pointer}}
+               "Object"]
+              (clj->js v))
+            (if (map? v)
+              [field-list v]
+              (clj->js v)))]]))))
+
+(defn field-list [fields]
+  [:ul
+   (for [f (into (sorted-map) fields)]
+     ^{:key (key f)} [:li [field f]])])


Decoupling this decorator concept from strings only

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/'


expansion of recursive-defined ValueSets

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/fhirbase/fhirterm.git/'


println-a kendu

println-a kendu

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.bez.git/'


Lein ancient to find out of date deps

Lein ancient to find out of date 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/scott-abernethy/dot-files.git/'


Add a thread safe printer

Add a thread safe printer

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

--- src/detritus/printer.clj
+++ src/detritus/printer.clj
@@ -0,0 +1,44 @@
+(ns detritus.printer)
+
+(def print-thread-factory
+  (fn [atom writer]
+    {:pre [(instance? clojure.lang.Atom atom)
+           (instance? java.io.PrintWriter writer)]}
+    (Thread.
+     (fn []
+       (loop []
+         (let [buff @atom
+               _    (swap! atom #(drop-last (count buff) %))]
+           (if buff
+             (doseq [e (reverse buff)]
+               (.println writer e))
+             (Thread/yield))
+           (recur)))))))
+
+(defn ->Printer [writer]
+  (let [a (atom nil)]
+    [:printer
+     {:thread (print-thread-factory a writer)
+      :buffer a}]))
+
+(defn printer? [x]
+  (and (vector? x)
+       (= :printer (first x))
+       (map? (second x))
+       (let [m (second x)]
+         (and (instance? java.lang.Thread (:thread m))
+              (instance? clojure.lang.Atom (:buffer m))))))
+
+(defn start! [printer]
+  {:pre [(printer? printer)]}
+  (.start (:thread (second printer))))
+
+(defn stop! [printer]
+  {:pre [(printer? printer)]}
+  (.stop (:thread (second printer))))
+
+(defn p! [printer & xs]
+  {:pre [(printer? printer)]}
+  (let [t (Thread/currentThread)
+        s (format  "%s %s" t (apply print-str xs))]
+    (swap! (:buffer (second printer)) conj s)))


Got started on our attache namespace to reprepsent our external endpoints.

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

--- src/attache.clj
+++ src/attache.clj
@@ -0,0 +1,18 @@
+(ns attache)
+
+(def endpoints
+  {:moodle {:format :json
+            :http-method :post}
+   :moodle {:format :json :post}})
+
+;;; Two-level hash map with the first level key being an endpoint and the
+;;; second level key is the flare event that is being transformed. All values
+;;; should be fns that take a single argument, a payload for the specified
+;;; event.
+(def outgoing-transformations
+  {:moodle {:flare.event/flare.ping identity}
+   :showevidence {:flare.event/flare.ping identity}})
+
+;;; ??
+(def incoming-transformations
+  {})


Add stub for strain

Add stub for strain

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

--- exercises/strain/src/strain.clj
+++ exercises/strain/src/strain.clj
@@ -0,0 +1,9 @@
+(ns strain)
+
+(defn retain [] ;; <- Arglist goes here
+      ;; your code goes here
+      )
+
+(defn discard [] ;; <- Arglist goes here
+  ;; your code goes here
+  )


Added alias

Added alias

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/skprasadu/crud-ui-framework.git/'


Новый компонент - контейнер вертикального перелистывания

error: pathspec 'radiolamp-6P3S/src/r6p3s/cpt/carousel_layout.cljs' did not match any file(s) known to git

--- radiolamp-6P3S/src/r6p3s/cpt/carousel_layout.cljs
+++ radiolamp-6P3S/src/r6p3s/cpt/carousel_layout.cljs
@@ -0,0 +1,49 @@
+(ns r6p3s.cpt.carousel-layout
+  (:require [cljs.core.async :refer [put! chan <!]]
+            [om.core :as om :include-macros true]
+            [om.dom :as dom :include-macros true]
+            [r6p3s.core :as c]
+            [r6p3s.ui.button :as button]
+            [r6p3s.ui.glyphicon :as glyphicon]))
+
+
+(def app-init
+  {:active 0})
+
+
+(defn component [app own {:keys [pages content-vec] :as opts
+                          :or   {pages       1
+                                 content-vec [(dom/h1 nil "1")
+                                              (dom/h2 nil "2")]}}]
+  (reify
+
+    om/IRenderState
+    (render-state [_ {:keys [chan-update]}]
+      (dom/div
+       #js {:className ""
+            :style     #js {:padding 0}}
+
+       (->> content-vec
+            (map-indexed (fn [i element]
+                           (dom/div #js {:style #js {:display
+                                                     (if (= (:active @app) i)
+                                                       "" "none") }}
+                                    element)))
+            (apply dom/div #js {:className "col-xs-11 col-sm-11 col-md-11 col-lg-11"
+                                :style     #js {:padding 0}}))
+
+       (dom/div #js {:className "col-xs-1 col-sm-1 col-md-1 col-lg-1"
+                     :style     #js {:paddingLeft 4}}
+                (button/render {:text     (glyphicon/render "chevron-up")
+                                :on-click (fn []
+                                            (om/transact!
+                                             app :active
+                                             #(let [i (dec %)]
+                                                (if (< i 0) (dec pages) i))))})
+                (button/render {:text     (glyphicon/render "chevron-down")
+                                :style     #js {:marginTop 4}
+                                :on-click (fn []
+                                            (om/transact!
+                                             app :active
+                                             #(let [i (inc %)]
+                                                (if (<= pages i) 0 i))))}))))))


https must be used

https must be used

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/meandor/aim-pipeline.git/'


Add a doctopus_test file

Add a doctopus_test file

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

--- test/doctopus/doctopus_test.clj
+++ test/doctopus/doctopus_test.clj
@@ -0,0 +1,3 @@
+(ns doctopus.doctopus-test
+  (:require [doctopus.doctopus :refer :all]
+            [clojure.test :refer :all]))


fix test

fix 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/B2W-BIT/restQL-server.git/'


Model test for retrieving items.

Model test for retrieving items.

error: pathspec 'test/webdev/item/model_test.clj' did not match any file(s) known to git

--- test/webdev/item/model_test.clj
+++ test/webdev/item/model_test.clj
@@ -0,0 +1,36 @@
+(ns webdev.item.model-test
+  (:require [clojure.test :refer :all]
+            [clojure.java.jdbc :as jdbc]
+            [webdev.item.model :as model]))
+
+(def db "jdbc:postgresql://localhost/webdev")
+
+(defn db-fixture [f]
+  (model/create-table "jdbc:postgresql://localhost/webdev")
+  (f))
+
+(use-fixtures :once db-fixture)
+
+(deftest read-items-test
+  (testing "returns correct columns"
+    (let [expected '(:date_created :checked :description :name :id)]
+      (jdbc/with-db-transaction
+        [transaction db]
+        (jdbc/db-set-rollback-only! transaction)
+        (jdbc/insert!
+          transaction :items
+          {:name "Test" :description "A test item."})
+        (is (= expected (keys (first (model/read-items transaction))))))))
+
+  (testing "returns items sorted by date created"
+    (let [expected '("First" "Second" "Third" "Fourth")]
+      (jdbc/with-db-transaction
+        [transaction db]
+        (jdbc/db-set-rollback-only! transaction)
+        (jdbc/insert!
+          transaction :items
+          {:name "Fourth" :date_created (java.sql.Timestamp/valueOf "2014-12-31 10:23:54") :description "This should be the fourth item."}
+          {:name "Third" :date_created (java.sql.Timestamp/valueOf "2014-12-25 10:23:54") :description "This should be the third item."}
+          {:name "First" :date_created (java.sql.Timestamp/valueOf "2014-12-19 10:23:54") :description "This should be the first item."}
+          {:name "Second" :date_created (java.sql.Timestamp/valueOf "2014-12-21 10:23:54") :description "This should be the second item."})
+        (is (= expected (map :name (model/read-items transaction))))))))


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/sharkspeed/dororis.git/'


Add simple integration test for system startup/shutdown

error: pathspec 'test/integration/braid/system_start_stop_test.clj' did not match any file(s) known to git

--- test/integration/braid/system_start_stop_test.clj
+++ test/integration/braid/system_start_stop_test.clj
@@ -0,0 +1,7 @@
+(ns integration.braid.system-start-stop-test
+  (:require [braid.core :refer :all]
+            [clojure.test :refer :all]))
+
+(deftest start-stop
+  (is (start! 0))
+  (is (stop!)))


xml to hdm config parser

xml to hdm config parser

error: pathspec 'src/clj_hypergraph_db/xml_parser/xml_to_hdm_config_parser.clj' did not match any file(s) known to git

--- src/clj_hypergraph_db/xml_parser/xml_to_hdm_config_parser.clj
+++ src/clj_hypergraph_db/xml_parser/xml_to_hdm_config_parser.clj
@@ -0,0 +1,51 @@
+(ns clj_hypergraph_db.xml_parser.xml_to_hdm_config_parser
+  (:require [clj_hypergraph_db.common_parser.common_config_parser :refer :all]))
+
+
+(defn foreach
+  [path & body]
+  (def-item :foreach
+            :path path
+            :body body))
+
+
+(defn in
+  [path & body]
+  (def-item :in
+            :path path
+            :body body))
+
+
+(defn as
+  [alias path]
+  (def-item :alias
+            :alias alias
+            :path path))
+
+
+(defn add-instance
+  [name & mappings]
+  (def-item :add-instance
+            :name name
+            :mappings mappings))
+
+
+(defn add-association
+  [name & mappings]
+  (def-item :add-association
+            :name name
+            :mappings mappings))
+
+
+(defn mapping
+  [path name]
+  (def-item :mapping
+            :path path
+            :name name))
+
+
+(defn mapping-pk
+  [path name]
+  (def-item :mapping-pk
+            :path path
+            :name name))


get rid of filter-response method in http-utility namespace; was only wrapper for incremental-keyword-lookup and had no function of its own

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/'


remove completed todo

remove completed todo

--- src/clj/backtype/storm/daemon/executor.clj
+++ src/clj/backtype/storm/daemon/executor.clj
@@ -333,7 +333,6 @@
         sampler (:sampler executor-data)
         rand (Random. (Utils/secureRandomLong))

-        ;; TODO: need to change this to use a rotating map
         pending (RotatingMap.
                  2 ;; microoptimize for performance of .size method
                  (reify RotatingMap$ExpiredCallback


binary > dec

binary > dec

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

--- clojure/binary/binary.clj
+++ clojure/binary/binary.clj
@@ -0,0 +1,20 @@
+(ns binary)
+
+(defn- char->int
+  "parses char as int, defaulting to 0"
+  [c]
+  (try
+    (Integer/parseInt (str c))
+    (catch NumberFormatException _ 0)))
+
+(defn- positional-val
+  "c * 2^i"
+  [i c]
+  (* (char->int c)
+     (int (Math/pow 2 i))))
+
+(defn to-decimal
+  "converts a binary string (1010101) to decimal representation"
+  [[& cs]]
+  (reduce +
+          (map-indexed positional-val (reverse cs))))


Update tests to match changes

Update tests to match changes

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/vote-by-mail-works.git/'


Add documentation to webjars-route-pair

Add documentation to webjars-route-pair

--- ext/webjars/src/yada/resources/webjar_resource.clj
+++ ext/webjars/src/yada/resources/webjar_resource.clj
@@ -61,7 +61,14 @@
                           (as-resource res))))})))

 (defn webjars-route-pair
-  ""
+  "Creates webjar resources for all webjars on the active classpath.
+
+  An options map can be provided and will be passed on to the
+  new-webjar-resource call for every webjar.
+
+  Each webjar will be put on a path corresponding to its name. For
+  example, a webjar called \"bootstrap\" will be accessible from the
+  \"/bootstrap/\" path."
   ([] (webjars-route-pair nil))
   ([options]
    (let [webjars (->> (WebJarAssetLocator.)