Fix touch/click event on android

Fix touch/click event on android

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


Can use URL, so use URL.

Can use URL, so use URL.

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


Be more consistent about lowercasing patterns

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


Return val is unimportant but return http response for sake of logs


Issue #21: Go deeper... deeper... in final recursion koan

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/croeder/clojure-koans-work.git/'


More debugging

More 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/physion/ovation-webapi.git/'


Applying some styles to the sliders

Applying some styles to the sliders

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/jlemmett/om-slider.git/'


add some basic native interop facilities

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/aamedina/clojure.llvm.git/'


formatting

formatting

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


[WM] fix syntax error in db-test

[WM] fix syntax error in db-test

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


[PDOK-1018] postgres functies

[PDOK-1018] postgres functies

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

--- src/main/clojure/pdok/postgres.clj
+++ src/main/clojure/pdok/postgres.clj
@@ -0,0 +1,51 @@
+(ns pdok.postgres
+  (:require [clojure.java.jdbc :as j]
+            [clj-time [coerce :as tc]]))
+
+(def quoted (j/quoted \"))
+
+(defn schema-exists? [db schema]
+  (j/with-db-connection [c db]
+    (let [results
+          (j/query c ["SELECT 1 FROM information_schema.schemata WHERE schema_name = ?" schema])]
+      (not (nil? (first results)))))
+  )
+
+(defn create-schema [db schema]
+  "Create schema"
+  (j/db-do-commands db (str "CREATE SCHEMA " (quoted schema))))
+
+
+(defn table-exists? [db schema table]
+  (j/with-db-connection [c db]
+    (let [results
+          (j/query c ["SELECT 1 FROM information_schema.tables WHERE  table_schema = ? AND table_name = ?"
+                      schema table])]
+      (not (nil? (first results)))))
+  )
+
+(defn create-table [db schema table & fields]
+  (j/db-do-commands db
+                   (apply j/create-table-ddl (str schema "." table) fields)))
+
+(defn table-columns [db schema table]
+  "Get table columns"
+  (j/with-db-connection [c db]
+    (let [results
+          (j/query c ["SELECT column_name
+FROM information_schema.columns
+  WHERE table_schema = ?
+  AND table_name   = ?" schema table])]
+      results)))
+
+(defn clj-to-db-type [type]
+  "Returns type with transformation method"
+  (case type
+    org.joda.time.DateTime ["timestamp without time zone" #(tc/to-timestamp %)]
+    ["text" #(str %)]))
+
+(defn add-column [db schema collection column-name column-type]
+  (let [template "ALTER TABLE %s.%s ADD %s %s NULL;"
+        [clj-type _] (clj-to-db-type column-type)
+        cmd (format template (quoted schema) (quoted collection) (quoted column-name) clj-type)]
+    (j/db-do-commands db cmd)))


Integration of format utility functions by https://github.com/MafcoCinco as described here: https://github.com/gorillalabs/sparkling/pull/57

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

--- src/clojure/sparkling/format.clj
+++ src/clojure/sparkling/format.clj
@@ -0,0 +1,111 @@
+(ns sparkling.format
+  (:require [sparkling.core :as spark])
+  (:import  [org.apache.spark.sql SparkSession SparkSession$Builder]
+            [org.apache.spark.sql RowFactory]
+            [org.apache.spark.sql.types DataTypes]))
+
+
+(def schema-types {:binary    DataTypes/BinaryType
+                   :boolean   DataTypes/BooleanType
+                   :byte      DataTypes/ByteType
+                   :date      DataTypes/DateType
+                   :double    DataTypes/DoubleType
+                   :float     DataTypes/FloatType
+                   :integer   DataTypes/IntegerType
+                   :long      DataTypes/LongType
+                   :null      DataTypes/NullType
+                   :short     DataTypes/ShortType
+                   :string    DataTypes/StringType
+                   :timestamp DataTypes/TimestampType})
+
+
+(defn row->map
+  "Converts Spark Row to Clojure map using specified schema"
+  [schema]
+  (let [fields        (into [] (.fieldNames schema))
+        offsets       (range 0 (count fields))
+        field-offsets (map vector fields offsets)]
+    (fn [row]
+      (->> (map #(vector (keyword (first %)) (.get row (second %))) field-offsets)
+           (into {})))))
+
+
+(defn row->vector
+  "Converst Spark Row to Clojure vector using specified schema"
+  [schema]
+  (let [fields  (into [] (.fieldNames schema))
+        offsets (range 0 (count fields))]
+    (fn [row]
+      (->> (map #(.get row %) offsets)
+           (into [])))))
+
+
+(defn select-values
+  "Pulls values from the map, ordered by the keys in the sequence"
+  [m keys]
+  (reduce #(conj %1 (%2 m)) [] keys))
+
+
+(defn map->row
+  "Converts Clojure map to Spark Row using specified schema"
+  [keys]
+  (fn [data]
+    (->> (select-values data keys)
+         (into-array Object)
+         (RowFactory/create))))
+
+
+(defn vector->row
+  "Converts Clojure sequence to Spark Row"
+  [data]
+  (->> (into-array Object data)
+       (RowFactory/create)))
+
+
+(defn data-frame->rdd-of-maps
+  "Converts DataFrame to RDD of Clojure Maps"
+  [data-frame]
+  (let [schema (.schema data-frame)]
+    (spark/map (row->map schema) (.toJavaRDD data-frame))))
+
+
+(defn data-frame->rdd-of-vectors
+  "Converts DataFrame to RDD of Vectors"
+  [data-frame]
+  (let [schema (.schema data-frame)]
+    (spark/map (row->vector schema) (.toJavaRDD data-frame))))
+
+
+(defn create-struct-field
+  "Creates a StructField object from tuple of field name, type and nullable boolean"
+  [field-params]
+  (DataTypes/createStructField (name (first field-params))
+                               ((keyword (second field-params)) schema-types)
+                               (last field-params)))
+
+
+(defn build-schema
+  "Creates a StructType object, which represents a schema. `fields` should be a
+  sequence of vectors containing the field name, the field type and a boolean
+  indicating if the field is nullable"
+  [fields]
+  (let [struct-fields (into [] (map create-struct-field fields))]
+    (DataTypes/createStructType (java.util.ArrayList. struct-fields))))
+
+
+(defn rdd-of-maps->data-frame
+  "Convert an RDD of Maps to a DataFrame"
+  [spark-session rdd fields]
+  (let [columns (map #(keyword (first %)) fields)
+        schema  (build-schema fields)
+        row-rdd (spark/map (map->row columns) rdd)]
+    (.createDataFrame spark-session row-rdd schema)))
+
+
+(defn rdd-of-vectors->data-frame
+  "Convert an RDD of Vectors to a DataFrame"
+  [spark-session rdd fields]
+  (let [columns (map #(keyword (second %)) fields)
+        schema  (build-schema fields)
+        row-rdd (spark/map vector->row rdd)]
+    (.createDataFrame spark-session row-rdd schema)))


added final version of template-removal code

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

--- src/crawler/template_removal.clj
+++ src/crawler/template_removal.clj
@@ -0,0 +1,102 @@
+(ns crawler.template-removal
+  "Generate a preliminary blacklist - comprising template code"
+  (:require [crawler.rich-char-extractor :as extractor]
+            [clj-http.client :as client]
+            [clj-http.cookies :as cookies]))
+
+(def my-cs (cookies/cookie-store))
+
+(defn look-at
+  ([a-link]
+     (look-at a-link (set [])))
+
+  ([a-link blacklist]
+     (try (let [body  (-> a-link (client/get {:cookie-store my-cs}) :body)]
+            (extractor/state-action body a-link blacklist))
+          (catch Exception e nil))))
+
+(defn all-xpaths
+  ([page-src url]
+     (all-xpaths page-src url (set [])))
+
+  ([page-src url blacklist]
+     (let [infos   (extractor/state-action page-src url blacklist)
+           _ (println :infos infos)
+           samples (reduce
+                    (fn [acc {xpath :xpath _ :score hrefs :hrefs}]
+                      (let [picked (take
+                                    2
+                                    (filter
+                                     (fn [a-link]
+                                       (and (not (some #{a-link} (:links acc)))
+                                            (not= a-link url)))
+                                     hrefs))]
+                        (println :xpath xpath :picked picked)
+                        (if picked
+                          {:links (clojure.set/union (:links acc) (set picked))
+                           :content (conj (:content acc) [xpath picked])}
+                          acc)))
+                    {:links (set []) :content (set [])}
+                    (:xpath-nav-info infos))
+
+           sampled (reduce
+                    (fn [acc [x l]]
+                      (let [action-space (do
+                                           (println :sampling l)
+                                           (map (fn [x]
+                                                  (do
+                                                    (Thread/sleep 2000)
+                                                    (look-at x))) l))
+
+                            action-space-map (into
+                                              {}
+                                              (map
+                                               (fn [{xpath :xpath _ :score hrefs :hrefs}]
+                                                 [xpath {:incidence 1 :hrefs [hrefs]}])
+                                               (reduce
+                                                concat
+                                                (map :xpath-nav-info action-space))))]
+                        (merge-with
+                         (fn [x y]
+                           {:incidence (+ (:incidence x)
+                                          (:incidence y))
+                            :hrefs (concat (:hrefs x) (:hrefs y))})
+                         acc action-space-map)))
+                    {}
+                    (:content samples))
+
+           candidates (into
+                       {}
+                       (filter
+                        (fn [[x info]]
+                          (<= 5 (:incidence info)))
+                        sampled))
+
+           xpath-link-table (map
+                             (fn [{xpath :xpath _ :score hrefs :hrefs}]
+                               [xpath (let [obs (:hrefs (candidates xpath))]
+                                        (map
+                                         (fn [a-link]
+                                           [a-link (count
+                                                    (filter
+                                                     identity
+                                                     (map
+                                                      #(some #{a-link} %)
+                                                      obs)))])
+                                         hrefs))])
+                             (:xpath-nav-info infos))
+
+           xpath-links-candidates (map
+                                   (fn [[x ls]]
+                                     [x (filter
+                                         (fn [[l c]]
+                                           (<= 5 c))
+                                         ls)])
+                                   xpath-link-table)]
+       (into
+        {} (filter
+            #(-> % second not-empty)
+            (map
+             (fn [[x ls]]
+               [x (map first ls)])
+             xpath-links-candidates))))))


Introduce PoliticalEntity

Introduce PoliticalEntity

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


handle creation of applications for first time ptm experience

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


views: keep unit list simple

views: keep unit list simple

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


More idiomatic hiccup.

More idiomatic hiccup.

--- src/clojars/web/common.clj
+++ src/clojars/web/common.clj
@@ -57,8 +57,7 @@

 (defn flash [msg]
   (if msg
-    [:div {:id "flash"}
-     msg]))
+    [:div#flash msg]))

 (defn error-list [errors]
   (when errors


Add env namespace for working around CLJS environ loading bug

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

--- src/sidequarter_frontend/env.clj
+++ src/sidequarter_frontend/env.clj
@@ -0,0 +1,5 @@
+(ns ^:figwheel-always sidequarter-frontend.env
+  (:require [environ.core :refer [env]]))
+
+(defmacro cljs-env [key]
+  (env key))


Added String Lengths Backwards problem

Added String Lengths Backwards problem

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

--- src/clojush/problems/software/string_lengths_backwards.clj
+++ src/clojush/problems/software/string_lengths_backwards.clj
@@ -0,0 +1,164 @@
+;; string_lengths_backwards.clj
+;; Tom Helmuth, thelmuth@cs.umass.edu
+;;
+;; Problem Source: iJava (http://ijava.cs.umass.edu/)
+;;
+;; Given a vector of strings with length <= 50, where each string has
+;; length <= 50, print the length of each string in the vector starting with
+;; the last and ending with the first.
+;;
+;; input stack has 1 input vector of strings
+
+(ns clojush.problems.software.string-lengths-backwards
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random util globals]
+        clojush.instructions.tag
+        [clojure.math numeric-tower combinatorics]
+        ))
+
+; Atom generators
+(def string-lengths-atom-generators
+  (concat (list
+            (fn [] (- (lrand-int 201) 100)) ; Integer ERC in [-100,100]
+            ;;; end ERCs
+            (tag-instruction-erc [:string :vector_string :integer :boolean :exec] 1000)
+            (tagged-instruction-erc 1000)
+            ;;; end tag ERCs
+            'in1
+            ;;; end input instructions
+            )
+          (registered-for-stacks [:string :vector_string :integer :boolean :exec :print])))
+
+;; Define test cases
+(defn string-generator
+  "Makes a random string of length len."
+  [len]
+  (apply str
+         (repeatedly len
+                     #(lrand-nth (concat [\newline \tab]
+                                         (map char (range 32 127)))))))
+
+(defn string-lengths-input
+  "Makes a String Lengths input vector of length len."
+  [len]
+  (vec (repeatedly len
+                   #(string-generator (lrand-int 51)))))
+
+;; A list of data domains for the problem. Each domain is a vector containing
+;; a "set" of inputs and two integers representing how many cases from the set
+;; should be used as training and testing cases respectively. Each "set" of
+;; inputs is either a list or a function that, when called, will create a
+;; random element of the set.
+(def string-lengths-data-domains
+  [[(list []) 1 0] ;; Empty input vector
+   [(list [""]
+          ["" ""]
+          ["" "" ""]
+          ["" "" "" "" "" "" "" "" "" ""]) 4 0] ;; Vectors with empty strings
+   [(list ["abcde"]
+          ["1"]
+          ["abc" "hi there"]
+          ["!@#" "\n\n\t\t" "5552\na r"]
+          ["tt" "333" "1" "ccc"]) 5 0] ;; Vectors with small numbers of inputs
+   [(fn [] (string-lengths-input (inc (lrand-int 50)))) 90 1000] ;; Random vectors
+   ])
+
+;;Can make String Lengths test data like this:
+(test-and-train-data-from-domains string-lengths-data-domains)
+
+; Helper function for error function
+(defn string-lengths-test-cases
+  "Takes a sequence of inputs and gives IO test cases of the form
+   [input output]."
+  [inputs]
+  (map #(vector %
+                (apply str (interpose \newline (reverse (map count %)))))
+       inputs))
+
+; Define error function. For now, each run uses different random inputs
+(defn string-lengths-error-function
+  "Returns the error function for the string-lengths problem. Takes as
+   input String Lengths data domains."
+  [data-domains]
+  (let [[train-cases test-cases] (map string-lengths-test-cases
+                                      (test-and-train-data-from-domains data-domains))]
+    (when true ;; Change to false to not print test cases
+      (doseq [[i case] (map vector (range) train-cases)]
+        (println (format "Train Case: %3d | Input/Output: %s" i (str case))))
+      (doseq [[i case] (map vector (range) test-cases)]
+        (println (format "Test Case: %3d | Input/Output: %s" i (str case)))))
+    (fn the-actual-string-lengths-error-function
+      ([program]
+        (the-actual-string-lengths-error-function program :train))
+      ([program data-cases] ;; data-cases should be :train or :test
+        (the-actual-string-lengths-error-function program data-cases false))
+      ([program data-cases print-outputs]
+        (let [behavior (atom '())
+              errors (doall
+                       (for [[input1 correct-output] (case data-cases
+                                                                  :train train-cases
+                                                                  :test test-cases
+                                                                  [])]
+                         (let [final-state (run-push program
+                                                     (->> (make-push-state)
+                                                       (push-item input1 :input)
+                                                       (push-item "" :output)))
+                               result (stack-ref :output 0 final-state)]
+                           (when print-outputs
+                             (println (format "| Correct output: %s\n| Program output: %s\n" (pr-str correct-output) (pr-str result))))
+                           ; Record the behavior
+                           (when @global-print-behavioral-diversity
+                             (swap! behavior conj result))
+                           ; Error is Levenshtein distance
+                           (levenshtein-distance correct-output result))))]
+          (when @global-print-behavioral-diversity
+            (swap! population-behaviors conj @behavior))
+          errors)))))
+
+(defn string-lengths-report
+  "Custom generational report."
+  [best population generation error-function report-simplifications]
+  (let [best-program (not-lazy (:program best))
+        best-test-errors (error-function best-program :test)
+        best-total-test-error (apply +' best-test-errors)]
+    (println ";;******************************")
+    (printf ";; -*- String Lengths problem report - generation %s\n" generation)(flush)
+    (println "Test total error for best:" best-total-test-error)
+    (println (format "Test mean error for best: %.5f" (double (/ best-total-test-error (count best-test-errors)))))
+    (when (zero? (:total-error best))
+      (doseq [[i error] (map vector
+                             (range)
+                             best-test-errors)]
+        (println (format "Test Case  %3d | Error: %d" i error))))
+    (println ";;------------------------------")
+    (println "Outputs of best individual on training cases:")
+    (error-function best-program :train true)
+    (println ";;******************************")
+    )) ;; To do validation, could have this function return an altered best individual
+       ;; with total-error > 0 if it had error of zero on train but not on validation
+       ;; set. Would need a third category of data cases, or a defined split of training cases.
+
+
+; Define the argmap
+(def argmap
+  {:error-function (string-lengths-error-function string-lengths-data-domains)
+   :atom-generators string-lengths-atom-generators
+   :max-points 300
+   :max-points-in-initial-program 150
+   :evalpush-limit 600
+   :population-size 1000
+   :max-generations 300
+   :parent-selection :lexicase
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    }
+   :alternation-rate 0.01
+   :alignment-deviation 10
+   :uniform-mutation-rate 0.01
+   :problem-specific-report string-lengths-report
+   :print-behavioral-diversity true
+   :report-simplifications 0
+   :final-report-simplifications 5000
+   })


changed keyword in test to make behavior of status-channel more clear

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


Do not pass channel to the consumer’s handler function

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


chamber should apply trampoline

chamber should apply trampoline


formatting

formatting


First draft of model using korma

First draft of model using korma

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

--- src/wishlistd/models/sql.clj
+++ src/wishlistd/models/sql.clj
@@ -0,0 +1,67 @@
+(ns wishlistd.models.sql
+  (:use korma.db
+        korma.core
+        wishlistd.code))
+
+;;;; DB
+
+(defdb prod
+  (postgres {:db "cwl"
+             :username "cwl"
+             :password "wish"}))
+
+;;;; ENTITIES
+
+(defentity wish)
+(defentity wishlist
+  (pk :code)
+  (has-many wish {:fk "wishlist_code"}))
+
+;;;; HELPER
+
+(defn- new-code []
+  (let [code (random-code 8)]
+    (if (nil? (select wishlist (where {:code code})))
+      (new-code)
+      code)))
+
+;;;; CRUD
+
+;; WISHLIST
+
+(defn create-wishlist [wl]
+  (let [code (new-code)
+        neu (assoc wl :code code)]
+    (insert wishlist
+      (values neu))))
+
+(defn read-wishlist [code]
+  (select wishlist
+    (with wish)
+    (where {:code code})))
+
+(defn update-wishlist [{:keys [code] :as wl}]
+  (update wishlist
+    (set-fields wl)
+    (where {:code code})))
+
+(defn delete-wishlist [code]
+  (delete wishlist
+    (where {:code code})))
+
+;; WISH
+
+(defn create-wish [w]
+  (insert wish
+    (values w)))
+
+; No use for read-wish
+
+(defn update-wish [{:keys [id] :as w}]
+  (update wish
+    (set-fields w)
+    (where {:id id})))
+
+(defn delete-wish [id]
+  (delete wish
+    (where {:id id})))


Log basic request info on errors

Log basic request info on errors

... excluding PII

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


add Gitter chat link to home page

add Gitter chat link to home page

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


Add helper.cljs

Add helper.cljs

error: pathspec 'src_cljs/bookmarks/helpers.cljs' did not match any file(s) known to git

--- src_cljs/bookmarks/helpers.cljs
+++ src_cljs/bookmarks/helpers.cljs
@@ -0,0 +1,3 @@
+(ns bookmarks.helpers)
+(defn url-format [url title]
+  [:a {:href url :class "btn btn-primary"} title])


POST links works

POST links works

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


squash! squash! Rework the way field flattening happens in annotate :yum:

--- src/metabase/driver/query_processor/annotate.clj
+++ src/metabase/driver/query_processor/annotate.clj
@@ -83,12 +83,12 @@
   "Flatten a group of fields, keeping those which are more important when duplicates exist."
   [fields]
   {:pre [(every? identity fields)]}
-  (let [path-importance (fn [{[k] :path}]
-                          (cond
-                            (= k :breakout) 0     ; lower number = higher importance, because `sort` is ascending
-                            (= k :fields)   1     ; more important versions of fields are the ones we'll actually see in results,
-                            :else           2))]  ; so look at each field's :path. For now, it's enough just to look at the first element.
-    (distinct (sort-by path-importance fields)))) ; this is important so we don't use return the wrong version of a Field (e.g. with the wrong unit)
+  (distinct (sort-by (fn [{[k] :path}]       ; more important versions of fields are the ones we'll actually see in results,
+                       (cond                 ; this is important so we don't use return the wrong version of a Field (e.g. with the wrong unit)
+                         (= k :breakout) 0   ; so look at each field's :path. For now, it's enough just to look at the first element.
+                         (= k :fields)   1   ; (lower number = higher importance, because `sort` is ascending)
+                         :else           2))
+                     fields)))

 (defn- flatten-collect-fields
   "Collect fields from COLL, and remove duplicates."


Stub for new test module: utils-test

Stub for new test module: utils-test

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

--- test/zg/utils_test.clj
+++ test/zg/utils_test.clj
@@ -0,0 +1,29 @@
+;
+;  (C) Copyright 2016  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns zg.utils-test
+  (:require [clojure.test :refer :all]
+            [zg.utils :refer :all]))
+
+;
+; Common functions used by tests.
+;
+
+(defn callable?
+    "Test if given function-name is bound to the real function."
+    [function-name]
+    (clojure.test/function? function-name))
+
+;
+; Tests for various functions existence
+;
+


testing deleted instace addressing

testing deleted instace addressing

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

--- test/celestial/test/aws.clj
+++ test/celestial/test/aws.clj
@@ -0,0 +1,11 @@
+(ns celestial.test.aws
+  (:use
+    [celestial.fixtures :only (redis-ec2-spec)]
+    expectations
+    aws.provider
+    [celestial.model :only (vconstruct)]
+    ))
+
+(let [instance (vconstruct redis-ec2-spec)]
+  (expect clojure.lang.ExceptionInfo (.start instance)))
+


Revert server.clj pending secondary PR

Revert server.clj pending secondary PR


Add simple tests for search

Add simple tests for search

error: pathspec 'test/cljs/t_search.cljs' did not match any file(s) known to git

--- test/cljs/t_search.cljs
+++ test/cljs/t_search.cljs
@@ -0,0 +1,17 @@
+(ns subman.t-search
+  (:require-macros [purnam.test.sweet :refer [facts fact]])
+  (:require [reagent.core :refer [atom]]
+            [subman.helpers :refer [truthy]]
+            [subman.search :as search]))
+
+(facts "should create search request"
+       (fact "with query"
+             (search/create-search-request "test") => "/api/search/?query=test")
+       (fact "with query and lang"
+             (search/create-search-request
+              "test :lang ru") => "/api/search/?query=test&lang=ru"))
+
+(fact "watch to query should be ok"
+      (search/watch-to-query (atom "")
+                             (atom [])
+                             (atom 0)) => truthy)


Trying to find existing paths that need to be updated.

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


CMR-688: Added file left over from merge.

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

--- search-app/src/cmr/search/results_handlers/opendata_spatial_results_handler.clj
+++ search-app/src/cmr/search/results_handlers/opendata_spatial_results_handler.clj
@@ -0,0 +1,101 @@
+(ns cmr.search.results-handlers.opendata-spatial-results-handler
+  "A helper for converting spatial shapes into opendata results"
+  (:require [clojure.data.xml :as x]
+            [cmr.spatial.polygon :as poly]
+            [cmr.spatial.point :as p]
+            [cmr.spatial.mbr :as m]
+            [cmr.spatial.geodetic-ring :as gr]
+            [cmr.spatial.cartesian-ring :as cr]
+            [cmr.spatial.line-string :as l]
+            [clojure.string :as str]))
+
+(def CARTESIAN_SRS
+  ;; TODO - replace this with the correct value
+  "EPSG:4326")
+
+(def GEODETIC_SRS
+  ;; WGS-84
+  "EPSG:4326")
+
+(defn- points-map->points-str
+  "Converts a map containing :points into the lat lon space separated points string of GML"
+  [{:keys [points]}]
+  (str/join " " (mapcat #(vector (:lat %) (:lon %)) points)))
+
+(defprotocol OpendataSpatialHandler
+  (shape->string
+    [shape]
+    "Converts a spatial shape into the string of ordinates")
+  (shape->gml
+    [shape]
+    "Converts a shape into a GML representation"))
+
+(extend-protocol OpendataSpatialHandler
+
+  cmr.spatial.point.Point
+  (shape->string
+    [{:keys [lon lat]}]
+    (str lat " " lon))
+
+  cmr.spatial.line_string.LineString
+  (shape->string
+    [line]
+    (points-map->points-str line))
+  (shape->gml
+    [line]
+    (x/element :gml:LineString {} (shape->string line)))
+
+  cmr.spatial.mbr.Mbr
+  (shape->string
+    [{:keys [west north east south]}]
+    (str/join " " [west south east north]))
+
+  cmr.spatial.geodetic_ring.GeodeticRing
+  (shape->string
+    [ring]
+    (points-map->points-str ring))
+  (shape->gml
+    [ring]
+    (x/element :gml:LinearRing {}
+               (x/element :gml:posList {}
+                          (shape->string ring))))
+
+  cmr.spatial.cartesian_ring.CartesianRing
+  (shape->string
+    [ring]
+    (points-map->points-str ring))
+  (shape->gml
+    [ring]
+    (x/element :gml:LinearRing {}
+               (x/element :gml:posList {}
+                          (shape->string ring))))
+
+  cmr.spatial.polygon.Polygon
+  (shape->gml
+    [{:keys [rings]}]
+    (x/element :gml:Polygon {}
+               (x/element :gml:outerBoundaryIs {}
+                          (shape->gml (first rings)))
+               (when-let [holes (rest rings)]
+                 (x/element :gml:innerBoundaryIs {}
+                            (for [ring holes]
+                              (shape->gml ring)))))))
+
+(defn shapes->json
+  "Returns the json representation of the given shapes"
+  [shapes pretty?]
+  (let [xml-fn (if pretty? x/indent-str x/emit-str)
+        shapes-by-type (group-by type shapes)
+        points (when-let [points (get shapes-by-type cmr.spatial.point.Point)]
+                 (shape->string (first points)))
+        boxes (when-let [boxes (get shapes-by-type cmr.spatial.mbr.Mbr)]
+                (shape->string (first boxes)))
+        polygons (when-let [polygons (get shapes-by-type cmr.spatial.polygon.Polygon)]
+                   (str/replace (xml-fn (shape->gml (first polygons)))
+                                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+                                ""))
+        lines (when-let [lines (get shapes-by-type cmr.spatial.line_string.LineString)]
+                (str/replace (xml-fn (shape->gml (first lines)))
+                             "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+                             ""))]
+    (or polygons lines boxes points)))


Fixed gcd for std io

Fixed gcd for std io

error: pathspec 'hackerrank/Functional' did not match any file(s) known to git
error: pathspec 'Programming/Recursion/functional-programming-warmups-in-recursion---gcd/clojure/solution.clj' did not match any file(s) known to git


sharer changes

sharer changes

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


First test for UI

First test for UI

error: pathspec 'test/photon/ui/ui_test.clj' did not match any file(s) known to git

--- test/photon/ui/ui_test.clj
+++ test/photon/ui/ui_test.clj
@@ -0,0 +1,14 @@
+(ns photon.ui.ui-test
+  (:require [midje.sweet :refer :all]
+            [photon.core :refer :all]
+            [clj-http.client :as client]
+            [com.stuartsierra.component :as component]))
+
+(let [system (-main "-rest.port" "6969"
+                    "-projections.path" "/tmp/dummy-folder/"
+                    "-amqp.url" "amqp://localhost"
+                    "-db.backend" "file"
+                    "-file.path" "/tmp/events.tmp")]
+  (fact (client/get "http://localhost:6969/swagger.json")
+        =not=> (throws clojure.lang.ExceptionInfo))
+  (component/stop system))


placeholder: Advent of Code 2021, Day 17, Part 2 in Clojure

error: pathspec 'advent-of-code/2021/day-17-part-2.clj' did not match any file(s) known to git

--- advent-of-code/2021/day-17-part-2.clj
+++ advent-of-code/2021/day-17-part-2.clj
@@ -0,0 +1,31 @@
+(ns day-17-part-1)
+
+(defn parse-input
+  [input]
+  (let [[low-x upp-x low-y upp-y] (map #(Integer/parseInt %) (re-seq #"-?\d+" input))]
+    [low-x upp-x low-y upp-y]))
+
+(defn count-hits
+  [x y dx dy low-x upp-x low-y upp-y hits]
+  (if (or (> x upp-x) (< y low-y)) hits
+      (if (and (<= low-x x upp-x) (<= low-y y upp-y)) (inc hits)
+          (recur
+           (+ x dx) (+ y dy)
+           (if (> dx 0) (dec dx) dx) (dec dy)
+           low-x upp-x low-y upp-y
+           hits))))
+
+(defn solve
+  [] (let [[low-x upp-x low-y upp-y] (parse-input (slurp "day-17.txt"))]
+       (reduce
+        (fn [ans dx]
+          (first
+           (reduce
+            (fn [[ans dx] dy]
+              [(count-hits 0 0 dx dy low-x upp-x low-y upp-y ans) dx])
+            [ans dx]
+            (range low-y (- low-y)))))
+        0
+        (range 1 (inc upp-x)))))
+
+(println (solve))


Solve Sphere in clojure

Solve Sphere in clojure

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

--- solutions/uri/1011/1011.clj
+++ solutions/uri/1011/1011.clj
@@ -0,0 +1,15 @@
+(ns main)
+
+(def pi 3.14159)
+
+(defn pow [x n]
+  (reduce * (repeat n x)))
+
+(defn main []
+  (loop [line (read-line)]
+    (when line
+       (let [radius (Double/parseDouble line)]
+         (printf "VOLUME = %.3f%n" (*(*(/ 4.0 3.0) pi) (pow radius 3))))
+       (recur (read-line)))))
+
+(main)


comment out Program and TsCs types

comment out Program and TsCs types

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


router: KNF

router: KNF

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


Update Deps

Update Deps


Version 0.1.1

Version 0.1.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/tobiasbayer/lambdacd.git/'


bump version to 3.4.1

bump version to 3.4.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/'


test infrastructure with doo

test infrastructure with doo

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


make this a leiningen project

make this a leiningen project

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

--- project.clj
+++ project.clj
@@ -0,0 +1,19 @@
+(defproject birds "0.1.0-SNAPSHOT"
+  :description "Example Frege-calls-custom-Java-class application, with dependency on jline"
+  :url "https://github.com/Ingo60/birds"
+  :license {:name "BSD 2 clause"
+            :url "https://github.com/Ingo60/birds/blob/master/LICENSE"}
+  ; The following is more or less fixed
+  ; You may adapt the frege compiler version
+  :dependencies [;; [org.clojure/clojure "1.6.0"]
+                 ;; need to depend on Frege for runtime:
+                 [com.theoryinpractise.frege/frege "3.22.324-g630677b"]
+				 [jline/jline "1.0"]]
+  :plugins [[lein-fregec "3.22.324"]]
+  ; Good: The java source can be in the same directory as the frege stuff!
+  :java-source-paths ["src"]
+  :frege-source-paths ["src"]
+  :target-path "bin"
+  :main birds.Main
+  :profiles {:uberjar {:aot :all
+                       :prep-tasks ["javac" "fregec"]}})


bump blueprints dep

bump blueprints dep

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


remove duplicate logging dependency

remove duplicate logging dependency

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


Besser einstellungen

Besser einstellungen

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


Remove unused tests

Remove unused 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/expez/jada.git/'


Liburuak lortzean orri kopurua kalkulatu

fatal: Unable to read current working directory: No such file or directory
fatal: the remote end hung up unexpectedly


print macro

print macro

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

--- src/clj/algorithms_clj/print_macro.clj
+++ src/clj/algorithms_clj/print_macro.clj
@@ -0,0 +1,10 @@
+(ns algorithms-clj.print-macro)
+
+(defmacro print-macro
+  [code]
+  (println "Compiling:" code)
+  code)
+
+(defn test-print-macro
+  []
+  (print-macro (+ 1 2)))


Lay out applications summary

Lay out applications summary


remove variants from service query, explicitly select keys to copy


Clearing edition on create

Clearing edition on create

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


Clojure solution for problem 2

Clojure solution for problem 2

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


Code Gardening

Code Gardening

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/iot-paas-home/telegram-iot-gateway.git/'


Add project.clj for pascals-triangle

Add project.clj for pascals-triangle

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

--- pascals-triangle/project.clj
+++ pascals-triangle/project.clj
@@ -0,0 +1,6 @@
+(defproject pascals-triangle "0.1.0-SNAPSHOT"
+  :description "pascal's triangle exercise."
+  :url "https://github.com/exercism/xclojure/tree/master/pascals-triangle"
+  :source-paths [""]
+  :test-paths [""]
+  :dependencies [[org.clojure/clojure "1.7.0"]])


word-count in clojure, attempt 1

word-count in clojure, attempt 1

error: pathspec 'clojure/word-count/word_count.clj' did not match any file(s) known to git

--- clojure/word-count/word_count.clj
+++ clojure/word-count/word_count.clj
@@ -0,0 +1,6 @@
+(ns phrase (:require [clojure.string :as str]))
+
+(defn word-count [sentence]
+    (def words (re-seq #"\w+" (str/lower-case sentence)))
+    (frequencies words)
+)


extract main component mounting logic to functions

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


Problem 0132.

Problem 0132.

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

--- src/project_euler/problem_0132.clj
+++ src/project_euler/problem_0132.clj
@@ -0,0 +1,55 @@
+(ns project-euler.problem-0132
+  (:require [clojure.math.combinatorics :as combo]))
+
+;; A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k.
+;; For example, R(10) = 1111111111 = 11×41×271×9091, and the sum of these prime factors is 9414.
+;; Find the sum of the first forty prime factors of R(10^9).
+
+;; From problem 0010 :
+;; -------------------
+(defn prime?
+  [n]
+  {:pre [(integer? n) (> n 0)]}
+  (or (== 2 n)
+      (let [mmax (+ (Math/sqrt n) 1)]
+        (not (some #(== 0 (rem n %)) (concat [2] (range 3 mmax 2))))
+        )))
+;;------------------------------------------------------------------------
+
+(defn prime-factors [x]
+  (letfn [(next-fact [n] (if (== n 2) 3 (+ n 2)))]
+    (loop [x x, p 2, pfs []]
+      (cond (== 1 x)          pfs
+            (> (* p p) x)     (conj pfs x)
+            (zero? (rem x p)) (recur (quot x p) p (conj pfs p))
+            :else             (recur x (next-fact p) pfs)
+            ))))
+
+
+(def divisors-of-1e9
+  (->> (prime-factors 1000000000)
+       combo/subsets
+       (map #(apply * 1 %))
+       set
+       ))
+
+(defn a [n]
+  (loop [r 1 k 1]
+    (let [r' (rem r n)]
+      (if (zero? r')
+        k
+        (recur (+ 1 (* 10 r')) (inc k))
+        ))))
+
+(defn solution []
+  (->> (iterate inc 3)
+       (remove #(zero? (rem % 5)))
+       (filter prime?)
+       (map (fn [n] [n (a n)]))
+       (filter #(divisors-of-1e9 (second %)))
+       (take 40)
+       (map first)
+       (apply +)
+       ))
+
+;;-> 843296


add renewal and room transfer asana task templates


query tests

query tests

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

--- test/com/billpiel/mem_tracer/test/query_test.clj
+++ test/com/billpiel/mem_tracer/test/query_test.clj
@@ -0,0 +1,79 @@
+(ns com.billpiel.mem-tracer.test.query-test
+  (:require [com.billpiel.mem-tracer.query :as q]
+            [midje.sweet :refer :all]))
+
+(comment "
+
+            A
+          B     C
+        D  E     F
+          G H     I
+             J   K L
+
+")
+
+(def test-trace {:name "A"
+                 :depth 0
+                 :args [1 2]
+                 :return 3
+                 :children [{:name "B"
+                             :depth 1
+                             :args [3 4 5]
+                             :return :b-return
+                             :children [{:name "D"
+                                         :depth 2
+                                         :args []
+                                         :return 4
+                                         :children []}
+                                        {:name "E"
+                                         :depth 2
+                                         :args [:a 1 :b 2]
+                                         :return 5
+                                         :children []}]}
+                            {:name "C"
+                             :depth 1
+                             :args [1 {:a [10 11 12]} 5]
+                             :return 8
+                             :children [{:name "F"
+                                         :depth 2
+                                         :args [2 5 9]
+                                         :return "return F"
+                                         :children [{:name "I"
+                                                     :depth 3
+                                                     :args []
+                                                     :return 0
+                                                     :children [{:name "L"
+                                                                 :depth 4
+                                                                 :args []
+                                                                 :return 0
+                                                                 :children []}]}]}]}]})
+
+(def test-zipr (q/trace->zipper test-trace))
+
+(fact "simple"
+  (q/q test-zipr [:depth] 1) => [{:name "B"
+                                  :depth 1
+                                  :args [3 4 5]
+                                  :return :b-return
+                                  :children []}
+                                 {:name "C"
+                                  :depth 1
+                                  :args [1 {:a [10 11 12]} 5]
+                                  :return 8
+                                  :children []}])
+
+(fact "segment"
+  (q/q test-zipr :s
+       [:name] "C"
+       [:name] "I")
+  => [{:args [1 {:a [10 11 12]} 5],
+       :children
+       [{:args [2 5 9],
+         :children
+         [{:args [], :children [], :depth 3, :name "I", :return 0}],
+         :depth 2,
+         :name "F",
+         :return "return F"}],
+       :depth 1,
+       :name "C",
+       :return 8}])


allow org on other values

allow org on other values

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


Remove path to file

Remove path to file

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


Fix it so that double-click on an item toggles...

... the item-details sidebar, and single-click anywhere else on the page
removes the sidebar.


convert message to json

convert message to json

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


A little bit of comment cleanup

A little bit of comment cleanup

--- src/polismath/named_matrix.clj
+++ src/polismath/named_matrix.clj
@@ -22,12 +22,11 @@
             ; If necessary, insert new columns and/or rows of zeros
             matrix (if (= -1 col-index) (mapv #(conj % 0) matrix) matrix)
             matrix (if (> (count rows) (count matrix)) (conj matrix (into [] (repeat (count cols) 0))) matrix)
-            ; Get the indices of the matrix position to be updated (note that .indexOf above gives
-            ; us -1 if the item is not in the collection)
+            ; Get indices of matrix position to be updated (note .indexOf above gives -1 if item not in coll)
             indices (mapv (fn [xs i] (if (= -1 i) (- (count xs) 1) i))
                           [rows cols] [row-index col-index])
             matrix (assoc-in matrix indices value)]
-      (assoc nmat :rows rows :cols cols :matrix matrix)))
+        (assoc nmat :rows rows :cols cols :matrix matrix)))
     nmat values))


Add todo

Add todo

--- src/reagent/impl/template.cljs
+++ src/reagent/impl/template.cljs
@@ -213,6 +213,7 @@
         (let [props (nth argv 1 nil)
               hasprops (or (nil? props) (map? props))
               jsprops (convert-props (if hasprops props) id-class true)]
+          ;; TODO: Meta key
           (make-element argv comp jsprops
                         (if hasprops 2 1)))))))

@@ -227,7 +228,7 @@
     (let [ne (native-element tag v)]
       (if (some? ne)
         ne
-        (let [c (as-class (nth v 0))
+        (let [c (as-class tag)
               jsprops #js{:argv v}]
           (let [k (-> v meta get-key)
                 k' (if (nil? k)


Added json file for convenience

Added json file for convenience

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

--- src/wishlistd/json.clj
+++ src/wishlistd/json.clj
@@ -0,0 +1,2 @@
+(ns wishlistd.json
+  (:require clojure.contrib.json))


add conditional assertion support

add conditional assertion support

error: pathspec 'support/src/figwheel/client/utils.clj' did not match any file(s) known to git

--- support/src/figwheel/client/utils.clj
+++ support/src/figwheel/client/utils.clj
@@ -0,0 +1,20 @@
+(ns figwheel.client.utils)
+
+(def dev-blocks? (atom false))
+
+(defmacro enable-dev-blocks! []
+  (reset! dev-blocks? true)
+  `(do))
+
+(defmacro disable-dev-blocks! []
+  (reset! dev-blocks? false)
+  `(do))
+
+(defmacro dev [& body]
+  (if @dev-blocks?
+    `(do ~@body)
+    `(comment ~@body)))
+
+(defmacro dev-assert [& body]
+  `(dev
+     ~@(map (fn [pred-stmt] `(assert ~pred-stmt)) body)))


Add clojure day 3 basic

Add clojure day 3 basic

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

--- clojure/day3/day3.clj
+++ clojure/day3/day3.clj
@@ -0,0 +1,14 @@
+; Use refs to create a vector of accounts in memory. Create debit and credit functions to change the balance of an account.
+(def accounts (ref [0 0 0]))
+
+(defn balance
+  [accounts index]
+  (nth @accounts index))
+
+(defn debit
+  [accounts index amount]
+  (dosync (alter accounts assoc index (- (balance accounts index) amount))))
+
+(defn credit
+  [accounts index amount]
+  (dosync (alter accounts assoc index (+ (balance accounts index) amount))))


Added ring.util.response/created function

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


Add mtg card master namespace

Add mtg card master namespace

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

--- src/clj/decktouch/mtg_card_master.clj
+++ src/clj/decktouch/mtg_card_master.clj
@@ -0,0 +1,19 @@
+(ns decktouch.mtg-card-master
+  (:require [clojure.data.json :as json]))
+
+(def mtg-cards (json/read-str (slurp "resources/AllCards.json")))
+
+(def card-names (keys mtg-cards))
+
+(defn match
+  "Returns true if query is a substring in string"
+  [query string]
+  (some? (re-matches (re-pattern (str "(?i)" query ".*"))
+                    string)))
+
+(defn get-cards-matching-query
+  "Return a list of maps of strings of card names that match the query for the card input autocomplete"
+  [query]
+  (let [match-query (partial match query)]
+      (map (fn [thing] {:cardName thing})
+        (filter match-query card-names))))


move macros into canvas namespace

move macros into canvas namespace

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

--- src/clj/infinitelives/pixi/canvas.clj
+++ src/clj/infinitelives/pixi/canvas.clj
@@ -0,0 +1,113 @@
+(ns infinitelives.pixi.canvas)
+
+(defmacro ^:private assert-args
+  [& pairs]
+  `(do (when-not ~(first pairs)
+         (throw (IllegalArgumentException.
+                 (str (first ~'&form) " requires " ~(second pairs) " in " ~'*ns* ":" (:line (meta ~'&form))))))
+       ~(let [more (nnext pairs)]
+          (when more
+            (list* `assert-args more)))))
+
+(defmacro get-layer [canvas layer]
+  `(or
+    (-> ~canvas :layer ~layer)
+    (throw (js/Error (str "canvas layer " ~layer " not found.")))
+    ))
+
+(defmacro with-sprite* [canvas layer bindings & body]
+  (assert-args
+   (vector? bindings) "a vector for its binding"
+   (even? (count bindings)) "an even number of forms in binding vector")
+
+  (if (pos? (count bindings))
+    (let [symb (first bindings) val (second bindings)]
+      `(let [parent# (if (keyword? ~layer) (get-layer ~canvas ~layer) ~layer)
+             ~symb ~val]
+         (try (.addChild parent# ~symb)
+              (with-sprite ~canvas ~layer ~(subvec bindings 2) ~@body)
+              (finally (.removeChild parent# ~symb)))))
+    `(do ~@body)))
+
+(defmacro with-sprite [& body]
+  (cond
+    (vector? (first body))
+    `(with-sprite*
+      (infinitelives.pixi.canvas/get-default-canvas) (infinitelives.pixi.canvas/get-default-layer)
+      ~(first body)
+      ~@(next body))
+
+    (vector? (second body))
+    `(with-sprite*
+      (infinitelives.pixi.canvas/get-default-canvas) ~(first body)
+      ~(second body)
+      ~@(nnext body))
+
+    :default
+    `(with-sprite* ~@body)))
+
+(comment
+  (macroexpand-1 '(with-sprite [a (ms)] a b c)))
+
+(defmacro with-layered-sprite [bindings & body]
+  (assert-args
+   (vector? bindings) "a vector for its binding"
+   (= 0 (mod (count bindings) 3)) "triplets of forms in binding vector")
+
+  (if (pos? (count bindings))
+    (let [symb (first bindings)
+          layer (second bindings)
+          val (nth bindings 2)]
+      `(let [~symb ~val
+             canvas# (infinitelives.pixi.canvas/get-default-canvas)]
+         (try (.addChild
+               (get-layer canvas# ~layer)
+               ~symb)
+              (with-layered-sprite ~(subvec bindings 3) ~@body)
+              (finally (.removeChild
+                        (get-layer canvas# ~layer)
+                        ~symb)))))
+    `(do ~@body)))
+
+(defmacro with-sprite-set* [canvas layer bindings & body]
+  (assert-args
+   (vector? bindings) "a vector for its binding"
+   (even? (count bindings)) "an even number of forms in binding vector")
+
+  (if (pos? (count bindings))
+    (let [symb (first bindings) val (second bindings)]
+      `(let [~symb ~val]
+         (try
+           (doseq [sprite# ~symb]
+             (.addChild (get-layer ~canvas ~layer) sprite#))
+           (with-sprite-set ~canvas ~layer ~(subvec bindings 2) ~@body)
+           (finally (doseq [sprite# ~symb]
+                      (.removeChild (get-layer ~canvas ~layer) sprite#))))))
+    `(do ~@body)))
+
+(defmacro with-sprite-set [& body]
+  (cond
+    (vector? (first body))
+    `(with-sprite-set*
+       (infinitelives.pixi.canvas/get-default-canvas) (infinitelives.pixi.canvas/get-default-layer)
+       ~(first body)
+       ~@(next body))
+
+    (vector? (second body))
+    `(with-sprite-set*
+       (infinitelives.pixi.canvas/get-default-canvas) ~(first body)
+       ~(second body)
+       ~@(nnext body))
+
+    :default
+    `(with-sprite-set* ~@body)))
+
+
+(defmacro while-let
+    "Repeatedly executes body while test expression is true, evaluating the body with binding-form bound to the value of test."
+    [bindings & body]
+    (let [form (first bindings) test (second bindings)]
+        `(loop [~form ~test]
+             (when ~form
+                 ~@body
+                 (recur ~test)))))


Catch out-of-bounds from rand-nth.

Catch out-of-bounds from rand-nth.

--- src/shale/nodes.clj
+++ src/shale/nodes.clj
@@ -126,6 +126,8 @@
                                (apply clojure.set/subset?
                                       (map #(select-keys % [:url :tags])
                                            [requirements model])))]
-    (rand-nth
+    (try
+      (rand-nth
       (filter matches-requirements
-              (view-models nil)))))
+              (view-models nil)))
+      (catch IndexOutOfBoundsException e))))


fix lazyseq functional calls with dorun

fix lazyseq functional calls with dorun

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


completed triangle check.

completed triangle check.

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

--- clojure/triangle/triangle.clj
+++ clojure/triangle/triangle.clj
@@ -0,0 +1,19 @@
+(defn- valid?
+  "returns truthy/falsey value if a triangle can exist, given sorted sides."
+  [[x y z]]
+  (> (+ x y) z))
+
+(defn- uniq-sides-count
+  [[& sides]]
+  (count (distinct sides)))
+
+(defn- triangle-type
+  [[& sides]]
+  (get [:equilateral :isosceles :scalene]
+       (dec (uniq-sides-count sides))))
+
+(defn triangle
+  [& sides]
+  (if (valid? (sort sides))
+    (triangle-type sides)
+    :illogical))


fix spelling error

fix spelling error

--- sidecar/src/figwheel_sidecar/components/cljs_autobuild.clj
+++ sidecar/src/figwheel_sidecar/components/cljs_autobuild.clj
@@ -129,7 +129,7 @@
           ;; the user is in an interactive development environment
           ;; if not we need to stop and let them know
           (when-not (.exists (io/file output-to-filepath))
-            (throw (ex-info "---- Initial Figwheel ClojureScript Compilation Failed ---- \nWe need a sucessful initial build for Figwheel to connect correctly.\n"
+            (throw (ex-info "---- Initial Figwheel ClojureScript Compilation Failed ---- \nWe need a successful initial build for Figwheel to connect correctly.\n"
                         {:reason :initial-cljs-build-exception
                          :escape-system-exceptions true}
                         e))))))))


2.2.5 is required for Twitter (Kurtis remark) see https://github.com/BertrandDechoux/storm-starter/blob/java/pom.xml see http://groups.google.com/group/storm-user/browse_thread/thread/0faa0f7f42d7afe3

--- project.clj
+++ project.clj
@@ -11,8 +11,8 @@

   :dependencies [[org.clojure/clojure "1.2.0"]
                  [org.clojure/clojure-contrib "1.2.0"]
-                 [org.twitter4j/twitter4j-core "2.2.4-SNAPSHOT"]
-                 [org.twitter4j/twitter4j-stream "2.2.4-SNAPSHOT"]
+                 [org.twitter4j/twitter4j-core "2.2.5-SNAPSHOT"]
+                 [org.twitter4j/twitter4j-stream "2.2.5-SNAPSHOT"]
                  [com.googlecode.json-simple/json-simple "1.1"]
                  ]


remove unused clojure.core/data.json dep

--- project.clj
+++ project.clj
@@ -11,7 +11,6 @@
                  [org.clojure/math.numeric-tower "0.0.4"]             ; math functions like `ceil`
                  [org.clojure/core.memoize "0.5.7"]                   ; needed by core.match; has useful FIFO, LRU, etc. caching mechanisms
                  [org.clojure/data.csv "0.1.2"]                       ; CSV parsing / generation
-                 [org.clojure/data.json "0.2.6"]                      ; JSON parsing / generation
                  [org.clojure/java.classpath "0.2.2"]
                  [org.clojure/java.jdbc "0.3.7"]                      ; basic jdbc access from clojure
                  [org.clojure/tools.logging "0.3.1"]                  ; logging framework


build: update project file

build: update project file

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


lein-release plugin: bumped version from 0.2.4 to 0.2.5-SNAPSHOT for next development cycle

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


added clj-time dependency to project

added clj-time dependency to project

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


Update newrelic-agent to latest version

Update newrelic-agent to latest 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/democracyworks/election-authority-works.git/'


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


Add random runner

Add random runner

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/croeder/clojure-koans-work.git/'


Update kehaar dependency

Update kehaar dependency

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


bump  "0.9.0-wip16"

bump  "0.9.0-wip16"

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject storm/storm "0.9.0-wip15"
+(defproject storm/storm "0.9.0-wip16"
   :url "http://storm-project.clj"
   :description "Distributed and fault-tolerant realtime computation"
   :license {:name "Eclipse Public License - Version 1.0" :url "https://github.com/nathanmarz/storm/blob/master/LICENSE.html"}


[WM] clean up indentation in import ns

[WM] clean up indentation in import ns


[WM] don't try to put java.net.URI's in EDN


Commit missed paren

Commit missed paren


placeholder: variadic functions and closures in Clojure

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

--- clojure/clojure.clj
+++ clojure/clojure.clj
@@ -0,0 +1,40 @@
+(use '[clojure.string :only (join)])
+
+(defn messenger-builder [greeting func]
+  (fn [who] (func greeting who))) ; closes over greeting
+
+;; greeting provided here, then goes out of scope
+(def hello-er (messenger-builder "Hello" println))
+
+;; greeting value still available because hello-er is a closure
+(println (hello-er "world!"))
+;; Hello world!
+;; nil
+
+(def hello-er (messenger-builder "Hello" str))
+(println (hello-er "world!"))
+
+(def hello-er (messenger-builder "Hello" #(join " " %&)))
+(println (hello-er "world!"))
+
+(defn joiner [& args]
+  (join " " args))
+
+(def hello-er (messenger-builder "Hello" joiner))
+(println (hello-er "world!"))
+
+(def greet (fn [] (println "Hello")))
+(greet)
+
+(def greet #(println "Hello"))
+(greet)
+
+(defn greeting
+  ([] (greeting "World"))
+  ([x] (greeting "Hello" x))
+  ([x, y] (str x ", " y "!")))
+(assert (= "Hello, World!" (greeting)))
+(assert (= "Hello, Clojure!" (greeting "Clojure")))
+(assert (= "Good morning, Clojure!" (greeting "Good morning" "Clojure")))
+
+(println "Allez Gut!")


Test lookups

Test lookups

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


Start providing payment rss/atom extension

error: pathspec 'src/qcast/feed/ext/payment.clj' did not match any file(s) known to git

--- src/qcast/feed/ext/payment.clj
+++ src/qcast/feed/ext/payment.clj
@@ -0,0 +1,36 @@
+(ns ^{:doc "Payment extenstion: -
+            Specification: -"}
+  qcast.feed.ext.payment
+  (:require [clj-http.client :refer [generate-query-string]]
+            [hiccup.util     :refer [escape-html]]))
+
+
+;;; Internals
+
+(defn- create-url [url query-params]
+  (str url "?" (generate-query-string query-params)))
+
+
+;;; Interface
+
+;; Channel
+
+(defn flattr [user-id url language category title description tags]
+  (let [base-url "https://flattr.com/submit/auto"
+        query-params {:user_id user-id
+                      :url url
+                      :language language
+                      :category category
+                      :title title
+                      :description description
+                      :tags tags}]
+    [:atom:link {:rel "payment"
+                 :title "Flattr this!"
+                 :href (escape-html (create-url base-url query-params))
+                 :type "text/html"}]))
+
+
+;; Channel or Item
+
+
+;; Item


libururik ez dagoenean adierazi

libururik ez dagoenean adierazi

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


Create answer.clj

Create answer.clj

result:
https://paiza.jp/poh/joshibato/matsue-ruby/result/03a45d4b

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

--- POH6plus/answer.clj
+++ POH6plus/answer.clj
@@ -0,0 +1,19 @@
+(defn getnum [] (Long/parseLong (read-line)))
+(defn getwords [n w] (if (= n 0) (sort w) (getwords (dec n) (conj w (read-line)))))
+(defn seekword [w k]
+    (if (empty? w) (list false nil)
+        (let [h (first w) t (rest w)]
+            (if (= (compare k h) 0) (list true t)
+                (let [x (seekword t k)] (list (first x) (conj (second x) h)))
+            ))))
+(defn hoge [w s c]
+    (if (empty? w) (list s c)
+        (let [h (first w) t (rest w) k (clojure.string/reverse h) x (seekword t k) r (first x) a (second x)]
+            (if r (hoge a (conj s h) c)
+                (if (and (= (compare h k) 0) (or (clojure.string/blank? c) (< (compare h c) 0)))
+                    (hoge t s h)
+                    (hoge t s c)
+                    )))))
+(let [x (hoge (getwords (getnum) []) nil "") s (clojure.string/join (reverse (first x))) c (second x) r (list s c (clojure.string/reverse s))]
+    (println (clojure.string/join r))
+    )


basic engine

basic engine

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

--- src/main/cljc/clojure_club/x121_universal_computation_engine/brockturner.clj
+++ src/main/cljc/clojure_club/x121_universal_computation_engine/brockturner.clj
@@ -0,0 +1,18 @@
+(ns clojure-club.x121-universal-computation-engine.brockturner)
+
+(fn [l]
+  (letfn [(solve [m e]
+            (if (sequential? e)
+              (let [[op & r] e
+                    fop ({'+ + '/ / '- - '* *} op)]
+                (reduce fop (map (partial solve m) r)))
+              (m e e)))]
+    (fn [m]
+      (solve m l))))
+
+(defn solve [m e]
+  (if (sequential? e)
+    (let [[op & r] e
+          fop ({'+ + '/ / '- - '* *} op)]
+      (reduce fop (map (partial solve m) r)))
+    (m e e)))


Removed debug info

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


fix uncastification for qualified names

fix uncastification for qualified names

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -26,7 +26,7 @@
     (uncastify \"CAST(DATE AS DATE)\") -> \"DATE\""
   [column-name]
   (let [column-name (name column-name)]
-    (keyword (or (second (re-find #"CAST\(([^\s]+) AS [\w]+\)" column-name))
+    (keyword (or (second (re-find #"CAST\([^.\s]+\.([^.\s]+) AS [\w]+\)" column-name))
                  (second (re-find (:uncastify-timestamp-regex qp/*driver*) column-name))
                  column-name))))


remove devtools

remove devtools

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


Removed form

Removed form

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/stlk/home-automation.git/'


Remove unused metrics interceptor

Remove unused metrics interceptor

...that was an attempt to fix an issue I ran into during dev that didn't end up fixing it.


Cleaning up files - removing now-unnecessary includes.

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


remove debug line :sunglasses:

remove debug line :sunglasses:


Added validation url POST /validate-query

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


rxnorm expansion test

rxnorm expansion test

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


attempt 1

attempt 1

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

--- src/hackerrank/lambda_calculi_jun14/dice_path.clj
+++ src/hackerrank/lambda_calculi_jun14/dice_path.clj
@@ -0,0 +1,52 @@
+(ns hackerrank.lambda-calculi-jun14.dice-path)
+
+(def starting-dice
+  {:top 1
+   :front 2
+   :left 3
+   :right 4
+   :back 5
+   :bottom 6})
+
+
+(defn rotate-right
+  [dice]
+  (assoc dice
+         :top (:left dice)
+         :right (:top dice)
+         :bottom (:right dice)
+         :left (:bottom dice)))
+
+(defn rotate-down
+  [dice]
+  (assoc dice
+         :front (:top dice)
+         :bottom (:front dice)
+         :back (:bottom dice)
+         :top (:back dice)))
+
+(defn max-points
+  [bounds dice x y score]
+  (condp = bounds
+    [x y] (+ (:top dice) score)
+    (let [score (+ (:top dice) score)]
+      (max (condp = x
+             (first bounds)  -1
+             (max-points bounds (rotate-right dice) (inc x) y score))
+           (condp = y
+             (second bounds) -1
+             (max-points bounds (rotate-down dice) x (inc y) score))))))
+
+(defn parse
+  [line]
+  (reverse (read-string (str "[" line "]"))))
+
+(defn -main
+  []
+  (let [_ (read-line)
+        lines (line-seq (clojure.java.io/reader *in*))
+        f (comp #(max-points % starting-dice 1 1 0) parse)]
+    (println (clojure.string/join "\n" (map f lines)))))
+
+
+


added build.boot for optional Boot setup

error: pathspec 'Clojure/build.boot' did not match any file(s) known to git

--- Clojure/build.boot
+++ Clojure/build.boot
@@ -0,0 +1,19 @@
+(set-env!
+  :dependencies '[[org.clojure/clojure "1.6.0"]
+                  [org.clojure/clojurescript "0.0-3030"]
+                  [adzerk/boot-cljs "0.0-3308-0"]
+                  [com.github.rickyclarkson/jmdns "3.4.2-r353-1"]
+                  [org.omcljs/ambly "0.6.0"]])
+
+(require
+ '[adzerk.boot-cljs :refer [cljs]]
+ '[ambly.core :as ambly])
+
+(deftask ambly []
+  (task-options!
+    repl {:eval '(do
+                  (require '[cljs.repl :as repl]
+                           '[ambly.core :as ambly])
+                  (repl/repl (ambly/repl-env)))
+         })
+  (repl))


Add test for urls namespace

Add test for urls namespace

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/magoyette/marcandregoyette.com.git/'


error: pathspec 'src/push/instructions/extra/stack_combinators.clj' did not match any file(s) known to git

--- src/push/instructions/extra/stack_combinators.clj
+++ src/push/instructions/extra/stack_combinators.clj
@@ -0,0 +1,93 @@
+(ns push.instructions.extra.stack-combinators
+  (:require [push.instructions.core :as core])
+  (:require [push.types.core :as t])
+  (:require [push.instructions.dsl :as d])
+  )
+
+
+(defn flipstack-instruction
+  "returns a new x-flipstack instruction for a PushType"
+  [pushtype]
+  (let [typename (:name pushtype)
+        instruction-name (str (name typename) "-flipstack")]
+    (eval (list
+      'push.instructions.core/build-instruction
+      instruction-name
+      (str "`:" instruction-name "` reverses the entire `" typename
+        "` stack.")
+      :tags #{:combinator}
+      `(push.instructions.dsl/consume-stack ~typename :as :old)
+      `(push.instructions.dsl/calculate [:old]
+          #(into '() %1) :as :new)
+      `(push.instructions.dsl/replace-stack ~typename :new)))))
+
+
+(defn cutflip-instruction
+  "returns a new x-cutflip instruction for a PushType"
+  [pushtype]
+  (let [typename (:name pushtype)
+        instruction-name (str (name typename) "-cutflip")]
+    (eval (list
+      'push.instructions.core/build-instruction
+      instruction-name
+      (str "`:" instruction-name "` takes an `:integer` argument, makes that into an index modulo the `" typename "` stack size, takes the first [idx] items and reverses the order of that segment on the stack.")
+      :tags #{:combinator}
+      `(push.instructions.dsl/consume-top-of :integer :as :where)
+      `(push.instructions.dsl/consume-stack ~typename :as :old)
+      `(push.instructions.dsl/calculate [:old :where]
+        #(if (empty? %1) 0 (u/safe-mod %2 (count %1))) :as :idx)
+      `(push.instructions.dsl/calculate [:old :idx]
+        #(into '() (reverse (concat (reverse (take %2 %1)) (drop %2 %1)))) :as :new)
+      `(push.instructions.dsl/replace-stack ~typename :new)))))
+
+
+(defn cutstack-instruction
+  "returns a new x-cutstack instruction for a PushType"
+  [pushtype]
+  (let [typename (:name pushtype)
+        instruction-name (str (name typename) "-cutstack")]
+    (eval (list
+      'push.instructions.core/build-instruction
+      instruction-name
+      (str "`:" instruction-name "` takes an `:integer` argument, makes that into an index modulo the `" typename "` stack size, takes the first [idx] items and moves that to the bottom of the stack.")
+      :tags #{:combinator}
+      `(push.instructions.dsl/consume-top-of :integer :as :where)
+      `(push.instructions.dsl/consume-stack ~typename :as :old)
+      `(push.instructions.dsl/calculate [:old :where]
+        #(if (empty? %1) 0 (u/safe-mod %2 (count %1))) :as :idx)
+      `(push.instructions.dsl/calculate [:old :idx]
+        #(into '() (reverse (concat (drop %2 %1) (take %2 %1)))) :as :new)
+      `(push.instructions.dsl/replace-stack ~typename :new)))))
+
+
+(defn liftstack-instruction
+  "returns a new x-liftstack instruction for a PushType"
+  [pushtype]
+  (let [typename (:name pushtype)
+        instruction-name (str (name typename) "-liftstack")]
+    (eval (list
+      'push.instructions.core/build-instruction
+      instruction-name
+      (str "`:" instruction-name "` takes an `:integer` argument, makes that into an index modulo the `" typename "` stack size, 'cuts' the stack after the first [idx] items and copies everything below that point onto the top as a block.")
+      :tags #{:combinator}
+      `(push.instructions.dsl/consume-top-of :integer :as :where)
+      `(push.instructions.dsl/consume-stack ~typename :as :old)
+      `(push.instructions.dsl/calculate [:old :where]
+        #(if (empty? %1) 0 (u/safe-mod %2 (count %1))) :as :idx)
+      `(push.instructions.dsl/calculate [:old :idx]
+        #(into '() (reverse (concat (drop %2 %1) %1))) :as :new)
+      `(push.instructions.dsl/replace-stack ~typename :new)))))
+
+
+;;;;;;;;;;;;;;;;;
+
+
+(defn add-extra-stack-combinators
+  "takes a PushType and adds the instructions defined in this file to its :instructions collection"
+  [pushtype]
+  (-> pushtype
+      (t/attach-instruction (flipstack-instruction pushtype))
+      (t/attach-instruction (cutflip-instruction pushtype))
+      (t/attach-instruction (cutstack-instruction pushtype))
+      (t/attach-instruction (liftstack-instruction pushtype))
+      ))


Add transit code.

Add transit code.

error: pathspec 'src/kabel/middleware/transit.cljc' did not match any file(s) known to git

--- src/kabel/middleware/transit.cljc
+++ src/kabel/middleware/transit.cljc
@@ -0,0 +1,44 @@
+(ns kabel.middleware.transit
+  (:require
+   [kabel.middleware.handler :refer [handler]]
+   [superv.async :refer [<? go-try]]
+   [clojure.core.async :as async
+    :refer [<! >! timeout chan alt! put! close! buffer]]
+   [cognitect.transit :as transit]
+   [incognito.transit :refer [incognito-read-handler incognito-write-handler]])
+  (:import [java.io ByteArrayInputStream ByteArrayOutputStream]
+           [com.cognitect.transit.impl WriteHandlers$MapWriteHandler]))
+
+
+(defn transit
+  "Serializes all incoming and outgoing edn datastructures in transit form."
+  ([[S peer [in out]]]
+   (transit :json (atom {}) (atom {}) [S peer [in out]]))
+  ([backend read-handlers write-handlers [S peer [in out]]]
+   (handler #(go-try S
+                     (with-open [bais (ByteArrayInputStream. %)]
+                       (let [reader
+                             (transit/reader bais backend
+                                             {:handlers {"incognito" (incognito-read-handler read-handlers)}})]
+                         (transit/read reader))))
+            #(go-try S
+                     (with-open [baos (ByteArrayOutputStream.)]
+                       (let [writer (transit/writer baos backend
+                                                    {:handlers {java.util.Map (incognito-write-handler write-handlers)}})]
+                         (transit/write writer %))
+                       (.toByteArray baos)))
+            [S peer [in out]])))
+
+(comment
+  (require '[superv.async :refer [S <??]])
+
+  (let [in (chan)
+        out (chan)
+        [S _ [nin nout]] (transit [S nil [in out]])]
+    (put! nout "hello")
+    (prn (vec (<?? S out)))
+    ))
+
+
+
+


add debugging switch for outputting the return types; rename http-debug-switch

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


use form/datepicker component to block off weekends in date picker


fix initialize

fix initialize

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


Add tests for PSL functions.

Add tests for PSL functions.

error: pathspec 'test/inet/data/dns/psl_test.clj' did not match any file(s) known to git

--- test/inet/data/dns/psl_test.clj
+++ test/inet/data/dns/psl_test.clj
@@ -0,0 +1,73 @@
+(ns inet.data.dns.psl-test
+  (:require [inet.data.dns.psl :as psl]
+            [inet.data.dns :as dns]
+            [clojure.java.io :as io])
+  (:use [clojure.test]))
+
+(deftest test-psl
+  (testing "Tests from http://publicsuffix.org/list/test.txt"
+    (letfn [(check-psl [dom exp]
+              (zero? (dns/domain-compare exp (psl/lookup dom))))]
+      (testing "NULL input"
+        (is (check-psl nil nil)))
+      (testing "Mixed case"
+        (is (check-psl "COM" nil))
+        (is (check-psl "example.COM" "example.com"))
+        (is (check-psl "WwW.example.COM" "example.com")))
+      (testing "Unlisted TLD"
+        (is (check-psl "example" nil))
+        (is (check-psl "example.example" nil))
+        (is (check-psl "b.example.example" nil))
+        (is (check-psl "a.b.example.example" nil)))
+      (testing "TLD with only 1 rule"
+        (is (check-psl "biz" nil))
+        (is (check-psl "domain.biz" "domain.biz"))
+        (is (check-psl "b.domain.biz" "domain.biz"))
+        (is (check-psl "a.b.domain.biz" "domain.biz")))
+      (testing "TLD with some 2-level rules"
+        (is (check-psl "com" nil))
+        (is (check-psl "example.com" "example.com"))
+        (is (check-psl "b.example.com" "example.com"))
+        (is (check-psl "a.b.example.com" "example.com"))
+        (is (check-psl "uk.com" nil))
+        (is (check-psl "example.uk.com" "example.uk.com"))
+        (is (check-psl "b.example.uk.com" "example.uk.com"))
+        (is (check-psl "a.b.example.uk.com" "example.uk.com"))
+        (is (check-psl "test.ac" "test.ac")))
+      (testing "TLD with only 1 (wildcard) rule"
+        (is (check-psl "cy" nil))
+        (is (check-psl "c.cy" nil))
+        (is (check-psl "b.c.cy" "b.c.cy"))
+        (is (check-psl "a.b.c.cy" "b.c.cy")))
+      (testing "More complex TLD"
+        (is (check-psl "jp" nil))
+        (is (check-psl "test.jp" "test.jp"))
+        (is (check-psl "www.test.jp" "test.jp"))
+        (is (check-psl "ac.jp" nil))
+        (is (check-psl "test.ac.jp" "test.ac.jp"))
+        (is (check-psl "www.test.ac.jp" "test.ac.jp"))
+        (is (check-psl "kyoto.jp" nil))
+        (is (check-psl "c.kyoto.jp" nil))
+        (is (check-psl "b.c.kyoto.jp" "b.c.kyoto.jp"))
+        (is (check-psl "a.b.c.kyoto.jp" "b.c.kyoto.jp"))
+        (is (check-psl "pref.kyoto.jp" "pref.kyoto.jp"))
+        (is (check-psl "www.pref.kyoto.jp" "pref.kyoto.jp"))
+        (is (check-psl "city.kyoto.jp" "city.kyoto.jp"))
+        (is (check-psl "www.city.kyoto.jp" "city.kyoto.jp")))
+      (testing "TLD with a wildcard rule and exceptions"
+        (is (check-psl "om" nil))
+        (is (check-psl "test.om" nil))
+        (is (check-psl "b.test.om" "b.test.om"))
+        (is (check-psl "a.b.test.om" "b.test.om"))
+        (is (check-psl "songfest.om" "songfest.om"))
+        (is (check-psl "www.songfest.om" "songfest.om")))
+      (testing "US K12"
+        (is (check-psl "us" nil))
+        (is (check-psl "test.us" "test.us"))
+        (is (check-psl "www.test.us" "test.us"))
+        (is (check-psl "ak.us" nil))
+        (is (check-psl "test.ak.us" "test.ak.us"))
+        (is (check-psl "www.test.ak.us" "test.ak.us"))
+        (is (check-psl "k12.ak.us" nil))
+        (is (check-psl "test.k12.ak.us" "test.k12.ak.us"))
+        (is (check-psl "www.test.k12.ak.us" "test.k12.ak.us"))))))


Moved the init method to migrate

Moved the init method to migrate

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


use https instead of ssh, because no auth needed

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


make advanced compilation output dirs unique


Tweak project.clj

Tweak project.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/aaronlahey/coconut.git/'


[WM] add better error responses

[WM] add better error responses

There's more work to do on the user-works side to trigger some of these appropriately, but now at least user-http-api will be ready when we do that. And gateway timeouts are handled better by this alone.

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/user-http-api.git/'


remove unnecessary or

remove unnecessary or

--- src/clj/backtype/storm/testing4j.clj
+++ src/clj/backtype/storm/testing4j.clj
@@ -38,7 +38,7 @@
      (let [mocked-sources (or (-> completeTopologyParam .getMockedSources .getData) {})
            storm-conf (or (.getStormConf completeTopologyParam) {})
            cleanup-state (or (.getCleanupState completeTopologyParam) true)
-           topology-name (or (.getTopologyName completeTopologyParam))]
+           topology-name (.getTopologyName completeTopologyParam)]
        (complete-topology (.getState cluster) topology
                           :mock-sources mocked-sources
                           :storm-conf storm-conf


test style

test style

--- test/clj_http/client_test.clj
+++ test/clj_http/client_test.clj
@@ -8,12 +8,6 @@
   {:scheme "http"
    :server-name "localhost"
    :server-port 8080})
-
-(deftest parse-server-port
-  (is (= 80   (-> "http://example.com/" client/parse-url :server-port)))
-  (is (= 8080 (-> "http://example.com:8080/" client/parse-url :server-port)))
-  (is (= 443  (-> "https://example.com/" client/parse-url :server-port)))
-  (is (= 8443 (-> "https://example.com:8443/" client/parse-url :server-port))))

 (deftest rountrip
   (let [resp (client/request (merge base-req {:uri "/get" :method :get}))]
@@ -211,3 +205,9 @@
   (let [u-client (client/wrap-url identity)
         resp (u-client {:uri "/foo"})]
     (is (= "/foo" (:uri resp)))))
+
+(deftest provide-default-port
+  (is (= 80   (-> "http://example.com/" client/parse-url :server-port)))
+  (is (= 8080 (-> "http://example.com:8080/" client/parse-url :server-port)))
+  (is (= 443  (-> "https://example.com/" client/parse-url :server-port)))
+  (is (= 8443 (-> "https://example.com:8443/" client/parse-url :server-port))))


add aspire.model namespace

add aspire.model namespace

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

--- src/clj/aspire/model.clj
+++ src/clj/aspire/model.clj
@@ -0,0 +1,52 @@
+(ns ^{:doc "A library for keeping and updating browser state"}
+  aspire.model)
+
+(def browser-model (atom {}))
+
+(defn update-in!
+  "Pass a fn to update a path within 'model.
+   Use this whenever you need to update the value of a path within 'model.
+   Example: (update-in! [:ui :user2comp 1234 :current_score] (fn [old-val] (inc old-val)))
+   Example: (update-in! [:ui :user2comp 1234] update-iscomplete requirements-spec)"
+  [path fn & args]
+  (apply swap! browser-model update-in path fn args))
+
+(defn get-in!
+  "Retrieve the value of a path within 'model.
+   DO NOT retrieve the value, do some processing, and then assoc-in! a new value.
+   Instead, see update-in! to avoid overwriting changes made between your calls to get-in! a subsequent assoc-in!.
+   Example: (get-in! [:ui :comps 73 :name])"
+  [path]
+  (get-in @browser-model path))
+
+(defn assoc-in!
+  "Set the value for a path within 'model.
+   DO NOT use assoc-in! to overwrite an existing value within 'model, unless overwriting is explicitly what you intend.
+   Instead, see update-in!.
+   Example: (assoc-in! [:ui :comps 73] {:id 73 :name \"Some Competency\" :version \"v3\"})"
+  [path val]
+  (swap! browser-model assoc-in path val))
+
+(defn- dissoc-in
+  "ClojureScript doesn't have dissoc-in, so this is borrowed from
+  Clojure's core.incubator.
+
+   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)))
+
+(defn dissoc-in!
+  "Remove the value of a path within 'model.
+   Example: (dissoc-in! [:ui :comps 73])"
+  [path]
+  (swap! browser-model dissoc-in path))
+


Notes collapse because they aren't unique.

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


added some preliminary dom code

added some preliminary dom code

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

--- src/crawler/dom.clj
+++ src/crawler/dom.clj
@@ -0,0 +1,31 @@
+;;;; Soli Deo Gloria
+;;;; Author: spalakod@cs.cmu.edu
+;;;;
+;;;; Code to work with the DOM (XPath etc)
+
+(ns crawler.dom
+  (:require [crawler.core :as core])
+  (:import (net.sourceforge.htmlcleaner/htmlcleaner HtmlCleaner)))
+
+(defn process-page
+  [page-src]
+  (let [cleaner (new HtmlCleaner)]
+    (.clean cleaner page-src)))
+
+(defn anchor-tags
+  "List of <a> tags on page"
+  [page-src]
+  (-> (process-page page-src)
+     (.getElementsByName "a" true)))
+
+(defn path-root-seq
+  "A sequence of nodes from current node to root"
+  ([a-tagnode]
+     (path-seq a-tagnode []))
+
+  ([a-tagnode cur-path]
+     (let [parent (.getParent a-tagnode)]
+       (if parent
+         (recur parent (cons cur-path a-tagnode))
+         cur-path))))
+


Using all other K Lambda namespaces

Using all other K Lambda namespaces

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