actually, don't use :no-cast and :cast-include-as options

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -82,15 +82,16 @@
   (match field-ids
     []    nil ; empty clause
     [nil] nil ; empty clause
-    _     `[(group  ~@(map field-id->kw field-ids))
-            (fields ~@(map #(field-id->kw % :cast-include-as) field-ids))]))
+    _     (let [field-names (map field-id->kw field-ids)]
+            `[(group  ~@field-names)
+              (fields ~@field-names)])))

 ;; ### `:fields`
 ;; ex.
 ;;
 ;;     [1412 1413]
 (defmethod apply-form :fields [[_ field-ids]]
-  (let [field-names (map #(field-id->kw % :cast-include-as) field-ids)]
+  (let [field-names (map field-id->kw field-ids)]
     `(fields ~@field-names)))

 ;; ### `:filter`
@@ -147,9 +148,9 @@
          (mapv (fn [[field-id asc-desc]]
                  {:pre [(integer? field-id)
                         (string? asc-desc)]}
-                 `(order ~(field-id->kw field-id :no-cast) ~(case asc-desc
-                                                              "ascending" :ASC
-                                                              "descending" :DESC)))))))
+                 `(order ~(field-id->kw field-id) ~(case asc-desc
+                                                     "ascending" :ASC
+                                                     "descending" :DESC)))))))

 ;; ### `:page`
 ;; ex.
@@ -184,35 +185,23 @@
   "Wrap Field in a SQL `CAST` statement if needed (i.e., it's a `DateTimeField`).

     (castify :name \"TextField\")                      -> :name
-    (castify :date \"DateTimeField\")                  -> (raw \"CAST(\"date\" AS DATE)
-    (castify :date \"DateTimeField\" :cast-include-as) -> (raw \"CAST(\"date\" AS DATE) AS \"date\"\")"
-  [field-name field-base-type & options]
+    (castify :date \"DateTimeField\")                  -> (raw \"CAST(\"date\" AS DATE)"
+  [field-name field-base-type]
   {:pre [(string? field-name)
-         (string? field-base-type)
-         (every? keyword? options)]}
-  (let [options (set options)]
-    (if (or (= field-base-type "DateField")                      ; do we need to cast DateFields ?
-            (= field-base-type "DateTimeField"))                 ; or just DateTimeFields ?
-      `(raw ~(format "CAST(\"%s\" AS DATE)%s" field-name (if (contains? options :cast-include-as) (format " AS \"%s\"" field-name)
-                                                             "")))
-      (keyword field-name))))
+         (string? field-base-type)]}
+  (if (or (= field-base-type "DateField")              ; do we need to cast DateFields ?
+          (= field-base-type "DateTimeField"))         ; or just DateTimeFields ?
+    `(raw ~(format "CAST(\"%s\" AS DATE)" field-name))
+    (keyword field-name)))

 ;; TODO - should we memoize this?
 (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).
-
-   OPTIONS
-   *  `:no-cast`         Disable casting for this `Field`, even if it's a date. (i.e., for ordering, we probably don't want to cast away relevant parts of the timestamp).
-   *  `:cast-include-as` If `Field` is casted, add an `AS \"original-field-name\"` to the cast (i.e, for `SELECT` clauses)."
-  [field-id & options]
-  {:pre [(integer? field-id)
-         (every? keyword? options)
-         (every? (partial contains? #{:no-cast :cast-include-as}) options)]}
-  (let [options (set options)]
-    (if-let [{field-name :name, field-type :base_type} (sel :one [Field :name :base_type] :id field-id)]
-      (if (contains? options :no-cast) (keyword field-name)
-          (apply castify-field field-name field-type options))
-      (throw (Exception. (format "Field with ID %d doesn't exist!" field-id))))))
+  "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)]}
+  (if-let [{field-name :name, field-type :base_type} (sel :one [Field :name :base_type] :id field-id)]
+    (castify-field field-name field-type)
+    (throw (Exception. (format "Field with ID %d doesn't exist!" field-id)))))

 ;; ## Debugging Functions (Internal)


Ensure records have OT loss values when reducing the values

This check was dropped in commit 0627a75dedb758213d83241681b2ed8ff39191bc
but it's safest to keep it.

--- src/nhl_score_api/fetchers/nhlstats/game_scores.clj
+++ src/nhl_score_api/fetchers/nhlstats/game_scores.clj
@@ -193,7 +193,9 @@
         losing-team (if (= winning-team home-team) away-team home-team)
         winning-team-current-record (get records winning-team)
         losing-team-current-record (get records losing-team)
+        records-have-ot (contains? losing-team-current-record :ot)
         ot-loss (and
+                  records-have-ot
                   (non-playoff-game? api-game)
                   (or (contains? scores :overtime) (contains? scores :shootout)))
         loss-key (if ot-loss :ot :losses)]


Add cheat sheet

Add cheat sheet

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

--- src/workshop/cheat_sheet.clj
+++ src/workshop/cheat_sheet.clj
@@ -0,0 +1,147 @@
+(ns workshop.cheat-sheet)
+;;;;;;;; CHEAT SHEET ;;;;;;;;
+
+;;;;;;;;;;;;;;;;;
+;; Workflow example
+
+; :A is an input task
+; :C is an output task
+; :B is a function task
+; The flow is:
+; :A -> :B -> :C
+(def workflow
+  [[:A :B]
+   [:B :C]])
+
+;;;;;;;;;;;;;;;;;
+;; Catalog Entries
+;; See information model for allowed keys:
+;; https://onyx-platform.gitbooks.io/onyx/content/doc/user-guide/information-model.html
+
+[;; Input task
+ {:onyx/name :your-input-task-name
+  :onyx/plugin :path-to-plugin-builder/function
+  :onyx/type :input
+  :onyx/medium :plugin-medium
+  ;; task will read up to batch-size segments at a time
+  :onyx/batch-size 20
+  ;; task will wait no longer than batch-timeout to read segments
+  :onyx/batch-timeout 1000
+  ;; enable to restrict the number of peers working on this task
+  ; :onyx/max-peers 1
+  ;; enable to force a minumum number of peers onto this task
+  ; :onyx/min-peers 1
+  :onyx/doc "Documentation for this catalog entry"}
+
+ ;; Function task
+ ;; https://onyx-platform.gitbooks.io/onyx/content/doc/user-guide/functions.html
+ {:onyx/name :your-task-name
+  :onyx/fn :your-ns/your-fn ; ::your-fn also works if you're in the generating ns
+  :onyx/type :function
+  ;; Add a parameter to your-fn from catalog entry e.g. (fn [v segment])
+  ; :onyx/params [:some/key]
+  ; :some/key 3
+  :onyx/batch-size 20
+  :onyx/batch-timeout 1000
+  :onyx/doc "Returns the segment"}
+
+ ;; Group by Key task
+ {:onyx/name :group-by-key-task-name
+  :onyx/fn ::your-fn
+  :onyx/type :function
+  :onyx/group-by-key :name
+  :onyx/min-peers 3
+  :onyx/batch-size 20
+  :onyx/batch-timeout 1000
+  :onyx/flux-policy :continue}
+
+ ;; Group by Function task
+ {:onyx/name :group-by-fn-task-name
+  :onyx/fn ::your-fn
+  :onyx/type :function
+  :onyx/group-by-fn :your-ns/your-grouping-function
+  :onyx/min-peers 3
+  :onyx/flux-policy :continue
+  :onyx/batch-size 20
+  :onyx/batch-timeout 1000}
+
+ ;; Output task
+ {:onyx/name :your-output-task-name
+  :onyx/plugin :path-to-plugin-builder/function
+  :onyx/type :output
+  :onyx/medium :plugin-medium
+  :onyx/batch-size 20
+  :onyx/batch-timeout 1000
+  :onyx/doc "Output task doc"}]
+
+;;;;;;;;;;;;;;;;;
+;; https://onyx-platform.gitbooks.io/onyx/content/doc/user-guide/functions.html
+;; Functions (for use on onyx/fn task)
+(defn your-fn [segment]
+  ;; do something with the segment and return a segment
+  (update segment :n inc))
+
+;;;;;;;;;;;;;;;;;
+;; Lifecycles
+;; https://onyx-platform.gitbooks.io/onyx/content/doc/user-guide/lifecycles.html
+
+;; Lifecycle function examples for each lifecycle type
+;; Notice that all lifecycle functions return maps except `start-task?`.
+(defn start-task? [event lifecycle]
+  (println "Executing once before the task starts.")
+  true)
+
+(defn before-task-start [event lifecycle]
+  (println "Executing once before the task starts.")
+  {})
+
+(defn after-task-stop [event lifecycle]
+  (println "Executing once after the task is over.")
+  {})
+
+(defn before-batch [event lifecycle]
+  (println "Executing once before each batch.")
+  {})
+
+(defn after-batch [event lifecycle]
+  (println "Executing once after each batch.")
+  {})
+
+(defn after-ack-segment [event message-id rets lifecycle]
+  (println "Message " message-id " is fully acked"))
+
+(defn after-retry-segment [event message-id rets lifecycle]
+  (println "Retrying message " message-id))
+
+;; Lifecycle calls example.
+;; Lifecycle calls map the lifecycle name to a function to call
+(def calls
+  {:lifecycle/start-task? start-task?
+   :lifecycle/before-task-start before-task-start
+   :lifecycle/before-batch before-batch
+   :lifecycle/after-batch after-batch
+   :lifecycle/after-task-stop after-task-stop
+   :lifecycle/after-ack-segment after-ack-segment
+   :lifecycle/after-retry-segment after-retry-segment})
+
+;; Lifecycle entries map lifecycle calls to the tasks they should be run on.
+;; The entries are submitted as part of the job data
+(def lifecycles
+  [{:lifecycle/task :all ;; task-name or :all to use with all tasks
+    :lifecycle/calls ::calls
+    :lifecycle/doc "Lifecycle calls doc"}])
+
+;;;;;;;;;;;;;;;;;
+;; Flow Conditions
+;; https://onyx-platform.gitbooks.io/onyx/content/doc/user-guide/flow-conditions.html
+
+(def flow-conditions
+  [{:flow/from :from-task
+    :flow/to [:to-task1 :to-task2] ;; :all will direct to all tasks
+    :my/parameter 17
+    :flow/predicate [:my.ns/my-predicate-fn? :my/parameter]
+    :flow/doc "Emits segment if my-predicate-fn? is true for the segment
+              (in this case (:some-key segment) = 17)"}])
+
+(defn my-predicate-fn? [event old-segment new-segment all-new-segments parameter]
+  (= (:some-key new-segment) parameter))


Forgot a test file.

Forgot a test file.

error: pathspec 'test_projects/tricky-name/src/org/domain/tricky_name/brunch.clj' did not match any file(s) known to git

--- test_projects/tricky-name/src/org/domain/tricky_name/brunch.clj
+++ test_projects/tricky-name/src/org/domain/tricky_name/brunch.clj
@@ -0,0 +1,4 @@
+(ns org.domain.tricky-name.brunch)
+
+(defn -main [& args]
+  (spit "/tmp/lein-test" "BRUNCH"))


Add popup styling

Add popup styling

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


more descriptive function names

more descriptive function names

--- sidecar/src/figwheel_sidecar/components/figwheel_server.clj
+++ sidecar/src/figwheel_sidecar/components/figwheel_server.clj
@@ -232,13 +232,13 @@
         (map (juxt :id identity)
              (if (map? all-builds) (vals all-builds) all-builds))))

-(defn log-writer [figwheel-options]
+(defn extract-log-writer [figwheel-options]
   (let [logfile-path (or (:server-logfile figwheel-options) "figwheel_server.log")]
     (if (false? (:repl figwheel-options))
       *out*
       (io/writer logfile-path :append true))))

-(defn cljs-build-fn [{:keys [cljs-build-fn]}]
+(defn extract-cljs-build-fn [{:keys [cljs-build-fn]}]
   (or (utils/require-resolve-handler cljs-build-fn)
       ;; should probably make a separate file of build function examples
       (when-let [default-handler (resolve 'figwheel-sidecar.components.cljs-autobuild/figwheel-build)]
@@ -252,6 +252,6 @@
         initial-state       (create-initial-state prepped-fig-options)
         figwheel-opts (assoc initial-state
                              :builds all-builds
-                             :log-writer    (log-writer prepped-fig-options)
-                             :cljs-build-fn (cljs-build-fn prepped-fig-options))]
+                             :log-writer    (extract-log-writer prepped-fig-options)
+                             :cljs-build-fn (extract-cljs-build-fn prepped-fig-options))]
     (map->FigwheelServer figwheel-opts)))


state now integrated into pipeline

state now integrated into pipeline

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


Added little sphere intersection ascii-art project.

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

--- clojure/ThreeDeeIntersect.clj
+++ clojure/ThreeDeeIntersect.clj
@@ -0,0 +1,46 @@
+;; Copyright 2014 Glen Peterson
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License");
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;    http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
+;; You really want a terminal 100 chars wide by exactly 45 high to see this
+;; properly.
+(defn showSphere
+      "Displays the intersection of the given sphere (x, y, z) center points
+       and radius r against the plane z=0 in somewhat anti-aliased ASCII art"
+      [h k l r]
+      (println ";;  y|     x=10|       20|       30|       40|       50|       60|       70|       80|       90|")
+      (dotimes [y 44]
+        (print ";;" (if (< y 10) (str " " y) y))
+        (dotimes [x 94]
+          (let [z 0
+                ;; [(x-h)^2 + (y-k)^2 + (z-l)^2] - r^2
+                dSphere (- (+ (Math/pow (- x h) 2.0)
+                              (Math/pow (- y k) 2.0)
+                              (Math/pow (- z l) 2.0))
+                              (Math/pow r 2.0))
+                av (Math/abs dSphere)
+               ]
+               (print (cond (< av 0) " "
+                            (< av 1) "@"
+                            (< av 10) "*"
+                            (< av 40) "'"
+                            (= 0 (rem x 10)) "|"
+                            (= 0 (rem y 10)) "-"
+                            :else " "))))
+        (println)))
+
+(dotimes [t 61]
+         (showSphere (+ 40 (* 20 (Math/sin (* t (/ Math/PI 30)))))
+                     (+ 20 (* 10 (Math/cos (* t (/ Math/PI 20)))))
+                     (- t 30) 30)
+         (Thread/sleep (if (< t 7) (- 300 (* 30 t)) 150)))


Added utils file and namespace to hold dissoc-in function

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

--- src-browser/simplestrat/utils.cljs
+++ src-browser/simplestrat/utils.cljs
@@ -0,0 +1,15 @@
+(ns simplestrat.utils)
+
+(defn dissoc-in
+  "Dissociates an entry from a nested associative structure returning a new
+  nested structure. keys is a sequence of keys. Any empty maps that result
+  will not be present in the new structure."
+  [m [k & ks :as keys]]
+  (if ks
+    (if-let [nextmap (get m k)]
+      (let [newmap (dissoc-in nextmap ks)]
+        (if (seq newmap)
+          (assoc m k newmap)
+          (dissoc m k)))
+      m)
+    (dissoc m k)))


CMR-205: Added tests for collection collection-data-type search.

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

--- test/cmr/system_int_test/search/collection_collection_data_type_search_test.clj
+++ test/cmr/system_int_test/search/collection_collection_data_type_search_test.clj
@@ -0,0 +1,67 @@
+(ns cmr.system-int-test.search.collection-collection-data-type-search-test
+  "Integration test for CMR collection search by collection data type"
+  (: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.core :as d]))
+
+(use-fixtures :each (ingest/reset-fixture "CMR_PROV1"))
+
+(deftest search-by-collection-data-type
+  (let [coll1 (d/ingest "CMR_PROV1" (dc/collection {:collection-data-type "NEAR_REAL_TIME"}))
+        coll2 (d/ingest "CMR_PROV1" (dc/collection {:collection-data-type "SCIENCE_QUALITY"}))
+        coll3 (d/ingest "CMR_PROV1" (dc/collection {:collection-data-type "OTHER"}))
+        coll4 (d/ingest "CMR_PROV1" (dc/collection {}))]
+
+    (index/refresh-elastic-index)
+
+    (testing "search by collection data type."
+      (are [value items] (d/refs-match? items (search/find-refs :collection {:collection-data-type value}))
+           "NEAR_REAL_TIME" [coll1]
+           "SCIENCE_QUALITY" [coll2 coll4]
+           "OTHER" [coll3]
+           "near_real_time" [coll1]
+           "science_quality" [coll2 coll4]
+           "Other" [coll3]
+           ["NEAR_REAL_TIME" "OTHER"] [coll1 coll3]
+           "BLAH" []))
+
+    (testing "search by collection data type NEAR_REAL_TIME aliases."
+      (are [value items] (d/refs-match? items (search/find-refs :collection {:collection-data-type value}))
+           "near_real_time" [coll1]
+           "nrt" [coll1]
+           "NRT" [coll1]
+           "near real time" [coll1]
+           "near-real time" [coll1]
+           "near-real-time" [coll1]
+           "near real-time" [coll1]))
+
+    (testing "search by collection data type case default is ignore case true."
+      (is (d/refs-match? [coll3]
+                         (search/find-refs :collection
+                                           {:collection-data-type "other"}))))
+
+    (testing "search by collection data type ignore case false."
+      (is (d/refs-match? []
+                         (search/find-refs :collection
+                                           {:collection-data-type "science_quality"
+                                            "options[collection-data-type][ignore-case]" "false"}))))
+
+    (testing "search by collection data type ignore case true"
+      (is (d/refs-match? [coll2 coll4]
+                         (search/find-refs :collection
+                                           {:collection-data-type "science_quality"
+                                            "options[collection-data-type][ignore-case]" "true"}))))
+
+    (testing "search by collection data type, options :and false."
+      (is (d/refs-match? [coll1 coll3]
+                         (search/find-refs :collection {"collection-data-type[]" ["NEAR_REAL_TIME" "OTHER"]
+                                                        "options[collection-data-type][and]" "false"}))))
+
+    (testing "search by collection data type, options :and true."
+      (is (d/refs-match? []
+                         (search/find-refs :collection
+                                           {"collection-data-type[]" ["NEAR_REAL_TIME" "OTHER"]
+                                            "options[collection-data-type][and]" "true"}))))))


CMR-2274: Modfied tests to make it easier to add formats as they are supported.

--- umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.clj
+++ umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.clj
@@ -23,18 +23,18 @@
   "Seq of formats to use in round-trip conversion and XML validation tests."
   [:dif :dif10 :echo10 :iso19115 :iso-smap])

-; TODO Add these one by one as the format-to-format conversions get fixed
-; (def format-examples
-;   "Map of format type to example file"
-;   {:dif "dif.xml"
-;    :dif10 "dif10.xml"
-;    :echo10 "echo10.xml"
-;    :iso19115 "iso19115.xml"
-;    :iso-smap "iso_smap.xml"})
+;; TODO add formats here as they are implemented.
+(def destination-formats
+  "Converting to these formats is tested in the roundrobin test."
+  [])

 (def format-examples
   "Map of format type to example file"
-  {})
+  {:dif "dif.xml"
+   :dif10 "dif10.xml"
+   :echo10 "echo10.xml"
+   :iso19115 "iso19115.xml"
+   :iso-smap "iso_smap.xml"})

 (defn xml-round-trip
   "Returns record after being converted to XML and back to UMM through
@@ -54,12 +54,12 @@

 (deftest roundrobin-collection-example-record
   (doseq [[origin-format filename] format-examples
-          dest-format tested-formats
+          :let [metadata (slurp (io/resource (str "example_data/" filename)))
+                umm-c-record (core/parse-metadata :collection origin-format metadata)]
+          dest-format destination-formats
           :when (not= origin-format dest-format)]
     (testing (str origin-format " to " dest-format)
-      (let [metadata (slurp (io/resource (str "example_data/" filename)))
-            umm-c-record (core/parse-metadata :collection origin-format metadata)]
-        (is (= [] (generate-and-validate-xml umm-c-record dest-format :collection)))))))
+      (is (= [] (generate-and-validate-xml umm-c-record dest-format :collection))))))

 (deftest roundtrip-example-record
   (doseq [metadata-format tested-formats]
@@ -89,11 +89,6 @@
           expected-projects-keywords (seq (map iu/generate-title projects))]
       (is (= expected-projects-keywords
              (parse-iso19115-projects-keywords metadata-xml))))))
-
-(defspec umm-c-to-xml 100
-  (for-all [umm-record (gen/no-shrink umm-gen/umm-c-generator)
-            metadata-format (gen/elements tested-formats)]
-    (empty? (generate-and-validate-xml umm-record metadata-format :collection))))

 (comment


Bideak eraikitzea txukundu

Bideak eraikitzea txukundu

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


first commit of a basic dependency system that might end up replacing the event system for booting

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


CMR-3260: Added migration 45 for inserting the initial humanizer concept.

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

--- metadata-db-app/src/migrations/045_insert_initial_humanizer_concept.clj
+++ metadata-db-app/src/migrations/045_insert_initial_humanizer_concept.clj
@@ -0,0 +1,38 @@
+(ns migrations.045-insert-initial-humanizer-concept
+  (:require [config.migrate-config :as config]
+            [config.mdb-migrate-helper :as h]
+            [cmr.metadata-db.data.oracle.concepts]
+            [cmr.metadata-db.data.concepts :as c]
+            [cheshire.core :as json]
+            [cmr.common-app.test.sample-humanizer :as sh]))
+
+(defn- insert-humanizer
+  []
+  (let [provider {:provider-id "CMR"
+                  :short-name "CMR"
+                  :system-level? true
+                  :cmr-only true
+                  :small false}
+        concept {:concept-type :humanizer
+                 :native-id "humanizer"
+                 :metadata (json/generate-string sh/sample-humanizers)
+                 :user-id "migration"
+                 :format "application/json"
+                 :provider-id "CMR"
+                 :concept-id "H12345-CMR"
+                 :revision-id 1
+                 :deleted false}]
+    (c/save-concept (config/db) provider concept)))
+
+(defn up
+  "Migrates the database up to version 45."
+  []
+  (println "migrations.045-insert-initial-humanizer-concept up...")
+  (h/sql "DELETE cmr_humanizers")
+  (insert-humanizer))
+
+(defn down
+  "Migrates the database down from version 45."
+  []
+  (println "migrations.045-insert-initial-humanizer-concept down...")
+  (h/sql "DELETE cmr_humanizers"))


added Nepali translation (#1346)

added Nepali translation (#1346)

added Nepali translation

error: pathspec 'src/status_im/translations/ne.cljs' did not match any file(s) known to git

--- src/status_im/translations/ne.cljs
+++ src/status_im/translations/ne.cljs
@@ -0,0 +1,314 @@
+(ns status-im.translations.ne)
+
+(def translations
+  {
+   ;;common
+   :members-title                         "सदस्यहरु"
+   :not-implemented                       "कार्यान्वयन भएको छैन"
+   :chat-name                             "च्याट नाम"
+   :notifications-title                   "सूचना र ध्वनि"
+   :offline                               "अफलाइन"
+   :search-for                            "॰॰॰ को लागि खोज"
+   :cancel                                "रद्द गर्नुहोस्"
+   :next                                  "अर्को"
+   :type-a-message                        "सन्देश टाइप गरौं ॰॰॰"
+   :type-a-command                        "आदेश टाइप गरौं ॰॰॰"
+   :error                                 "त्रुटि"
+
+   :camera-access-error                   "कृपया क्यामेरा उपयोग गर्न आवश्यक अनुमति प्रदान गर्न, सिस्टम सेटिङ्ग भित्र गएर स्टेटस > क्यमेरा चयन भएको स्थिति निश्चित गर्नुहोस् ।"
+   :photos-access-error                   "कृपया फोटो उपयोग गर्न आवश्यक अनुमति प्रदान गर्न, सिस्टम सेटिङ्ग भित्र गएर स्टेटस > फोटो चयन भएको स्थिति निश्चित गर्नुहोस् ।"
+
+   ;;drawer
+   :invite-friends                        "साथीहरुलाई निम्त्याऔं"
+   :faq                                   "प्राय सोधिने प्रश्नोत्तर"
+   :switch-users                          "उपयोगकर्ता बदलौं"
+   :feedback                              "प्रतिक्रिया"
+   :view-all                              "सबै हेर्ने"
+   :current-network                       "चल्ती नेटवर्क"
+
+   ;;chat
+   :is-typing                             "ले टाइप गर्दै हुनुहुन्छ"
+   :and-you                               "अनि तपाईं"
+   :search-chat                           "च्याटमा खोजौं"
+   :members                               {:one   "१ सदस्य"
+                                           :other "{{count}} सदस्यहरु"
+                                           :zero  "सदस्यहीन"}
+   :members-active                        {:one   "१ सदस्य"
+                                           :other "{{count}} सदस्यहरु"
+                                           :zero  "सदस्यहीन"}
+   :public-group-status                   "सार्वजनिक"
+   :active-online                         "अनलाइन"
+   :active-unknown                        "अज्ञात"
+   :available                             "उपलब्ध"
+   :no-messages                           "सन्देशहरु खाली"
+   :suggestions-requests                  "अनुरोधहरु"
+   :suggestions-commands                  "आदेशहरु"
+   :faucet-success                        "धारा अनुरोध प्राप्त भएको छ"
+   :faucet-error                          "धारा अनुरोध त्रुटि"
+
+   ;;sync
+   :sync-in-progress                      "मिलान भइरहेको छ ॰॰॰"
+   :sync-synced                           "मिलान मा छ"
+
+   ;;messages
+   :status-sending                        "पठाउंदै"
+   :status-pending                        "बाँकी छ"
+   :status-sent                           "पठाइ सकेको"
+   :status-seen-by-everyone               "सबैले हेरिसकेको"
+   :status-seen                           "देखि सकेको"
+   :status-delivered                      "बुझाइएको"
+   :status-failed                         "असफल"
+
+   ;;datetime
+   :datetime-ago-format                   "{{number}} {{time-intervals}} {{ago}}"
+   :datetime-second                       {:one   "सेकेन्ड"
+                                           :other "सेकेन्ड"}
+   :datetime-minute                       {:one   "मिनेट"
+                                           :other "मिनेट"}
+   :datetime-hour                         {:one   "घण्टा"
+                                           :other "घण्टा"}
+   :datetime-day                          {:one   "दिन"
+                                           :other "दिन"}
+   :datetime-multiple                     "से"
+   :datetime-ago                          "पहिले"
+   :datetime-yesterday                    "हिजो"
+   :datetime-today                        "आज"
+
+   ;;profile
+   :profile                               "प्रोफाइल"
+   :edit-profile                          "प्रोफाइल सम्पादन"
+   :report-user                           "उपयोगकर्ताबारे उजुरी पठाउनुहोस्"
+   :message                               "सन्देश"
+   :username                              "उपयोगकर्ता नाम"
+   :not-specified                         "नतोकिएको"
+   :public-key                            "सार्वजनिक सांचो"
+   :phone-number                          "फोन नम्बर"
+   :email                                 "इमेल"
+   :update-status                         "तपाईंको स्टेटस अद्यतन गर्नुहोस् ॰॰॰"
+   :add-a-status                          "नया स्टेटस जोड्नुहोस् ॰॰॰"
+   :status-prompt                         "एउटा स्टेटस बनाउनुहोस् जसद्वारा तपांईले प्रस्ताव गर्नुभएको कुराहरु अरुहरुले थाहापाउन मद्दत पुगोस । तपांईले #ह्यास्ट्याग पनि प्रयोग गर्न सक्नुहुन्छ ।"
+   :add-to-contacts                       "सम्पर्कहरुमा जोड्नुहोस्"
+   :in-contacts                           "सम्पर्कहरुमा समावेस छ"
+   :remove-from-contacts                  "सम्पर्कहरुबाट हटाउनुहोस्"
+   :start-conversation                    "कुराकानी सुरु गर्नुहोस्"
+   :send-transaction                      "कारोबार पठाउनुहोस्"
+   :share-qr                              "QR बांड्नुहोस"
+   :error-incorrect-name                  "कृपया अरुनै नाम चयन गर्नुहोस्"
+   :error-incorrect-email                 "इमेल मिलेन"
+
+   ;;make_photo
+   :image-source-title                    "प्रोफाइल तस्विर"
+   :image-source-make-photo               "खिच्नुहोस"
+   :image-source-gallery                  "ग्यालेरीबाट चयन गर्नुहोस्"
+   :image-source-cancel                   "रद्द गर्नुहोस्"
+
+   ;;sharing
+   :sharing-copy-to-clipboard             "क्लिप्बोर्डमा प्रतिलिपि राख्नुहोस्"
+   :sharing-share                         "बांड्नुहोस् ॰॰॰"
+   :sharing-cancel                        "रद्द गर्नुहोस्"
+
+   :browsing-title                        "ब्राउज"
+   :browsing-browse                       "@ब्राउज"
+   :browsing-open-in-web-browser          "वेब ब्राउजरमा खोल्ने"
+   :browsing-cancel                       "रद्द गर्नुहोस्"
+
+   ;;sign-up
+   :contacts-syncronized                  "तपाईंको सम्पर्कहरु मिलान भयो"
+   :confirmation-code                     (str "धन्यवाद! हामीले तपाईंलाई पुष्टि कोड सहितको सन्देश पठाएका छौं । "
+                                               "कृपया आफ्नो फोन नम्बर पुष्टि गर्न त्यो कोड प्रस्तुत गर्नुहोस् ।")
+   :incorrect-code                        (str "माफ गर्नुहोस्, त्यो कोड गलत रहेछ, कृपया पुनः प्रविष्ट गर्नुहोस्")
+   :generate-passphrase                   (str "तपाईंकोलागि म एउट गुप्तवाक्यांश उन्पन्न गर्छु, ताकि तपाईंले आफ्नो "
+                                               "पहुँच पुनर्स्थापना गर्न सक्नुहुन्छ, अथवा अर्को यन्त्रबाट लग इन गर्न सक्नुहुन्छ ।")
+   :phew-here-is-your-passphrase          "*उफऽऽऽ* त्यो कठिन थियो, तपाईंको गुप्तवाक्यांश प्रस्तुत छ, *यसलाई लेखेर सुरक्षित राख्नुहोस्* आफ्नो खात पुनर्स्थापना गर्न यो अति आवश्यक छ ।"
+   :here-is-your-passphrase               "तपाईंको गुप्तवाक्यांश प्रस्तुत छ, *यसलाई लेखेर सुरक्षित राख्नुहोस्* आफ्नो खात पुनर्स्थापना गर्न यो अति आवश्यक छ ।"
+   :written-down                          "निश्चित गर्नुहोस् कि तपाईंले त्यो सुरक्षित हिसाबले लेखेर राख्नुभयो ।"
+   :phone-number-required                 "यहाँ ट्याप गरेर तपाईंको फोन नम्बर प्रविष्ट गर्नुहोस् अनि म तपाईंको साथीहरु भेट्टाइ दिन्छु ।"
+   :shake-your-phone                      "त्रुटि फेलापार्नुभयो, अथवा सुझाव दिनु छ? बस फोन ~हल्लाउनुहोस्~!"
+   :intro-status                          "तपाईंको खाता सेटअप गर्न र सेटिङ्ग बदल्नको लागि म सँग च्याट गर्नुहोस् ।"
+   :intro-message1                        "स्टेटसमा तपाईंलाई स्वागत छ\nतपाईंको पास्वर्ड सेटअप र सुरुवात गर्नको लागि यो सन्देसमा ट्याप गर्नुहोस् ।"
+   :account-generation-message            "एकै छिन पर्खिनुहोस्, तपाईंको खाता उत्पन्न गर्न केही कठिन हिसाब गर्दै छु!"
+   :move-to-internal-failure-message      "हामीले केही महत्वपूर्ण फाइलहरु बाह्य बाट आन्तरिक भण्डारणमा सार्न आवश्यक छ । यस्को लागि हामीलाई तपाईंको अनुमति चाहिन्छ । भावी संस्करणहरुमा हामी बाह्य भण्डारण प्रयोगमा ल्याउदैनौं ।"
+   :debug-enabled                         "त्रुटिसुधार सर्भर प्रवर्तित भयो! अब तपाईंले *status-dev-cli scan* कार्यान्वयन गरेर एकै नेटवर्कमा रहेको तपाईंको कम्प्युटरबाट सो सर्भर भेट्टाउन सक्नुहुन्छ ।"
+
+   ;;phone types
+   :phone-e164                            "अन्तराष्ट्रिय १"
+   :phone-international                   "अन्तराष्ट्रिय २"
+   :phone-national                        "राष्ट्रिय"
+   :phone-significant                     "महत्वपूर्ण"
+
+   ;;chats
+   :chats                                 "च्याटहरु"
+   :new-chat                              "नया च्याट"
+   :delete-chat                           "च्याट मेटाउने"
+   :new-group-chat                        "नया सामूहिक च्याट"
+   :new-public-group-chat                 "सार्वजनिक च्याटमा भाग लिने"
+   :edit-chats                            "च्याटहरुको सम्पादन"
+   :search-chats                          "च्याटहरुमा खोज"
+   :empty-topic                           "खाली विषय"
+   :topic-format                          "गलत ढाँचा [a-z0-9\\-]+"
+   :public-group-topic                    "विषय"
+
+   ;;discover
+   :discover                              "भेट्टाउनुहोस्"
+   :none                                  "बिना कुनै"
+   :search-tags                           "खोज्ने ट्यागहरु यहाँ टाइप गर्नुहोस्"
+   :popular-tags                          "लोकप्रिय ट्यागहरु"
+   :recent                                "भर्खरको"
+   :no-statuses-discovered                "कुनैपनि स्टेटस भेट्टाइएन"
+   :no-statuses-found                     "कुनैपनि स्टेटस फेलापारिएन "
+
+   ;;settings
+   :settings                              "सेटिङ्गहरु"
+
+   ;;contacts
+   :contacts                              "सम्पर्कहरु"
+   :new-contact                           "नया सम्पर्क"
+   :delete-contact                        "सम्पर्क मेटाउने"
+   :delete-contact-confirmation           "यो सम्पर्क तपाईंको सम्पर्कहरुबाट हटाइने छ"
+   :remove-from-group                     "समूह बाट हटाउने"
+   :edit-contacts                         "सम्पर्क सम्पादन"
+   :search-contacts                       "सम्पर्कहरुमा खोज"
+   :show-all                              "सबै देखाउने"
+   :contacts-group-dapps                  "डीएयापहरु"
+   :contacts-group-people                 "मानिसहरु"
+   :contacts-group-new-chat               "नया च्याट सुरु"
+   :choose-from-contacts                  "सम्पर्कहरुबाट चयन गर्नुहोस्"
+   :no-contacts                           "हाल कुनै सम्पर्कहरु छैनन्"
+   :show-qr                               "QR देखाउने"
+   :enter-address                         "ठेगान प्रविष्ट गर्ने"
+   :more                                  "अरु"
+
+   ;;group-settings
+   :remove                                "हटाउनुहोस्"
+   :save                                  "साँच्नुहोस्"
+   :delete                                "मेटाउनुहोस्"
+   :change-color                          "रंग बदल्नुहोस्"
+   :clear-history                         "इतिहास खाली गर्नुहोस्"
+   :mute-notifications                    "सूचनाहरु मौन बनाउनुहोस्"
+   :leave-chat                            "च्याटबाट बाहिरिनुहोस्"
+   :delete-and-leave                      "मेटाउनुहोस् अनि बाहिरिनुहोस्"
+   :chat-settings                         "च्याट सेटिङ्गहरु"
+   :edit                                  "सम्पादन"
+   :add-members                           "सदस्यहरु जोड्नुहोस्"
+   :blue                                  "नीलो"
+   :purple                                "बैजनी"
+   :green                                 "हरियो"
+   :red                                   "रातो"
+
+   ;;commands
+   :money-command-description             "पैसा पठाउनुहोस्"
+   :location-command-description          "स्थान पठाउनुहोस्"
+   :phone-command-description             "फोन नम्बर पठाउनुहोस्"
+   :phone-request-text                    "फोन नम्बर अनुरोध"
+   :confirmation-code-command-description "पुष्टि कोड पठाउनुहोस्"
+   :confirmation-code-request-text        "पुष्टि कोड अनुरोध"
+   :send-command-description              "स्थान पठाउनुहोस्"
+   :request-command-description           "अनुरोध पठाउनुहोस्"
+   :keypair-password-command-description  ""
+   :help-command-description              "मदत"
+   :request                               "अनुरोध"
+   :chat-send-eth                         "{{amount}} ETH"
+   :chat-send-eth-to                      "{{amount}} ETH तर्फ {{chat-name}}"
+   :chat-send-eth-from                    "{{amount}} ETH बाट {{chat-name}}"
+
+   ;;new-group
+   :group-chat-name                       "च्याट नाम"
+   :empty-group-chat-name                 "कृपया नाम प्रविष्ट गर्नुहोस्"
+   :illegal-group-chat-name               "कृपया अन्यै नाम चयन गर्नुहोस्"
+   :new-group                             "नया समूह"
+   :reorder-groups                        "समूह पुन: क्रमबद्ध गर्नुहोस्"
+   :group-name                            "समूह नाम"
+   :edit-group                            "समूह सम्पादन"
+   :delete-group                          "समूह मेटाउनुहोस्"
+   :delete-group-confirmation             "यो समूह तपाईंको समूहहरुबाट हटाइने छ । यसले सम्पर्कहरुमा असर गर्दैन ।"
+   :delete-group-prompt                   "यसले सम्पर्कहरुमा असर गर्दैन ।"
+   :group-members                         "समूहको सदस्यहरु"
+   :contact-s                             {:one   "सम्पर्क"
+                                           :other "सम्पर्कहरु"}
+   ;;participants
+   :add-participants                      "सहभागीहरु जोड्नुहोस्"
+   :remove-participants                   "सहभागीहरु हटाउनुहोस्"
+
+   ;;protocol
+   :received-invitation                   "च्याट निमन्त्रणा पाइयो"
+   :removed-from-chat                     "तपाईंलाई सामूहिक च्याटबाट हटाइयो"
+   :left                                  "बांया"
+   :invited                               "आमन्त्रित"
+   :removed                               "हटाइयो"
+   :You                                   "तपाईं"
+
+   ;;new-contact
+   :add-new-contact                       "नया सम्पर्क जोड्नुहोस्"
+   :import-qr                             "आयात गर्नुहोस्"
+   :scan-qr                               "QR स्क्यान गर्नुहोस्"
+   :swow-qr                               "QR देखाउनुहोस्"
+   :name                                  "नाम"
+   :whisper-identity                      "व्हिस्पर पहिचान"
+   :address-explication                   "सायद यहां ठेगाना बारे बयान गर्ने अनि त्यो कहाँ खोज्ने भन्ने कुराको कुनै पाठ हुनुपर्छ ।"
+   :enter-valid-address                   "कृपया एक मान्य ठेगाना प्रविष्ट गर्नुहोस् वा QR कोड स्क्यान गर्नुहोस्"
+   :enter-valid-public-key                "कृपया एक मान्य सार्वजनिक सांचो प्रविष्ट गर्नुहोस् वा QR कोड स्क्यान गर्नुहोस् "
+   :contact-already-added                 "यो सम्पर्क पहिल्यै जोडीसकिएको छ"
+   :can-not-add-yourself                  "आफुले आफुलाइनै जोड्न मिल्दैन"
+   :unknown-address                       "अज्ञात ठेगाना"
+
+
+   ;;login
+   :connect                               "कनेक्ट"
+   :address                               "ठेगाना"
+   :password                              "पासवर्ड"
+   :login                                 "लगइन"
+   :sign-in-to-status                     "स्टेटसमा साइन इन गर्नुहोस्"
+   :sign-in                               "साइन इन"
+   :wrong-password                        "गलत पासवर्ड"
+
+   ;;recover
+   :recover-from-passphrase               "गुप्तवाक्यांश मार्फत पुनर्स्थापना गर्नुहोस्"
+   :recover-explain                       "कृपया तपाईंको पहुँच पुनर्स्थापना गर्नको लागि पासवर्डको गुप्तवाक्यांश प्रविष्ट गर्नुहोस्"
+   :passphrase                            "गुप्तवाक्यांश"
+   :recover                               "पुनर्स्थापना"
+   :enter-valid-passphrase                "कृपया गुप्तवाक्यांश प्रविष्ट गर्नुहोस्"
+   :enter-valid-password                  "कृपया पासवर्ड प्रविष्ट गर्नुहोस्"
+   :twelve-words-in-correct-order         "१२ सब्दहरु सही क्रममा"
+
+   ;;accounts
+   :recover-access                        "पहुँच पुनर्स्थापना गर्नुहोस्"
+   :add-account                           "खाता जोड्नुहोस्"
+   :create-new-account                    "नया खाता सिर्जना गर्नुहोस्"
+
+   ;;wallet-qr-code
+   :done                                  "सम्पन्न"
+   :main-wallet                           "मुख्य वालेट"
+
+   ;;validation
+   :invalid-phone                         "नमिल्ने फोन नम्बर"
+   :amount                                "रकम"
+   :not-enough-eth                        (str "ब्यालेन्समा अपर्याप्त ETH")
+
+   ;;transactions
+   :confirm                               "पुष्टि गर्नुहोस्"
+   :confirm-transactions                  {:one   "कारोबार पुष्टि गर्नुहोस्"
+                                           :other "{{count}} कारोबारहरु पुष्टि गर्नुहोस्"
+                                           :zero  "कुनै कारोबारहरु छैनन्"}
+   :transactions-confirmed                {:one   "कारोबार पुष्टि भयो"
+                                           :other "{{count}} कारोबारहरु पुष्टि भए"
+                                           :zero  "कुनैपनि कारोबारहरु पुष्टि भएका छैन"}
+   :transaction                           "कारोबार"
+   :unsigned-transactions                 "हस्ताक्षर नभएको कारोबारहरु"
+   :no-unsigned-transactions              "हस्ताक्षर नभएको कारोबारहरु छैनन्"
+   :enter-password-transactions           {:one   "तपाईंको पास्वर्ड प्रविष्ट गरेर कारोबार पुष्टि गर्नुहोस्"
+                                           :other "तपाईंको पास्वर्ड प्रविष्ट गरेर कारोबारहरु पुष्टि गर्नुहोस्"}
+   :status                                "स्टेटस"
+   :pending-confirmation                  "बांकि पुष्टिकरण"
+   :recipient                             "प्रापक"
+   :one-more-item                         "एउटा अरु आइटम"
+   :fee                                   "शुल्क"
+   :estimated-fee                         "अनुमानित शुल्क"
+   :value                                 "मूल्य"
+   :to                                    "तर्फ"
+   :from                                  "बाट"
+   :data                                  "डाटा"
+   :got-it                                "पाइयो"
+   :contract-creation                     "सम्झौता सिर्जना"
+
+   ;:webview
+   :web-view-error                        "ओहोऽऽऽ, त्रुटि"})


Add tracks display

Add tracks display

error: pathspec 'src/trak/ui/components/tracks.cljs' did not match any file(s) known to git

--- src/trak/ui/components/tracks.cljs
+++ src/trak/ui/components/tracks.cljs
@@ -0,0 +1,19 @@
+(ns trak.ui.components.tracks
+  (:require [rum.core :as rum]
+            [trak.utils :as utils]
+            [trak.db :as db]
+            [trak.globals :as globals]
+            [trak.ui.components :as components])
+  (:import goog.string))
+
+
+(rum/defc render-track [track]
+  [:.tile
+   [:.tile-icon ""]
+   [:.tile-content
+    [:p.tile-title (:track/name track)]
+    [:p.tile-subtitle (:track/album track)]
+    ]])
+
+(defn tracks [db]
+  (map (fn [track] (rum/with-key (render-track track) (.getRandomString string))) (db/tracks db)))


Channel based ajax wrapper.

Channel based ajax wrapper.

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

--- src/cljs/town_client/ajax.cljs
+++ src/cljs/town_client/ajax.cljs
@@ -0,0 +1,71 @@
+(ns town-client.ajax
+  (:require
+   [goog.net.XhrIo]
+   [goog.net.XhrIoPool]
+   [goog.net.EventType]
+   [goog.events]
+   [cljs.core.async :as async
+    :refer [<! >! chan close! sliding-buffer put! alts! timeout]])
+  (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
+
+(defn listen [object eventtype callback]
+  (.listen goog.events object eventtype callback))
+
+(def default-headers
+  #js{"Accept" "application/json"})
+
+(def pool
+  (goog.net.XhrIoPool. default-headers))
+
+(defn parse-response []
+  nil)
+
+(defn handle-response [xhr success failure]
+  (if (.isSuccess xhr)
+    (do
+      (async/put! success (.getResponseJson xhr)))
+    (do
+      (async/put! failure {:status (.getStatus xhr)})))
+  (.releaseObject pool xhr))
+
+(defn response-handler [success failure]
+  (fn [event]
+    (this-as xhr
+             (handle-response xhr success failure))))
+
+(defn make-request [url]
+  (let [success (chan)
+        failure (chan)]
+    (.getObject pool
+                (fn [xhrio]
+                  (.listen goog.events xhrio
+                           goog.net.EventType/COMPLETE
+                           (response-handler success failure))
+                  (.setTimeoutInterval xhrio 0)
+                  (.send xhrio url "GET")))
+    {:success success
+     :failure failure}))
+
+(comment
+  ; REPL interaction
+  (defn parse [response]
+    (swap! result assoc :value (.getResponseJson (.-target response)))
+    (swap! result assoc :error (.getStatus (.-target response)))
+    (swap! result assoc :orig response))
+  (defn handle-channels
+    [{:keys [success failure]}]
+    (go (while true
+          (let [[value c] (alts! [failure success])]
+            (println value)))))
+  (get-data "respondents" {:neighborhood 370} nil parse)
+  (get-data "rrgoijespondents" {:neighborhood 370} nil parse)
+  (make-request "http://www.google.fi/")
+  (make-request "http://www.telkku.com/")
+  (make-request "http://dev.hel.fi/kenenkaupunki/api/respondents/?neighborhood=370")
+  (make-request "http://dev.hel.fi/kenenkaupunki/api/responoijdents/?neighborhood=370")
+  (make-request "http://www.woiegoimew.we/")
+  (handle-channels (make-request "http://dev.hel.fi/kenenkaupunki/api/respondents/?neighborhood=370"))
+  (handle-channels (make-request "http://dev.hel.fi/kenenkaupunki/api/respooijndents/?neighborhood=370"))
+
+  )
+


Add new sketch to experiment with sizing.

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

--- src/videotest/tri_cv/dynamic_size_core.clj
+++ src/videotest/tri_cv/dynamic_size_core.clj
@@ -0,0 +1,216 @@
+(ns videotest.tri-cv.dynamic-size-core
+  (:require
+   [quil.applet :as qa :only [applet-close]]
+   [quil.core :as q]
+   [quil.middleware :as m]
+   [videotest.tri-cv.cv :as cv])
+  (:import
+   [org.opencv.core Core CvType Mat MatOfKeyPoint MatOfPoint Point Scalar Size]
+   [org.opencv.features2d FeatureDetector KeyPoint]
+   [org.opencv.imgproc Imgproc]
+   [java.nio ByteBuffer ByteOrder]
+   [java.util ArrayList]))
+
+(def CAM-DEV-NUM 0)
+(def CAM-SIZE (cv/camera-frame-size CAM-DEV-NUM))
+(def CAM-WIDTH  (int (:width  CAM-SIZE)))
+(def CAM-HEIGHT (int (:height CAM-SIZE)))
+
+(def DISPLAY-WIDTH 1280.0)
+(def DISPLAY-HEIGHT 800.0)
+
+;; pixCnt1 is the number of bytes in the pixel buffer
+;; pixCnt2 is the number of integers in the PImage pixels buffer
+(def PIX-CNT1 (int (* DISPLAY-WIDTH DISPLAY-HEIGHT 4)))
+(def PIX-CNT2 (int (* DISPLAY-WIDTH DISPLAY-HEIGHT)))
+
+(def ALPHA-STILL 255.0)
+
+;; 32 works
+(def NUM-COL-BINS 32.0)
+(def DISPLAY-BIN-SIZE (/ DISPLAY-WIDTH NUM-COL-BINS))
+(def NUM-ROW-BINS (/ DISPLAY-HEIGHT DISPLAY-BIN-SIZE))
+
+(def DISPLAY-BIN-SIZE-X2  (* DISPLAY-BIN-SIZE 2.0))
+(def DISPLAY-BIN-SIZE-2   (/ DISPLAY-BIN-SIZE 2.0))
+(def NEG-DISPLAY-BIN-SIZE (- DISPLAY-BIN-SIZE))
+;;(def NUM-COL-BINS (/ DISPLAY-WIDTH  MOSAIC-BIN-SIZE))
+;;(def NUM-ROW-BINS (/ DISPLAY-HEIGHT MOSAIC-BIN-SIZE))
+
+(def CAM-BIN-SIZE (/ CAM-WIDTH NUM-COL-BINS))
+(def CAM-BIN-SIZE-2 (/ CAM-BIN-SIZE 2.0))
+(defn display->cam [display-x-or-y]
+  (* display-x-or-y (/ CAM-WIDTH DISPLAY-WIDTH)))
+
+
+(defn triangle-points
+  "Saves origin points for each triangle, which is a vector pair of
+   x and y positions in the image material [col row]."
+  []
+  (for [col-bin (range 0 NUM-COL-BINS)
+        row-bin (range 0 NUM-ROW-BINS)
+        :let [mat-col (* col-bin DISPLAY-BIN-SIZE)
+              mat-row (* row-bin DISPLAY-BIN-SIZE)]
+        :when (= 0 (mod col-bin 2))]
+    [mat-col mat-row]))
+
+(defn triangle-orientations
+  "Radian orientations associated to triangle origin points."
+  [triangle-points]
+  (reduce (fn [memo [pt1 pt2]]
+            (let [rot1 (rand-int 4)]
+              (-> memo
+                  (assoc-in [pt1] rot1))))
+          {}
+          (partition 2 triangle-points)))
+
+(defn apex-top-right [x y]
+  [(Point. x y)
+   (Point. (+ x DISPLAY-BIN-SIZE-X2) y)
+   (Point. (+ x DISPLAY-BIN-SIZE-X2) (+ y DISPLAY-BIN-SIZE-X2))])
+
+(defn apex-bottom-left [x y]
+  [(Point. (+ x DISPLAY-BIN-SIZE-X2) (+ y DISPLAY-BIN-SIZE-X2))
+   (Point. x (+ y DISPLAY-BIN-SIZE-X2))
+   (Point. x y)])
+
+(defn apex-top-left [x y]
+  [(Point. x (+ y DISPLAY-BIN-SIZE-X2))
+   (Point. x y)
+   (Point. (+ x DISPLAY-BIN-SIZE-X2) y)])
+
+(defn apex-bottom-right [x y]
+  [(Point. (+ x DISPLAY-BIN-SIZE-X2) y)
+   (Point. (+ x DISPLAY-BIN-SIZE-X2) (+ y DISPLAY-BIN-SIZE-X2))
+   (Point. x (+ y DISPLAY-BIN-SIZE-X2))])
+
+(defn glyph [n x y]
+  (cond
+   (= n 0)
+   (apex-top-right x y)
+
+   (= n 1)
+   (apex-bottom-right x y)
+
+   (= n 2)
+   (apex-bottom-left x y)
+
+   (= n 3)
+   (apex-top-left x y)))
+
+(defn triangle-glyphs [triangle-points triangle-orientations]
+    (reduce (fn [memo [[x y :as pt1] pt2]]
+              (let [rot1 (triangle-orientations pt1)
+                    rot2 (mod (+ rot1 2) 4)]
+              (-> memo
+                  (assoc-in [pt1] (glyph rot1 x y))
+                  (assoc-in [pt2] (glyph rot2 x y)))))
+          {}
+          (partition 2 triangle-points)))
+
+(defn mat
+  ([]
+     (Mat.))
+  ([h w t]
+     (Mat. (int h) (int w) t)))
+
+;; bArray is the temporary byte array buffer for OpenCV cv::Mat.
+;; iArray is the temporary integer array buffer for PImage pixels.
+(defn setup []
+  (q/frame-rate 60)
+  (let [tri-pts (triangle-points)
+        tri-orients (triangle-orientations tri-pts)
+        tri-glyphs (triangle-glyphs tri-pts tri-orients)]
+   {:b-array (byte-array PIX-CNT1)
+    :i-array (int-array PIX-CNT2)
+    :frame-mat (mat CAM-HEIGHT CAM-WIDTH CvType/CV_8UC3)
+    :output-mat (mat DISPLAY-HEIGHT DISPLAY-WIDTH CvType/CV_8UC4)
+    :gray-mat (mat)
+    :rgba-mat (mat CAM-HEIGHT CAM-WIDTH CvType/CV_8UC4)
+    :drawn-mat (mat DISPLAY-HEIGHT DISPLAY-WIDTH CvType/CV_8UC4)
+    :camera (cv/camera CAM-DEV-NUM)
+    :p-image (q/create-image DISPLAY-WIDTH DISPLAY-HEIGHT :rgb)
+    :triangle-points tri-pts
+    :triangle-orientations tri-orients
+    :triangle-glyphs tri-glyphs}))
+
+(defn update-rgba [{:keys [rgba-mat frame-mat] :as state}]
+  (assoc-in state [:rgba-mat] (cv/BGR->RGBA! frame-mat rgba-mat)))
+
+(defn draw-mosaic-glyph [img-mat
+                         color
+                         glyph-pts]
+  (let [poly (MatOfPoint.)
+        c (apply (fn [r g b _]
+                   (let [a ALPHA-STILL]
+                     (Scalar. r g b a)))
+                 color)]
+    (.fromList poly (ArrayList. glyph-pts))
+    (Core/fillPoly img-mat (ArrayList. [poly]) c)))
+
+(defn draw-mosaic-pair
+  [triangle-glyphs drawn-mat rgba-mat [pt1 pt2]]
+  (let [color-fn (fn [display-x display-y]
+                   (let [cam-x (display->cam display-x)
+                         cam-y (display->cam display-y)
+                         c (.get rgba-mat
+                                 (+ cam-y CAM-BIN-SIZE-2)
+                                 (+ cam-x CAM-BIN-SIZE-2))]
+                     (if (< 0 (count c))
+                       (vec c)
+                       [0 0 0 255])))
+        [display-x1 display-y1] pt1
+        [display-x2 display-y2] pt2
+        c1 (color-fn display-x1 display-y1)
+        c2 (color-fn display-x2 display-y2)]
+    (draw-mosaic-glyph drawn-mat c1 (triangle-glyphs pt1))
+    (draw-mosaic-glyph drawn-mat c2 (triangle-glyphs pt2))))
+
+(defn overlay-triangles
+  [{:keys [drawn-mat rgba-mat triangle-points triangle-glyphs] :as state}]
+  (dorun
+   (map (partial draw-mosaic-pair
+                 triangle-glyphs
+                 drawn-mat
+                 rgba-mat)
+        (partition 2 triangle-points)))
+  state)
+
+(defn update-drawn-p-image [state]
+  (let [{:keys [drawn-mat output-mat b-array i-array]} state]
+    (update-in state [:p-image] #(cv/mat->p-img drawn-mat output-mat b-array i-array %))))
+
+(defn update [state]
+  (-> state
+      (cv/update-frame)
+
+      (update-rgba)
+      (overlay-triangles)
+      (update-drawn-p-image)))
+
+(defn draw [state]
+  (let [{:keys [p-image frame-mat]} state]
+    (q/background 0)
+    (q/push-matrix)
+    (q/translate DISPLAY-WIDTH 0)
+    (q/scale -1 1)
+    (when p-image
+      (q/image p-image 0 0))
+    (q/pop-matrix)))
+
+(defn on-close
+  ([{:keys [camera]}]
+     (println "closing sketch and releasing camera...")
+     (when-not (nil? camera)
+       (.release camera))))
+
+(q/defsketch videotest
+  :title "Video Test"
+  :size [DISPLAY-WIDTH DISPLAY-HEIGHT]
+  :setup setup
+  :update update
+  :draw draw
+  :on-close on-close
+  :middleware [m/fun-mode])
+
+;; (.setResizable (.frame videotest) true)


Add can-submit state to step:background-check/info

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


missing test case

missing test case

error: pathspec 'dada-core/src/test/clojure/org/dada/core/test_SimpleModelView.clj' did not match any file(s) known to git

--- dada-core/src/test/clojure/org/dada/core/test_SimpleModelView.clj
+++ dada-core/src/test/clojure/org/dada/core/test_SimpleModelView.clj
@@ -0,0 +1,42 @@
+(ns org.dada.core.test-SimpleModelView
+  (:use
+   [clojure test]
+   [clojure.contrib logging]
+   [org.dada core]
+   )
+  (:import
+   [org.dada.core Data SimpleModelView Update]
+   )
+  )
+
+(defn get-mutable [^SimpleModelView model] @(second (.state model)))
+
+(deftest test-simple-model-view
+
+  (def account-model  (model "Accounts" (seq-metadata 3))) ;; id, version, name
+
+  (is (= (get-mutable account-model) [{} {} {}]))
+
+  ;; insertion
+  (def jules-0 [:jules 0 "Julian Gosnell"])
+  (insert account-model jules-0)
+  (is (= (get-mutable account-model) [{:jules jules-0} {} {} [(Update. nil jules-0)] [] []]))
+
+  ;; update
+  (def jules-1 [:jules 1 "J.A.F. Gosnell"])
+  (update account-model jules-0 jules-1)
+  (is (= (get-mutable account-model) [{:jules jules-1} {} {} [] [(Update. jules-0 jules-1)] []]))
+
+  ;; out of order update
+  (update account-model jules-0 jules-1)
+  (is (= (get-mutable account-model) [{:jules jules-1} {} {} [] [] []]))
+
+  ;; out of order deletion
+  (delete account-model jules-1)
+  (is (= (get-mutable account-model) [{:jules jules-1} {} {} [] [] []]))
+
+  ;; successful deletion
+  (def jules-2 [:jules 2 nil])
+  (delete account-model jules-2)
+  (is (= (get-mutable account-model) [{} {:jules jules-2} {} [] [] [(Update. jules-1 jules-2)]]))
+  )


tuned repo web link guessing (closes #9)

--- src-cljs/acha.cljs
+++ src-cljs/acha.cljs
@@ -135,25 +135,23 @@
 ;; user@domain:path[.git]
 ;; http[s]://domain/path[.git]

-(def ^:private repo-commit-prefix
-  (memoize (fn [url]
-    (condp re-matches url
+(def ^:private repo-web-url
+  (memoize (fn [clone-url]
+    (condp re-matches clone-url
       #"([^@:]+)@([^@:]+):(.+)" :>> (fn [[_ user domain path]]
                                       (str "http://" domain "/"
                                            (-> path
                                              (u/trimr ".git")
-                                             (u/trimr "/"))
-                                           "/commit/"))
+                                             (u/trimr "/"))))
       #"(?i)(https?://.+)"      :>> (fn [[_ path]]
                                       (-> path
                                           (u/trimr ".git")
-                                          (u/trimr "/")
-                                          (str "/commit/")))
+                                          (u/trimr "/")))
       nil))))

-(defn- sha1-url [url sha1]
-  (when-let [prefix (repo-commit-prefix url)]
-    (str prefix sha1)))
+(defn- commit-web-url [clone-url sha1]
+  (when-let [web-url (repo-web-url clone-url)]
+    (str web-url "/commit/" sha1)))

 (defn ach-details [ach]
   (str (get-in ach [:ach/user :user/name])
@@ -169,7 +167,7 @@
         title    (ach-details ach)]
     (s/html
       [:div {:key (:db/id ach)}
-        (if-let [commit-url (sha1-url repo-url sha1)]
+        (if-let [commit-url (commit-web-url repo-url sha1)]
           [:a.ach__text { :target "_blank"
                           :href   commit-url
                           :title  title }
@@ -218,10 +216,12 @@
     [:.rp.pane
       (let [repo-url (:repo/url repo)]
         (list
-         [:.rp__name (repo-name repo-url)
-          [:.id (:db/id repo)]
-          (repo-status repo)]
-         [:a.rp__url {:href repo-url} repo-url]))
+          [:.rp__name (repo-name repo-url)
+            [:.id (:db/id repo)]
+            (repo-status repo)]
+          (if-let [web-url (repo-web-url repo-url)]
+            [:a.rp__url {:href web-url :target "_blank"} repo-url]
+            [:.rp__url repo-url])))
       (when-let [reason (:repo/reason repo)]
         (list
           [:.rp__reason reason]


CMR-7795: Added unit tests for STAC assets.

error: pathspec 'search-app/test/cmr/search/test/results_handlers/stac_results_handler.clj' did not match any file(s) known to git

--- search-app/test/cmr/search/test/results_handlers/stac_results_handler.clj
+++ search-app/test/cmr/search/test/results_handlers/stac_results_handler.clj
@@ -0,0 +1,136 @@
+(ns cmr.search.test.results-handlers.stac-results-handler
+  "This tests the stac-results-handler namespace."
+  (:require
+   [clojure.test :refer :all]
+   [cmr.common.util :as util :refer [are3]]
+   [cmr.search.results-handlers.stac-results-handler :as stac-results-handler]))
+
+(def ^:private metadata-link
+  "example metadata-link for test"
+  "https://example.com/metadata-link")
+
+(deftest atom-links->assets
+  (testing "Atom links to STAC assets"
+    (are3 [links assets]
+      (let [expected-assets (merge assets
+                                   {:metadata {:href metadata-link
+                                               :type "application/xml"}})]
+        (is (= expected-assets
+               (#'stac-results-handler/atom-links->assets metadata-link links))))
+
+      "single data link"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data"
+        :link-type "data"
+        :title "example data"
+        :mime-type "application/x-hdfeos"}]
+      {:data {:title "example data"
+              :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data"
+              :type "application/x-hdfeos"}}
+
+      "multiple data links"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data"
+        :link-type "data"
+        :title "example data"
+        :mime-type "application/x-hdfeos"}
+       {:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data11"
+        :link-type "data"
+        :mime-type "application/gzip"}
+       {:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data99"
+        :link-type "data"
+        :mime-type "application/x-hdf"}]
+      {:data {:title "example data"
+              :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data"
+              :type "application/x-hdfeos"}
+       :data1 {:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data11"
+               :type "application/gzip"}
+       :data2 {:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data99"
+               :type "application/x-hdf"}}
+
+      "single browse link with valid mime-type"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+        :link-type "browse"
+        :title "example browse"
+        :mime-type "image/tiff"}]
+      {:browse {:title "example browse"
+                :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+                :type "image/tiff"}}
+
+      "single browse link with valid mime-type to show mime-type has precedence over href suffix."
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse.jpeg"
+        :link-type "browse"
+        :title "example browse"
+        :mime-type "image/tiff"}]
+      {:browse {:title "example browse"
+                :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse.jpeg"
+                :type "image/tiff"}}
+
+      "single browse link without mime-type"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+        :link-type "browse"
+        :title "example browse"}]
+      {:browse {:title "example browse"
+                :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+                :type "image/jpeg"}}
+
+      "single browse link with invalid mime-type, type is determined by href suffix"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse.tif"
+        :link-type "browse"
+        :title "example browse"
+        :mime-type "image"}]
+      {:browse {:title "example browse"
+                :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse.tif"
+                :type "image/tiff"}}
+
+      "multiple browse links, only the first one is used"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+        :link-type "browse"
+        :title "example browse"
+        :mime-type "image/tiff"}
+       {:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse1"
+        :link-type "browse"
+        :mime-type "image/jpeg"}]
+      {:browse {:title "example browse"
+                :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+                :type "image/tiff"}}
+
+      "single opendap link"
+      [{:href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl"
+        :link-type "service"
+        :title "opendap link"
+        :mime-type "text/xml"}]
+      {:opendap {:title "opendap link"
+                 :href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl"
+                 :type "text/xml"}}
+
+      "multiple opendap links, only the first one is used"
+      [{:href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl"
+        :link-type "service"
+        :title "opendap link"}
+       {:href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl2"
+        :link-type "service"
+        :title "opendap link2"}]
+      {:opendap {:title "opendap link"
+                 :href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl"}}
+
+      "multiple type of links"
+      [{:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data"
+        :link-type "data"
+        :title "example data"
+        :mime-type "application/x-hdfeos"}
+       {:href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+        :link-type "browse"
+        :title "example browse"
+        :mime-type "image/tiff"}
+       {:href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl"
+        :link-type "service"
+        :title "opendap link"
+        :mime-type "text/xml"}]
+      {:data {:title "example data"
+              :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-data"
+              :type "application/x-hdfeos"}
+       :browse {:title "example browse"
+                :href "ftp://f5eil01v.edn.ecs.nasa.gov/example-browse"
+                :type "image/tiff"}
+       :opendap {:title "opendap link"
+                 :href "https://f5eil01v.edn.ecs.nasa.gov/opendapurl"
+                 :type "text/xml"}})))


bump deps

bump deps

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


suggestions for connect methods added to test.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/colophon/clarango.git/'


Replace the API docs. Dunno how that got removed, but it's back now.

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


actually run the aurora-scheduler 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/jchli/jepsen-aurora.git/'


extract github login link to component

extract github login link to component

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


Nested-params test no longer depends on hash-map ordering

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


Add stub for wordy

Add stub for wordy

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

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


basic x509 certificate handling

basic x509 certificate handling

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

--- src/buddy/core/certificates.clj
+++ src/buddy/core/certificates.clj
@@ -0,0 +1,41 @@
+(ns buddy.core.certificates
+  (:require [clojure.java.io :as io])
+  (:import java.io.StringReader
+           java.security.Security
+           org.bouncycastle.openssl.PEMParser
+           org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder
+           org.bouncycastle.cert.X509CertificateHolder))
+
+(when (nil? (Security/getProvider "BC"))
+  (Security/addProvider (org.bouncycastle.jce.provider.BouncyCastleProvider.)))
+
+(defn- verifier [pub-key]
+  (.build
+   (doto (JcaContentVerifierProviderBuilder.)
+     (.setProvider "BC"))
+   pub-key))
+
+(defn certificate
+  "Reads a certificate from a PEM encoded file or stream"
+  [x]
+  (with-open [reader (io/reader x)]
+    (let [parser (PEMParser. reader)
+          keyinfo (.readObject parser)]
+      keyinfo)))
+
+(defn str->public-key
+  "Certificate constructor from string"
+  [certdata]
+  (with-open [reader (StringReader. ^String certdata)]
+    (certificate reader)))
+
+(defn verify
+  "Verifies that the certificate is signed by the private key associated
+   with the signer-public-key."
+  [cert signer-public-key]
+  (.isSignatureValid cert (verifier signer-public-key)))
+
+(defn certificate?
+  "Returns true if object is a certificate"
+  [x]
+  (instance? X509CertificateHolder x))


[WM] add user-id to preference read response

Also helps make reads and creates symmetrical.

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


Fix duplicate tables in DBs without schemas :disappointed: #1633

--- src/metabase/driver/sync.clj
+++ src/metabase/driver/sync.clj
@@ -78,7 +78,6 @@
   (sync-database-active-tables! driver (for [table (sel :many Table, :db_id (:id database) :active true)]
                                          ;; replace default delays with ones that reuse database (and don't require a DB call)
                                          (assoc table :db (delay database)))))
-

 (defn- -sync-database! [driver database]
   (let [active-tables      (driver/active-tables driver database)


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


hello collision

hello collision

town.zip needs to be on the project's root dir

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

--- src/maqueta/hello/collision.clj
+++ src/maqueta/hello/collision.clj
@@ -0,0 +1,87 @@
+;;;; jMonkeyEngine 3 Tutorial (9) - Hello Collision
+;;;; http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_collision
+
+(ns maqueta.hello.collision
+  (:use (maqueta application assets))
+  (:import com.jme3.bullet.BulletAppState
+           com.jme3.bullet.control.CharacterControl
+           com.jme3.bullet.control.RigidBodyControl
+           com.jme3.bullet.collision.shapes.CapsuleCollisionShape
+           com.jme3.bullet.util.CollisionShapeFactory
+           com.jme3.asset.plugins.ZipLocator
+           com.jme3.light.AmbientLight
+           com.jme3.light.DirectionalLight
+           com.jme3.scene.Node
+           com.jme3.math.ColorRGBA
+           com.jme3.scene.Spatial
+           com.jme3.math.Vector3f))
+
+(def player (doto (CharacterControl. (CapsuleCollisionShape. 1.5 6 1) 0.05)
+              (.setJumpSpeed 20)
+              (.setFallSpeed 30)
+              (.setGravity 30)
+              (.setPhysicsLocation (Vector3f. 0 10 0))))
+
+(def walk-direction (Vector3f.))
+
+(def left (atom false))
+(def right (atom false))
+(def up (atom false))
+(def down (atom false))
+
+(defn init-app
+  [app]
+  (let [bullet-app-state (BulletAppState.)
+        al (AmbientLight.)
+        dl (DirectionalLight.)
+        _ (.registerLocator asset-manager "town.zip" ZipLocator)
+        scene-model (doto (load-model "main.scene") (.setLocalScale (Vector3f. 2 2 2)))
+        scene-shape (CollisionShapeFactory/createMeshShape (cast Node scene-model))
+        landscape (RigidBodyControl. scene-shape 0)]
+    (.attach (.getStateManager app) bullet-app-state)
+    (.setBackgroundColor (.getViewPort app) (ColorRGBA. 0.7 0.8 1 1))
+    (.setMoveSpeed (.getFlyByCamera app) 100)
+    (.setColor al (.mult ColorRGBA/White 1.3))
+    (doto dl
+      (.setColor ColorRGBA/White)
+      (.setDirection (.normalizeLocal (Vector3f. 2.8 -2.8 -2.8))))
+    (.addControl scene-model landscape)
+    (doto (.getRootNode app)
+      (.attachChild scene-model)
+      (.addLight al)
+      (.addLight dl))
+    (doto (.getPhysicsSpace bullet-app-state)
+      (.add landscape)
+      (.add player))))
+
+(defn update
+  [app tpf]
+  (let [cam (.getCamera app)
+        cam-dir (-> cam
+                    .getDirection
+                    .clone
+                    (.multLocal 0.6 0.6 0.6))
+        cam-left (-> cam
+                     .getLeft
+                     .clone
+                     (.multLocal 0.4 0.4 0.4))]
+    (.set walk-direction 0 0 0)
+    (cond
+     @left (.addLocal walk-direction cam-left)
+     @right (.addLocal walk-direction (.negate cam-left))
+     @up (.addLocal walk-direction cam-dir)
+     @down (.addLocal walk-direction (.negate cam-dir)))
+    (.setWalkDirection player walk-direction)
+    (.setLocation cam (.getPhysicsLocation player))))
+
+(def on-action {:key-a (fn [app value tpf] (reset! left value))
+                :key-d (fn [app value tpf] (reset! right value))
+                :key-w (fn [app value tpf] (reset! up value))
+                :key-s (fn [app value tpf] (reset! down value))
+                :key-space (fn [app value tpf] (.jump player))})
+
+(defn -main
+  [& args]
+  (.start (make-app :setup-fn init-app
+                    :update-fn update
+                    :on-action on-action)))


perms check

perms check

--- src/metabase/api/datasource.clj
+++ src/metabase/api/datasource.clj
@@ -4,9 +4,12 @@
             [metabase.api.common :refer :all]
             [metabase.db :refer :all]
             (metabase.models [hydrate :as h]
-                             [datasource :refer [DataSource]])))
+                             [datasource :refer [DataSource]]
+                             [org :refer [Org]])))

 (defendpoint GET "/source" [org]
+  (let-404 [{:keys [can_read]} (sel :one Org :id org)]
+    (check-403 @can_read))
   (-> (sel :many DataSource :organization_id org)
       (h/hydrate :database)))


Add /api/meta/table/:id and /api/meta/table/:id/fields

--- src/metabase/api/meta_table.clj
+++ src/metabase/api/meta_table.clj
@@ -6,7 +6,15 @@
             [metabase.db :refer :all]
             (metabase.models [hydrate :refer :all]
                              [database :refer [Database]]
+                             [field :refer [Field]]
                              [table :refer [Table]])))
+
+(defendpoint GET "/:id" [id]
+  (or-404-> (sel :one Table :id id)
+    (hydrate :db)))
+
+(defendpoint GET "/:id/fields" [id]
+  (sel :many Field :table_id id))

 (defendpoint GET "/:id/query_metadata" [id]
   (or-404-> (sel :one Table :id id)


[WM] change :notification-type-slug to :notification-type in queue messages

fatal: unable to access 'https://github.com/democracyworks/notification-works.git/': The requested URL returned error: 403


Learning about Clojure project structure...

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


First usable version of SelectCubes2D, a bit clunky still.

error: pathspec 'src/plugins/Scripts/Funimage/Annotation/SelectCubes2D.clj' did not match any file(s) known to git

--- src/plugins/Scripts/Funimage/Annotation/SelectCubes2D.clj
+++ src/plugins/Scripts/Funimage/Annotation/SelectCubes2D.clj
@@ -0,0 +1,107 @@
+(import 'ij.IJ)
+(import 'ij.plugin.frame.RoiManager)
+
+(def dialog (ij.gui.NonBlockingGenericDialog. "Cube labeler (3D)"))
+;(def add-point-button (java.awt.Button. "Add cube"))
+(def add-fg-button (java.awt.Button. "Add foreground cube"))
+(def add-bg-button (java.awt.Button. "Add background cube"))
+(def set-p1-button (java.awt.Button. "Set cube point1"))
+(def set-p2-button (java.awt.Button. "Set cube point2"))
+(def save-button (java.awt.Button. "Save cubes"))
+(def rtable (ij.measure.ResultsTable/getResultsTable))
+
+#_(defn add-point []
+    (let [roi (.getRoi (ij.IJ/getImage))
+  	  bounds (.getBounds roi)
+  	  idx (.getCounter rtable)]
+      (.setValue rtable "X" idx (double (.x bounds)))
+      (.setValue rtable "Y" idx (double (.y bounds)))
+      (.setValue rtable "Z" idx (double (.getZ (ij.IJ/getImage))))
+      (.updateResults rtable)
+      (.show rtable "Results")))
+
+(defn add-cube [background?]
+    (let [idx (.getCounter rtable)]
+      (.setValue rtable "BG" idx (double (if background? 1 0)))
+      (.setValue rtable "X1" idx -1.0)
+      (.setValue rtable "Y1" idx -1.0)
+      (.setValue rtable "Z1" idx -1.0)
+      (.setValue rtable "X2" idx -1.0)
+      (.setValue rtable "Y2" idx -1.0)
+      (.setValue rtable "Z2" idx -1.0)
+      (.updateResults rtable)
+      (.show rtable "Results")))
+
+(defn set-first-point []
+  (let [roi (.getRoi (ij.IJ/getImage))
+        bounds (.getBounds roi)
+        idx (dec (.getCounter rtable))]
+    (.setValue rtable "X1" idx (double (.x bounds)))
+    (.setValue rtable "Y1" idx (double (.y bounds)))
+    (.setValue rtable "Z1" idx (double (.getZ (ij.IJ/getImage))))
+    (.updateResults rtable)
+    (.show rtable "Results")))
+
+(defn set-second-point []
+  (let [roi (.getRoi (ij.IJ/getImage))
+        bounds (.getBounds roi)
+        idx (dec (.getCounter rtable))]
+    (.setValue rtable "X2" idx (double (.x bounds)))
+    (.setValue rtable "Y2" idx (double (.y bounds)))
+    (.setValue rtable "Z2" idx (double (.getZ (ij.IJ/getImage))))
+    (.updateResults rtable)
+    (.show rtable "Results")))
+
+
+;; Dialog construction
+
+;(.add dialog add-point-button)
+#_(.addActionListener add-point-button
+	 (reify java.awt.event.ActionListener
+		 (actionPerformed [_ evt]
+       (add-cube)
+			 #_(add-point))))
+
+(.add dialog add-fg-button)
+(.addActionListener add-fg-button
+	(reify java.awt.event.ActionListener
+		(actionPerformed [_ evt]
+      (add-cube false))))
+
+(.add dialog add-bg-button)
+(.addActionListener add-bg-button
+	(reify java.awt.event.ActionListener
+		(actionPerformed [_ evt]
+      (add-cube true))))
+
+(.add dialog set-p1-button)
+(.addActionListener set-p1-button
+	(reify java.awt.event.ActionListener
+		(actionPerformed [_ evt]
+      (set-first-point))))
+
+(.add dialog set-p2-button)
+(.addActionListener set-p2-button
+	(reify java.awt.event.ActionListener
+		(actionPerformed [_ evt]
+      (set-second-point))))
+
+(.add dialog save-button)
+(.addActionListener save-button
+	(reify java.awt.event.ActionListener
+		(actionPerformed [_ evt]
+		  (let [filename (.getTitle (ij.IJ/getImage))
+          directory (str (.directory (.getOriginalFileInfo (ij.IJ/getImage))))
+          outname (str directory java.io.File/separator
+                       (.substring filename 0 (.lastIndexOf filename "."))
+                       "_CubeROIs.csv")]
+		    (ij.IJ/log (str "Saving results to " outname))
+			(.saveAs rtable outname)))))
+
+(.addMessage dialog " ")
+(.showDialog dialog)
+
+(ij.IJ/setTool "point")
+
+
+


restore codox script

restore codox script

fatal: unable to access 'https://github.com/palisades-lakes/multimethod-experiments.git/': The requested URL returned error: 403


compress seq

compress seq

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


doing collapse

doing collapse

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


cloxp-scratch dir

cloxp-scratch dir

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


[TH] clear typo in docstring

[TH] clear typo in docstring

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


Update deps

Update deps


Version 0.16.8

Version 0.16.8

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "0.16.8-SNAPSHOT"
+(defproject clojars-web "0.16.8"
   :dependencies [[org.clojure/clojure "1.6.0"]
                  [org.clojure/tools.cli "0.2.1"]
                  [yeller-clojure-client "1.2.1"]


More heroku prep.

More heroku prep.

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


Upgrade Clojure to 1.8

Upgrade Clojure to 1.8

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
 (defproject clojars-web "31-SNAPSHOT"
   :min-lein-version "2.0.0"
-  :dependencies [[org.clojure/clojure "1.7.0"]
+  :dependencies [[org.clojure/clojure "1.8.0"]
                  [org.clojure/tools.cli "0.2.1"]
                  [yeller-clojure-client "1.4.1"]
                  [org.apache.maven/maven-model "3.0.4"


Update deps

Update deps

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


upgrade postgres driver to 9.4-1202-jdbc42

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


add Stencil to clojure libs so that we can have a very simple library for doing mustache style templating.

--- project.clj
+++ project.clj
@@ -44,6 +44,7 @@
                  [postgresql "9.3-1102.jdbc41"]                       ; Postgres driver
                  [ring/ring-jetty-adapter "1.4.0"]                    ; Ring adapter using Jetty webserver (used to run a Ring server for unit tests)
                  [ring/ring-json "0.3.1"]                             ; Ring middleware for reading/writing JSON automatically
+                 [stencil "0.4.0"]                                    ; Mustache templates for Clojure
                  [swiss-arrows "1.0.0"]]                              ; 'Magic wand' macro -<>, etc.
   :plugins [[lein-environ "1.0.0"]                                    ; easy access to environment variables
             [lein-ring "0.9.3"]]                                      ; start the HTTP server with 'lein ring server'


Add scope-capture to dev dependencies

Add scope-capture to dev dependencies

To aid debugging.

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


Updated Codox plugin to 0.8.5

Updated Codox plugin to 0.8.5

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


bump version to 2.7.1

bump version to 2.7.1

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


use new clj-http version

use new clj-http version

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


kata5: add speed comparison functions in tests

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


added clojure solution

added clojure solution

error: pathspec 'solutions/day11/solution.clj' did not match any file(s) known to git

--- solutions/day11/solution.clj
+++ solutions/day11/solution.clj
@@ -0,0 +1,55 @@
+(def alphabet "abcdefghijklmnopqrstuvwxyz")
+
+(defn str->idxs
+  [string]
+  (map #(.indexOf alphabet (str %)) string))
+
+(defn idxs->str
+  [idxs]
+  (apply str (map #(nth alphabet %) idxs)))
+
+(defn has-straight?
+  [string run-length]
+  (let [idxs (str->idxs string)
+        diffs (map #(apply - %) (map vector (next idxs) idxs))
+        n-tuples (apply map vector (take (dec run-length) (iterate next diffs)))
+        is-run (map (fn [n-tuple] (every? #(= 1 %) n-tuple)) n-tuples)]
+    (some identity is-run)))
+
+(defn contains-forbidden?
+  [string & forbidden]
+  (some #(.contains string %) forbidden))
+
+(defn pair-count
+  [string]
+  (count (re-seq #"([\w])\1{1}" string)))
+
+(defn inc-str
+  [string]
+  (let [idxs (str->idxs string)
+        idx-limit (dec (count alphabet))]
+    (loop [incd-idxs (apply vector idxs)
+           pos (dec (count idxs))]
+      (if (> 0 pos)
+        string
+        (if (= (nth incd-idxs pos) idx-limit)
+          (recur (assoc incd-idxs pos 0) (dec pos))
+          (let [incd (assoc incd-idxs pos (inc (nth incd-idxs pos)))]
+            (idxs->str incd)))))))
+
+(defn valid-password?
+  [pwd]
+  (and (not (contains-forbidden? pwd "i" "o" "l"))
+       (< 1 (pair-count pwd))
+       (has-straight? pwd 3)))
+
+(defn next-password
+  [password]
+  (loop [pwd (inc-str password)]
+    (if (valid-password? pwd)
+      pwd
+      (recur (inc-str pwd)))))
+
+(def nxt (next-password "vzbxkghb"))
+(println "part 1: " nxt)
+(println "part 2: " (next-password nxt))


Carmine deprecated hgetall*

Carmine deprecated hgetall*


Add active.clojure.macro.

Add active.clojure.macro.

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

--- src/active/clojure/macro.clj
+++ src/active/clojure/macro.clj
@@ -0,0 +1,15 @@
+(ns active.clojure.macro
+  "Macro helpers.")
+
+;; Repeated in numerous projects
+
+(clojure.core/defn cljs-env?
+  "Take the &env from a macro, and tell whether we are expanding into cljs."
+  [env]
+  (boolean (:ns env)))
+
+(defmacro if-cljs
+  "Return then if we are generating cljs code and else for Clojure code.
+   https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ"
+  [then else]
+  (if (cljs-env? &env) then else))


distribution

distribution

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


Orrien zerrenda erakutsi

Orrien zerrenda erakutsi

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


Adapt Groovy VideoExample to Clojure

Adapt Groovy VideoExample to Clojure

error: pathspec 'src/examples/clojure/rx/lang/clojure/examples/video_example.clj' did not match any file(s) known to git

--- src/examples/clojure/rx/lang/clojure/examples/video_example.clj
+++ src/examples/clojure/rx/lang/clojure/examples/video_example.clj
@@ -0,0 +1,161 @@
+(ns rx.lang.clojure.examples.video-example
+  (:import [rx Observable Observer Subscription]))
+
+; Adapted from language-adaptors/rxjava-groovy/src/examples/groovy/rx/lang/groovy/examples/VideoExample.groovy
+
+(declare get-video-grid-for-display)
+(declare get-list-of-lists)
+(declare video-list)
+(declare video-list->videos)
+(declare video->metadata)
+(declare video->bookmark)
+(declare video->rating)
+
+; just use a simple lock to keep multi-threaded output fr beiom ng a interlea llved
+(def print-lock (Object.))
+
+(defn example1
+  [on-complete]
+  (println "Starting example 1")
+  ; this will print the dictionary for each video and is a good representation of
+  ; how progressive rendering could work
+  (println "---- sequence of video dictionaries ----")
+  (-> (get-video-grid-for-display 1)
+    (.subscribe #(locking print-lock (println %))
+                #(locking print-lock (println "Error: " %))
+                #(do
+                   (println "Finished example 1")
+                   (on-complete)))))
+
+(defn example2
+  [on-complete]
+  (println "Starting example 2")
+  ; onNext will be called once with a list and demonstrates how a sequence can be combined
+  ; for document style responses (most webservices)
+  (-> (get-video-grid-for-display 1)
+    .toList
+    (.subscribe #(println "\n ---- single list of video dictionaries ----\n" %)
+                #(println "Error: " %)
+                #(do
+                   (println "Finished Example 2")
+                   (println "Exiting")
+                   (on-complete)))))
+
+(defn -main
+  [& args]
+  ; Run example1 followed by example2, then exit
+  (example1 (fn [] (example2 #(System/exit 0)))))
+
+(defn ^Observable get-video-grid-for-display
+  "
+  Demonstrate how Rx is used to compose Observables together such as
+  how a web service would to generate a JSON response.
+
+  The simulated methods for the metadata represent different services
+  that are often backed by network calls.
+
+  This will return a sequence of maps like this:
+
+   {:id 1000, :title video-1000-title, :length 5428, :bookmark 0,
+    :rating {:actual 4 :average 3 :predicted 0}}
+  "
+  [user-id]
+  (-> (get-list-of-lists user-id)
+    (.mapMany (fn [list]
+                ; for each VideoList we want to fetch the videos
+                (-> (video-list->videos list)
+                  (.take 10) ; we only want the first 10 of each list
+                  (.mapMany (fn [video]
+                              ; for each video we want to fetch metadata
+                              (let [m (-> (video->metadata video)
+                                          (.map (fn [md]
+                                                  ; transform to the data and format we want
+                                                  {:title  (:title md)
+                                                  :length (:duration md) })))
+                                    b (-> (video->bookmark video user-id)
+                                          (.map (fn [position]
+                                                  {:bookmark position})))
+                                    r (-> (video->rating video user-id)
+                                          (.map (fn [rating]
+                                                  {:rating {:actual    (:actual-star-rating rating)
+                                                            :average   (:average-star-rating rating)
+                                                            :predicted (:predicted-star-rating rating) }})))]
+                                ; join these together into a single, merged map for each video
+                                (Observable/zip m b r (fn [m b r]
+                                                        (merge {:id video} m b r)))))))))))
+
+
+; A little helper to make the future-based observables a little less verbose
+; this has possibilities ...
+(defn- ^Observable future-observable
+  "Returns an observable that executes (f observer) in a future, returning a
+  subscription that will cancel the future."
+  [f]
+  (Observable/create (fn [^Observer observer]
+                       (let [f (future (f observer))]
+                         (Observable/createSubscription #(future-cancel f))))))
+
+(defn ^Observable get-list-of-lists
+  "
+  Retrieve a list of lists of videos (grid).
+
+  Observable<VideoList> is the \"push\" equivalent to List<VideoList>
+  "
+  [user-id]
+  (future-observable (fn [^Observer observer]
+                       (Thread/sleep 180)
+                       (dotimes [i 15]
+                         (.onNext observer (video-list i)))
+                       (.onCompleted observer))))
+
+
+(comment (.subscribe (get-list-of-lists 7777) println))
+
+(defn video-list
+  [position]
+  {:position position
+   :name     (str "ListName-" position) })
+
+(defn ^Observable video-list->videos
+  [{:keys [position] :as video-list}]
+  (Observable/create (fn [^Observer observer]
+                       (dotimes [i 50]
+                         (.onNext observer (+ (* position 1000) i)))
+                       (.onCompleted observer)
+                       (Observable/noOpSubscription))))
+
+(comment (.subscribe (video-list->videos (video-list 2)) println))
+
+(defn ^Observable video->metadata
+  [video-id]
+  (Observable/create (fn [^Observer observer]
+                       (.onNext observer {:title (str "video-" video-id "-title")
+                                          :actors ["actor1" "actor2"]
+                                          :duration 5428 })
+                       (.onCompleted observer)
+                       (Observable/noOpSubscription))))
+
+(comment (.subscribe (video->metadata 10) println))
+
+(defn ^Observable video->bookmark
+  [video-id user-id]
+  (future-observable (fn [^Observer observer]
+                       (Thread/sleep 4)
+                       (.onNext observer (if (> (rand-int 6) 1) 0 (rand-int 4000)))
+                       (.onCompleted observer))))
+
+(comment (.subscribe (video->bookmark 112345 99999) println))
+
+(defn ^Observable video->rating
+  [video-id user-id]
+  (future-observable (fn [^Observer observer]
+                       (Thread/sleep 10)
+                       (.onNext observer {:video-id              video-id
+                                          :user-id               user-id
+                                          :predicted-star-rating (rand-int 5)
+                                          :average-star-rating   (rand-int 5)
+                                          :actual-star-rating    (rand-int 5) })
+                       (.onCompleted observer))))
+
+(comment (.subscribe (video->rating 234345 8888) println))
+


adds silent.cljx

adds silent.cljx

error: pathspec 'src/cljx/speclj/report/silent.cljx' did not match any file(s) known to git

--- src/cljx/speclj/report/silent.cljx
+++ src/cljx/speclj/report/silent.cljx
@@ -0,0 +1,15 @@
+(ns speclj.report.silent
+  (:require [speclj.reporting]))
+
+(deftype SilentReporter [passes fails results]
+  speclj.reporting/Reporter
+  (report-message [this message])
+  (report-description [this description])
+  (report-pass [this result])
+  (report-pending [this result])
+  (report-fail [this result])
+  (report-runs [this results])
+  (report-error [this exception]))
+
+(defn new-silent-reporter []
+  (SilentReporter. (atom 0) (atom 0) (atom nil)))


allow defsetting to take a default value

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


Added connection namespace.

Added connection namespace.

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

--- src/cmr/oracle/connection.clj
+++ src/cmr/oracle/connection.clj
@@ -0,0 +1,54 @@
+(ns cmr.oracle.connection
+ "Contains a record definition that implements the ConcpetStore and Lifecycle protocols
+  backed by an Oracle database."
+  (:require [cmr.common.lifecycle :as lifecycle]
+            [cmr.common.log :refer (debug info warn error)])
+  (:import com.mchange.v2.c3p0.ComboPooledDataSource))
+
+;;; Constants
+
+(def db-username (get (System/getenv) "MDB_DB_USERNAME" "METADATA_DB"))
+(def db-password (get (System/getenv) "MDB_DB_PASSWORD" "METADATA_DB"))
+(def db-host (get (System/getenv) "MDB_DB_HOST" "localhost"))
+(def db-port (get (System/getenv) "MDB_DB_PORT" "1521"))
+(def db-sid (get (System/getenv) "MDB_DB_SID" "orcl"))
+
+(def db-spec
+  {:classname "oracle.jdbc.driver.OracleDriver"
+   :subprotocol "oracle"
+   :subname (format "thin:@%s:%s:%s" db-host db-port db-sid)
+   :user db-username
+   :password db-password})
+
+
+(defrecord OracleStore [db]
+
+  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+  lifecycle/Lifecycle
+
+  (start [this system]
+         this)
+
+  (stop [this system]
+        this))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn pool
+  [spec]
+  (let [cpds (doto (ComboPooledDataSource.)
+               (.setDriverClass (:classname spec))
+               (.setJdbcUrl (str "jdbc:" (:subprotocol spec) ":" (:subname spec)))
+               (.setUser (:user spec))
+               (.setPassword (:password spec))
+               ;; expire excess connections after 30 minutes of inactivity:
+               (.setMaxIdleTimeExcessConnections (* 30 60))
+               ;; expire connections after 3 hours of inactivity:
+               (.setMaxIdleTime (* 3 60 60)))]
+    {:datasource cpds}))
+
+(defn create-db
+  "Creates and returns the database connection pool."
+  [db-spec]
+  (map->OracleStore (pool db-spec)))


Namespace prefixes

Namespace prefixes

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

--- src/rdf_path_examples/prefixes.clj
+++ src/rdf_path_examples/prefixes.clj
@@ -0,0 +1,14 @@
+(ns rdf-path-examples.prefixes)
+
+; ----- Namespace prefixes -----
+
+(defn- prefix
+  "Builds a function for compact IRIs in the namespace `iri`."
+  [iri]
+  (partial str iri))
+
+(def rdfs
+  (prefix "http://www.w3.org/2000/01/rdf-schema#"))
+
+(def xsd
+  (prefix "http://www.w3.org/2001/XMLSchema#"))


insert-rows-into-db

insert-rows-into-db

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


async work

async work

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


Fix typo from tests

Fix typo from tests

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


added core.async snippets

added core.async snippets

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

--- src/reagent_webapp/async.cljs
+++ src/reagent_webapp/async.cljs
@@ -0,0 +1,30 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; core.async snippets
+;; Ed Sumitra
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; type the following in figwheel clojurescript repl
+;; required libraries and macros
+(require '[cljs.core.async :as async])
+(require-macros '[cljs.core.async.macros :refer [go go-loop]])
+(enable-console-print!)
+
+;;; ------------------------
+;;; minimal core.async intro
+;;; ------------------------
+;; create a chan
+(def chan-atest (async/chan))
+;; put a message into the channel
+(go (async/>! chan-atest "hello bosclj 1"))
+;; take a message from the channel
+(go (println (async/<! chan-atest)))
+;; keep printing messages in channel
+(go-loop [] (println (async/<! chan-atest)) (recur))
+
+;;; --------------------------------
+;;; create a repl event subscription
+;;; --------------------------------
+(in-ns 'reagent-bosclj.events)
+(def chan-repl-logger (async/chan))
+(async/sub *event-que* :new-ui-task chan-repl-logger)
+(go-loop [] (println "repl log:" (async/<! chan-repl-logger)) (recur))


Add example ~/.overtone/config.clj - fixes #191

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