remove path crap

remove path crap

--- labs/architecture-examples/om/src/todomvc/app.cljs
+++ labs/architecture-examples/om/src/todomvc/app.cljs
@@ -53,16 +53,14 @@
                       :onChange #(toggle-all % app)
                       :checked (every? #(:completed %) todos)})
       (dom/ul #js {:id "todo-list"}
-        (into-array
-          (map #(om/build item/todo-item app
-                  {:path [:todos %] :opts opts :key :id
-                   :fn (fn [todo]
-                         (cond-> (assoc todo :order %)
-                           (= (:id todo) (:editing opts))
-                           (assoc :editing true)
-                           (not (visible? todo showing))
-                           (assoc :hidden true)))})
-            (range (count (:todos app)))))))))
+        (om/build-all item/todo-item todos
+          {:opts opts :key :id
+           :fn (fn [todo]
+                 (cond-> todo
+                   (= (:id todo) (:editing opts))
+                   (assoc :editing true)
+                   (not (visible? todo showing))
+                   (assoc :hidden true)))})))))

 (defn footer [{:keys [showing todos]} opts]
   (let [{:keys [count completed comm]} opts
@@ -167,9 +165,9 @@
                    :placeholder "What needs to be done?"
                    :onKeyDown #(handle-new-todo-keydown % app owner)})
             (om/build main app
-              {:path [] :opts {:comm comm :editing (:editing app)}})
+              {:opts {:comm comm :editing (:editing app)}})
             (om/build footer app
-              {:path [] :opts {:count active :completed completed :comm comm}})))))))
+              {:opts {:count active :completed completed :comm comm}})))))))

 (om/root app-state todo-app (.getElementById js/document "todoapp"))


Tmp rule to debug strange exception

Tmp rule to debug strange exception

error: pathspec 'resources/rules/pre_identifier_merge/post_ice_rdf_load/tmp/root_property_identifier_gen.clj' did not match any file(s) known to git

--- resources/rules/pre_identifier_merge/post_ice_rdf_load/tmp/root_property_identifier_gen.clj
+++ resources/rules/pre_identifier_merge/post_ice_rdf_load/tmp/root_property_identifier_gen.clj
@@ -0,0 +1,27 @@
+;; --------------------------------------------------------
+;; --------- Top-Level Object Property Assignment ---------
+;; --------------------------------------------------------
+`{:name "root-property-identifier-gen"
+  :description "This rule creates an identifier for each top-level object property and types it as a top-level object property identifier (IAO_EXT_0000308)"
+  :head ((?/id rdf/type ccp/IAO_EXT_0000308) ;; CCP:top-level_object_property_identifer
+         (?/id obo/IAO_0000219 ?/top_level_property)) ; IAO:denotes
+  :reify ([?/id {:ln (:localname ?/top_level_property)
+                 :ns "ccp" :prefix "" :suffix ""}])
+  :sparql-string "prefix oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>
+                  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                  prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                  prefix owl: <http://www.w3.org/2002/07/owl#>
+  select ?top_level_property {
+                              ?top_level_property rdf:type owl:ObjectProperty .
+                              minus{?top_level_property rdfs:subPropertyOf ?class}
+                              minus{?top_level_property owl:deprecated true}
+                              # exclude the oboInOwl:ObsoleteProperty property
+                              filter (?top_level_property != oboInOwl:ObsoleteProperty)
+                              # exclude ICE world properties (IAO, CCP extension ontology, OA ontology)
+                              filter (!contains (str(?top_level_property), 'http://www.w3.org/2000/01/rdf-schema#member'))
+                              filter (!contains (str(?top_level_property), ' http://www.w3.org/ns/prov'))
+                              filter (!contains (str(?top_level_property), 'ext/IAO_'))
+                              filter (!contains (str(?top_level_property), 'obo/IAO_'))
+                              filter (!contains (str(?top_level_property), 'http://www.w3.org/ns/oa#'))
+}"
+}


A place to gather todos

A place to gather todos

error: pathspec 'test/structural_typing/todo/f_traversing_very_broken_structures.clj' did not match any file(s) known to git

--- test/structural_typing/todo/f_traversing_very_broken_structures.clj
+++ test/structural_typing/todo/f_traversing_very_broken_structures.clj
@@ -0,0 +1,13 @@
+(ns structural-typing.todo.f-traversing-very-broken-structures
+  (:use structural-typing.type
+        structural-typing.global-type)
+  (:use midje.sweet structural-typing.assist.testutil))
+
+(start-over!)
+
+(future-fact "traversing integers and the like"
+  (type! :KeysAlone :x :y)
+  (check-for-explanations :KeysAlone 1) =future=> "something about being unable to traverse path"
+  )
+
+(start-over!)


CMR-353: Added granule search by readable_granule_name.

error: pathspec 'test/cmr/system_int_test/search/granule_search_readable_granule_name_test.clj' did not match any file(s) known to git

--- test/cmr/system_int_test/search/granule_search_readable_granule_name_test.clj
+++ test/cmr/system_int_test/search/granule_search_readable_granule_name_test.clj
@@ -0,0 +1,76 @@
+(ns cmr.system-int-test.search.granule-search-readable-granule-name-test
+  "Integration tests for searching by readable granule name"
+  (:require [clojure.test :refer :all]
+            [cmr.system-int-test.utils.ingest-util :as ingest]
+            [cmr.system-int-test.utils.search-util :as search]
+            [cmr.system-int-test.utils.index-util :as index]
+            [cmr.system-int-test.data2.collection :as dc]
+            [cmr.system-int-test.data2.granule :as dg]
+            [cmr.system-int-test.data2.core :as d]))
+
+(use-fixtures :each (ingest/reset-fixture "CMR_PROV1"))
+
+(deftest search-by-producer-granule-id
+  (let [coll1 (d/ingest "CMR_PROV1" (dc/collection {}))
+        coll2 (d/ingest "CMR_PROV1" (dc/collection {}))
+        gran1 (d/ingest "CMR_PROV1" (dg/granule coll1 {:granule-ur "Granule1"
+                                                       :producer-gran-id "SpecialOne"}))
+        gran2 (d/ingest "CMR_PROV1" (dg/granule coll1 {:granule-ur "Granule2"
+                                                       :producer-gran-id "SpecialTwo"}))
+        gran3 (d/ingest "CMR_PROV1" (dg/granule coll1 {:granule-ur "SpecialOne"
+                                                       :producer-gran-id "NotSoSpecial"}))
+        gran4 (d/ingest "CMR_PROV1" (dg/granule coll2 {:granule-ur "Granule44"
+                                                       :producer-gran-id "SuperSpecial"}))
+        gran5 (d/ingest "CMR_PROV1" (dg/granule coll2 {:granule-ur "SuperSpecial"
+                                                       :producer-gran-id "Granule2"}))]
+    (index/flush-elastic-index)
+    (testing "search by non-existent readable granule name."
+      (let [references (search/find-refs :granule {:readable_granule_name "NON_EXISTENT"})]
+        (is (d/refs-match? [] references))))
+    (testing "search by existing readable granule name matching granule-ur."
+      (let [references (search/find-refs :granule {:readable_granule_name "Granule1"})]
+        (is (d/refs-match? [gran1] references))))
+    (testing "search by existing readable granule name matching producer-granule-id"
+      (let [references (search/find-refs :granule {:readable_granule_name "SpecialTwo"})]
+        (is (d/refs-match? [gran2] references))))
+    (testing "search by multiple readable granule names."
+      (let [references (search/find-refs :granule {"readable_granule_name[]" ["Granule1", "Granule2"]})]
+        (is (d/refs-match? [gran1 gran2 gran5] references))))
+    (testing "search by readable granule name using wildcard *."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name "Gran*"
+                                          "options[readable_granule_name][pattern]" "true"})]
+        (is (d/refs-match? [gran1 gran2 gran4 gran5] references))))
+    (testing "search by readable granule name using wildcard ?."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name "Granule?"
+                                          "options[readable_granule_name][pattern]" "true"})]
+        (is (d/refs-match? [gran1 gran2 gran5] references))))
+    (testing "search by readable granule name case not match."
+      (let [references (search/find-refs :granule {:readable_granule_name "granule1"})]
+        (is (d/refs-match? [] references))))
+    (testing "search by readable granule name ignore case false."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name "granule1"
+                                          "options[readable_granule_name][ignore_case]" "false"})]
+        (is (d/refs-match? [] references))))
+    (testing "search by readable granule name ignore case true."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name "granule1"
+                                          "options[readable_granule_name][ignore_case]" "true"})]
+        (is (d/refs-match? [gran1] references))))
+    (testing "search by readable granule name default options."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name ["Granule2", "SuperSpecial"]})]
+        (is (d/refs-match? [gran2 gran4 gran5] references))))
+    (testing "search by readable granule name options :or."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name ["Granule2", "SuperSpecial"]
+                                          "options[readable_granule_name][or]" "true"})]
+        (is (d/refs-match? [gran2 gran4 gran5] references))))
+    (testing "search by readable granule name options :and."
+      (let [references (search/find-refs :granule
+                                         {:readable_granule_name ["Granule2", "SuperSpecial"]
+                                          "options[readable_granule_name][and]" "true"})]
+        (is (d/refs-match? [gran5] references))))))
+


(copied lattices.clj:)

(copied lattices.clj:)

error: pathspec 'src/conexp/contrib/gui/editors/contexts.clj' did not match any file(s) known to git

--- src/conexp/contrib/gui/editors/contexts.clj
+++ src/conexp/contrib/gui/editors/contexts.clj
@@ -0,0 +1,109 @@
+;; Copyright (c) Daniel Borchmann. All rights reserved.
+;; The use and distribution terms for this software are covered by the
+;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;; which can be found in the file LICENSE at the root of this distribution.
+;; By using this software in any fashion, you are agreeing to be bound by
+;; the terms of this license.
+;; You must not remove this notice, or any other, from this software.
+
+(ns conexp.contrib.gui.editors.lattices
+  (:use conexp.base
+	conexp.fca.contexts
+	conexp.fca.lattices
+	conexp.io
+	conexp.layout
+	[conexp.layout.base :only (lattice)]
+	conexp.graphics.draw
+	conexp.contrib.gui.util
+	conexp.contrib.gui.plugins.base)
+  (:use clojure.contrib.swing-utils
+	clojure.contrib.io)
+  (:import [java.io File]))
+
+(update-ns-meta! conexp.contrib.gui.editors.lattices
+  :doc "Provides lattice-editor, a plugin for lattices for the standard GUI of conexp-clj.")
+
+;;; The Plugin
+
+(declare load-lattice-editor unload-lattice-editor)
+
+(define-plugin lattice-editor
+  "Lattice editor plugin."
+  :load-hook   #(load-lattice-editor %),
+  :unload-hook #(unload-lattice-editor %))
+
+;;; The Actions
+
+(defn- load-lattice-and-go
+  "Loads lattice with given loader and adds a new tab with with a
+  lattice-editor from the result of tranformer."
+  [frame loader transformer]
+  (when-let [#^File file (choose-open-file frame)]
+    (let [thing (loader (.getPath file))]
+      (add-tab frame
+	       (make-lattice-editor frame
+				    (transformer thing))
+	       "Lattice"))))
+
+(defn- save-layout
+  "Tries to store the result of applying transformer to the currently
+  selected layout into the file the users selects."
+  [frame transformer write format]
+  (let [layout (get-layout-from-panel (current-tab frame))]
+    (if (nil? layout)
+      (illegal-argument "Current tab does not contain a lattice editor.")
+      (write format
+	     (transformer layout)
+	     (.getPath (choose-save-file frame))))))
+
+(defn- edit-standard-context
+  "Opens a context-editor with the standard context of the lattice
+  displayed in the current tab of frame."
+  [frame]
+  (unsupported-operation "Not yet implemented."))
+
+;;; The Hooks
+
+(defvar- *lattice-menu*
+  {:name "Lattice",
+   :content [{:name "Load Lattice",
+	      :handler #(load-lattice-and-go % read-lattice *standard-layout-function*)}
+	     {:name "Load Lattice from Context"
+	      :handler #(load-lattice-and-go % read-context
+					     (comp *standard-layout-function* concept-lattice))}
+	     {:name "Load Layout"
+	      :handler #(load-lattice-and-go % read-layout identity)}
+	     {}
+	     {:name "Save Lattice",
+	      :content [{:name "Format conexp-clj simple",
+			 :handler #(save-layout % lattice write-lattice :simple)}]}
+	     {:name "Save Layout",
+	      :content [{:name "Format conexp-clj simple",
+			 :handler #(save-layout % identity write-layout :simple)}]}
+	     {}
+	     {:name "Edit Standard Context",
+	      :handler edit-standard-context}]}
+  "Menu for lattice editor.")
+
+(let [menu-hash (ref {})]
+
+  (defn- load-lattice-editor
+    "Loads the lattice-editor plugin in frame."
+    [frame]
+    (dosync
+     (alter menu-hash
+	    assoc frame (add-menus frame [*lattice-menu*]))))
+
+  (defn- unload-lattice-editor
+    "Unloads the lattice-editor plugin from frame."
+    [frame]
+    (dosync
+     (let [menu (get @menu-hash frame)]
+       (remove-menus frame [menu])
+       (alter menu-hash dissoc frame))))
+
+  nil)
+
+;;; The End
+
+nil


remove no longer applicable comment

remove no longer applicable comment

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


Adding GET /run-query/:ns/:query/:rev

Adding GET /run-query/:ns/:query/:rev

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


added solution

added solution

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

--- src/main/clj/clojure_club/x113_making_data_dance/brockturner.clj
+++ src/main/clj/clojure_club/x113_making_data_dance/brockturner.clj
@@ -0,0 +1,14 @@
+(ns clojure-club.x113-making-data-dance.brockturner)
+
+(defn fun [& all]
+  (reify Iterable
+    (toString [_] (clojure.string/join ", " (sort all)))
+    (iterator [_] (.iterator (distinct all)))))
+
+(assert (= "1, 2, 3" (str (fun 2 1 3))))
+(assert (= '(2 1 3) (seq (fun 2 1 3))))
+(assert (= '(2 1 3) (seq (fun 2 1 3 3 1 2))))
+(assert (= '(1) (seq (apply fun (repeat 5 1)))))
+(assert (= "1, 1, 1, 1, 1" (str (apply fun (repeat 5 1)))))
+(assert (and (= nil (seq (fun)))
+             (=  "" (str (fun)))))


Replace config w/ docstring in dev-src sender

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


Create stub for hamming distance

Create stub for hamming distance

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

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


Make insts in vote-tomorrow test include tz offset


Add reduce-example-test

Add reduce-example-test

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

--- test/com/nomistech/clojure_the_language/c_270_interview_type_code/s_010_reduce_example_test.clj
+++ test/com/nomistech/clojure_the_language/c_270_interview_type_code/s_010_reduce_example_test.clj
@@ -0,0 +1,40 @@
+(ns com.nomistech.clojure-the-language.c-270-interview-type-code.s-010-reduce-example-test
+  (:require
+   [clojure.test :refer [deftest is]]))
+
+(def ^:private people [{:name        "Alice"
+                        :age         10
+                        :hair-colour :red}
+                       {:name        "Bob"
+                        :age         20
+                        :hair-colour :brown}
+                       {:name        "Cath"
+                        :age         30
+                        :hair-colour :brown}
+                       {:name        "Dean"
+                        :age         40
+                        :hair-colour :n/a}])
+
+(deftest reduce-example
+  (is (= {:n-people     4
+          :total-age    100
+          :average-age  25
+          :hair-colours {:red   1
+                         :brown 2
+                         :n/a   1}}
+         (reduce (fn [{:keys [n-people
+                              total-age
+                              hair-colours] :as _sofar}
+                      {:keys [_name age hair-colour] :as _person}]
+                   (let [n-people  (inc n-people)
+                         total-age (+ age total-age)]
+                     {:n-people     n-people
+                      :total-age    total-age
+                      :average-age  (/ total-age n-people)
+                      :hair-colours (update hair-colours
+                                            hair-colour
+                                            (fnil inc 0))}))
+                 {:n-people  0
+                  :total-age 0
+                  :hair-colours {}}
+                 people))))


Add in-memory database for meter data

Add in-memory database for meter data

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

--- src/loggerbotter/database.clj
+++ src/loggerbotter/database.clj
@@ -0,0 +1,28 @@
+(ns loggerbotter.database
+  (:require [clj-time.core :as time]))
+
+(defprotocol Database
+  (save-raw-data [db data] "Save unprocessed data to database")
+  (save-meter-data [db data] "Save meter data to database")
+  (get-meter-data [db after-date] "Fetch all meter data after given date"))
+
+(defn- conj-to-key [d ks v]
+  (update-in d ks
+             (fnil #(conj % v) [])))
+
+(defrecord InMemoryDatabase [db-atom]
+  Database
+  (save-raw-data [db data]
+    (swap! (:db-atom db)
+           #(conj-to-key % [:raw-log] data)))
+  (save-meter-data [db data]
+    (swap! (:db-atom db)
+           #(conj-to-key % [:meters] data)))
+  (get-meter-data [db after-date]
+    (->> (deref (:db-atom db))
+         :meters
+         (filter #(time/before? after-date (:time %)))
+         (sort-by :time))))
+
+(defn new-memory-db []
+  (->InMemoryDatabase (atom {})))


Ez bada ezer aurkitzen zerrenda hutsa itzuli

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


Request cache example

Request cache example

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

--- doc-examples/pathom_docs/request_cache.clj
+++ doc-examples/pathom_docs/request_cache.clj
@@ -0,0 +1,43 @@
+(ns pathom-docs.request-cache
+  (:require [com.wsscode.pathom.core :as p]))
+
+(defn my-expensive-operation [env]
+  ; the cache key can be anything; if we were had an extra
+  ; variable here, like some id, a good cache key would be
+  ; like: [::my-expensive-operation id]
+  (p/cached env :my-key
+    ; we are going to send an atom with an int so that we can count
+    ; how many times this was called
+    (let [counter (:counter env)]
+      ; a secondary sign if cache is working, let's make a delay
+      (Thread/sleep 1000)
+      ; increment and return
+      (swap! counter inc))))
+
+(def computed
+  {:cached my-expensive-operation})
+
+; a reader that just flows, until it reaches a leaf
+(defn flow-reader [{:keys [query] :as env}]
+  (if query
+    (p/join env)
+    :leaf))
+
+(def parser
+  (p/parser {::p/plugins [(p/env-plugin {::p/reader [computed
+                                                     flow-reader]})
+                          ; add the request cache plugin for cache initialization
+                          p/request-cache-plugin]}))
+
+(time
+  (parser {:counter (atom 0)}
+          [:x :y :cached
+           {:z [:foo {:bar [:cached]} :cached]}]))
+; "Elapsed time: 1006.760165 msecs"
+; =>
+; {:x      :leaf
+;  :y      :leaf
+;  :cached 1
+;  :z      {:foo    :leaf
+;           :bar    {:cached 1}
+;           :cached 1}}


Random overlay

Random overlay

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


[EN] Swap out immutant/web for httpkit

[EN] Swap out immutant/web for httpkit

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


Email layout

Email layout

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


Perf-test spec (alpha10), spec-tools and schema 1.1.3

* spec-tools conform is about the same perf as spec confirm
* simple validity checks & conforms are ~50x faster with Schema (compiled)

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

--- test/spec_tools/perf_test.clj
+++ test/spec_tools/perf_test.clj
@@ -0,0 +1,106 @@
+(ns spec-tools.perf-test
+  (:require [clojure.spec :as spec]
+            [schema.core :as schema]
+            [schema.coerce :as coerce]
+            [spec-tools.core :as st]
+            [criterium.core :as cc]))
+
+;;
+;; start repl with `lein perf repl`
+;; perf measured with the following setup:
+;;
+;; Model Name:            MacBook Pro
+;; Model Identifier:      MacBookPro11,3
+;; Processor Name:        Intel Core i7
+;; Processor Speed:       2,5 GHz
+;; Number of Processors:  1
+;; Total Number of Cores: 4
+;; L2 Cache (per Core):   256 KB
+;; L3 Cache:              6 MB
+;; Memory:                16 GB
+;;
+
+(spec/def ::age (spec/and integer? #(> % 10)))
+(spec/def ::x-age (spec/and st/x-integer? #(> % 10)))
+
+(def age (schema/constrained schema/Int #(> % 10)))
+
+(defn raw-title [color s]
+  (println (str color (apply str (repeat (count s) "#")) "\u001B[0m"))
+  (println (str color s "\u001B[0m"))
+  (println (str color (apply str (repeat (count s) "#")) "\u001B[0m")))
+
+(def title (partial raw-title "\u001B[35m"))
+(def suite (partial raw-title "\u001B[32m"))
+
+(schema/check age 12)
+
+(defn valid-test []
+
+  (suite "valid?")
+
+  ; 1260ns
+  (title "spec: integer?")
+  (let [call #(spec/valid? ::age 12)]
+    (assert (call))
+    (cc/quick-bench
+      (call)))
+
+  ; 1480ns
+  (title "spec: x-integer?")
+  (let [call #(spec/valid? ::x-age 12)]
+    (assert (call))
+    (cc/quick-bench
+      (call)))
+
+  ; 430ns
+  (title "schema: s/Int")
+  (let [call #(schema/check age 12)]
+    (assert (nil? (call)))
+    (cc/quick-bench
+      (call)))
+
+  ; 31ns
+  (title "schema: s/Int (compiled)")
+  (let [checker (schema/checker age)
+        call #(checker 12)]
+    (assert (nil? (call)))
+    (cc/quick-bench
+      (call))))
+
+(defn conform-test []
+
+  (suite "conform")
+
+  ; 1315ns
+  (title "spec: integer?")
+  (let [call #(spec/conform ::age 12)]
+    (assert (= (call) 12))
+    (cc/quick-bench
+      (call)))
+
+  ; 1430ns
+  (title "spec: x-integer?")
+  (let [call #(st/conform ::x-age 12)]
+    (assert (= (call) 12))
+    (cc/quick-bench
+      (call)))
+
+  ; 452ns
+  (title "schema: s/Int")
+  (let [call #((coerce/coercer age (constantly nil)) 12)]
+    (assert (= (call) 12))
+    (cc/quick-bench
+      (call)))
+
+  ; 27ns
+  (title "schema: s/Int (compiled)")
+  (let [coercer (coerce/coercer age (constantly nil))
+        call #(coercer 12)]
+    (assert (= (call) 12))
+    (cc/quick-bench
+      (call))))
+
+(comment
+  (valid-test)
+  (conform-test))


modified:   test/loganalyzer/core_test.clj Good refactoring and improvement

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


[#1091] Add missing namespace

[#1091] Add missing namespace

error: pathspec 'backend/src/akvo/lumen/endpoint/healthz.clj' did not match any file(s) known to git

--- backend/src/akvo/lumen/endpoint/healthz.clj
+++ backend/src/akvo/lumen/endpoint/healthz.clj
@@ -0,0 +1,7 @@
+(ns akvo.lumen.endpoint.healthz
+  (:require [akvo.lumen.http :as http]
+            [compojure.core :refer :all]))
+
+(defn endpoint [_]
+  (GET "/healthz" []
+    (http/ok {:healthz "ok"})))


main eguneratu

main eguneratu


Passing multi input test.

Passing multi input test.

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

--- test/onyx/peer/multi_input_test.clj
+++ test/onyx/peer/multi_input_test.clj
@@ -0,0 +1,137 @@
+(ns onyx.peer.multi-input-test
+  (:require [com.stuartsierra.component :as component]
+            [onyx.system :refer [onyx-development-env]]
+            [midje.sweet :refer :all]
+            [onyx.queue.hornetq-utils :as hq-util]
+            [onyx.api]))
+
+(def id (java.util.UUID/randomUUID))
+
+(def config (read-string (slurp (clojure.java.io/resource "test-config.edn"))))
+
+(def env-config
+  {:hornetq/mode :udp
+   :hornetq/server? true
+   :hornetq.server/type :embedded
+   :hornetq.udp/cluster-name (:cluster-name (:hornetq config))
+   :hornetq.udp/group-address (:group-address (:hornetq config))
+   :hornetq.udp/group-port (:group-port (:hornetq config))
+   :hornetq.udp/refresh-timeout (:refresh-timeout (:hornetq config))
+   :hornetq.udp/discovery-timeout (:discovery-timeout (:hornetq config))
+   :hornetq.embedded/config (:configs (:hornetq config))
+   :zookeeper/address (:address (:zookeeper config))
+   :zookeeper/server? true
+   :zookeeper.server/port (:spawn-port (:zookeeper config))
+   :onyx/id id
+   :onyx.coordinator/revoke-delay 5000})
+
+(def peer-config
+  {:hornetq/mode :udp
+   :hornetq.udp/cluster-name (:cluster-name (:hornetq config))
+   :hornetq.udp/group-address (:group-address (:hornetq config))
+   :hornetq.udp/group-port (:group-port (:hornetq config))
+   :hornetq.udp/refresh-timeout (:refresh-timeout (:hornetq config))
+   :hornetq.udp/discovery-timeout (:discovery-timeout (:hornetq config))
+   :zookeeper/address (:address (:zookeeper config))
+   :onyx/id id
+   :onyx.peer/inbox-capacity (:inbox-capacity (:peer config))
+   :onyx.peer/outbox-capacity (:outbox-capacity (:peer config))
+   :onyx.peer/job-scheduler :onyx.job-scheduler/round-robin})
+
+(def dev (onyx-development-env env-config))
+
+(def env (component/start dev))
+
+(def n-messages 15000)
+
+(def batch-size 1320)
+
+(def k-inputs 4)
+
+(def echo 1000)
+
+(def in-queues (map (fn [_] (str (java.util.UUID/randomUUID))) (range k-inputs)))
+
+(def out-queue (str (java.util.UUID/randomUUID)))
+
+(def hq-config {"host" (:host (:non-clustered (:hornetq config)))
+                "port" (:port (:non-clustered (:hornetq config)))})
+
+(doseq [in-queue in-queues]
+  (hq-util/create-queue! hq-config in-queue))
+
+(hq-util/create-queue! hq-config out-queue)
+
+(def messages
+  (->> k-inputs
+       (inc)
+       (range)
+       (map (fn [k] (* k (/ n-messages k-inputs))))
+       (partition 2 1)
+       (map (partial apply range))
+       (map (fn [r] (map (fn [x] {:n x}) r)))))
+
+(doseq [[q b] (map (fn [q b] [q b]) in-queues messages)]
+  (hq-util/write-and-cap! hq-config q b echo))
+
+(defn my-inc [{:keys [n] :as segment}]
+  (assoc segment :n (inc n)))
+
+(def input-entries
+  (map
+   (fn [k]
+     {:onyx/name (keyword (str "in-" k))
+      :onyx/ident :hornetq/read-segments
+      :onyx/type :input
+      :onyx/medium :hornetq
+      :onyx/consumption :concurrent
+      :hornetq/queue-name (nth in-queues (dec k))
+      :hornetq/host (:host (:non-clustered (:hornetq config)))
+      :hornetq/port (:port (:non-clustered (:hornetq config)))
+      :onyx/batch-size batch-size})
+   (range 1 (inc k-inputs))))
+
+(def catalog
+  (concat
+   input-entries
+   [{:onyx/name :inc
+     :onyx/fn :onyx.peer.multi-input-test/my-inc
+     :onyx/type :function
+     :onyx/consumption :concurrent
+     :onyx/batch-size batch-size}
+
+    {:onyx/name :out
+     :onyx/ident :hornetq/write-segments
+     :onyx/type :output
+     :onyx/medium :hornetq
+     :onyx/consumption :concurrent
+     :hornetq/queue-name out-queue
+     :hornetq/host (:host (:non-clustered (:hornetq config)))
+     :hornetq/port (:port (:non-clustered (:hornetq config)))
+     :onyx/batch-size batch-size}]))
+
+(def workflow
+  (vec
+   (concat
+    [[:inc :out]]
+    (map (fn [a] [(keyword (str "in-" a)) :inc])
+         (range 1 (inc k-inputs))))))
+
+(def v-peers (onyx.api/start-peers! 6 peer-config))
+
+(onyx.api/submit-job
+ peer-config
+ {:catalog catalog :workflow workflow
+  :task-scheduler :onyx.task-scheduler/round-robin})
+
+(def results (hq-util/consume-queue! hq-config out-queue echo))
+
+(doseq [v-peer v-peers]
+  ((:shutdown-fn v-peer)))
+
+(component/stop env)
+
+(let [expected (set (map (fn [x] {:n (inc x)}) (range n-messages)))]
+  (fact (set (butlast results)) => expected)
+  (fact (last results) => :done))
+


sass parsing funcs

sass parsing funcs

error: pathspec 'saas-dsl/src/saas_dsl/common.clj' did not match any file(s) known to git

--- saas-dsl/src/saas_dsl/common.clj
+++ saas-dsl/src/saas_dsl/common.clj
@@ -0,0 +1,46 @@
+(ns sass-dsl.comon
+  (:require [clojure.zip :as zip]))
+
+(defn is-element
+  "Is there a CSS element at zipper node?"
+  [loc]
+  {:pre [(not (nil? loc))]}
+  (not (coll? (zip/node loc))))
+
+(defn get-parent
+  "Retrieve the parent to this CSS node."
+  [loc]
+  {:pre [(not (nil? loc))]}
+  (zip/left (zip/up loc)))
+
+(defn is-first-element
+  "Is this the first element in zipper structure?"
+  [loc]
+  (nil? (zip/left loc)))
+
+(defn is-last-element
+  "Is this is a tree in this zipper structure?"
+  [loc]
+  {:pre [(not (nil? loc))]}
+  ;;nil punning is required
+  (nil? (zip/right loc)))
+
+(defn has-no-colon
+  "Is this lacking a colon? ie is this not a value row?"
+  [loc]
+  (not (.contains (zip/node loc) ":")))
+
+(defn- has-right-element
+  "Is there an element to the right?"
+  [loc]
+  (zip/right loc))
+
+(defn is-selector
+  "Is this a selector?"
+  [loc]
+  {:pre [(not (nil? loc))]}
+  (if (and
+       (is-element loc)
+       (has-right-element loc))
+    (zip/branch? (zip/right loc))))
+


mi -> minc

mi -> minc

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


added controls

added controls

error: pathspec 'resources/leiningen/new/threejs_game/src/cljs/controls.cljs' did not match any file(s) known to git

--- resources/leiningen/new/threejs_game/src/cljs/controls.cljs
+++ resources/leiningen/new/threejs_game/src/cljs/controls.cljs
@@ -0,0 +1,32 @@
+(ns {{project-ns}}.controls)
+
+;; additional keycodes can be obtained from keycode.info
+;; arrow keys
+(def left-arrow 37)
+(def up-arrow 38)
+(def right-arrow 39)
+(def down-arrow 40)
+;; wasd keys
+(def a-key 65)
+(def w-key 87)
+(def d-key 68)
+(def s-key 83)
+;; space key
+(def space-key 32)
+
+(def key-state (js-obj))
+
+(defn game-key-down!
+  "Handle event related to when a user presses down on a key. This modifies
+  key-state"
+  [event]
+  (aset key-state (or (.-keycode event)
+                      (.-which event)) true))
+
+(defn game-key-up!
+  "Handle event related to when a user releases a key. This modifies key-state"
+  [event]
+  (aset key-state (or (.-keycode event)
+                      (.-which event)) false))
+
+


Log authority searches & results

Log authority searches & results

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


Add lancaster stem rules.

Add lancaster stem rules.

error: pathspec 'src/cljs-nlp/stem/lancaster.cljs' did not match any file(s) known to git

--- src/cljs-nlp/stem/lancaster.cljs
+++ src/cljs-nlp/stem/lancaster.cljs
@@ -0,0 +1,117 @@
+(ns cljs-nlp.stem.lancaster)
+
+(def rules [{"continuation" false "intact" true "pattern" "ia" "size" "2"}
+            {"continuation" false "intact" true "pattern" "a" "size" "1"}
+            {"continuation" false "intact" false "pattern" "bb" "size" "1"}
+            {"appendage" "s" "continuation" false "intact" false "pattern" "ytic" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ic" "size" "2"}
+            {"appendage" "t" "continuation" true "intact" false "pattern" "nc" "size" "1"}
+            {"continuation" false "intact" false "pattern" "dd" "size" "1"}
+            {"appendage" "y" "continuation" true "intact" false "pattern" "ied" "size" "3"}
+            {"appendage" "s" "continuation" false "intact" false "pattern" "ceed" "size" "2"}
+            {"continuation" false "intact" false "pattern" "eed" "size" "1"}
+            {"continuation" true "intact" false "pattern" "ed" "size" "2"}
+            {"continuation" true "intact" false "pattern" "hood" "size" "4"}
+            {"continuation" true "intact" false "pattern" "e" "size" "1"}
+            {"appendage" "v" "continuation" false "intact" false "pattern" "lief" "size" "1"}
+            {"continuation" true "intact" false "pattern" "if" "size" "2"}
+            {"continuation" true "intact" false "pattern" "ing" "size" "3"}
+            {"appendage" "y" "continuation" false "intact" false "pattern" "iag" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ag" "size" "2"}
+            {"continuation" false "intact" false "pattern" "gg" "size" "1"}
+            {"continuation" false "intact" true "pattern" "th" "size" "2"}
+            {"appendage" "c" "continuation" false "intact" false "pattern" "guish" "size" "5"}
+            {"continuation" true "intact" false "pattern" "ish" "size" "3"}
+            {"continuation" false "intact" true "pattern" "i" "size" "1"}
+            {"appendage" "y" "continuation" true "intact" false "pattern" "i" "size" "1"}
+            {"appendage" "d" "continuation" false "intact" false "pattern" "ij" "size" "1"}
+            {"appendage" "s" "continuation" false "intact" false "pattern" "fuj" "size" "1"}
+            {"appendage" "d" "continuation" false "intact" false "pattern" "uj" "size" "1"}
+            {"appendage" "d" "continuation" false "intact" false "pattern" "oj" "size" "1"}
+            {"appendage" "r" "continuation" false "intact" false "pattern" "hej" "size" "1"}
+            {"appendage" "t" "continuation" false "intact" false "pattern" "verj" "size" "1"}
+            {"appendage" "t" "continuation" false "intact" false "pattern" "misj" "size" "2"}
+            {"appendage" "d" "continuation" false "intact" false "pattern" "nj" "size" "1"}
+            {"appendage" "s" "continuation" false "intact" false "pattern" "j" "size" "1"}
+            {"continuation" false "intact" false "pattern" "ifiabl" "size" "6"}
+            {"appendage" "y" "continuation" false "intact" false "pattern" "iabl" "size" "4"}
+            {"continuation" true "intact" false "pattern" "abl" "size" "3"}
+            {"continuation" false "intact" false "pattern" "ibl" "size" "3"}
+            {"appendage" "l" "continuation" true "intact" false "pattern" "bil" "size" "2"}
+            {"continuation" false "intact" false "pattern" "cl" "size" "1"}
+            {"appendage" "y" "continuation" false "intact" false "pattern" "iful" "size" "4"}
+            {"continuation" true "intact" false "pattern" "ful" "size" "3"}
+            {"continuation" false "intact" false "pattern" "ul" "size" "2"}
+            {"continuation" true "intact" false "pattern" "ial" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ual" "size" "3"}
+            {"continuation" true "intact" false "pattern" "al" "size" "2"}
+            {"continuation" false "intact" false "pattern" "ll" "size" "1"}
+            {"continuation" false "intact" false "pattern" "ium" "size" "3"}
+            {"continuation" false "intact" true "pattern" "um" "size" "2"}
+            {"continuation" true "intact" false "pattern" "ism" "size" "3"}
+            {"continuation" false "intact" false "pattern" "mm" "size" "1"}
+            {"appendage" "j" "continuation" true "intact" false "pattern" "sion" "size" "4"}
+            {"appendage" "c" "continuation" false "intact" false "pattern" "xion" "size" "4"}
+            {"continuation" true "intact" false "pattern" "ion" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ian" "size" "3"}
+            {"continuation" true "intact" false "pattern" "an" "size" "2"}
+            {"continuation" false "intact" false "pattern" "een" "size" "0"}
+            {"continuation" true "intact" false "pattern" "en" "size" "2"}
+            {"continuation" false "intact" false "pattern" "nn" "size" "1"}
+            {"continuation" true "intact" false "pattern" "ship" "size" "4"}
+            {"continuation" false "intact" false "pattern" "pp" "size" "1"}
+            {"continuation" true "intact" false "pattern" "er" "size" "2"}
+            {"continuation" false "intact" false "pattern" "ear" "size" "0"}
+            {"continuation" false "intact" false "pattern" "ar" "size" "2"}
+            {"continuation" true "intact" false "pattern" "or" "size" "2"}
+            {"continuation" true "intact" false "pattern" "ur" "size" "2"}
+            {"continuation" false "intact" false "pattern" "rr" "size" "1"}
+            {"continuation" true "intact" false "pattern" "tr" "size" "1"}
+            {"appendage" "y" "continuation" true "intact" false "pattern" "ier" "size" "3"}
+            {"appendage" "y" "continuation" true "intact" false "pattern" "ies" "size" "3"}
+            {"continuation" false "intact" false "pattern" "sis" "size" "2"}
+            {"continuation" true "intact" false "pattern" "is" "size" "2"}
+            {"continuation" true "intact" false "pattern" "ness" "size" "4"}
+            {"continuation" false "intact" false "pattern" "ss" "size" "0"}
+            {"continuation" true "intact" false "pattern" "ous" "size" "3"}
+            {"continuation" false "intact" true "pattern" "us" "size" "2"}
+            {"continuation" true "intact" true "pattern" "s" "size" "1"}
+            {"continuation" false "intact" false "pattern" "s" "size" "0"}
+            {"appendage" "y" "continuation" false "intact" false "pattern" "plicat" "size" "4"}
+            {"continuation" true "intact" false "pattern" "at" "size" "2"}
+            {"continuation" true "intact" false "pattern" "ment" "size" "4"}
+            {"continuation" true "intact" false "pattern" "ent" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ant" "size" "3"}
+            {"appendage" "b" "continuation" false "intact" false "pattern" "ript" "size" "2"}
+            {"appendage" "b" "continuation" false "intact" false "pattern" "orpt" "size" "2"}
+            {"continuation" false "intact" false "pattern" "duct" "size" "1"}
+            {"continuation" false "intact" false "pattern" "sumpt" "size" "2"}
+            {"appendage" "i" "continuation" false "intact" false "pattern" "cept" "size" "2"}
+            {"appendage" "v" "continuation" false "intact" false "pattern" "olut" "size" "2"}
+            {"continuation" false "intact" false "pattern" "sist" "size" "0"}
+            {"continuation" true "intact" false "pattern" "ist" "size" "3"}
+            {"continuation" false "intact" false "pattern" "tt" "size" "1"}
+            {"continuation" false "intact" false "pattern" "iqu" "size" "3"}
+            {"continuation" false "intact" false "pattern" "ogu" "size" "1"}
+            {"appendage" "j" "continuation" true "intact" false "pattern" "siv" "size" "3"}
+            {"continuation" false "intact" false "pattern" "eiv" "size" "0"}
+            {"continuation" true "intact" false "pattern" "iv" "size" "2"}
+            {"continuation" true "intact" false "pattern" "bly" "size" "1"}
+            {"appendage" "y" "continuation" true "intact" false "pattern" "ily" "size" "3"}
+            {"continuation" false "intact" false "pattern" "ply" "size" "0"}
+            {"continuation" true "intact" false "pattern" "ly" "size" "2"}
+            {"continuation" false "intact" false "pattern" "ogy" "size" "1"}
+            {"continuation" false "intact" false "pattern" "phy" "size" "1"}
+            {"continuation" false "intact" false "pattern" "omy" "size" "1"}
+            {"continuation" false "intact" false "pattern" "opy" "size" "1"}
+            {"continuation" true "intact" false "pattern" "ity" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ety" "size" "3"}
+            {"continuation" false "intact" false "pattern" "lty" "size" "2"}
+            {"continuation" false "intact" false "pattern" "istry" "size" "5"}
+            {"continuation" true "intact" false "pattern" "ary" "size" "3"}
+            {"continuation" true "intact" false "pattern" "ory" "size" "3"}
+            {"continuation" false "intact" false "pattern" "ify" "size" "3"}
+            {"appendage" "t" "continuation" true "intact" false "pattern" "ncy" "size" "2"}
+            {"continuation" true "intact" false "pattern" "acy" "size" "3"}
+            {"continuation" true "intact" false "pattern" "iz" "size" "2"}
+            {"appendage" "s" "continuation" false "intact" false "pattern" "yz" "size" "1"}])


Missing new model file.

Missing new model file.

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

--- src/coming_soon/models/email.clj
+++ src/coming_soon/models/email.clj
@@ -0,0 +1,10 @@
+(ns coming-soon.models.email)
+
+;; Regex for a valid email address
+(def email-regex #"^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$")
+
+(defn valid? [email]
+  "Determine if the specified email address is valid according to our email regex."
+  (if (and (not (nil? email)) (re-matches email-regex email))
+  true
+  false))


fnexting your fnext

fnexting your fnext

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


Vectorized jdbc4 arrays in core.clj

Vectorized jdbc4 arrays in core.clj

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


Add missing recovery page.

Add missing recovery page.

error: pathspec 'src/uxbox/ui/auth/recovery.cljs' did not match any file(s) known to git

--- src/uxbox/ui/auth/recovery.cljs
+++ src/uxbox/ui/auth/recovery.cljs
@@ -0,0 +1,96 @@
+;; This Source Code Form is subject to the terms of the Mozilla Public
+;; License, v. 2.0. If a copy of the MPL was not distributed with this
+;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;;
+;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
+
+(ns uxbox.ui.auth.recovery
+  (:require [sablono.core :as html :refer-macros [html]]
+            [lentes.core :as l]
+            [cuerdas.core :as str]
+            [rum.core :as rum]
+            [uxbox.router :as rt]
+            [uxbox.state :as st]
+            [uxbox.rstore :as rs]
+            [uxbox.schema :as us]
+            [uxbox.data.auth :as uda]
+            [uxbox.data.messages :as udm]
+            [uxbox.data.forms :as udf]
+            [uxbox.ui.forms :as forms]
+            [uxbox.ui.icons :as i]
+            [uxbox.ui.messages :as uum]
+            [uxbox.ui.navigation :as nav]
+            [uxbox.ui.mixins :as mx]
+            [uxbox.util.dom :as dom]))
+
+;; --- Constants
+
+(def recovery-request-form-data
+  (-> (l/in [:forms :recovery-request])
+      (l/focus-atom st/state)))
+
+(def recovery-request-form-errors
+  (-> (l/in [:errors :recovery-request])
+      (l/focus-atom st/state)))
+
+(def set-value!
+  (partial udf/assign-field-value :recovery-request))
+
+;; --- Recovery Request Form
+
+(def recovery-request-schema
+  {:username [us/required us/string]})
+
+(defn- recovery-request-form-render
+  [own]
+  (let [form (rum/react recovery-request-form-data)
+        errors (rum/react recovery-request-form-errors)
+        valid? (us/valid? form recovery-request-schema)]
+    (letfn [(on-change [field event]
+              (let [value (dom/event->value event)]
+                (rs/emit! (set-value! field value))))
+            (on-submit [event]
+              (dom/prevent-default event)
+              (rs/emit! (uda/recovery-request form)))]
+      (html
+       [:form {:on-submit on-submit}
+        [:div.login-content
+         [:input.input-text
+          {:name "username"
+           :value (:username form "")
+           :on-change (partial on-change :username)
+           :placeholder "username or email address"
+           :type "text"}]
+         (forms/input-error errors :username)
+
+         [:input.btn-primary
+          {:name "login"
+           :class (when-not valid? "btn-disabled")
+           :disabled (not valid?)
+           :value "Recover password"
+           :type "submit"}]
+         [:div.login-links
+          [:a {:on-click #(rt/go :auth/login)} "Go back!"]]]]))))
+
+(def recovery-request-form
+  (mx/component
+   {:render recovery-request-form-render
+    :name "recovery-request-form"
+    :mixins [mx/static rum/reactive]}))
+
+;; --- Recovery Request Page
+
+(defn- recovery-request-page-render
+  [own]
+  (html
+   [:div.login
+    [:div.login-body
+     (uum/messages)
+     [:a i/logo]
+     (recovery-request-form)]]))
+
+(def recovery-request-page
+  (mx/component
+   {:render recovery-request-page-render
+    :name "recovery-request-page"
+    :mixins [mx/static]}))


re-order and privatize some vars

re-order and privatize some vars

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


check errors more aggressively :imp:

check errors more aggressively :imp:

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -177,17 +177,16 @@
     (->> order-by-pairs
          (map (fn [pair] (when-not (vector? pair) (throw (Exception. "order_by clause must consists of pairs like [field_id \"ascending\"]"))) pair))
          (mapv (fn [[field-id asc-desc]]
-                 {:pre [(or (integer? field-id)
-                            (= field-id "$$aggregation"))
-                        (string? asc-desc)]}
-                 `(order ~(if (integer? field-id) (field-id->kw field-id)
-                              (let [[ag] (:aggregation (:query qp/*query*))]
-                                `(raw ~(case ag
-                                         "avg"      "\"avg\"" ; based on the type of the aggregation
-                                         "count"    "\"count\"" ; make sure we ask the DB to order by the
-                                         "distinct" "\"count\"" ; name of the aggregate field
-                                         "stddev"   "\"stddev\""
-                                         "sum"      "\"sum\""))))
+                 {:pre [(string? asc-desc)]}
+                 `(order ~(cond
+                            (integer? field-id)          (field-id->kw field-id)
+                            (= field-id "$$aggregation") (let [[ag] (:aggregation (:query qp/*query*))]
+                                                           `(raw ~(case ag
+                                                                    "avg"      "\"avg\"" ; based on the type of the aggregation
+                                                                    "count"    "\"count\"" ; make sure we ask the DB to order by the
+                                                                    "distinct" "\"count\"" ; name of the aggregate field
+                                                                    "stddev"   "\"stddev\""
+                                                                    "sum"      "\"sum\""))))
                          ~(case asc-desc
                             "ascending" :ASC
                             "descending" :DESC)))))))


(PDB-4659) Add acceptance tests for command broadcast

error: pathspec 'test/puppetlabs/puppetdb/command_broadcast_test.clj' did not match any file(s) known to git

--- test/puppetlabs/puppetdb/command_broadcast_test.clj
+++ test/puppetlabs/puppetdb/command_broadcast_test.clj
@@ -0,0 +1,194 @@
+(ns puppetlabs.puppetdb.command-broadcast-test
+  (:require
+   [clojure.test :refer :all]
+   [puppetlabs.puppetdb.integration.fixtures :as int]
+   [puppetlabs.puppetdb.utils :as utils]
+   [puppetlabs.puppetdb.testutils.cli :refer [example-report
+                                              example-facts
+                                              example-catalog
+                                              example-certname]]
+   [puppetlabs.puppetdb.command.constants :as cmd-consts]
+   [puppetlabs.puppetdb.testutils.services :as svc-utils]
+   [puppetlabs.puppetdb.utils.metrics :as mutils]
+   [puppetlabs.puppetdb.command :as cmd]
+   [clojure.string :as str])
+  (:import (java.sql SQLException)))
+
+(def commands
+  {:replace-facts {:data (assoc example-facts :values {:foo "the foo"})
+                   :cname (:replace-facts cmd-consts/command-names)
+                   :ver cmd-consts/latest-facts-version}
+   :store-report {:data example-report
+                  :cname (:store-report cmd-consts/command-names)
+                  :ver cmd-consts/latest-report-version}
+   :replace-catalog {:data example-catalog
+                     :cname (:replace-catalog cmd-consts/command-names)
+                     :ver cmd-consts/latest-catalog-version}})
+
+(defn post-blocking-ssl-cmd [pdb cmd]
+  (let [{:keys [data cname ver]} (cmd commands)
+        cmd-url (-> pdb int/server-info :base-url
+                    (assoc :prefix "/pdb/cmd" :version :v1))
+        url-params (utils/cmd-url-params {:command cname
+                                          :version ver
+                                          :certname example-certname
+                                          :timeout 5 ; seconds
+                                          :producer-timestamp (-> data
+                                                                  :producer_timestamp
+                                                                  str)})
+        url (str (utils/base-url->str cmd-url) url-params)]
+    (svc-utils/post-ssl-or-throw url data)))
+
+(defn populate-db
+  ([pdb]
+   (populate-db pdb false))
+  ([pdb assert-errors?]
+   (doseq [cmd (keys commands)]
+     (if assert-errors?
+       (is (thrown? Exception (post-blocking-ssl-cmd pdb cmd)))
+       (post-blocking-ssl-cmd pdb cmd)))))
+
+(deftest cmd-broadcast
+  (with-open [pg1 (int/setup-postgres)
+              pg2 (int/setup-postgres)
+              pdb1 (int/run-puppetdb pg1 {:database {"gc-interval" 0}
+                                          :database-pg1 (int/server-info pg1)
+                                          :database-pg2 (int/server-info pg2)})]
+    ;; post a few commands to trigger broadcast to both pgs
+    (populate-db pdb1)
+
+    (testing "Expected data is present in pdb1's read-database pg1"
+      (let [expected [{:certname "foo.local"}]]
+        (is (= expected (int/pql-query pdb1 "reports [certname] {}")))
+        (is (= expected (int/pql-query pdb1 "facts [certname] {}")))
+        (is (= expected (int/pql-query pdb1 "catalogs [certname] {}")))))
+
+    (let [port (-> pdb1 int/server-info :base-url :port)
+          list-metrics (fn [metric-type]
+                         ;; return metrics in :name=pg1.<metric-name> format
+                         (-> (str "https://localhost:" port "/metrics/v2/list")
+                             svc-utils/get-ssl
+                             :body
+                             :value
+                             metric-type
+                             keys))]
+
+      (testing "Expected number of storage metrics are created for both PGs"
+        (let [storage-metrics (list-metrics :puppetlabs.puppetdb.storage)
+              ;; filter out non-broadcast metrics created in the registry during other tests
+              broadcast-metrics (filter #(re-find (re-pattern (str "pg1" "|" "pg2")) (str %)) storage-metrics)
+              expected-count 21  ;; 21 per pg metrics registered in storage.clj
+              [pg-1 pg-2] (vals (group-by #(subs (str %) 1 9) broadcast-metrics))]
+          (is (= expected-count (count pg-1)))
+          (is (= (count pg-1) (count pg-2)))))
+
+      (testing "Expected number of admin metrics are created for both PGs"
+        (let [admin-metrics (list-metrics :puppetlabs.puppetdb.admin)
+              ;; filter out non-broadcast metrics created in the registry during other tests
+              broadcast-metrics (filter #(re-find (re-pattern (str "pg1" "|" "pg2")) (str %)) admin-metrics)
+              expected-count 13 ;; 13 per pg admin metrics registered in services.clj
+              [pg-1 pg-2] (vals (group-by #(subs (str %) 1 9) broadcast-metrics))]
+          (is (= expected-count (count pg-1)))
+          (is (= (count pg-1) (count pg-2)))))
+
+      (testing "Storage metrics updated for both PGs"
+        (let [report-min-time (fn [pg]
+                                (-> (str "https://localhost:"
+                                         port
+                                         "/metrics/v2/read/"
+                                         "puppetlabs.puppetdb.storage"
+                                         (str ":name=" pg ".store-report-time"))
+                                    svc-utils/get-ssl
+                                    :body
+                                    :value
+                                    :Min))]
+          ;; spot check that the store report timer Min val updated for both pgs
+          (is (not= 0.0 (report-min-time "pg1")))
+          (is (not= 0.0 (report-min-time "pg2"))))))
+
+    (with-open [pdb2 (int/run-puppetdb pg2 {:database {"gc-interval" 0}})]
+      (testing "Expected data is present in pdb2's read-database pg2"
+        (let [expected [{:certname "foo.local"}]]
+          (is (= expected (int/pql-query pdb2 "reports [certname] {}")))
+          (is (= expected (int/pql-query pdb2 "facts [certname] {}")))
+          (is (= expected (int/pql-query pdb2 "catalogs [certname] {}"))))))))
+
+(deftest cmd-broadcast-with-one-pg-down
+  (with-open [pg1 (int/setup-postgres)
+              pg2 (int/setup-postgres)
+              pdb1 (int/run-puppetdb pg1 {:database {"gc-interval" 0}
+                                          :database-pg1 (int/server-info pg1)
+                                          :database-pg2 (int/server-info pg2)})]
+    (let [shared-globals (-> pdb1
+                             int/server-info
+                             :app
+                             .app_context
+                             deref
+                             :service-contexts
+                             :PuppetDBServer
+                             :shared-globals)
+          db-names (:scf-write-db-names shared-globals)
+          dbs (:scf-write-dbs shared-globals)
+          db2 (nth dbs (.indexOf db-names "pg2"))
+          dlo (:path (:dlo shared-globals))
+          orig-exec-cmds cmd/exec-command]
+
+      ;; break exec-command for all db2 submissions
+      (with-redefs [cmd/exec-command (fn [{:keys [command version] :as cmd} db conn-status start]
+                                       (when (= db2 db)
+                                         (throw (SQLException. "BOOM")))
+                                       (orig-exec-cmds cmd db conn-status start))]
+
+        ;; post a few commands to trigger broadcast, submission will fail to one backend
+        (populate-db pdb1)
+
+        (testing "Expected data is present in pdb1's read-database pg1"
+          (let [expected [{:certname "foo.local"}]]
+            (is (= expected (int/pql-query pdb1 "reports [certname] {}")))
+            (is (= expected (int/pql-query pdb1 "facts [certname] {}")))
+            (is (= expected (int/pql-query pdb1 "catalogs [certname] {}")))))
+
+        (testing "dlo should be clean because command was succesfully delivered to one pg"
+          ;; file-seq returns an entry for the dlo dir
+          (is (= 1 (-> dlo str clojure.java.io/file file-seq count))))))))
+
+(deftest cmd-broadcast-with-all-pgs-down
+  (with-open [pg1 (int/setup-postgres)
+              pg2 (int/setup-postgres)
+              pdb1 (int/run-puppetdb pg1 {:database {"gc-interval" 0}
+                                          :database-pg1 (int/server-info pg1)
+                                          :database-pg2 (int/server-info pg2)})]
+    (let [shared-globals (-> pdb1
+                             int/server-info
+                             :app
+                             .app_context
+                             deref
+                             :service-contexts
+                             :PuppetDBServer
+                             :shared-globals)
+          dlo (:path (:dlo shared-globals))
+          ;; the dlo file-seq includes one entry for the dir and two per failed command
+          expected-dlo-count (inc (* 2 (count (keys commands))))]
+
+      ;; break exec-command for all submissions to all pgs
+      (with-redefs [cmd/exec-command (fn [& args] (throw (SQLException. "BOOM")))
+                    ;; don't allow retries to speed cmd ending up in dlo
+                    cmd/maximum-allowable-retries 0]
+
+        ;; post a few commands all of which should fail. Assertion done in populate-db
+        (populate-db pdb1 true)
+
+        ;; account for race between cmds being discared to dlo vs. checking for the discards
+        (let [dlo-files (loop [retries 0]
+                          (let [dlo-files (-> dlo str clojure.java.io/file file-seq)]
+                            (cond
+                              (= expected-dlo-count (count dlo-files)) dlo-files
+                              (> retries 10) (throw (ex-info "dlo in unexpected state"
+                                                             {:dlo-files dlo-files}))
+                              :else
+                              (do
+                                (Thread/sleep 100)
+                                (recur (inc retries))))))]
+
+          (testing "dlo should contain two entries per failed command"
+            (is (= expected-dlo-count (count dlo-files)))))))))


add prompt/print functions.

add prompt/print functions.

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

--- src/leiningen/ancient/console.clj
+++ src/leiningen/ancient/console.clj
@@ -0,0 +1,31 @@
+(ns leiningen.ancient.console
+  (:require [leiningen.ancient.verbose :refer :all]
+            [jansi-clj.core :as color]))
+
+(defn prompt
+  "Create a yes/no prompt using the given message."
+  [& msg]
+  (let [msg (str (apply str msg) " [yes/no] ")]
+    (locking *out*
+      (loop [i 0]
+        (when (= (mod i 4) 2)
+          (println "*** please type in one of 'yes'/'y' or 'no'/'n' ***"))
+        (print msg)
+        (flush)
+        (let [r (or (read-line) "")
+              r (.toLowerCase ^String r)]
+          (case r
+            ("yes" "y") true
+            ("no" "n")  false
+            (recur (inc i))))))))
+
+(defn print-outdated-message
+  "Print a message indicating that a given artifact is outdated."
+  [{:keys [latest artifact]}]
+  {:pre [(map? latest) (map? artifact)]}
+  (let [{:keys [symbol version-string]} artifact]
+    (verbosef
+      "[%s %s] is available but we use %s"
+      symbol
+      (color/green (pr-str (:version-string latest)))
+      (color/yellow (pr-str version-string)))))


Make checkbox group and radio group components controlled

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


triangle-min-path:: graphs-hard first draft

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

--- src/clojure_learning/triangle_min_path.clj
+++ src/clojure_learning/triangle_min_path.clj
@@ -0,0 +1,38 @@
+;;;;;;;;;;;;;;;;;;;;;;;;
+;; Triangle Minimal Path
+;; Difficulty:	Hard
+;; Topics:	graph-theory
+;; Write a function which calculates the sum of the minimal path through a triangle.
+;; The triangle is represented as a collection of vectors.
+;; The path should start at the top of the triangle and move to an adjacent number on the next row
+;; until the bottom of the triangle is reached.
+(ns clojure_learning.triangle-min-path
+    (use [clojure.repl])
+    (require [clojure.test :refer :all]))
+
+(defn find-min-path
+  [points]
+  (let [exp (int (Math/pow 2 (count points)))]
+     (reduce
+       (fn [acc v]
+          (conj acc
+              (reduce
+                  (fn [inner-acc el] (into inner-acc (repeat exp el)))
+                  [] v)))
+        [] points)))
+
+
+(deftest test-find-min-path
+  (testing "triangle-min-path to find the min path and reduce it using add func"
+      (is (= 7 (find-min-path '([1]
+                               [2 4]
+                              [5 1 4]
+                             [2 3 4 5]))))
+  ))
+;; 1->2->1->3
+
+(Math/pow 2 2)
+(find-min-path '([1]
+                [2 4]
+               [5 1 4]
+              [2 3 4 5]))


scratch to live edit in lighttable ide

scratch to live edit in lighttable ide

error: pathspec 'tanken-daten/scratch.clj' did not match any file(s) known to git

--- tanken-daten/scratch.clj
+++ tanken-daten/scratch.clj
@@ -0,0 +1,5 @@
+(use 'tanken-daten.core :reload-all)
+
+(collect-data "/home/michael/Dokumente/Tankstellenpreise/preise.db")
+
+;(-main "/home/michael/Dokumente/Tankstellenpreise/preise.db")


update test for seeding

update test for seeding

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


Initial commit

Initial commit

Adding the project files to GitHub for my IMD portfolio website
which include the core that is a cljc file that currently handles
rendering and routing.
Also included is a sample shopping.html for testing and learning

--- src/cljc/portfolio/core.cljc
+++ src/cljc/portfolio/core.cljc
@@ -0,0 +1,64 @@
+(ns portfolio.core
+  (:require
+   #?(:clj [compojure.core :refer :all])
+   #?(:clj
+           [compojure.handler :as handler])
+   #?(:clj
+           [compojure.route :as route])
+   #?(:clj
+           [org.httpkit.server :as server]))
+  (:use #?(:cljs [domina :only [by-id value set-value!]])))
+
+;#?(:cljs (.write js/document "david you did it?"))
+
+;(enable-console-print!)
+
+;(println "Hello world! coming from core cljc")
+
+#?(:clj (defroutes app-routes
+          (GET "/" [] "
hello world
")
+          (route/resources "/")
+          (route/not-found "Page not found.")))
+
+#?(:clj (def handler (handler/site app-routes)))
+
+#?(:clj (defonce server (atom nil)))
+
+#?(:clj (defn stop-server []
+          (when-not (nil? @server)
+            (@server :timeout 100)
+            (reset! server nil))))
+
+#?(:clj (defn -main []
+          (reset! server (server/run-server
+                           handler {:port 8080}))))
+
+#?(:cljs (defn validate-form
+           []
+           (let [email    (by-id "email")
+                 password (by-id "password")]
+             (if (and (> (count (value email)) 0)
+                   (> (count (value password)) 0))
+               true
+               (do (js/alert "Please, complete the form!")
+                   false)))))
+
+#?(:cljs (defn calculate
+           []
+           (let [quantity (value (by-id "quantity"))
+                 price    (value (by-id "price"))
+                 tax      (value (by-id "tax"))
+                 discount (value (by-id "discount"))]
+             (set-value! (by-id "total") (-> (* quantity price)
+                                           (* (+ 1 (/ tax 100)))
+                                           (- discount)
+                                           (.toFixed 2)))
+             false)))
+
+#?(:cljs (defn init [])
+   (if (and js/document
+         (.-getElementById js/document))
+     (let [the-form (.getElementById js/document "shoppingForm")]
+       (set! (.-onsubmit the-form) calculate))))
+
+#?(:cljs (set! (.-onload js/window) init))


start building an index of compiler/repl options #160

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

--- src/cljs_api_gen/options.clj
+++ src/cljs_api_gen/options.clj
@@ -0,0 +1,90 @@
+(ns cljs-api-gen.options)
+
+;; Compiler Options are tracked in cljs.closure/known-opts >= 1.8.34
+;; REPL Options are tracked in cljs.repl/known-repl-opts >= 1.8.34
+;; After clojure.spec is finalized, david will accept a PR for adding a spec
+;; for compiler options.
+
+;; found version added with git. for example:
+;; $ git log -S :emit-constants --source --all
+
+(def compiler-options
+  {;; Common options
+   :output-to {:added "0.0-971"}
+   :output-dir {:added "0.0-971"}
+   :optimizations {:added "0.0-971"}
+   :main {:added "0.0-971"}
+   :asset-path {:added "0.0-2727"}
+   :source-map {:added "0.0-1798"}
+   :verbose {:added "0.0-971"}
+   :pretty-print {:added "0.0-971"}
+   :target {:added "0.0-971"}
+   :foreign-libs {:added "0.0-971"}
+   :externs {:added "0.0-971"}
+   :modules {:added "0.0-2911"}
+   :preloads {:added "1.9.85"}
+
+   ;; Less Common Options
+   :source-map-path {:added "0.0-2060"}
+   :source-map-asset-path {:added "1.9.90"}
+   :source-map-timestamp {:added "0.0-2505"}
+   :cache-analysis {:added "0.0-2511"}
+   :recompile-dependents {:added "0.0-2814"}
+   :static-fns {:added "0.0-1424"}
+   :warnings {:added "0.0-1443"}
+   :elide-asserts {:added "0.0-2156"}
+   :pseudo-names {:added "0.0-2227"}
+   :print-input-delimiter {:added "0.0-971"}
+   :output-wrapper {:added "0.0-1513"}
+   :libs {:added "0.0-971"}
+   :preamble {:added "0.0-2127"}
+   :hashbang {:added "0.0-2197"}
+   :compiler-stats {:added "0.0-2629"}
+   :language-in {:added "0.0-2197"}
+   :language-out {:added "0.0-2197"}
+   :closure-warnings {:added "0.0-2120"}
+   :closure-defines {:added "0.0-2120"}
+   :closure-extra-annotations {:added "0.0-2814"}
+   :anon-fn-naming-policy {:added "0.0-2411"}
+   :optimize-constants {:added "0.0-1877"}
+   :parallel-build {:added "1.7.189"}
+   :watch-fn {:added "0.0-3030"}
+   :watch-error-fn {:added "1.9.454"}
+   ;; TODO: :npm-deps {:added ""}
+
+   ;; Compiler Options (Undocumented)
+   :dump-core {:added "1.7.10"}
+   :ups-externs {:added "0.0-993"}
+   :ups-foreign-libs {:added "0.0-993"}
+   :ups-libs {:added "0.0-993"}
+   :warning-handlers {:added "1.7.10"}
+   :browser-repl {:added "1.9.183"}
+   :cache-analysis-format {:added "1.9.454"}
+   :infer-externs {:added "1.9.456"}
+   :closure-generate-exports {:added "1.9.473"}
+   :emit-constants {:added "0.0-2014"}
+   :use-only-custom-externs {:added "0.0-971"}
+
+   ;; REPL Options
+   :analyze-path {:added "0.0-1552"}
+   :def-emits-var {:added "1.7.10"}
+   :repl-requires {:added "0.0-3115"}
+   :repl-verbose {:added "0.0-2719"}
+   :watch {:added "0.0-2850"}
+
+   ;; REPL Options (undocumented)
+   :bind-err {:added "0.0-3148"}
+   :caught {:added "0.0-2911"}
+   :compiler-env nil
+   :eval nil
+   :flush nil
+   :init nil
+   :need-prompt nil
+   :print nil
+   :print-no-newline nil
+   :prompt nil
+   :quit-prompt nil
+   :read nil
+   :reader nil
+   :source-map-inline {:added "0.0-2911"}
+   :wrap nil})


test(spec): add tests for spec validation

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

--- test/asset_minifier/spec_test.clj
+++ test/asset_minifier/spec_test.clj
@@ -0,0 +1,31 @@
+(ns asset-minifier.spec-test
+  (:require [clojure.test :refer :all]
+            [clojure.spec.alpha :as s]
+            [asset-minifier.spec :as spec]))
+
+(deftest spec-test
+  (testing "path spec"
+    (is (s/valid? ::spec/path "path"))
+    (is (s/valid? ::spec/path ["vector" "of" "paths"]))
+    (is (not (s/valid? ::spec/path :some-thing-else))))
+
+  (testing "config body"
+    (is (s/valid? ::spec/config-body {:source "str" :target "str"}))
+    (is (s/valid? ::spec/config-body {:source ["str"] :target ["str"]}))
+    (is (not (s/valid? ::spec/config-body {:source "source"})))
+    (is (not (s/valid? ::spec/config-body {:target "target"}))))
+
+  (testing "asset type"
+    (is (s/valid? ::spec/asset-type :html))
+    (is (s/valid? ::spec/asset-type :css))
+    (is (s/valid? ::spec/asset-type :js))
+    (is (not (s/valid? ::spec/asset-type :not-known))))
+
+  (testing "is-valid-config"
+    (is (spec/is-valid-config [[:html {:source "str" :target "str"}]]))
+    (is (spec/is-valid-config [[:html {:source "str" :target "str"}]
+                               [:css {:source ["str1" "str2"] :target "str"}]
+                               [:js {:source "str" :target ["str1" "str2"]}]]))
+    (is (not (spec/is-valid-config [[]])))
+    (is (not (spec/is-valid-config [[:html {}]])))))
+


start for is-prime?

start for is-prime?

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/tlight/project-euler.git/'


guarding access to localStorage

guarding access to localStorage

fixes #313

--- support/src/figwheel/client.cljs
+++ support/src/figwheel/client.cljs
@@ -25,16 +25,24 @@
 (def autoload?
   (if (utils/html-env?)
     (fn []
-      (condp = (or (.getItem js/localStorage "figwheel_autoload") "true")
+      (condp = (or (try
+                     (.getItem js/localStorage "figwheel_autoload")
+                     (catch js/Error e
+                       false))
+                   "true")
         "true" true
         "false" false))
     (fn [] true)))

 (defn ^:export toggle-autoload []
   (when (utils/html-env?)
-    (.setItem js/localStorage "figwheel_autoload" (not (autoload?)))
-    (utils/log :info
-               (str "Figwheel autoloading " (if (autoload?) "ON" "OFF")))))
+    (try
+      (.setItem js/localStorage "figwheel_autoload" (not (autoload?)))
+      (utils/log :info
+                 (str "Figwheel autoloading " (if (autoload?) "ON" "OFF")))
+      (catch js/Error e
+        (utils/log :info
+                   (str "Unable to access localStorage"))))))

 (defn console-print [args]
   (.apply (.-log js/console) js/console (into-array args))


CMR-8379 - Create the Generic Document Table (#1606)

* CMR-8379 - Creating a new table for the storage of Generic Metadata as a CMR concept.

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

--- metadata-db-app/src/cmr/metadata_db/migrations/080_add_generic_document_table.clj
+++ metadata-db-app/src/cmr/metadata_db/migrations/080_add_generic_document_table.clj
@@ -0,0 +1,60 @@
+(ns cmr.metadata-db.migrations.080-add-generic-document-table
+  (:require
+   [config.mdb-migrate-helper :as h]))
+
+(defn- create-generic-documents-table
+  []
+  (h/sql
+   "CREATE TABLE METADATA_DB.cmr_generic_documents (
+    id NUMBER,
+    concept_id VARCHAR(255) NOT NULL,
+    native_id VARCHAR(1030) NOT NULL,
+    provider_id VARCHAR(10) NOT NULL,
+    document_name VARCHAR(20) NOT NULL,
+    schema VARCHAR(255) NOT NULL,
+    format VARCHAR(255) NOT NULL,
+    mime_type VARCHAR(255) NOT NULL,
+    metadata BLOB NOT NULL,
+    revision_id INTEGER DEFAULT 1 NOT NULL,
+    revision_date TIMESTAMP WITH TIME ZONE DEFAULT SYSTIMESTAMP NOT NULL,
+    created_at TIMESTAMP WITH TIME ZONE DEFAULT SYSTIMESTAMP NOT NULL,
+    deleted INTEGER DEFAULT 0 NOT NULL,
+    user_id VARCHAR(30),
+    transaction_id INTEGER DEFAULT 0 NOT NULL,
+
+    CONSTRAINT generic_doc_pk PRIMARY KEY (id),
+
+    CONSTRAINT gen_doc_cid_rev UNIQUE (concept_id, revision_id)
+    USING INDEX (create unique index generic_cri
+    ON cmr_generic_documents (concept_id, revision_id)))"))
+
+(defn- create-generic-document-indices
+  []
+  ;; Supports queries to find generic documents that have been deleted
+  (h/sql
+   "CREATE INDEX generic_documents_crdi
+    ON METADATA_DB.cmr_generic_documents (concept_id, deleted)")
+
+  ;; Supports queries to find specific generic document matching a native id
+  ;; and revision id within one provider
+  (h/sql
+   "CREATE INDEX generic_documents_native_id_rev
+    ON METADATA_DB.cmr_generic_documents (provider_id, native_id, revision_id)"))
+
+(defn- create-generic-document-sequence
+  []
+  (h/sql "CREATE SEQUENCE cmr_generic_documents_seq"))
+
+(defn up
+  "Migrate the database up to version 80"
+  []
+  (println "cmr.metadata-db.migration.080_add_generic_document_table up...")
+  (create-generic-documents-table)
+  (create-generic-document-indices)
+  (create-generic-document-sequence))
+
+(defn down "Migrate the database down from version 80"
+  []
+  (println "cmr.metadata-db.migration.080_add_generic_document_table down...")
+  (h/sql "DROP SEQUENCE METADATA_DB.cmr_generic_documents_seq")
+  (h/sql "DROP TABLE METADATA_DB.cmr_generic_documents"))


finish up api unit tests for pulses.

finish up api unit tests for pulses.

--- test/metabase/api/pulse_test.clj
+++ test/metabase/api/pulse_test.clj
@@ -146,6 +146,80 @@
       (update :channels (fn [chans]
                           (mapv #(dissoc % :id :pulse_id :created_at :updated_at) chans)))))

+
+;; ## PUT /api/pulse
+
+(expect {:errors {:name "field is a required param."}}
+  ((user->client :rasta) :put 400 "pulse/1" {}))
+
+(expect {:errors {:cards "field is a required param."}}
+  ((user->client :rasta) :put 400 "pulse/1" {:name "abc"}))
+
+(expect {:errors {:cards "Invalid value 'foobar' for 'cards': value must be an array."}}
+  ((user->client :rasta) :put 400 "pulse/1" {:name  "abc"
+                                             :cards "foobar"}))
+
+(expect {:errors {:cards "Invalid value 'abc' for 'cards': array value must be a map."}}
+  ((user->client :rasta) :put 400 "pulse/1" {:name  "abc"
+                                             :cards ["abc"]}))
+
+(expect {:errors {:channels "field is a required param."}}
+  ((user->client :rasta) :put 400 "pulse/1" {:name "abc"
+                                             :cards [{:id 100} {:id 200}]}))
+
+(expect {:errors {:channels "Invalid value 'foobar' for 'channels': value must be an array."}}
+  ((user->client :rasta) :put 400 "pulse/1" {:name    "abc"
+                                             :cards   [{:id 100} {:id 200}]
+                                             :channels "foobar"}))
+
+(expect {:errors {:channels "Invalid value 'abc' for 'channels': array value must be a map."}}
+  ((user->client :rasta) :put 400 "pulse/1" {:name     "abc"
+                                             :cards    [{:id 100} {:id 200}]
+                                             :channels ["abc"]}))
+
+(expect-let [pulse (new-pulse :channels [{:channel_type  "email"
+                                          :schedule_type "daily"
+                                          :schedule_hour 12
+                                          :schedule_day  nil
+                                          :recipients    []}])
+             card  (new-card)]
+  {:name         "Updated Pulse"
+   :public_perms common/perms-readwrite
+   :creator_id   (user->id :crowberto)
+   :creator      (user-details (fetch-user :crowberto))
+   :created_at   true
+   :updated_at   true
+   :cards        [(pulse-card-details card)]
+   :channels     [{:channel_type  "slack"
+                   :schedule_type "hourly"
+                   :schedule_hour nil
+                   :schedule_day  nil
+                   :details       {:channels "#general"}
+                   :recipients    []}]}
+  (-> (pulse-response ((user->client :rasta) :put 200 (format "pulse/%d" (:id pulse)) {:name     "Updated Pulse"
+                                                                                :cards    [{:id (:id card)}]
+                                                                                :channels [{:channel_type  "slack"
+                                                                                :schedule_type "hourly"
+                                                                                :schedule_hour 12
+                                                                                :schedule_day  "mon"
+                                                                                :recipients    []
+                                                                                :details       {:channels "#general"}}]}))
+      (update :channels (fn [chans]
+                          (mapv #(dissoc % :id :pulse_id :created_at :updated_at) chans)))))
+
+
+;; ## DELETE /api/pulse/:id
+(expect-let [pulse (new-pulse :channels [{:channel_type  "email"
+                                          :schedule_type "daily"
+                                          :schedule_hour 12
+                                          :schedule_day  nil
+                                          :recipients    [{:id (user->id :rasta)}]}])]
+  nil
+  (do
+    ((user->client :rasta) :delete 204 (format "pulse/%d" (:id pulse)))
+    (pulse/retrieve-pulse (:id pulse))))
+
+
 ;; ## GET /api/pulse

 (expect-let [_      (delete-existing-pulses)
@@ -161,144 +235,3 @@
 (expect-let [pulse1 (new-pulse)]
   (pulse-details pulse1)
   ((user->client :rasta) :get 200 (format "pulse/%d" (:id pulse1))))
-
-;(expect-eval-actual-first
-;    (match-$ (sel :one EmailReport (order :id :DESC))
-;      {:description nil
-;       :email_addresses ""
-;       :schedule {:days_of_week {:mon true
-;                                 :tue true
-;                                 :wed true
-;                                 :thu true
-;                                 :fri true
-;                                 :sat true
-;                                 :sun true}
-;                  :timezone ""
-;                  :time_of_day "morning"}
-;       :recipients [(match-$ (fetch-user :lucky)
-;                      {:email "lucky@metabase.com"
-;                       :first_name "Lucky"
-;                       :last_login $
-;                       :is_superuser false
-;                       :id $
-;                       :last_name "Pigeon"
-;                       :date_joined $
-;                       :common_name "Lucky Pigeon"})]
-;       :organization_id @org-id
-;       :name "My Cool Email Report"
-;       :mode (emailreport/mode->id :active)
-;       :creator_id (user->id :rasta)
-;       :updated_at $
-;       :dataset_query {:database (:id @test-db)
-;                       :query {:limit nil
-;                               :breakout [nil]
-;                               :aggregation ["rows"]
-;                               :filter [nil nil]
-;                               :source_table (table->id :venues)}
-;                       :type "query"}
-;       :id $
-;       :version 1
-;       :public_perms common/perms-readwrite
-;       :created_at $})
-;  (create-email-report))
-
-;;; ## GET /api/emailreport/:id
-;(expect-eval-actual-first
-;    (match-$ (sel :one EmailReport (order :id :DESC))
-;      {:description nil
-;       :email_addresses ""
-;       :can_read true
-;       :schedule {:days_of_week {:mon true
-;                                 :tue true
-;                                 :wed true
-;                                 :thu true
-;                                 :fri true
-;                                 :sat true
-;                                 :sun true}
-;                  :timezone ""
-;                  :time_of_day "morning"}
-;       :creator (match-$ (fetch-user :rasta)
-;                  {:common_name "Rasta Toucan"
-;                   :date_joined $
-;                   :last_name "Toucan"
-;                   :id $
-;                   :is_superuser false
-;                   :last_login $
-;                   :first_name "Rasta"
-;                   :email "rasta@metabase.com"})
-;       :recipients [(match-$ (fetch-user :lucky)
-;                      {:email "lucky@metabase.com"
-;                       :first_name "Lucky"
-;                       :last_login $
-;                       :is_superuser false
-;                       :id $
-;                       :last_name "Pigeon"
-;                       :date_joined $
-;                       :common_name "Lucky Pigeon"})]
-;       :can_write true
-;       :organization_id @org-id
-;       :name "My Cool Email Report"
-;       :mode (emailreport/mode->id :active)
-;       :organization {:id @org-id
-;                      :slug "test"
-;                      :name "Test Organization"
-;                      :description nil
-;                      :logo_url nil
-;                      :report_timezone nil
-;                      :inherits true}
-;       :creator_id (user->id :rasta)
-;       :updated_at $
-;       :dataset_query {:database (:id @test-db)
-;                       :query {:limit nil
-;                               :breakout [nil]
-;                               :aggregation ["rows"]
-;                               :filter [nil nil]
-;                               :source_table (table->id :venues)}
-;                       :type "query"}
-;       :id $
-;       :version 1
-;       :public_perms common/perms-readwrite
-;       :created_at $})
-;  (let [{id :id} (create-email-report)]
-;    ((user->client :rasta) :get 200 (format "emailreport/%d" id))))
-;
-;;; ## DELETE /api/emailreport/:id
-;(let [er-name (random-name)
-;      er-exists? (fn [] (exists? EmailReport :name er-name))]
-;  (expect-eval-actual-first
-;      [false
-;       true
-;       false]
-;    [(er-exists?)
-;     (do (create-email-report :name er-name)
-;         (er-exists?))
-;     (let [{id :id} (sel :one EmailReport :name er-name)]
-;       ((user->client :rasta) :delete 204 (format "emailreport/%d" id))
-;       (er-exists?))]))
-;
-;
-;;; ## RECPIENTS-RELATED TESTS
-;;; *  Check that recipients are returned by GET /api/emailreport/:id
-;;; *  Check that we can set them via PUT /api/emailreport/:id
-;(expect
-;    [#{}
-;     #{:rasta}
-;     #{:crowberto :lucky}
-;     #{}]
-;  (with-temp EmailReport [{:keys [id]} {:creator_id      (user->id :rasta)
-;                                        :name            (random-name)
-;                                        :organization_id @org-id
-;                                        :dataset_query   {}
-;                                        :schedule        {}}]
-;    (symbol-macrolet [get-recipients (->> ((user->client :rasta) :get 200 (format "emailreport/%d" id))
-;                                          :recipients
-;                                          (map :id)
-;                                          (map id->user)
-;                                          set)]
-;      (let [put-recipients (fn [& user-kws]
-;                             ((user->client :rasta) :put 200 (format "emailreport/%d" id) {:recipients (map user->id user-kws)})
-;                             get-recipients)]
-;        [get-recipients
-;         (put-recipients :rasta)
-;         (put-recipients :lucky :crowberto)
-;         (put-recipients)]))))


Add queue error handler that logs and acks the given message if consumers throws an exception

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


variance

variance

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/clojure-ml/cml.git/'


Show coaching groups by users

Show coaching groups by users

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


updated Selmer dependency to the latest version

--- luminus/hello/project.clj
+++ luminus/hello/project.clj
@@ -6,7 +6,7 @@
    [lib-noir "0.5.5"]
    [compojure "1.1.5"]
    [ring-server "0.2.8"]
-   [selmer "0.2.4"]
+   [selmer "0.3.6"]
    [com.taoensso/timbre "1.6.0"]
    [com.postspectacular/rotor "0.1.0"]
    [com.taoensso/tower "1.5.1"]
@@ -37,4 +37,4 @@
   [[lein-ring "0.8.5"]]
   :description
   "FIXME: write description"
-  :min-lein-version "2.0.0")+  :min-lein-version "2.0.0")


[WM] remove unused requires in queue ns

[WM] remove unused requires in queue ns

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


Clojure profiles.clj file used to set up REPL cidre support for lein usage

fatal: unable to access 'https://github.com/wiremoons/GenIsys-RedHat.git/': The requested URL returned error: 403


azken-iruzkinak-lortu entzun-ekin

azken-iruzkinak-lortu entzun-ekin

fatal: unable to access 'https://github.com/lnmnd/magnet.bez.git/': The requested URL returned error: 403


Iruzkina bidali eta datu horiekin eguneratu

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


slave resources

slave resources

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/jchli/jepsen-aurora.git/'


Added my solution

Added my solution

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

--- src/main/clj/clojure_club/x113_making_data_dance/jonathanromrell.clj
+++ src/main/clj/clojure_club/x113_making_data_dance/jonathanromrell.clj
@@ -0,0 +1,17 @@
+(ns clojure-club.x113-making-data-dance.jonathanromrell
+  (:require [clojure.string :refer :all])
+  (:import (clojure.lang Seqable)))
+
+(def f (fn [& nums]
+         (reify Seqable
+           (seq [this] (when nums (distinct nums)))
+           (toString [this] (join ", " (sort nums))))))
+
+(assert (= "1, 2, 3" (str (f 2 1 3))))
+(assert (= '(2 1 3) (seq (f 2 1 3))))
+(assert (= '(2 1 3) (seq (f 2 1 3 3 1 2))))
+(assert (= '(1) (seq (apply f (repeat 5 1)))))
+(assert (= "1, 1, 1, 1, 1" (str (apply f (repeat 5 1)))))
+(assert (and (= nil (seq (f)))
+             (=  "" (str (f)))))
+(prn "Ran successfully!")


added demo walkthrough

added demo walkthrough

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


Create clojure.clj

Create clojure.clj

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

--- clojure.clj
+++ clojure.clj
@@ -0,0 +1,13 @@
+(fn [state time-left]
+  (let [command-options [[{:cmd \"SMOKESCREEN\"}]
+                         [{:cmd  \"SHOOT\"
+                           :metadata  {:direction (rand-nth  [0 1 2 3 4 5 6 7])}}]
+                         [{:cmd  \"MOVE\"
+                           :metadata  {:direction (rand-nth  [0 1 2 3 4 5 6 7])}}]
+                         [{:cmd  \"MOVE\"
+                           :metadata  {:direction (rand-nth  [0 1 2 3 4 5 6 7])}}]
+                         [{:cmd  \"MOVE\"
+                           :metadata  {:direction (rand-nth  [0 1 2 3 4 5 6 7])}}]
+                         [{:cmd  \"MOVE\"
+                           :metadata  {:direction (rand-nth  [0 1 2 3 4 5 6 7])}}]]]
+    {:commands (rand-nth command-options)}))


fix issue with function visibility.

fix issue with function visibility.

--- src/metabase/driver/generic_sql/util.clj
+++ src/metabase/driver/generic_sql/util.clj
@@ -77,7 +77,7 @@
     (keyword field-name)))

 ;; TODO - should we memoize this?
-(defn- field-id->kw
+(defn field-id->kw
   "Given a metabase `Field` ID, return a keyword for use in the Korma form (or a casted raw string for date fields)."
   [field-id]
   {:pre [(integer? field-id)]}


Create onyx.job: job helper functions like add-task

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

--- src/onyx/job.clj
+++ src/onyx/job.clj
@@ -0,0 +1,15 @@
+(ns onyx.job
+  (:require [schema.core :as s]
+            [onyx.schema :as os]))
+
+(s/defn ^:always-validate add-task :- os/Job
+  "Adds a task's task-definition to a job"
+  [{:keys [lifecycles triggers windows flow-conditions] :as job}
+   {:keys [task schema] :as task-definition}]
+  (when schema (s/validate schema task))
+  (cond-> job
+    true (update :catalog conj (:task-map task))
+    lifecycles (update :lifecycles into (:lifecycles task))
+    triggers (update :triggers into (:triggers task))
+    windows (update :windows into (:windows task))
+    flow-conditions (update :flow-conditions into (:flow-conditions task))))


fix boot script

fix boot script

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/yantonov/paging-task.git/'


Edited and removed uniprot protein labels file

File is deleted after separating the uniprot swissprot and trembl files
into their own files

fatal: unable to access 'https://github.com/bill-baumgartner/kabob.git/': The requested URL returned error: 403


Increase Datomic transaction timeout to 60s

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


Version 1.12.0-SNAPSHOT

Version 1.12.0-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/starcity-properties/odin.git/'


Removed noise from project

Removed noise from project

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/thinktopic/netlib-ccm.git/'