Using SingleFieldDeclaration record and the modifiersProtocol

--- src/app/javaparser.clj
+++ src/app/javaparser.clj
@@ -5,6 +5,7 @@
 (import japa.parser.ast.body.ConstructorDeclaration)
 (import japa.parser.ast.body.FieldDeclaration)
 (import japa.parser.ast.body.MethodDeclaration)
+(import japa.parser.ast.body.TypeDeclaration)
 (import japa.parser.ast.body.ModifierSet)

 ; ============================================
@@ -34,7 +35,7 @@
   (parseFiles (java-files dirname)))

 ; ============================================
-; Model
+; Recognize node types
 ; ============================================

 (defn isClass? [n]
@@ -42,8 +43,79 @@
     (instance? ClassOrInterfaceDeclaration n)
     (not (.isInterface n))))

+(defn isInterface? [n]
+  (and
+    (instance? ClassOrInterfaceDeclaration n)
+    (.isInterface n)))
+
 (defn isEnum? [n]
   (instance? EnumDeclaration n))
+
+; ============================================
+; Modifiers
+; ============================================
+
+(defprotocol modifiersProtocol
+  (getModifiers [this]))
+
+(extend-protocol modifiersProtocol
+  TypeDeclaration
+  (getModifiers [this] (.getModifiers this)))
+
+(extend-protocol modifiersProtocol
+  MethodDeclaration
+  (getModifiers [this] (.getModifiers this)))
+
+(extend-protocol modifiersProtocol
+  FieldDeclaration
+  (getModifiers [this] (.getModifiers this)))
+
+(defn isPrivate? [cl]
+  (let [ms (getModifiers cl)]
+    (ModifierSet/isPrivate ms)))
+
+(defn isPublic? [cl]
+  (let [ms (getModifiers cl)]
+    (ModifierSet/isPublic ms)))
+
+(defn isProtected? [cl]
+  (let [ms (getModifiers cl)]
+    (ModifierSet/isProtected ms)))
+
+(defn isStatic? [cl]
+  (let [ms (getModifiers cl)]
+    (ModifierSet/isStatic ms)))
+
+(defn isFinal? [cl]
+  (let [ms (getModifiers cl)]
+    (ModifierSet/isFinal ms)))
+
+(defn hasPackageLevelAccess? [cl]
+  (not
+    (or
+      (isPublic? cl)
+      (isPrivate? cl)
+      (isProtected? cl))))
+
+(defn isPublicOrHasPackageLevelAccess? [el]
+  (or
+    (isPublic? el)
+    (hasPackageLevelAccess? el)))
+
+(defn isNotPrivate? [cl]
+  (complement isPrivate?))
+
+; ============================================
+; Abstractions
+; ============================================
+
+(defrecord SingleFieldDeclaration [field variable]
+  modifiersProtocol
+    (getModifiers [this] (getModifiers field)))
+
+; ============================================
+; Model
+; ============================================

 (defn packageName [n]
   (if (instance? CompilationUnit n)
@@ -76,46 +148,6 @@
 (defn typeQname [t]
   (classQname t))

-(defn getModifiers [el]
-  (if (map? el)
-    (getModifiers (:field el))
-    (.getModifiers el)))
-
-(defn isPrivate? [cl]
-  (let [ms (getModifiers cl)]
-    (ModifierSet/isPrivate ms)))
-
-(defn isPublic? [cl]
-  (let [ms (getModifiers cl)]
-    (ModifierSet/isPublic ms)))
-
-(defn isProtected? [cl]
-  (let [ms (getModifiers cl)]
-    (ModifierSet/isProtected ms)))
-
-(defn isStatic? [cl]
-  (let [ms (getModifiers cl)]
-    (ModifierSet/isStatic ms)))
-
-(defn isFinal? [cl]
-  (let [ms (getModifiers cl)]
-    (ModifierSet/isFinal ms)))
-
-(defn hasPackageLevelAccess? [cl]
-  (not
-    (or
-      (isPublic? cl)
-      (isPrivate? cl)
-      (isProtected? cl))))
-
-(defn isPublicOrHasPackageLevelAccess? [el]
-  (or
-    (isPublic? el)
-    (hasPackageLevelAccess? el)))
-
-(defn isNotPrivate? [cl]
-  (complement isPrivate?))
-
 ; TODO Consider internal classes
 (defn getClasses [cu]
   (filter isClass? (.getTypes cu)))
@@ -153,7 +185,7 @@
   (flatten
     (for [f (getFields cl)]
       (for [v (.getVariables f)]
-        {:field f, :variable v}))))
+        (SingleFieldDeclaration. f v)))))

 (defn getNotPrivateConstructors [cl]
   (filter isNotPrivate? (getConstructors cl)))


Fix error when leaving group

Fix error when leaving group

Addresses #209

--- src/braid/core/client/ui/views/header.cljs
+++ src/braid/core/client/ui/views/header.cljs
@@ -20,7 +20,7 @@
 (defn group-name-view []
   (let [group (subscribe [:active-group])]
     (fn []
-      [:div.group-name (@group :name)])))
+      [:div.group-name (:name @group)])))

 (def GroupHeaderItem HeaderItem)


no sandbox: straight to (eval)

no sandbox: straight to (eval)

--- src/babel/workbook.clj
+++ src/babel/workbook.clj
@@ -111,7 +111,7 @@
                          (let [loaded
                                (try
                                  (binding [*read-eval* true]
-                                   (workbook-sandbox (binding [*read-eval* true] (read-string expr))))
+                                   (eval (read-string expr)))
                                  ;; TODO: how can I show the stack trace for the
                                  ;; attempt to process the expression?
                                  (catch Exception e


Remove `update-radius-attrs` event.

Remove `update-radius-attrs` event.

Replaced by the now generic `update-size` event.

--- src/uxbox/main/data/shapes.cljs
+++ src/uxbox/main/data/shapes.cljs
@@ -237,17 +237,6 @@
                  (when color {:stroke color})
                  (when opacity {:stroke-opacity opacity})))))

-(defn update-radius-attrs
-  [sid {:keys [rx ry] :as opts}]
-  (reify
-    udp/IPageUpdate
-    rs/UpdateEvent
-    (-apply-update [_ state]
-      (update-in state [:shapes-by-id sid]
-                 merge
-                 (when rx {:rx rx})
-                 (when ry {:ry ry})))))
-
 (defn hide-shape
   [sid]
   (reify


wrappers for phonemic API

wrappers for phonemic API

--- src/vim_fireplace_talk/core.clj
+++ src/vim_fireplace_talk/core.clj
@@ -2,29 +2,56 @@
 (:import org.sodbeans.phonemic.TextToSpeechFactory
   (:gen-class)))

+
 (def sp (org.sodbeans.phonemic.TextToSpeechFactory/getDefaultTextToSpeech) )
-(def say #(.speak sp %))
+
+(defn set-options [& {:keys [speed pitch voice volume]}]; :or {speed nil pitch nil voice nil volume nil}}]
+  (when speed (.setSpeed sp speed)) ;hmm you kind of want to know if it succeeded
+  (when pitch (.setPitch sp pitch))
+  ;(when voice (.setVoice sp voice))
+  (when volume (.setVolume sp volume)))
+
+(defn get-options [] (zipmap [:speed :pitch :voice :volume] [ (.getSpeed sp) (.getPitch sp) (.getAvailableVoices sp) (.getVolume sp)]))
+(say "food fighters love their music too but slow" {:speed 1.0})
+
+(defn apply-kw
+    "Like apply, but f takes keyword arguments and the last argument is
+      not a seq but a map with the arguments for f"
+    [f & args]
+    {:pre [(map? (last args))]}
+    (apply f (apply concat (butlast args) (last args))))
+(defn say
+  ([text] (.speak sp text))
+  ([text opts]
+   (let [prev-opts (get-options)]
+    ;something something blocking non-blocking
+    (apply-kw set-options opts)
+    (say text)
+    (apply-kw set-options prev-opts))))

 (def speech-methods '(.destroyNative .finalize .getAvailableVoices .getTextToSpeechEngine .getVoicesNative .initializeNative .isSpeaking .isSpeakingNative .pause .pauseNative .reinitialize .reinitializeNative .respeak .resume .resumeNative .setPitch .setPitchNative .setSpeechDispatcherPitch .setSpeed .setSpeedNative .setVoice .setVoiceNative .setVolume .setVolumeNative .speak .speakBlocking .speakBlockingNative .speakCharBlockingNative .speakCharNative .speakNative .stop .stopNative))
 ;(all-methods (first (iterator-seq (.getAvailableVoices sp))))

+(defn get-voices  []
+   (->> (.getAvailableVoices sp)
+       iterator-seq                              ;language is just an enum with only english in it lol.
+       (map #(assoc :name (.getName %) :language (-> % .getLanguage .toString )))))
+
 (defn voices [sp] (sort (map #(.getName %) (iterator-seq (.getAvailableVoices sp)))))

-(defn set-voice "arg is string" [sp v]
+(defn set-voice "arg is map {:name \"donald\"} " [v]
   (let [voices (iterator-seq (.getAvailableVoices sp))
-        voice-obj (first (filter #(= v (.getName %)) voices ))]
+        voice-obj (first (filter #(= (:name v) (.getName %)) voices ))]
     (.setVoice sp voice-obj)))
-   (set-voice sp "default")
+
 ;(.setSpeed  sp  (- 0.1 (.getSpeed sp)))
 ;;getAvailableVoices is a java iterator needs special conversion
-;;
 (defn -main
   "I don't do a whole lot ... yet."
   [& args]
-(.speakBlocking sp "Hello World")
-(say "hello there chap")
+  (.speakBlocking sp "Hello World")
+  (say "hello there chap")
   (println "Hello, World!"))
-

  (defn str-invoke [instance method-str & args]
                (clojure.lang.Reflector/invokeInstanceMethod
@@ -32,5 +59,34 @@
                                  method-str
                                  (to-array args)))

+(def change-speed #(.setSpeed  sp  (% 0.1 (.getSpeed sp))))
+(def change-volume #(.setVolume  sp  (% 0.1 (.getVolume sp))))
+(def lower-speed (partial change-speed -))
+(def inc-speed (partial change-speed +))
+(def lower-volume (partial change-volume -))
+(def inc-volume (partial change-volume +))
 ;;i.e.
 ;;(str-invoke sp "getSpeed")
+;;
+;;(get-it sp :speed)
+;;(set-it sp :speed)
+
+;;perhaps a wrapper around these setters which
+;; 1. lets you know if that setting is not possible
+;; 2. let's you revert to previous state
+
+
+;; create speech with custom settings key-words--instantiate and set options
+;; set-options method takes arbitrary keyword args <>
+;; convert voice to map
+;;
+;; speech methods take arbitrary settings, set them, speak, reset (does this work?) <>
+;;
+;; optionally eval the interior of what's in say  with an eval flag
+;; (say :volume 2 :eval true (http/get freebase.org/ ....
+;;
+;;
+
+;(def say #(.speak sp %))
+;(def state { :speed 0.5 ....
+;(def prev-state state)


Finish a renaming refactor

Finish a renaming refactor

That seems to have gotten interrupted halfway through.

Changed the websocket router's ch-sock to channel-socket

--- src/clj/com/frereth/web/routes/websock.clj
+++ src/clj/com/frereth/web/routes/websock.clj
@@ -310,55 +310,74 @@
         :ret (s/fspec :args any? :ret any?))
 (defn reset-web-socket-handler!
   "Replaces the existing web-socket-handler (aka router)
-(if any) with a new one, built around ch-sock.
+(if any) with a new one, built around channel-socket.
 Returns a function for closing
 the event loop (which should be returned in the next
 call as the next stop-fn)

 It's very tempting to try to pretend that this is a pure
 function, but its main point is the side-effects around
-the event loop"
-  [{:keys [ch-sock ws-controller ws-stopper] :as web-sock-handler}]
-  (let [stop-fn ws-stopper]
-    (io!
-     (when stop-fn
-       (stop-fn))
-     (let [stopper (async/chan)
-           rcvr (:receive-chan ch-sock)
-           event-loop
-           (async/go
-             (loop []
-               (log/debug "Top of websocket event loop")
-
-               ;; TODO: I'm pretty sure I have 5 minutes defined somewhere useful
-               (let [t-o (async/timeout (* 1000 60 5))
-                     [v ch] (async/alts! [t-o stopper rcvr ws-controller])]
-                 (if v
-                   (do
-                     (let [event (-> v :event first)]
-                       (when-not (= event :chsk/ws-ping)
-                         ;; Handle the ping, but don't log about it: this happens far too often
-                         ;; to spam the logs with the basic fact
-                         (log/debug "Message to handle:\n" (util/pretty (select-keys v [:client-id :connected-uids :uid :event])))))
-                     (try
-                       (handle-ws-event-loop-msg {:ch ch
-                                                  :rcvr rcvr
-                                                  :web-sock-handler web-sock-handler}
-                                                 v)
-                       (catch Exception ex
-                         (log/error ex "Failed to handle message:\n" (util/pretty v))))
-                     (recur))
-                   (when (= ch t-o)
-                     ;; TODO: Should probably post a heartbeat to the
-                     ;; "real" server here
-                     (log/debug "Websocket event loop heartbeat")
-                     (recur)))))
-             (log/info "Websocket event loop exited"))
-           exit-fn (fn []
-                     (when stopper
-                       (log/debug "Closing the stopper channel as a signal to exit the event loop")
-                       (async/close! stopper)))]
-       exit-fn))))
+the event loop
+
+ws-stopper is a function to signal the previous handler
+(if any) to stop. It's most likely the exit-fn returned
+from a previous invocation of this method"
+  [{:keys [channel-socket ws-controller ws-stopper] :as web-sock-handler}]
+  (io!
+   (when ws-stopper
+     (log/debug "Calling an existing stop function")
+     (ws-stopper))
+
+   (let [rcvr (:receive-chan channel-socket)
+         stopper (async/chan)
+         event-loop
+         ;; Q: Does a thread, or even a pipeline, make more sense here?
+         (async/go
+           (loop []
+             (log/debug "Top of websocket event loop")
+
+             ;; TODO: I'm pretty sure I have 5 minutes defined somewhere useful
+             (let [t-o (async/timeout (* 1000 60 5))
+                   [v ch] (try
+                            (async/alts! [t-o stopper rcvr ws-controller])
+                            (catch java.lang.IllegalArgumentException ex
+                              (let [details {:timeout t-o
+                                             :stopper stopper
+                                             :receiver rcvr
+                                             :controller ws-controller}
+                                    msg (str "Failed polling for next socket event\n"
+                                             (util/pretty details))]
+                                (log/error ex msg)
+                                (throw (ex-info msg details)))))]
+               (if v
+                 (do
+                   (let [event (-> v :event first)]
+                     (when-not (= event :chsk/ws-ping)
+                       ;; Handle the ping, but don't log about it: this happens far too often
+                       ;; to spam the logs with the basic fact
+                       (log/debug "Message to handle:\n" (util/pretty (select-keys v [:client-id :connected-uids :uid :event])))))
+                   (try
+                     (handle-ws-event-loop-msg {:ch ch
+                                                :rcvr rcvr
+                                                :web-sock-handler web-sock-handler}
+                                               v)
+                     (catch Exception ex
+                       (log/error ex "Failed to handle message:\n" (util/pretty v))))
+                   (recur))
+                 (when (= ch t-o)
+                   ;; TODO: Should probably post a heartbeat to the
+                   ;; "real" server here
+                   (log/debug "Websocket event loop heartbeat")
+                   (recur)))))
+           (log/info "Websocket event loop exited"))
+         exit-fn (fn []
+                   ;; This seems backwards.
+                   ;; But this is really a function that can be called to trigger
+                   ;; an exit.
+                   (when stopper
+                     (log/debug "Closing the stopper channel as a signal to exit the event loop")
+                     (async/close! stopper)))]
+     exit-fn)))

 ;; For testing a status request
 ;; Wrote this to debug what was going on w/ my
@@ -480,7 +499,7 @@
 (defn broadcast!
   "Send message to all attached users"
   [router msg]
-  (let [ch-sock (:ch-sock router)
+  (let [ch-sock (:channel-socket router)
         uids (-> ch-sock :connected-uids deref :any)
         send! (:send! ch-sock)]
     (doseq [uid uids]


node plugins chip margin

node plugins chip margin

--- src/cljs/swarmpit/component/node/info.cljs
+++ src/cljs/swarmpit/component/node/info.cljs
@@ -110,14 +110,14 @@
       (map #(comp/chip
               {:label %
                :key   (str "plugin-" %)
-               :style {:marginRight "5px"}}) networks))
+               :style {:margin "5px 5px 5px 0px"}}) networks))
     (comp/card-content
       {:className "Swarmpit-form-card-content"}
       (form/subsection "Volume")
       (map #(comp/chip
               {:label %
                :key   (str "volume-" %)
-               :style {:marginRight "5px"}}) volumes))))
+               :style {:margin "5px 5px 5px 0px"}}) volumes))))

 (rum/defc form-tasks < rum/static [tasks]
   (let [table-summary (->> (get-in tasks/render-metadata [:table :summary])


log debug

log debug

--- src/clojure/zensols/actioncli/resource.clj
+++ src/clojure/zensols/actioncli/resource.clj
@@ -85,5 +85,6 @@
         ;; bind since calling from other *ns* fails the eval (i.e. requires)
         fval (binding [*ns* our-ns]
                (eval (concat (list 'fn [] fnform))))]
+    (log/debugf "registering form: %s" (pr-str fnform))
     (swap! res-paths assoc key fval)
     fval))


Remove optional fields from minimal example

--- src/ctia/entity/investigation/examples.clj
+++ src/ctia/entity/investigation/examples.clj
@@ -33,9 +33,6 @@
 (def investigation-minimal
   {:id "http://ex.tld/ctia/investigation/investigation-2805d697-66b3-4e14-9b32-179e7a72eab6"
    :source "a source"
-   :object_ids []
-   :investigated_observables []
-   :targets []
    :schema_version c/ctim-schema-version
    :type "investigation"})


Use fulcronetwokr again for pathom

Use fulcronetwokr again for pathom

--- src/com/wsscode/pathom/fulcro/network.cljs
+++ src/com/wsscode/pathom/fulcro/network.cljs
@@ -13,14 +13,16 @@
   fulcro.network/NetworkBehavior
   (serialize-requests? [_] true)

-  fulcro.network/FulcroRemoteI
-  (transmit [this {::fulcro.network/keys [edn ok-handler error-handler]}]
+  fulcro.network/FulcroNetwork
+  (send [this edn ok error]
     (go
       (try
-        (ok-handler {:transaction edn :body (<? (parser {} edn))})
+        (ok (<? (parser {} edn)))
         (catch :default e
           (js/console.error "PathomRemote error:" e)
-          (error-handler {:body e}))))))
+          (error e)))))
+
+  (start [_]))

 (defn pathom-remote
   "Create a Fulcro remote that will use a Pathom async parser to process the query."


Improved body-params chain handler.

Improved body-params chain handler.

Now you can specify the attribute name which should be used
for attach the parsed data.

--- src/clojure/catacumba/handlers/parsing.clj
+++ src/clojure/catacumba/handlers/parsing.clj
@@ -62,9 +62,9 @@

   This function optionally accept a used defined method
   or multimethod where to delegate the body parsing."
-  ([] (body-params parse))
-  ([parsefn]
+  ([] (body-params {}))
+  ([{:keys [parsefn attr] :or {parsefn parse attr :data}}]
    (fn [context]
      (let [^Context ctx (:catacumba/context context)
            ^TypedData body (:body context)]
-       (ct/delegate {:data (parsefn ctx body)})))))
+       (ct/delegate {attr (parsefn ctx body)})))))


Changed usage information not to show java info.

--- src/blutwurst/core.clj
+++ src/blutwurst/core.clj
@@ -64,7 +64,7 @@
   (System/exit code))

 (defn- usage [option-summary]
- (println (->> ["Usage: java -jar blutwurst.jar [options]"
+ (println (->> ["Usage: blutwurst [options]"
                 ""
                 option-summary
                 ""


Fix documentation of :onyx.core/results

Fix documentation of :onyx.core/results

--- src/onyx/information_model.cljc
+++ src/onyx/information_model.cljc
@@ -609,7 +609,7 @@
                                          :doc "The sequence of segments read by this peer"}
                        :onyx.core/results {:type :results
                                            :optional? true
-                                           :doc "A map of read segment to a vector of segments produced by applying the function of this task"}
+                                           :doc "A map containing `:tree`: the mapping of segments to the newly created segments, `:segments`: the newly created segmetns, `:acks`: the ack messages for these segments, `:retries`: the segments that will be retried from the input source."}
                        :onyx.core/scheduler-event {:type :keyword
                                                    :choices peer-scheduler-event-types
                                                    :optional? true


Use a go-loop to block on alts.

Use a go-loop to block on alts.

--- src/onyx/peer/task_pipeline.clj
+++ src/onyx/peer/task_pipeline.clj
@@ -1,5 +1,5 @@
 (ns onyx.peer.task-pipeline
-  (:require [clojure.core.async :refer [alts!! <!! >!! chan close!]]
+  (:require [clojure.core.async :refer [alts!! <!! >!! chan close! go]]
             [com.stuartsierra.component :as component]
             [dire.core :as dire]
             [onyx.queue.hornetq :refer [hornetq]]
@@ -11,10 +11,13 @@
 (defn read-batch [queue consumers batch-size timeout]
   (let [consumer-chs (map (fn [_] (chan 1)) (range (count consumers)))]
     (doseq [[consumer ch] (map vector consumers consumer-chs)]
-      (>!! ch (extensions/consume-message queue consumer timeout)))
-    (let [rets (->> (range batch-size)
-                    (map (fn [_] (first (apply alts!! consumer-chs))))
-                    (filter identity))]
+      (go (loop []
+            (let [m (extensions/consume-message queue consumer timeout)]
+              (if m
+                (>!! ch m)
+                (recur))))))
+    (let [rets (dorun (map (fn [_] (first (alts!! consumer-chs)))
+                           (range batch-size)))]
       (doseq [ch consumer-chs] (close! ch))
       rets)))


Added appengine-magic.core/appengine-environment-type.

--- src/appengine_magic/core.clj
+++ src/appengine_magic/core.clj
@@ -11,6 +11,14 @@
       false)))

+(defn appengine-environment-type []
+  (let [env-property (System/getProperty "com.google.appengine.runtime.environment")]
+    (cond
+     (nil? env-property) :interactive
+     (= env-property "Development") :dev-appserver
+     (= env-property "Production") :production)))
+
+
 (if (in-appengine-interactive-mode?)
     (load "core_local")
     (load "core_google"))


[#2634] Refactor

[#2634] Refactor

--- backend/src/akvo/lumen/lib/aggregation/commons.clj
+++ backend/src/akvo/lumen/lib/aggregation/commons.clj
@@ -44,13 +44,9 @@
                                        (:pointColorColumn %)
                                        (:geom %)
                                        (:aggregationGeomColumn %)
-                                       (:aggregationColumn %)
-
-                                       ])))
-    )
+                                       (:aggregationColumn %)]))))
    flatten
-   vec)
-)
+   vec))


Remove redundant code

Remove redundant code

--- src/asciinema/player/vt.cljc
+++ src/asciinema/player/vt.cljc
@@ -433,7 +433,6 @@
         new-x (adjust-to-range (dec ps2) 0 (dec width))
         new-y (adjust-y-to-limits vt (dec ps1))]
     (-> vt
-        (assoc :next-print-wraps false)
         (move-cursor-to-col new-x)
         (move-cursor-to-row new-y))))


styling the stepinator

styling the stepinator

--- src/overtone/gui/stepinator.clj
+++ src/overtone/gui/stepinator.clj
@@ -11,14 +11,15 @@

 (def ^{:private true} step-style
   (style
-    :background (theme-color :fill-1)
-    :stroke 0.0))
+    :background (clarify-color (theme-color :fill-1) -1)
+    :foreground (theme-color :stroke-1)
+    :stroke 1.0))

 (def ^{:private true} step-border-style
   (style
     :foreground (theme-color :stroke-2)
     :background (theme-color :fill-2)
-    :stroke 1.0))
+    :stroke 2.0))

 (def ^{:private true} background-stroke
   (style
@@ -51,7 +52,7 @@
         y             (/ h 2)
         tick-height   (/ h NUM_SLICES)
         num-steps    (:num-steps state)
-        line-padding  1.5]
+        line-padding  0]

     (draw g (rect 0 0 w h) background-fill)


Use go-loop for main-loop instead of act-loop.

--- src/cbfg/world/t1.cljs
+++ src/cbfg/world/t1.cljs
@@ -153,8 +153,8 @@
               prog-js (str "with (cbfg.world.t1) {" prog-in "}")
               prog-res (try (js/eval prog-js) (catch js/Object ex ex))]
           (println :prog-res prog-res)
-          (act-loop main-loop world [num-requests 0 num-responses 0]
-                    (let [[v ch] (aalts main-loop [req-ch res-ch])
+          (go-loop [num-requests 0 num-responses 0]
+                    (let [[v ch] (alts! [req-ch res-ch])
                           ts (+ num-requests num-responses)]
                       (when v
                         (if (= ch req-ch)
@@ -166,7 +166,7 @@
                                                  [:clients (:client req) :req-ch])]
                                 (prog-event world [:req] #(assoc-in % [:reqs ts] [req nil]))
                                 (cbfg.world.base/render-client-hist (:reqs @prog-curr))
-                                (aput main-loop client-req-ch req)
+                                (>! client-req-ch req)
                                 (recur (inc num-requests) num-responses))))
                           (do (prog-event world [:res] #(update-in % [:reqs (:opaque v) 1]
                                                                    conj [ts v]))


use :let instead of return

use :let instead of return

--- src/er_cassandra/model/alia/unique_key.clj
+++ src/er_cassandra/model/alia/unique_key.clj
@@ -69,13 +69,11 @@
                                        unique-key-record
                                        (merge (fns/opts-remove-timestamp opts)
                                               {:if-not-exists true}))
-             inserted? (return (applied? insert-response))
-
-             owned? (return
-                     (applied-or-owned?
-                      entity
-                      (t/extract-uber-key-value entity unique-key-record)
-                      insert-response))
+             :let [inserted? (applied? insert-response)
+                   owned? (applied-or-owned?
+                           entity
+                           (t/extract-uber-key-value entity unique-key-record)
+                           insert-response)]

              live-ref? (if-not owned?
                          (r/select-one session


Fix email on copyright notice on core.kdf ns.

--- src/buddy/core/kdf.clj
+++ src/buddy/core/kdf.clj
@@ -1,4 +1,4 @@
-;; Copyright 2013-2015 Andrey Antukh <niwi@niwi.be>
+;; Copyright 2013-2015 Andrey Antukh <niwi@niwi.nz>
 ;;
 ;; Licensed under the Apache License, Version 2.0 (the "License")
 ;; you may not use this file except in compliance with the License.


require clojure.string as s

require clojure.string as s

--- src/jx/reporter/karma.cljs
+++ src/jx/reporter/karma.cljs
@@ -2,7 +2,7 @@
   (:require [cljs.test]
             [clojure.data]
             [fipp.clojure]
-            [clojure.string :as str])
+            [clojure.string :as s])
   (:require-macros [jx.reporter.karma :as karma]))

 (def karma (volatile! nil))
@@ -60,7 +60,7 @@
   (let [indentation (count "expected: ")]
     (str
       "FAIL in   " (cljs.test/testing-vars-str result) "\n"
-      (when-not (str/blank? testing-contexts-str)
+      (when-not (s/blank? testing-contexts-str)
         (str "\"" testing-contexts-str "\"\n"))
       (if (and (seq? expected)
                (seq? actual))


It helps if you include your session store.

--- src/kixi/hecuba/routes.clj
+++ src/kixi/hecuba/routes.clj
@@ -166,7 +166,9 @@
                         :workflows
                         ;; Note that ordering matters here. Basic first.
                         [(workflows/http-basic :realm "/")
-                         (workflows/interactive-form :login-uri "/login")]}))
+                         (workflows/interactive-form :login-uri "/login")]})
+                      ;; Don't forget that Cassandra Session Store
+                      {:session {:store (cassandra-store store)}})
           server     (run-server all-routes {:port 8010})]
       (assoc this ::server server)))
   (stop [this]


Mild refactoring.

Mild refactoring.

--- src/blutwurst/jsonschema.clj
+++ src/blutwurst/jsonschema.clj
@@ -15,11 +15,14 @@
 (defn- is-json-array? [prop]
  (= "ARRAY" (string/upper-case (-> prop second first second))))

+(defn- parse-json-array-property [prop]
+  {:name (first prop) :container "array" :type (-> prop second (get "items") (get "type") lookup-type)})
+
 (defn- extract-properties [schema res]
   (assoc res :columns
          (mapv (fn [prop]
                 (if (is-json-array? prop)
-                  {:name (first prop) :container "array" :type (-> prop second (get "items") (get "type") lookup-type)}
+                  (parse-json-array-property prop)
                   {:name (first prop) :type (lookup-type (-> prop second first second))}))
                (get schema "properties"))))


Addapt shmac to new mac uniform interface.

--- src/buddy/core/mac/shmac.clj
+++ src/buddy/core/mac/shmac.clj
@@ -14,16 +14,16 @@

 (ns buddy.core.mac.shmac
   "Salted variant of Hash-based Message Authentication Codes (HMACs)"
-  (:import clojure.lang.Keyword)
   (:require [buddy.core.codecs :refer :all]
             [buddy.core.mac.hmac :as hmac]
-            [buddy.core.hash :as hash]))
+            [buddy.core.hash :as hash])
+  (:import clojure.lang.Keyword))

 (defn- make-salted-hmac
   [input key salt ^Keyword alg]
   (let [key (concat-byte-arrays (->byte-array key)
                                 (->byte-array salt))]
-    (hmac/hmac input (hash/sha512 key) alg)))
+    (hmac/hash input (hash/sha512 key) alg)))

 (defn- verify-salted-hmac
   [input ^bytes signature key salt ^Keyword alg]
@@ -31,12 +31,18 @@
                                 (->byte-array salt))]
     (hmac/verify input signature (hash/sha512 key) alg)))

-(defn shmac
-  "Generic function that exposes a high level
-  interface for salted variant of keyed-hash message
-  authentication code algorithm."
+(defn hash
+  "Generate salted hmac digest for arbitrary
+  input data, a secret key and hash algorithm.
+
+  If algorithm is not supplied, sha256
+  will be used as default value."
   [input key salt ^Keyword alg]
   (make-salted-hmac input key salt alg))
+
+(def ^{:doc "Deprecated alias for `hash` function.`"
+       :deprecated true}
+  shmac hash)

 (defn verify
   "Generic function that exposes a high level


github login

github login

--- cloc-webapp/src-cljs/main/core.cljs
+++ cloc-webapp/src-cljs/main/core.cljs
@@ -3,7 +3,8 @@
   (:require [cljs.core.async :refer [put! <! >! chan timeout]]
             [om.core :as om :include-macros true]
             [om.dom :as dom :include-macros true]
-            [cljs-http.client :as http])
+            [cljs-http.client :as http]
+            [goog.window :refer [open]])
   (:import [goog.net Cookies]))

 (enable-console-print!)
@@ -20,7 +21,9 @@
     (render-state [this state]
       (if (:user state)
         (dom/a #js {:href "/dash"} "Dashboard")
-        (dom/a #js {:href "/login"} "Login")))
+        (dom/button
+            #js {:onClick #(open "https://github.com/login/oauth/authorize?client_id=")}
+            "Github Login")))

     om/IDidMount
     (did-mount [this]


Creates with-javascripts functionality.

Creates with-javascripts functionality.

Adds a dynamically bindable variable, *javascripts*,
cadence.views.common along with an accompanying macro with-javascripts
to allow modification of the *javascripts* var.  This is mainly to be
used with base-layout (which has also been modified slightly).

--- src/cadence/views/common.clj
+++ src/cadence/views/common.clj
@@ -7,6 +7,14 @@
   (:use noir.core
         hiccup.core
         hiccup.page-helpers))
+
+(def ^:dynamic *javascripts* ["/js/bootstrap.min.js"])
+
+(defmacro with-javascripts
+  "Specify what javascripts to use dynamically."
+  [js-paths & body]
+  `(binding [*javascripts* ~js-paths]
+     ~@body))

 (defpartial base-layout [& content]
   (html5
@@ -21,6 +29,7 @@
      (include-js (str "https://ajax.googleapis.com/ajax/libs/"
                       "jquery/1.7.2/jquery.min.js")
                  "/js/jquery-1.7.2.min.js")
+
      [:script {:type "text/javascript"}
       "var _gaq = _gaq || [];
       _gaq.push(['_setAccount', 'UA-32354071-1']);
@@ -34,10 +43,8 @@
       s.parentNode.insertBefore(ga, s);
       })();"]]
     [:body
-     content]
-    (include-js "/js/bootstrap.min.js")
-    (include-js "/js/cadence.js")
-    (include-js "/js/runner.js")))
+     content
+     (html (map include-js *javascripts*))]))

 (defpartial user-links []
   [:li.dropdown


Adds option to control-group partial for 'custom' input.

--- src/cadence/views/common.clj
+++ src/cadence/views/common.clj
@@ -73,7 +73,9 @@
     [:div.control-group
      [:label.control-label {:for name} (str (:name params) ": ")]
      [:div.controls
-      [:input (assoc (dissoc params :more) :name name)]
+      (if (= (:type params) "custom")
+        (:content params)
+        [:input (assoc (dissoc params :more) :name name)])
       (:more params)]]))

 (defn- as-css-id [s]


Modifies control-group partial to have a lower-case 'name'.

--- src/cadence/views/common.clj
+++ src/cadence/views/common.clj
@@ -53,11 +53,12 @@
      [:div#main.container content]]))

 (defpartial control-group [params]
-  [:div.control-group
-   [:label.control-label {:for (:name params)} (str (:name params) ": ")]
-   [:div.controls
-    [:input (dissoc params :more)]
-    (:more params)]])
+  (let [name (string/lower-case (:name params))]
+    [:div.control-group
+     [:label.control-label {:for name} (str (:name params) ": ")]
+     [:div.controls
+      [:input (assoc (dissoc params :more) :name name)]
+      (:more params)]]))

 (defn- as-css-id [s]
   (name (if (nil? s) "" s)))


Fix minor error on state checking

Fix minor error on state checking

--- src/rsvp_backend/db/invitee.clj
+++ src/rsvp_backend/db/invitee.clj
@@ -1,5 +1,6 @@
 (ns rsvp-backend.db.invitee
-  (:require [rsvp-backend.util :as util]
+  (:require [clojure.string :as str]
+            [rsvp-backend.util :as util]
             [taoensso.faraday :as ddb]))

 (def client-opts
@@ -52,10 +53,10 @@
            entry
            (catch Exception e "AWS_ERROR"))
       (and (not (nil? entry))
-           (or (= (:rsvp_state "RESPONDED"))
-               (= (:rsvp_state "FORM_SUBMITTED")))
-           (or (= (:confirmation entry) "Yes")
-               (= (:confirmation entry) "Maybe")))
+           (or (= (:rsvp_state entry) "RESPONDED")
+               (= (:rsvp_state entry) "FORM_SUBMITTED"))
+           (or (= (str/lower-case (:confirmation entry)) "yes")
+               (= (str/lower-case (:confirmation entry)) "maybe")))
       "ALREADY_RESPONDED_YES"
       (not (nil? entry))
       (try (ddb/update-item client-opts db-name {:code code}


TODO on from/to for partitions-list.

TODO on from/to for partitions-list.

--- src/cbfg/world/t2.cljs
+++ src/cbfg/world/t2.cljs
@@ -160,6 +160,7 @@
         [server-state nil])

     "partitions-list"
+    ; TODO: Support from & to parameters for partitions-list.
     (do (act partitions-list actx
              (doseq [name (keys (get-in server-state
                                         [:realms (:cur-realm m)


IQ increased rez cost.

IQ increased rez cost.

--- src/clj/game/cards.clj
+++ src/clj/game/cards.clj
@@ -3369,7 +3369,8 @@

    "IQ"
    {:abilities [{:msg "end the run" :effect (effect (end-run))}]
-    :strength-bonus (req (count (:hand corp)))}
+    :strength-bonus (req (count (:hand corp)))
+    :rez-cost-bonus (req (count (:hand corp)))}

    "Information Overload"
    {:abilities [{:label "Trace 1 - Give the Runner 1 tag"


if-let; exclude hash-maps w/ meaningless :val

--- src/clj/ufo/parser.clj
+++ src/clj/ufo/parser.clj
@@ -58,23 +58,22 @@
   (m/domonad parser-m
              [matched-groups
               (fn [s]
-                (let [match (re-find re s)]
-                  #_(println "s:" s)
-                  #_(println "match:" match)
-                  (if match
-                    (let [idx (.indexOf s match)]
-                      #_(println "idx:" idx)
-                      (let [head (.substring s 0 idx)
-                            tail (.substring s (+ idx (count match)))]
-                        #_(println "head:" head)
-                        #_(println "tail:" tail)
-                        #_(println "res:" (list (list head match) tail))
-                        #_(println "--------")
-                        (list [{:type :txt :val head}
-                               {:type :exp :val match}]
-                              tail)))
-                    (list [{:type :txt :val s} {:type :exp :val nil}]
-                          nil))))]
+                #_(println "s:" s)
+                (if-let [match (re-find re s)]
+                  (let [idx (.indexOf s match)]
+                    #_(println "idx:" idx)
+                    (let [head (.substring s 0 idx)
+                          tail (.substring s (+ idx (count match)))]
+                      #_(println "head:" head)
+                      #_(println "tail:" tail)
+                      #_(println "res:" (list (list head match) tail))
+                      #_(println "--------")
+                      (list (remove nil? [(if-not (empty? head)
+                                            {:type :txt :val head})
+                                          {:type :exp :val match}])
+                            tail)))
+                  (list [{:type :txt :val s}]
+                        nil)))]
              matched-groups))

 (defn match-re [re]


Remove debug output

Remove debug output

--- src/cljx/revue/vm.cljx
+++ src/cljx/revue/vm.cljx
@@ -1118,15 +1118,11 @@
                     ((juxt :fun :env)
                      (find-most-recent-activation frame fun-name)))
         [env-frame-index slot-index]  (local-variable-index fun var)]
-    #_(println "local-variable-value: " fun-name (:name (active-function frame)) var)
-    #_(println "env: " env (if env (map print-str env) "no env") (not (not fun)))
-    #_(println "indices: " env-frame-index slot-index)
     (if (and env-frame-index slot-index
              ;; The first instruction of a function pops the
              ;; environment from the stack so we have no locals, yet.
              (not (zero? (:pc frame))))
       (let [env-frame (nth env env-frame-index)]
-        #_(println "env-frame: " env-frame)
         (mem/->clojure (nth env-frame slot-index) (:store frame)))
       nil)))


[#7] Survey definition wip

[#7] Survey definition wip

--- api/src/api/core.clj
+++ api/src/api/core.clj
@@ -1,12 +1,13 @@
 (ns api.core
   (:import [com.gallatinsystems.common Constants]
-           [org.akvo.flow.api.dao FolderDAO SurveyDAO]
+           [com.gallatinsystems.survey.dao.SurveyDAO]
            [com.gallatinsystems.user.dao UserDao]
            [com.google.appengine.tools.remoteapi RemoteApiInstaller RemoteApiOptions]
            [com.google.apphosting.utils.config AppEngineWebXmlReader]
            [java.io ByteArrayInputStream]
-           [org.apache.commons.codec.binary Base64]
-           [java.time.format DateTimeFormatter])
+           [java.time.format DateTimeFormatter]
+           [org.akvo.flow.api.dao FolderDAO SurveyDAO]
+           [org.apache.commons.codec.binary Base64])
   (:require [clj-http.client :as http]
             [clojure.java.io :as io]
             [clojure.string :as str]))
@@ -40,6 +41,15 @@
 (defn to-iso-8601 [date]
   (.format date-format (.toInstant date)))

+(defn created-at [entity]
+  (to-iso-8601 (.getCreatedDateTime entity)))
+
+(defn modified-at [entity]
+  (to-iso-8601 (.getLastUpdateDateTime entity)))
+
+(defn id [entity]
+  (-> entity .getKey .getId))
+

 (defn get-filtered-folders [spec email parent-id]
   (with-remote-api spec
@@ -53,11 +63,11 @@

       (->> user-folders
            (map (fn [folder]
-                  {:id (str (-> folder .getKey .getId))
+                  {:id (str (id folder))
                    :name (.getName folder)
                    :parent-id (str (.getParentId folder))
-                   :created-at (to-iso-8601 (.getCreatedDateTime folder))
-                   :modified-at (to-iso-8601 (.getLastUpdateDateTime folder))}))
+                   :created-at (created-at folder)
+                   :modified-at (modified-at folder)}))
            (filter #(= (:parent-id %) parent-id))))))

 (defn get-filtered-surveys [spec email folder-id]
@@ -72,14 +82,64 @@

       (->> user-surveys
            (map (fn [survey]
-                  {:id (str (-> survey .getKey .getId))
+                  {:id (str (id survey))
                    :name (.getName survey)
                    :folder-id (str (.getParentId survey))
-                   :created-at (to-iso-8601 (.getCreatedDateTime survey))
-                   :modified-at (to-iso-8601 (.getLastUpdateDateTime survey))}))
+                   :created-at (created-at survey)
+                   :modified-at (modified-at survey)}))
            (filter #(= (:folder-id %) folder-id))))))

-
+(defn ->question [question]
+  {:id (str (id question))
+   :name (.getText question)
+   :type (str (.getType question))
+   :order (.getOrder question)
+   :created-at (created-at question)
+   :modified-at (modified-at question)})
+
+
+
+(defn question-group-definition [question-group questions]
+  (let [qs (sort-by :order (map ->question questions))]
+    {:id (str (id question-group))
+     :name (.getName question-group)
+     :repeatable? (.getRepeatable question-group)
+     :questions qs
+     :created-at (created-at question-group)
+     :modified-at (modified-at question-group)}))
+
+(defn get-form-definition [email form-id]
+  (let [form-dao (com.gallatinsystems.survey.dao.SurveyDAO.)
+        ;; Includes question groups, but contrary to docstring does not contain questions
+        form (.loadFullSurvey form-dao form-id)
+        question-dao (com.gallatinsystems.survey.dao.QuestionDao.)
+        questions (group-by #(.getQuestionGroupId %)
+                            (.listQuestionsBySurvey question-dao form-id))]
+    {:id (str (id form))
+     :name (.getName form)
+     :question-groups (mapv (fn [question-group]
+                              (question-group-definition question-group
+                                                         (get questions
+                                                              (id question-group))))
+                            (.values (.getQuestionGroupMap form)))
+     :created-at (created-at form)
+     :modified-at (modified-at form)}))
+
+(defn get-survey-definition [email survey-id]
+  (let [user-dao (UserDao.)
+        user (.findUserByEmail user-dao email)
+        survey-dao (com.gallatinsystems.survey.dao.SurveyGroupDAO.)
+        survey (.getByKey survey-dao (Long/parseLong survey-id))
+        form-dao (com.gallatinsystems.survey.dao.SurveyDAO.)
+        forms (.filterByUserAuthorizationObjectId form-dao
+                                                  (.listSurveysByGroup form-dao (Long/parseLong survey-id))
+                                                  (id user))]
+    {:id survey-id
+     :name (.getName survey)
+     :forms (mapv #(get-form-definition email (id %))
+                  forms)
+     :created-at (created-at survey)
+     :modified-at (modified-at survey)}))

 (defn contents-url [path]
   (format "https://api.github.com/repos/akvo/akvo-flow-server-config/contents%s" path))
@@ -147,9 +207,19 @@
       file
       (fetch-p12 instance-id auth-token))))

-#_(let [auth-token ""
+(comment
+  (defn remote-api-spec [instance-map instance-id]
+    (let [auth-token (System/getenv "GITHUB_API_KEY")
+          host (str instance-id ".appspot.com")
+          iam-account (get-in instance-map [instance-id "serviceAccountId"])
+          p12-file (get-p12 instance-id auth-token)]
+      {:host host
+       :iam-account iam-account
+       :p12-path (.getAbsolutePath p12-file)}))
+
+  (let [auth-token (System/getenv "GITHUB_API_KEY")
         email ""
-        ;;instance-map (get-instance-map auth-token)
+        instance-map (get-instance-map auth-token)
         alias-map (get-alias-map instance-map)
         instance-id (get alias-map "uat1")
         host (str instance-id ".appspot.com")
@@ -158,14 +228,13 @@
         p12-file (get-p12 instance-id auth-token)]
     (get-filtered-folders {:host host
                            :iam-account iam-account
-                           :p12-path (.getAbsolutePath p12-file)
-                           }
+                           :p12-path (.getAbsolutePath p12-file)}
                           email
                           "27009117"))

-#_(let [auth-token ""
+  (let [auth-token (System/getenv "GITHUB_API_KEY")
         email ""
-        ;;instance-map (get-instance-map auth-token)
+        instance-map (get-instance-map auth-token)
         alias-map (get-alias-map instance-map)
         instance-id (get alias-map "uat1")
         host (str instance-id ".appspot.com")
@@ -174,7 +243,15 @@
         p12-file (get-p12 instance-id auth-token)]
     (get-filtered-surveys {:host host
                            :iam-account iam-account
-                           :p12-path (.getAbsolutePath p12-file)
-                           }
+                           :p12-path (.getAbsolutePath p12-file)}
                           email
                           "24109115"))
+
+  (def auth-token (System/getenv "GITHUB_API_KEY"))
+  (def instance-map (get-instance-map auth-token))
+
+  (remote-api-spec instance-map "akvoflow-uat1")
+  (with-remote-api (remote-api-spec instance-map "akvoflow-uat1")
+    (get-survey-definition "" "31929121"))
+
+  )


Updated sort key for trash.

Updated sort key for trash.

--- src/clj/bookmarx/handler.clj
+++ src/clj/bookmarx/handler.clj
@@ -11,6 +11,8 @@

 (timbre/refer-timbre)

+(def trash-id -1)
+
 (defn build-response "Build a response with the changed bookmarks."
   [changed-ids]
   (let [latest-revision (ds/get-latest-revision)]
@@ -21,9 +23,11 @@
   [folder]
   (let [[links folders] (map vec ((juxt filter remove) #(:bookmark/url (get @bookmarks %))
                                    (:bookmark/children folder)))
-        make-sort-key #(if (:bookmark/title (get @bookmarks %))
+        make-sort-key #(cond
+                         (= (:bookmark/id (get @bookmarks %)) trash-id) "~~~TRASH"
+                         (:bookmark/title (get @bookmarks %))
                          (str/upper-case (:bookmark/title (get @bookmarks %)))
-                         (do (warn (str "NO TITLE" % (str (get @bookmarks %)))) ""))]
+                         :else (do (warn (str "NO TITLE" % (str (get @bookmarks %)))) ""))]
     (update folder :bookmark/children
             (fn [_] (into [] (concat (if (empty? folders) folders (sort-by make-sort-key folders))
                                      (if (empty? links) links (sort-by make-sort-key links))))))))
@@ -236,8 +240,7 @@
   []
   (try
     (infof "delete-trash")
-    (let [trash-id -1
-          {:keys [:bookmark/parent-id :bookmark/link-count]} (get @bookmarks trash-id)
+    (let [{:keys [:bookmark/parent-id]} (get @bookmarks trash-id)
           changed-ids [parent-id trash-id]
           deleted-ids (get-in @bookmarks [trash-id :bookmark/children])]
       ;; Remove deleted bookmarks from the cache.
@@ -247,7 +250,6 @@
       (swap! bookmarks update-in [trash-id :bookmark/children] vector)

       ;; Subtract the link count from the ancestors.
-      (swap! bookmarks update-in [parent-id :bookmark/link-count] #(- % link-count))
       (swap! bookmarks update-in [trash-id :bookmark/link-count] (fn [_] 0))

       ;; Persist the changes.


Got ring json working.

Got ring json working.

--- src/cljs/clj_forms/core.cljs
+++ src/cljs/clj_forms/core.cljs
@@ -39,8 +39,7 @@
 (defn  submitWeight! [w]
        (.log js/console w)
        (POST "/addWeight"
-                               {:params
-                                        {:weight w}
+                               {:params {:weight w}
                                 :format :json
        :handler handler
        :error-handler error-handler}))


spelling mistakes in resume

spelling mistakes in resume

--- src/cljs/fractals/email.cljs
+++ src/cljs/fractals/email.cljs
@@ -22,18 +22,19 @@

            [:tr [:td {:style {:text-align align
                               :font-size "1rem"}} "+8801717018083"]]
-           [:tr [:td {:style {:text-align align
-                              :font-size "12px"}}
-                 [:div {:style {:background-color :white
-                               :height "1px"}
-                       }]
-                 [:div  "aryabhatiya.algebra@gmail.com"]]]
+           (comment
+             [:tr [:td {:style {:text-align align
+                                :font-size "12px"}}
+                   [:div {:style {:background-color :white
+                                  :height "1px"}
+                          }]
+                   [:div  "aryabhatiya.algebra@gmail.com"]]])
            [:tr [:td {:style {:text-align align
                               :font-size "10px"}}
-                 [:div {:style {:background-color :white
-                                :height "1px"}
-                        }]
-                 [:div "H# 192, R# 5, Mirpur DOHS, Dhaka"]]]
+                 (comment [:div {:style {:background-color :white
+                                         :height "1px"}
+                                 }])
+                 [:div "H# 192, R# 5, Mirpur DOHS, Dhaka - 1216"]]]
            ]]]
         [:td [:div {:style {:width "50px"}}]]
         [:td
@@ -51,7 +52,7 @@
                               [:tr [:td
                                     [:span {:style {:align-text :left
                                                     :font-size "1.4rem"}} "“F"]
-                                    "ullstack developeing experience on mobile & IOT."]]
+                                    "ullstack developing experience on mobile & IOT."]]
                               [:tr [:td  "Devops.... friendl"
                                     [:span {:style { :font-size "1.4rem"}} "y”"]]]
                               ]]]]]]]]]]))
@@ -89,17 +90,18 @@
       [:tr
        [:td {:style {:fond-size fw-small
                      :width "250px"
-                     :padding "10px"
+                     :padding-left "10px"
+                     :padding-right "10px"
                      :background-color "#fff"
                      :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"}}
-        [:div {:style {:padding "10px"
+        [:div {:style {:padding "5px"
                        :color "#666"
                        :font-size fw-small}}
-         "Joined May 2012"]
+         "Joined Nov 2013"]
         [:div {:style {
                        :background-color "#185E65"
                        :color "#BFBFBF"
-                       :padding "10px"
+                       :padding "5px"
                        :font-size fw-small}}
          [:a {:style {:color "#BFBFBF"
                       :text-decoration :none}
@@ -107,13 +109,13 @@
          [:div {:style {:text-align :center}} [:span {:style {:font-weight 600
                                                               :font-size "1.1rem"}} "// " ]
           " SGC GLOBAL"]]
-        [:div {:style {:padding "5px"
+        [:div {:style {:padding "2px"
                        :color "#666"
                        :font-size fw-small}}
-         "5+ years"]]
-       [:td
-
-        [:table {:style {:padding "5px"
+         "3.5+ years"]]
+       [:td
+
+        [:table {:style {:padding "10px"
                          :font-size fw-small
                          :color "#003399"
                          :background-color "#fff"
@@ -136,12 +138,71 @@
                   [:tr [:td "➟ Database and Query optimization"]]
                   [:tr [:td "➟ System Automation & Testing"]]]]]]]]]]]]))

+(rum/defc position-email-gp [state]
+  (let [fw "1rem"
+        fw-small "1rem"]
+    [:table {:style
+             {:font-family "'Merriweather', serif"}}
+     [:tbody
+      [:tr
+       [:td [:div {:style {:font-weight 600
+                           :font-size fw-small
+                           :text-align :center
+                           :padding "10px"}}
+             "System Engineer"] ]
+       [:td [:div {:style {:font-weight 600
+                           :font-size fw-small
+                           :padding "10px"
+                           }}
+             "GP trouble ticketing System ‒ GPTTS"]]]
+      [:tr
+       [:td {:style {:fond-size fw-small
+                     :width "250px"
+                     :padding-left "10px"
+                     :padding-right "10px"
+                     :background-color "#fff"
+                     :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"}}
+        [:div {:style {:padding "5px"
+                       :color "#666"
+                       :font-size fw-small}}
+         "Joined Feb 2012"]
+        [:div {:style {
+                       :background-color "#87ceeb"
+                       :color "#582828"
+                       :padding "10px"
+                       :font-size fw-small}}
+         [:div {:style {:text-align :center}}
+          "Grameen Phone"]]
+        [:div {:style {:padding "2px"
+                       :color "#666"
+                       :font-size fw-small}}
+         "1.5+ years"]]
+       [:td
+
+        [:table {:style {:padding "10px"
+                         :font-size fw-small
+                         :color "#003399"
+                         :background-color "#fff"
+                         :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"}}
+         [:tbody
+          [:tr [:td {:style {:text-align :left
+                             :background-color "#181818"
+                             :padding-top "7px"
+                             :borderRadius "3px"
+                             :font-size "14px"
+                             :color "#BFBFBF"}}
+                [:table
+                 [:tbody
+                  [:tr [:td "Real Time Notification System from Network Alarms"]]
+                  [:tr [:td "Multimedia Messaging Systems for Web & Mobile"]]
+                  ]]]]]]]]]]))
+
 (rum/defc email-iphone [state]
   [:table {:style
            {:height "250px"
             :background-color "#DDDDDD"
             :background-position "20% 80%"
-            :background-size "400px 270px"
+            :background-size "400px 300px"
             :background-image (str "url" "("  "\"https://i.pinimg.com/originals/8c/b5/0d/8cb50d60ce244eb04907fc7924763493.gif\""  ")")
             ;; :background-image (str "url" "("  "\"https://cdn.dribbble.com/users/273461/screenshots/2513600/shopping2.gif\""  ")")
             :background-repeat :no-repeat}}
@@ -153,53 +214,55 @@
           [:tr
            [:td
             [:div {:style {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                           :opacity ".5"
                            :color "#D9C9BA"
                            :height "100%"
                            :width "150px"
                            :font-size "0.9rem"
-                           :background-color "#4A3356"
+                           :background-color "#383838"
                            :padding-left "5px"
                            :text-align :left
                            }}
              [:div {:style {:padding "7px"
                             :color :white
-                            :background-color "#12808D"}} "Iphone Hybrid APP"]
+                            :background-color "#12808D"}} "iPhone Hybrid APP"]
              [:div "React Native"]
              [:div "RN Bridge"]
-             [:div "Flex Box"]
-             [:div "iOS Components"]
+             [:div "RN Animated"]
+             [:div "RN Navigation"]
+             [:div "RN Touch & Gesture"]
              [:div "Objective C"]
              ;; [:div "Apple Swift"]
-             [:div "Offline first"]
+             ;; [:div "Offline first"]
+             [:div "Yoga Layout"]
              [:div "Cocoa Touch"]
              [:div "iOS SDK"]
              [:div "Core Services"]
              [:div "Xcode"]
              [:div "Managing Memory"]
-             [:div "JavaScriptCore"]
              [:div "C/C++"]
              ]]
-           ]
-          ]]]
-       [:td {:style  {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+           [:td {:style  {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
                       :text-align :left
                       :color "#181818"
                       :padding-left "170px"}}
-        [:table
-         [:tbody
-          [:tr [:td "We have implemented rich iphone user interface high-end Corporate Customers which are a Raltime Websocket based Platforms sinked with realtime database and implemented offline caching. We started these projects using Objective C and over the time we have abopt React Native and swift for greater programming flexibility, interfaceing with technologis like graphql and real time coding experience. "]
-           ]
-          (comment
-            [:tr [:td "Now a days we use Objective C for heavy lifting like Cocoa Touch and UI transition. We use swift for developing new modules. As Swift doesn’t just embrace Cocoa APIs, it actively improves them."]]
-            [:tr [:td "I have mastered with Model-View-Controller pattern and View controllers pattern, view hierarchy, Containers and Storyboards,  navigation controllers, tab controller, split view controller which is a the center of iOS development. Worked closely with auto Layout, table views and the delegate pattern which display a scrollable list of items on the screen, containers and storyboards which make the flow of the interface from one screen to the next happen, Xcode and Interface Buider.
+            [:table
+             [:tbody
+              [:tr [:td {:style {:padding "3px"
+                             :background-color "#fff"}} "We have implemented rich user interface in iPhone for corporate users which are real time websocket based platforms connected to real time database, offline caching for airplane mode. We have adopted React Native for programming flexibility, interfacing with technologies like GraphQL and for real time programming experience."]
+
+           (comment
+             [",  navigation controllers, tab controller, split view controller which is a the center of iOS development."]
+             [:tr [:td "Now a days we use Objective C for heavy lifting like Cocoa Touch and UI transition. We use swift for developing new modules. As Swift doesn’t just embrace Cocoa APIs, it actively improves them."]]
+             [:tr [:td "I have mastered with Model-View-Controller pattern and View controllers pattern, view hierarchy, Containers and Storyboards,  navigation controllers, tab controller, split view controller which is a the center of iOS development. Worked closely with auto Layout, table views and the delegate pattern which display a scrollable list of items on the screen, containers and storyboards which make the flow of the interface from one screen to the next happen, Xcode and Interface Buider.
 " ]]
-          [:tr [:td "Cocoa is an impressively deep API—dig a little below the surface of any common tool, so far I have worked with following modules"]]
-          [:tr [:td "Simple data persistence with NSCoding and NSKeyedArchiver"]]
-          [:tr [:td "Object-oriented concurrent execution with NSOperation"]]
-          [:tr [:td "Detection of all sorts of data with NSDataDetector"]]
-          [:tr [:td "Native custom sharing and editing controls with UIActivityViewController and UIMenuController"]])
-          ]
-         ]]]]])
+             [:tr [:td "Cocoa is an impressively deep API—dig a little below the surface of any common tool, so far I have worked with following modules"]]
+             [:tr [:td "Simple data persistence with NSCoding and NSKeyedArchiver"]]
+             [:tr [:td "Object-oriented concurrent execution with NSOperation"]]
+             [:tr [:td "Detection of all sorts of data with NSDataDetector"]]
+             [:tr [:td "Native custom sharing and editing controls with UIActivityViewController and UIMenuController"]])]
+              [:tr [:td {:style {:background-color "#fff"}} "We have mastered Objective-C's MVC, view controllers pattern, view hierarchy, containers and storyboards implementations. This leverage us to do hybrid apps where performance incentive codes are implemented in Object-C and React Native business logic."]]
+              ]]]]]]]]]])

 (rum/defc technology-stack [state]
     [:table
@@ -232,6 +295,7 @@
             [:div "Ansiable"]
             [:div "ngnix"]]]
           [:tr [:td {:style { :color "#D9C9BA"
+                             :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
                              :text-align :left
                              :height "100%"
                              :font-size "0.85rem"
@@ -289,27 +353,25 @@

   So while unit tests might verify a reasonable set of assumptions, you can’t manually catch all the possible cases that need to be tested. Thinking beyond a subset of expectations becomes very inefficient at some point. There’s a limitation here. This is where generative testing comes into play.

-.")]]
-      ]]
-    )
+.")]]]])

 (rum/defc android-email [state]
   [:table {:style {:background-color "#fff"
                    :width "100%"}}
    [:tbody
     [:tr
-     [:td {:style {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+     [:td {:style {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,0.12)"
                    :text-align :left
                    :width "150px"
                    :color "#D9C9BA"
                    :height "100%"
                    :font-size "0.85rem"
-                   :background-color "#4A3356"
+                   :background-color "#383838"
                    :padding-left "5px"
                    }}
       [:div {:style {:padding "7px"
                      :color :white
-                     :background-color "#12808D"}} "Android Hybrid APP"]
+                     :background-color "#a4c639"}} "Android Hybrid APP"]
       [:div "Java"]
       [:div "Kotlin"]
       [:div "WebRTC"]
@@ -323,20 +385,21 @@
       [:div "Gradle"]
       [:div "JNI NDK"]]
      [:td {:style {:text-align :left
+                   :padding "2px"
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"}}
+      [:div {:style {:padding "5px"
+                     :font-size "14px"
+                     :font-weight "600"}} "UI Rending Optimizations"]
+
+      "As UIs become increasingly sophisticated, it gets harder to complete all the rendering work that needs to get done in this time frame of 60 frames per second. We addresses this with RecyclerView, a dynamic UI container that is able to display elements from large data sets by creating only enough views to fill the screen and then recycling and reusing them as the UI scrolls."]
+     [:td {:style {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                   :text-align :left
                    :padding "2px"}}
-      [:div {:style {:padding "2px"
-                     :font-size "14px"
-                     :font-weight "600"}} "UI Rending Optimization"]
-
-      "As UIs become increasingly sophisticated, it gets harder to complete all the rendering work that needs to get done in this time frame. This proves to be especially challenging with dynamic scrolling surfaces, as new pieces of UI are constantly being introduced onscreen. So to achieve device screens refresh at a rate of 60 frames per second. Providing smooth performance we changes to our UI continuously every 16 ms. If we don’t, it can lead to dropped frames and a poor experience.
-
-We addresses this with RecyclerView, a dynamic UI container that is able to display elements from large data sets by creating only enough views to fill the screen and then recycling and reusing them as the UI scrolls. Whenever a new item is about to become visible, RecyclerView will recycle or create the appropriate view, bind the view with the right data, and then finally measure, lay out, and draw it onscreen. Fitting all these operations within the 16 ms the main thread has to compute a new frame was challenging."]
-     [:td {:style {:text-align :left
-                   :padding "2px"}}
-      [:div {:style {:padding "2px"
+      [:div {:style {
+                     :padding "2px"
                      :font-size "14px"
                      :font-weight "600"}}  "WebRTC based Social Network"]
-      "WebRTC based social network enables instant messaging, video conferencing and voice over IP faciliteis. We have worked The WebRTC specification specifies the use of STUN, TURN and ICE to support NAT traversal requirements which ensure Guaranteed connectivity, Highest possible P2P rates."
+      "We have implemented WebRTC based corporate instant messaging, video conferencing and voice over IP. We have worked The WebRTC specification specifies the use of STUN, TURN and ICE to support NAT traversal requirements which ensure guaranteed connectivity, highest possible P2P rates."
       ]
      (comment
        [:td {:style {:text-align :left
@@ -346,59 +409,16 @@
      ]]])

 (rum/defc fullstack-email [state]
-  [:table {:style {:width "150px"}}
+  [:table {:style {:box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                   :width "150px"}}
    [:tbody
     [:tr
      [:td {:style {:text-align :left
-                   :color "#D9C9BA"
-                   :height "100%"
-                   :font-size "0.85rem"
-                   :background-color "#4B4D5A"
-                   :padding-left "5px"
-                   }}
-      [:div {:style {:padding "7px"
-                     :color "#4B4D5A"
-                     :background-color "#7D889C"}} "Protocols"]
-      [:div "Streaming"]
-      [:div "Websocket"]
-      [:div "GraphQL"]
-      [:div "Rest/JSON"]
-      ]]
-    [:tr
-     [:td {:style {:text-align :left
-                   :color "#D9C9BA"
-                   :height "100%"
-                   :font-size "0.85rem"
-                   :background-color "#4B4D5A"
-                   :padding-left "5px"
-                   }}
-      [:div {:style {:padding "7px"
-                     :color "#4B4D5A"
-                     :background-color "#7D889C"}} "Programming"]
-      [:div "Python"]
-      [:div "Flask"]
-      [:div "gEvent"]
-      [:div "nodejs"]]]
-    [:tr
-     [:td {:style {:text-align :left
-                   :color "#D9C9BA"
-                   :height "100%"
-                   :font-size "0.85rem"
-                   :background-color "#4B4D5A"
-                   :padding-left "5px"
-                   }}
-      [:div {:style {:padding "7px"
-                     :color "#4B4D5A"
-                     :background-color "#7D889C"}} "Realtime Analytics"]
-      [:div "SQL Alcalamy"]
-      [:div "Datalog"]
-      [:div "Map Ruduce"]]]
-    [:tr
-     [:td {:style {:text-align :left
-                   :color "#D9C9BA"
-                   :height "100%"
-                   :font-size "0.85rem"
-                   :background-color "#4A3356"
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :background-color "#7D889C"
                    :padding-left "5px"
                    }}
       [:div {:style {:padding "7px"
@@ -406,40 +426,93 @@
                      :background-color "#12808D"}} "Single Page APP (SPA)"]
       [:div "ReactJs"]
       [:div "Redux"]
-      [:div "VueJS"]
+      [:div "ClojureScript"]
       ]]
     [:tr
      [:td {:style {:text-align :left
-                    :color "#D9C9BA"
-                    :height "100%"
-                    :font-size "0.85rem"
-                    :background-color "#4A3356"
-                    :padding-left "5px"
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :background-color "#7D889c"
+                   :padding-left "5px"
                    }}
       [:div {:style {:padding "12px"
                      :color :white
                      :background-color "#12808D"}} "Info Graphics"]
       [:div "HTML5/CSS3"]
-      [:div "SVG/D3"]
+      [:div "SVG"]
+      [:div "Inkscape"]
       [:div "Spring Animation"]]]
     [:tr
      [:td {:style {:text-align :left
                    :color "#D9C9BA"
                    :height "100%"
                    :font-size "0.85rem"
+                   :background-color "#4B4D5A"
+                   :padding-left "5px"
+                   }}
+      [:div {:style {:padding "7px"
+                     :color "#4B4D5A"
+                     :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                     :background-color "#7D889C"}} "Protocols"]
+      [:div "Streaming"]
+      [:div "Websocket"]
+      [:div "GraphQL"]
+      [:div "Rest ‒ JSON"]
+      ]]
+    [:tr
+
+     [:td {:style {:text-align :left
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :background-color "#4B4D5A"
+                   :padding-left "5px"
+                   }}
+      [:div {:style {:padding "7px"
+                     :color "#4B4D5A"
+                     :background-color "#7D889C"}} "Programming"]
+      [:div "Java"]
+      [:div "Nodejs"]
+      [:div "Clojure"]
+      [:div "Python"]]]
+    [:tr
+     [:td {:style {:text-align :left
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :background-color "#4B4D5A"
+                   :padding-left "5px"
+                   }}
+      [:div {:style {:padding "7px"
+                     :color "#4B4D5A"
+                     :background-color "#7D889C"}} "Real Time Analytics"]
+      [:div "Datalog"]
+      [:div "SQL"]
+      [:div "GraphQL"]]]
+
+
+    [:tr
+     [:td {:style {:text-align :left
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
                    :background-color "#4B4D5A"
                    :padding-left "5px"
                    }}
       [:div {:style {:padding "7px"
                      :color "#4B4D5A"
                      :background-color "#7D889C"}} "Relational Database"]
-      [:div "Datalog"]
-      [:div "SQL"]
+      [:div "Oracle 10i"]
       [:div "PostgreSQL"]
       [:div "Datomic"]
       ]]
     [:tr
      [:td {:style {:text-align :left
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
                    :color "#D9C9BA"
                    :height "100%"
                    :font-size "0.85rem"
@@ -449,9 +522,24 @@
       [:div {:style {:padding "7px"
                      :color "#4B4D5A"
                      :background-color "#7D889C"}} "NO-SQL Database"]
-      [:div "Map Reduce"]
       [:div "Raik"]
-      [:div "Radis"]]]]])
+      [:div "Mongo"]
+      [:div "Radis"]]]
+    [:tr
+     [:td {:style {:text-align :left
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :background-color "#4B4D5A"
+                   :padding-left "5px"
+                   }}
+      [:div {:style {:padding "7px"
+                     :color "#4B4D5A"
+                     :background-color "#7D889C"}} "Artificial intelligence "]
+      [:div "Prolog"]
+      [:div "Mercury"]
+      [:div "MiniKanren"]]]]])

 (rum/defc devops-email [state]
   [:div "hello"])
@@ -464,52 +552,41 @@

 (rum/defc fullstack-email-body [state]
   [:table {:style {:text-align :left
-                                  :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"}}
+                   :box-shadow "0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)"}}
                   [:tbody
                    [:tr [:td {:style {:font-size "1.1rem"
                                       :padding "5px"}} "Interactive Web and Mobile User Interface development"]]
-                   [:tr [:td {:style {:padding "2px"}} "  Rapid user interfaces Development and look & feel for Web, Android, iPhone are main
-  challenges which needs to be overcome. I overcome these challenges by choosing set of
-  tools and programming language that equally works for web, mobile development and
-" ]]
-                   [:tr [:td {:style {:padding "2px"}} "  In order to create user experience, I use to work with React and React Native for
-  Android and iPhone native UI development. I have adopted functional style of
-  programming with immutable data structure (Redux, GrapthQL) to manage complex UI interaction,
-  transition animation and real time notifications and messaging as well as keep
-  the code always manageable for further development."]]
+                   [:tr [:td {:style {:padding "2px"}} "Rapid user interfaces Development and look&feel for Web, Android, iPhone are main
+  challenges which needs to be overcome. We overcome these challenges by choosing programming languages and frameworks that equally works for web, mobile development and
+Backend." ]]
+
                    [:tr [:td {:style {:padding "2px"}}
-                         "CSS, HTML5, SVG, Canvas are essential part of UI look & feet and also
-  for make the UI responsive but one need to take special care when using these
-  technologies spatially when using CSS frameworks and JavaScript libraries.
-  Which often makes website bulky slower loading time and slower response time.
-  I used dead code elimination techniques using google Clojure compiler so that
-  web site never gets bulky."]]
+                         "CSS, HTML5, SVG, Canvas are essential part of UI look&feel, in order to UI responsive but one need to take special care when using these
+  technologies. Spatially when using CSS frameworks and JavaScript libraries often makes website bulky slower loading time and slower response time.
+  We used dead code elimination techniques using google Clojure compiler so that web site never gets bulky."]]
                    [:tr [:td {:style {:padding "2px"}}
-                         "Data Visualization info graphics is very important part of user interface design
-  its empower user so that user can understand whole business case at a glance.
-  I use d3 and Vega as well as mathematics when convenient for demographics."]]
+                         "Data Visualization infographics is very important part of user interface design
+  its empower user so that user can understand whole business case at a glance. We develop and designing the infographics that can work equally in mobile and web."]]
                    [:tr [:td {:style {:padding "5px"
-                                      :font-size "1.1rem"}
-                              }
+                                      :font-size "1.1rem"}}
                          "Concurrent and fault tolerant Application Development for Web and Internet of things (IOT)"]]
                    [:tr [:td {:style {:padding "2px"}}
-                         " Rise of cloud infrastructure and IOT devices make us thinking of current monolithic
-  application architecture. Estimated number of IOT devices will connect to web by 2020
+                         "Rise of cloud infrastructure and IOT devices make us thinking of current monolithic
+  application architecture twice. Estimated number of IOT devices will connect to web by 2020
   will be 5 times total population of the earth; on the other hand in order to leverage cloud
   infrastructure application needs to be concurrent, fault tolerant and distributed.
-  I use to work with immutable data structure because data mutation is a serious problem
+  We use to work with immutable data structure because data mutation is a serious problem
   for multi thread environment which causes deadlock and data loss and frequent crashing
-  and current solution semaphore locking and mutes doesn’t guaranties to avoid these circumstances.
-  I use communication sequential processing (CPS) to effective message passing between the threads
+  We use communication sequential processing (CPS) to effective message passing between the threads
   which can leverage thousands of threads over the cloud."]]
-                   [:tr [:td {:style {:padding "2px"}}
-                         "  Micro services are necessary part of cloud infrastructure which leverage heterogeneous
+                   (comment [:tr [:td {:style {:padding "2px"}}
+                                  "Micro services are necessary part of cloud infrastructure which leverage heterogeneous
   programming languages work together. I have implemented Micro services with java, nodes,
   python, clojure, c/c++ using by exposing Rest service and JSON data structure to
   subscriber and Message Queues for real time notification. We had tough time ensuring
   height availability and redundancy of micro services and update code one production server.
   I am working on GraphQL, datalog, logic programming,  Erlang error handling mechanism to solve
-  the problems."]]
+  the problems."]])
                    [:tr [:td {:style {:padding "5px"
                                       :font-size "1.1rem"}}
                          "Distributed database design and Query optimization"]]
@@ -530,7 +607,12 @@
       [:tr
        [:td
         (position-email state)]]
+      [:tr
+       [:td
+        (position-email-gp state)]]
       [:tr [:td (email-iphone state)]]
+      [:tr  [:td  (android-email)]
+       ]
       [:tr
        [:td
         [:table
@@ -548,8 +630,6 @@
                      :color :white}}
         [:span {:style {:font-size "1.8rem"}} "T"]"echnology Stack"]
        ]
-      [:tr  [:td  (android-email)]
-       ]
       [:tr
        [:td
         [:div {:style {:background-color "#fff"}}
@@ -565,7 +645,7 @@
        [:td
         [:div {:style {:padding "10px"
                        :font-size ".86rem"}}
-         "I have my BSC  in Computer Engineering from American International University - Bangladesh. I was programming contest in national lavel and My final project was - Design 32-bit processor using MISPs instruction on Xlink FPGA"]
+         "I have my BSC  in Computer Engineering from American International University - Bangladesh. I had participated programming contests and my final project was - Design 32-bit processor using MISPs instruction on Xlink FPGA"]

         ]]
       [:tr
@@ -589,7 +669,7 @@
       [:tr
        [:td
         [:div {:style {:padding "10px"
-                       :font-size ".86rem"}} "I was born in Dhaka in 20th July 1986. I spend my childhood in many corners of Bangladesh. My father MD Gulam Kibria and My mother is Asia Akter, we are from district Netrokuna. I am married to Rezwanna Sharmin. We have two daughters"]]]]]))
+                       :font-size ".86rem"}} "I was born in Dhaka in 20th July 1986. I spend my childhood on countryside of Bangladesh. My father MD Gulam Kibria and My mother is Asia Akter, we are from district Netrokuna. I am married to Rezwanna Sharmin. We are blessed by two daughters."]]]]]))

 (rum/defc email-body [state]
@@ -653,7 +733,7 @@
                 [:div {:style {:fond-size "1rem"
                                :color "#f1f1f1"
                                :padding-left "5px"
-                               :text-align :left}} "Please accent my Résumé for React Native Developer	– Iphone and Android."]]]
+                               :text-align :left}} "Please accept my Résumé for React Native Developer	– iPhone and Android."]]]

           [:tr
            [:td {:style {


Add a handler/parser for hiccup/prxml-style elements

--- modules/xml/src/main/clojure/clojure/data/xml.clj
+++ modules/xml/src/main/clojure/clojure/data/xml.clj
@@ -193,6 +193,66 @@
                   (InputSource. source)
                   source))))

+(defprotocol AsElements
+  (as-elements [expr] "Return a seq of elements represented by an expression."))
+
+(extend-protocol AsElements
+  clojure.lang.IPersistentVector
+  (as-elements [v]
+    (let [[tag & [attrs & after-attrs :as content]] v
+          [attrs content] (if (map? attrs)
+                            [(into {} (for [[k v] attrs]
+                                        [k (str v)]))
+                             after-attrs]
+                            [{} content])]
+      [(Element. tag attrs (mapcat as-elements content))]))
+
+  clojure.lang.ISeq
+  (as-elements [s]
+    (mapcat as-elements s))
+
+  clojure.lang.Keyword
+  (as-elements [k]
+    [(Element. k {} nil)])
+
+  java.lang.String
+  (as-elements [s]
+    [s])
+
+  nil
+  (as-elements [_] nil)
+
+  java.lang.Object
+  (as-elements [o]
+    [(str o)]))
+
+(defn sexps-as-fragment
+  "Convert a compact prxml/hiccup-style data structure into the more formal
+   tag/attrs/content format. A seq of elements will be returned, which may
+   not be suitable for immediate use as there is no root element. See also
+   sexp-as-element.
+
+   The format is [:tag-name attr-map? content*]. Each vector opens a new tag;
+   seqs do not open new tags, and are just used for inserting groups of elements
+   into the parent tag. A bare keyword not in a vector creates an empty element.
+
+   To provide XML conversion for your own data types, extend the AsElements
+   protocol to them."
+  ([] nil)
+  ([sexp] (as-elements sexp))
+  ([sexp & sexps] (apply concat (as-elements sexp)
+                         (map as-elements sexps))))
+
+(defn sexp-as-element
+  "Convert a single sexp into an Element"
+  [sexp]
+  (let [[root & more] (sexps-as-fragments sexp)]
+    (when more
+      (throw
+       (IllegalArgumentException.
+        "Cannot have multiple root elements; try creating a fragment instead")))
+    root))
+
 ;=== Emit-related functions ===

 (defn- attributes


add sparkop and defsparkfn

add sparkop and defsparkfn

--- src/clj/flambo/api.clj
+++ src/clj/flambo/api.clj
@@ -16,6 +16,13 @@
 (System/setProperty "spark.serializer", "org.apache.spark.serializer.KryoSerializer")
 (System/setProperty "spark.kryo.registrator", "flambo.kryo.CarboniteRegistrator")

+(defmacro sparkop [& body]
+  `(sfn/fn ~@body))
+
+(defmacro defsparkfn [name & body]
+  `(def ~name
+     (sparkop ~@body)))
+
 (defn spark-context
   [& {:keys [master job-name spark-home jars environment]}]
   (log/warn "JavaSparkContext" master job-name spark-home jars environment)
@@ -26,16 +33,16 @@
   (JavaSparkContext. master job-name))

 (def untuple
-  (sfn/fn [t]
+  (sparkop [t]
     [(._1 t) (._2 t)]))

 (def double-untuple
-  (sfn/fn [t]
+  (sparkop [t]
     (let [[x t2] (untuple t)]
       (vector x (untuple t2)))))

 (defn ftruthy? [f]
-  (sfn/fn [x] (u/truthy? (f x))))
+  (sparkop [x] (u/truthy? (f x))))

 ;;; RDD construction


Edward Kim missing link

Edward Kim missing link

--- src/clj/game/cards.clj
+++ src/clj/game/cards.clj
@@ -647,7 +647,8 @@
                                    (count (get-in corp [:servers :remote (last (:server run)) :ices])) {:card card}))}}}

    "Edward Kim: Humanitys Hammer"
-   {:events {:access {:req (req (= (:type target) "Operation")) :once :per-turn
+   {:effect (effect (gain :link 1))
+    :events {:access {:req (req (= (:type target) "Operation")) :once :per-turn
                       :msg (msg "trash " (:title target)) :effect (effect (trash target))}}}

    "Efficiency Committee"


coerce data from ES at store level

coerce data from ES at store level

--- src/ctia/stores/es/actor.clj
+++ src/ctia/stores/es/actor.clj
@@ -17,7 +17,7 @@
 (def ^{:private true} mapping "actor")

 (def coerce-stored-actor
-  (c/coercer! StoredActor
+  (c/coercer! (s/maybe StoredActor)
               sc/json-schema-coercion-matcher))

 (defn handle-create-actor [state _ realized-actor]
@@ -28,10 +28,6 @@
       coerce-stored-actor))

 (defn handle-update-actor [state id login realized-actor]
-
-  (println "guillaume")
-  (println id)
-
   (-> (update-doc (:conn state)
                   (:index state)
                   mapping
@@ -53,7 +49,8 @@
               id))

 (defn handle-list-actors [state judgement-store filter-map]
-  (search-docs (:conn state)
-               (:index state)
-               mapping
-               filter-map))
+  (-> (search-docs (:conn state)
+                   (:index state)
+                   mapping
+                   filter-map)
+      (map coerce-stored-actor)))


Simplify, add equality semantics to functions-sets

--- src/angelic/search/function_sets.clj
+++ src/angelic/search/function_sets.clj
@@ -27,31 +27,33 @@
   (extract-context [sk input-set] "Relevant parts of input-set, for state abstraction")
   (get-logger  [sk input-set] "Relevant parts of input-set, for state abstraction"))

+(defn- make-fs [action status-fn child-seq-fn]
+  (let [n (env/action-name action)]
+   (reify
+    Object
+    (hashCode [fs] (hash n))
+    (equals   [fs ofs] (and (instance? angelic.search.function_sets.FunctionSet ofs)
+                            (= n (fs-name ofs))))
+    FunctionSet
+    (fs-name    [sk]           n)
+    (apply-opt  [sk input-set]
+      (let [[opt rew :as p] (angelic/optimistic-set-and-reward action input-set)]
+        (when (and p (not (state-set/empty? opt)) (> rew Double/NEGATIVE_INFINITY))
+          p)))
+    (status     [sk input-set] (status-fn input-set))
+    (child-seqs [sk input-set] (child-seq-fn input-set))
+    (extract-context [sk input-set]
+      (state/extract-context input-set (angelic/precondition-context-set action input-set)))
+    (get-logger  [sk input-set]
+      (state/get-logger input-set (angelic/precondition-context-set action input-set))))))
+
+
 ;; Child-seqs must obey the containment property for subsets of input-set.

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Implementations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

-(defn viable-or-nil [[opt rew :as p]]
-  (when (and p (not (state-set/empty? opt)) (> rew Double/NEGATIVE_INFINITY))
-    p))
-
-
-(defn extract-context* [action input-set]
-  (state/extract-context input-set (angelic/precondition-context-set action input-set)))
-
-(defn get-logger* [action input-set]
-  (state/get-logger input-set (angelic/precondition-context-set action input-set)))
-
 (defn make-primitive-fs [action]
-  (reify
-   FunctionSet
-   (fs-name    [sk]           (env/action-name action))
-   (apply-opt  [sk input-set] (viable-or-nil (angelic/optimistic-set-and-reward action input-set)))
-   (status     [sk input-set] :solved)
-   (child-seqs [sk input-set] (throw (UnsupportedOperationException.)))
-   (extract-context [sk input-set] (extract-context* action input-set))
-   (get-logger  [sk input-set] (get-logger* action input-set))
-   ))
+  (make-fs action (constantly :solved) (fn [i] (throw (UnsupportedOperationException.)))))

 (defn- simple-immediate-refinements-set [a input-set]
   (for [[constraint ref] (angelic/immediate-refinements-set a input-set)]
@@ -62,19 +64,12 @@
        ref)
       ref)))

-
 (defn make-hla-fs [action]
-  (reify
-   FunctionSet
-   (fs-name [sk] (env/action-name action))
-   (apply-opt [sk input-set] (viable-or-nil (angelic/optimistic-set-and-reward action input-set)))
-   (status  [sk input-set] (if (angelic/can-refine-from-set? action input-set) :live :blocked))
-   (child-seqs [sk input-set]
-     (for [ref (simple-immediate-refinements-set action input-set)]
+  (make-fs action
+    #(if (angelic/can-refine-from-set? action %) :live :blocked)
+    #(for [ref (simple-immediate-refinements-set action %)]
        (for [a ref]
-         ((if (env/primitive? a) make-primitive-fs make-hla-fs) a))))
-   (extract-context [sk input-set] (extract-context* action input-set))
-   (get-logger  [sk input-set] (get-logger* action input-set))   ))
+         ((if (env/primitive? a) make-primitive-fs make-hla-fs) a)))))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Constructor ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


fix bug in control-proxy creation which led to :kr being specified as the rate - regardless of user intervention.

--- src/overtone/sc/machinery/ugen/sc_ugen.clj
+++ src/overtone/sc/machinery/ugen/sc_ugen.clj
@@ -48,7 +48,7 @@
   ugen at :kr. Throws an error if any of the args are nil."
   ([name value] (control-proxy name value :kr))
   ([name value rate-name]
-     (let [rate (if (= :tr)
+     (let [rate (if (= rate-name :tr)
                   (:kr RATES)
                   (rate-name RATES))]
        (if (or (nil? name)


Yet another refactor, missing the bass.

Yet another refactor, missing the bass.

--- src/overtunes/songs/canone_alla_quarta.clj
+++ src/overtunes/songs/canone_alla_quarta.clj
@@ -4,30 +4,24 @@
     [overtone.inst.sampled-piano :only [sampled-piano] :rename {sampled-piano piano#}]))

 (defn => [val & fs] (reduce #(apply %2 [%1]) val fs))
-
-(defn update-all [m [& ks] f]
-    (if ks
-      (-> m
-        (update-all (rest ks) f)
-        (update-in [(first ks)] f))
-      m))
-
-(defn natural-map [ys] (zipmap (-> ys count range) ys))
-(defn connect [f1 f2] #(if-let [y2 (f2 %)] (f1 y2) nil))
-
 (defn sum-n [series n] (reduce + (take n series)))
 (defn sums [series] (cons 0 (reductions + series)))
 (defn scale [intervals]
   #(if (neg? %)
-     (let [downward-scale (connect - (scale (reverse intervals)))]
+     (let [downward-scale (comp - (scale (reverse intervals)))]
        (-> % - downward-scale))
      (sum-n (cycle intervals) %)))

-(defn translate [f x y] #(-> % (+ x) f (+ y)))
-(defn shift [f x] (connect #(+ x %) f))
+(defn translate [point deltas] (map + point deltas))
+(defn map-in [m k f] (map #(update-in % [k] f) m))
+(defn transform [key f] #(update-in % [key] f))
+(defn transform-y [f] #(map-in % 1 f))
+(defn transform-x [f] #(map-in % 0 f))
+
 (def major (scale [2 2 1 2 2 2 1]))
-(def g-major (translate major 0 74))
-(defn update [k f] #(update-in % [k] f))
+(defn add [x] (partial + x))
+(def g-major (comp (add 74) major))
+

 (defn bpm [per-minute] #(-> % (/ per-minute) (* 60) (* 1000)))
 (defn run [a & bs]
@@ -36,13 +30,7 @@
       (concat (up-or-down a (first bs)) (apply run bs))
       [a])))

-(defn melody [notes]
-  (let [functionalise #(update-all % [:time :pitch] natural-map)
-        accumulate-time (update :time sums)
-        add-count #(assoc % :count (count (:pitch notes)))]
-    (-> notes accumulate-time functionalise add-count)))
-
-(def leader
+(def melody
   (let [call
           {:time (mapcat repeat [2 1 14 1] [1/4 1/2 1/4 3/2])
            :pitch (concat (run 0 -1 3 0) [4] (run 1 8))}
@@ -54,38 +42,23 @@
            :pitch (concat [4 4] (run 2 -3) [-1 -2 0] (run 3 5) (repeat 3 1) [2] (run -1 1 -1) (run 5 0))}
         line
           (merge-with concat call response development)]
-    (melody line)))
+    (=> line #(update-in % [:time] sums) #(map vector (:time %) (:pitch %)))))

-(def bass
-  (let [line
-          {:time (mapcat repeat [21 12] [1 1/4])
-           :pitch (concat (mapcat (partial repeat 3) (concat (run 0 -3) (run -5 -3))) (run 12 0))}
-        lower-note #(- % 7)
-        lower-melody (update :pitch #(connect lower-note %))]
-   (-> line melody lower-melody)))
+(defn play# [notes]
+  (let [play-at# #(at (% 0) (piano# (% 1)))]
+    (->> notes (map play-at#) dorun)))

-(defn melody# [melody]
-  (let [notes (map #(vector (=> % (:time melody)) (=> % (:pitch melody))) (range (:count melody)))
-        play-at# #(at (% 0) (piano# (% 1)))]
-    (dorun (map play-at# notes))))
-
-(def mirror (update :pitch #(connect - %)))
-(defn after [beats] (update :time #(shift % beats)))
-(defn transpose [interval] (update :pitch #(shift % interval)))
-(def canone-alla-quarta (reduce connect [(after 3) (transpose -3) mirror]))
-
-(defn sharps [notes fpitches] #(if (some (partial = %) notes) (-> % fpitches inc) (fpitches %)))
-(defn flats [notes fpitches] #(if (some (partial = %) notes) (-> % fpitches dec) (fpitches %)))
-
-(defn play# []
-  (let [from-now #(translate % 0 (now))
-        with-beat (update :time (partial connect (from-now (bpm 90))))
-        in #(update :pitch (partial connect %))
-        with-sharps #(update :pitch (partial sharps %))
-        with-flats #(update :pitch (partial flats %))]
-    (=> bass (in g-major) (with-sharps [8]) with-beat melody#)
-    (=> leader (after 1/2) canone-alla-quarta (in g-major) with-beat melody#)
-    (=> leader (after 1/2) (in g-major) (with-sharps [22 32]) (with-flats [37]) with-beat melody#)
+(defn canone-alla-quarta# []
+  (let [in #(transform-y %)
+        after #(transform-x (add %))
+        from-now (after (now))
+        tempo #(transform-x %)
+        mirror (transform-y -)
+        transpose #(transform-y (add %))
+        leader #(=> % (after 1/2) (in g-major) (tempo (bpm 120)) from-now)
+        follower #(=> % mirror (transpose -3) (after 3) leader)]
+    (=> melody leader play#)
+    (=> melody follower play#)
     ))

-(play#)
+(canone-alla-quarta#)


bugfix find-attr-nodes

bugfix find-attr-nodes

--- src/synthesis_crawlers/core.clj
+++ src/synthesis_crawlers/core.clj
@@ -41,7 +41,6 @@
 (s/fdef similarity :args (s/cat :a string? :b string?))
 (defn similarity
   "returns true value iff the specified extractor is incomplete"
-
   [a b]
  (.similarity (Jaccard.) a b))

@@ -165,21 +164,25 @@
 (defn reach?
   "returns true iff b is reachable from a"
   [a b]
-  (->> (filter #(= % b) (.getAllElements a)) empty? not))
+  (->> (filter #(.is b (.cssSelector %)) (.getAllElements a)) empty? not))

 (s/fdef find-attr-nodes
         :args (s/cat :nodes #(or (instance? Elements %) element?) :knowledge ::knowledge))
 (defn find-attr-nodes
   "returns the elements which contain text similar to the specified knowledge"
   [nodes knowledge]
-  (let [result (reduce
-                 (fn [nodes node]
-                   (conj (filter #(not (reach? % node)) nodes) node))
-                 []
-                 (filter #(not-empty (matched-knowledge (.text %) knowledge)) nodes))]
-    (println "knowledge: " knowledge)
-    (println "find-attr-nodes: " result)
-    result))
+  (reduce
+    (fn [nodes node]
+      (let [p (filter #(reach? % node) nodes)
+            c (filter #(reach? node %) nodes)]
+        (cond
+          ; nodes contain a node which is a parent of node
+          (seq p) (conj (remove p nodes p) node)
+          ; node is a parent of one of nodes
+          (seq c) nodes
+          :else (conj nodes node))))
+    []
+    (filter #(not-empty (matched-knowledge (.text %) knowledge)) nodes)))

 #_(s/fdef find-nodes
   :args (s/cat :pages ::pages :attr-knowledge ::attr-knowledge))


Improved fake routes recording

Improved fake routes recording

--- src/fake_http/fake.clj
+++ src/fake_http/fake.clj
@@ -11,6 +11,10 @@
     (if (= -1 index-of-after)
       str
       (.substring str (inc index-of-after)))))
+
+(defn map-vals [f m]
+  "Maps the values in a map with the function f"
+  (into {} (for [[k v] m] [k (f v)])))

 (defn- keywordize-keys
   "Recursively transforms all map keys from strings to keywords."
@@ -79,18 +83,24 @@
           matching-route (some (partial route-matches? query-map) sorted-route-candidates)]
       matching-route)))

-(defn- record-received-request [request fake-route]
-  (fn [fake-routes] (let [matching-route-matcher (:route-matcher fake-route)
-                          route-matchers (map #(:route-matcher %) fake-routes)
-                          matching-route-index (index-of route-matchers matching-route-matcher)
-                          body (.getUtf8Body request)
-                          recored-request {:method       (.getMethod request)
-                                           :request-line (.getRequestLine request)
-                                           :path         (.getPath request)
-                                           :body         body
-                                           :query-params (request-path->map (.getPath request))
-                                           :form-params  (params->map body)}]
-                      (update-in fake-routes [matching-route-index :recorded-requests] conj recored-request))))
+(defn- record-received-request [request matching-route routes]
+  (let [matching-route-matcher (:route-matcher matching-route)
+        route-matchers (map #(:route-matcher %) routes)
+        matching-route-index (index-of route-matchers matching-route-matcher)
+        body (.getUtf8Body request)
+        recored-request {:method       (.getMethod request)
+                         :headers      (->> (.getHeaders request)
+                                            (.toMultimap)
+                                            ; Create a clojure map of the multimap.
+                                            ; The multimap contains a list as value and thus we map it to a clojure vector
+                                            (map-vals vec)
+                                            (keywordize-keys))
+                         :request-line (.getRequestLine request)
+                         :path         (.getPath request)
+                         :body         body
+                         :query        (request-path->map (.getPath request))
+                         :form         (params->map body)}]
+    (update-in routes [matching-route-index :recorded-requests] conj recored-request)))

 (defn- create-dispatcher [fake-routes]
   "Create a MockWebServer dispatcher that will return the same response over and over on match"
@@ -103,7 +113,7 @@
             best-matching-route (best-matching-route routes-matching-path request-path)]
         (if-not (nil? best-matching-route)
           ; Record the received request to the matched mock route
-          (swap! fake-routes (record-received-request request best-matching-route)))
+          (reset! fake-routes (record-received-request request best-matching-route @fake-routes)))
         (or (:response best-matching-route) (fake-response {:status 500}))))))

 (defprotocol FakeServer