Update clojure test based on upstream clj-aws-s3 of tag:0.3.10

--- client_tests/clojure/clj-s3/test/java_s3_tests/test/client.clj
+++ client_tests/clojure/clj-s3/test/java_s3_tests/test/client.clj
@@ -17,20 +17,11 @@
 (ns java-s3-tests.test.client
   (:import java.security.MessageDigest
            org.apache.commons.codec.binary.Hex
-           com.amazonaws.services.s3.model.AmazonS3Exception
-           com.amazonaws.services.s3.model.AccessControlList
-           com.amazonaws.services.s3.model.CanonicalGrantee
-           com.amazonaws.services.s3.model.GroupGrantee
-           com.amazonaws.services.s3.model.Grant
-           com.amazonaws.services.s3.model.Permission
-           com.amazonaws.services.s3.model.PutObjectRequest
-           com.amazonaws.services.s3.model.CreateBucketRequest
-           com.amazonaws.services.s3.model.ObjectMetadata
-           com.amazonaws.services.s3.transfer.TransferManager
-           com.amazonaws.services.s3.transfer.TransferManagerConfiguration)
+           com.amazonaws.services.s3.model.AmazonS3Exception)

   (:require [aws.sdk.s3 :as s3])
   (:require [java-s3-tests.user-creation :as user-creation])
+  (:require [clojure.tools.logging :as log])
   (:use midje.sweet))

 (def ^:internal riak-cs-host-with-protocol "http://localhost")
@@ -59,22 +50,22 @@
   (let [b (md5-byte-array input-byte-array)]
     (String. (Hex/encodeHex b))))

-(defn random-client
+(defn random-cred
   []
   (let [new-creds (user-creation/create-random-user
-                    riak-cs-host-with-protocol
-                    (get-riak-cs-port))]
-    (s3/client (:key_id new-creds)
-               (:key_secret new-creds)
-               {:proxy-host riak-cs-host
-                :proxy-port (get-riak-cs-port)
-                :protocol :http})))
-
-(defmacro with-random-client
-  "Execute `form` with a random-client
+                   riak-cs-host-with-protocol
+                   (get-riak-cs-port))]
+    {:endpoint "http://s3.amazonaws.com"
+     :access-key (:key_id new-creds)
+     :secret-key (:key_secret new-creds)
+     :proxy {:host riak-cs-host
+             :port (get-riak-cs-port)}}))
+
+(defmacro with-random-cred
+  "Execute `form` with a random-cred
   bound to `var-name`"
   [var-name form]
-  `(let [~var-name (random-client)]
+  `(let [~var-name (random-cred)]
      ~form))

 (defn random-string []
@@ -87,55 +78,41 @@
 (defn etag-suffix [etag]
   (subs etag (- (count etag) 2)))

-(defn create-manager [c]
-  (TransferManager. c))
-
-(defn configure-manager [tm]
-  (let [tm-config (.getConfiguration tm)]
-    (.setMultipartUploadThreshold tm-config 19)
-    (.setMinimumUploadPartSize tm-config 10)
-    (.setConfiguration tm tm-config)))
-
-(defn create-and-configure-manager [c]
-  (let [tm (create-manager c)]
-    (configure-manager tm)
-    tm))
-
-(defn upload-file [tm bucket-name object-name file-name]
-  (let [f (clojure.java.io/file file-name)
-        u (.upload tm bucket-name object-name f)]
-    (.waitForCompletion u)
+(defn upload-file [cred bucket key file-name part-size]
+  (let [f (clojure.java.io/file file-name)]
+    (s3/put-multipart-object cred bucket key f {:part-size part-size :threads 2})
     (.delete f)))

 (fact "bogus creds raises an exception"
-      (let [bogus-client
-            (s3/client "foo"
-                       "bar"
-                       {:endpoint (str "http://localhost:"
-                                       (get-riak-cs-port-str))})]
-        (s3/list-buckets bogus-client))
+      (let [bogus-cred
+            {:endpoint "http://s3.amazonaws.com"
+             :access-key "goo"
+             :secret-key "bar"
+             :proxy {:host riak-cs-host
+                     :port (get-riak-cs-port)}}]
+        (s3/list-buckets bogus-cred))
       => (throws AmazonS3Exception))

 (fact "new users have no buckets"
-        (with-random-client c
-          (s3/list-buckets c))
-        => [])
+      (with-random-cred c
+        (s3/list-buckets c))
+      => [])

 (let [bucket-name (random-string)]
   (fact "creating a bucket should list
         one bucket in list buckets"
-        (with-random-client c
+        (with-random-cred c
           (do (s3/create-bucket c bucket-name)
-            ((comp :name first) (s3/list-buckets c))))
+              ((comp :name first) (s3/list-buckets c))))
         => bucket-name))

 (let [bucket-name (random-string)
       object-name (random-string)]
   (fact "simple put works"
-        (with-random-client c
-          (do (s3/create-bucket c bucket-name)
-            (s3/put-object c bucket-name object-name
-                           "contents")))
+        (with-random-cred cred
+          (do (s3/create-bucket cred bucket-name)
+              (s3/put-object cred bucket-name object-name
+                             "contents")))
         => truthy))

 (let [bucket-name (random-string)
@@ -143,11 +120,11 @@
       value "this is the value!"]
   (fact "the value received during GET is the same
         as the object that was PUT"
-        (with-random-client c
+        (with-random-cred c
           (do (s3/create-bucket c bucket-name)
-            (s3/put-object c bucket-name object-name
-                           value)
-            ((comp slurp :content) (s3/get-object c bucket-name object-name))))
+              (s3/put-object c bucket-name object-name
+                             value)
+              ((comp slurp :content) (s3/get-object c bucket-name object-name))))
         => value))

 (let [bucket-name (random-string)
@@ -158,7 +135,7 @@
   (fact "check that the etag of the response
         is the same as the md5 of the original
         object"
-        (with-random-client c
+        (with-random-cred c
           (do (s3/create-bucket c bucket-name)
             (s3/put-object c bucket-name object-name
                            value)
@@ -171,17 +148,16 @@
       object-name (random-string)
       value (str "aaaaaaaaaa" "bbbbbbbbbb")
       file-name "./clj-mp-test.txt"]
-  (fact "mulitpart upload works"
-        (with-random-client c
-          (do
-            (s3/create-bucket c bucket-name)
-            (let [tm (create-and-configure-manager c)]
-              (write-file file-name value)
-              (upload-file tm bucket-name object-name file-name)
-              (let [fetched-object (s3/get-object
-                                      c bucket-name object-name)]
-                  [((comp slurp :content) fetched-object)
-                   ((comp etag-suffix :etag :metadata) fetched-object)]))))
+  (fact "multipart upload works"
+        (with-random-cred c
+          (do
+            (s3/create-bucket c bucket-name)
+            (write-file file-name value)
+            (upload-file c bucket-name object-name file-name 10)
+            (let [fetched-object (s3/get-object
+                                  c bucket-name object-name)]
+              [((comp slurp :content) fetched-object)
+               ((comp etag-suffix :etag :metadata) fetched-object)])))
         => [value, "-2"]))

 (let [bucket-name (random-string)
@@ -189,7 +165,7 @@
       value "this is the real value"
       wrong-md5 "2945d7de2f70de5b8c0cb3fbcba4fe92"]
   (fact "Bad content md5 throws an exception"
-        (with-random-client c
+        (with-random-cred c
           (do
             (s3/create-bucket c bucket-name)
             (s3/put-object c bucket-name object-name value
@@ -199,61 +175,51 @@
 (def bad-canonical-id
   "0f80b2d002a3d018faaa4a956ce8aa243332a30e878f5dc94f82749984ebb30b")

-(def full-control
-  (Permission/FullControl))
-
-(def read-grant
-  (Permission/Read))
-
-(def write-grant
-  (Permission/Write))
-
 (let [bucket-name (random-string)
       object-name (random-string)
       value-string "this is the real value"]
   (fact "Nonexistent canonical-id grant header returns HTTP 400 on
         a put object request (not just an ACL subresource request)"
-        (with-random-client c
+        (with-random-cred c
           (do
             ;; create a bucket
             (s3/create-bucket c bucket-name)
-
-            (let [value (input-stream-from-string value-string)
-                  bad-id-grantee (CanonicalGrantee. bad-canonical-id)
-                  metadata (ObjectMetadata.)
-                  req (PutObjectRequest. bucket-name object-name value metadata)
-                  acl (AccessControlList.)]
-
-              ;; grant permission to the nonexistent-user
-              (.grantPermission acl bad-id-grantee full-control)
-
-              (.setAccessControlList req acl)
-              (.putObject c req))))
+            (s3/put-object c bucket-name object-name value-string {}
+                           (s3/grant {:id bad-canonical-id} :full-control))))
         => (throws AmazonS3Exception)))

-(def all-users (GroupGrantee/AllUsers))
-
 (let [bucket-name (random-string)
       object-name (random-string)
       value-string "this is the real value"
-      grant (Grant. all-users read-grant)]
+      public-read-grant {:grantee :all-users, :permission :read}]
   (fact "Creating an object with an ACL returns the same ACL when you read
         the ACL"
-        (with-random-client c
+        (with-random-cred c
           (do
             ;; create a bucket
             (s3/create-bucket c bucket-name)
-
-            (let [value (input-stream-from-string value-string)
-                  metadata (ObjectMetadata.)
-                  acl (AccessControlList.)
-                  req (PutObjectRequest. bucket-name object-name value metadata)]
-              (.grantPermission acl all-users read-grant)
-              (.setAccessControlList req acl)
-              (.putObject c req)
-              (contains?
-                (.getGrants (.getObjectAcl c bucket-name object-name))
-                grant))))
+            (s3/put-object c bucket-name object-name value-string {}
+                           (s3/grant :all-users :read))
+            (contains?
+             (:grants (s3/get-object-acl c bucket-name object-name))
+             public-read-grant)))
+        => truthy))
+
+(let [bucket-name (random-string)
+      object-name (random-string)
+      value-string "this is the real value"
+      public-read-grant {:grantee :all-users, :permission :read}]
+  (fact "Creating an object with an ACL returns the same ACL when you read
+        the ACL"
+        (with-random-cred c
+          (do
+            ;; create a bucket
+            (s3/create-bucket c bucket-name)
+            (s3/put-object c bucket-name object-name value-string {}
+                           (s3/grant :all-users :read))
+            (contains?
+             (:grants (s3/get-object-acl c bucket-name object-name))
+             public-read-grant)))
         => truthy))

 (let [bucket-name (random-string)
@@ -261,59 +227,56 @@
       value-string "this is the real value"]
   (fact "Creating an object with an (non-canned) ACL returns the same ACL
         when you read the ACL"
-        (with-random-client c
-          (do
-            ;; create a bucket
-            (s3/create-bucket c bucket-name)
-
-            (let [value (input-stream-from-string value-string)
-                  metadata (ObjectMetadata.)
-                  user-two-id (:id (user-creation/create-random-user
-                                     riak-cs-host-with-protocol
-                                     (get-riak-cs-port)))
-                  id-grantee (CanonicalGrantee. user-two-id)
-                  grant (Grant. id-grantee read-grant)
-                  acl (AccessControlList.)
-                  req (PutObjectRequest. bucket-name object-name value metadata)]
-              (.grantPermission acl id-grantee read-grant)
-              (.setAccessControlList req acl)
-              (.putObject c req)
+        (with-random-cred c
+          (do
+            (s3/create-bucket c bucket-name)
+            (let [user-two (user-creation/create-random-user
+                            riak-cs-host-with-protocol
+                            (get-riak-cs-port))
+                  user-two-id (:id user-two)
+                  user-two-name (:display_name user-two)
+                  acl-grant {:grantee {:id user-two-id, :display-name user-two-name},
+                             :permission :read}]
+              (s3/put-object c bucket-name object-name value-string {}
+                             (s3/grant {:id user-two-id} :read))
               (contains?
-                (.getGrants (.getObjectAcl c bucket-name object-name))
-                grant))))
-        => truthy))
-
-(let [bucket-name (random-string)
-      object-name (random-string)
-      grant (Grant. all-users read-grant)]
+                (:grants (s3/get-object-acl c bucket-name object-name))
+                acl-grant))))
+        => truthy))
+
+(let [bucket-name (random-string)
+      object-name (random-string)
+      public-read-grant {:grantee :all-users, :permission :read}]
   (fact "Creating a bucket with an ACL returns the same ACL when you read
         the ACL"
-        (with-random-client c
-            (let [acl (AccessControlList.)
-                  req (CreateBucketRequest. bucket-name)]
-              (.grantPermission acl all-users read-grant)
-              (.setAccessControlList req acl)
-              (.createBucket c req)
-              (contains?
-                (.getGrants (.getBucketAcl c bucket-name))
-                grant)))
+        (with-random-cred c
+          (do
+            ;; TODO: not created with ACL, should extend s3/create-bucket
+            (s3/create-bucket c bucket-name)
+            (s3/update-bucket-acl c bucket-name
+                                  (s3/grant :all-users :read))
+            (contains?
+             (:grants (s3/get-bucket-acl c bucket-name))
+             public-read-grant)))
         => truthy))

 (let [bucket-name (random-string)]
   (fact "Creating a bucket with an (non-canned) ACL returns the same ACL
         when you read the ACL"
-        (with-random-client c
-          (let [user-two-id (:id (user-creation/create-random-user
-                                   riak-cs-host-with-protocol
-                                   (get-riak-cs-port)))
-                id-grantee (CanonicalGrantee. user-two-id)
-                grant (Grant. id-grantee write-grant)
-                acl (AccessControlList.)
-                req (CreateBucketRequest. bucket-name)]
-            (.grantPermission acl id-grantee write-grant)
-            (.setAccessControlList req acl)
-            (.createBucket c req)
-            (contains?
-              (.getGrants (.getBucketAcl c bucket-name))
-              grant)))
-        => truthy))
+        (with-random-cred c
+          (do
+            (let [user-two (user-creation/create-random-user
+                            riak-cs-host-with-protocol
+                            (get-riak-cs-port))
+                  user-two-id (:id user-two)
+                  user-two-name (:display_name user-two)
+                  acl-grant {:grantee {:id user-two-id, :display-name user-two-name},
+                             :permission :write}]
+              ;; TODO: not created with ACL, should extend s3/create-bucket
+              (s3/create-bucket c bucket-name)
+              (s3/update-bucket-acl c bucket-name
+                                    (s3/grant {:id user-two-id} :write))
+              (contains?
+               (:grants (s3/get-bucket-acl c bucket-name))
+               acl-grant))))
+        => truthy))


Disable the compiler `process` shim by default (#93)

Fixes #92

--- templates/cljs-lambda/src/leiningen/new/cljs_lambda/project.clj
+++ templates/cljs-lambda/src/leiningen/new/cljs_lambda/project.clj
@@ -23,6 +23,7 @@
              :compiler {:output-to     "target/{{name}}/{{sanitized}}.js"
                         :output-dir    "target/{{name}}"
                         :source-map    true
+                        :process-shim  false
                         :target        :nodejs
                         :language-in   :ecmascript5
                         :optimizations :none}}


Remove classes and add comments

Remove classes and add comments

--- src-cljs/frontend/components/pieces/button.cljs
+++ src-cljs/frontend/components/pieces/button.cljs
@@ -172,7 +172,8 @@
     (html
      [:div {:style {:display "flex"}}

-      [:div.primary {:style {:margin-right "2em"}}
+      ;; Primary buttons
+      [:div {:style {:margin-right "2em"}}
        [:div {:style {:margin-bottom "1em"}}
         (link {:kind :primary
               :href "#"}
@@ -183,7 +184,8 @@
               :size :medium}
              "Medium Primary Link")]]

-      [:div.secondary {:style {:margin-right "2em"}}
+      ;; Secondary buttons
+      [:div {:style {:margin-right "2em"}}
        [:div {:style {:margin-bottom "1em"}}
         (link {:href "#"}
              "Secondary Link")]
@@ -192,7 +194,8 @@
               :size :medium}
              "Medium Secondary Link")]]

-      [:div.danger {:style {:margin-right "2em"}}
+      ;; Danger buttons
+      [:div {:style {:margin-right "2em"}}
        [:div {:style {:margin-bottom "1em"}}
         (link {:kind :danger
               :href "#"}
@@ -202,7 +205,9 @@
               :href "#"
               :size :medium}
              "Medium Danger Link")]]
-      [:div.flat {:style {:margin-right "2em"}}
+
+      ;; Flat buttons
+      [:div {:style {:margin-right "2em"}}
        [:div {:style {:margin-bottom "1em"}}
         (link {:kind :flat
               :href "#"}


Add doc for evaluate-model test.

Add doc for evaluate-model test.

--- project/analyze-data/test/analyze_data/evaluate_model_test.clj
+++ project/analyze-data/test/analyze_data/evaluate_model_test.clj
@@ -32,4 +32,6 @@
 (deftest evaluate-model-test
   (is (= {"one" {"one" 2, "two" 0}
           "two" {"one" 1, "two" 0}}
-         (test-ns/evaluate-model knn-model test-corpus))))
+         (test-ns/evaluate-model knn-model test-corpus))
+      "evaluates a model"))
+


trigger/id is now mandatory.

trigger/id is now mandatory.

--- test/onyx/plugin/input_recovery_test.clj
+++ test/onyx/plugin/input_recovery_test.clj
@@ -119,6 +119,7 @@
                  triggers [{:trigger/window-id :collect-segments
                             :trigger/refinement :onyx.refinements/accumulating
                             :trigger/fire-all-extents? true
+                            :trigger/id :collect-trigger
                             :trigger/on :onyx.triggers/segment
                             :trigger/threshold [1 :elements]
                             :trigger/sync ::update-atom!}]


add more debug info

add more debug info

--- src/babel/english/lexicon.cljc
+++ src/babel/english/lexicon.cljc
@@ -2318,11 +2318,12 @@
                     (unifyc
                      (dissoc-paths lexeme [[:synsem :sem :obj]
                                            [:synsem :subcat :2]])
-                     {:synsem {:subcat {:2 '()}}})))
-
+                     {:applied {:rule 1}
+                      :synsem {:subcat {:2 '()}}})))
+
                  (default ;; intransitive verbs' :obj is :unspec.
                   {:modal-with false
-                   :applied {:rule 1}
+                   :applied {:rule 2}
                    :synsem {:cat :verb
                             :subcat {:1 {:top :top}
                                      :2 '()}


CMR-2352 Change unit tests to use PORT var rather than hardcode

--- common-lib/test/cmr/common/test/api/web_server.clj
+++ common-lib/test/cmr/common/test/api/web_server.clj
@@ -74,14 +74,14 @@
         ; other than a 413 to fail the test if it doesn't come back with an exception and instead
         ; a 200 or something
         (try
-          (let [result (h/post "http://localhost:3123" {:body (str/join (repeat 200001 "0"))
-                                                        :headers {"Content-Type" "application/x-www-form-urlencoded"}})]
+          (let [result (h/post (str "http://localhost:" PORT) {:body (str/join (repeat 200001 "0"))}
+                                                        :headers {"Content-Type" "application/x-www-form-urlencoded"})]
             (is (= 413 (:status result))))
           (catch Exception e
             (is (= (.getMessage e) "clj-http: status 413")))))
       (testing "maximum post body size ok"
-        (let [result (h/post "http://localhost:3123" {:body (str/join (repeat 200000 "0"))
-                                                      :headers {"Content-Type" "application/x-www-form-urlencoded"}})]
+        (let [result (h/post (str "http://localhost:" PORT) {:body (str/join (repeat 200000 "0"))
+                                                             :headers {"Content-Type" "application/x-www-form-urlencoded"}})]
           (is (= 200 (:status result)))))
       (finally
         (l/stop server nil)))))


Use turboshrimp/default-video-port.

Use turboshrimp/default-video-port.

--- examples/controller.clj
+++ examples/controller.clj
@@ -165,11 +165,12 @@
   (.drawImage g image 0 0 (.getWidth view) (.getHeight view) nil))

-(def drone-video-port 5555)
+(defn get-video-input-stream [drone]
+  (.getInputStream (Socket. (:hostname drone) ar-drone/default-video-port)))

 (defn connect-video-controller [ui drone]
-  (let [is (.getInputStream (Socket. (:hostname drone) drone-video-port))
+  (let [is (get-video-input-stream drone)
         fq (pave/make-frame-queue)
         ^JPanel view (seesaw/select ui [:#video])
         decoder (video/decoder)]


Update data-pack building.

Update data-pack building.

--- src/cljs/hatnik/web/client/form/add_action.cljs
+++ src/cljs/hatnik/web/client/form/add_action.cljs
@@ -43,7 +43,8 @@
       (let [; Make local copy of data to be sure it doesn't play tricks with us.
             data-pack (select-keys data [:type :project-id :artifact-value
                                          :gh-repo :gh-issue-title :gh-issue-body
-                                         :email-body :email-subject])]
+                                         :email-body :email-subject
+                                         :gh-pull-body :gh-pull-title :gh-comm-msg :gh-operations])]
         (dom/div nil
                  (dom/button

@@ -75,7 +76,8 @@
       (let [; Make local copy of data to be sure it doesn't play tricks with us.
             data-pack (select-keys data [:type :project-id :artifact-value
                                          :gh-repo :gh-issue-title :gh-issue-body
-                                         :email-body :email-subject :action-id])]
+                                         :email-body :email-subject :action-id
+                                         :gh-pull-body :gh-pull-title :gh-comm-msg :gh-operations])]
           (dom/div
            nil
            (dom/button


Add Test button hiding.

Add Test button hiding.

--- src/cljs/hatnik/web/client/form/add_action.cljs
+++ src/cljs/hatnik/web/client/form/add_action.cljs
@@ -124,14 +124,15 @@
                                    :user-email email
                                    :email-template template})} "Submit")

-                 (dom/button
-                  #js {:className "btn btn-default"
-                       :onClick #(action/test-action
-                                  {:type type
-                                   :project-id project-id
-                                   :artifact-value artifact
-                                   :user-email email
-                                   :email-template template})} "Test"))))))
+                 (when-not (= :noop type)
+                   (dom/button
+                    #js {:className "btn btn-default"
+                         :onClick #(action/test-action
+                                    {:type type
+                                     :project-id project-id
+                                     :artifact-value artifact
+                                     :user-email email
+                                     :email-template template})} "Test")))))))

 (defn update-action-footer [data owner]
   (reify
@@ -155,14 +156,15 @@
                               :user-email email
                               :email-template template})} "Update")

-           (dom/button
-            #js {:className "btn btn-default"
-                 :onClick #(action/test-action
-                            {:type type
-                             :project-id project-id
-                             :artifact-value artifact
-                             :user-email email
-                             :email-template template})} "Test"))))))
+           (when-not (= :noop type)
+             (dom/button
+              #js {:className "btn btn-default"
+                   :onClick #(action/test-action
+                              {:type type
+                               :project-id project-id
+                               :artifact-value artifact
+                               :user-email email
+                               :email-template template})} "Test")))))))

 (def default-email-template
   (str "Hello there\n\n"


Added a helper function to lookup CSS Module class names within Reagent's Hiccup style templates

--- src/clojurescript_css_modules_demo/js/core.cljs
+++ src/clojurescript_css_modules_demo/js/core.cljs
@@ -1,37 +1,59 @@
 (ns ^:figwheel-always clojurescript-css-modules-demo.js.core
-    (:require [cssModules]
-              [reagent.core :as r]))
+  (:require [cssModules]
+            [reagent.core :as r]
+            [clojure.string :as string]
+            [cljs.reader :as reader]
+            ))

 (enable-console-print!)

 (println "CSS Modules:" js/cssModules)

+(defn get-css
+  "Helper fn that takes Reagent's hiccup syntax and replaces .CSS>x classes with their respective CSS module name(s). See usage in header below."
+  [i]
+  (let [stringified (str i)
+        class-lookup (re-find #"(?:CSS>)[^\s]+" stringified)
+        tree (rest (string/split class-lookup #">"))
+        class-names (apply aget (js* "cssModules") tree)
+        joined-class-names (string/replace-all class-names #" " ".")
+        output (reader/read-string (string/replace-first stringified #"(?:CSS>)[^\s]+" joined-class-names))
+        finished? (nil? (re-find #"(?:CSS>)[^\s]+" (str output)))]
+
+    (if finished?
+      output
+      (recur output))))
+
 (defn header []
-      [:div
-       {:class-name (aget js/cssModules "header" "container")}
-       [:p ".container from header.css"]
+  (get-css
+    ; we can wrap out reagent templates with get-css and use the syntax below to lookup/replace with the correct css classes
+    [:div.CSS>header>container
+     ;alternatively, you can use the below and lookup the cssModules object directly
+     ;{:class-name (aget js/cssModules "header" "container")}
+     [:p ".container from header.css"]

-       [:div
-        {:class-name (aget js/cssModules "header" "logo")}
-        [:p ".logo from header.css"]
-        ]
+     [:div.CSS>header>logo
+      ;{:class-name (aget js/cssModules "header" "logo")}
+      [:p ".logo from header.css"]
+      ]

-       [:div
-        {:class-name (aget js/cssModules "header" "site-name")}
-        [:p ".site-name from header.css"]
-        ]
+     [:div.CSS>header>site-name
+      ;{:class-name (aget js/cssModules "header" "site-name")}
+      [:p ".site-name from header.css"]
+      ]

-       ])
+     ]
+    )
+  )

 (defn mount-root []
-      (r/render [header]
-                      (.getElementById js/document "app")))
+  (r/render [header]
+            (.getElementById js/document "app")))

 (defn ^:export init []
-      (do
-        (println "Loading")
-        (mount-root)
-        ))
+  (do
+    (println "Loading")
+    (mount-root)
+    ))

-(init)
-
+(init)


Log when stopping a destination.

Log when stopping a destination.

--- modules/messaging/src/main/clojure/immutant/messaging/core.clj
+++ modules/messaging/src/main/clojure/immutant/messaging/core.clj
@@ -121,6 +121,7 @@
    :else (throw (destination-name-error dest))))

 (defn stop-destination [name]
+  (log/info (format "Stopping %s: %s" (if (queue-name? name) "queue" "topic") name))
   (let [izer (registry/get "destinationizer")
         manager (registry/get "jboss.messaging.default.jms.manager")
         removed? (when izer


Add function for making an id from a comic-map's url

--- src/clj/comic_reader/sites.clj
+++ src/clj/comic_reader/sites.clj
@@ -7,6 +7,11 @@
         {url :href} :attrs}]
     {:name (process-name name)
      :url (process-url url)}))
+
+(defn gen-add-id-from-url [extract-pattern]
+  (fn [{:keys [url] :as comic-map}]
+    (let [id (re-find extract-pattern url)]
+      (assoc comic-map :id id))))

 (def list
   [(let [canonical-url "http://mangafox.me"


Eden Fragment implementation style fixes

--- src/clj/game/cards-agendas.clj
+++ src/clj/game/cards-agendas.clj
@@ -154,12 +154,12 @@

    "Eden Fragment"
    {:abilities [{:cost [:click 1] :msg "install the first piece of ICE this turn at no cost"
-                :prompt "Select a piece of ICE to install from the HQ"
-                :choices {:req #(and (:side % "Corp")
-                                   (ice? %)
-                                   (= (:zone %) [:hand]))}
-                :effect (req (corp-install state side target nil
-                                           {:no-install-cost true}))}]}
+                 :prompt "Select a piece of ICE from HQ to install"
+                 :choices {:req #(and (:side % "Corp")
+                                      (ice? %)
+                                      (= (:zone %) [:hand]))}
+                 :effect (req (corp-install state side target nil
+                                            {:no-install-cost true}))}]}

    "Efficiency Committee"
    {:effect (effect (add-prop card :counter 3))


small copyright change and println removal

--- src/clj_ns_browser/browser.clj
+++ src/clj_ns_browser/browser.clj
@@ -295,7 +295,7 @@
 (add-app-action :go-about-action
   (action :name "About..."
           :handler (fn [a] (invoke-later (alert (str "Clojure Namespace Browser (" clj-ns-browser-version ")" \newline
-            "Copyright (C) 2012 - Frank Siebenlist" \newline
+            "Copyright (C) 2012 - Frank Siebenlist and Andy Fingerhut" \newline
             "Distributed under the Eclipse Public License"))))))

 (add-app-action :zoom-in-action
@@ -1073,7 +1073,6 @@
         (let [sym1 (symbol fqn)
               name1 (name sym1)
               ns1 (try (namespace sym1)(catch Exception e))]
-          (println "ns1,name1,fqn" ns1 name1 fqn)
           (if ns1
             ;; we have a fq-var as a-ns/a-name
             (invoke-soon


wii register teams

wii register teams

--- src/clj_team_tasks/handler.clj
+++ src/clj_team_tasks/handler.clj
@@ -2,15 +2,27 @@
   (:use compojure.core)
   (:require [compojure.handler :as handler]
             [compojure.route :as route]
-            [net.cgrand.enlive-html :as html]))
+            [net.cgrand.enlive-html :as html]
+            [ring.util.response :refer [redirect]]))

+(def state (atom {
+                  :teams {}}))
+
+(defn rand-id [id-set]
+  (let [next-ids (repeatedly #(rand-int Integer/MAX_VALUE))]
+    (first (remove id-set next-ids))))
+
+
+(defn make-team [teams]
+  (let [id (rand-id (set (keys teams)))]
+    (assoc teams id {})))

 (html/deftemplate index-page "templates/index.html" [])
 ;;------------------------------------------------------------------------------------------------

 (defroutes app-routes
   (GET "/" [] (reduce str (index-page)))
-  (GET "/register" [] "Found")
+  (GET "/register" [] (str (swap! state #(update-in % [:teams] make-team)))) ;; TODO How to get the added ID so that we can redirect to it?!
   (route/resources "/")
   (route/not-found "Not Found"))


Add an effect handler for calling api functions

--- src/cljs/comic_reader/api.cljs
+++ src/cljs/comic_reader/api.cljs
@@ -12,7 +12,30 @@
 (def ^:private add-error
   (fnil conj []))

+(declare get-sites
+         get-comics
+         get-prev-locations
+         get-next-locations)
+
+(def ^:private api-fn
+  (delay
+   {:get-sites          get-sites
+    :get-comics         get-comics
+    :get-prev-locations get-prev-locations
+    :get-next-locations get-next-locations}))
+
+(defn null-fn [& args])
+
+(defn call-api-fn [fn-key args]
+  (apply (get @api-fn fn-key null-fn) args))
+
 (defn setup! []
+  (re-frame/reg-fx
+   :api
+   (fn [calls]
+     (doseq [[fn-key & args] calls]
+       (call-api-fn fn-key args))))
+
   (re-frame/reg-sub
    errors-subscription-key
    (fn [app-db _]


Arrange number of articles in top page

Arrange number of articles in top page

--- src/clojournal/routes/home.clj
+++ src/clojournal/routes/home.clj
@@ -11,7 +11,7 @@

 (defn home-page [page]
   (layout/render
-    "home.html" {:articles (article/latest-articles page 2)}))
+    "home.html" {:articles (article/latest-articles page 5)}))

 (defn about-page []
   (layout/render "about.html"))


Update core.clj

Update core.clj

--- src/clojure_car_price/core.clj
+++ src/clojure_car_price/core.clj
@@ -1,13 +1,13 @@
 (ns clojure_car_price.core
   (:use compojure.core)
   (:require [compojure.handler :as handler]
-				[compojure.route :as route]
-				[ring.middleware.basic-authentication :refer :all]
-				[ring.util.response :as resp]
-				[clojure_car_price.models.cars :as cars-model]
-				[clojure_car_price.models.manufracturer :as man-model]
-				[clojure_car_price.controllers.index :as controller]
-				[clojure_car_price.models.datamin :as datamin-model]))
+	    [compojure.route :as route]
+	    [ring.middleware.basic-authentication :refer :all]
+            [ring.util.response :as resp]
+            [clojure_car_price.models.cars :as cars-model]
+	    [clojure_car_price.models.manufracturer :as man-model]
+	    [clojure_car_price.controllers.index :as controller]
+	    [clojure_car_price.models.datamin :as datamin-model]))

 ;(defn authenticated? [name pass]


Use newMemoryDirectDB instead of newDirectMemoryDB

Renamed in
https://github.com/jankotek/MapDB/commit/3d7a6fbfa18922385918976c9de1a73ce180f6bc

--- kafka-clj/src/kafka_clj/msg_persist.clj
+++ kafka-clj/src/kafka_clj/msg_persist.clj
@@ -97,9 +97,9 @@
                                                                       send-cache-expire-after-write 5
                                                                       send-cache-expire-after-access 5}}]
   "Returns {:db db :cache cache}
-   db is the DBMaker newDirectMemoryDB result
+   db is the DBMaker newMemoryDirectDB result
    and cach is a HTreeMap cache"
-   (let [^DB db (-> (DBMaker/newDirectMemoryDB)
+   (let [^DB db (-> (DBMaker/newMemoryDirectDB)
                  (.sizeLimit (int send-cache-size-limit))     ;limit store size to 2GB
                  (.transactionDisable)    ;better performance
                  (.make))


removing need for project.clj for some tasks

--- lein-gaeshi/src/gaeshi/kuzushi/main.clj
+++ lein-gaeshi/src/gaeshi/kuzushi/main.clj
@@ -14,7 +14,7 @@
     (run-with-bindings args)))

 (defn run-with-args [& args]
-  (if (= "new" (first args))
+  (if (#{"new" "help" "version"} (first args))
     (run-with-bindings args)
     (binding [*project* (load-lein-project)]
       (run-with-bindings args))))


remove stale dep

remove stale dep


Start 2.5.2-SNAPSHOT

Start 2.5.2-SNAPSHOT


Restring plan modifications to org admins if piggiebacking.

--- src-cljs/frontend/components/org_settings.cljs
+++ src-cljs/frontend/components/org_settings.cljs
@@ -212,7 +212,7 @@
 (defn pluralize-no-val [num word]
   (if (> num 1) (infl/plural word) (infl/singular word)))

-(defn osx-plan [{:keys [plan-type plan price current-plan]} owner]
+(defn osx-plan [{:keys [plan-type plan org-name price current-plan]} owner]
   (reify
     om/IRender
     (render [_]
@@ -226,25 +226,30 @@
                                 false)
             plan-selected? (= plan-type-key (keyword current-plan))
             plan-img     [:img {:src (utils/cdn-path (str "img/inner/" plan-type "-2x.png"))}]
-            loading-img  [:img {:src (utils/cdn-path (str "img/inner/" plan-type "-loading-2x.png"))}]]
+            loading-img  [:img {:src (utils/cdn-path (str "img/inner/" plan-type "-loading-2x.png"))}]
+            editable?    (or (not (pm/piggieback? plan org-name)) (pm/admin? plan))]
         (html
           (if (pm/osx? plan)
             (if plan-selected?
               [:img.selected {:src (utils/cdn-path (str "img/inner/" plan-type "-selected-2x.png"))}]
+              (if editable?
+                (forms/managed-button
+                  [:a.unselected
+                   {:data-success-text plan-img
+                    :data-loading-text loading-img
+                    :data-failed-text  plan-img
+                    :on-click          update-plan-fn}
+                   plan-img])
+                [:img.unselected {:src (utils/cdn-path (str "img/inner/" plan-type "-selected-2x.png"))}]))
+            (if editable?
               (forms/managed-button
                 [:a.unselected
                  {:data-success-text plan-img
-                  :data-loading-text loading-img
-                  :data-failed-text plan-img
-                  :on-click update-plan-fn}
-                 plan-img]))
-            (forms/managed-button
-              [:a.unselected
-               {:data-success-text plan-img
-                :data-loading-text plan-img
-                :data-failed-text plan-img
-                :on-click new-plan-fn}
-               plan-img])))))))
+                  :data-loading-text plan-img
+                  :data-failed-text  plan-img
+                  :on-click          new-plan-fn}
+                 plan-img])
+              [:img.unselected {:src (utils/cdn-path (str "img/inner/" plan-type "-selected-2x.png"))}])))))))

 (def osx-faq-items
   [{:question (list
@@ -310,7 +315,7 @@
             [:dt question]
             [:dd answer]))]]))))

-(defn osx-plans [plan owner]
+(defn osx-plans [{:keys [plan org-name]} owner]
   (reify
     om/IRender
     (render [_]
@@ -320,9 +325,9 @@
            [:fieldset
             [:legend (str "iOS Limited Release Plans - The below selection only applies to iOS service and will not affect the Linux Containers above.")]]
            [:div.plan-selection
-            (om/build osx-plan {:plan plan :price 79 :plan-type "starter" :current-plan current-plan})
-            (om/build osx-plan {:plan plan :price 139 :plan-type "standard" :current-plan current-plan})
-            (om/build osx-plan {:plan plan :price 279 :plan-type "growth" :current-plan current-plan})
+            (om/build osx-plan {:plan plan :org-name org-name :price 79 :plan-type "starter" :current-plan current-plan})
+            (om/build osx-plan {:plan plan :org-name org-name :price 139 :plan-type "standard" :current-plan current-plan})
+            (om/build osx-plan {:plan plan :org-name org-name :price 279 :plan-type "growth" :current-plan current-plan})
             [:a.unselected {:href "mailto:sayhi@circleci.com"}
              [:img {:src (utils/cdn-path "img/inner/mobile-focused-2x.png")}]]]])))))

@@ -465,7 +470,7 @@
            (when (and (feature/enabled? :osx-plans)
                       (get-in app state/org-osx-beta-path))
              (list
-              (om/build osx-plans plan)
+              (om/build osx-plans {:plan plan :org-name org-name})
               (om/build osx-faq osx-faq-items)))])))))

 (defn piggyback-organizations [app owner]


Allow boolean false values to be bound in queries

This fixes a bug where binding a boolean false value in a query would
cause the query to be rejected with a "Could not coerce nil value... "
exception.

This resolves #177

--- src/grafter_2/rdf4j/sparql.clj
+++ src/grafter_2/rdf4j/sparql.clj
@@ -237,7 +237,7 @@
         prepped-query (repo/prepare-query repo pre-processed-qry nil opts)]
     (reduce (fn [pq [unbound-var val]]
               (when-not (or (sequential? val) (set? val))
-                (if (and val (satisfies? rio/IRDF4jConverter val))
+                (if (and (some? val) (satisfies? rio/IRDF4jConverter val))
                   (.setBinding pq (name unbound-var) (rio/->backend-type val))
                   (throw (ex-info (str "Could not coerce nil value into SPARQL binding for variable " unbound-var)
                                   {:variable unbound-var :bindings bindings :sparql-query sparql-query}))))


GAWB-1622: changing ref to be something smarter than ref

--- src/cljs/main/broadfcui/common/codemirror.cljs
+++ src/cljs/main/broadfcui/common/codemirror.cljs
@@ -62,12 +62,12 @@
    :render
    (fn [{:keys [props]}]
      [:div {:style {:border style/standard-line}}
-      [:textarea {:ref "ref" :defaultValue (:text props)}]])
+      [:textarea {:ref "wdl-text" :defaultValue (:text props)}]])
    :component-did-mount #((:this %) :display-wdl)
    :display-wdl
    (fn [{:keys [refs props locals]}]
      (swap! locals assoc :code-mirror-component
-            (js-invoke CodeMirror-js "fromTextArea" (@refs "ref")
+            (js-invoke CodeMirror-js "fromTextArea" (@refs "wdl-text")
                        #js{:mode "wdl" :lineNumbers (:line-numbers? props) :readOnly (:read-only? props)})))
    :component-will-receive-props
    (fn [{:keys [refs props next-props locals]}]


Introduce cassaforte.client/execute-async which returns a future

References #47.

--- src/clojure/clojurewerkz/cassaforte/client.clj
+++ src/clojure/clojurewerkz/cassaforte/client.clj
@@ -174,9 +174,8 @@
   [query & values]
   (vector query values))

-;; TODO: separate async and sync versions
 (defn execute
-  "Executes a pre-built query
+  "Executes a pre-built query.

    Options
      * prepared - whether the query should or should not be executed as prepared, always passed
@@ -195,6 +194,24 @@
            res                     (.getUninterruptibly future)]
        (conv/to-clj res))))

+(defn ^ResultSetFuture execute-async
+  "Executes a pre-built query and returns a future.
+
+   Options
+     * prepared - whether the query should or should not be executed as prepared, always passed
+       explicitly, because `execute` is considered to be a low-level function."
+  ([^Session session query]
+     (execute-async session query {}))
+  ([^Session session query {:keys [prepared]}]
+     (let [^Statement statement (if prepared
+                                  (if (coll? query)
+                                    (build-statement (prepare session (first query))
+                                                     (second query))
+                                    (throw (IllegalArgumentException.
+                                            "Query is meant to be executed as prepared, but no values were supplied.")))
+                                  (build-statement query))]
+       (.executeAsync session statement))))
+
 (defn ^String export-schema
   "Exports the schema as a string"
   [^Session client]


Fix bug with deploying when more than one device is attached

--- src/leiningen/droid/deploy.clj
+++ src/leiningen/droid/deploy.clj
@@ -29,8 +29,8 @@
       1 (:serial (first devices))
       (do
         (dotimes [i (count devices)]
-          (println (format "%d. %s\t\t%s" (inc i) (:serial (nth devices i)))
-                   (:type (nth devices i))))
+          (println (format "%d. %s\t%s" (inc i) (:serial (nth devices i))
+                           (:type (nth devices i)))))
         (print (format "Enter the number 1..%d to choose the device: "
                        (count devices)))
         (flush)


cleanup

cleanup

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@10250 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- plugins/SlideExplorer2/src/slide_explorer/canvas.clj
+++ plugins/SlideExplorer2/src/slide_explorer/canvas.clj
@@ -81,8 +81,8 @@

 (defn set-g2d-state [g2d {:keys [alpha color stroke rotate x y
                                  scale scale-x scale-y]}]
-  (doto g2d
-    (.setColor (color-object (or color :black)))
+    (doto g2d
+      (.setColor (color-object (or color :black)))
     (.setComposite
       (let [compound-alpha (* (or alpha 1) (.. g2d getComposite getAlpha))]
         (AlphaComposite/getInstance AlphaComposite/SRC_ATOP compound-alpha)))
@@ -227,16 +227,15 @@

 (defmethod draw-primitive Shape
   [g2d shape {:keys [color fill stroke] :as params}]
-  (with-g2d-state [g2d params]
-                  (when fill
-                    (when-let [fill-color (:color fill)]
-                      (doto g2d
-                        (set-color fill-color)
-                        (.fill shape))))
-                  (when (stroke? stroke)
-                    (doto g2d
-                      (set-color (or (:color stroke) color :black))
-                      (.draw shape)))))
+  (when fill
+    (when-let [fill-color (:color fill)]
+      (doto g2d
+        (set-color fill-color)
+        (.fill shape))))
+  (when (stroke? stroke)
+    (doto g2d
+      (set-color (or (:color stroke) color :black))
+      (.draw shape))))

 (defmethod draw-primitive Image
   [g2d image params]
@@ -244,8 +243,7 @@
         h (or (:h params) (.getHeight image))
         params+ (complete-coordinates (assoc params :w w :h h))
         {:keys [l t]} params+]
-    (with-g2d-state [g2d params+]
-                    (.drawImage g2d image (- (/ w 2)) (- (/ h 2)) w h nil))))
+    (.drawImage g2d image (- (/ w 2)) (- (/ h 2)) w h nil)))

 (defn draw-string-center
   "Draw a string centered at position x,y."
@@ -282,19 +280,21 @@
       ;(draw-shape g2d obj fill stroke)
       ;(.translate g2d (- x) (- y))
       (.setFont g2d font2)
-      (with-g2d-state [g2d params]
                        (draw-string-center g2d text x y))
-      )))
-
-(defn draw [g2d items]
-  (enable-anti-aliasing g2d)
-  (doseq [[type params & inner-items] items]
-    (let [params+ (complete-coordinates params)]
-       (if (= type :compound)
-         (with-g2d-state [g2d params]
-                         (draw g2d inner-items))
-         (draw-primitive g2d (make-obj type params+) params+)
-         ))))
+      ))
+
+;  (enable-anti-aliasing g2d)
+;  (doseq [[type params & inner-items] items]
+
+(defn draw [g2d [type params & inner-items]]
+  (when (= type :graphics)
+        (enable-anti-aliasing g2d))
+  (let [params+ (complete-coordinates params)]
+    (with-g2d-state [g2d params+]
+      (if (#{:compound :graphics} type)
+        (doseq [inner-item inner-items]
+          (draw g2d inner-item))
+        (draw-primitive g2d (make-obj type params+) params+)))))

 (defn canvas [reference]
   (let [panel (proxy [JPanel] []
@@ -303,6 +303,7 @@
                                 (draw graphics @reference)))]
     (add-watch reference panel (fn [_ _ _ _]
                                  (.repaint panel)))
+    (.setBackground panel Color/BLACK)
     panel))

 ;; test
@@ -314,6 +315,7 @@
     (doto (JFrame. "canvas")
       (.. getContentPane (add panel))
       (.setBounds 10 10 500 500)
+      (slide-explorer.user-controls/setup-fullscreen)
       .show)
     panel))

@@ -365,7 +367,7 @@
 (count
 (reset!
   grafix
-  [
+  [:graphics {}
 ;   [:rect
 ;    {:x 250 :y 250 :w 10 :h 300
 ;     :arc-radius 100
@@ -417,9 +419,7 @@
 ;              :cap :butt
 ;              :join :bevel
 ;              :miter-limit 10.0}}]
-   [:rect
-    {:x 200 :y 200 :w 1000 :h 1000 :fill {:color :black}}]
-   [:compound {:x 180 :y 300 :scale 1.0 :alpha 0.5 :rotate 0}
+   [:compound {:x 180 :y 300 :scale 1.0 :alpha 0.9 :rotate 0}
     [:round-rect
      {:y 2 :w 150 :h 30
       :arc-radius 10
@@ -429,7 +429,7 @@
       :stroke {:width 2 :color :white}
       :rotate 0}]
     [:text
-     {:text "Navigate!"
+     {:text "Navigate"
       :color :white
       :alpha 0.7
       :rotate 0


remove white line on android wallet screen

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

--- src/status_im/ui/screens/wallet/main/views.cljs
+++ src/status_im/ui/screens/wallet/main/views.cljs
@@ -1,28 +1,28 @@
-  (ns status-im.ui.screens.wallet.main.views
-    (:require-macros [status-im.utils.views :as views])
-    (:require [reagent.core :as reagent]
-              [re-frame.core :as re-frame]
-              [status-im.i18n :as i18n]
-              [status-im.ui.components.colors :as colors]
-              [status-im.ui.components.list.views :as list]
-              [status-im.ui.components.react :as react]
-              [status-im.ui.components.toolbar.view :as toolbar]
-              [status-im.ui.components.icons.vector-icons :as vector-icons]
-              [status-im.ui.screens.wallet.onboarding.views :as onboarding.views]
-              [status-im.ui.screens.wallet.styles :as wallet.styles]
-              [status-im.ui.screens.wallet.main.styles :as styles]
-              [status-im.ui.screens.wallet.settings.views :as settings]
-              [status-im.ui.screens.wallet.utils :as wallet.utils]
-              [status-im.utils.money :as money]
-              [status-im.utils.platform :as platform]
-              [status-im.ui.components.toolbar.actions :as action]
-              status-im.ui.screens.wallet.collectibles.etheremon.views
-              status-im.ui.screens.wallet.collectibles.cryptostrikers.views
-              status-im.ui.screens.wallet.collectibles.cryptokitties.views
-              status-im.ui.screens.wallet.collectibles.superrare.views
-              status-im.ui.screens.wallet.collectibles.kudos.views
-              [status-im.ui.components.status-bar.view :as status-bar.view]
-              [status-im.ui.screens.wallet.transactions.views :as transactions.views]))
+(ns status-im.ui.screens.wallet.main.views
+  (:require-macros [status-im.utils.views :as views])
+  (:require [reagent.core :as reagent]
+            [re-frame.core :as re-frame]
+            [status-im.i18n :as i18n]
+            [status-im.ui.components.colors :as colors]
+            [status-im.ui.components.list.views :as list]
+            [status-im.ui.components.react :as react]
+            [status-im.ui.components.toolbar.view :as toolbar]
+            [status-im.ui.components.icons.vector-icons :as vector-icons]
+            [status-im.ui.screens.wallet.onboarding.views :as onboarding.views]
+            [status-im.ui.screens.wallet.styles :as wallet.styles]
+            [status-im.ui.screens.wallet.main.styles :as styles]
+            [status-im.ui.screens.wallet.settings.views :as settings]
+            [status-im.ui.screens.wallet.utils :as wallet.utils]
+            [status-im.utils.money :as money]
+            [status-im.utils.platform :as platform]
+            [status-im.ui.components.toolbar.actions :as action]
+            status-im.ui.screens.wallet.collectibles.etheremon.views
+            status-im.ui.screens.wallet.collectibles.cryptostrikers.views
+            status-im.ui.screens.wallet.collectibles.cryptokitties.views
+            status-im.ui.screens.wallet.collectibles.superrare.views
+            status-im.ui.screens.wallet.collectibles.kudos.views
+            [status-im.ui.components.status-bar.view :as status-bar.view]
+            [status-im.ui.screens.wallet.transactions.views :as transactions.views]))

 (defn toolbar-modal [modal-history?]
   [react/view
@@ -170,6 +170,11 @@
       (if error-message
         [snackbar error-message]
         [total-section portfolio-value currency])
+      ;; this view is a hack to hide the 1px high white line gap on android
+      (when platform/android?
+        [react/view {:style {:background-color colors/blue
+                             :height 1
+                             :margin -1}}])
       (when (and (not modal?)
                  (not seed-backed-up?)
                  (some (fn [{:keys [amount]}]


[#10593] Amount is hardly visible when appearance is set to dark, but system theme is light

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
@@ -99,7 +99,7 @@
                     :margin-vertical (if small-screen? 8 16)}
         [react/text-input
          {:style               {:font-size (if small-screen? 24 38)
-                                :color (when amount-error colors/red)
+                                :color (if amount-error colors/red colors/black)
                                 :flex-shrink 1}
           :keyboard-type       :numeric
           :accessibility-label :amount-input


fix failing test.

fix failing test.

--- src/kixi/hecuba/data/measurements/download.clj
+++ src/kixi/hecuba/data/measurements/download.clj
@@ -39,10 +39,11 @@
   (reduce (fn [t1 t2]  (if (t/after? t1 t2) t1 t2)) (map (fnil tc/to-date-time (t/date-time 1970) ) ts)))

 (defn- find-ts-range [xs]
-  (let [tss (map (juxt :lower_ts :upper_ts) xs)]
-    (reduce (fn [[l1 u1] [l2 u2]] [(min-date-time l1 l2)
+  (when (seq xs)
+   (let [tss (map (juxt :lower_ts :upper_ts) xs)]
+     (reduce (fn [[l1 u1] [l2 u2]] [(min-date-time l1 l2)
                                    (max-date-time u1 u2)])
-            tss)))
+             tss))))

 (defn- get-devices-and-sensors-for [session entity_id]
   (let [devices         (->> (db/execute session (hayt/select :devices (hayt/where [[= :entity_id entity_id]])))


Add :replace option to load-spec

Add :replace option to load-spec

--- src/main/clojure/com/stuartsierra/lazytest.clj
+++ src/main/clojure/com/stuartsierra/lazytest.clj
@@ -435,36 +435,45 @@
         :else nil))

 (defn load-spec
-  "Like find-spec but loads namespaces with require.  options will be
-  passed to require, such as :reload, or :reload-all.  Returns the
-  spec or nil if none found.
+  "Like find-spec but loads namespaces with require.  Returns the spec
+  or nil if none found.
+
+  options will be passed to require, such as :reload, or :reload-all.
+  Also accepts an option :replace that removes each namespace before
+  require'ing it.

   Argument may also be a java.io.File or String, which will load all
   namespaces in the named directory."
   [x & options]
-  (cond (symbol? x)
-        (do (apply require x options) (load-spec (the-ns x)))
-
-        (string? x)
-        (load-spec (java.io.File. x))
-
-        (instance? java.io.File x)
-        (if (.isDirectory x)
-          (let [names (find-namespaces-in-dir x)]
-            (doseq [n names] (apply require n options))
-            (find-spec names))
-          (throw (IllegalArgumentException.
-                  "File argument to load-spec must be a directory")))
-
-        (coll? x)
-        (let [xs (distinct (filter identity (map #(apply load-spec % options) x)))]
-          (if (seq xs)
-            (SimpleContainer (vec xs)
-                             {:generator `load-spec
-                              :comment "Generated from collection by load-spec."}
-                             nil)))
-
-        :else (find-spec x)))
+  (let [unload? (some #{:replace} options)
+        options (filter (not #{:replace} %) options)]
+    (cond (symbol? x)
+          (do (when unload? (remove-ns x))
+              (apply require x options)
+              (load-spec (the-ns x)))
+
+          (string? x)
+          (load-spec (java.io.File. x))
+
+          (instance? java.io.File x)
+          (if (.isDirectory x)
+            (let [names (find-namespaces-in-dir x)]
+              (doseq [n names]
+                (when unload? (remove-ns n))
+                (apply require n options))
+              (find-spec names))
+            (throw (IllegalArgumentException.
+                    "File argument to load-spec must be a directory")))
+
+          (coll? x)
+          (let [xs (distinct (filter identity (map #(apply load-spec % options) x)))]
+            (if (seq xs)
+              (SimpleContainer (vec xs)
+                               {:generator `load-spec
+                                :comment "Generated from collection by load-spec."}
+                               nil)))
+
+          :else (find-spec x))))

 (defn run-spec
   "Like load-spec but executes the specs once they are found."


Added step indicator to sequencer.

Added step indicator to sequencer.

--- src/overtone/gui/sequencer.clj
+++ src/overtone/gui/sequencer.clj
@@ -1,12 +1,13 @@
 (ns overtone.gui.sequencer
   (:use [overtone.sc server]
         [overtone.music time]
-        [seesaw core mig])
+        [seesaw core mig border])
   (:require [seesaw.bind :as bind]))

 (defn- make-initial-state [metro steps instruments]
   {:playing?  false
    :metronome metro
+   :step      0
    :rows      (into
                 {}
                 (for [i instruments]
@@ -25,6 +26,7 @@
       (let [metro (:metronome state)
             index (mod beat steps)
             next-beat (inc beat)]
+        (swap! state-atom assoc-in [:step] index)
         (doseq [inst instruments]
           (when (nth (get-in state [:rows (:name inst)]) index)
             (at (metro beat) (inst))))
@@ -49,7 +51,11 @@
     (let [state-atom   (atom (make-initial-state metro steps instruments))
           play-btn     (button :text "play")
           bpm-spinner  (spinner :model (spinner-model (metro :bpm) :from 20 :to 300 :by 1)
-                                 :maximum-size [60 :by 100])
+                                :maximum-size [60 :by 100])
+          step-lbls    (vec (for [i (range steps)] (label :size [25 :by 25]
+                                                          :background "#22F"
+                                                          :opaque? false
+                                                          :border (line-border :color "#22A"))))
           control-pane (toolbar :floatable? false
                                 :items [play-btn
                                         :separator
@@ -57,11 +63,20 @@
                                         [:fill-h 5]
                                         "bpm"])
           seq-pane     (mig-panel :constraints [(str "wrap " (inc steps)) "" ""]
-                                  :items (mapcat #(step-row % steps state-atom) instruments))
+                                  :items (concat
+                                           [["step" "gap 5px, gapright 10px"]]
+                                           (for [lbl step-lbls] [lbl "width 25:25:25"])
+                                           (mapcat #(step-row % steps state-atom) instruments)))
           f (frame :title    "Sequencer"
                    :content  (border-panel :north control-pane :center seq-pane)
                    :on-close :dispose)]
       (bind/bind bpm-spinner (bind/b-do [v] (metro :bpm v)))
+      (bind/bind
+        state-atom
+        (bind/b-do [{:keys [step]}]
+                   (config! step-lbls :opaque? false)
+                   (config! (step-lbls step) :opaque? true)
+                   (repaint! step-lbls)))
       (listen play-btn :action
               (fn [e]
                 (let [playing? (:playing? (swap! state-atom toggle-playing))]


use mac-os? helper fn

use mac-os? helper fn

--- src/overtone/libs/app_icon.clj
+++ src/overtone/libs/app_icon.clj
@@ -1,6 +1,6 @@
 (ns overtone.libs.app-icon
   (:use [clojure.java.io]
-        [overtone.helpers.system :only [get-os]])
+        [overtone.helpers.system :only [mac-os?]])
   (:import [com.apple.eawt.Application]
            [java.awt.Toolkit]))

@@ -17,7 +17,7 @@
   (let [icon-url (clojure.java.io/resource "overtone-logo.png")
         icon     (.createImage (java.awt.Toolkit/getDefaultToolkit) icon-url)]
     (cond
-      (= :mac (get-os)) (set-osx-icon icon))))
+      (mac-os?) (set-osx-icon icon))))

 (defonce __INIT-ICON__
   (setup-icon))


Fix typos in spec (#429)

Fix typos in spec (#429)

--- exercises/practice/triangle/test/triangle_test.clj
+++ exercises/practice/triangle/test/triangle_test.clj
@@ -8,7 +8,7 @@
 (deftest equilateral-any-side-is-unequal
       (is (false? (triangle/equilateral? 2 3 2))))

-(deftest equilateral-no sides are equal
+(deftest equilateral-no-sides-are-equal
       (is (false? (triangle/equilateral? 5 4 6))))

 (deftest equilateral-all-zero-sides


disable last-clusters: temp fix for one-big-base-cluster

--- src/polismath/conversation.clj
+++ src/polismath/conversation.clj
@@ -110,8 +110,10 @@
         :id
         (kmeans (assoc rating-mat :matrix proj)
                 (:base-k opts')
-                :last-clusters (:base-clusters conv)
-                :cluster-iters (:base-iters opts')))))
+                ; :last-clusters (:base-clusters conv)
+                ; :cluster-iters (:base-iters opts')
+
+                ))))

      :group-clusters
      (plmb/fnk
@@ -123,8 +125,9 @@
         (kmeans
          (xy-clusters-to-nmat2 base-clusters)
          (choose-group-k base-clusters)
-         :last-clusters (:group-clusters conv)
-         :cluster-iters (:group-iters opts')))))
+         ; :last-clusters (:group-clusters conv)
+         ; :cluster-iters (:group-iters opts')
+         ))))

      :bid-to-pid
      (plmb/fnk


Try warn when passing native React classes to hiccup form

--- src/reagent/impl/template.cljs
+++ src/reagent/impl/template.cljs
@@ -156,6 +156,11 @@

 (defn fn-to-class [f]
   (assert (ifn? f) (str "Expected a function, not " (pr-str f)))
+  (when (dev?)
+    (when (and (fn? f)
+               (some? (.' f :type)))
+      (log "warning: using native React classes directly is not supported: "
+           (.' f :type))))
   (let [spec (meta f)
         withrender (assoc spec :component-function f)
         res (comp/create-class withrender)


refactoring core a little more

refactoring core a little more

--- src/saved_for_reddit/core.cljs
+++ src/saved_for_reddit/core.cljs
@@ -50,9 +50,7 @@
         #_(println response)
         (if (or (nil? error) (clojure.string/blank? error))
           (let [username (:name body)]
-            (set-app-state-field :username username)
-            (r/render-component [loggedin-html username] (dommy/sel1 :#loggedin))
-            (get-all-saved-posts token username saved-posts))
+            (set-app-state-field :username username))
           (handle-error (str error " " (:error-text response) "\nYour API token might've expired."))))))

 (defn reddit-request-auth-token [client-id redirect-uri code]
@@ -92,7 +90,8 @@
           (set! (.-location js/window) (gen-reddit-auth-url client-id redirect-uri "abcdef"))
           ;; code query param is not nil or token is populated in app state
           (do
-            (if  (clojure.string/blank? (:token @app-state))
+            (println @app-state)
+            (if (clojure.string/blank? (:token @app-state))
               ;; app-state does not contain auth-token
               ;; retreive auth-token from reddit api
               (reddit-request-auth-token client-id redirect-uri code))
@@ -101,6 +100,9 @@
             (go (js/setTimeout #(refresh-reddit-auth-token client-id redirect-uri) 3300000)))
           )
         ;; all reddit auth and setup should be done
+        ;;  retreive all saved posts
+        (get-all-saved-posts (:token @app-state) (:username @app-state) saved-posts)
+        ;; render html doms
         (r/render-component [loggedin-html (:username @app-state)] (dommy/sel1 :#loggedin))
         (r/render-component [search-bar-html] (dommy/sel1 :#search-form))
         (r/render-component [main-html app-state saved-posts] (dommy/sel1 :#app)))


fix compilation errors

fix compilation errors

--- src/shuppet/securitygroups.clj
+++ src/shuppet/securitygroups.clj
@@ -5,7 +5,7 @@
    [clojure.tools.logging :as log]
    [clojure.xml :as xml]
    [clojure.zip :as zip]
-   [clojure.data.zip.xml :refer [xml1-> text]]))
+   [clojure.data.zip.xml :refer [xml1-> text xml->]]))

 (defn- xml-to-map [xml-string]
@@ -73,6 +73,11 @@
       (do
         (xml1-> (xml-to-map response) :groupId text)))))

+(defn- process [action params]
+  (condp = (keyword action)
+    :CreateSecurityGroup (create params)
+    (ec2-request (merge params {"Action" (name action)}))))
+
 (defn- network-action [sg-id opts action]
   (let [params (process-list-of-maps build-network-params opts)]
     (process action (merge params {"GroupId" sg-id}))))
@@ -136,11 +141,6 @@
     (balance-ingress sg-id ingress)
     (balance-egress sg-id egress)))

-(defn- process [action params]
-  (condp = (keyword action)
-    :CreateSecurityGroup (create params)
-    (ec2-request (merge params {"Action" (name action)}))))
-
 (defn ensure
   "Describe the security security group
    if not present create and apply ingress/outgress


Compare blit and paint approaches

Compare blit and paint approaches

--- src/sierpinski_sieve/core.cljs
+++ src/sierpinski_sieve/core.cljs
@@ -35,6 +35,25 @@
           (paint-row ctx y row size))
         (.fill ctx)))))

+(defn blit-row [pixel-data y row size]
+  (let [y-offset (* y size)]
+    (doseq [[x value] (map-indexed vector row)]
+      (let [disp-x (+ (int (* (- size y) 0.5)) x)
+            p (* (+ y-offset disp-x) 4)]
+        (if (odd? value)
+          (aset pixel-data (+ p 3) 0))))))
+
+(defn blit [canvas-id size sieve]
+  (when-let [canvas-element (. js/document getElementById canvas-id)]
+    (when-let [ctx (.getContext canvas-element "2d")]
+      (let [pixels (.createImageData ctx size size)
+            pixel-data (.-data pixels)]
+        (doseq [i (range 0 (* size size))]
+          (aset pixel-data (+ (* i 4) 3) 255))
+        (doseq [[y row] (map-indexed vector sieve)]
+          (blit-row pixel-data y row size))
+        (.putImageData ctx pixels 0 0)))))
+
 (defn render-canvas [size]
   (fn []
     [:center [:canvas {:width size :height size :id "canvas"}]]))
@@ -42,9 +61,10 @@
 (defn main [size]
   (reagent/render [(render-canvas size)]
                   (. js/document (getElementById "app")))
+  (time (blit "canvas" size (take size (sieve '(1) 2))))
   (time (paint "canvas" size (take size (sieve '(1) 2)))))

-(main 400)
+(main 325)

 (defn on-js-reload []
   ;; optionally touch your app-state to force rerendering depending on


Fix merge problem.

Fix merge problem.

--- test/open_company/integration/section/section_manipulation.clj
+++ test/open_company/integration/section/section_manipulation.clj
@@ -69,11 +69,7 @@
       (let [db-company (company/get-company conn r/slug)]
         (:categories db-company) => categories
         (:sections db-company) => {:company ["diversity" "values"]
-<<<<<<< HEAD
                                    :progress ["update" "finances" "team" "help"]}))
-=======
-                                   :progress ["help" "update" "team" "finances"]}))
->>>>>>> 6dfda8307cb9a8e2efbf4ae69d5e1b9193625957

     (fact "with no JWToken"
       (let [new-order {:progress ["team" "update" "finances" "help"]
@@ -86,11 +82,7 @@
       (let [db-company (company/get-company conn r/slug)]
         (:categories db-company) => categories
         (:sections db-company) => {:company ["diversity" "values"]
-<<<<<<< HEAD
                                    :progress ["update" "finances" "team" "help"]}))
-=======
-                                   :progress ["help" "update" "team" "finances"]}))
->>>>>>> 6dfda8307cb9a8e2efbf4ae69d5e1b9193625957

     (fact "with an organization that doesn't match the company"
       (let [new-order {:progress ["team" "update" "finances" "help"]
@@ -103,11 +95,7 @@
       (let [db-company (company/get-company conn r/slug)]
         (:categories db-company) => categories
         (:sections db-company) => {:company ["diversity" "values"]
-<<<<<<< HEAD
                                    :progress ["update" "finances" "team" "help"]}))
-=======
-                                   :progress ["help" "update" "team" "finances"]}))
->>>>>>> 6dfda8307cb9a8e2efbf4ae69d5e1b9193625957

     (fact "with no company matching the company slug"
       (let [new-order {:company ["diversity" "values"]
@@ -119,11 +107,7 @@
       (let [db-company (company/get-company conn r/slug)]
         (:categories db-company) => categories
         (:sections db-company) => {:company ["diversity" "values"]
-<<<<<<< HEAD
                                    :progress ["update" "finances" "team" "help"]})))
-=======
-                                   :progress ["help" "update" "team" "finances"]})))
->>>>>>> 6dfda8307cb9a8e2efbf4ae69d5e1b9193625957

   (facts "about section reordering"

@@ -131,11 +115,7 @@
     (let [db-company (company/get-company conn r/slug)]
       (:categories db-company) => categories
       (:sections db-company) => {:company ["diversity" "values"]
-<<<<<<< HEAD
                                  :progress ["update" "finances" "team" "help"]})
-=======
-                                 :progress ["help" "update" "team" "finances"]})
->>>>>>> 6dfda8307cb9a8e2efbf4ae69d5e1b9193625957

     (facts "when the new order is valid"


fix core-bundle dependency version

fix core-bundle dependency version

--- json-bundle/project.clj
+++ json-bundle/project.clj
@@ -3,7 +3,7 @@
   :url "https://github.com/kumarshantanu/logback-bundle"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[logback-bundle/core-bundle "0.1.0-SNAPSHOT"]
+  :dependencies [[logback-bundle/core-bundle "0.1.0"]
                  [com.fasterxml.jackson.core/jackson-core     "2.5.3"]  ; in use by cheshire 5.5.0
                  [com.fasterxml.jackson.core/jackson-databind "2.5.3"]  ; in use by cheshire 5.5.0
                  [ch.qos.logback.contrib/logback-json-classic "0.1.2"]


(MAINT) fixing file that I removed back to master

--- test/unit/puppetlabs/services/jruby/jruby_puppet_testutils.clj
+++ test/unit/puppetlabs/services/jruby/jruby_puppet_testutils.clj
@@ -49,23 +49,25 @@
   which will either return an interpreter if one is available within the
   timeout length, or will return nil after the timeout expires if no
   interpreters are available. This timeout defaults to 1200000 milliseconds.
+
   `reason` is an identifier (usually a map) describing the reason for borrowing the
   JRuby instance.  It may be used for metrics and logging purposes."
-  [jruby-puppet-service reason]
-  (let [{:keys [pool-context]} (tk-service/service-context jruby-puppet-service)
-        event-callbacks (jruby-core/get-event-callbacks pool-context)]
-    (jruby-core/borrow-from-pool-with-timeout pool-context reason event-callbacks)))
+ [jruby-puppet-service reason]
+ (let [{:keys [pool-context]} (tk-service/service-context jruby-puppet-service)
+       event-callbacks (jruby-core/get-event-callbacks pool-context)]
+   (jruby-core/borrow-from-pool-with-timeout pool-context reason event-callbacks)))

 (defn return-instance
   "Returns the JRubyPuppet interpreter back to the pool.
+
   `reason` is an identifier (usually a map) describing the reason for borrowing the
   JRuby instance.  It may be used for metrics and logging purposes, so for
   best results it should be set to the same value as it was set during the
   `borrow-instance` call."
-  [jruby-puppet-service jruby-instance reason]
-  (let [pool-context (:pool-context (tk-service/service-context jruby-puppet-service))
-        event-callbacks (jruby-core/get-event-callbacks pool-context)]
-    (jruby-core/return-to-pool jruby-instance reason event-callbacks)))
+ [jruby-puppet-service jruby-instance reason]
+ (let [pool-context (:pool-context (tk-service/service-context jruby-puppet-service))
+       event-callbacks (jruby-core/get-event-callbacks pool-context)]
+   (jruby-core/return-to-pool jruby-instance reason event-callbacks)))

 (schema/defn ^:always-validate
@@ -76,13 +78,13 @@
    config :- jruby-schemas/JRubyConfig
    flush-instance-fn :- IFn]
   (let [instance (jruby-schemas/map->JRubyInstance
-                   {:id id
-                    :internal {:pool pool
-                               :max-borrows (:max-borrows-per-instance config)
-                               :flush-instance-fn flush-instance-fn
-                               :state (atom {:borrow-count 0})}
-                    :scripting-container (ScriptingContainer.
-                                           LocalContextScope/SINGLETHREAD)})
+                  {:id id
+                   :internal {:pool pool
+                              :max-borrows (:max-borrows-per-instance config)
+                              :flush-instance-fn flush-instance-fn
+                              :state (atom {:borrow-count 0})}
+                   :scripting-container (ScriptingContainer.
+                                         LocalContextScope/SINGLETHREAD)})
         modified-instance (merge instance {:jruby-puppet (mock-jruby-instance-creator-fn)
                                            :environment-registry (puppet-env/environment-registry)})]
     (.register pool modified-instance)
@@ -106,7 +108,7 @@
                             :name "allow all"}]}})

 (schema/defn ^:always-validate
-jruby-puppet-config :- JRubyPuppetTKConfig
+  jruby-puppet-config :- JRubyPuppetTKConfig
   "Create a JRubyPuppetConfig for testing. The optional map argument `options` may
   contain a map, which, if present, will be merged into the final JRubyPuppetConfig
   map.  (This function differs from `jruby-puppet-tk-config` in
@@ -114,24 +116,24 @@
   differs slightly from the raw format that would be read from config files
   on disk.)"
   ([]
-    (let [combined-configs
-          (merge (jruby-puppet-core/initialize-puppet-config
-                   {}
-                   {:master-conf-dir conf-dir
-                    :master-code-dir code-dir
-                    :master-var-dir var-dir
-                    :master-run-dir run-dir
-                    :master-log-dir log-dir
-                    :use-legacy-auth-conf false})
-                 (jruby-core/initialize-config {:ruby-load-path ruby-load-path
-                                                :gem-home gem-home}))
-          max-requests-per-instance (:max-borrows-per-instance combined-configs)
-          updated-config (-> combined-configs
-                             (assoc :max-requests-per-instance max-requests-per-instance)
-                             (dissoc :max-borrows-per-instance))]
-      (dissoc updated-config :lifecycle)))
+   (let [combined-configs
+         (merge (jruby-puppet-core/initialize-puppet-config
+                 {}
+                 {:master-conf-dir conf-dir
+                  :master-code-dir code-dir
+                  :master-var-dir var-dir
+                  :master-run-dir run-dir
+                  :master-log-dir log-dir
+                  :use-legacy-auth-conf false})
+                (jruby-core/initialize-config {:ruby-load-path ruby-load-path
+                                               :gem-home gem-home}))
+         max-requests-per-instance (:max-borrows-per-instance combined-configs)
+         updated-config (-> combined-configs
+                            (assoc :max-requests-per-instance max-requests-per-instance)
+                            (dissoc :max-borrows-per-instance))]
+     (dissoc updated-config :lifecycle)))
   ([options]
-    (merge (jruby-puppet-config) options)))
+   (merge (jruby-puppet-config) options)))

 (defn drain-pool
   "Drains the JRubyPuppet pool and returns each instance in a vector."
@@ -149,6 +151,7 @@
   to string.  For each JRuby instance in the pool, f will be called, passing in
   an integer offset into the jruby array (0..size), and f is expected to return
   a string containing a script to run against the jruby instance.
+
   Returns a vector containing the results of executing the scripts against the
   JRuby instances."
   [pool-context size f]
@@ -176,4 +179,4 @@
                         :size)]
     (while (< (count (jruby-core/registered-instances pool-context))
               num-jrubies)
-      (Thread/sleep 100))))+      (Thread/sleep 100))))


Update collectd.clj

Update collectd.clj

fixing case where collectd processes reporting additional slash i.e. processes-httpd/ps_count/processes and processes-httpd/ps_count/threads

--- 11-13/riemann/examplecom/etc/collectd.clj
+++ 11-13/riemann/examplecom/etc/collectd.clj
@@ -26,7 +26,8 @@
    {:service #"^swap/percent-(.*)$" :rewrite "swap $1"}
    {:service #"^memory/percent-(.*)$" :rewrite "memory $1"}
    {:service #"^processes/ps_state-(.*)$" :rewrite "processes $1"}
-   {:service #"^processes-(.*)/(.*)$" :rewrite "processes $1 $2"}
+   {:service #"^processes-(.*)?/(.*)?/(.*)$" :rewrite "processes $1 $2 $3"}
+   {:service #"^processes-(.*)?/(.*)$" :rewrite "processes $1 $2"}
    {:service #"^cpu/percent-(.*)$" :rewrite "cpu $1"}
    {:service #"^df-(.*)/(df_complex|percent_bytes)-(.*)$" :rewrite "df $1 $2 $3"}
    {:service #"^interface-(.*)/if_(errors|packets|octets)/(tx|rx)$" :rewrite "nic $1 $3 $2"}


Revert to initial value

Revert to initial value

--- src/overtone_workspace/fn/markov_logistics.clj
+++ src/overtone_workspace/fn/markov_logistics.clj
@@ -27,7 +27,7 @@
     (let [idx (Math/floor (* x (count logistics-scale)))
           note (nth logistics-scale idx)
           freq (midi->hz note)
-          dur (* 60 4/8 (/ 60.0 (metro :bpm)))
+          dur (* 1 4/8 (/ 60.0 (metro :bpm)))
           ;;dur (* 60 4/8 (/ 60.0 (metro :bpm)))
           next-beat (+ 2/8 beat)
           next-x (* logistics-r x (- 1 x))] ;; x = r * x * (1 - x)


test: make sure we pass the clojure reader test suite

--- src/test/clojure/clojure/tools/reader_test.clj
+++ src/test/clojure/clojure/tools/reader_test.clj
@@ -1,7 +1,8 @@
 (ns clojure.tools.reader-test
   (:refer-clojure :exclude [read-string])
-  (:require [clojure.tools.reader :refer [read-string]]
-            [clojure.test :refer [deftest is]]))
+  (:require [clojure.tools.reader :refer [read-string default-data-reader-fn]]
+            [clojure.test :refer [deftest is]])
+  (:import clojure.lang.BigInt))

 (deftest read-integer
   (is (== 42 (read-string "42")))
@@ -21,7 +22,26 @@

   (is (== 0x42e (read-string "0x42e")))
   (is (== +0x42e (read-string "+0x42e")))
-  (is (== -0x42e (read-string "-0x42e"))))
+  (is (== -0x42e (read-string "-0x42e")))
+
+  (is (instance? Long (read-string "2147483647")))
+  (is (instance? Long (read-string "+1")))
+  (is (instance? Long (read-string "1")))
+  (is (instance? Long (read-string "+0")))
+  (is (instance? Long (read-string "0")))
+  (is (instance? Long (read-string "-0")))
+  (is (instance? Long (read-string "-1")))
+  (is (instance? Long (read-string "-2147483648")))
+
+  (is (instance? Long (read-string "2147483648")))
+  (is (instance? Long (read-string "-2147483649")))
+  (is (instance? Long (read-string "9223372036854775807")))
+  (is (instance? Long (read-string "-9223372036854775808")))
+
+  (is (instance? BigInt (read-string "9223372036854775808")))
+  (is (instance? BigInt (read-string "-9223372036854775809")))
+  (is (instance? BigInt (read-string "10000000000000000000000000000000000000000000000000")))
+  (is (instance? BigInt (read-string "-10000000000000000000000000000000000000000000000000"))))

 (deftest read-floating
   (is (== 42.23 (read-string "42.23")))
@@ -38,7 +58,126 @@

   (is (== 42.2e3M (read-string "42.2e3M")))
   (is (== +42.2e+3M (read-string "+42.2e+3M")))
-  (is (== -42.2e-3M (read-string "-42.2e-3M"))))
+  (is (== -42.2e-3M (read-string "-42.2e-3M")))
+
+  (is (instance? Double (read-string "+1.0e+1")))
+  (is (instance? Double (read-string "+1.e+1")))
+  (is (instance? Double (read-string "+1e+1")))
+
+  (is (instance? Double (read-string "+1.0e+1")))
+  (is (instance? Double (read-string "+1.e+1")))
+  (is (instance? Double (read-string "+1e+1")))
+
+  (is (instance? Double (read-string "+1.0e1")))
+  (is (instance? Double (read-string "+1.e1")))
+  (is (instance? Double (read-string "+1e1")))
+
+  (is (instance? Double (read-string "+1.0e-1")))
+  (is (instance? Double (read-string "+1.e-1")))
+  (is (instance? Double (read-string "+1e-1")))
+
+  (is (instance? Double (read-string "1.0e+1")))
+  (is (instance? Double (read-string "1.e+1")))
+  (is (instance? Double (read-string "1e+1")))
+
+  (is (instance? Double (read-string "1.0e-1")))
+  (is (instance? Double (read-string "1.e-1")))
+  (is (instance? Double (read-string "1e-1")))
+
+  (is (instance? Double (read-string "-1.0e+1")))
+  (is (instance? Double (read-string "-1.e+1")))
+  (is (instance? Double (read-string "-1e+1")))
+
+  (is (instance? Double (read-string "-1.0e1")))
+  (is (instance? Double (read-string "-1.e1")))
+  (is (instance? Double (read-string "-1e1")))
+
+  (is (instance? Double (read-string "-1.0e-1")))
+  (is (instance? Double (read-string "-1.e-1")))
+  (is (instance? Double (read-string "-1e-1")))
+
+  (is (instance? Double (read-string "+1.0")))
+  (is (instance? Double (read-string "+1.")))
+
+  (is (instance? Double (read-string "1.0")))
+  (is (instance? Double (read-string "1.")))
+
+  (is (instance? Double (read-string "+0.0")))
+  (is (instance? Double (read-string "+0.")))
+
+  (is (instance? Double (read-string "0.0")))
+  (is (instance? Double (read-string "0.")))
+
+  (is (instance? Double (read-string "-0.0")))
+  (is (instance? Double (read-string "-0.")))
+
+  (is (instance? Double (read-string "-1.0")))
+  (is (instance? Double (read-string "-1.")))
+
+  (is (instance? BigDecimal (read-string "9223372036854775808M")))
+  (is (instance? BigDecimal (read-string "-9223372036854775809M")))
+  (is (instance? BigDecimal (read-string "2147483647M")))
+  (is (instance? BigDecimal (read-string "+1M")))
+  (is (instance? BigDecimal (read-string "1M")))
+  (is (instance? BigDecimal (read-string "+0M")))
+  (is (instance? BigDecimal (read-string "0M")))
+  (is (instance? BigDecimal (read-string "-0M")))
+  (is (instance? BigDecimal (read-string "-1M")))
+  (is (instance? BigDecimal (read-string "-2147483648M")))
+
+  (is (instance? BigDecimal (read-string "+1.0e+1M")))
+  (is (instance? BigDecimal (read-string "+1.e+1M")))
+  (is (instance? BigDecimal (read-string "+1e+1M")))
+
+  (is (instance? BigDecimal (read-string "+1.0e1M")))
+  (is (instance? BigDecimal (read-string "+1.e1M")))
+  (is (instance? BigDecimal (read-string "+1e1M")))
+
+  (is (instance? BigDecimal (read-string "+1.0e-1M")))
+  (is (instance? BigDecimal (read-string "+1.e-1M")))
+  (is (instance? BigDecimal (read-string "+1e-1M")))
+
+  (is (instance? BigDecimal (read-string "1.0e+1M")))
+  (is (instance? BigDecimal (read-string "1.e+1M")))
+  (is (instance? BigDecimal (read-string "1e+1M")))
+
+  (is (instance? BigDecimal (read-string "1.0e1M")))
+  (is (instance? BigDecimal (read-string "1.e1M")))
+  (is (instance? BigDecimal (read-string "1e1M")))
+
+  (is (instance? BigDecimal (read-string "1.0e-1M")))
+  (is (instance? BigDecimal (read-string "1.e-1M")))
+  (is (instance? BigDecimal (read-string "1e-1M")))
+
+  (is (instance? BigDecimal (read-string "-1.0e+1M")))
+  (is (instance? BigDecimal (read-string "-1.e+1M")))
+  (is (instance? BigDecimal (read-string "-1e+1M")))
+
+  (is (instance? BigDecimal (read-string "-1.0e1M")))
+  (is (instance? BigDecimal (read-string "-1.e1M")))
+  (is (instance? BigDecimal (read-string "-1e1M")))
+
+  (is (instance? BigDecimal (read-string "-1.0e-1M")))
+  (is (instance? BigDecimal (read-string "-1.e-1M")))
+  (is (instance? BigDecimal (read-string "-1e-1M")))
+
+  (is (instance? BigDecimal (read-string "+1.0M")))
+  (is (instance? BigDecimal (read-string "+1.M")))
+
+  (is (instance? BigDecimal (read-string "1.0M")))
+  (is (instance? BigDecimal (read-string "1.M")))
+
+  (is (instance? BigDecimal (read-string "+0.0M")))
+  (is (instance? BigDecimal (read-string "+0.M")))
+
+  (is (instance? BigDecimal (read-string "0.0M")))
+  (is (instance? BigDecimal (read-string "0.M")))
+
+  (is (instance? BigDecimal (read-string "-0.0M")))
+  (is (instance? BigDecimal (read-string "-0.M")))
+
+  (is (instance? BigDecimal (read-string "-1.0M")))
+  (is (instance? BigDecimal (read-string "-1.M"))))

 (deftest read-ratio
   (is (== 4/2 (read-string "4/2")))
@@ -52,23 +191,47 @@
                          (read-string "::foo-bar"))))
   (is (= :clojure.core/foo-bar
          (do (alias 'core 'clojure.core)
-             (read-string "::core/foo-bar")))))
+             (read-string "::core/foo-bar"))))
+  (is (= :*+!-_? (read-string ":*+!-_?")))
+  (is (= :abc:def:ghi (read-string ":abc:def:ghi")))
+  (is (= :abc.def/ghi (read-string ":abc.def/ghi")))
+  (is (= :abc/def.ghi (read-string ":abc/def.ghi")))
+  (is (= :abc:def/ghi:jkl.mno (read-string ":abc:def/ghi:jkl.mno")))
+  (is (instance? clojure.lang.Keyword (read-string ":alphabet"))) )

 (deftest read-symbol
   (is (= 'foo (read-string "foo")))
   (is (= 'foo/bar (read-string "foo/bar")))
+  (is (= '*+!-_? (read-string "*+!-_?")))
+  (is (= 'abc:def:ghi (read-string "abc:def:ghi")))
+  (is (= 'abc.def/ghi (read-string "abc.def/ghi")))
+  (is (= 'abc/def.ghi (read-string "abc/def.ghi")))
+  (is (= 'abc:def/ghi:jkl.mno (read-string "abc:def/ghi:jkl.mno")))
+  (is (instance? clojure.lang.Symbol (read-string "alphabet")))
   (is (= "foo//" (str (read-string "foo//")))) ;; the clojure reader can't read this
   (is (= (str 'NaN) (str (read-string "NaN")))) ;; the clojure reader can't read this
   (is (= Double/POSITIVE_INFINITY (read-string "Infinity"))) ;; the clojure reader can't read this
   (is (= Double/POSITIVE_INFINITY (read-string "+Infinity"))) ;; the clojure reader can't read this
   (is (= Double/NEGATIVE_INFINITY (read-string "-Infinity")))) ;; the clojure reader can't read this

+(deftest read-specials
+  (is (= 'nil nil))
+  (is (= 'false false))
+  (is (= 'true true)))
+
 (deftest read-char
   (is (= \f (read-string "\\f")))
   (is (= \u0194 (read-string "\\u0194")))
   (is (= \a (read-string "\\x61"))) ;; the clojure reader can't read this
   (is (= \o123 (read-string "\\o123")))
-  (is (= \newline (read-string "\\newline"))))
+  (is (= \newline (read-string "\\newline")))
+  (is (= (char 0) (read-string "\\o0")))
+  (is (= (char 0) (read-string "\\o000")))
+  (is (= (char 0377) (read-string "\\o377")))
+  (is (= \A (read-string "\\u0041")))
+  (is (= (char 0xd7ff) (read-string "\\ud7ff")))
+  (is (= (char 0xe000) (read-string "\\ue000")))
+  (is (= (char 0xffff) (read-string "\\uffff"))))

 (deftest read-string*
   (is (= "foo bar" (read-string "\"foo bar\"")))
@@ -133,3 +296,32 @@

 (deftest read-eval
   (is (= 3 (read-string "#=(+ 1 2)"))))
+
+(deftest read-tagged
+  (is (= #inst "2010-11-12T13:14:15.666"
+         (read-string "#inst \"2010-11-12T13:14:15.666\"")))
+  (is (= #inst "2010-11-12T13:14:15.666"
+         (read-string "#inst\"2010-11-12T13:14:15.666\"")))
+  (is (= #uuid "550e8400-e29b-41d4-a716-446655440000"
+         (read-string "#uuid \"550e8400-e29b-41d4-a716-446655440000\"")))
+  (is (= #uuid "550e8400-e29b-41d4-a716-446655440000"
+         (read-string "#uuid\"550e8400-e29b-41d4-a716-446655440000\"")))
+  (when default-data-reader-fn
+    (let [my-unknown (fn [tag val] {:unknown-tag tag :value val})]
+      (is (= {:unknown-tag 'foo :value 'bar}
+             (with-bindings {default-data-reader-fn my-unknown}
+               (read-string "#foo bar")))))))
+
+(defrecord foo [])
+(defrecord bar [baz buz])
+
+(deftest read-record
+  (is (= (foo.) (read-string "#clojure.tools.reader_test.foo[]")))
+  (is (= (foo.) (read-string "#clojure.tools.reader_test.foo []"))) ;; not valid in clojure
+  (is (= (foo.) (read-string "#clojure.tools.reader_test.foo{}")))
+  (is (= (assoc (foo.) :foo 'bar) (read-string "#clojure.tools.reader_test.foo{:foo bar}")))
+
+  (is (= (map->bar {}) (read-string "#clojure.tools.reader_test.bar{}")))
+  (is (= (bar. 1 nil) (read-string "#clojure.tools.reader_test.bar{:baz 1}")))
+  (is (= (bar. 1 nil) (read-string "#clojure.tools.reader_test.bar[1 nil]")))
+  (is (= (bar. 1 2) (read-string "#clojure.tools.reader_test.bar[1 2]"))))


s/map/pmap/

s/map/pmap/

--- src/babel/italiano/morphology.cljc
+++ src/babel/italiano/morphology.cljc
@@ -1392,9 +1392,9 @@
                             :top) ;; default unify-with
                lex (string/replace surface-form from to)]
            (filter (fn [result] (not (= :fail result)))
-                   (map (fn [lexical-entry]
-                          (unifyc unify-with lexical-entry))
-                        (get lexicon lex)))))))
+                   (pmap (fn [lexical-entry]
+                           (unifyc unify-with lexical-entry))
+                         (get lexicon lex)))))))
    replace-patterns))

 (defn analyze [surface-form lexicon]


require quest handlers in core

require quest handlers in core

--- src/braid/client/desktop/core.cljs
+++ src/braid/client/desktop/core.cljs
@@ -7,8 +7,9 @@
             [braid.client.dispatcher :refer [dispatch!]]
             [braid.client.router :as router]
             braid.client.subs
+            braid.client.events
             braid.client.quests.subscriptions
-            braid.client.events))
+            braid.client.quests.handlers))

 (enable-console-print!)


CLJS-1098: Browser REPL needs to support :reload and :reload-all

support "reload" and "reload-all" option to patched goog.require.

when given "reload" need to remove visited and written information
from goog.dependencies_ for the ns.

patched goog.isProvided_ should always return false

goog.writeScriptTag_ needs to append scripts to body otherwise
will blow away the document

`clojure.browser.repl/connect` should return a value to make
`defonce` usage sensible

--- src/cljs/clojure/browser/repl.cljs
+++ src/cljs/clojure/browser/repl.cljs
@@ -15,7 +15,8 @@

       :author "Bobby Calderwood and Alex Redington"}
   clojure.browser.repl
-  (:require [clojure.browser.net   :as net]
+  (:require [goog.dom :as gdom]
+            [clojure.browser.net   :as net]
             [clojure.browser.event :as event]
             ;; repl-connection callback will receive goog.require('cljs.repl')
             ;; and monkey-patched require expects to be able to derive it
@@ -115,18 +116,29 @@
           "none")))
     ;; Monkey-patch goog.provide if running under optimizations :none - David
     (when-not js/COMPILED
-      (set! (.-provide__ js/goog) js/goog.provide)
-      (set! (.-isProvided___ js/goog) js/goog.isProvided_)
-      (set! (.-provide js/goog)
-        (fn [name]
-          (set! (.-isProvided_ js/goog) (fn [name] false))
-          (.provide__ js/goog name)
-          (set! (.-isProvided_ js/goog) js/goog.isProvided___)))
+      (set! (.-require__ js/goog) js/goog.require)
+      ;; suppress useless Google Closure error about duplicate provides
+      (set! (.-isProvided_ js/goog) (fn [name] false))
       (set! (.-writeScriptTag_ js/goog)
         (fn [src opt_sourceText]
-          (let [doc js/goog.global.document]
-            (if (nil? opt_sourceText)
-              (.write doc
-                (str "<script type=\"text/javascript\" src=\"" src "\"></script>"))
-              (.write doc
-                (str "<script type=\"text/javascript\">" opt_sourceText "</script>")))))))))
+          (.appendChild js/document.body
+            (as-> (.createElement js/document "script") script
+              (doto script (aset "type" "text/javascript"))
+              (if (nil? opt_sourceText)
+                (doto script (aset "src" src))
+                (doto script (gdom/setTextContext opt_sourceText)))))))
+      (set! (.-require js/goog)
+        (fn [src reload]
+          (when (= reload "reload-all")
+            (set! (.-cljsReloadAll_ js/goog) true))
+          (let [reload? (or reload (.-cljsReloadAll__ js/goog))]
+            (when reload?
+              (let [path (aget js/goog.dependencies_.nameToPath src)]
+                (js-delete js/goog.dependencies_.visited path)
+                (js-delete js/goog.dependencies_.written
+                  (str js/goog.basePath path))))
+            (let [ret (.require__ js/goog src)]
+              (when (= reload "reload-all")
+                (set! (.-cljsReloadAll_ js/goog) false))
+              ret)))))
+    repl-connection))


Loading...

Loading...

--- src/cljs/github_profile/views.cljs
+++ src/cljs/github_profile/views.cljs
@@ -13,7 +13,8 @@

 (defn tbody []
   (fn []
-    (let [emps (re-frame/subscribe [:emps])]
+    (let [loading? (re-frame/subscribe [:loading?])
+          emps (re-frame/subscribe [:emps])]
       ;; (doall) ;; avoid warn: Reactive deref not supported in lazy seq
       (println "@emps" @emps)
       [:tbody
@@ -30,7 +31,9 @@
                  ]
              (for [v [id salary abbrev]]
                [:td (conj {:key (str "tr-" i "-" v)}
-                          {:style {:border "1px" :borderStyle "solid"}})
+                          {:style {:border "1px" :borderStyle "solid"}}
+                          {:on-click #(when-not @loading?
+                                        (println "on-click" v))})
                 v]))])
         @emps)])))

@@ -48,17 +51,14 @@
         [:tbody [tbody]]
         ]])))

-(defn main-panel []
-  (fn []
-    [:div
-     [table]]))
-
 (defn loading-throbber
   []
   (let [loading? (re-frame/subscribe [:loading?])]
     (when @loading?
-      [:div.loading
-       [:div.three-quarters-loader "Loading..."]])))
+      (do
+        (println "Loading...")
+        [:div.loading
+         [:div.three-quarters-loader "Loading..."]]))))

 (defn github-id-input
   []
@@ -143,3 +143,9 @@
        [user-name-and-avatar]
        (panels @active-panel)
        ])))
+
+(defn main-panel []
+  (fn []
+    [:div
+     [loading-throbber]
+     [table]]))


Fix issue with non-propogating boot dimensions

--- src/cljs/ikea_clojure_cup/car.cljs
+++ src/cljs/ikea_clojure_cup/car.cljs
@@ -57,9 +57,11 @@

 (defn- vehicle-get
   ([car-state idx]
-   (merge
-    {:width 150 :height 100 :depth 100}
-    (get-in @car-state [:vehicles idx])))
+   (or (get-in @car-state [:vehicles idx])
+       (do
+         (vehicle-get car-state idx {:width 150 :height 100 :depth 100})
+         (println ">>>>>" @car-state)
+         (get-in @car-state [:vehicles idx]))))
   ([car-state idx v]
    (swap! car-state assoc-in [:vehicles idx] v)))


fix accept terms func call

fix accept terms func call

--- src/cljs/salava/user/ui/terms.cljs
+++ src/cljs/salava/user/ui/terms.cljs
@@ -31,7 +31,7 @@
     [:button {:type         "button"
               :class        "btn btn-primary"
               :disabled     (if-not (= (:accept-terms @state) "accepted") "disabled")
-              :on-click #(toggle-accept-terms state)
+              :on-click #(toggle-accept-terms)
               }
      (t :user/Login)]]])


ogre3

--- src/cljs/shop/components/home.cljs
+++ src/cljs/shop/components/home.cljs
@@ -12,21 +12,24 @@

 (defn game-view
-    [game owner]
+    [game]
     (reify
         om/IRender
         (render [_]
-          (dom/div nil (:name game)))
+                (dom/div nil (:name game))
+
         )
     )
+)

 (defn games-list-view
-    [games owner]
+    [games isadmin]
+    (println isadmin)
     (reify
         om/IRender
-        (render [this]
+        (render [_]
             (dom/div nil
-                (to-array (om/build-all game-view games))
+                (om/build-all game-view games)
             )
         )
     )
@@ -47,11 +50,32 @@
     om/IRender
     (render [_]
       (dom/div nil
+        (dom/div #js{
+            :className "sidenav"
+          })
         (dom/header nil
+            "Misha&Artur's Games Shop"
+            (dom/i #js {
+               :className "fa fa-sign-out"
+               :href "#/login"
+               :onClick (fn [e]
+                            (ls/remove-item! "token")
+                            (om/update! state [:user] {})
+                            (sec/dispatch! "/login"))}
+              )
+          )
+        (dom/div #js{:className "content"}
+          (dom/div #js{
+                :className "pre-head"
+            } str "Welcome to the online game shop," (dom/span #js{:className "login-name"} (:username (:user state)))
+            (dom/i #js {
+               :className "fa fa-shopping-basket"
+              })
+            )
           (dom/div nil
-                (om/build games-list-view (:games state))
+                (om/build games-list-view (:games state) )
+            )
           )
-        )
       )
     )
   )


Add docstring and deprecation note on sign/generic.

--- src/clojure/buddy/sign/generic.clj
+++ src/clojure/buddy/sign/generic.clj
@@ -13,6 +13,11 @@
 ;; limitations under the License.

 (ns buddy.sign.generic
+  "The generic singin is mainly based on django's Cryptographic signing
+  library but extended with various signing algorithms and cryptography
+  support.
+
+  NOTE: deprecated since 0.4.0."
   (:require [buddy.core.codecs :refer :all]
             [buddy.core.keys :refer :all]
             [buddy.core.mac.hmac :as hmac]


Check argument count of system-map

Check argument count of system-map

--- src/com/stuartsierra/component.clj
+++ src/com/stuartsierra/component.clj
@@ -171,6 +171,10 @@
   default implementations of the Lifecycle 'start' and 'stop' methods
   which recursively start/stop all components in the system."
   [& keyvals]
+  ;; array-map doesn't check argument length (CLJ-1319)
+  (when-not (even? (count keyvals))
+    (throw (IllegalArgumentException.
+            "system-map requires an even number of arguments")))
   (map->SystemMap (apply array-map keyvals)))

 ;; Copyright © 2013 Stuart Sierra


Resized label (90% makes it more visible) added readable times

--- src/content/booklet/startpage.cljs
+++ src/content/booklet/startpage.cljs
@@ -8,10 +8,22 @@
   (:require-macros [cljs.core.async.macros :refer [go]]))

-(defn create-node [tag color text]
+(defn time-display
+  "Returns a display string for a number of milliseconds"
+  [millis]
+  (let [seconds (quot millis 1000)]
+    (cond
+      (< seconds 1) "< 1s"
+      (< seconds 60) (str seconds "s")
+      (< seconds 3600) (str (quot seconds 60) "min " (rem seconds 60) "s")
+      (< seconds 86400) (str (quot seconds 3600) "h " (quot (rem seconds 3600) 60) "min")
+      :else (str (quot seconds 86400) "d " (quot (rem seconds 86400) 3600) "h"))
+    ))
+
+(defn create-node [tag text color]
   (-> (dommy/create-element tag)
-      (dommy/set-style! :color color)
-      (dommy/set-text! text)))
+      (dommy/set-text! text)
+      (dommy/set-style! :color color)))

 (defn transform-result-node!
   [database node]
@@ -25,10 +37,14 @@
     (aset node "rootItem" root-item)
     (aset root-item "total-time" time)
     (when data
-      (doto node
-        (dommy/append! (create-node :span "rgb(80, 99, 152)" " [time viewed: "))
-        (dommy/append! (create-node :span "rgb(140, 101, 153)" (str time " ms")))
-        (dommy/append! (create-node :span "rgb(80, 99, 152)" "]")))
+      (dommy/append!
+        node
+        (doto (dommy/create-element :span)
+          (dommy/set-style! :font-size "90%")
+          (dommy/append! (create-node :span " [time viewed: " "rgb(80, 99, 152)"))
+          (dommy/append! (create-node :span (time-display time) "rgb(140, 101, 153)"))
+          (dommy/append! (create-node :span "]" "rgb(80, 99, 152)"))
+          ))
       )))

 (defn do-transformations! []
@@ -59,4 +75,4 @@
       (>! bg :content-initialized)
       (console/log "<-- Background replied" (<! bg)))))

-(main)+(main)