comment

comment

--- test/babel/test/it.cljc
+++ test/babel/test/it.cljc
@@ -364,10 +364,11 @@
                  :synsem {:cat :prep
                           :sem {:pred :a
                                 :obj {:pred :house
-                                      ;; :mod '() ;; this is commented out:
-                                      ;; if *not* commented out, test will run faster since there will
-                                      ;; be less futile bolts checked (less bolts where no complement can
-                                      ;; be found.
+                                      :mod '() ;; if :mod '() is specified:
+                                      ;; test will run faster since there will
+                                      ;; be less futile bolts checked
+                                      ;; (less bolts where no complement can
+                                      ;; be found).
                                       :spec {:def :none}}}}})] ;; "a casa", not "a tua casa", "a della casa", etc
     (is (= (fo result) "a casa"))))


fix demand ugen examples

fix demand ugen examples

--- test/example/demand.clj
+++ test/example/demand.clj
@@ -1,5 +1,5 @@
 (ns example.demand
-  (:use overtone.core))
+  (:use overtone.live))

 ; Unlike the audio and control rate ugens, which produce a constant
 ; stream of values, the demand rate ugens only produce a value
@@ -51,31 +51,30 @@
         (pan2 (* 0.1 src))))

 (def buf (buffer 8))
-(overtone.sc.buffer/buffer-write buf 0 8
-                                 (map #(+ 12 %) [50 50 54 50 57 50 45 49]))
+(buffer-write! buf 0 8 (map #(+ 12 %) [50 50 54 50 57 50 45 49]))

 (demo 20
       (let [trig (impulse:kr 8)
-            indexes (dseq (range 8) inf)
+            indexes (dseq (range 8) INF)
             freqs (dbufrd buf indexes)
             note-gen (demand:kr trig 0 freqs)
             src (sin-osc (midicps note-gen))]
         (* [0.1 0.1] src)))

 ; Now while it's playing you can set buffer elements to change the notes:
-(overtone.sc.buffer/buffer-set buf 3 45)
-(overtone.sc.buffer/buffer-set buf 3 80)
-(overtone.sc.buffer/buffer-set buf 7 50)
+(buffer-set! buf 3 85)
+(buffer-set! buf 3 80)
+(buffer-set! buf 7 20)

-; TODO: Fixme
 (demo 4
-      (let [freq (duty (drand [0.2 0.4 0.8 0.6] inf)
+      (let [freq (duty (drand [0.2 0.4 0.8 0.6] INF)
+                       0
                        0
                        (dseq [440 880 1200 600] 2))
             src (saw freq)]
         (* [0.2 0.2] src)))

-; TODO: Fixme
+
 ; Generate a series of values, incrementing linearly.
 (demo 8
       (let [trig (impulse:kr 2)
@@ -84,20 +83,19 @@
             src (sin-osc note-gen)]
         (pan2 (* 0.2 src))))

-; TODO: Fixme
+
 ; Generate a geometric sequence
 (demo 2
       (let [trig (impulse:kr 8)
-            freqs (dgeom 1 1.2 10)
+            freqs (dgeom  10 1  1.2)
             note-gen (+ 340 (* 30 (demand:kr trig 0 freqs)))
             src (sin-osc note-gen)]
         (pan2 (* 0.1 src))))

-; TODO: Fixme
 ; Demanding noise...
 (demo 2
       (let [trig (impulse:kr 2)
-            freqs (dwhite 0 20 INF)
+            freqs (dwhite INF 0 20)
             note-gen (+ 340 (* 30 (demand:kr trig 0 freqs)))
             src (sin-osc note-gen)]
         (pan2 (* 0.1 src))))


Avoid a join in get-data-for-series-name.

--- metlog-vault/src-server/metlog_vault/data.clj
+++ metlog-vault/src-server/metlog_vault/data.clj
@@ -78,13 +78,12 @@
 (defquery get-data-for-series-name [ series-name begin-t end-t]
   (map #(assoc % :t (.getTime (:t %)))
    (query-all *db* [(str "SELECT sample.t, sample.val"
-                         " FROM sample, series"
-                         " WHERE sample.series_id = series.series_id"
-                         "   AND series.series_name = ?"
+                         " FROM sample"
+                         " WHERE series_id = ?"
                          "   AND UNIX_MILLIS(t-session_timezone()) > ?"
                          "   AND UNIX_MILLIS(t-session_timezone()) < ?"
                          " ORDER BY t")
-                    series-name
+                    (get-series-id series-name)
                     begin-t
                     end-t])))


change default handler_test, midje test will be added later

--- test/blog_clj/handler_test.clj
+++ test/blog_clj/handler_test.clj
@@ -6,8 +6,7 @@
 (deftest test-app
   (testing "main route"
     (let [response (app (mock/request :get "/"))]
-      (is (= (:status response) 200))
-      (is (= (:body response) "Hello World"))))
+      (is (= (:status response) 200))))

   (testing "not-found route"
     (let [response (app (mock/request :get "/invalid"))]


Add tests.

Add tests.

--- test/buddy/core/keys_tests.clj
+++ test/buddy/core/keys_tests.clj
@@ -22,6 +22,11 @@
 (deftest read-asynmetric-encryption-keys
   (testing "Read rsa priv key"
     (let [pkey (keys/private-key "test/_files/privkey.3des.rsa.pem" "secret")]
+      (is (= (type pkey) org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey))))
+
+  (testing "Read rsa priv key without password"
+    (is (thrown? clojure.lang.ExceptionInfo (keys/private-key "test/_files/privkey.3des.rsa.pem")))
+    (let [pkey (keys/private-key "test/_files/privkey.rsa.pem")]
       (is (= (type pkey) org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey))))

   (testing "Read dsa priv key"
@@ -58,7 +63,8 @@
     (let [keystr (slurp "test/_files/pubkey.ecdsa.pem")
           pkey (keys/str->public-key keystr)]
       (is (= (type pkey) org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey))
-      (is (keys/public-key? pkey)))))
+      (is (keys/public-key? pkey))))
+  )

 (deftest key-wrapping-algorithms
   (let [secret16 (nonce/random-bytes 16)


change open-ended temp date

change open-ended temp date

--- test/clj_money/import_test.clj
+++ test/clj_money/import_test.clj
@@ -158,10 +158,10 @@
         actual-inc-stmt (reports/income-statement storage-spec
                                                   (:id entity)
                                                   (t/local-date 1999 1 1)
-                                                  (t/local-date 9999 12 31))
+                                                  (t/today)) ; TODO: allow open-ended
         actual-bal-sheet (reports/balance-sheet storage-spec
                                                 (:id entity)
-                                                (t/local-date 9999 12 31))]
+                                                (t/today))] ; TODO: allow open-ended
     (is entity "It returns a value")
     (is (= "Personal" (:name entity)) "It returns the new entity")
     (is (= expected-accounts actual-accounts)


removed debug test

removed debug test

--- pigpen-cascading/src/test/clojure/pigpen/cascading/functional_debug_test.clj
+++ pigpen-cascading/src/test/clojure/pigpen/cascading/functional_debug_test.clj
@@ -1,188 +0,0 @@
-;;
-;;
-;;  Copyright 2013 Netflix, Inc.
-;;
-;;     Licensed under the Apache License, Version 2.0 (the "License");
-;;     you may not use this file except in compliance with the License.
-;;     You may obtain a copy of the License at
-;;
-;;         http://www.apache.org/licenses/LICENSE-2.0
-;;
-;;     Unless required by applicable law or agreed to in writing, software
-;;     distributed under the License is distributed on an "AS IS" BASIS,
-;;     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-;;     See the License for the specific language governing permissions and
-;;     limitations under the License.
-;;
-;;
-
-(ns pigpen.cascading.functional-debug-test
-  (:import (org.apache.hadoop.fs FileSystem Path)
-           (org.apache.hadoop.conf Configuration))
-  (:require [clojure.test :refer [run-tests]]
-            [pigpen.functional-test :as t :refer [TestHarness]]
-            [pigpen.functional-suite :refer [def-functional-tests]]
-            [pigpen.core :as pig]
-            [pigpen.extensions.io :as io]
-            [pigpen.cascading.core :as cascading]))
-
-(def prefix "/tmp/pigpen/cascading/")
-
-(.delete (FileSystem/get (Configuration.)) (Path. prefix) true)
-(.mkdirs (java.io.File. prefix))
-
-(defn run-flow [command]
-  (-> command
-    (cascading/generate-flow)
-    (.complete)))
-
-(defn run-flow->output [harness command]
-  (let [output-file (t/file harness)]
-    (->> command
-      (pig/store-clj output-file)
-      (run-flow))
-    (->> output-file
-      (t/read harness)
-      (map read-string))))
-
-(def-functional-tests "cascading"
-  (reify TestHarness
-    (data [this data]
-      (let [input-file (t/file this)]
-        (spit input-file
-              (->> data
-                (map prn-str)
-                (clojure.string/join)))
-        (pig/load-clj input-file)))
-    (dump [this command]
-      (if (-> command :type #{:store :script})
-        (run-flow command)
-        (run-flow->output this command)))
-    (file [this]
-      (str prefix (gensym)))
-    (read [this file]
-      (apply concat
-        (for [f (io/list-files file)
-              :when (not (.endsWith f ".crc"))
-              :when (not (.endsWith f "_SUCCESS"))]
-          (when-let [contents (not-empty (slurp f))]
-            (clojure.string/split-lines contents)))))
-    (write [this lines]
-      (let [file (t/file this)]
-        (spit file (clojure.string/join "\n" lines))
-        file)))
-  #{
-    ;; Working
-    pigpen.functional.code-test/test-closure
-    pigpen.functional.filter-test/test-filter
-    pigpen.functional.filter-test/test-remove
-    pigpen.functional.join-test/test-join-inner-join-nils
-    pigpen.functional.join-test/test-join-left-outer-join-nils
-    pigpen.functional.join-test/test-join-right-outer-join-nils
-    pigpen.functional.join-test/test-join-full-outer-join-nils
-    pigpen.functional.join-test/test-group-by
-    pigpen.functional.join-test/test-join-default-key-selector
-    pigpen.functional.join-test/test-filter-by
-    pigpen.functional.join-test/test-filter-by-nil-keys
-    pigpen.functional.join-test/test-filter-by-duplicate-keys
-    pigpen.functional.map-test/test-map
-    pigpen.functional.map-test/test-mapcat
-    pigpen.functional.set-test/test-distinct
-    pigpen.functional.filter-test/test-take
-    pigpen.functional.filter-test/test-sample
-    pigpen.functional.join-test/test-join-inner
-    pigpen.functional.join-test/test-join-left-outer
-    pigpen.functional.join-test/test-join-inner-implicit
-    pigpen.functional.join-test/test-join-right-outer
-    pigpen.functional.join-test/test-join-full-outer
-    pigpen.functional.join-test/test-join-self-join
-    pigpen.functional.join-test/test-remove-by
-    pigpen.functional.join-test/test-remove-by-nil-keys
-    pigpen.functional.join-test/test-remove-by-duplicate-keys
-    pigpen.functional.join-test/test-into
-    pigpen.functional.join-test/test-into-empty
-    pigpen.functional.join-test/test-reduce-conj
-    pigpen.functional.join-test/test-reduce-+
-    pigpen.functional.join-test/test-reduce-empty
-    pigpen.functional.join-test/test-cogroup-inner
-    pigpen.functional.join-test/test-cogroup-left-outer
-    pigpen.functional.join-test/test-cogroup-right-outer
-    pigpen.functional.join-test/test-cogroup-full-outer
-    pigpen.functional.join-test/test-cogroup-inner-join-nils
-    pigpen.functional.join-test/test-cogroup-left-outer-join-nils
-    pigpen.functional.join-test/test-cogroup-right-outer-join-nils
-    ;pigpen.functional.join-test/test-cogroup-full-outer-join-nils
-    pigpen.functional.join-test/test-cogroup-self-join
-    pigpen.functional.join-test/test-fold-count
-    pigpen.functional.join-test/test-cogroup-self-join+fold
-    pigpen.functional.join-test/test-fold-inline-sum
-    pigpen.functional.join-test/test-fold-inline-count
-    pigpen.functional.join-test/test-fold-cogroup-dual
-    pigpen.functional.join-test/test-fold-all-sum
-    pigpen.functional.join-test/test-fold-all-count
-    pigpen.functional.join-test/test-fold-all-empty
-    pigpen.functional.fold-test/test-vec
-    pigpen.functional.fold-test/test-map
-    pigpen.functional.fold-test/test-mapcat
-    pigpen.functional.fold-test/test-filter
-    pigpen.functional.fold-test/test-remove
-    pigpen.functional.fold-test/test-keep
-    pigpen.functional.fold-test/test-take
-    pigpen.functional.fold-test/test-distinct
-    pigpen.functional.fold-test/test-first
-    pigpen.functional.fold-test/test-last
-    pigpen.functional.fold-test/test-sort
-    pigpen.functional.fold-test/test-sort-desc
-    pigpen.functional.fold-test/test-sort-by
-    pigpen.functional.fold-test/test-sort-by-desc
-    pigpen.functional.fold-test/test-juxt-stats
-    pigpen.functional.fold-test/test-juxt-min-max
-    pigpen.functional.fold-test/test-count
-    pigpen.functional.fold-test/test-sum
-    pigpen.functional.fold-test/test-avg
-    pigpen.functional.fold-test/test-avg-with-cogroup
-    pigpen.functional.fold-test/test-top
-    pigpen.functional.fold-test/test-top-desc
-    pigpen.functional.fold-test/test-top-by
-    pigpen.functional.fold-test/test-top-by-desc
-    pigpen.functional.fold-test/test-min
-    pigpen.functional.fold-test/test-min+map
-    pigpen.functional.fold-test/test-min-key
-    pigpen.functional.fold-test/test-max
-    pigpen.functional.fold-test/test-max-key
-    pigpen.functional.io-test/test-store-string
-    pigpen.functional.io-test/test-store-tsv
-    pigpen.functional.io-test/test-store-clj
-    pigpen.functional.io-test/test-store-json
-    pigpen.functional.code-test/test-for
-    pigpen.functional.map-test/test-map+fold1
-    pigpen.functional.map-test/test-map+fold2
-    pigpen.functional.set-test/test-union
-    pigpen.functional.set-test/test-union-multiset
-    pigpen.functional.set-test/test-concat
-    pigpen.functional.set-test/test-intersection
-    pigpen.functional.io-test/test-load-string
-    pigpen.functional.io-test/test-load-tsv
-    pigpen.functional.io-test/test-load-tsv-non-tab
-    pigpen.functional.io-test/test-load-tsv-non-tab-with-tabs
-    pigpen.functional.io-test/test-load-clj
-    pigpen.functional.io-test/test-load-json
-    pigpen.functional.io-test/test-load-json-no-options
-    pigpen.functional.io-test/test-load-json-two-options
-    pigpen.functional.io-test/test-load-lazy
-    pigpen.functional.set-test/test-intersection-multiset
-    pigpen.functional.set-test/test-difference
-    pigpen.functional.set-test/test-difference-multiset
-    ;; In progress
-
-    ;; Not working
-    pigpen.functional.map-test/test-map-indexed
-    pigpen.functional.map-test/test-map-indexed+sort
-    pigpen.functional.map-test/test-sort
-    pigpen.functional.map-test/test-sort-desc
-    pigpen.functional.map-test/test-sort-by
-    pigpen.functional.map-test/test-sort-by-desc
-    pigpen.functional.map-test/test-sort-by-with-duplicates
-    })
-
-(run-tests 'pigpen.cascading.functional-debug-test)


correct acceptance tests

correct acceptance tests

--- acceptance/puppetlabs-aws-expect/test/clojure/puppetlabs_aws_expect/test.clj
+++ acceptance/puppetlabs-aws-expect/test/clojure/puppetlabs_aws_expect/test.clj
@@ -33,18 +33,16 @@

 (def loadbalancer-names (map :load-balancer-name loadbalancers))

-(expect 4 (count groups))
-
 (expect (in? group-names "web-sg"))
 (expect (in? group-names "lb-sg"))
 (expect (in? group-names "db-sg"))
+(expect (in? group-names "puppet-sg"))

 (expect 1 (count loadbalancers))

 (expect (in? loadbalancer-names "lb-1"))

-(expect 3 (count instances))
-
 (expect (in? instance-names "web-1"))
 (expect (in? instance-names "web-2"))
-(expect (in? instance-names "db"))
+(expect (in? instance-names "db-1"))
+(expect (in? instance-names "puppet-1"))


Add get-hander arity which returns an entire kind

--- src/re_frame/registrar.cljc
+++ src/re_frame/registrar.cljc
@@ -16,6 +16,9 @@

 (defn get-handler
+
+  ([kind]
+   (get @kind->id->handler kind))

   ([kind id]
    (-> (get @kind->id->handler kind)


CMR-4307: Changed the logging of mili seconds to seconds.

--- search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj
+++ search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj
@@ -75,13 +75,13 @@
   (map #(rfm->umm-collection context %) rfms))

 (defn- wait-and-retry-for-collection-cache
-  "Wait configurable number of milli seconds before retrying configurable number of times
+  "Wait configurable number of seconds before retrying configurable number of times
    to get all the collections from collection cache."
   [count context]
   (when (< count (retry-count))
-    (info (format (str "Humanizer report generator job is sleeping for %d milli-seconds"
+    (info (format (str "Humanizer report generator job is sleeping for %d seconds"
                        "before retrying to see if the collection cache is populated.")
-                  (humanizer-report-generator-job-wait)))
+                  (/ (humanizer-report-generator-job-wait) 1000)))
     (Thread/sleep (humanizer-report-generator-job-wait))
     (let [rfms (metadata-cache/all-cached-revision-format-maps context)]
       (if (seq rfms)


ensure that when we test non-superuser access for org listing that the data is in place to make a valid test case.

--- test/metabase/api/org_test.clj
+++ test/metabase/api/org_test.clj
@@ -28,14 +28,21 @@

 ;; ## GET /api/org
 ;; Non-superusers should only be able to see Orgs they are members of
-(expect
+(let [org-name (random-name)]
+  (expect-eval-actual-first
     [{:id @org-id
       :slug "test"
       :name "Test Organization"
       :description nil
       :logo_url nil
       :inherits true}]
-  ((user->client :rasta) :get 200 "org"))
+    (do
+      ;; Delete all the random test Orgs we've created
+      (cascade-delete Org :id [not= (:id @test-org)])
+      ;; Create a random Org so we ensure there is an Org that should NOT show up in our list
+      (create-org org-name)
+      ;; Now perform the API request
+      ((user->client :rasta) :get 200 "org"))))

 ;; Superusers should be able to see all Orgs
 (let [org-name (random-name)]


more about bicycles

more about bicycles

--- src/babel/encyclopedia.cljc
+++ src/babel/encyclopedia.cljc
@@ -130,7 +130,9 @@
                       :place false}

    {:pred :bicycle}  {:artifact true
-                      :consumable false}
+                      :consumable false
+                      :legible false
+                      :place false}

    {:pred :bread}    {:artifact true
                       :edible true}


~(defn generate-for-verbcoach): move all external verbcoach stuff inside here

--- src/babel/italiano/lab.cljc
+++ src/babel/italiano/lab.cljc
@@ -237,121 +237,122 @@
   (let [generated (generate spec model)]
     (u/get-in generated path ::none)))

-(def basic-grammar
-  #{"sentence-nonphrasal-head"})
-
-(def present-grammar
-  #{"sentence-phrasal-head"
-    "vp-pronoun-phrasal"
-    "vp-pronoun-nonphrasal"})
-
-(def chiamarsi-grammar
-  #{"s-aux"
-    "sentence-phrasal-head"
-    "vp-aux-phrasal-complement"
-    "vp-pronoun-phrasal"
-    "vp-32"})
-
-(def future-grammar
-  #{"sentence-phrasal-head"
-    "vp-pronoun-phrasal"
-    "vp-pronoun-nonphrasal"})
-
-(def present-perfect-grammar
-  #{"s-aux"
-    "vp-32"
-    "vp-aux-22-nonphrasal-comp"
-    "vp-aux-22-phrasal-comp"
-    "vp-aux-nonphrasal-complement"
-    "vp-aux-phrasal-complement"
-    "vp-pronoun-phrasal"
-    "vp-pronoun-nonphrasal"})
-
-(defn create-index-fn [verb-set grammar]
-  (let [verbcoach-pronouns
-        (fn [v]
-          (or
-           (and (= :noun (u/get-in v [:synsem :cat]))
-                (not (= :acc (u/get-in v [:synsem :case]))))
-           (and (= :noun (u/get-in v [:synsem :cat]))
-                (= true (u/get-in v [:synsem :propernoun])))
-           (and (= :noun (u/get-in v [:synsem :cat]))
-                (= :acc (u/get-in v [:synsem :case]))
-                (= true (u/get-in v [:synsem :reflexive])))))
-
-        verbcoach-index-paths
-        [[:italiano :italiano]
-         [:synsem :aux]
-         [:synsem :cat]
-         [:synsem :essere]
-         [:synsem :infl]
-         [:synsem :sem :pred]]
-
-        lexicon
-        (into {}
-              (for [[k vals] (:lexicon model)]
-                (let [filtered-vals
-                      (filter
-                       (fn [v]
-                         (or
-                          (and (= :verb (u/get-in v [:synsem :cat]))
-                               (or (= true (u/get-in v [:synsem :aux]))
-                                   (contains? verb-set
-                                              (u/get-in v [:italiano :italiano]))))
-                          (verbcoach-pronouns v)))
-                       vals)]
-                  (if (not (empty? filtered-vals))
-                    [k filtered-vals]))))
-        indices (create-indices lexicon verbcoach-index-paths)]
-    (fn [spec]
-      (lookup-spec spec indices verbcoach-index-paths))))
-
-;; this is a lot like a lexical compilation default map.
-(def rule-matcher
-  {:top
-   basic-grammar
-
-   {:root {:italiano {:italiano "chiamarsi"}}}
-   chiamarsi-grammar
-
-   {:synsem {:sem {:tense :present
-                   :aspect :perfect}}}
-   present-perfect-grammar
-
-   {:synsem {:sem {:tense :future}}}
-   future-grammar
-
-   {:synsem {:sem {:tense :conditional}}}
-   future-grammar
-
-   {:synsem {:sem {:tense :past
-                   :aspect :progressive}}}
-   future-grammar
-
-   {:synsem {:sem {:tense :present
-                   :aspect :simple}}}
-   present-grammar})
-
-
-(defn rule-matcher-reducer [input-spec]
-  (reduce
-   clojure.set/union
-   (map (fn [key-in-rule-matcher]
-          (let [result (unify key-in-rule-matcher input-spec)]
-            (if (= :fail result)
-              nil
-              (get rule-matcher key-in-rule-matcher))))
-        (keys rule-matcher))))
-
 ;; (take 10 (generate-for-verbcoach))
 (defn generate-for-verbcoach
   "generate sentences efficiently given specific constraints."
   []
-  (let [verb-set #{"arrabbiarsi" "chiamarsi" "fermarsi" "parlare" "sedersi"}
-        specs
-        (map (fn [root]
-               {:root {:italiano {:italiano root}}})
-             verb-set)
+
+  (let [basic-grammar
+        #{"sentence-nonphrasal-head"}
+
+        present-grammar
+        #{"sentence-phrasal-head"
+          "vp-pronoun-phrasal"
+          "vp-pronoun-nonphrasal"}
+
+        chiamarsi-grammar
+        #{"s-aux"
+          "sentence-phrasal-head"
+          "vp-aux-phrasal-complement"
+          "vp-pronoun-phrasal"
+          "vp-32"}
+
+        future-grammar
+        #{"sentence-phrasal-head"
+          "vp-pronoun-phrasal"
+          "vp-pronoun-nonphrasal"}
+
+        present-perfect-grammar
+        #{"s-aux"
+          "vp-32"
+          "vp-aux-22-nonphrasal-comp"
+          "vp-aux-22-phrasal-comp"
+          "vp-aux-nonphrasal-complement"
+          "vp-aux-phrasal-complement"
+          "vp-pronoun-phrasal"
+          "vp-pronoun-nonphrasal"}
+
+        create-index-fn
+        (fn [verb-set grammar]
+          (let [verbcoach-pronouns
+                (fn [v]
+                  (or
+                   (and (= :noun (u/get-in v [:synsem :cat]))
+                        (not (= :acc (u/get-in v [:synsem :case]))))
+                   (and (= :noun (u/get-in v [:synsem :cat]))
+                        (= true (u/get-in v [:synsem :propernoun])))
+                   (and (= :noun (u/get-in v [:synsem :cat]))
+                        (= :acc (u/get-in v [:synsem :case]))
+                        (= true (u/get-in v [:synsem :reflexive])))))
+
+                verbcoach-index-paths
+                [[:italiano :italiano]
+                 [:synsem :aux]
+                 [:synsem :cat]
+                 [:synsem :essere]
+                 [:synsem :infl]
+                 [:synsem :sem :pred]]
+
+                lexicon
+                (into {}
+                      (for [[k vals] (:lexicon model)]
+                        (let [filtered-vals
+                              (filter
+                               (fn [v]
+                                 (or
+                                  (and (= :verb (u/get-in v [:synsem :cat]))
+                                       (or (= true (u/get-in v [:synsem :aux]))
+                                           (contains? verb-set
+                                                      (u/get-in v [:italiano :italiano]))))
+                                  (verbcoach-pronouns v)))
+                               vals)]
+                          (if (not (empty? filtered-vals))
+                            [k filtered-vals]))))
+                indices (create-indices lexicon verbcoach-index-paths)]
+            (fn [spec]
+              (lookup-spec spec indices verbcoach-index-paths))))
+
+        ;; this is a lot like a lexical compilation default map.
+        rule-matcher
+        {:top
+         basic-grammar
+
+         {:root {:italiano {:italiano "chiamarsi"}}}
+         chiamarsi-grammar
+
+         {:synsem {:sem {:tense :present
+                         :aspect :perfect}}}
+         present-perfect-grammar
+
+         {:synsem {:sem {:tense :future}}}
+         future-grammar
+
+         {:synsem {:sem {:tense :conditional}}}
+         future-grammar
+
+         {:synsem {:sem {:tense :past
+                         :aspect :progressive}}}
+         future-grammar
+
+         {:synsem {:sem {:tense :present
+                         :aspect :simple}}}
+         present-grammar}
+
+        rule-matcher-reducer
+        (fn [input-spec]
+          (reduce
+           clojure.set/union
+           (map (fn [key-in-rule-matcher]
+                  (let [result (unify key-in-rule-matcher input-spec)]
+                    (if (= :fail result)
+                      nil
+                      (get rule-matcher key-in-rule-matcher))))
+                (keys rule-matcher))))
+
+        verb-set #{"arrabbiarsi" "chiamarsi" "fermarsi" "parlare" "sedersi"}
+        specs (map (fn [root]
+                     {:root {:italiano {:italiano root}}})
+                   verb-set)
         tense-specs [
                      {:synsem {:cat :verb
                                :sem {:tense :present
@@ -393,3 +394,4 @@
                               (fn [lexeme] (= false (u/get-in lexeme [:italiano :exception] false)))
                               babel.generate/grammar grammar]
                       (time (generate chosen-spec model)))))))))))
+


Fixes crud selection.

Fixes crud selection.

--- src/bo/cubanostack/crud.clj
+++ src/bo/cubanostack/crud.clj
@@ -129,7 +129,7 @@
      :put!                  (fn [ctx]
                               {:entry (d/update! Dal
                                                  (ctx->entity-id ctx)
-                                                 (:data ctx :data))})
+                                                 (:data ctx))})

      :patch!                (fn [ctx]
                               {:entry (d/patch! Dal


Add login api

Add login api

--- src/checkin_halake/core.clj
+++ src/checkin_halake/core.clj
@@ -1,39 +1,57 @@
 (ns checkin-halake.core
-  (:require [compojure.core :refer [defroutes GET]]
+  (:require [compojure.core :refer [defroutes GET POST]]
             [compojure.route :refer [not-found]]
             [ring.adapter.jetty :refer [run-jetty]]
             [ring.middleware.defaults :refer [wrap-defaults api-defaults]]
+            [ring.middleware.reload :refer [wrap-reload]]
             [checkin-halake [users :as users]
-                            [checkin :as checkin]]
-            [clojure.string :as str]))
+             [checkin :as checkin]]
+            [clojure.string :as str]
+            [environ.core :refer [env]]))

 (defroutes routes
-  (GET "/users/register" {{:keys [name phone email]} :params}
-       (let [user-id (users/register-user name phone email)
-             user (users/query-user user-id)]
-         (str "registered: " user)))
-  (GET "/users/unregister" {{:keys [user-id]} :params}
-    (let [user (users/query-user user-id)]
-      (users/unregister-user user-id)
-      (str "unregistered: " (:name user))))
-  (GET "/users/all" req
-    (str/join \newline (users/query-users)))
-  (GET "/users/checkin" req
-    (str/join \newline (checkin/query-checkin-users)))
-  (GET "/api/checkin" {{:keys [user-id]} :params}
-    (let [user (users/query-user user-id)]
-      (checkin/checkin user-id)
-      (str "{\"type\":\"checkin\", \"status\":\"success\", \"user\":\"" (:name user) "\"}")))
-  (GET "/api/checkout" {{:keys [user-id]} :params}
-    (let [user (users/query-user user-id)]
-      (checkin/checkout user-id)
-      (str "{\"type\":\"checkout\", \"status\":\"success\", \"user\":\"" (:name user) "\"}")))
-  (not-found "NOT FOUND"))
+  (POST "/api/users" {{:keys [name password phone email]} :params}
+        (let [user (users/register-user name password phone email)]
+          (str "registered: " user)))
+  (GET "/api/users" _
+       (users/query-users))
+  (POST "/api/login" {{:keys [email password]} :params}
+        (users/login email password))
+  (POST "/api/checkin" _
+        (str/join \newline (checkin/query-checkin-users)))
+  (POST "/api/checkin" {{:keys [email password]} :params}
+       (if-let [user (users/login email password)]
+         (do
+           (checkin/checkin (:_id user))
+           (str "{\"type\":\"checkin\", \"status\":\"success\", \"user\":\"" (:name user) "\"}"))))
+  (POST "/api/checkout" {{:keys [email password]} :params}
+       (let [user (users/login email password)]
+         (checkin/checkout (:_id user))
+         (str "{\"type\":\"checkout\", \"status\":\"success\", \"user\":\"" (:name user) "\"}")))
+  (not-found "Not found"))
+
+(defonce headers-key (env :api-request-headers-key))
+
+(defn wrap-auth [app]
+  (fn [{{x-halake-key "x-halake-key"} :headers :as req}]
+    (if (= x-halake-key headers-key)
+      (app req))))
+
+;;    {:a 3}))
+
+;;;    {}(app req)))

 (defroutes app
-  (-> routes
+  (-> #'routes
+      wrap-auth
       (wrap-defaults api-defaults)))

+(def app-with-reload
+  (ring.middleware.reload/wrap-reload #'app))
+
 (defn -main []
-  (let [port (Long/parseLong (get (System/getenv) "PORT" "8080"))]
-    (run-jetty app {:port port})))
+  (let [port (Long/parseLong (get (System/getenv) "PORT" "8080"))
+        app (if (= (env :ring-reload) "true")
+              #'app
+              #'app-with-reload)]
+    (run-jetty #'app {:port port :join? false})))


add update-fast

add update-fast

--- src/clj/com/rpl/specter.clj
+++ src/clj/com/rpl/specter.clj
@@ -66,6 +66,15 @@
                       (update-fn structure)
                       (apply update-fn (conj vals structure)))
                     ))))
+
+(defn update-fast [^com.rpl.specter.impl.StructureValsPathFunctions selfns update-fn structure]
+  ((.updater selfns) [] structure
+   (fn [vals structure]
+     (if (empty? vals)
+       (update-fn structure)
+       (apply update-fn (conj vals structure)))
+     ))
+  )

 (defn setval
   "Navigates to each value specified by the selector and replaces it by val"


Don't log transient events (this should eventually be configurable)

--- src/cljs/dato/lib/core.cljs
+++ src/cljs/dato/lib/core.cljs
@@ -345,14 +345,13 @@
                                                 {:tx/transient? true})
                                               (update-in [:tx/intent] (fn [intent]
                                                                         (or intent event))))]
-                       (js/console.log "dato-keys: " (pr-str (keys payload)))
-                       (js/console.log "\tevent: " (pr-str event))
-                       (js/console.log "\ttx-data: " (pr-str tx-data))
-                       (js/console.log "\ttx-meta: " (pr-str full-tx-meta))
+                       (when-not (:tx/transient? full-tx-meta)
+                         (js/console.log "dato-keys: " (pr-str (keys payload)))
+                         (js/console.log "\tevent: " (pr-str event))
+                         (js/console.log "\ttx-data: " (pr-str tx-data))
+                         (js/console.log "\ttx-meta: " (pr-str full-tx-meta)))
                        (if tx-data
-                         (do
-                           (js/console.log "Transacting into: " conn)
-                           (d/transact! conn tx-data full-tx-meta))
+                         (d/transact! conn tx-data full-tx-meta)
                          (update-history! {:tx-meta full-tx-meta}))
                        (con/effect! context previous-state @conn payload)))
                    (recur)))))))


small refactoring

small refactoring

--- src/cljs/relembra/core.cljs
+++ src/cljs/relembra/core.cljs
@@ -72,22 +72,31 @@
      [:div.col-xs-12.col-sm-6 {:style {:padding-top "0.5em" :font-family "Yrsa, serif" :font-size "120%"}}
       [mathjax-box text]]]))

+(defn toggle-drawer [b]
+  (p/transact! conn [{:db/id 0 :drawer/open b}]))
+
+(defn open-drawer [& args]
+  (toggle-drawer true))
+
+(defn close-drawer [& args]
+  (toggle-drawer false))
+
 (defn drawer []
   (let [open @(p/q '[:find ?x . :where [0 :drawer/open ?x]] conn)]
     [rui/drawer
      {:docked false
       :width 200
       :open open
-      :on-request-change (fn [x] (println "on-request-change" x))}
+      :on-request-change toggle-drawer}
      [rui/menu-item {:on-touch-tap
                      (fn [x]
                         (println "on-touch-tap-1" x)
-                        (p/transact! conn [{:db/id 0 :drawer/open false}]))}
+                        (close-drawer))}
       "Item 1"]
      [rui/menu-item {:on-touch-tap
                      (fn[x]
                         (println "on-touch-tap-2" x)
-                        (p/transact! conn [{:db/id 0 :drawer/open false}]))}
+                        (close-drawer))}
       "Item 2"]]))

 (defn app []
@@ -96,7 +105,7 @@
     {:mui-theme (ui/get-mui-theme {:palette {:text-color (ui/color :teal600)}})}
     [:div
      [rui/app-bar {:title "Acrescenta pergunta"
-                   :on-left-icon-button-touch-tap #(p/transact! conn [{:db/id 0 :drawer/open true}])}]
+                   :on-left-icon-button-touch-tap open-drawer}]
      [drawer]
      [:div.container
       [md-editor "Pergunta" :addq/question-text :addq/question-caret]


Start game logic

Start game logic

--- src/cljs/triboard/core.cljs
+++ src/cljs/triboard/core.cljs
@@ -57,6 +57,20 @@

 ;; -----------------------------------------

+(defn range-single-coord
+  [x dx max-val]
+  (let [end-range (if (neg? dx) 0 max-val)]
+    (range x end-range dx)))
+
+(defn range-coord
+  "Give all the coordinate in the provided direction"
+  [[xi yi] [dx dy]]
+  (map vector
+    (range-single-coord xi dx board-width)
+    (range-single-coord yi dy board-height)))
+
+;; -----------------------------------------
+
 (defonce app-state (atom (new-game)))

 ;; -----------------------------------------


+ social profiles (2)

+ social profiles (2)

--- src/clojure/nossal/data.clj
+++ src/clojure/nossal/data.clj
@@ -32,7 +32,8 @@
                       "Google+"    "https://google.com/+RodrigoNossal"
                       "Ello"       "https://ello.co/nossal"
                       "About.me"   "https://about.me/nossal"
-                      "myspace"    "https://myspace.com/nossal"})
+                      "myspace"    "https://myspace.com/nossal"
+                      "Pinterest"  "https://pinterest.com/thenossal"})

 (def data-person (json/write-str {"@context" "https://schema.org"
                                   "@type" "Person"


input: use correct ports for carbon and pickle

--- src/io/cyanite/input.clj
+++ src/io/cyanite/input.clj
@@ -34,12 +34,14 @@
   [options]
   (component/using
    (map->TCPInput (assoc options
-                         :port (or (:port options) 2003)
+                         :port (or (:port options) 2004)
                          :pipeline pickle/pipeline))
    [:engine]))

 (defmethod build-input :carbon
   [options]
   (component/using
-   (map->TCPInput (assoc options :pipeline carbon/pipeline))
+   (map->TCPInput (assoc options
+                         :port (or (:port options) 2003)
+                         :pipeline carbon/pipeline))
    [:engine]))


new bangs

new bangs

--- src/xebang/models/bangs.clj
+++ src/xebang/models/bangs.clj
@@ -1,11 +1,11 @@
-(ns xebang.models.bangs
-  (:require [xebang.models.db :as db]
-            [somnium.congomongo :as m]))
+(ns xebang.models.bangs)

 (def catalog
   {'!bible      "http://www.bible.com/search?q={{{s}}}"
    '!kidsinmind "http://www.kids-in-mind.com/cgi-bin/search/search.pl?q={{{s}}}"
    '!weather    "http://weatherspark.com/#!dashboard;q={{{s}}}"
+   '!w          "http://weatherspark.com/#!dashboard;q={{{s}}}"
+   '!syn        "http://thesaurus.com/browse/{{{s}}}"
    '!devdocs    "http://devdocs.io/#q={{{s}}}"
    '!js         "http://devdocs.io/#q=js {{{s}}}"
    '!css        "http://devdocs.io/#q=css {{{s}}}"
@@ -23,6 +23,3 @@
 				   {:bang "!html"       :name "HTML"         :url-pattern "http://devdocs.io/#q=html {{{s}}}"}
 				   {:bang "!namecheap"  :name "Domain Search"
 				    :url-pattern "http://www.namecheap.com/domains/domain-name-search/results.aspx?domain={{{s}}}&tlds=&searchall=&type=single&"}]})
-
-(when-not (m/fetch-count :config)
-  (m/insert! :config))


Adding a test for component props, to test things passed to react as props but not reflected in the DOM

--- web-client/test/test_burgerboard/huh.cljs
+++ web-client/test/test_burgerboard/huh.cljs
@@ -94,9 +94,13 @@
      ))
   )

+(defn props-of [component]
+  (let [actual-component (or (.. component -_renderedComponent) component)]
+    (.-props actual-component)
+    ))
+
 (defn children-of [component]
-  (let [actual-component (or (.. component -_renderedComponent) component)
-        children (.. actual-component -props -children)]
+  (let [children (.-children (props-of component))]
     (cond
      (= (type children) js/Array)
      (filter #(not (string? %)) (js->clj children))
@@ -218,6 +222,17 @@
     )
   )

+(defn with-prop [prop-name expected-value]
+  (fn -with-prop-pred [component]
+    (let [actual-value (aget (.-props component) prop-name)]
+      (if (not= expected-value actual-value)
+        {:msg (str "Wrong value for prop '" prop-name "'")
+         :expected expected-value :actual actual-value}
+        true
+        )
+      ))
+  )
+
 (defn with-text [text]
   (fn -text-pred [component]
     (let [component (om/get-node component)


test fix

test fix

--- src/metabase/driver/generic_sql/query_processor/annotate.clj
+++ src/metabase/driver/generic_sql/query_processor/annotate.clj
@@ -25,15 +25,19 @@
             :columns column-names
             :cols (get-column-info query column-names)}}))

-(defn order-columns
-  "Return a sequence of column names in the order we should return results from the QP."
-  [{{source-table :source_table breakout-field-ids :breakout} :query} field-names]
-  (let [breakout-field-ids (filter identity breakout-field-ids)
-        breakout-field-id->name (sel :many :id->field [Field :name] :table_id source-table :id [in (set breakout-field-ids)])
-        breakout-fields (map breakout-field-id->name breakout-field-ids)]
-    (concat breakout-fields (filter #(not (contains? (set breakout-fields)
-                                                     (uncastify (name %))))
-                                    field-names))))
+ (defn order-columns
+   [{{source-table :source_table breakout-field-ids :breakout} :query} field-names]
+   (let [uncastified->field-name (->> field-names
+                                      (map (fn [field-name]
+                                             {(uncastify (name field-name)) field-name}))
+                                      (into {}))
+         field-id->uncastified (sel :many :id->field [Field :name] :name [in (set (keys uncastified->field-name))])
+         breakout-field-names (->> breakout-field-ids
+                                   (filter identity)
+                                   (map field-id->uncastified)
+                                   (map uncastified->field-name))]
+     (concat breakout-field-names (filter #(not (contains? (set breakout-field-names) %))
+                                          field-names))))

 (defn- get-column-names
   "Get an ordered seqences of column names for the results.


Moves example-record to use js/coerce

Moves example-record to use js/coerce

--- umm-spec-lib/src/cmr/umm_spec/test/expected_conversion.clj
+++ umm-spec-lib/src/cmr/umm_spec/test/expected_conversion.clj
@@ -4,6 +4,7 @@
   can be lossy if some fields are not supported by that format"
   (:require [cmr.common.util :refer [update-in-each]]
             [cmr.umm-spec.models.collection :as umm-c]
+                        [cmr.umm-spec.json-schema :as js]
             [cmr.umm-spec.models.common :as cmn]
             [clj-time.core :as t]
             [cmr.common.util :as util]
@@ -11,70 +12,58 @@

 (def example-record
   "An example record with fields supported by most formats."
-  (umm-c/map->UMM-C
-    {:Platforms [(cmn/map->PlatformType
-                   {:ShortName "Platform 1"
-                    :LongName "Example Platform Long Name 1"
-                    :Type "Aircraft"
-                    :Characteristics [(cmn/map->CharacteristicType
-                                        {:Name "OrbitalPeriod"
-                                         :Description "Orbital period in decimal minutes."
-                                         :DataType "float"
-                                         :Unit "Minutes"
-                                         :Value "96.7"})]
-                    :Instruments [(cmn/map->InstrumentType
-                                    {:ShortName "An Instrument"
-                                     :LongName "The Full Name of An Instrument v123.4"
-                                     :Technique "Two cans and a string"
-                                     :NumberOfSensors 1
-                                     :OperationalModes ["on" "off"]
-                                     :Characteristics [(cmn/map->CharacteristicType
-                                                         {:Name "Signal to Noise Ratio"
-                                                          :Description "Is that necessary?"
-                                                          :DataType "float"
-                                                          :Unit "dB"
-                                                          :Value "10"})]
-                                     :Sensors [(cmn/map->SensorType
-                                                 {:ShortName "ABC"
-                                                  :LongName "Long Range Sensor"
-                                                  :Characteristics [(cmn/map->CharacteristicType
-                                                                      {:Name "Signal to Noise Ratio"
-                                                                       :Description "Is that necessary?"
-                                                                       :DataType "float"
-                                                                       :Unit "dB"
-                                                                       :Value "10"})]
-                                                  :Technique "Drunken Fist"})]})]})]
-     :TemporalExtents [(cmn/map->TemporalExtentType
-                         {:TemporalRangeType "temp range"
-                          :PrecisionOfSeconds 3
-                          :EndsAtPresentFlag false
-                          :RangeDateTimes (mapv cmn/map->RangeDateTimeType
-                                                [{:BeginningDateTime (t/date-time 2000)
-                                                  :EndingDateTime (t/date-time 2001)}
-                                                 {:BeginningDateTime (t/date-time 2002)
-                                                  :EndingDateTime (t/date-time 2003)}])})]
-     :ProcessingLevel (umm-c/map->ProcessingLevelType {:Id "3"
-                                                       :ProcessingLevelDescription "Processing level description"})
-     :RelatedUrls [(cmn/map->RelatedUrlType {:URLs ["http://google.com"]})]
-     :Organizations [(cmn/map->ResponsibilityType
-                       {:Role "CUSTODIAN"
-                        :Party (cmn/map->PartyType
-                                 {:OrganizationName (cmn/map->OrganizationNameType
-                                                      {:ShortName "custodian"})})})]
-     :ScienceKeywords [(cmn/map->ScienceKeywordType {:Category "cat" :Topic "top" :Term "ter"})]
-     :SpatialExtent (cmn/map->SpatialExtentType {:GranuleSpatialRepresentation "NO_SPATIAL"})
-     :AccessConstraints (cmn/map->AccessConstraintsType
-                          {:Description "Access constraints"
-                           :Value "0"})
-     :UseConstraints "Use constraints"
-     :EntryId "short_V1"
-     :EntryTitle "The entry title V5"
-     :Version "V5"
-     :DataDates [(cmn/map->DateType {:Date (t/date-time 2012)
-                                     :Type "CREATE"})]
-     :Abstract "A very abstract collection"
-     :DataLanguage "English"
-     :Quality "Pretty good quality"}))
+  (js/coerce
+   {:Platforms [{:ShortName "Platform 1"
+                 :LongName "Example Platform Long Name 1"
+                 :Type "Aircraft"
+                 :Characteristics [{:Name "OrbitalPeriod"
+                                    :Description "Orbital period in decimal minutes."
+                                    :DataType "float"
+                                    :Unit "Minutes"
+                                    :Value "96.7"}]
+                 :Instruments [{:ShortName "An Instrument"
+                                :LongName "The Full Name of An Instrument v123.4"
+                                :Technique "Two cans and a string"
+                                :NumberOfSensors 1
+                                :OperationalModes ["on" "off"]
+                                :Characteristics [{:Name "Signal to Noise Ratio"
+                                                   :Description "Is that necessary?"
+                                                   :DataType "float"
+                                                   :Unit "dB"
+                                                   :Value "10"}]
+                                :Sensors [{:ShortName "ABC"
+                                           :LongName "Long Range Sensor"
+                                           :Characteristics [{:Name "Signal to Noise Ratio"
+                                                              :Description "Is that necessary?"
+                                                              :DataType "float"
+                                                              :Unit "dB"
+                                                              :Value "10"}]
+                                           :Technique "Drunken Fist"}]}]}]
+    :TemporalExtents [{:TemporalRangeType "temp range"
+                       :PrecisionOfSeconds 3
+                       :EndsAtPresentFlag false
+                       :RangeDateTimes [{:BeginningDateTime (t/date-time 2000)
+                                         :EndingDateTime (t/date-time 2001)}
+                                        {:BeginningDateTime (t/date-time 2002)
+                                         :EndingDateTime (t/date-time 2003)}]}]
+    :ProcessingLevel {:Id "3"
+                      :ProcessingLevelDescription "Processing level description"}
+    :RelatedUrls [{:URLs ["http://google.com"]}]
+    :Organizations [{:Role "CUSTODIAN"
+                     :Party {:OrganizationName {:ShortName "custodian"}}}]
+    :ScienceKeywords [{:Category "cat" :Topic "top" :Term "ter"}]
+    :SpatialExtent {:GranuleSpatialRepresentation "NO_SPATIAL"}
+    :AccessConstraints {:Description "Access constraints"
+                        :Value "0"}
+    :UseConstraints "Use constraints"
+    :EntryId "short_V1"
+    :EntryTitle "The entry title V5"
+    :Version "V5"
+    :DataDates [{:Date (t/date-time 2012)
+                 :Type "CREATE"}]
+    :Abstract "A very abstract collection"
+    :DataLanguage "English"
+    :Quality "Pretty good quality"}))

 (defmulti ^:private convert-internal
   "Returns UMM collection that would be expected when converting the source UMM-C record into the


Correct todomvc so that sugared subscriptions used correct

--- examples/todomvc/src/todomvc/subs.cljs
+++ examples/todomvc/src/todomvc/subs.cljs
@@ -130,13 +130,13 @@
 (register-pure-sub
   :all-complete?
   :<- [:todos]
-  (fn [[todos] _]
+  (fn [todos _]
     (seq todos)))

 (register-pure-sub
   :completed-count
   :<- [:todos]
-  (fn [[todos] _]
+  (fn [todos _]
     (count (filter :done todos))))

 (register-pure-sub


Let ispan create the parents if it can [IMMUTANT-342]

--- modules/cache/src/main/clojure/immutant/cache/config.clj
+++ modules/cache/src/main/clojure/immutant/cache/config.clj
@@ -16,13 +16,12 @@
 ;; 02110-1301 USA, or see the FSF site: http://www.fsf.org.

 (ns immutant.cache.config
-    (:require [clojure.java.io :as io])
-    (:import [org.infinispan.configuration.cache VersioningScheme CacheMode]
-             [org.infinispan.transaction TransactionMode LockingMode]
-             org.infinispan.transaction.lookup.GenericTransactionManagerLookup
-             org.infinispan.eviction.EvictionStrategy
-             org.infinispan.util.concurrent.IsolationLevel
-             java.util.concurrent.TimeUnit))
+  (:import [org.infinispan.configuration.cache VersioningScheme CacheMode]
+           [org.infinispan.transaction TransactionMode LockingMode]
+           org.infinispan.transaction.lookup.GenericTransactionManagerLookup
+           org.infinispan.eviction.EvictionStrategy
+           org.infinispan.util.concurrent.IsolationLevel
+           java.util.concurrent.TimeUnit))

 (defn cache-mode
   [{:keys [mode sync]}]
@@ -76,7 +75,7 @@
   [builder {persist :persist}]
   (if persist
     (let [store (.. builder loaders addFileCacheStore)]
-      (if (.exists (io/file (str persist)))
+      (if (string? persist)
         (.. store (location persist)))))
   builder)


enhance Schema to be able to include plugins for atom

--- src/org/domaindrivenarchitecture/pallet/crate/managed_ide.clj
+++ src/org/domaindrivenarchitecture/pallet/crate/managed_ide.clj
@@ -39,7 +39,8 @@
   {:project-config GitProjectConfig
    :ide-user s/Keyword
    (s/optional-key :clojure) clojure/LeiningenUserProfileConfig
-   (s/optional-key :atom) {:settings (hash-set (s/enum :install-aws-workaround))}
+   (s/optional-key :atom) {:settings (hash-set (s/enum :install-aws-workaround))
+                           :plugins [s/Str]}
    }
   )


RS | #22 | Add draft routes to safe referral urls

--- src/objective8/utils.clj
+++ src/objective8/utils.clj
@@ -69,10 +69,13 @@
 (defn safen-url [target]
   (or ((regex-checker #"/objectives/\d+") target)
       ((regex-checker #"/objectives/\d+/questions") target)
+      ((regex-checker #"/objectives/\d+/questions/\d+") target)
+      ((regex-checker #"/objectives/\d+/drafts/\d+") target)
+      ((regex-checker #"/objectives/\d+/drafts/current") target)
+      ((regex-checker #"/objectives/\d+/drafts/edit-draft") target)
       ((regex-checker #"/objectives/\d+/writers") target)
       ((regex-checker #"/objectives/\d+/writers/invitation") target)
       ((regex-checker #"/objectives/\d+/candidate-writers") target)
-      ((regex-checker #"/objectives/\d+/questions/\d+") target)
       ((regex-checker #"/objectives/\d+/writer-invitations/\d+") target)))

 ;;DISABLE CSRF for tests


Adding integration test for connection timeout param

--- test/clj_http/test/core.clj
+++ test/clj_http/test/core.clj
@@ -395,3 +395,18 @@
                                   :server-port 80
                                   :request-method :get :uri "/"
                                   :conn-timeout 1})))))
+
+(deftest ^{:integration true} connection-pool-timeout
+  (run-server)
+  (client/with-connection-pool {:threads 1}
+    (let [async-request #(future (client/request {:scheme :http
+                                          :server-name "localhost"
+                                          :server-port 18080
+                                          :request-method :get :uri "/timeout"}))
+         is-pool-timeout-error? (fn[req-fut] instance? org.apache.http.conn.ConnectionPoolTimeoutException
+                                  (try @req-fut (catch Exception e (.getCause e))))
+          req1 (async-request)
+          req2 (async-request)
+          timeout-error1 (is-pool-timeout-error? req1)
+          timeout-error2 (is-pool-timeout-error? req2)]
+      (is (or timeout-error1 timeout-error2)))))


These tests dont have much meaning anymore

--- test/onyx/analyzer_test.clj
+++ test/onyx/analyzer_test.clj
@@ -33,24 +33,6 @@
          (validate! os/Workflow [[:a :b :c]]))))

 (deftest task-map-errors
-  (is (= {:error-type :conditional-failed
-          :error-key nil
-          :error-value {}
-          :path nil
-          :predicates '[onyx-input-task-type
-                        onyx-output-task-type
-                        onyx-function-task-type]}
-         (validate! os/TaskMap {})))
-
-  (is (= {:error-type :conditional-failed
-          :error-key :onyx/type
-          :error-value {:onyx/type :reader}
-          :path nil
-          :predicates '[onyx-input-task-type
-                        onyx-output-task-type
-                        onyx-function-task-type]}
-         (validate! os/TaskMap {:onyx/type :reader})))
-
   (is (= {:error-type :missing-required-key
           :missing-key :onyx/plugin
           :path [:onyx/plugin]}


CMR-3926 more formatting changes to collection update test

--- system-int-test/test/cmr/system_int_test/ingest/collection_update_test.clj
+++ system-int-test/test/cmr/system_int_test/ingest/collection_update_test.clj
@@ -865,7 +865,7 @@
                                                                 :Platforms [(apply data-umm-c/platform-with-instruments plat-instruments-1)
                                                                             (apply data-umm-c/platform-with-instruments plat-instruments-2)]}))
               {:keys [status errors]} response]
-          (is (= [200 nil] [status errors])))
+          (is (= [200 nil] [status errors])))

         "Removing an instrument referenced by granules is invalid once hierarchical search is supported.
          Currently it's okay if it exists under other platforms."
@@ -895,7 +895,7 @@
                                                      {:allow-failure? true})
               {:keys [status errors]} response]
           (is (= [422 expected-errors] [status errors])))
-
+
         "Removing an instrument  that is referenced by a granule is invalid."
         ["p2" "i2" "GPS RECEIVERS"]
         ["Collection Child Instrument [s1] is referenced by existing granules, cannot be removed. Found 1 granules."]


Удалил лишние принты

Удалил лишние принты

--- src-cljs/ixinfestor/omut.cljs
+++ src-cljs/ixinfestor/omut.cljs
@@ -114,7 +114,7 @@
   (om/transact!
    app-row
    (fn [app-row]
-     (println (app-row omut-row-key))
+     ;;(println (app-row omut-row-key))
      (let [v (get-in app-row [omut-row-key :collapsed k])]
        (assoc-in app-row [omut-row-key :collapsed k] (if (nil? v) false (not v)))))))

@@ -1363,7 +1363,7 @@
                     (om/transact!
                      app
                      (fn [data]
-                       (println (map omut-row-key data))
+                       ;;(println (map omut-row-key data))
                        (vec (map #(omut-row-set-selected! % false) data))))))
            opts)})))))

@@ -2118,8 +2118,7 @@
                {:success
                 #(do
                    (when update-fn (update-fn))
-                   (println "UPLOAD SUCCES!!!"))})
-              )))))
+                   (println "UPLOAD SUCCES!!!"))}))))))

     om/IRenderState
     (render-state [_ {:keys [chan-upload form-id uploader-id]}]


Limit the number of Ring request maps captured by the loopback

Specifically: don't include :headers

--- src/io/aviso/rook/async.clj
+++ src/io/aviso/rook/async.clj
@@ -203,9 +203,7 @@

 (def request-copy-properties
   "Properties of a Ring request that should be copied into a chained request."
-  [:server-port :server-name :remote-addr :scheme :content-type :character-encoding
-   :ssl-client-cert :headers
-   :server-uri])
+  [:server-port :server-name :remote-addr :scheme :ssl-client-cert :server-uri])

 (defn wrap-with-loopback
   "Wraps a set of asynchronous routes with a loopback: a function that calls back into the same asynchronous routes.
@@ -213,8 +211,9 @@
   to interact with other resources as if via HTTP/HTTPs, but without the cost, in terms of processing time to
   encode and decode requests, and in terms of blocking the limited number of request servicing threads.

-  Request processing should be broken up into two phases: an initial synchronous phase that is largely concerned with
-  standard protocol issues (such as converting the body from JSON or EDN text into Clojure data) and a later,
+  Request processing should be broken up into two phases: an initial phase (synchronous or
+  asynchronous) that is largely concerned with standard protocol issues
+  (such as converting the body from JSON or EDN text into Clojure data) and a later,
   asynchronous phase (the routes provided to this function as handler).

   The loopback allows this later asynchronous phase to be re-entrant.
@@ -230,12 +229,17 @@

   The loopback handler will capture some request data when first invoked (in a non-loopback request); this information
   is merged into the request map provided to the handler. This includes :scheme, :server-port, :server-name,
-  and several others. Specifically :server-uri is captured, so that the :resource-uri argument can be calculated.
-
-  What's not captured: the :body, :params, :uri, :query-string, and all the various :*-params generated
+  and several others.
+
+  :server-uri is captured, so that the :resource-uri argument can be calculated.
+
+  What's not captured: the :body, :params, :uri, :query-string, :headers, and all the various :*-params generated
   by standard middleware. Essentially, enough information is captured and restored to allow the eventual
   handler to make determinations about the originating request, but not know the specific URI, query parameters,
   or posted data.
+
+  Specifically, the client in a loopback will need to explicitly decide which, if any, headers are to
+  be passed through the loopback.

   In addition, the [:rook :arg-resolvers] key is captured, since often default argument resolvers are
   defined higher in the pipeline."


Specify seconds resolution in output to InfluxDB to make it line up with unix epoch seconds standard in Riemann

--- src/riemann/influxdb.clj
+++ src/riemann/influxdb.clj
@@ -72,4 +72,4 @@
             points (events->points series events)]
         (when-not (empty? points)
           (doseq [[series points] points]
-            (influx/post-points client series points)))))))
+            (influx/post-points client series "s" points)))))))


Need to use double quotes only during read time. Can push metrics without double-quotes during write.

--- src/riemann/influxdb.clj
+++ src/riemann/influxdb.clj
@@ -2,19 +2,6 @@
   "Forwards events to InfluxDB"
   (:require [capacitor.core :as influx])
   (:use [clojure.string :only [split join]]))
-
-(defn influxdb-metric-name
-  "Constructs a metric-name for an event."
-  [event]
-  (let [service (:service event)
-        split-service (if service (split service #" ") [])]
-     (join "." split-service)))
-
-(defn influxdb-series-name
-  "Constructs a series-name for an event."
-  [event]
-  (let [service (:service event)]
-     (str \" service \")))

 (defn influxdb
   "Returns a function which accepts an event and sends it to InfluxDB.
@@ -43,7 +30,7 @@
     (when (:metric event)
       (when (:service event)
         (when (:host event)
-          (influx/post-points client (influxdb-series-name event) [{ :name (influxdb-metric-name event)
-                                                                     :host (:host event)
-                                                                     :state (:state event)
-                                                                     :value (:metric event) }])))))))
+          (influx/post-points client (:service event) [{ :name (:service event)
+                                                         :host (:host event)
+                                                         :state (:state event)
+                                                         :value (:metric event) }])))))))


more updates

more updates

--- src/Miscellaneous/newware.clj
+++ src/Miscellaneous/newware.clj
@@ -561,7 +561,7 @@
         func #(assoc % :text (text %))
         date-range {$gte (t/from-time-zone (apply t/date-time start-day) (t/time-zone-for-offset +8))
                     $lte (t/from-time-zone (apply t/date-time end-day) (t/time-zone-for-offset +8))}
-        col (with-collection "xuetestsegs"
+        col (with-collection segs
               (find {:word word :pubdate date-range})
               (sort (array-map :pubdate 1)))]
     (->> (map func col)
@@ -571,8 +571,8 @@
          (map #(assoc % :mid2 (str (:mid2 %))))
          )))

-;(drill-down "开心" "xuetestsegs" "xuetestentries" [2013 12 1] [2014 3 1])
-
+
+;(drill-down "开心" "car_social_segs" "car_social_integrate" [2014 4 8] [2014 5 5])

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;adding category;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

@@ -606,6 +606,19 @@

 ;(first(rest (synonym "D:/data/星星分词.xlsx" "人物" "名词" "形容词")))

+;(synonym "D:/data/car/车展分词更新版.xlsx" "汽车专有名词" "名词" "形容词" "车展人物")
+
+(defn categorize-data
+  [segs entries start-day end-day excel & sheets]
+  (apply (partial add-category
+                  (mapcat #(drill-down % segs entries start-day end-day)
+                           (second (rest (apply synonym excel sheets))))
+                  excel)
+         sheets))
+
+#_(-> (categorize-data "car_social_segs" "car_social_integrate" [2014 4 8] [2014 5 5]
+                 "D:/data/car/车展分词更新版.xlsx" "汽车专有名词" "名词" "形容词" "车展人物")
+    (write-excel "话题分类" "D:/data/car/话题分类.xlsx"))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;excel output;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

@@ -629,7 +642,7 @@
   (reduce #(apply conj %1 (keys %2)) #{} coll))

-(def abcd (mc/find-maps "car_weibo_history_detaileduser"))
+;(def abcd (mc/find-maps "car_weibo_history_detaileduser"))

 ;(doall (get-keys abcd))


Fix a warning reported by eastwood

Fix a warning reported by eastwood

--- src/ktra_indexer/config.clj
+++ src/ktra_indexer/config.clj
@@ -1,6 +1,7 @@
 (ns ktra-indexer.config
   "Namespace for configuration reading functions"
-  (:require [clojure.edn :as edn]))
+  (:require [clojure.edn :as edn]
+            [clojure.java.io :refer [resource]]))

 (defn load-config
   "Given a filename, load and return a config file."
@@ -13,10 +14,9 @@
                :or {k nil
                     use-sample false}}]
   (let [config (load-config
-                (clojure.java.io/resource
-                 (if use-sample
-                   "config.edn_sample"
-                   "config.edn")))]
+                (resource (if use-sample
+                            "config.edn_sample"
+                            "config.edn")))]
     (if k
       (k (property config))
       (property config))))


Support for KeyStore instances in Jetty adapter

--- ring-jetty-adapter/src/ring/adapter/jetty.clj
+++ ring-jetty-adapter/src/ring/adapter/jetty.clj
@@ -24,7 +24,9 @@
   "Creates a new SslContextFactory instance from a map of options."
   [options]
   (let [context (SslContextFactory.)]
-    (.setKeyStorePath context (options :keystore))
+    (if (string? (options :keystore))
+      (.setKeyStorePath context (options :keystore))
+      (.setKeyStore context (options :keystore)))
     (.setKeyStorePassword context (options :key-password))
     (when (options :truststore)
       (.setTrustStore context (options :truststore)))


scheduler - decrease frequency of race condition in a unit test.

--- scheduler/test/metatransaction/utils_test.clj
+++ scheduler/test/metatransaction/utils_test.clj
@@ -104,7 +104,7 @@
                                              :job/id "1"
                                              :job/name "uno"}]))
           resp-chan (update-async conn opts exception-when-a-true)]
-          (async/<!! (async/timeout 10)) ; Let run update fail at least once
+          (async/<!! (async/timeout 50)) ; Let run update fail at least once
           (reset! a false)
           (let [resp (async/<!! resp-chan)]
             (is (instance? clojure.lang.ExceptionInfo resp))


Primitive row add.

Primitive row add.

--- sonic-jam/src/sonic_jam/core.cljs
+++ sonic-jam/src/sonic_jam/core.cljs
@@ -57,6 +57,20 @@
                                            :get-state-ch (:get-state-ch state)}]
                             (om/build grid-view id {:state sub-state})))))))))

+(defn play-builder []
+  {"beats" [[0] [0] [0] [0]] "type" "play" "note" 30})
+
+(defn row-builder [{:keys [cursor id]} _]
+  (reify
+    om/IRenderState
+    (render-state [_ state]
+      (dom/p #js {:onClick #(do
+                              (om/transact! cursor "tracks"
+                                            (fn [x] (conj x (play-builder))))
+                              (go (>! (get state :set-state-ch) id)))
+                  :style #js {:color "#999"}}
+             "{}"))))
+
 (defn grid-view [id owner]
   (reify
     om/IInitState
@@ -68,17 +82,20 @@
         (dom/div #js {:style #js {:borderLeft "solid 3px #ccc"
                                   :paddingLeft "10px"}}
                  (if-not (:grid-expanded state)
-                   (dom/div nil (dom/p #js {:onClick #(om/set-state! owner :grid-expanded true)
-                                            :style #js {:color "#999"}}
-                                       (str "[+] " id)))
-                   (dom/div nil (dom/p #js {:onClick #(om/set-state! owner :grid-expanded false)
-                                            :style #js {:color "#999"}}
-                                       (str "[-] " id))
+                   (dom/div nil
+                            (dom/p #js {:onClick #(om/set-state! owner :grid-expanded true)
+                                        :style #js {:color "#999"}}
+                                   (str "[+] " id)))
+                   (dom/div nil
+                            (dom/p #js {:onClick #(om/set-state! owner :grid-expanded false)
+                                        :style #js {:color "#999"}}
+                                   (str "[-] " id))
                             (apply dom/table nil
                                    (let [cursors (map #(hash-map :cursor %1 :id %2)
                                                       (get cursor "tracks")
                                                       (repeat id))]
-                                     (om/build-all track-view cursors {:state state}))))))))))
+                                     (om/build-all track-view cursors {:state state})))
+                            (om/build row-builder {:cursor cursor :id id} {:state state}))))))))

 (defn app-view [cursor _]
   (reify


Fix sub-grid control and prefetching bug.

--- sonic-jam/src/sonic_jam/core.cljs
+++ sonic-jam/src/sonic_jam/core.cljs
@@ -10,20 +10,23 @@

 (defonce app-state (atom {:grids {}}))

-(defn cell-view [cursor _]
+(defn grids []
+  (om/ref-cursor (:grids (om/root-cursor app-state))))
+
+(defn cell-view [{:keys [cursor id]} _]
   (reify
     om/IRenderState
     (render-state [_ state]
       (dom/td #js {:onClick #(do
                                (om/update! cursor [(mod (inc (first cursor)) 2)])
-                               (go (>! (:set-state-ch state) (:ns state))))
+                               (go (>! (:set-state-ch state) id)))
                    :style #js {:width "20px"
                                :fontSize "20px"}}
              (str " " (first cursor))))))

 (declare grid-view)

-(defn track-view [cursor owner]
+(defn track-view [{:keys [cursor id]} owner]
   (reify
     om/IInitState
     (init-state [_]
@@ -43,40 +46,39 @@
                 (dom/td nil
                  (dom/table nil
                   (apply dom/tr nil
-                         (om/build-all cell-view (get cursor "beats") {:state state}))))
+                         (let [cursors (map #(hash-map :cursor %1 :id %2)
+                                            (get cursor "beats")
+                                            (repeat id))]
+                           (om/build-all cell-view cursors {:state state})))))
                 (dom/td nil
                         (when (= "grid" (get cursor "type"))
                           (let [id (get cursor "id")
-                                root (om/root-cursor app-state)
-                                grids (:grids root)
-                                sub-grid (get grids id)
                                 sub-state {:set-state-ch (:set-state-ch state)
-                                           :get-state-ch (:get-state-ch state)
-                                           :ns id}]
-                            (om/build grid-view sub-grid {:state sub-state})))))))))
+                                           :get-state-ch (:get-state-ch state)}]
+                            (om/build grid-view id {:state sub-state})))))))))

-
-
-
-(defn grid-view [cursor owner]
+(defn grid-view [id owner]
   (reify
     om/IInitState
     (init-state [_]
       {:grid-expanded false})
     om/IRenderState
     (render-state [_ state]
-      (dom/div #js {:style #js {:borderLeft "solid 3px #ccc"
-                                :paddingLeft "10px"}}
-               (if-not (:grid-expanded state)
-                 (dom/div nil (dom/p #js {:onClick #(om/set-state! owner :grid-expanded true)
-                                          :style #js {:color "#999"}}
-                                     (str "[+] " (:ns state))))
-                 (dom/div nil (dom/p #js {:onClick #(om/set-state! owner :grid-expanded false)
-                                          :style #js {:color "#999"}}
-                                     (str "[-] " (:ns state)))
-                          (apply dom/table nil
-                                 (om/build-all track-view (get cursor "tracks")
-                                               {:state state}))))))))
+      (let [cursor (get (om/observe owner (grids)) id)]
+        (dom/div #js {:style #js {:borderLeft "solid 3px #ccc"
+                                  :paddingLeft "10px"}}
+                 (if-not (:grid-expanded state)
+                   (dom/div nil (dom/p #js {:onClick #(om/set-state! owner :grid-expanded true)
+                                            :style #js {:color "#999"}}
+                                       (str "[+] " id)))
+                   (dom/div nil (dom/p #js {:onClick #(om/set-state! owner :grid-expanded false)
+                                            :style #js {:color "#999"}}
+                                       (str "[-] " id))
+                            (apply dom/table nil
+                                   (let [cursors (map #(hash-map :cursor %1 :id %2)
+                                                      (get cursor "tracks")
+                                                      (repeat id))]
+                                     (om/build-all track-view cursors {:state state}))))))))))

 (defn app-view [cursor _]
   (reify
@@ -112,11 +114,8 @@
          :get-state-ch get-state-ch}))
     om/IRenderState
     (render-state [_ state]
-      (let [root (get (:grids cursor) "root")]
-        (if root
-          (dom/div #js {:style #js {:fontFamily "monospace"}}
-                   (om/build grid-view root {:state (assoc state :ns "root")}))
-          (dom/div nil "loading..."))))))
+      (dom/div #js {:style #js {:fontFamily "monospace"}}
+               (om/build grid-view "root" {:state state})))))

 (om/root app-view app-state
   {:target (. js/document (getElementById "app"))})


(SERVER-1440) Close up test-503-when-app-shuts-down race condition a bit

This commit adds an initial GET request to the environments endpoint to
the `test-503-when-app-shuts-down` test.  Without this extra call, it
is more likely for the environment ping logic in the test to exhaust up to
the maximum configured 10 second wait if the initialization of the second
JRubyPuppet instance, the one servicing the environments requests, takes
a sufficiently long amount of time.  This would, in turn, cause
assertions related to the service stop to fail because the stop was not
far enough along before the assertions were made.

--- test/integration/puppetlabs/services/jruby/jruby_puppet_pool_int_test.clj
+++ test/integration/puppetlabs/services/jruby/jruby_puppet_pool_int_test.clj
@@ -221,7 +221,10 @@
            request {:uri "/puppet/v3/environments", :params {}, :headers {},
                     :request-method :GET, :body "", :ssl-client-cert cert, :content-type ""}
            ping-environment #(->> request (handler-core/wrap-params-for-jruby) (handler/handle-request handler-service))
+           ping-before-stop (ping-environment)
            stop-complete? (future (tk-app/stop app))]
+       (is (= 200 (:status ping-before-stop))
+           "environment request before stop failed")
        (let [start (System/currentTimeMillis)]
          (logging/with-test-logging
           (while (and


Refactor code

Refactor code

--- src/spectrace/trace.cljc
+++ src/spectrace/trace.cljc
@@ -11,10 +11,11 @@

 (def ^:private ^:dynamic *problem-indexes*)

-(defn- next-index [trail]
+(defn- next-problem [{:keys [::s/problems]} trail]
   (let [index (get *problem-indexes* trail 0)]
-    (set! *problem-indexes* (assoc *problem-indexes* trail (inc index)))
-    index))
+    (when (< index (count problems))
+      (set! *problem-indexes* (assoc *problem-indexes* trail (inc index)))
+      (nth problems index))))

 (defmulti step* (fn [state] (first (:spec state))))
 (defmethod step* :default [{:keys [spec]}]
@@ -34,8 +35,7 @@
       (if (s/invalid? conformed)
         (let [ed (s/explain-data evaled-spec val)
               trail (conj trail i)
-              {:keys [path in]} (nth (::s/problems ed)
-                                     (next-index trail))]
+              {:keys [path in]} (next-problem ed trail)]
           (assoc state
                  :spec spec :path path :val val :in in :trail trail))
         (recur (inc i) specs conformed)))))
@@ -148,14 +148,11 @@
 (defmethod step* `s/merge [{:keys [spec val trail] :as state}]
   (loop [i 0, [spec & specs] (rest spec)]
     (assert (not (nil? spec)))
-    (if-let [{:keys [::s/problems]} (s/explain-data (eval* spec) val)]
-      (let [trail (conj trail i)
-            index (next-index trail)]
-        (if (>= index (count problems))
-          (recur (inc i) specs)
-          (let [{:keys [path in]} (nth problems index)]
-            (assoc state
-                   :spec spec :path path :in in :trail trail))))
+    (if-let [ed (s/explain-data (eval* spec) val)]
+      (let [trail (conj trail i)]
+        (if-let [{:keys [path in]} (next-problem ed trail)]
+          (assoc state :spec spec :path path :in in :trail trail)
+          (recur (inc i) specs)))
       (recur (inc i) specs))))

 (def ^:private regex-ops


rename atom with bang prefix

rename atom with bang prefix

--- src/cljs/infinitelives/pixi/resources.cljs
+++ src/cljs/infinitelives/pixi/resources.cljs
@@ -15,7 +15,7 @@
 ;; This resources/texture-store atom stores the raw resource images.
 ;; each value is a hashmap with keps :linear and :nearest containing
 ;; textures set to those filtering modes
-(defonce texture-store (atom {}))
+(defonce !texture-store (atom {}))

 (defn progress-texture
   "Draws an empty box that can serve as a default progress bar for preloading images"
@@ -80,12 +80,12 @@
     s))

 (defn get-texture [key scale]
-  (scale (get @texture-store key)))
+  (scale (get @!texture-store key)))

 ;; setup a pixi texture keyed by the tail of its filename
 (defn- register!
   [url img]
-  (swap! texture-store
+  (swap! !texture-store
          assoc (string/url-keyword url)
          {
           :linear


Try to fix genclass problems.

Try to fix genclass problems.

--- src/clojure/flambo/kryo/sfn_serializer.clj
+++ src/clojure/flambo/kryo/sfn_serializer.clj
@@ -2,12 +2,11 @@
   (:require
     [serializable.fn :as sfn]
     [flambo.kryo :as fkryo]
-    ))
-
-(gen-class
-  :name flambo.kryo.SfnSerializer
-  :extends com.esotericsoftware.kryo.Serializer
-  )
+    )
+  (:gen-class
+    :name flambo.kryo.SfnSerializer
+    :extends com.esotericsoftware.kryo.Serializer
+  ))

 (defn -write [this kryo output object]
   (binding [sfn/*serialize* fkryo/serialize]


remove old code

remove old code

--- src/ads_txt_crawler/crawl.clj
+++ src/ads_txt_crawler/crawl.clj
@@ -7,42 +7,18 @@
   (let [{:keys [exchange-domain account-id account-type tag-id]} record]
     (println (format "%s,%s,%s,%s,%s" domain exchange-domain account-id account-type tag-id))))

-;; (defn print-data [domain data]
-;;   (doseq [m data]
-;;     (print-url domain m)))
-
-;; (defn crawl-domain [domain dbname]
-;;   (let [data (p/process domain)]
-;;     (if dbname
-;;       (data/save domain data dbname)
-;;       (print-data domain data))))
-
-;; (defn crawl-file-opt-database
-;;   "Read the fname for domains and read each for it's ads.txt file and load the contents into dbname"
-;;   ([fname] (crawl-file-opt-database fname nil))
-;;   ([fname dbname]
-;;    (let [domains (d/domains fname)]
-;;      (doseq [domain domains]
-;;        (crawl-domain domain dbname)))))
-
-;; (defn crawl-single-domain
-;;   [domain]
-;;   (print-data domain (p/process (d/clean-domain-name domain))))
-
-
 (defn crawl
   "Crawl a list of domains and process them with the output-fn.
   The output-fn should accept a single parameter which is the return map from process/process-to-map

   The domains list can be generated from a file from the domains/domains function.
-  Domains from other sources should be pre-processed with domains/clean-domain-name.
-  "
-  [domains output-fn]
+  Domains from other sources should be pre-processed with domains/clean-domain-name."
+  [domains output-fnc]
   (doseq [d domains]
     (let [data (p/process-to-map d)]
       (if-let [err (:error data)]
-        (println "ERROR: " (:error-message data) (:domain data))
-        (output-fn data)))))
+        (.println *err* (:message data))
+        (output-fnc data)))))

 (defn print-results
   "Print the results to stdout"


Fix shadow-cljs event tab exception

Fix shadow-cljs event tab exception

--- src/day8/re_frame_10x/view/components.cljs
+++ src/day8/re_frame_10x/view/components.cljs
@@ -7,7 +7,7 @@
             [day8.re-frame-10x.inlined-deps.reagent.v0v8v0.reagent.core :as r]
             [devtools.prefs]
             [devtools.formatters.core]
-            [react-highlight.js :as react-highlightjs]
+            ["react-highlight.js" :as react-highlightjs]
             ["highlight.js/lib/languages/clojure"])
   (:require-macros [day8.re-frame-10x.utils.macros :refer [with-cljs-devtools-prefs]]))

@@ -237,4 +237,8 @@
    :class (str "rft-tag noselect " class)
    :child [:span {:style {:margin "auto"}} label]])

-(def highlight (r/adapt-react-class react-highlightjs))
+;; shadow-cljs uses the react-highlight NPM package, whereas figwheel etc use a CLJSJS package. The CLJSJS package
+;; unfortunately incorrectly 'unwraps' the default export making the two incompatible. So we must check if we can
+;; use the default export first, otherwise use the ns directly.
+;; See: https://github.com/cljsjs/packages/blob/master/react-highlight/resources/main.js
+(def highlight (r/adapt-react-class (or react-highlightjs/default react-highlightjs)))


refactored code works as before

refactored code works as before

--- examples/lesson-carousel-starter-kit/src/carousel/core.cljs
+++ examples/lesson-carousel-starter-kit/src/carousel/core.cljs
@@ -196,14 +196,19 @@
         next-clicks (events->chan next-node "tap")

         pager-node (nth children 2)
-        node-to-box (into {}  (for [page-node (.. pager-node getChildren)
-                                    :let [box (FamousBox. (clj->js {:mass 100 :size [100 100 100]}))
-                                          anchor (Vec3. 1 0 0)
-                                          spring (Spring. nil box (clj->js {:period 0.5 :dampingRatio 0.5 :anchor anchor}))
-                                          quaternion (.. (Quaternion.) (fromEuler 0 (/ (.. js/Math -PI) -2) 0))
-                                          rotational-spring (RotationalSpring. nil box (clj->js {:period 1 :dampingRatio 0.2 :anchor quaternion}))
-                                          _ (.. simulation (add box spring rotational-spring))]]
-                                [page-node box]))
+        pages (.. pager-node getChildren)
+        node-to-physics (into {}  (for [page-node pages
+                                        :let [box (FamousBox. (clj->js {:mass 100 :size [100 100 100]}))
+                                              anchor (Vec3. 1 0 0)
+                                              spring (Spring. nil box (clj->js {:period 0.5 :dampingRatio 0.5 :anchor anchor}))
+                                              quaternion (.. (Quaternion.) (fromEuler 0 (/ (.. js/Math -PI) -2) 0))
+                                              rotational-spring (RotationalSpring. nil box (clj->js {:period 1 :dampingRatio 0.2 :anchor quaternion}))
+                                              _ (.. simulation (add box spring rotational-spring))]]
+                                    [page-node {:box box
+                                                :anchor anchor
+                                                :spring spring
+                                                :quaternion quaternion
+                                                :rotational-spring rotational-spring}]))

         dot-container-node (last children)
         dot-nodes (.. dot-container-node getChildren)
@@ -227,13 +232,24 @@
         _ (.. dot-container-node (addComponent resize))
         current-index (atom 0)]

-    ;; (add-watch current-index :watcher (fn [key atom old-index new-index]
-    ;;                                     (let [old-page (nth pages old-index)
-    ;;                                           new-page (nth pages new-index)]
-    ;;                                       (.. (:anchor old-page) (set 1 0 0))
-    ;;                                       (.. (:quaternion old-page) (fromEuler 0 (/ (.. js/Math -PI) -2) 0))
-    ;;                                       (.. (:anchor new-page) (set 0 0 0))
-    ;;                                       (.. (:quaternion new-page) (set 1 0 0 0)))))
+    (add-watch current-index :watcher (fn [key atom old-index new-index]
+                                        (let [old-page-node (nth pages old-index)
+                                              old-page-physics (node-to-physics old-page-node)
+
+                                              new-page-node (nth pages new-index)
+                                              new-page-physics (node-to-physics new-page-node)]
+                                          (if (< old-index new-index)
+                                            (do
+                                              (.. (:anchor old-page-physics) (set -1 0 0))
+                                              (.. (:quaternion old-page-physics) (fromEuler 0 (/ (.. js/Math -PI) 2) 0))
+                                              (.. (:anchor new-page-physics) (set 0 0 0))
+                                              (.. (:quaternion new-page-physics) (set 1 0 0 0)))
+                                            (do
+                                              (.. (:anchor old-page-physics) (set 1 0 0))
+                                              (.. (:quaternion old-page-physics) (fromEuler 0 (/ (.. js/Math -PI) -2) 0))
+                                              (.. (:anchor new-page-physics) (set 0 0 0))
+                                              (.. (:quaternion new-page-physics) (set 1 0 0 0))))))
+               )

     (go
       (while true
@@ -249,22 +265,20 @@
                                       )))))

-    ;; (.. FamousEngine (requestUpdate (clj->js {:onUpdate (fn [time]
-    ;;                                                       (.. simulation (update time))
-    ;;                                                       (doseq [page pages
-    ;;                                                               :let [physics-transform (.. simulation (getTransform (:box page)))
-    ;;                                                                     p (.. physics-transform -position)
-    ;;                                                                     r (.. physics-transform -rotation)
-    ;;                                                                     node (:node page)]]
-    ;;                                                         (.. node
-    ;;                                                             (setPosition (* 0 1446) 0 0)
-    ;;                                                             (setRotation (nth r 0) (nth r 1) (nth r 2) (nth r 3))
-    ;;                                                             )
-    ;;                                                         )
-
-    ;;                                                       (this-as this
-    ;;                                                                (.. FamousEngine (requestUpdateOnNextTick this)))
-    ;;                                                       )})))
+    (.. FamousEngine (requestUpdate (clj->js {:onUpdate (fn [time]
+                                                          (.. simulation (update time))
+                                                          (doseq [page-node pages
+                                                                  :let [physics (node-to-physics page-node)
+                                                                        physics-transform (.. simulation (getTransform (:box physics)))
+                                                                        p (.. physics-transform -position)
+                                                                        r (.. physics-transform -rotation)]]
+                                                            (.. page-node
+                                                                (setPosition (* 0 1446) 0 0)
+                                                                (setRotation (nth r 0) (nth r 1) (nth r 2) (nth r 3))))
+
+                                                          (this-as this
+                                                                   (.. FamousEngine (requestUpdateOnNextTick this)))
+                                                          )})))
     )

   )


Redirect to your organizations on join

Redirect to your organizations on join

--- src/cljs/elevent_client/pages/organizations/explore.cljs
+++ src/cljs/elevent_client/pages/organizations/explore.cljs
@@ -71,7 +71,9 @@
                         :create
                         (select-keys (merge (:user @state/session) organization)
                                      [:UserId :OrganizationId])
-                        callback
+                        #(do
+                           (callback)
+                           (js/location.assign (routes/organizations)))
                         callback))]]]])]
              [:p "No organizations found"])]
           [:div.ui.vertical.segment


CMR-773: Improved CMR handling of legacy additional attributes search to allow name parameter to appear later in the query string.

--- src/cmr/search/services/parameters/legacy_parameters.clj
+++ src/cmr/search/services/parameters/legacy_parameters.clj
@@ -123,8 +123,10 @@
   "Take a list of tuples created from a legacy query string and group them together as attributes"
   [big-list]
   (reduce (fn [results item]
-            (if (= :name (first item))
-              ;; Put current set on results and start a new current set
+            (if (or (= 0 (count results))
+                    (and (= :name (first item))
+                         (:name (last results))))
+              ;; We create a new set when the results is empty or a new name comes in
               (conj results (merge {} item))
               ;; Update the current set (last set on results)
               (update-in results [(dec (count results))] checked-merge item)))


Some reformatting

Some reformatting

--- parser/parser.clj
+++ parser/parser.clj
@@ -11,8 +11,10 @@

 (def symbol-to-string (symbol)
      (match symbol
-            (Symbol name _)  (Result name)
-            (List _ range)   (Error  (MalformedSymbolError range))))
+            (Symbol name _)
+                (Result name)
+            (List _ range)
+                (Error  (MalformedSymbolError range))))

 (typ type          (SimpleType           (list int32) range)
                    (ComplexType          (list int32) (list type) range)
@@ -74,12 +76,13 @@
 (def sexp-to-function-type (name parameters range)
      (match parameters
             (Cons (List arg-types _) (Cons return-type Empty))
-                    (result-flatmap (fn (arg-types)
-                    (result-map     (fn (return-type)
-                                        (FunctionType arg-types return-type range))
-                                    (sexp-to-type return-type)))
-                                    (sexp-to-types arg-types))
-            _   (Error (MalformedTypeError range))))
+                (result-flatmap (fn (arg-types)
+                (result-map     (fn (return-type)
+                                    (FunctionType arg-types return-type range))
+                                (sexp-to-type return-type)))
+                                (sexp-to-types arg-types))
+            _
+                (Error (MalformedTypeError range))))

 (def sexp-to-complex-or-function-type (name parameters range)
      (match (string-equal? name (fn-string))
@@ -89,9 +92,7 @@
 (def sexp-to-type (type)
      (match type
             (List (Cons (Symbol name _) parameters) range)
-                (sexp-to-complex-or-function-type name
-                                                  parameters
-                                                  range)
+                (sexp-to-complex-or-function-type name parameters range)
             (Symbol name range)
                 (Result (SimpleType name range))
             (List _ range)
@@ -130,9 +131,9 @@
 (def sexp-to-function-body (range rest)
      (match rest
             (Cons (List arguments _) (Cons expression Empty))
-                    (Result (Pair arguments expression))
+                (Result (Pair arguments expression))
             _
-                    (Error (MalformedExpressionError range))))
+                (Error (MalformedExpressionError range))))

 (def sexp-to-lambda (rest range)
      (result-flatmap (fn (body)
@@ -144,8 +145,7 @@
                  (sexp-to-function-body range rest)))

 (def sexp-to-function-application (range expressions)
-     ((pipe
-            (list-map sexp-to-expression)
+     ((pipe (list-map sexp-to-expression)
             result-of-list
             (result-map (fn (expressions)
                             (FunctionApplication expressions range))))


time achievements complete set

time achievements complete set

--- src-clj/acha/achievement.clj
+++ src-clj/acha/achievement.clj
@@ -230,12 +230,19 @@
          {:username (:author commit-info)
           :time time})))])

-; TODO date achievements
-
 (def time-get
   [:time-get
    (fn [commit-info]
-     nil)])
+     (let [time (:time commit-info)
+           timezone (:timezone commit-info)
+           cal (Calendar/getInstance)
+           _ (.setTime cal time)
+           _ (.setTimeZone cal timezone)
+           commit-minute (.get cal Calendar/MINUTE)
+           commit-hour (.get cal Calendar/HOUR_OF_DAY)]
+       (when (and (= commit-hour 0) (= commit-minute 0))
+         {:username (:author commit-info)
+          :time time})))])

 (def mover
   [:mover


Ditto

Ditto

--- src/clojure/clojurewerkz/cassaforte/utils.clj
+++ src/clojure/clojurewerkz/cassaforte/utils.clj
@@ -1,3 +1,12 @@
+;; Copyright (c) 2012-2014 Michael S. Klishin, Alex Petrov, and the ClojureWerkz Team
+;;
+;; The use and distribution terms for this software are covered by the
+;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;; which can be found in the file epl-v10.html at the root of this distribution.
+;; By using this software in any fashion, you are agreeing to be bound by
+;; the terms of this license.
+;; You must not remove this notice, or any other, from this software.
+
 (ns clojurewerkz.cassaforte.utils
   (:require [clojurewerkz.cassaforte.cql :refer :all]))


Add :unsolved-single option to knock-off-chip-off-the-old-block

--- src/clojush/pushgp/selection/preselection.clj
+++ src/clojush/pushgp/selection/preselection.clj
@@ -85,7 +85,8 @@
   is :unsolved, then the remainder are interpreted as above, but only errors
   that are not solved for a given individual are considered in the filtering.
   If it is :unsolved-subset, then only a random subset of those considered
-  with :unsolved will be considered. If the first item in
+  with :unsolved will be considered. If it is :unsolved-single, then only
+  a random single such error. If the first item in
   (:knock-off-chip-off-the-old-block argmap) is :min2, then the remainder are
   interpreted as above, but the minimum for random values is 2 rather than 1."
   [pop argmap]
@@ -100,8 +101,10 @@
               min2? (= :min2 (first knock-spec))
               knock-spec (if min2? (rest knock-spec) knock-spec)
               unsolved? (or (= :unsolved (first knock-spec))
-                            (= :unsolved-subset (first knock-spec)))
+                            (= :unsolved-subset (first knock-spec))
+                            (= :unsolved-single (first knock-spec)))
               subset? (= :unsolved-subset (first knock-spec))
+              single? (= :unsolved-single (first knock-spec))
               knock-spec (if unsolved? (rest knock-spec) knock-spec)
               filtered-history
               (if unsolved?
@@ -121,6 +124,15 @@
                                       keep-indices (cons (first keep-indices)
                                                          (take (rand-int (count keep-indices))
                                                                (rest keep-indices)))]
+                                  (for [i (range (count keep?))]
+                                    (some #{i} keep-indices)))
+                                keep?)
+                        keep? (if single?
+                                (let [keep-indices
+                                      (take 1 (shuffle (filter identity
+                                                               (map (fn [k i] (if k i nil))
+                                                                    keep?
+                                                                    (iterate inc 0)))))]
                                   (for [i (range (count keep?))]
                                     (some #{i} keep-indices)))
                                 keep?)]


added confesar

added confesar

--- src/babel/espanol/lexicon.clj
+++ src/babel/espanol/lexicon.clj
@@ -95,6 +95,11 @@

    "comprender" {:synsem {:cat :verb
                           :sem {:pred :understand-deeply}}}
+
+   "confesar" {:espanol {:boot-stem1 "confies"
+                        :boot-stem2 "confes"}
+             :synsem {:cat :verb
+                      :sem {:pred :confess}}}

    "conservar" [{:synsem {:cat :verb
                           :sem {:pred :conserve}}}


Reactor attribute-provided?

Reactor attribute-provided?

--- src/com/wsscode/pathom/connect/run_graph.cljc
+++ src/com/wsscode/pathom/connect/run_graph.cljc
@@ -224,6 +224,11 @@
             (compute-root-or env {::node-id (::root out)}))
         <>))))

+(defn attribute-provided?
+  "Check if the given attr is provided by the out root."
+  [{::keys [root] :as out} attr]
+  (and root (contains? (::provides (get-root-node out)) attr)))
+
 (defn compute-run-graph*
   ([out
     {::eql/keys                       [query]
@@ -233,15 +238,15 @@
      (fn [{::keys [root] :as out} attr]
        (let [env (assoc env pc-attr attr)]
          (if (contains? index-oir attr)
-           ; inputs loop
-           (if (and root (contains? (::provides (get-root-node out)) attr))
+           (if (attribute-provided? out attr)
              (update-in out [::nodes root ::requires] merge-io {attr {}})
-             (let [new-node (as-> (dissoc out ::root) <>
-                              (reduce-kv
-                                (fn [out inputs resolvers]
-                                  (resolver-input-paths out env inputs resolvers))
-                                <>
-                                (get index-oir attr)))]
+             (let [new-node
+                   (as-> (dissoc out ::root) <>
+                     (reduce-kv
+                       (fn [out inputs resolvers]
+                         (resolver-input-paths out env inputs resolvers))
+                       <>
+                       (get index-oir attr)))]
                (if (::root new-node)
                  (compute-root-and new-node env {::node-id root})
                  (assoc new-node ::root root))))


able to analyze 1st person singular present

--- src/babel/francais/morphology.clj
+++ src/babel/francais/morphology.clj
@@ -521,9 +521,29 @@
    The function tries to analyze the surface form into a lexical form, and then
    looks up the hypothesized lexeme using lookup-fn."
   (cond
-   (= surface-form "parle")
-   (get lexicon "parler")
+
+   (re-find #"e$" surface-form)
+   (concat
+
+    ;; -er type verb
+    (map (fn [lexeme]
+           (unifyc
+            lexeme
+            {:synsem {:subcat {:1 {:agr {:number :sing
+                                         :person :1st}}}
+                      :infl :present}}))
+         (get lexicon (string/replace surface-form #"(e)$" "$1r")))
+
+    ;; -ir type verb
+    (map (fn [lexeme]
+           (unifyc
+            lexeme
+            {:synsem {:subcat {:1 {:agr {:number :sing
+                                         :person :1st}}}
+                      :infl :present}}))
+         (get lexicon (string/replace surface-form #"(e)$" "ir")))
+
+    (get lexicon surface-form))
+
    true
    (get lexicon surface-form)))
-
-