CMR-8554-2 Remove CMR Client Developer Forum Links from API Docs (#1661)

* CMR-8554 Removing references to  CMR Client Developer Forum

* CMR-8554 Removed CMR CDF reference

Co-authored-by: drewpesall <b4a367ba5e1ffb785616379a419018db148a6d7b@nasa.gov>

--- search-app/src/cmr/search/api/concepts_search.clj
+++ search-app/src/cmr/search/api/concepts_search.clj
@@ -152,10 +152,8 @@
                      "collections. To help optimize your search, you should limit your "
                      "query using conditions that identify one or more collections, "
                      "such as provider, provider_id, concept_id, collection_concept_id, "
-                     "short_name, version or entry_title. Visit the CMR Client Developer "
-                     "Forum at https://wiki.earthdata.nasa.gov/display/CMR/"
-                     "Granule+Queries+Now+Require+Collection+Identifiers for more "
-                     "information, and for any questions please contact "
+                     "short_name, version or entry_title. "
+                     "For any questions please contact "
                      (common-app-config/cmr-support-email) ".")]
     (when (reject-all-granule-query? headers)
       (svc-errors/throw-service-error :bad-request err-msg))))


Small bug fix - when an enemy shoots, a vector of the enemy and its bullet is created. When this it the last enemy the wave re-spawns, as :enemy? fails for the vector and it is not counted.

--- desktop/src-common/ds3/main_screen.clj
+++ desktop/src-common/ds3/main_screen.clj
@@ -49,6 +49,7 @@
                  (step! screen)
                  (check-for-input screen)
                  (handle-all-entities screen)
+                 (flatten);This is here because when an enemy shoots for one frame it's not a map where :enemy? is true
                  (check-game-status screen)
                  (sort-by :render-layer)
                  (render! screen))]
@@ -126,7 +127,7 @@
             y (:y ship)]
         ;(prn :x x :y y)
         (update! screen :fire-when-ready false)
-        (add-timer! screen :refresh-shot 0.075);0.2
+        (add-timer! screen :refresh-shot 0.2)
         (conj entities (bullet/create-bullet! screen x (+ 0.1 y))))
       entities)
     :else entities


Pull org-finding logic out of rendering component

--- src-cljs/frontend/components/pieces/org_picker.cljs
+++ src-cljs/frontend/components/pieces/org_picker.cljs
@@ -53,53 +53,40 @@
            "github" [:i.octicon.octicon-mark-github]
            "bitbucket" [:i.fa.fa-bitbucket])]])]))

-(defn org-picker-without-bitbucket [params owner]
+(defn org-picker-without-bitbucket [{:keys [orgs user selected-org]} owner]
   (reify
     om/IDisplayName (display-name [_] "Organization Listing")
     om/IRender
     (render [_]
-      (let [{:keys [user selected-org repos]} params]
-        (html
-         [:div
-          [:div.overview
-           [:span.big-number "1"]
-           [:div.instruction "Choose a GitHub account that you are a member of or have access to."]]
-          [:div.organizations
-           [:h4 "Your accounts"]
-           [:ul.organizations
-            ;; here we display you, then all of your organizations, then all of the owners of
-            ;; repos that aren't organizations and aren't you. We do it this way because the
-            ;; organizations route is much faster than the repos route. We show them
-            ;; in this order (rather than e.g. putting the whole thing into a set)
-            ;; so that new ones don't jump up in the middle as they're loaded.
-            (let [org-names (->> user :organizations (map :login) set)
-                  in-orgs? (comp org-names :login)]
-              (->> repos
-                   (map :owner)
-                   (remove in-orgs?)
-                   set
-                   (concat (->> user :organizations (sort-by :org)))
-                   (filter vcs-github?)
-                   (map (fn [org] (organization org selected-org owner)))))]
-           (when (get-in user [:repos-loading :github])
-             [:div.orgs-loading
-              [:div.loading-spinner common/spinner]])
-           (missing-org-info owner)]])))))
+      (html
+       [:div
+        [:div.overview
+         [:span.big-number "1"]
+         [:div.instruction "Choose a GitHub account that you are a member of or have access to."]]
+        [:div.organizations
+         [:h4 "Your accounts"]
+         [:ul.organizations
+          (->> orgs
+               (filter vcs-github?)
+               (map (fn [org] (organization org selected-org owner))))]
+         (when (get-in user [:repos-loading :github])
+           [:div.orgs-loading
+            [:div.loading-spinner common/spinner]])
+         (missing-org-info owner)]]))))

-(defn org-picker-with-bitbucket [params owner]
+(defn org-picker-with-bitbucket [{:keys [orgs user selected-org tab]} owner]
   (reify
     om/IDisplayName (display-name [_] "Organization Listing")
     om/IRender
     (render [_]
-      (let [{:keys [user selected-org repos tab]} params
-            github-authorized? (user-model/github-authorized? user)
+      (let [github-authorized? (user-model/github-authorized? user)
             bitbucket-authorized? (user-model/bitbucket-authorized? user)
-            vcs-type (cond
-                       tab tab
-                       github-authorized? "github"
-                       :else "bitbucket")
-            github-active? (= "github" vcs-type)
-            bitbucket-active? (= "bitbucket" vcs-type)]
+            selected-vcs-type (cond
+                                tab tab
+                                github-authorized? "github"
+                                :else "bitbucket")
+            github-active? (= "github" selected-vcs-type)
+            bitbucket-active? (= "bitbucket" selected-vcs-type)]
         (html
          [:div
           [:div.overview
@@ -111,7 +98,7 @@
                                          {:name "bitbucket"
                                           :icon (html [:i.fa.fa-bitbucket])
                                           :label "Bitbucket"}]
-                                  :selected-tab-name vcs-type
+                                  :selected-tab-name selected-vcs-type
                                   :on-tab-click #(navigate! owner (routes/v1-add-projects-path {:_fragment %}))})
           [:div.organizations.card
            (when github-active?
@@ -121,7 +108,7 @@
                 [:p "GitHub is not connected to your account yet. To connect it, click the button below:"]
                 [:a.btn.btn-primary {:href (gh-utils/auth-url)
                                      :on-click #((om/get-shared owner :track-event) {:event-type :authorize-vcs-clicked
-                                                                                :properties {:vcs-type vcs-type}})}
+                                                                                :properties {:vcs-type selected-vcs-type}})}
                  "Authorize with GitHub"]]))
            (when (and bitbucket-active?
                       (not bitbucket-authorized?))
@@ -129,28 +116,13 @@
               [:p "Bitbucket is not connected to your account yet. To connect it, click the button below:"]
               [:a.btn.btn-primary {:href (bitbucket/auth-url)
                                    :on-click #((om/get-shared owner :track-event) {:event-type :authorize-vcs-clicked
-                                                                                :properties {:vcs-type vcs-type}})}
+                                                                                :properties {:vcs-type selected-vcs-type}})}
                "Authorize with Bitbucket"]])
            [:ul.organizations
-            ;; here we display you, then all of your organizations, then all of the owners of
-            ;; repos that aren't organizations and aren't you. We do it this way because the
-            ;; organizations route is much faster than the repos route. We show them
-            ;; in this order (rather than e.g. putting the whole thing into a set)
-            ;; so that new ones don't jump up in the middle as they're loaded.
-            (let [user-org-keys (->> user
-                                     :organizations
-                                     (map (juxt :vcs_type :login))
-                                     set)
-                  user-org? (comp user-org-keys (juxt :vcs_type :login))
-                  all-orgs (concat (sort-by :org (:organizations user))
-                                   (->> repos
-                                        (map (fn [{:keys [owner vcs_type]}] (assoc owner :vcs_type vcs-type)))
-                                        (remove user-org?)
-                                        distinct))]
-              (->> all-orgs
-                   (filter (partial select-vcs-type vcs-type))
-                   (map (fn [org] (organization org selected-org owner)))))]
-           (when (get-in user [:repos-loading (keyword vcs-type)])
+            (->> orgs
+                 (filter (partial select-vcs-type selected-vcs-type))
+                 (map (fn [org] (organization org selected-org owner))))]
+           (when (get-in user [:repos-loading (keyword selected-vcs-type)])
              [:div.orgs-loading
               [:div.loading-spinner common/spinner]])]])))))

@@ -167,11 +139,30 @@
   :selected-org - The currently selected org.
   :tab          - (optional) The VCS tab to display (\"github\" or \"bitbucket\").
                   Defaults to \"github\"."
-  [{:keys [user] :as params} owner]
+  [{:keys [user selected-org repos tab] :as params} owner]
   (reify
     om/IRender
     (render [_]
-      (om/build (if (vcs-utils/bitbucket-enabled? user)
-                  org-picker-with-bitbucket
-                  org-picker-without-bitbucket)
-                params))))
+      ;; We display you, then all of your organizations, then all of the owners of
+      ;; repos that aren't organizations and aren't you. We do it this way because the
+      ;; organizations route is much faster than the repos route. We show them
+      ;; in this order (rather than e.g. putting the whole thing into a set)
+      ;; so that new ones don't jump up in the middle as they're loaded.
+      (let [user-org-keys (->> user
+                               :organizations
+                               (map (juxt :vcs_type :login))
+                               set)
+            user-org? (comp user-org-keys (juxt :vcs_type :login))
+            orgs (concat (sort-by :org (:organizations user))
+                         (->> repos
+                              (map (fn [{:keys [owner vcs_type]}] (assoc owner :vcs_type vcs_type)))
+                              (remove user-org?)
+                              distinct))]
+        (if (vcs-utils/bitbucket-enabled? user)
+          (om/build org-picker-with-bitbucket {:orgs orgs
+                                               :user user
+                                               :selected-org selected-org
+                                               :tab tab})
+          (om/build org-picker-without-bitbucket {:orgs orgs
+                                                  :user user
+                                                  :selected-org selected-org}))))))


Resurrected entity upload form.

Resurrected entity upload form.

I lost it in a merge conflict, but found it in the reflog thanks to
@annapawlicka.

--- src-cljs/kixi/hecuba/tabs/hierarchy/properties.cljs
+++ src-cljs/kixi/hecuba/tabs/hierarchy/properties.cljs
@@ -37,6 +37,12 @@

      (html
       [:div
+       [:div
+        [:h3 "Upload Properties"]
+        (let [div-id "properties-upload-form"]
+          (om/build (file/file-upload (str "/4/projects/" project_id "/entities/")
+                                      div-id)
+                    nil {:opts {:method "POST"}}))]
        [:h3 "Add new property"]
        [:form.form-horizontal {:role "form"}
         [:div.col-md-6


Renamed parameter

Renamed parameter

--- src/clj/puppetlabs/master/certificate_authority.clj
+++ src/clj/puppetlabs/master/certificate_authority.clj
@@ -200,22 +200,22 @@
   "Given the SSL directory file paths, master certname, and CA information,
   generate and write to disk all of the necessary SSL files for the master.
   Any existing files will be replaced."
-  [master-settings :- MasterSettings
+  [settings :- MasterSettings
    master-certname :- String
    ca-name :- String
    ca-private-key :- (schema/pred utils/private-key?)
    ca-cert :- (schema/pred utils/certificate?)
    keylength :- schema/Int
    serial-number-file :- String]
-  {:post [(files-exist? (settings->master-dir-paths master-settings))]}
+  {:post [(files-exist? (settings->master-dir-paths settings))]}
   ;; TODO: straighten out the let mess
-  (let [ssldir-file-paths (settings->master-dir-paths master-settings)]
+  (let [ssldir-file-paths (settings->master-dir-paths settings)]
     (log/debug (str "Initializing SSL for the Master; file paths:\n"
                     (ks/pprint-to-string ssldir-file-paths)))
     (create-parent-directories! (vals ssldir-file-paths))
     (-> ssldir-file-paths :certdir fs/file ks/mkdirs!)
     (-> ssldir-file-paths :requestdir fs/file ks/mkdirs!)
-    (let [extensions (create-master-extensions-list master-settings master-certname)
+    (let [extensions (create-master-extensions-list settings master-certname)
           keypair (utils/generate-key-pair keylength)
           public-key (utils/get-public-key keypair)
           private-key (utils/get-private-key keypair)


Create ceilingbounce directory for test results

--- src/clojure/com/flashlightdb/ceilingbounce/main.clj
+++ src/clojure/com/flashlightdb/ceilingbounce/main.clj
@@ -23,6 +23,7 @@
              [android.app
               Activity
               Notification]
+             java.io.File
              neko.App))

@@ -40,18 +41,20 @@
               ~@body)))

 (defn do-nothing [])
+(def storage-dir "/storage/emulated/0/ceilingbounce/")

 (defn ^{:dynamic true} runtime-test [_evt]
   (ui/config (find-view (*a :main)
                         ::runtime-test)
-            :text "Test starting..."
+            :text "Test starting, please wait..."
             :on-click do-nothing)
+  (.mkdirs (File. storage-dir))
   (Thread/sleep 30000)
   (let [start-time (. System nanoTime)
         activity (*a :main)
         filename (.getText (find-view activity
                                       ::filename))
-        path (str "/storage/emulated/0/scratch/" filename "." start-time)
+        path (str storage-dir filename "." start-time)
         output (atom [])
         write-csv (fn [output-value]
                     (with-open [out-file (io/writer (str path ".csv"))]


clean up unused code

clean up unused code

--- src/cljs/conference_rating/conference_list_page/conference_list_entry.cljs
+++ src/cljs/conference_rating/conference_list_page/conference_list_entry.cljs
@@ -1,35 +1,6 @@
 (ns conference-rating.conference-list-page.conference-list-entry
   (:require [conference-rating.view-utils.panel :as panel]
             [conference-rating.util :as util]))
-
-(def aggregated-ratings
-  {:aggregated-ratings {:number-of-ratings 2
-                        :recommendations 1
-                        :overall {:avg 4 :count 2}
-                        :talks {:avg 4 :count 2}
-                        :venue {:avg 2.5 :count 2}
-                        :community {:avg 4.5 :count 2}
-                        :roles {:dev 2
-                                :devops 2
-                                :ux 2
-                                :qa 1
-                                :ba 1
-                                :pm 1
-                                :sales 1
-                                :recruting 1
-                                :other 1}
-                        :experience {
-                                     :rookie 1
-                                     :beginner 3
-                                     :intermediate 12
-                                     :advanced 5
-                                     :expert 0}
-                        :tags {
-                               :inspiring 2
-                               :entertaining 2
-                               :learning 2
-                               :potential-hires 1
-                               :potential-clients 1}}})

 (defn series-tag [series-tag]
   (if (not (nil? series-tag))


Squash - rule tuning

Squash - rule tuning

--- resources/rules/_1_post_identifier_merge/step_h_ice_to_bio/step_hd_bioentity_linking/instance_based_kr/drugbank/step_b/drugbank_drug_protein_target_relation_instance_based.clj
+++ resources/rules/_1_post_identifier_merge/step_h_ice_to_bio/step_hd_bioentity_linking/instance_based_kr/drugbank/step_b/drugbank_drug_protein_target_relation_instance_based.clj
@@ -5,8 +5,8 @@
   :description   "This rule generates bio-representations for the drug-target relationships cataloged by DrugBank where the target is a protein"
   :head          (
                    (?/interaction rdfs/subClassOf ccp/temp_drugbank_interaction)
-                   (?/interaction ccp/temp_drug_participant ?drug_instance)
-                   (?/interaction ccp/temp_target_participant ?target_instance)
+                   (?/interaction ccp/temp_drug_participant ?/drug_instance)
+                   (?/interaction ccp/temp_target_participant ?/target_instance)

                    ;; create an interaction as instances of both direct binding and binding
                    (?/interaction rdf/type ?/direct_interaction) ; MI:direct interaction


Make test work with proper namespaces

Make test work with proper namespaces

--- test/rill/event_store/atom_store/event_test.clj
+++ test/rill/event_store/atom_store/event_test.clj
@@ -1,5 +1,6 @@
 (ns rill.event-store.atom-store.event-test
   (:require [rill.event-store.atom-store.event :as event]
+            [rill.temp-store :refer [message=]]
             [rill.message :as message :refer [defevent]]
             [rill.uuid :refer [new-id]]
             [schema.core :as s]
@@ -11,6 +12,6 @@
 (def my-event (my-serializable-event (new-id)))

 (deftest serializable-events?
-  (is (string? (:edn (:data (event->entry my-event)))))
-  (is (= (entry->event (event->entry my-event))
+  (is (string? (:edn (:data (event/event->entry my-event)))))
+  (is (message= (event/entry->event (event/event->entry my-event))
          my-event)))


stickers panel animation with native driver

--- src/status_im/ui/screens/chat/stickers/views.cljs
+++ src/status_im/ui/screens/chat/stickers/views.cljs
@@ -110,9 +110,11 @@
   [bottom-anim-value alpha-value]
   (anim/start
    (anim/parallel
-    [(anim/spring bottom-anim-value {:toValue (styles/stickers-panel-height)})
+    [(anim/spring bottom-anim-value {:toValue 0
+                                     :useNativeDriver true})
      (anim/timing alpha-value {:toValue  1
-                               :duration 500})])))
+                               :duration 500
+                               :useNativeDriver true})])))

 (defview scroll-indicator []
   (letsubs [window-width [:dimensions/window-width]]
@@ -123,15 +125,12 @@
 (defview stickers-view []
   (letsubs [selected-pack   [:stickers/selected-pack]
             installed-packs [:stickers/installed-packs-vals]
-            input-focused?   [:chats/current-chat-ui-prop :input-focused?]
-            bottom-anim-value  (anim/create-value 0)
+            bottom-anim-value  (anim/create-value (styles/stickers-panel-height))
             alpha-value        (anim/create-value 0)]
-    {:component-will-mount #(if (not input-focused?)
-                              (show-panel-anim bottom-anim-value alpha-value)
-                              (do
-                                (anim/set-value bottom-anim-value (styles/stickers-panel-height))
-                                (anim/set-value alpha-value 1)))}
-    [react/animated-view {:style {:background-color :white :height (if input-focused? 0 bottom-anim-value)
+    {:component-will-mount #(show-panel-anim bottom-anim-value alpha-value)}
+    [react/animated-view {:style {:background-color :white
+                                  :height           (styles/stickers-panel-height)
+                                  :transform        [{:translateY bottom-anim-value}]
                                   :opacity          alpha-value}}
      (cond
        (= selected-pack :recent) [stickers-paging-panel installed-packs selected-pack]


figwheel.main: improve misspelled cli flag suggestions

--- figwheel-main/src/figwheel/main/schema/cli.clj
+++ figwheel-main/src/figwheel/main/schema/cli.clj
@@ -112,10 +112,10 @@
   (file-exists? (str b ".cljs.edn")))

 (exp/def ::not-end-with-cljs-edn #(not (string/ends-with? % ".cljs.edn"))
-  "should not end with .cljs.edn as this is already implied")
+  "should not end with .cljs.edn as this is already implied\n(this should be maria if you have a maria.cljs.edn file)")

 (exp/def ::build-exists build-exists?
-  "should be a build file in the current directory that ends with .cljs.edn")
+  "should indicate a build file in the current directory\n(this should be marko if you have a marko.cljs.edn file)")

 (exp/def ::directory-exists directory-exists?
   "should be an existing directory relative to the current directory")
@@ -341,32 +341,49 @@
 (defn add-problem-types [expd]
   (update expd ::s/problems #(mapv (partial add-problem-type expd) %)))

-#_(remove-ns 'figwheel.main.schema.cli)
-
 (defn similar-flags [f]
   (let [all-flags (filter some?
                           (concat (keys (:main-dispatch cljs.cli/default-commands))
-                                  (keys (:init-dispatch cljs.cli/default-commands))))]
-    (not-empty
-     (cond
-       (string/starts-with? f "--")
-       ((spell/likely-misspelled (into #{}
-                                       (filter #(string/starts-with? % "--"))
-                                       all-flags))
-        f)
-       (and (string/starts-with? f "-") (> (count f) 4))
-       ((spell/likely-misspelled (into #{}
-                                       (filter #(string/starts-with? % "--"))
-                                       all-flags))
-          (str "-" f))
-       :else
-       (binding [spell/*length->threshold* (fn [_] 1)]
-         ((spell/likely-misspelled (into #{}
-                                         (comp
-                                          (filter #(> (count %) 2))
-                                          (filter #(re-matches #"-[^-].*" %)))
-                                         all-flags))
-          f))))))
+                                  (keys (:init-dispatch cljs.cli/default-commands))))
+        long-flags (into #{}
+                         (filter #(string/starts-with? % "--"))
+                         all-flags)
+        short-flags (set (filter #(re-matches #"-[^-].*" %) all-flags))
+        similar-short-flags
+        (fn [flag] (binding [spell/*length->threshold* (fn [_] 1)]
+                     ((spell/likely-misspelled (into #{}
+                                                     (filter #(> (count %) 2))
+                                                     short-flags))
+                      flag)))
+        similar-long-flags #((spell/likely-misspelled long-flags) %)]
+    (when-let [result
+               (cond
+                 ;; catch common mistake of providing a -- for - arg
+                 (and (string/starts-with? f "--")
+                      (<= (count f) 5))
+                 (let [flag' (subs f 1)]
+                   (if-let [flag (short-flags flag')]
+                     [flag]
+                     (similar-short-flags flag')))
+
+                 ;; catch common mistake of providing a - for -- arg
+                 (and (re-matches #"-[^-].*" f) (> (count f) 4))
+                 (let [flag' (str "-" f)]
+                   (if-let [flag (long-flags flag')]
+                     [flag]
+                     (similar-long-flags flag')))
+
+                 ;; misspelled -- arg
+                 (string/starts-with? f "--")
+                 (similar-long-flags f)
+
+                 ;; misspelled - arg
+                 :else
+                 (similar-short-flags f))]
+      (not-empty result))))
+
+#_(similar-flags "--cd")
+

 (defmulti update-problem (fn [expd p] (:expound.spec.problem/type p)))


CMR-1030: Refactored to collapse tests into 'are' blocks.

--- system-int-test/test/cmr/system_int_test/admin/cache_api_test.clj
+++ system-int-test/test/cmr/system_int_test/admin/cache_api_test.clj
@@ -60,13 +60,9 @@
     (json/decode (:body response) true)))

 (deftest cache-apis
-  ;; needed to remove any caching from previous tests
-  ;(ingest/clear-caches)
-  ;; grant permission and ingest a collection to give us some cached data
-  ;; grant read permission to group "admin-read-group-guid"
   (e/grant-group-admin "admin-read-group-guid" :read)
   ;; login as a member of group 1
- 	(let [admin-read-token (e/login "admin" ["admin-read-group-guid"])
+  (let [admin-read-token (e/login "admin" ["admin-read-group-guid"])
         normal-user-token (e/login "user")
         coll1 (d/ingest "PROV1" (dc/collection {:entry-title "coll1"}))]
     (testing "list caches"
@@ -85,45 +81,20 @@
                                          "token-sid"
                                          "xsl-transformer-templates"]))

-    (testing "normal user cannot retrieve cache list from indexer"
-      (let [response (client/request {:url (url/indexer-read-caches-url)
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache list from index-set"
-      (let [response (client/request {:url (url/index-set-read-caches-url)
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache list from metadata-db"
-      (let [response (client/request {:url (url/mdb-read-caches-url)
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache list from search"
-      (let [response (client/request {:url (url/search-read-caches-url)
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
+    (testing "normal user cannot access cache list API"
+      (are [url]
+           (let [response (client/request {:url url
+                                           :method :get
+                                           :query-params {:token normal-user-token}
+                                           :connection-manager (url/conn-mgr)
+                                           :throw-exceptions false})
+                 errors (:errors (json/decode (:body response) true))]
+             (is (= 401 (:status response)))
+             (is (= ["You do not have permission to perform that action."] errors)))
+           (url/indexer-read-caches-url)
+           (url/index-set-read-caches-url)
+           (url/mdb-read-caches-url)
+           (url/search-read-caches-url)))

     (testing "retrieval of keys for non-existent cache results in a 404"
       (let [response (client/request {:url (str (url/indexer-read-caches-url) "/INVALID-CACHE-ABC")
@@ -134,45 +105,20 @@
         (is (= 404 (:status response)))
         (is (= "Not Found" (:body response)))))

-    (testing "normal user cannot retrieve cache keys from indexer"
-      (let [response (client/request {:url (str (url/indexer-read-caches-url) "/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache keys from index-set"
-      (let [response (client/request {:url (str (url/index-set-read-caches-url) "/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache keys from metadata-db"
-      (let [response (client/request {:url (str (url/mdb-read-caches-url) "/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache keys from search"
-      (let [response (client/request {:url (str (url/search-read-caches-url) "/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
+    (testing "normal user cannot retrieve cache keys"
+      (are [url]
+           (let [response (client/request {:url url
+                                           :method :get
+                                           :query-params {:token normal-user-token}
+                                           :connection-manager (url/conn-mgr)
+                                           :throw-exceptions false})
+                 errors (:errors (json/decode (:body response) true))]
+             (is (= 401 (:status response)))
+             (is (= ["You do not have permission to perform that action."] errors)))
+           (str (url/indexer-read-caches-url) "/acls")
+           (str (url/index-set-read-caches-url) "/acls")
+           (str (url/mdb-read-caches-url) "/acls")
+           (str (url/search-read-caches-url) "/acls")))

     (testing "list cache keys"
       (are [url cache cache-keys]
@@ -196,45 +142,20 @@
            (url/search-read-caches-url) "xsl-transformer-templates" []))

-    (testing "normal user cannot retrieve cache values from indexer"
-      (let [response (client/request {:url (str (url/indexer-read-caches-url) "/acls/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache values from index-set"
-      (let [response (client/request {:url (str (url/index-set-read-caches-url) "/acls/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache values from metadata-db"
-      (let [response (client/request {:url (str (url/mdb-read-caches-url) "/acls/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
-
-    (testing "normal user cannot retrieve cache values from search"
-      (let [response (client/request {:url (str (url/search-read-caches-url) "/acls/acls")
-                                      :method :get
-                                      :query-params {:token normal-user-token}
-                                      :connection-manager (url/conn-mgr)
-                                      :throw-exceptions false})
-            errors (:errors (json/decode (:body response) true))]
-        (is (= 401 (:status response)))
-        (is (= ["You do not have permission to perform that action."] errors))))
+    (testing "normal user cannot retrieve cache values"
+      (are [url]
+           (let [response (client/request {:url url
+                                           :method :get
+                                           :query-params {:token normal-user-token}
+                                           :connection-manager (url/conn-mgr)
+                                           :throw-exceptions false})
+                 errors (:errors (json/decode (:body response) true))]
+             (is (= 401 (:status response)))
+             (is (= ["You do not have permission to perform that action."] errors)))
+           (str (url/indexer-read-caches-url) "/acls/acls")
+           (str (url/index-set-read-caches-url) "/acls/acls")
+           (str (url/mdb-read-caches-url) "/acls/acls")
+           (str (url/search-read-caches-url) "/acls/acls")))

     (testing "retrieval of value for non-existent key results in a 404"
       (let [response (client/request {:url (str (url/indexer-read-caches-url)


Don't log kv pairs in korma form that have empty keys

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -193,7 +193,10 @@
        (u/format-color 'green "\nKORMA FORM: 😋\n%s" (u/pprint-to-str (walk/postwalk (fn [x] (if (keyword? x)
                                                                                (keyword (name x)) ; strip ns qualifiers, e.g. (keyword (name :korma.sql.utils/func)) -> :func
                                                                                x))
-                                                                                (dissoc korma-form :db :ent :from :options :aliases :results :type :alias)))))
+                                                                                (into {} (for [[k v] (dissoc korma-form :db :ent :from :options :aliases :results :type :alias)
+                                                                                :when (or (not (sequential? v))
+                                                                                (seq v))] ; remove keys where values are just []
+                                                                                {k v}))))))
       (try
         (log/debug
          (u/format-color 'blue "\nSQL: 😈\n%s\n" (-> (k/as-sql korma-form)


Fix some grammar and punctuation.

Fix some grammar and punctuation.

--- test/clojure_the_language/clojure_numerics_test.clj
+++ test/clojure_the_language/clojure_numerics_test.clj
@@ -194,7 +194,7 @@
 ;;;     -----------------------------------------------

-(fact "Two numbers of the same type and with equivalent value are equal with ="
+(fact "Two numbers of the same type and with equivalent value are equal using `=`"
   (fact (= 2 2)                       => true)
   (fact (= 2N 2N)                     => true)
   (fact (= 2/3 2/3)                   => true)
@@ -203,12 +203,12 @@
   (fact (= 2.0 2.0)                   => true)
   (fact (= (Float. 2.0) (Float. 2.0)) => true))

-(fact "Two numbers of the same category and with equivalent value are equal with ="
+(fact "Two numbers of the same category and with equivalent value are equal using `=`"
   (fact (= 2   2N)           => true)
   (fact (= 2M  2.0M)         => true)
   (fact (= 2.0 (Float. 2.0)) => true))

-(fact "Two numbers of different categories are not equal with ="
+(fact "Two numbers of different categories are not equal using `=`"
   (fact (= 2    2M)            => false)
   (fact (= 2    2.0M)          => false)
   (fact (= 2    2.0)           => false)


Made tag cloud items not overlap.

Made tag cloud items not overlap.

Fo' shizzle this time, tho.

--- lambda-blog/src/lambda_blog/templates/tags.clj
+++ lambda-blog/src/lambda_blog/templates/tags.clj
@@ -22,13 +22,12 @@
                                (vector %))))
         total (apply max (map second counts))]
     (text-centered
-     (ul {:class :list-inline
-          :style (format "line-height: %s%%;" (int max-size))}
+     (ul {:class :list-inline}
          (map (fn [[t c]]
                 (li (a {:class :tag
                         :href (pathcat path-to-root (:path t))}
                        (span {:class [:label :label-info]
-                              :style (format "font-size: %s%%;"
+                              :style (format "font-size: %s%%; display: block; margin: 2px;"
                                              (int (+ min-size
                                                      (* (- max-size min-size)
                                                         (/ c total)))))}


Set proper default flags on workspace.

Set proper default flags on workspace.

And don't reset them on page change.

--- frontend/src/uxbox/main/data/workspace.cljs
+++ frontend/src/uxbox/main/data/workspace.cljs
@@ -49,14 +49,12 @@
 (defrecord Initialize [project-id page-id]
   ptk/UpdateEvent
   (update [_ state]
-    (let [default-flags #{:sitemap :drawtools :layers :element-options :rules}
-          default-flags #{:document-history}]
+    (let [default-flags #{:sitemap :drawtools :layers :element-options :rules}]
       (if (:workspace state)
         (update state :workspace merge
                 {:project project-id
                  :page page-id
                  :selected #{}
-                 ;; :flags default-flags
                  :drawing nil
                  :drawing-tool nil
                  :tooltip nil})


Use javax.xml.bind.DatatypeConverter instead of Java.util.Base64

This calls is available from Java 1.6+
Fixes #161

--- src/adzerk/boot_cljs/util.clj
+++ src/adzerk/boot_cljs/util.clj
@@ -2,7 +2,7 @@
   (:require [clojure.java.io :as io]
             [clojure.string :as string]
             [boot.file :as file])
-  (:import [java.util Base64]
+  (:import [javax.xml.bind DatatypeConverter]
            [java.io ObjectInputStream ObjectOutputStream ByteArrayOutputStream ByteArrayInputStream]))

 (defn path->js
@@ -54,13 +54,13 @@
   (with-open [bos (ByteArrayOutputStream.)
               out (ObjectOutputStream. bos)]
     (.writeObject out e)
-    (.encodeToString (Base64/getEncoder) (.toByteArray bos))))
+    (DatatypeConverter/printBase64Binary (.toByteArray bos))))

 (defn deserialize-object
-  "Deserialize given Base64 encoding string using Object Streams and return the
+  "Deserialize given Base64 encoded string using Object Streams and return the
   Object."
   [ba]
-  (with-open [bis (ByteArrayInputStream. (.decode (Base64/getDecoder) ba))
+  (with-open [bis (ByteArrayInputStream. (DatatypeConverter/parseBase64Binary ba))
               in  (ObjectInputStream. bis)]
     (.readObject in)))


s/imperfetto/imperfect/

s/imperfetto/imperfect/

--- src/babel/english/grammar.clj
+++ src/babel/english/grammar.clj
@@ -372,7 +372,7 @@
           (filter #(or (= (:rule %) "s-conditional-nonphrasal-head")
                        (= (:rule %) "s-present-nonphrasal-head")
                        (= (:rule %) "s-future-nonphrasal-head")
-                       (= (:rule %) "s-imperfetto-nonphrasal-head")
+                       (= (:rule %) "s-imperfect-nonphrasal-head")
                        (= (:rule %) "s-past-nonphrasal-head")
                        (= (:rule %) "s-aux"))
                   grammar)
@@ -423,8 +423,8 @@
                        (= (:rule %) "s-present-phrasal-head")
                        (= (:rule %) "s-future-nonphrasal-head")
                        (= (:rule %) "s-future-phrasal-head")
-                       (= (:rule %) "s-imperfetto-nonphrasal-head")
-                       (= (:rule %) "s-imperfetto-phrasal-head")
+                       (= (:rule %) "s-imperfect-nonphrasal-head")
+                       (= (:rule %) "s-imperfect-phrasal-head")
                        (= (:rule %) "s-past-nonphrasal-head")
                        (= (:rule %) "s-past-phrasal-head")
                        (= (:rule %) "s-aux")
@@ -484,5 +484,3 @@
        :index (create-index grammar (flatten (vals lexicon)) head-principle)})))

 (log/info "English grammar defined.")
-
-


Refactor

Refactor

--- src/buildviz/data/results.clj
+++ src/buildviz/data/results.clj
@@ -15,6 +15,7 @@
   (chronological-tests [this job-name from])
   (tests         [this job-name build-id])
   (set-tests!    [this job-name build-id xml]))
+

 (defn- builds-starting-from [from builds]
   (let [from-timestamp (or from
@@ -36,17 +37,18 @@
     (keys @builds))

   (builds [this job-name]
-    (when-some [builds (get @builds job-name)]
-      (vals builds)))
+    (->> job-name
+         (get @builds)
+         vals))

   (builds [this job-name from]
     (->> job-name
-         (get @(:builds this))
+         (get @builds)
          (builds-starting-from from)
          vals))

   (all-builds [this]
-    (->> @(:builds this)
+    (->> @builds
          vals
          (mapcat vals)))

@@ -61,7 +63,7 @@
   ;; TODO find a solution for 'stale' tests with no matching builds
   (chronological-tests [this job-name from]
     (->> job-name
-         (get @(:builds this))
+         (get @builds)
          (builds-starting-from from)
          keys
          (map #(load-tests job-name %))


Fix code-ordering thinko.

Fix code-ordering thinko.

--- src/clojure/inet/data/dns.clj
+++ src/clojure/inet/data/dns.clj
@@ -88,7 +88,7 @@
                        [(conj state (take n data))
                         (drop n data)])))
           (ffilter (comp empty? second))
-          first (apply concat) byte-array))
+          first (drop 1) (apply concat) byte-array))
   ([wire ^long offset ^long length]
      (wire->bytes (->> wire (drop offset) (take length)))))

@@ -108,6 +108,53 @@
   ([bytes ^long offset ^long length]
      (bytes->name (->> bytes (drop offset) (take length)))))

+(deftype DNSDomain [^IPersistentMap meta, ^bytes bytes, ^long length]
+  Object
+  (toString [this] (bytes->name bytes 0 length))
+  (hashCode [this] (bytes-hash-code bytes 0 length))
+  (equals [this other]
+    (and (domain? other)
+         (= length (domain-length other))
+         (Arrays/equals bytes ^bytes (domain-bytes other))))
+
+  IObj
+  (meta [this] meta)
+  (withMeta [this new-meta] (DNSDomain. new-meta bytes length))
+
+  Comparable
+  (compareTo [this other]
+    (domain-compare true this other))
+
+  ILookup
+  (valAt [this key]
+    (when (domain-contains? this key) key))
+  (valAt [this key default]
+    (if (domain-contains? this key) key default))
+
+  IFn
+  (invoke [this key]
+    (when (domain-contains? this key) key))
+  (invoke [this key default]
+    (if (domain-contains? this key) key default))
+
+  DNSDomainConstruction
+  (domain [this] this)
+
+  DNSDomainOperations
+  (domain?* [this] true)
+  (domain-bytes [this] bytes)
+  (domain-length [this] length))
+
+(def ^:private root-domain
+  "The singleton empty root domain."
+  (DNSDomain. nil (byte-array []) 0))
+
+(defn- domain*
+  [orig ^bytes bytes]
+  (if (domain?* bytes)
+    (DNSDomain. nil bytes (alength bytes))
+    (domain-error "%s: invalid domain" (str orig))))
+
 (defn domain-next
   "For the domain child which is a subdomain of domain parent, return the
 immediate child domain of parent which is either identical to child or also a
@@ -127,53 +174,6 @@
   [domain] (->> (iterate #(domain-next domain %) nil) (drop 1)
                 (take-while identity)))

-(deftype DNSDomain [^IPersistentMap meta, ^bytes bytes, ^long length]
-  Object
-  (toString [this] (bytes->name bytes 0 length))
-  (hashCode [this] (bytes-hash-code bytes 0 length))
-  (equals [this other]
-    (and (domain? other)
-         (= length (domain-length other))
-         (Arrays/equals bytes ^bytes (domain-bytes other))))
-
-  IObj
-  (meta [this] meta)
-  (withMeta [this new-meta] (DNSDomain. new-meta bytes length))
-
-  Comparable
-  (compareTo [this other]
-    (domain-compare true this other))
-
-  ILookup
-  (valAt [this key]
-    (when (domain-contains? this key) key))
-  (valAt [this key default]
-    (if (domain-contains? this key) key default))
-
-  IFn
-  (invoke [this key]
-    (when (domain-contains? this key) key))
-  (invoke [this key default]
-    (if (domain-contains? this key) key default))
-
-  DNSDomainConstruction
-  (domain [this] this)
-
-  DNSDomainOperations
-  (domain?* [this] true)
-  (domain-bytes [this] bytes)
-  (domain-length [this] length))
-
-(def ^:private root-domain
-  "The singleton empty root domain."
-  (DNSDomain. nil (byte-array []) 0))
-
-(defn- domain*
-  [orig ^bytes bytes]
-  (if (domain?* bytes)
-    (DNSDomain. nil bytes (alength bytes))
-    (domain-error "%s: invalid domain" (str orig))))
-
 (extend-type (java.lang.Class/forName "[B")
   DNSDomainConstruction
   (domain [this] (domain* this this))


Added defn-typecheck macro.

Added defn-typecheck macro.

user> (defn-typecheck addint :java.lang/Integer "My little adder" [x y] (+ x y))
user> (addint 1 2)
3
user> (addint 1.0 2)
; Evaluation aborted.
user> (derive :java.lang/Double :java.lang/Integer)
nil
user> (addint 1.0 2)
3.0

--- src/conexp/util/typecheck.clj
+++ src/conexp/util/typecheck.clj
@@ -30,3 +30,31 @@
                          (rv (replace-first-re #"class " "" classname)))) ]
     (keyword keywordname)))

+
+;;;
+;;;
+;;; defn-typecheck
+;;;
+
+(defmacro defn-typecheck
+  "This macro is a helper for typechecking the first parameter via
+   class-to-keyword and derive/isa? and throws illegal-argument if
+   the first parameter is not a child of the given keyword.
+
+  Parameters:
+    name    _name of the function
+    parent  _parent-keyword
+    doc-str _doc-string of the function
+    params  _parameter vector
+    & body  _function body"
+  [name parent doc-str params & body]
+  (let [ check-parm (first params)
+         name-str (str name)
+         type-name (str parent)]
+    `(defn ~name ~doc-str ~params
+       (if (isa? (class-to-keyword (type ~check-parm)) ~parent)
+         (do ~@body)
+         (illegal-argument (str ~name-str
+                             " called with the first parameter of type "
+                             (class-to-keyword (type ~check-parm))
+                             " which is not a child-type of " ~type-name " ."))))))


Redirecting to login-page on unknown get-requests

--- src/glory_of_empires/main.clj
+++ src/glory_of_empires/main.clj
@@ -24,8 +24,14 @@

 (defn reply [ text-content ]
   { :status 200
-    :headers {"Content-Type" "text/html" "Access-Control-Allow-Origin" "*"}
+    :headers {"Content-Type" "text/html"
+              "Access-Control-Allow-Origin" "*"}
     :body (str text-content) }  )
+
+(defn redirect [ url ]
+  { :status 301 ; Permanent redirect
+    :headers { "Location" url
+               "Access-Control-Allow-Origin" "*"} } )

 (defn handle-exception [ ex ]
   (println (clojure.stacktrace/print-stack-trace ex))
@@ -55,10 +61,11 @@
 (defn- handle-get [ uri query ] ; returns ready response-map or string for normal HTTP 200 response
   (cond
     (contains? ignore-urls uri) ""
+    (= "/login" uri) (login/login-page (game-state/game-names))
+    (= "/create-game" uri) (login/create-game-page)
+    (= "/game" uri) (static-page "html/game.html")
     (re-matches #"\/html\/.+" uri) (static-page (subs uri 1))
-    (= "/game" uri) (static-page "html/game.html")
-    (= "/create-game" uri) (login/create-game-page)
-    :else (login/login-page (game-state/game-names))))
+    :else (redirect "/login") ))

 (defn- handler-inner [request]
   (case (:request-method request)


[#1077] Identify single point in CartoCSS

--- backend/src/akvo/lumen/lib/visualisation/maps.clj
+++ backend/src/akvo/lumen/lib/visualisation/maps.clj
@@ -44,7 +44,9 @@
     (apply (partial format fmt-string) args)))

 (def cartocss
-  "#s { marker-width: 10; marker-fill: #e00050;}")
+  "#s { marker-width: 8; marker-fill: #6ca429; marker-line-color: #888; marker-fill-opacity: 0.6; marker-allow-overlap: true;}
+  #s[label='Daniel']{marker-fill: #FFA500;}
+")

 (defn map-config
   [cartocss geom-column label-column sql]


Add missing exclude for `resolve` symbol on storages.util ns.

--- backend/vendor/storages/util.clj
+++ backend/vendor/storages/util.clj
@@ -6,7 +6,7 @@

 (ns storages.util
   "FileSystem related utils."
-  (:refer-clojure :exclude [name])
+  (:refer-clojure :exclude [name resolve])
   (:require [storages.proto :as pt])
   (:import java.nio.file.Path
            java.nio.file.Files


CMR-1772: A change in name of a variable.

--- system-int-test/test/cmr/system_int_test/virtual_product_test.clj
+++ system-int-test/test/cmr/system_int_test/virtual_product_test.clj
@@ -195,11 +195,11 @@

 (defn- assert-tombstones
   "Assert that the concepts with the given concept-ids and revision-id exist in mdb and are tombstones"
-  [vp-colls expected-revision-id]
+  [vp-colls revision-id]
   (doseq [concept-id (mapcat #(map :id (:refs (search/find-refs
                                                 :granule {:entry-title (:entry-title %)
                                                           :page-size 50}))) vp-colls)]
-    (is (:deleted (ingest/get-concept concept-id expected-revision-id)))))
+    (is (:deleted (ingest/get-concept concept-id revision-id)))))

 ;; Verify that latest revision ids of virtual granules and the corresponding source granules
 ;; are in sync as various ingest operations are performed on the source granules


Remove tests for IgnoreError

Remove tests for IgnoreError

--- test/caesium/binding_test.clj
+++ test/caesium/binding_test.clj
@@ -5,7 +5,7 @@
   (:import [caesium.binding Sodium]
            [java.lang.annotation Annotation]
            [java.lang.reflect Method Type AnnotatedElement]
-           [jnr.ffi.annotations In Out Pinned LongLong IgnoreError]
+           [jnr.ffi.annotations In Out Pinned LongLong]
            [jnr.ffi.byref LongLongByReference]
            [java.nio ByteBuffer]
            [jnr.ffi.types size_t]))
@@ -56,7 +56,6 @@

 (deftest interface-test
   (doseq [^Method method (.getMethods Sodium)]
-    (is (-> method .getAnnotations clean-annotations (get IgnoreError)))
     (if-let [params (seq (map (fn [t as]
                                 {:method method
                                  :type t
@@ -87,8 +86,7 @@
   (let [rtype (.getGenericReturnType method)]
     (condp = rtype
       Integer/TYPE (is (= "sodium_init" (.getName method)))
-      Long/TYPE (is (= #{size_t IgnoreError}
-                       (clean-annotations (.getAnnotations method))))
+      Long/TYPE (is (= #{size_t} (clean-annotations (.getAnnotations method))))
       (is (= String rtype)))))

 (defmacro with-ns


basic chart for time spent by story

basic chart for time spent by story

--- src/cljs/iwaswhere_web/ui/charts/pomodoros.cljs
+++ src/cljs/iwaswhere_web/ui/charts/pomodoros.cljs
@@ -22,6 +22,48 @@
                :height         h
                :on-mouse-enter mouse-enter-fn
                :on-mouse-leave mouse-leave-fn}]))])
+
+(defn day-bars
+  "Renders group with rects for all stories of the particular day."
+  [day-stats local idx chart-h y-scale put-fn]
+  (let [options (subscribe [:options])
+        stories (reaction (:stories @options))
+        stacked-reducer (fn [acc [k v]]
+                          (let [total (get acc :total 0)]
+                            (-> acc
+                                (assoc-in [:total] (+ total v))
+                                (assoc-in [:items k] (+ total v)))))]
+    (fn [day-stats local idx chart-h y-scale put-fn]
+      (let [mouse-enter-fn (cc/mouse-enter-fn local day-stats)
+            mouse-leave-fn (cc/mouse-leave-fn local day-stats)
+            stories @stories
+            time-by-story (sort-by #(str (first %)) (:time-by-story day-stats))
+            stacked (reduce stacked-reducer {} time-by-story)
+            time-by-story2 (reverse (sort-by #(str (first %)) (:items stacked)))]
+        [:g
+         {:on-mouse-enter mouse-enter-fn
+          :on-mouse-leave mouse-leave-fn}
+         (for [[story v] time-by-story2]
+           (let [h (* y-scale v)
+                 story-name (or (:story-name (get stories story)) "No story")]
+             ^{:key (str story)}
+             [:rect {:on-click (cc/open-day-fn v put-fn)
+                     :fill     (cc/item-color story-name)
+                     :x        (* 20 idx)
+                     :y        (- chart-h h)
+                     :width    20
+                     :height   h}]))]))))
+
+(defn bars-by-story
+  "Renders chart with daily recorded times, split up by story."
+  [indexed local chart-h y-scale put-fn]
+  [:g
+   (for [[idx v] indexed]
+     (let [h (* y-scale (:total-time v))
+           mouse-enter-fn (cc/mouse-enter-fn local v)
+           mouse-leave-fn (cc/mouse-leave-fn local v)]
+       ^{:key (str idx)}
+       [day-bars v local idx chart-h y-scale put-fn]))])

 (defn time-by-stories-list
   "Render list of times spent on individual stories, plus the total."
@@ -48,18 +90,18 @@

 (defn pomodoro-bar-chart
   [pomodoro-stats chart-h title y-scale put-fn]
-  (let [local (rc/atom {})]
+  (let [local (rc/atom {})
+        idx-fn (fn [idx [k v]] [idx v])]
     (fn [pomodoro-stats chart-h title y-scale put-fn]
-      (let [indexed (map-indexed (fn [idx [k v]] [idx v]) pomodoro-stats)]
+      (let [indexed (map-indexed idx-fn pomodoro-stats)
+            indexed-30 (map-indexed idx-fn (take-last 30 pomodoro-stats))]
         [:div
          [:svg
           {:viewBox (str "0 0 600 " chart-h)}
           [:g
            [cc/chart-title "Time tracked"]
            [cc/bg-bars indexed local chart-h :pomodoro]
-           [bars indexed local :total-time chart-h 0.0025 put-fn]
-           [cc/path "M 0 50 l 600 0 z"]
-           [cc/path "M 0 100 l 600 0 z"]]]
+           [bars-by-story indexed-30 local chart-h 0.0035 put-fn]]]
          (if-let [mouse-over (:mouse-over @local)]
            [time-by-stories-list mouse-over]
            [time-by-stories-list (second (last pomodoro-stats))])


An unmatched parenthesis!

An unmatched parenthesis!

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/contrib/tests/algorithms/titanic.clj
+++ src/conexp/contrib/tests/algorithms/titanic.clj
@@ -62,7 +62,7 @@
         (let [card (count (attribute-derivation ctx atts))]
           (if (<= minnum card)
             (= supp card)
-            (= supp -1))))))))
+            (= supp -1)))))))

 ;;;


Update dev.clj to conform to new piggieback api

piggieback/cljs-repl now accepts a repl-env as the first argument instead of as a keyword argument.

--- src/leiningen/new/reagent/env/dev/clj/reagent/dev.clj
+++ src/leiningen/new/reagent/env/dev/clj/reagent/dev.clj
@@ -4,7 +4,7 @@
             [leiningen.core.main :as lein]))

 (defn browser-repl []
-  (piggieback/cljs-repl :repl-env (weasel/repl-env :ip "127.0.0.1" :port 9001)))
+  (piggieback/cljs-repl (weasel/repl-env :ip "127.0.0.1" :port 9001)))

 (defn start-figwheel []
   (future


Improve docs for test/matches and test/logged?

--- src/main/clojure/clojure/tools/logging/test.clj
+++ src/main/clojure/clojure/tools/logging/test.clj
@@ -227,7 +227,9 @@

 (defn matches
-  "Returns matching log entries, otherwise nil.
+  "Returns matching log entries, otherwise nil. See match-logger-ns?,
+  match-level?, match-throwable?, and match-message? for the default matching
+  behavior applied to the given args.

   Must be invoked within a context where *stateful-log* is bound to an instance
   of StatefulLog containing MatchableLogEntry items (e.g., inside with-log)."
@@ -239,7 +241,9 @@

 (defn logged?
-  "Returns true if the log contains matching entries.
+  "Returns true if the log contains matching entries. See match-logger-ns?,
+  match-level?, match-throwable?, and match-message? for the default matching
+  behavior applied to the given args.

   Must be invoked within a context where *stateful-log* is bound to an instance
   of StatefulLog containing MatchableLogEntry items (e.g., inside with-log)."


FIX cond-> does not short circuit which ended up loading the browser console stuff for node

--- src/main/shadow/devtools/server/worker/impl.clj
+++ src/main/shadow/devtools/server/worker/impl.clj
@@ -57,7 +57,7 @@
      (boolean reload-with-state)
      }))

-(defn inject-devtools
+(defn inject-devtools-browser
   [{:keys [build-config] :as proc-state}]
   (let [{:keys [console-support]}
         (:devtools build-config)]
@@ -82,6 +82,23 @@
           (update :closure-defines merge (repl-defines worker-state))
           (update-in [:modules (:default-module compiler-state) :entries] prepend '[cljs.user shadow.devtools.client.node])
           ))))
+
+(defn inject-devtools
+  [{:keys [build-config] :as proc-state}]
+  (let [{:keys [target]} build-config]
+    (cond
+      (or (= :node-library target)
+          (= :node-script target)
+          (= :node (get-in build-config [:devtools :runtime])))
+      (inject-node-repl proc-state)
+
+      ;; defaults to browser repl unless otherwise specified
+      (or (= :browser target)
+          (let [rt (get-in build-config [:devtools :runtime])]
+            (or (nil? rt)
+                (= :browser rt))))
+      (inject-devtools-browser proc-state)
+      )))

 (defn >!!output [worker-state msg]
   {:pre [(map? msg)
@@ -120,10 +137,7 @@
   "configure the build according to build-config in state"
   [{:keys [build-config] :as worker-state}]
   (try
-    (let [{:keys [target]}
-          build-config
-
-          compiler-state
+    (let [compiler-state
           (-> (cljs/init-state)
               (assoc :logger (util/async-logger (-> worker-state :channels :output)))
               (comp/init :dev build-config)
@@ -131,19 +145,7 @@

       (-> worker-state
           (assoc :compiler-state compiler-state)
-          (cond->
-            ;; defaults to browser repl unless otherwise specified
-            (or (= :browser target)
-                (let [rt (get-in build-config [:devtools :runtime])]
-                  (or (nil? rt)
-                      (= :browser rt))))
-            (inject-devtools)
-
-            (or (= :node-library target)
-                (= :node-script target)
-                (= :node (get-in build-config [:devtools :runtime])))
-            (inject-node-repl))
-
+          (inject-devtools)
           (update :compiler-state comp/process-stage :config-complete true)
           ))


bug #3775 - fixed missing dapp descriptions

Signed-off-by: Andrey Shovkoplyas <b713972e59b8e606e23253c4a13e948139fea4d1@gmail.com>

--- src/status_im/ui/screens/add_new/open_dapp/views.cljs
+++ src/status_im/ui/screens/add_new/open_dapp/views.cljs
@@ -47,7 +47,7 @@
                       :keyboardShouldPersistTaps :always}]]))

 (views/defview dapp-description []
-  (views/letsubs [{:keys [name dapp-url] :as dapp} [:get-screen-params]]
+  (views/letsubs [{:keys [name dapp-url description] :as dapp} [:get-screen-params]]
     [react/keyboard-avoiding-view styles/main-container
      [status-bar/status-bar]
      [toolbar.view/simple-toolbar]
@@ -70,7 +70,8 @@
      [react/view styles/description-container
       [react/text {:style styles/gray-label}
        (i18n/label :t/description)]
-      [react/text {:style (merge styles/black-label {:padding-top 18})}]
+      [react/text {:style (merge styles/black-label {:padding-top 18})}
+       description]
       [components/separator {:margin-top 15}]
       [react/text {:style (merge styles/gray-label {:padding-top 18})}
        (i18n/label :t/url)]


[fix] error when switching chats

[fix] error when switching chats

- a subscription name change was missed during rebase

Signed-off-by: yenda <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@status.im>

--- src/status_im/ui/screens/desktop/main/chat/views.cljs
+++ src/status_im/ui/screens/desktop/main/chat/views.cljs
@@ -75,7 +75,7 @@
        [react/text {:style styles/author :font :medium} name]])))

 (views/defview member-photo [from]
-  (views/letsubs [current-public-key [:get-current-public-key]
+  (views/letsubs [current-public-key [:account/public-key]
                   photo-path [:get-photo-path from]]
     [react/view {:style {:width 40 :margin-horizontal 16}}
      [react/view {:style {:position :absolute}}


tidy up pan ugen metadata

tidy up pan ugen metadata

--- src/overtone/sc/machinery/ugen/metadata/pan.clj
+++ src/overtone/sc/machinery/ugen/metadata/pan.clj
@@ -30,138 +30,294 @@
 ;; }

 (def specs
-     (map
-       #(assoc % :check (when-ar (first-input-ar)))
-      [
-
-       {:name "Pan2",
-        :args [{:name "in" :doc "input signal"}
-               {:name "pos", :default 0.0, :doc "pan position, -1 is left, +1 is right"}
-               {:name "level", :default 1.0, :doc "a control rate level input"}]
-        :num-outs 2
-        :check (nth-input-stream? 0)
-        :doc "Two channel (stereo) equal power panner."}
-
-       ;; LinPan2 : Pan2 {}
-
-       {:name "LinPan2" :extends "Pan2"
-        :doc "Two channel (stereo) linear panner. This one sounds more like the Rhodes tremolo than Pan2."}
-
-
-       {:name "Pan4",
-        :args [{:name "in", :doc "input signal"}
-               {:name "xpos", :default 0.0, :doc "x pan position from -1 to +1 (left to right)"}
-               {:name "ypos", :default 0.0, :doc "y pan position from -1 to +1 (back to front)"}
-               {:name "level", :default 1.0, :doc "a control rate level input."}]
-        :num-outs 4
-        :check (nth-input-stream? 0)
-        :doc "Four channel equal power panner. Outputs are in order LeftFront, RightFront, LeftBack, RightBack."}
-
-
-       {:name "Balance2",
-        :args [{:name "left", :doc "channel 1 of input stereo signal"}
-               {:name "right", :doc "channel 2 of input stereo signal"}
-               {:name "pos", :default 0.0, :doc "pan position, -1 is left, +1 is right"}
-               {:name "level", :default 1.0, :doc "a control rate level input."}]
-        :num-outs 2
-        :doc "Equal power panning balances two channels; by panning, you are favouring one or other channel in the mix, and the other loses power. The middle pan position (pos=0.0) corresponds to the original stereo mix; full left (pos of -1) is essentially just left channel playing, full right (pos of 1) just the right. The output of Balance2 remains a stereo signal."}
-
-
-       {:name "Rotate2",
-        :args [{:name "x", :doc "input signal"}
-               {:name "y", :doc "input signal"}
-               {:name "pos", :default 0.0, :doc "angle to rotate around the circle from -1 to +1. -1 is 180 degrees, -0.5 is left, 0 is forward, +0.5 is right, +1 is behind."}]
-        :num-outs 2
-        :check [(nth-input-stream? 0)
-                (nth-input-stream? 1)]
-        :doc "Rotate2 can be used for rotating an ambisonic B-format sound field around an axis.
-
-Rotate2 does an equal power rotation so it also works well on stereo sounds.
-It takes two audio inputs (x, y) and an angle control (pos).
-It outputs two channels (x, y).
-It computes this:
-
-xout = cos(angle) * xin + sin(angle) * yin;
-yout = cos(angle) * yin - sin(angle) * xin;
-
-where angle = pos * pi,  so that -1 becomes -pi and +1 becomes +pi.
-This allows you to use an LFSaw to do continuous rotation around a circle."}
-
-
-       {:name "PanB",
-        :args [{:name "in", :doc "input signal"}
-               {:name "azimuth", :default 0.0, :doc "in radians, -pi to +pi"}
-               {:name "elevation", :default 0.0, :doc "in radians, -0.5pi to +0.5pi"}
-               {:name "gain", :default 1.0, :doc "a control rate level input"}]
-        :num-outs 4
-        :check (nth-input-stream? 0)
-        :doc "Ambisonic B format panner. Output channels are in order W,X,Y,Z."}
-
-
-       {:name "PanB2",
-        :args [{:name "in", :doc "input signal"}
-               {:name "azimuth", :default 0.0, :doc "position around the circle from -1 to +1. -1 is behind, -0.5 is left, 0 is forward, +0.5 is right, +1 is behind."}
-               {:name "gain", :default 1.0, :doc "amplitude control"}]
-        :num-outs 3
-        :check (nth-input-stream? 0)
-        :doc "Encode a mono signal to two dimensional ambisonic B-format."}
-
-       {:name "BiPanB2",
-        :args [{:name "in-a", :doc "input signal A"}
-               {:name "in-b", :doc "input signal B"}
-               {:name "azimuth", :doc "position around the circle from -1 to +1. -1 is behind, -0.5 is left, 0 is forward, +0.5 is right, +1 is behind."}
-               {:name "gain", :default 1.0, :doc "amplitude control"}]
-        :num-outs 3
-        :check [(when-ar (first-n-inputs-ar 2))
-                (nth-input-stream? 0)
-                (nth-input-stream? 1)]
-        :doc "Encode a two channel signal to two dimensional ambisonic B-format.
-This puts two channels at opposite poles of a 2D ambisonic field.
-This is one way to map a stereo sound onto a soundfield.
-It is equivalent to:
-
-PanB2(inA, azimuth, gain) + PanB2(inB, azimuth + 1, gain)"}
-
-
-       {:name "DecodeB2",
-        :args [{:name "numChannels" :mode :num-outs, :doc "number of output speakers. Typically 4 to 8."}
-               {:name "w", :doc "B-format signal"}
-               {:name "x", :doc "B-format signal"}
-               {:name "y", :doc "B-format signal"}
-               {:name "orientation", :default 0.5, :doc "Should be zero if the front is a vertex of the polygon. The first speaker will be directly in front. Should be 0.5 if the front bisects a side of the polygon. Then the first speaker will be the one left of center. Default is 0.5."}]
-        :doc "2D Ambisonic B-format decoder. Decode a two dimensional ambisonic B-format signal to a set of speakers in a regular polygon.
-The outputs will be in clockwise order. The position of the first speaker is either center or left of center."
-        :check (when-ar (first-n-inputs-ar 3))}
-
-
-       {:name "PanAz",
-        :args [{:name "num-channels" :mode :num-outs, :doc "number of output channels"}
-               {:name "in", :doc "input signal"}
-               {:name "pos", :default 0.0, :doc "pan position. Channels are evenly spaced over a cyclic period of 2.0 with 0.0 equal to the position directly in front, 2.0/numChans a clockwise shift 1/numChans of the way around the ring, 4.0/numChans equal to a shift of 2/numChans, etc. Thus all channels will be cyclically panned through if a sawtooth wave from -1 to +1 is used to modulate the pos. N.B. Front may or may not correspond to a speaker depending on the setting of the orientation arg, see below."}
-               {:name "level", :default 1.0, :doc "a control rate level input."}
-               {:name "width", :default 2.0, :doc "The width of the panning envelope. Nominally this is 2.0 which pans between pairs of adjacent speakers. Width values greater than two will spread the pan over greater numbers of speakers. Width values less than one will leave silent gaps between speakers."}
-               {:name "orientation", :default 0.5, :doc "Should be zero if the front is a vertex of the polygon. The first speaker will be directly in front. Should be 0.5 if the front bisects a side of the polygon. Then the first speaker will be the one left of center. Default is 0.5."}]
-        :check (nth-input-stream? 1)
-        :doc "Multichannel equal power panner."}
-
-       {:name "XFade2",
-        :args [{:name "inA" :doc "input signal A"}
-               {:name "inB" :doc "input signal B"}
-               {:name "pan", :default 0.0 :doc "Pan between the two input signals with -1 being inA only and 1 being inB only with values between being a mix of the two."}
-               {:name "level", :default 1.0 :doc "Output level - 0 being silent and 1 being original volume"}]
-        :check [(when-ar (first-n-inputs-ar 2))
-                (nth-input-stream? 0)
-                (nth-input-stream? 1)]
-        :rates #{:ar :kr}
-        :doc "Equal power two channel cross fade"}
-
-       {:name "LinXFade2",
-        :args [{:name "inA", :doc "input signal A"}
-               {:name "inB", :doc "input signal B"}
-               {:name "pan", :default 0.0, :doc "cross fade position from -1 to +1"}
-               {:name "level", :default 1.0, :doc "a control rate level input"}]
-        :rates #{:ar :kr}
-        :doc "Two channel linear crossfader."
-        :check [(when-ar (first-n-inputs-ar 2))
-                (nth-input-stream? 0)
-                (nth-input-stream? 1)]}]))
+  (map
+   #(assoc % :check (when-ar (first-input-ar)))
+   [
+
+    {:name "Pan2"
+     :args [{:name "in"
+             :doc "input signal"}
+
+            {:name "pos"
+             :default 0.0
+             :doc "pan position, -1 is left, +1 is right"}
+
+            {:name "level"
+             :default 1.0
+             :doc "a control rate level input"}]
+
+     :num-outs 2
+     :check (nth-input-stream? 0)
+     :doc "Two channel (stereo) equal power panner."}
+
+
+    {:name "LinPan2"
+     :extends "Pan2"
+     :doc "Two channel (stereo) linear panner. This one sounds more like
+           the Rhodes tremolo than Pan2." }
+
+
+    {:name "Pan4",
+     :args [{:name "in",
+             :doc "input signal"}
+
+            {:name "xpos",
+             :default 0.0,
+             :doc "x pan position from -1 to +1 (left to right)"}
+
+            {:name "ypos",
+             :default 0.0,
+             :doc "y pan position from -1 to +1 (back to front)"}
+
+            {:name "level",
+             :default 1.0,
+             :doc "a control rate level input."}]
+
+     :num-outs 4
+     :check (nth-input-stream? 0)
+     :doc "Four channel equal power panner. Outputs are in order
+           LeftFront, RightFront, LeftBack, RightBack." }
+
+
+    {:name "Balance2",
+     :args [{:name "left",
+             :doc "channel 1 of input stereo signal"}
+
+            {:name "right",
+             :doc "channel 2 of input stereo signal"}
+
+            {:name "pos",
+             :default 0.0,
+             :doc "pan position, -1 is left, +1 is right"}
+
+            {:name "level",
+             :default 1.0,
+             :doc "a control rate level input."}]
+
+     :num-outs 2
+     :doc "Equal power panning balances two channels; by panning, you
+           are favouring one or other channel in the mix, and the other
+           loses power. The middle pan position (pos=0.0) corresponds to
+           the original stereo mix; full left (pos of -1) is essentially
+           just left channel playing, full right (pos of 1) just the
+           right. The output of Balance2 remains a stereo signal." }
+
+
+    {:name "Rotate2",
+     :args [{:name "x",
+             :doc "input signal"}
+
+            {:name "y",
+             :doc "input signal"}
+
+            {:name "pos",
+             :default 0.0,
+             :doc "angle to rotate around the circle from -1 to +1. -1
+                   is 180 degrees, -0.5 is left, 0 is forward, +0.5 is
+                   right, +1 is behind." }]
+     :num-outs 2
+     :check [(nth-input-stream? 0)
+             (nth-input-stream? 1)]
+     :doc "Rotate2 can be used for rotating an ambisonic B-format sound
+           field around an axis.
+
+           Rotate2 does an equal power rotation so it also works well on
+           stereo sounds.  It takes two audio inputs (x, y) and an angle
+           control (pos).  It outputs two channels (x, y).  It computes
+           this:
+
+           xout = cos(angle) * xin + sin(angle) * yin;
+
+           yout = cos(angle) * yin - sin(angle) * xin;
+
+           where angle = pos * pi, so that -1 becomes -pi and +1 becomes
+           +pi.  This allows you to use an LFSaw to do continuous
+           rotation around a circle." }
+
+
+    {:name "PanB",
+     :args [{:name "in",
+             :doc "input signal"}
+
+            {:name "azimuth",
+             :default 0.0,
+             :doc "in radians, -pi to +pi"}
+
+            {:name "elevation",
+             :default 0.0,
+             :doc "in radians, -0.5pi to +0.5pi"}
+
+            {:name "gain",
+             :default 1.0,
+             :doc "a control rate level input"}]
+
+     :num-outs 4
+     :check (nth-input-stream? 0)
+     :doc "Ambisonic B format panner. Output channels are in order
+           W,X,Y,Z." }
+
+
+    {:name "PanB2",
+     :args [{:name "in",
+             :doc "input signal"}
+
+            {:name "azimuth",
+             :default 0.0,
+             :doc "position around the circle from -1 to +1. -1 is
+                   behind, -0.5 is left, 0 is forward, +0.5 is right, +1
+                   is behind." }
+
+            {:name "gain",
+             :default 1.0,
+             :doc "amplitude control"}]
+
+     :num-outs 3
+     :check (nth-input-stream? 0)
+     :doc "Encode a mono signal to two dimensional ambisonic B-format."}
+
+
+    {:name "BiPanB2",
+     :args [{:name "in-a",
+             :doc "input signal A"}
+
+            {:name "in-b",
+             :doc "input signal B"}
+
+            {:name "azimuth",
+             :doc "position around the circle from -1 to +1. -1 is
+                   behind, -0.5 is left, 0 is forward, +0.5 is right, +1
+                   is behind." }
+
+            {:name "gain",
+             :default 1.0,
+             :doc "amplitude control"}]
+
+     :num-outs 3
+     :check [(when-ar (first-n-inputs-ar 2))
+             (nth-input-stream? 0)
+             (nth-input-stream? 1)]
+     :doc "Encode a two channel signal to two dimensional ambisonic
+           B-format.  This puts two channels at opposite poles of a 2D
+           ambisonic field.  This is one way to map a stereo sound onto
+           a soundfield.  It is equivalent to:
+
+           PanB2(inA, azimuth, gain) + PanB2(inB, azimuth + 1, gain)"}
+
+
+    {:name "DecodeB2",
+     :args [{:name "numChannels"
+             :mode :num-outs,
+             :doc "number of output speakers. Typically 4 to 8."}
+
+            {:name "w",
+             :doc "B-format signal"}
+
+            {:name "x",
+             :doc "B-format signal"}
+
+            {:name "y",
+             :doc "B-format signal"}
+
+            {:name "orientation",
+             :default 0.5,
+             :doc "Should be zero if the front is a vertex of the
+                   polygon. The first speaker will be directly in
+                   front. Should be 0.5 if the front bisects a side of
+                   the polygon. Then the first speaker will be the one
+                   left of center. Default is 0.5." }]
+     :doc "2D Ambisonic B-format decoder. Decode a two dimensional
+           ambisonic B-format signal to a set of speakers in a regular
+           polygon.  The outputs will be in clockwise order. The
+           position of the first speaker is either center or left of
+           center."
+     :check (when-ar (first-n-inputs-ar 3))}
+
+
+    {:name "PanAz",
+     :args [{:name "num-channels"
+             :mode :num-outs,
+             :doc "number of output channels"}
+
+            {:name "in",
+             :doc "input signal"}
+
+            {:name "pos",
+             :default 0.0,
+             :doc "pan position. Channels are evenly spaced over a
+                   cyclic period of 2.0 with 0.0 equal to the position
+                   directly in front, 2.0/numChans a clockwise shift
+                   1/numChans of the way around the ring, 4.0/numChans
+                   equal to a shift of 2/numChans, etc. Thus all
+                   channels will be cyclically panned through if a
+                   sawtooth wave from -1 to +1 is used to modulate the
+                   pos. N.B. Front may or may not correspond to a
+                   speaker depending on the setting of the orientation
+                   arg, see below." }
+
+            {:name "level",
+             :default 1.0,
+             :doc "a control rate level input."}
+
+            {:name "width",
+             :default 2.0,
+             :doc "The width of the panning envelope. Nominally this is
+                   2.0 which pans between pairs of adjacent
+                   speakers. Width values greater than two will spread
+                   the pan over greater numbers of speakers. Width
+                   values less than one will leave silent gaps between
+                   speakers." }
+
+            {:name "orientation",
+             :default 0.5,
+             :doc "Should be zero if the front is a vertex of the
+                   polygon. The first speaker will be directly in
+                   front. Should be 0.5 if the front bisects a side of
+                   the polygon. Then the first speaker will be the one
+                   left of center. Default is 0.5." }]
+     :check (nth-input-stream? 1)
+     :doc "Multichannel equal power panner."}
+
+    {:name "XFade2",
+     :args [{:name "inA"
+             :doc "input signal A"}
+
+            {:name "inB"
+             :doc "input signal B"}
+
+            {:name "pan",
+             :default 0.0
+             :doc "Pan between the two input signals with -1 being inA
+                   only and 1 being inB only with values between being a
+                   mix of the two." }
+
+            {:name "level",
+             :default 1.0
+             :doc "Output level - 0 being silent and 1 being original
+                   volume"}]
+
+     :check [(when-ar (first-n-inputs-ar 2))
+             (nth-input-stream? 0)
+             (nth-input-stream? 1)]
+     :rates #{:ar :kr}
+     :doc "Equal power two channel cross fade"}
+
+    {:name "LinXFade2",
+     :args [{:name "inA",
+             :doc "input signal A"}
+
+            {:name "inB",
+             :doc "input signal B"}
+
+            {:name "pan",
+             :default 0.0,
+             :doc "cross fade position from -1 to +1"}
+
+            {:name "level",
+             :default 1.0,
+             :doc "a control rate level input"}]
+
+     :rates #{:ar :kr}
+     :doc "Two channel linear crossfader."
+     :check [(when-ar (first-n-inputs-ar 2))
+             (nth-input-stream? 0)
+             (nth-input-stream? 1)]}]))


fix message on empty search results

fix message on empty search results

Signed-off-by: Jakub Sokołowski <1d3764b91b902f6b45836e2498da81fe35caf6d6@status.im>

--- src/status_im/ui/screens/home/filter/views.cljs
+++ src/status_im/ui/screens/home/filter/views.cljs
@@ -117,23 +117,25 @@
     :key-fn                      first
     ;; true by default on iOS
     :stickySectionHeadersEnabled false
-    :render-section-header-fn    (fn [{:keys [title data]}]
-                                   [react/view {:style {:height 40}}
-                                    [react/text {:style styles/filter-section-title}
-                                     (i18n/label title)]])
-    :render-section-footer-f     (fn [{:keys [title data]}]
-                                   (when (empty? data)
-                                     [list/big-list-item
-                                      {:text          (i18n/label (if (= title "messages")
-                                                                    :t/messages-search-coming-soon
-                                                                    :t/no-result))
-                                       :text-color    colors/gray
-                                       :hide-chevron? true
-                                       :action-fn     #()
-                                       :icon          (case title
-                                                        "messages" :main-icons/private-chat
-                                                        "browser" :main-icons/browser
-                                                        "chats" :main-icons/message)
-                                       :icon-color    colors/gray}]))
+    :render-section-header-fn
+    (fn [{:keys [title data]}]
+      [react/view {:style {:height 40}}
+       [react/text {:style styles/filter-section-title}
+        (i18n/label title)]])
+    :render-section-footer-fn
+    (fn [{:keys [title data]}]
+      (when (empty? data)
+        [list/big-list-item
+         {:text          (i18n/label (if (= title "messages")
+                                       :t/messages-search-coming-soon
+                                       :t/no-result))
+          :text-color    colors/gray
+          :hide-chevron? true
+          :action-fn     #()
+          :icon          (case title
+                           "messages" :main-icons/private-chat
+                           "browser" :main-icons/browser
+                           "chats" :main-icons/message)
+          :icon-color    colors/gray}]))
     :render-fn                   (fn [home-item]
                                    [inner-item/home-list-item home-item])}])


[#10694] Amount is not accessible on "Send Transaction" screen when token name is too long

Signed-off-by: Andrey Shovkoplyas <b713972e59b8e606e23253c4a13e948139fea4d1@gmail.com>

--- src/status_im/ui/screens/wallet/send/views.cljs
+++ src/status_im/ui/screens/wallet/send/views.cljs
@@ -34,20 +34,22 @@
 (defn asset-selector [{:keys [request? token from]}]
   (let [{:keys [name icon color]} token]
     [react/touchable-highlight
-     {:on-press (when-not request? #(do
+     {:style    {:flex 1}
+      :on-press (when-not request? #(do
                                       (re-frame/dispatch [:dismiss-keyboard])
                                       (re-frame/dispatch [:bottom-sheet/show-sheet
                                                           {:content        (fn [] [sheets/assets (:address from)])
                                                            :content-height 300}])))}
      [react/view {:style               {:flex-direction :row
                                         :align-items    :center
-                                        :margin-left    16}
+                                        :flex           1 :margin-left 16}
                   :accessibility-label :choose-asset-button}
       (if icon
         [list/item-image (assoc icon :style {:background-color colors/gray-lighter
                                              :border-radius    50} :image-style {:width 32 :height 32})]
         [chat-icon/custom-icon-view-list name color 32])
-      [react/text {:style {:margin-left 8}}
+      [react/text {:style           {:margin-left 8 :flex-shrink 0.5}
+                   :number-of-lines 2}
        (wallet.utils/display-symbol token)]
       (when-not request?
         [icons/icon :main-icons/dropdown {:color colors/gray}])]]))
@@ -96,6 +98,7 @@
        [header {:small-screen? small-screen?
                 :on-cancel #(re-frame/dispatch [:wallet/cancel-transaction-command])}]
        [react/view {:flex-direction :row :padding-horizontal 24 :align-items :center
+                    :flex 1
                     :margin-vertical (if small-screen? 8 16)}
         [react/text-input
          {:style               {:font-size (if small-screen? 24 38)


don't depend on __filename for hot reloading on node

this is a problem as of cljs 1.9.456

--- support/src/figwheel/client/file_reloading.cljs
+++ support/src/figwheel/client/file_reloading.cljs
@@ -60,13 +60,6 @@

 (defn provided? [ns]
   (aget js/goog.dependencies_.written (name->path ns)))
-
-;; this is pretty simple, not sure how brittle it is
-(defn fix-node-request-url [url]
-  (dev-assert (string? url))
-  (if (gstring/startsWith url "../")
-    (string/replace url "../" "")
-    (str "goog/" url)))

 (defn immutable-ns? [name]
   (or (#{"goog"
@@ -221,17 +214,18 @@
 (def reload-file*
   (condp = (utils/host-env?)
     :node
-    (let [path-parts #(string/split %  #"[/\\]")
-          sep (if (re-matches #"win.*" js/process.platform ) "\\" "/")
-          root (string/join sep (pop (pop (path-parts js/__dirname))))]
+    (let [node-path-lib (js/require "path")
+          ;; just finding a file that is in the cache so we can
+          ;; figure out where we are
+          util-pattern (str (.-sep node-path-lib)
+                            (.join node-path-lib "goog" "bootstrap" "nodejs.js"))
+          util-path (gobj/findKey js/require.cache (fn [v k o] (gstring/endsWith k util-pattern)))
+          parts     (-> (string/split util-path #"[/\\]") pop pop)
+          root-path (string/join (.-sep node-path-lib) parts)]
       (fn [request-url callback]
         (dev-assert (string? request-url) (not (nil? callback)))
-        (let [cache-path
-              (string/join
-               sep
-               (cons root
-                     (path-parts (fix-node-request-url request-url))))]
-          (aset (.-cache js/require) cache-path nil)
+        (let [cache-path (.resolve node-path-lib root-path request-url)]
+          (gobj/remove (.-cache js/require) cache-path)
           (callback (try
                       (js/require cache-path)
                       (catch js/Error e


(SERVER-18) Docs update

(SERVER-18) Docs update

--- src/clj/puppetlabs/services/request_handler/request_handler_core.clj
+++ src/clj/puppetlabs/services/request_handler/request_handler_core.clj
@@ -101,9 +101,9 @@
       * It also extracts the name of the SSL client cert and includes that
         in the map it returns, because it's needed by the ruby layer. It is
         possible that the HTTPS termination has happened external to Puppet
-        Server, if so then the CN will be provided by user-specified HTTP
+        Server, if so then the DN will be provided by user-specified HTTP
         header as well as the authentication status of the CN, and no
-        certificate wil be available."
+        certificate will be available."
   [config request]
   (let [headers     (:headers request)
         jruby-req   {:uri            (:uri request)


Navigate to game you joined

Navigate to game you joined

--- src/cljs/wombats_web_client/components/modals/join-wombat-modal.cljs
+++ src/cljs/wombats_web_client/components/modals/join-wombat-modal.cljs
@@ -16,7 +16,8 @@
                                                                  :wombat-color wombat-color}])
                         (get-all-games)
                         (re-frame/dispatch [:update-modal-error nil])
-                        (re-frame/dispatch [:set-modal nil])))
+                        (re-frame/dispatch [:set-modal nil])
+                        (set! (-> js/window .-location .-hash) (str "#/games/" game-id))))

 (def callback-error (fn [error]


remove native client

remove native client

--- Clojure-Websockets/TwitterClient/src/clj/birdwatch_tc/persistence/component.clj
+++ Clojure-Websockets/TwitterClient/src/clj/birdwatch_tc/persistence/component.clj
@@ -5,7 +5,6 @@
    [birdwatch-tc.persistence.elastic :as es]
    [clojure.tools.logging :as log]
    [clojure.pprint :as pp]
-   [clojurewerkz.elastisch.native           :as esn]
    [clojurewerkz.elastisch.rest             :as esr]
    [com.stuartsierra.component :as component]
    [clojure.core.async :as async :refer [<! chan go-loop tap]]))
@@ -14,8 +13,7 @@
   component/Lifecycle
   (start [component]
          (log/info "Starting Persistence Component")
-         (let [conn (esr/connect (:es-address conf))
-               native-conn (esn/connect [(:es-native-address conf)] {"cluster.name" (:es-cluster-name conf)})]
+         (let [conn (esr/connect (:es-address conf))]
            (es/run-persistence-loop (:persistence channels) conf conn)
            (es/run-rt-persistence-loop (:rt-persistence channels) (:persistence channels))
            (assoc component :conn conn :native-conn native-conn)))


Added test-snapshot-restore-child.

Added test-snapshot-restore-child.

--- test/ago/test.cljs
+++ test/ago/test.cljs
@@ -464,6 +464,94 @@
         (recur)))
     @all-done))

+(defn test-snapshot-restore-child [chan-size]
+  (println "test-snapshot-restore-child" chan-size)
+  (let [agw (make-ago-world nil)
+        cc0 (ago-chan agw chan-size) ; A control channel.
+        ch0 (ago-chan agw chan-size)
+        cc1 (ago-chan agw chan-size) ; A control channel.
+        ch1 (ago-chan agw chan-size)
+        all-done (atom false)]
+    (ago agw ; This is same as echoer0 in previous tests.
+         (ago agw ; Unlike previous tests, this time, echoer1 is child of echoer0.
+              (loop [n 0]
+                (if (<! cc1)
+                  (do (>! ch1 n)
+                      (recur (inc n)))
+                  (close! ch1))))
+         (loop [n 0]
+           (if (<! cc0)
+             (do (>! ch0 n)
+                 (recur (inc n)))
+             (close! ch0))))
+    (go (>! cc0 true)
+        (assert (= (<! ch0) 0))
+        (>! cc0 true)
+        (assert (= (<! ch0) 1))
+        (>! cc1 true)
+        (assert (= (<! ch1) 0))
+        (let [ss (ago-snapshot agw)]
+          (>! cc0 true)
+          (assert (= (<! ch0) 2))
+          (>! cc0 true)
+          (assert (= (<! ch0) 3))
+          (>! cc0 true)
+          (assert (= (<! ch0) 4))
+          (>! cc1 true)
+          (assert (= (<! ch1) 1))
+
+          (ago-restore agw ss) ; Restore to see msgs roll back.
+          (>! cc0 true)
+          (assert (= (<! ch0) 2))
+          (>! cc0 true)
+          (assert (= (<! ch0) 3))
+          (>! cc0 true)
+          (assert (= (<! ch0) 4))
+          (>! cc1 true)
+          (assert (= (<! ch1) 1))
+
+          (ago-restore agw ss) ; Restore to see msgs roll back, again.
+          (>! cc0 true)
+          (assert (= (<! ch0) 2))
+          (>! cc0 true)
+          (assert (= (<! ch0) 3))
+          (>! cc0 true)
+          (assert (= (<! ch0) 4))
+          (>! cc1 true)
+          (assert (= (<! ch1) 1))
+
+          (ago-restore agw ss) ; Restore to see msgs roll back, again.
+          (>! cc0 true)
+          (assert (= (<! ch0) 2))
+          (>! cc0 true)
+          (assert (= (<! ch0) 3))
+          (>! cc0 true)
+          (assert (= (<! ch0) 4))
+          (>! cc1 true)
+          (assert (= (<! ch1) 1))
+
+          (close! cc0) ; Now close the channels.
+          (close! cc1)
+          (assert (= (<! ch0) nil))
+          (assert (= (<! ch1) nil))
+
+          (ago-restore agw ss) ; Restore after channel closures.
+          (>! cc0 true)
+          (assert (= (<! ch0) 2))
+          (>! cc1 true)
+          (assert (= (<! ch1) 1))
+          (close! cc0)
+          (close! cc1)
+          (assert (= (<! ch0) nil))
+          (assert (= (<! ch1) nil))
+
+          (reset! all-done true)))
+    (loop []
+      (when (not @all-done)
+        (cljs.core.async.impl.dispatch/process-messages)
+        (recur)))
+    @all-done))
+
 (defn test-timeout [chan-size]
   (println "test-timeout" chan-size)
   (let [agw (make-ago-world nil)
@@ -521,6 +609,9 @@
   (test-snapshot-restore-alts 0)
   (test-snapshot-restore-alts 1)
   (test-snapshot-restore-alts 10)
+  (test-snapshot-restore-child 0)
+  (test-snapshot-restore-child 1)
+  (test-snapshot-restore-child 10)
   (test-timeout 0)
   (test-timeout 1)
   (test-timeout 10)


set groupId

set groupId

--- date-rule-instaparse/project.clj
+++ date-rule-instaparse/project.clj
@@ -1,4 +1,4 @@
-(defproject date-rule-instaparse "0.1.1-SNAPSHOT"
+(defproject date-parser/date-rule-instaparse "0.1.1-SNAPSHOT"
   :description "Date Rule Interpreter using Instaparse"
   :url "http://hjuergens.github.io/date-parser/date-rule-instaparse"
   :license {:name "Eclipse Public License"


Fix source jar resolve

Fix source jar resolve

--- ccw.core/src/clj/ccw/leiningen/classpath_container.clj
+++ ccw.core/src/clj/ccw/leiningen/classpath_container.clj
@@ -109,10 +109,10 @@

 (defn- artifacts-entry
   [dep repositories]
-  (let [main (resolve-artifact
-               (take 2 dep) ; take only id and version, not optional exclusion sections
-               repositories)
-        source (try-resolve-sources-artifact! dep repositories)]
+  (let [main (resolve-artifact (take 2 dep) repositories)
+        source (try-resolve-sources-artifact!
+                 (take 2 dep) ; take only id and version, not optional exclusion sections
+                 repositories)]
     (if source [(-> main meta :file)
                 (-> source meta :file)]
                nil)))


[#5277] [desktop] escape html tags in messages

--- components/src/status_im/ui/components/react.cljs
+++ components/src/status_im/ui/components/react.cljs
@@ -92,11 +92,17 @@
     (vec (map string/upper-case ts))
     ts))

+(defn escape-html [text]
+  (if (and platform/desktop? (string? text))
+    (clojure.string/escape text {\< "<", \> ">", \& "&"})
+   text))
+
 (defn text
   ([t]
-   [text-class t])
+   [text-class (escape-html t)])
   ([opts t & ts]
    (->> (conj ts t)
+        (map escape-html)
         (transform-to-uppercase opts)
         (concat [text-class (add-font-style :style opts)])
         (vec))))


Copy whole source dir per run in project template

--- project-template/src/clj/sketch/dynamic.clj
+++ project-template/src/clj/sketch/dynamic.clj
@@ -33,8 +33,8 @@

       ; use "bash -c" to support my WSL setup
       (sh "bash" "-c" "mkdir versioned-code")
-      (let [code-filename (str "versioned-code/dynamic-" seed ".clj")]
-        (sh "bash" "-c" (str "cp src/clj/sketch/dynamic.clj " code-filename)))
+      (let [code-dirname (str "versioned-code/" seed)]
+        (sh "bash" "-c" (str "cp -R src/ " code-dirname)))

       (println "setting seed to:" seed)
       (random-seed seed)


Use .. to access event props in demo bmi calc

--- demo/reagentdemo/intro.cljs
+++ demo/reagentdemo/intro.cljs
@@ -81,7 +81,7 @@
   [:input {:type "range" :value value :min min :max max
            :style {:width "100%"}
            :on-change (fn [e]
-                        (swap! bmi-data assoc param (.-target.value e))
+                        (swap! bmi-data assoc param (.. e -target -value))
                         (when (not= param :bmi)
                           (swap! bmi-data assoc :bmi nil)))}])


[#3083] Refactor: extract and reuse engine/data-group-by-tx logic

--- backend/src/akvo/lumen/lib/transformation/engine.clj
+++ backend/src/akvo/lumen/lib/transformation/engine.clj
@@ -163,18 +163,21 @@
     (throw (ex-info "Failed to transform. Transformation can't have columns from more than one data-group specified"
                     {:transformation transformation}))))

+(defn data-group-by-tx [transformation data-groups]
+  (let [columns-in-transformation (columns-used (w/keywordize-keys transformation) (reduce into [] (map :columns data-groups)))
+        _  (ensure-one-data-group-related transformation columns-in-transformation data-groups)
+        column-name (first columns-in-transformation)]
+    (datagroup-by-column data-groups column-name)))
+
 (defn try-apply-operation-2
   "adapt try-apply-operation to work with data-groups:
   1. find data-group related to transformation
   2. grab all data-group columns
   3. apply-operation
   4. separate transformation data-group columns from the others"
-  [{:keys [tenant-conn claims] :as deps}
-   {:keys [transformation data-groups]}]
-  (let [columns-in-transformation (columns-used (w/keywordize-keys transformation) (reduce into [] (map :columns data-groups)))
-        _  (ensure-one-data-group-related transformation columns-in-transformation data-groups)
-        column-name (first columns-in-transformation)
-        data-group (datagroup-by-column data-groups column-name)
+  [{:keys [tenant-conn] :as deps}
+   {:keys [transformation data-groups data-group]}]
+  (let [data-group (or data-group (data-group-by-tx transformation data-groups))
         source-table (:table-name data-group)
         other-dgs-columns (reduce (fn [c dg] (if (= (:id dg) (:id data-group))
                                                c (into c (:columns dg)))) [] data-groups)