email resume

email resume

--- src/cljs/fractals/email.cljs
+++ src/cljs/fractals/email.cljs
@@ -4,372 +4,654 @@

-(rum/defc first-site < rum/reactive [state wsize]
-  (let [fw "1.4rem"
+(rum/defc first-site-email [state]
+  (let [fw "1.1rem"
         align  :center]
-    [:div {:style { :color "#fff"
-                   :font-size fw
-                   :padding "15px"
-                   :backgroundColor "#586473"}}
-     [:table
+    [:table {:style {:color "#fff"
+                     :font-size fw
+                     :padding-left "15px"
+                     :padding-right "15px"
+                     }}
       [:tbody
        [:tr
+        [:td
+         [:table
+          [:tbody
+           [:tr [:td [:img {:style {:height "100px"}
+                            :src "https://i.pinimg.com/originals/f1/17/0f/f1170fa396df962b203fff09d002529e.png"}]] ]
+
+           [: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"]]]
+           [:tr [:td {:style {:text-align align
+                              :font-size "10px"}}
+                 [:div {:style {:background-color :white
+                                :height "1px"}
+                        }]
+                 [:div "H# 192, R# 5, Mirpur DOHS, Dhaka"]]]
+           ]]]
         [:td [:div {:style {:width "50px"}}]]
         [:td
-         ;; (svg/cover-photo)
-         [:img {:style {:height "200px"}
-                :src "https://i.pinimg.com/originals/f1/17/0f/f1170fa396df962b203fff09d002529e.png"}]
-         [:div {:style {:background-color :white
-                        :height "1px"}
-                } ]
-         [:div {:style {:text-align align}} "+8801717018083"]
-         [:div {:style {:background-color :white
-                        :height "1px"}
-                }]
-         [:div {:style {:text-align align
-                        :font-size "12px"}} "aryabhatiya.algebra@gmail.com"]
-         [:div {:style {:background-color :white
-                        :height "1px"}
-                } ]]
-        [:td [:div {:style {:width "50px"}}]]
-        [:td
-         [:div "Résumé"]
-         [:div {:style {:padding-top "25px"
-                        :font-size fw
-                        :line-height "1.1rem"
-                        :font-family "'Slabo 27px', serif"
-                        }}
-          [:div {:style {:font-size "2.5rem"
-                         :font-family "'Slabo 27px', serif"
-                         :padding "10px"}} "MD. ASHIK"]
-          [:br]
-          [:br]
-          [:div
-           [:div
-            [:span {:style {:font-size "3rem"}} "“F"]
-            "ullstack developeing experience on mobile & IOT."]
-           [:div "Rapid developement with great reliability Devops.. friendl"
-            [:span {:style {:font-size "3rem"}} "y”"]]
-
-           ]]
-         [:div {:style  {:padding-top "50px"
-                         :font-size fw
-                         :line-height "1.1rem"
-                         :text-align :right
-                         :font-family "'Slabo 27px', serif"
-                         }} "H# 192, R# 5, Mirpur DOHS, Dhaka - 1216"]]
-        ]]]]))
-
-
-(rum/defc middle-site [state]
+         [:table [:tbody
+                  [:tr [:td "Résumé"]]
+                  [:tr [:td {:style {:font-size fw
+                                     :font-family "'Slabo 27px', serif"
+                                     }}
+                        ]]
+                  [:tr [:td {:style {:font-size "1.4rem"
+                                     :font-family "'Slabo 27px', serif"
+                                     :padding "10px"}} "MD. ASHIK"]]
+                  [:tr [:td {:style {:line-height "1rem"}} [:table
+                             [:tbody
+                              [:tr [:td
+                                    [:span {:style {:align-text :left
+                                                    :font-size "1.4rem"}} "“F"]
+                                    "ullstack developeing experience on mobile & IOT."]]
+                              [:tr [:td  "Devops.... friendl"
+                                    [:span {:style { :font-size "1.4rem"}} "y”"]]]
+                              ]]]]]]]]]]))
+
+
+(rum/defc position-email [state]
+  (let [fw "1rem"
+        fw-small "1rem"]
+    [:table {:style
+             {:font-family "'Merriweather', serif"}}
+     [:tbody
+      [:tr [:td  [:div {:style {:font-size fw
+                                :color "#fff"
+                                :padding "10px"
+                                :background-color "#21374B"
+                                :font-weight 500}}
+                  "Positions"]]
+       [:td [:div {:style {:font-size fw
+                           :color "#fff"
+                           :padding "10px"
+                           :background-color "#21374B"
+                           :font-weight 500}}
+             "Reference Projects"]]]
+      [:tr
+       [:td [:div {:style {:font-weight 600
+                           :font-size fw-small
+                           :text-align :center
+                           :padding "10px"}}
+             "Senior Software Engineer"] ]
+       [:td [:div {:style {:font-weight 600
+                           :font-size fw-small
+                           :padding "10px"
+                           }}
+             "Swapno Re-seller based prepaid Billing system"]]]
+      [:tr
+       [:td {:style {:fond-size fw-small
+                     :width "250px"
+                     :padding "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"
+                       :color "#666"
+                       :font-size fw-small}}
+         "Joined May 2012"]
+        [:div {:style {
+                       :background-color "#185E65"
+                       :color "#BFBFBF"
+                       :padding "10px"
+                       :font-size fw-small}}
+         [:a {:style {:color "#BFBFBF"
+                      :text-decoration :none}
+              :href "http://sgcsoft.net/"}  "Software Global Consultancy"]
+         [:div {:style {:text-align :center}} [:span {:style {:font-weight 600
+                                                              :font-size "1.1rem"}} "// " ]
+          " SGC GLOBAL"]]
+        [:div {:style {:padding "5px"
+                       :color "#666"
+                       :font-size fw-small}}
+         "5+ years"]]
+       [:td
+
+        [:table {:style {:padding "5px"
+                         :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 {:font-size "0.8rem"}}"I started this project from the scratch."]]
+          [:tr [:td {:style {:font-size "1rem"
+                             :color :black
+                             :padding "4px"}} "Key responsibilities and challenges"]]
+          [:tr [:td {:style {:text-align :left
+                             :background-color "#181818"
+                             :padding-top "7px"
+                             :borderRadius "3px"
+                             :font-size "14px"
+                             :color "#BFBFBF"}}
+                [:table
+                 [:tbody
+                  [:tr [:td "➟ Fault tolerant Prepaid Billing"]]
+                  [:tr [:td "➟ GUI for Web and Mobile"]]
+                  [:tr [:td "➟ Database and Query optimization"]]
+                  [:tr [:td "➟ System Automation & Testing"]]]]]]]]]]]]))
+
+(rum/defc email-iphone [state]
+  [:table {:style
+           {:height "250px"
+            :background-color "#DDDDDD"
+            :background-position "20% 80%"
+            :background-size "400px 270px"
+            :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}}
+   [:tbody
+    [:tr
+       [:td
+        [:table
+         [:tbody
+          [: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)"
+                           :color "#D9C9BA"
+                           :height "100%"
+                           :width "150px"
+                           :font-size "0.9rem"
+                           :background-color "#4A3356"
+                           :padding-left "5px"
+                           :text-align :left
+                           }}
+             [:div {:style {:padding "7px"
+                            :color :white
+                            :background-color "#12808D"}} "Iphone Hybrid APP"]
+             [:div "Objective C"]
+             [:div "Apple Swift"]
+             [:div "React Native"]
+             [:div "Cocoa Touch"]
+             [:div "iOS SDK"]
+             [:div "Core Services"]
+             [:div "Xcode"]
+             [:div "Managing Memory"]
+             [:div "JavaScriptCore"]
+             [:div "C/C++"]
+             [:div "UI/UX"]]]
+           ]
+          ]]]
+       [: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.
+" ]]
+          [: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"]])
+          ]
+         ]]]]])
+
+(rum/defc technology-stack [state]
+    [:table
+     [:tbody
+      [:tr
+       [:td
+        [:table {:style {:width "150px"}}
+         [:tbody
+          [:tr
+           [:td {:style {:text-align :left
+                         :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)"
+                         :font-size "0.85rem"
+                         :background-color "#4B4D5A"
+                         :padding-left "5px"
+                         }}
+            [:div {:style {:padding "7px"
+                           :color "#4B4D5A"
+                           :background-color "#7D889C"}} " Linux Devops Automation"]
+            [:div "Docker"]
+            [:div "Xen"]
+            [:div "Vmware"]
+            [:div "OpenSips"]
+            [:div "STUN-TURN"]
+            [:div "RDP"]
+            [:div "Asterisk"]
+            [:div "Virtual Box"]
+            [:div "Awk"]
+            [:div "Shell"]
+            [:div "Ansiable"]
+            [:div "ngnix"]]]
+          [:tr [:td {:style { :color "#D9C9BA"
+                             :text-align :left
+                             :height "100%"
+                             :font-size "0.85rem"
+                             :background-color "#4B4D5A"
+                             :padding-left "5px"
+
+                             }}
+                [:div {:style {:padding "7px"
+                               :color "#4B4D5A"
+                               :background-color "#7D889C"}} "Automated Testing"]
+                [:div "Property based"]
+                [:div "Generative"
+                 ]
+                [:div "Testing"]
+                [:div "CircleCi"]]]
+          ]]
+        ]
+       [:td
+
+        [:table
+         [:tbody
+          [:tr [:td {:style {:font-weight 600
+                             }} "Generative Testing The Case for Property-based Testing"]
+           [:td {:style {:font-weight 600
+                         :text-align :left
+                         }}
+            "System Automation Key to maintain software and obtain faster quality production cycle"]]
+          [:tr [:td {:style {:text-align :left
+                             :width "160px"
+                             :padding "2px"}}
+                "Unit testing is very necessary to protect
+  overall integrity of the product from new change requests. Unit tests takes significant
+  amount time to write test cases not to mention some time we got reluctant and cover
+  every edge cases. I have introduced property base testing along with software specification
+  language so that test case can be auto generated."]
+           [:td {:style {:text-align :left}}
+            "Finally system automation is necessary, because it is nature of human to make mistake
+  and human learns from mistake. On the other hand machine breaks on error. In order
+  to feel this gap and keep whole system up and running from development to production
+  and maintenance we need to automate whole system with best practices and proven tactics
+  and keep it out of human intervention. This is why I use to work with linux over windows
+  to implement policy based devops systems and UI using Python, Javascirpt, AWK,
+  Shell scripting over the cloud architecture and build cloud architecture using Xen,
+  Docker and virtual desktop"]
+           ]
+          ]]
+        (comment
+          "
+  Generative Testing
+  The Case for Property-based Testing
+
+  Introduction
+
+  Generative testing is a widespread approach in the functional world, mainly due to the popularity of Haskell’s QuickCheck and Clojure’s QuickCheck implementation test.check. Traditional unit tests enable us to verify assumptions for a given function. This approach, also known as example based testing, is based on manually defined inputs and expected outputs. In other words a developer has to figure out a set of inputs/outputs to assert that the function under test is working as intended. This also means that one would have to write a large number of tests just so to be able to verify a wide range of cases.
+
+  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)"
+                   :text-align :left
+                   :width "150px"
+                   :color "#D9C9BA"
+                   :height "100%"
+                   :font-size "0.85rem"
+                   :background-color "#4A3356"
+                   :padding-left "5px"
+                   }}
+      [:div {:style {:padding "7px"
+                     :color :white
+                     :background-color "#12808D"}} "Android Hybrid APP"]
+      [:div "Java"]
+      [:div "Kotlin"]
+      [:div "WebRTC"]
+      [:div "RecyclerView"]
+      [:div "Intents"]
+      [:div "Preferences"]
+      [:div "Lifecycle"]
+      [:div "Content Providers"]
+      [:div "Backgroud Tasks"]
+      [:div "Android Studio3"]
+      [:div "Gradle"]
+      [:div "JNI NDK"]]
+     [:td {:style {: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"
+                     :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."
+      ]
+     (comment
+       [:td {:style {:text-align :left
+                     :padding "2px"}}  "RecyclerView also keeps views in different pools depending on their type. So for UIs with many different view types, the same view is less likely to be reused frequently. This means that more views are held in memory while new views are constantly being created, which affects both memory and performance. We build UI that is designed to be faster and more efficient when working with scrolling surfaces. It aims to improve performance by moving the heavy work to a background thread and spreading the rendering work across multiple frames. Decouple the layout operations from Android views. This allows us to move the CPU-intensive measure and layout operations to the background thread, saving milliseconds.
+
+Finally, We efficiently breaks down complex views into smaller pieces such as text, images, and videos, and renders them incrementally, spreading the work that needs to be done across multiple frames. It also recycles those smaller pieces and can recombine them in a virtually infinite number of ways, reducing the total number of views that need to be created and stored in memory. These improves in scroll performance of up to 35 percent, better memory behavior with complex lists, and easier-to-test UI code."])
+     ]]])
+
+(rum/defc fullstack-email [state]
+  [:table {:style {: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"
+                   :padding-left "5px"
+                   }}
+      [:div {:style {:padding "7px"
+                     :color :white
+                     :background-color "#12808D"}} "Single Page APP (SPA)"]
+      [:div "ReactJs"]
+      [:div "Redux"]
+      [:div "VueJS"]
+      ]]
+    [:tr
+     [:td {:style {:text-align :left
+                    :color "#D9C9BA"
+                    :height "100%"
+                    :font-size "0.85rem"
+                    :background-color "#4A3356"
+                    :padding-left "5px"
+                   }}
+      [:div {:style {:padding "12px"
+                     :color :white
+                     :background-color "#12808D"}} "Info Graphics"]
+      [:div "HTML5/CSS3"]
+      [:div "SVG/D3"]
+      [: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"
+                     :background-color "#7D889C"}} "Relational Database"]
+      [:div "Datalog"]
+      [:div "SQL"]
+      [:div "PostgreSQL"]
+      [:div "Datomic"]
+      ]]
+    [: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"}} "NO-SQL Database"]
+      [:div "Map Reduce"]
+      [:div "Raik"]
+      [:div "Radis"]]]]])
+
+(rum/defc devops-email [state]
+  [:div "hello"])
+
+(rum/defc iot-email [state]
+  [:div "hello"])
+
+(rum/defc web-ui [state]
+  [:div "hello"])
+
+(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)"}}
+                  [: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"}}
+                         "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."]]
+                   [: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."]]
+                   [:tr [:td {:style {:padding "5px"
+                                      :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
+  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
+  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
+  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
+  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."]]
+                   [:tr [:td {:style {:padding "5px"
+                                      :font-size "1.1rem"}}
+                         "Distributed database design and Query optimization"]]
+                   [:tr [:td {:style {:padding "2px"}}
+                         "I worked with Relational Databases - oracle and postgre and implemented sql quries and stored
+  procedure with large set of telecommunication data witch had over ten million subscribers.
+  I have found it even takes days to complete a query when data volume gets this size.
+  Implementing Redis Cluster solve this problem because data stays memory use disk for persistence
+  but it loose the ability to SQL over database. Finally we came out optimal data base which only only
+  leverage SQL query but also can query graph database and document query at the same time efficiently
+  use Redis Clusters. Read More » "]]]])
+
+(rum/defc middle-site-email [state]
   (let [fw "1.4rem"
         fw-small "1rem"]
-    [:div {:style {:font-family "'Merriweather', serif"}}
-
-    [:div {:style {:font-size fw
-                   :color "#fff"
-                   :padding "10px"
-                   :text-align :center
-                   :background-color "#21374B"
-                   :font-weight 500}}
-     "Reference Projects & Responsibilities"]
-
-     [:table
-      [:tbody
-       [:tr
-        [:td [:div {:style {:font-weight 600
-                            :font-size fw-small
-                            :text-align :center
-                            :padding "10px"}}
-              "Senior Software Engineer"] ]
-        [:td [:div {:style {:font-weight 600
-                            :font-size fw-small
-                            :padding "10px"
-                            }}
-              "Swapno Re-seller based prepaid Billing system"]]]
-       [:tr
-        [:td
-         [:div {:style {:fond-size fw-small
-                        :width "250px"
-                        :padding "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"
-                         :color "#666"
-                         :font-size fw-small}}
-           "Joined May 2012"]
-          [:div {:style {
-                         :background-color "#185E65"
-                         :color "#BFBFBF"
-                         :padding "10px"
-                         :font-size fw-small}}
-           [:a {:style {:color "#BFBFBF"
-                        :text-decoration :none}
-                :href "http://sgcsoft.net/"}  "Software Global Consultancy"]
-           [:div {:style {:text-align :center}} [:span {:style {:font-weight 600
-                                                                :font-size "1.5rem"}} "// " ]
-            " SGC GLOBAL"]]]]
-        [:td
-
-         [:div {:style {:padding "15px"
-                        :font-size fw-small
-                        :color "#003399"
-                        :background-color "#D9A648"
-                        :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)"}}
-
-          [:span {:style {:font-size "2rem"
-                          :padding-right "7px"}} "I"]
-          "started this project from the scratch."
-          [:div
-           "Key responsibilities and challenges were design"
-           "and developement fault tolerant Prepaid Billing Platform.
-Developing graphical interface for Web and Mobile. Distributed database design
-and Query optimizations and System Automation & Testing." ]]]]
-       [:tr [:td "Hello" ]
-        [:td [:img {:style {:height "300px"}
-                    :src "https://dragdis.blob.core.windows.net/assets/2014/03/26/f88c5ea28a1f4342879d6dd50c40403d.gif"}]]]]]
-
-
-
-
-    [:div {:style {:font-size "1.2rem"
-                   :padding "10px"
-                   :background-color "#7D889C"
-                   :font-weight 500}}
-     [:span {:style {:font-size "1.8rem"}} "T"]"echnology Stack"]
-    [:div {:style {:padding "10px"
-                   :background-color "#fff"
-                   }}
-     (map-indexed
-      (fn [i tech]
-        [:div {:key (str "map-" i)
-               :style {:text-align :center
-                       :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)"}}
-         tech])
-      [[:div {:style {:color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "Web Developement"]
-        [:div "Streaming"]
-        [:div "Websocket"]
-        [:div "GraphQL"]
-        [:div "Rest"]
-        ]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "Web Programming"]
-        [:div "Python"]
-        [:div "Flask"]
-        [:div "gEvent"]
-        [:div "nodejs"]]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "Realtime Analytics"]
-        [:div "SQL Alcalamy"]
-        [:div "Datalog"]
-        [:div "Map Ruduce"]]
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "Python  Microservices"]
-        [:div "ZeroMQ"]
-        [:div "Erlang Actor"]
-        [:div "Java, Clojure"]]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4A3356"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color :white
-                       :background-color "#12808D"}} "Single Page APP (SPA)"]
-        [:div "ReactJs"]
-        [:div "Redux"]
-        [:div "VueJS"]
-        ]
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4A3356"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color :white
-                       :background-color "#12808D"}} "Android Hybrid APP"]
-        [:div "Kotlin"]
-        [:div "React Native"]
-        [:div "Cordova"]]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4A3356"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color :white
-                       :background-color "#12808D"}} "Iphone Hybrid APP"]
-        [:div "Objective C"]
-        [:div "React Native"]
-        [:div "Cordova"]]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4A3356"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "12px"
-                       :color :white
-                       :background-color "#12808D"}} "Info Graphics"]
-        [:div "HTML5/CSS3"]
-        [:div "SVG/D3"]
-        [:div "Spring Animation"]]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "Relational Database"]
-        [:div "Datalog"]
-        [:div "SQL"]
-        [:div "PostgreSQL"]
-        [:div "Datomic"]
-        ]
-
-       [:div {:style { :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      }}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "NO-SQL Database"]
-        [:div "Map Reduce"]
-        [:div "Raik"]
-        [:div "Radis"]]
-
-       [:div {:style {:display :flex
-                      :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-                      :align-items :flex-start
-                      :flex-direction :column}}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} " Linux Devops Automation"]
-        [:div "Dockes"]
-        [:div "Shell"]
-        [:div "Ansiable"]
-        [:div "ngnix"]]
-       [:div {:style { :color "#D9C9BA"
-                      :height "100%"
-                      :font-size "0.85rem"
-                      :background-color "#4B4D5A"
-                      :padding-left "5px"
-
-                      }}
-        [:div {:style {:padding "7px"
-                       :color "#4B4D5A"
-                       :background-color "#7D889C"}} "Automated Testing"]
-        [:div "Property based"]
-        [:div "Generative"
-         ]
-        [:div "Testing"]
-        [:div "CircleCi"]]
-       ])]
-    [:div {:style {:font-size "1.4rem"
-                   :color "#fff"
-                   :padding "10px"
-                   :background-color "rgb(41,73,130)"
-                   :font-weight 500}}
-     "Education & Recommendations"]
-    [:div
-     [:div {:style {:padding "10px"
-                    :font-size ".86rem"}} "I have my BSC  in Computer Engineering from American International University - Bangladesh."]
-     [:div {:style {:padding "10px"
-                    :font-size ".86rem"}} "I was programming contest in national lavel and
-   My final project was - Design 32-bit processor using MISPs
-  instruction on Xlink FPGA"]
-     ]
-    [:div {:style {:padding "10px"
-                   }}
-     [:div {:style {:padding "10px"
-                    :color "#4B4D5A"
-                    :background-color "#7D889C"}}
-      [:div "M. Mamunuzzaman"]
-      [:div "CEO SGC Global"]
-      [:div "mamunuzzaman@sgcglobal.com"]]
-     [:div {:style {:padding "10px"
-                    :background-color "#4A3356"
-                    :color "#D9C9BA"}}
-      [:div "Shama Ar Rashid"]
-      [:div "Director Engineering, SGC Global"]
-      [:div "shama.rashid@gmail.com"]]]
-    [: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"]]))
-
-(rum/defc about < rum/reactive [state]
-  (let [wsize (get-in (rum/react state) [:window :layout])]
-    [:div {:style {:font "1em/1.4 Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif"
-                   :margin "0 auto"
+    [:table
+     [:tbody
+      [:tr
+       [:td
+        (position-email state)]]
+      [:tr [:td (email-iphone state)]]
+      [:tr
+       [:td
+        [:table
+         [:tbody
+          [:tr
+           [:td (fullstack-email state)]
+           [:td (fullstack-email-body state)]]
+          ]]
+        ]]
+
+      [:tr
+       [:td {:style {:font-size "1.2rem"
+                     :background-color "#7D889C"
+                     :font-weight 500
+                     :color :white}}
+        [:span {:style {:font-size "1.8rem"}} "T"]"echnology Stack"]
+       ]
+      [:tr  [:td  (android-email)]
+       ]
+      [:tr
+       [:td
+        [:div {:style {:background-color "#fff"}}
+         (technology-stack state)] ] ]
+      [:tr
+       [:td {:style {:font-size "1.4rem"
+                     :color "#fff"
+                     :padding "10px"
+                     :background-color "rgb(41,73,130)"
+                     :font-weight 500}}
+        "Education & Recommendations"]]
+      [:tr
+       [: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"]
+
+        ]]
+      [:tr
+       [:td {:style {:padding-left "50px"}}
+        [:table
+         [:tbody
+          [:tr {:style {:padding "10px"
+                         }}
+           [:td {:style {:padding "10px"
+                          :color "#4B4D5A"
+                          :background-color "#7D889C"}}
+            [:div "M. Mamunuzzaman"]
+            [:div "CEO SGC Global"]
+            [:div "mamunuzzaman@sgcglobal.com"]]
+           [:td {:style {:padding "10px"
+                          :background-color "#4A3356"
+                          :color "#D9C9BA"}}
+            [:div "Shama Ar Rashid"]
+            [:div "Director Engineering, SGC Global"]
+            [:div "shama.rashid@gmail.com"]]]]]]]
+      [: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"]]]]]))
+
+
+(rum/defc email-body [state]
+  [:table {:style {:border-collapse "collapse"
+                   :margin "0"
+                   :padding "0"
+                   :height "100%"
                    :width "100%"
-                   :backgroundColor "#fafafa"
-                   }}
-     (first-site state)
-     (middle-site state)
-     ]))
+                   }}
+   [:tbody
+    [:tr [:td (first-site-email state)]]
+    [:tr [:td (middle-site-email state)]]]])

 (rum/defc email [state]
-  (about state))
+  [:div {:style {:height "100%"
+                 :margin "0"
+                 :padding "0"
+                 :width "100%"}}
+   [:center
+    [:table {
+             :cell-padding "0"
+             :cell-spacing "0"
+             :height "100%"
+             :width "100%"
+             :style {
+                     :text-align "center"
+                     :border-collapse "collapse"
+                     :margin "0"
+                     :padding "0"
+                     :height "100%"
+                     :width "100%"
+                     :background-color "#ddd"}
+
+             }
+     [:tbody
+      [:tr
+       [:td {:style {
+                     :border-top-color "#bbbbbb"
+                     :border-top-style :solid
+                     :border-top-width "4px"
+                     :color "#878787"
+                     :font-family "'Lucida Grande','Lucida Sans Unicode',Verdana,sans-serif"
+                     :font-size "13px"
+                     :padding "20px"
+                     :width "100%"
+
+                     }}
+        [:table {:cell-padding "0"
+                 :cell-spacing "0"
+                 :style {
+                         :border "0"
+                         :border-collapse :collapse
+                         :width "600px"}}
+         [:tbody
+          [:tr
+           [:td {:style {
+                         :color "#878787"
+                         :font-size "13px"
+                         :font-family "'Lucida Grande','Lucida Sans Unicode',Verdana,sans-serif"}}
+            [:table {:cell-padding "0"
+                     :cell-spacing "0"
+                     :style {:border-collapse :collapse
+                             :background-color "#181818"
+                             :font-size "13px"}}
+             [:tbody
+              [:tr [:td {:style {:text-align "center"}}
+                    (email-body state)]]]]]]]]
+        ]]]]]])


improved chat channel switching

improved chat channel switching

--- src/cljs/netrunner/chat.cljs
+++ src/cljs/netrunner/chat.cljs
@@ -7,9 +7,9 @@

 (def app-state
   (atom
-    {:active-channel :general
-     :channels {:general ["foobar" "spam eggs"]
-                :belgium ["Vive la frite !" "On aime la biere ici."]}}))
+   {:active-channel [:general]
+    :channels {:general ["foobar" "spam eggs"]
+               :belgium ["Vive la frite !" "On aime la biere ici."]}}))

 (go (while true
       (let [msg (<! chat-channel)
@@ -25,7 +25,7 @@
       (aset input "value" "")
       (.focus input)
       (put! out-channel #js {:type "chat"
-                             :channel (name (:active-channel @app))
+                             :channel (name (first (:active-channel @app)))
                              :msg text}))))

 (defn msg-input-view [app owner]
@@ -39,14 +39,16 @@
                  :onKeyPress #(when (== (.-keyCode %) 13) (send-msg app owner))}]
         [:button {:on-click #(send-msg app owner)} "Send"]]))))

-(defn channel-view [channel owner]
+(defn channel-view [cursor owner]
   (reify
     om/IRender
     (render [this]
-      (sab/html
-       [:div {:class (if (= (:active-channel @app-state) channel) "active" "")
-              :on-click #(swap! app-state assoc :active-channel channel)}
-         (str "#" (name channel))]))))
+      (let [ch (:channel cursor)
+            active-ch (:active-channel cursor)]
+       (sab/html
+        [:div {:class (if (= (first active-ch) ch) "active" "")
+               :on-click #(om/update! active-ch [ch])}
+         (str "#" (name ch))])))))

 (defn channel-list-view [app owner]
   (reify
@@ -54,7 +56,9 @@
     (render-state [this state]
       (sab/html
        [:div.blue-shade.panel.channel-list
-        (om/build-all channel-view (keys (:channels app)))]))))
+        (for [ch (keys (:channels app))]
+          (om/build channel-view {:channel ch
+                                  :active-channel (:active-channel app)}))]))))

 (defn message-view [message owner]
   (reify
@@ -78,12 +82,7 @@
        [:div.chat-app
         (om/build channel-list-view app)
         [:div.chat-box
-         (om/build message-list-view (get-in app [:channels (:active-channel app)]))
+         (om/build message-list-view (get-in app [:channels (first (:active-channel app))]))
          (om/build msg-input-view app)]]))))

 (om/root chat-app app-state {:target (. js/document (getElementById "chat"))})
-
-;; (swap! app-state assoc-in [:channels :general] ["foo"])
-;; (swap! app-state assoc :active-channel :general)
-;; (swap! app-state assoc-in [:channels :france] ["bar"])
-;; (.log js/console (:active-channel @app-state))


fix ai scoring

fix ai scoring

--- src/cljs/triboard/ai/ai.cljs
+++ src/cljs/triboard/ai/ai.cljs
@@ -25,7 +25,7 @@
   (reduce                                                   ;; TODO - Factor in move
     #(scores/update-scores-with %1 %2 cell-weights)
     scores/null-scores
-    (:transition transition)))
+    transition))

 (defn- worst-possible-score-from
   [{:keys [player other-players] :as ai} moves]


specs

specs

--- src/cljs/triboard/ai/ai.cljs
+++ src/cljs/triboard/ai/ai.cljs
@@ -1,5 +1,6 @@
 (ns triboard.ai.ai
   (:require
+    [cljs.spec :as s :include-macros true]
     [triboard.ai.scores :as scores]
     [triboard.logic.board :as board]
     [triboard.logic.constants :as cst]
@@ -23,7 +24,6 @@
 (defn- score-move
   "Compute the strength of a move, based on the converted cells"
   [{:keys [player cell-weights]} [point conversions]]
-  {:pre [(move/conversions? conversions)]}
   (reduce
     #(scores/update-score-diff cell-weights %1 %2)
     scores/null-score-diff
@@ -52,11 +52,14 @@
 ;; Public API
 ;; -----------------------------------------

+(s/fdef best-move
+  :args (s/tuple ::turn/turn ::cst/player)
+  :ret ::board/coord)
+
 (defn best-move
   "[SIMPLISTIC] Return the best move for a player based on:
    * The immediate gain
    * The worse immediate lost afterwards"
-  ;; {:pre [(player? player)] :post [(board/coord? %)]} ;;TODO
   [turn player]
   (let [ai (make-ai turn player)]
     (first


Mujir, Bharti | fixing build

Mujir, Bharti | fixing build

--- test/aggregatequeryservice/utils_test.clj
+++ test/aggregatequeryservice/utils_test.clj
@@ -12,7 +12,7 @@

 (def connection-provider (doto (new TestConnectionProvider "jdbc:sqlite:db/test1.db")))
 (defn add [a b]
-  (+ a b))
+  (+ a 1))

 (def add1 (partial add 1))


add doc'd workspace functions to core

add doc'd workspace functions to core

--- src/com/billpiel/mem_tracer/core.clj
+++ src/com/billpiel/mem_tracer/core.clj
@@ -10,19 +10,93 @@
 (def config (atom {:ws-ns '$ws
                    :rec-ns '$rec}))

+;; === Workspace functions
+
 (defn get-current-workspace!
   []
   (#'ws/init-workspace! workspace)
   @workspace)

-(def reset-workspace! (partial #'ws/reset-workspace! workspace))
-(def clear-log! (partial #'ws/clear-log! workspace))
-(def add-trace-ns! (partial #'ws/add-trace-ns! workspace))
-(def remove-trace-ns! (partial #'ws/remove-trace-ns! workspace))
-(def enable-all-traces! (partial #'ws/enable-all-traces! workspace))
-(def disable-all-traces! (partial #'ws/disable-all-traces! workspace))
-(def remove-all-traces! (partial #'ws/remove-all-traces! workspace))
-(def deref-workspace! (partial #'ws/deref-workspace! workspace))
+(defn reset-workspace!
+  "Reset the active workspace back to default state."
+  [] (#'ws/reset-workspace! workspace))
+
+(defn clear-log!
+"Clears the log of the active workspace, but preserves traces and other
+  properties."
+[] (#'ws/clear-log! workspace))
+
+(defn add-trace-ns!
+"`ns-sym` is a symbol that references an existing namespace. Applies an enabled
+  trace to all functions in that namespace. Adds the traces to the active workspace trace set."
+[ns-sym] (#'ws/add-trace-ns! workspace))
+
+(defn remove-trace-ns!
+"`ns-sym` is a symbol that references an existing namespace. Removes all
+  traces applied to the namespace."
+[] (#'ws/remove-trace-ns! workspace))
+
+(defn enable-all-traces!
+"Enables any disabled traces in active workspace."
+[] (#'ws/enable-all-traces! workspace))
+
+(defn disable-all-traces!
+"Disables all traces in active workspace. The active workspace trace set will be
+  preserved and can be re-enabled."
+[] (#'ws/disable-all-traces! workspace))
+
+(defn remove-all-traces!
+"Disables and removes all traces in the active workspace."
+[] (#'ws/remove-all-traces! workspace))
+
+(defn deref-workspace!
+"Returns the value of the active workspace, but with all children
+  recursively dereferenced. This workspace value will not receive new
+  trace entries."
+[] (#'ws/deref-workspace! workspace))
+
+(defn ws-save!
+  "Saves active workspace to the workspace shelf namespace in the pre-specified slot."
+  []
+  (#'ws/save! workspace (:ws-ns @config)))
+
+(defn ws-save-as!
+  "Saves active workspace to the workspace shelf namespace in the specified `slot`."
+  [slot]
+  (#'ws/save-as! workspace
+                 (:ws-ns @config)
+                 slot))
+
+(defn ws-load!
+  "Loads a workspace from the shelf namespace into the active
+  position. Will not overwrite an un-saved active workspace unless
+  `active` equals :f"
+  [slot & [force]]
+  (#'ws/load! workspace
+              (:ws-ns @config)
+              slot
+              force))
+
+
+;; === END Workspace functions
+
+;; === Recording functions
+;; === END Recording functions
+
+
+;; === Query functions
+
+(defmacro qws
+"Queries the trace record of the active workspace."
+ [& body] `(q/q (q/trace->zipper (deref-workspace!))
+                           ~@body))
+
+(defmacro q
+"Queries the active trace recording."
+ [& body] `(q/q (q/trace->zipper recording)
+                           ~@body))
+
+;; === END Query functions

 (def entry->string com.billpiel.mem-tracer.string-output/entry->string)
@@ -32,6 +106,3 @@
   (-> entry
       deref-workspace! ;; ??? This can safely be run on a deref'd entry
       com.billpiel.mem-tracer.string-output/print-entry))
-
-(defmacro q [& body] `(q/q (q/trace->zipper (deref-workspace!))
-                           ~@body))


fix name of test

fix name of test

--- test/chat/test/server/db.clj
+++ test/chat/test/server/db.clj
@@ -100,7 +100,7 @@
                         :content "Hello?"}
         message-2 (db/create-message! message-2-data)
         messages (db/fetch-messages)]
-    (testing "create returns message"
+    (testing "fetch-messages returns all messages"
       (is (= (set messages) #{message-1 message-2})))))

 (deftest user-hide-thread


Do kibit recomendations

Do kibit recomendations

--- test/clj/subman/t_filler.clj
+++ test/clj/subman/t_filler.clj
@@ -16,12 +16,14 @@
     1 [:fresh :fresh]))

 (fact "should get new before"
-      (-> (filler/get-new-before new-getter #(= % :exists))
-          count) => 3)
+      (count (filler/get-new-before new-getter
+                                    #(= % :exists))) => 3)

 (fact "should get all new from nth getters"
-      (-> (filler/get-all-new #(= % :exists) new-getter new-getter new-getter)
-          count) => 9)
+      (count (filler/get-all-new #(= % :exists)
+                                 new-getter
+                                 new-getter
+                                 new-getter)) => 9)

 (fact "update from all sources"
       (filler/update-all) => truthy


cleanup

cleanup


Optimize the code for flatters

Optimize the code for flatters

--- src/cyanite_fetcher/core.clj
+++ src/cyanite_fetcher/core.clj
@@ -51,38 +51,11 @@
     (println)
     cdata))

-(defn reduce-flatter
-  "Reduce flatter."
-  [data]
-  (println "Flatting data with reduce...")
-  (let [fdata (time (doall (reduce into data)))]
-    (println "Number of rows:" (count fdata))
-    (println)
-    fdata))
-
-(defn rreduce-flatter
-  "R/reduce flatter."
-  [data]
-  (println "Flatting data with r/reduce...")
-  (let [fdata (time (doall (r/reduce into [] data)))]
-    (println "Number of rows:" (count fdata))
-    (println)
-    fdata))
-
-(defn flatten-flatter
-  "Flatten flatter."
-  [data]
-  (println "Flatting data with flatten...")
-  (let [fdata (time (doall (flatten data)))]
-    (println "Number of rows:" (count fdata))
-    (println)
-    fdata))
-
-(defn rflatten-flatter
-  "R/flatten flatter."
-  [data]
-  (println "Flatting data with r/flatten...")
-  (let [fdata (time (doall (into [] (r/flatten data))))]
+(defn flatter
+  "Flatter."
+  [data f name]
+  (println (format "Flatting data with %s..." name))
+  (let [fdata (time (doall (f data)))]
     (println "Number of rows:" (count fdata))
     (println)
     fdata))
@@ -259,10 +232,10 @@
     (println)
     (let [paths (es-get-paths eshost path tenant)
           data (c-get-data chost paths tenant rollup period from to)
-          reduce-fdata (reduce-flatter data)
-          rreduce-fdata (rreduce-flatter data)
-          flatten-fdata (flatten-flatter data)
-          rflatten-fdata (rflatten-flatter data)
+          reduce-fdata (flatter data (fn [data] (reduce into data)) "reduce")
+          rreduce-fdata (flatter data (fn [data] (r/reduce into [] data)) "r/reduce")
+          flatten-fdata (flatter data (fn [data] (flatten data)) "flatten")
+          rflatten-fdata (flatter data (fn [data] (into [] (r/flatten data))) "r/flatten")
           remove-cdata (remove-cleaner reduce-fdata)
           rremove-cdata (rremove-cleaner reduce-fdata)]))
   (println "Finish time:" (tl/format-local-time (tl/local-now) :rfc822)))


finalize datastore new-version

finalize datastore new-version

--- src/datasplash/datastore.clj
+++ src/datasplash/datastore.clj
@@ -10,6 +10,7 @@
   (:gen-class))

 (defn write-datastore-raw
+  "Write a pcoll of already generated datastore entity in datastore"
   [{:keys [project-id] :as options} pcoll]
   (let [opts (assoc options :label :write-datastore)
         ptrans (-> (DatastoreIO/v1)
@@ -18,42 +19,15 @@
     (apply-transform pcoll ptrans named-schema opts)))

-
-;; (defn make-ds-entity
-;;   [raw-key raw-body {:keys [project-id ds-kind ds-namespace] :as options}]
-;;   (let [dso (.getService (DatastoreOptions/getDefaultInstance))
-;;         set-kind (fn [x kind] (.invoke (doto (.getDeclaredMethod com.google.cloud.datastore.BaseKey$Builder "setKind"
-;;                                                                  (into-array java.lang.Class [java.lang.String]))
-;;                                          (.setAccessible true))
-;;                                        x
-;;                                        (into-array [kind])))
-;;         set-project-id (fn [x project] (.invoke (doto (.getDeclaredMethod com.google.cloud.datastore.BaseKey$Builder "setProjectId"
-;;                                                                           (into-array java.lang.Class [java.lang.String]))
-;;                                                   (.setAccessible true))
-;;                                                 x
-;;                                                 (into-array [project])))
-;;         set-namespace (fn [x namespac] (.invoke (doto (.getDeclaredMethod com.google.cloud.datastore.BaseKey$Builder "setNamespace"
-;;                                                                           (into-array java.lang.Class [java.lang.String]))
-;;                                                   (.setAccessible true))
-;;                                                 x
-;;                                                 (into-array [namespac])))
-;;         key (-> dso
-;;                 (.newKeyFactory)
-;;                 (set-project-id project-id)
-;;                 (set-kind ds-kind)
-;;                 (set-namespace ds-namespace)
-;;                 (.newKey raw-key))
-;;         entity (-> (Entity/newBuilder key)
-;;                    (.set "body" (pr-str raw-body))
-;;                    (.build))]
-;;     entity))
-
-
 (defn make-ds-entity
-  [raw-key raw-value {:keys [ds-namespace ds-kind] :as options}]
+  "Generate a datastore entity. Take as parameters the string key of the entity, a map containing the different fields and an options map defining the datastore namespace and kind"
+  [raw-key raw-values {:keys [ds-namespace ds-kind] :as options}]
   (let [key-builder (DatastoreHelper/makeKey (into-array [ds-kind raw-key]))
         _ (when ds-namespace (.setNamespaceId (.getPartitionIdBuilder key-builder) ds-namespace))
         entity-builder (Entity/newBuilder)
         _ (.setKey entity-builder (.build key-builder))
-        _ (.put (.getMutableProperties entity-builder) "body" (.build (DatastoreHelper/makeValue (pr-str raw-value))))]
+        _ (doseq [[v-key v-val] raw-values]
+            (.put (.getMutableProperties entity-builder)
+                  (if (keyword? v-key) (name v-key) v-key )
+                  (.build (DatastoreHelper/makeValue v-val))))]
     (.build entity-builder)))


Fix panel border not being shown correctly

Width was being rounded, and an extra 1% was added on, which meant you
would never see the scrollbars.

--- src/day8/re_frame/trace.cljs
+++ src/day8/re_frame/trace.cljs
@@ -189,7 +189,7 @@
                                     [:div.panel
                                      {:style {:position   "fixed" :z-index 1 :box-shadow "rgba(0, 0, 0, 0.3) 0px 0px 4px" :background "white"
                                               :display    "flex"
-                                              :left       left :top "0px" :width (str (inc (int (* 100 @panel-width%))) "%") :height "100%"
+                                              :left       left :top "0px" :width (str (* 100 @panel-width%) "%") :height "100%"
                                               :transition transition}}
                                      [:div.panel-resizer {:style         (resizer-style draggable-area)
                                                           :on-mouse-down #(reset! dragging? true)}]


force N-TRIPLE format for now

force N-TRIPLE format for now

--- src/corpusmaker/entities.clj
+++ src/corpusmaker/entities.clj
@@ -119,7 +119,8 @@
   (doall
     (map #(do
       (println "loading" (.getAbsolutePath %) "into model...")
-      (.read model (java.io.FileInputStream. %) nil))
+      ;; TODO: auto detect format based on file suffix
+      (.read model (java.io.FileInputStream. %) nil "N-TRIPLE"))
       files)))

 (defn build-model
@@ -131,7 +132,7 @@
     (let [model (if (nil? tdb-directory)
       (ModelFactory/createDefaultModel)
       (TDBFactory/createModel tdb-directory))]
-      (load-into-model model files)
+      (load-into-model model (map file-str files))
       model)))

 (defn index-model


New project skeletons don't need contrib.

--- src/leiningen/new.clj
+++ src/leiningen/new.clj
@@ -10,8 +10,7 @@
   (spit (file project-dir "project.clj")
         (str "(defproject " project-name " \"1.0.0-SNAPSHOT\"\n"
              "  :description \"FIXME: write\"\n"
-             "  :dependencies [[org.clojure/clojure \"1.2.0\"]\n"
-             "                 [org.clojure/clojure-contrib \"1.2.0\"]])\n")))
+             "  :dependencies [[org.clojure/clojure \"1.2.0\"]])\n")))

 (defn write-implementation [project-dir project-clj project-ns]
   (.mkdirs (.getParentFile (file project-dir "src" project-clj)))


Fix errors

Fix errors

--- src/cyanite_fetcher/core.clj
+++ src/cyanite_fetcher/core.clj
@@ -228,7 +228,7 @@
           flatten-fdata (flatter data (fn [data] (flatten data)) "flatten")
           rflatten-fdata (flatter data (fn [data] (into [] (r/flatten data))) "r/flatten")
           remove-cdata (cleaner reduce-fdata (fn [data] (remove nil? data))  "remove")
-          rremove-cdata (cleaner reduce-fdata (fn [data] (into [] r/remove nil? data)) "r/remove")]))
+          rremove-cdata (cleaner reduce-fdata (fn [data] (into [] (r/remove nil? data))) "r/remove")]))
   (println "Finish time:" (tl/format-local-time (tl/local-now) :rfc822)))

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


Fix textarea to match react guidelines

Fix textarea to match react guidelines

--- src/discuss/utils/views.cljs
+++ src/discuss/utils/views.cljs
@@ -87,8 +87,8 @@
          (fa-icon "fa-quote-left")]
         [:textarea.form-control {:style {:backgroundColor "rgb(250,250,250)"}
                                  :title (t :references :disabled/tooltip)
-                                 :disabled true}
-         selection]
+                                 :disabled true
+                                 :value selection}]
         [:span.input-group-addon
          (fa-icon "fa-quote-right")]
         [:span.input-group-addon.pointer {:onClick remove-selection-then-reference!}


Make transormers.layout transformer friendly.

--- src/incise/transformers/layout.clj
+++ src/incise/transformers/layout.clj
@@ -53,23 +53,24 @@
                (fn [f# & args#] (~replacement (apply f# args#))))
      ""))

-(defn eval-with-context [code]
+(defn- eval-with-context [code]
   (binding [*ns* (create-ns `user#)]
     (require '[clojure.core :refer :all])
-    (require '[incise.layouts.utils :refer [*site-options* *parse*]])
+    (require '[incise.transformers.layout :refer [*site-options* *parse*]])
     (eval `(do
              (def ~'parses (vals @incise.parsers.parse/parses))
              (def ~'tags (incise.utils/slot-by :tags ~'parses))
              ~@code))))

-(defn render-content
-  "Render the given content based on its type. If it is a list, evaluate it in
-  the appropriate context. Otherwise just return it."
-  [content]
-  (condp #(%1 %2) content
-    list? (eval-with-context content)
-    content))
+(defprotocol RenderableContent (render-content [content]))
+(extend-protocol RenderableContent
+  clojure.lang.PersistentList
+  (render-content [content] (eval-with-context content))
+  nil
+  (render-content [content] "")
+  Object
+  (render-content [content] (str content)))

 (defn use-layout
   "Use the given layout function by calling it with *site-options* and *parse*."
-  [layout-fn] (layout-fn *parse*))
+  [layout-fn] (:content (layout-fn *parse*)))


generate command for transforming into smaller doc

--- src/luffer/worker.clj
+++ src/luffer/worker.clj
@@ -140,3 +140,5 @@
       (map
         (fn [i] (future (worker-loop i #(bulk-index-plays index (get-documents-for-work %)))))
         (range concurrency)))))
+
+;(->> (map (fn [[k new-name]] [new-name (get-in x k)]) [[[:created_at] :created_at] [[:track :duration] :track_duration] [[:all_plays_count] :all_plays_count] [[:track :show :date] :show_date] [[:all_plays_duration] :all_plays_duration] [[:track :title] :track_title] [[:track :show :venue :name] :venue_name] [[:track :show :venue :location] :venue_location] [[:track :slug] :track_slug] [[:track :show :tour :name] :tour_name] [[:track :show :tour :starts_on] :tour_start_date] [[:track :show :tour :ends_on] :tour_end_date] [[:track :show :venue :past_names] :venue_past_names] [[:track :show :year] :year] [[:track :show :era] :era] [[:track :show :remastered] :remastered] [[:track :show :sbd] :sbd] [[:track :mp3] :mp3] [[:track :unique_slug] :track_unique_slug] ]) (into {}))


Factorial problem added

Factorial problem added


Qualify imports in grimoire.api.fs.impl

Qualify imports in grimoire.api.fs.impl

--- src/grimoire/api/fs/impl.clj
+++ src/grimoire/api/fs/impl.clj
@@ -2,9 +2,9 @@
   "Filesystem datastore implementation details. This namespace is not part of
   the intentional API exposed in `grimoire.api` and should not be used by
   library client code."
-  (:refer-clojure :exclude [isa?])
   (:require [grimoire.util :as util]
-            [grimoire.things :refer :all]
+            [grimoire.things :as t]
+            [detritus.variants :as v]
             [clojure.java.io :as io]))

 ;; Private helpers for getting fs handles
@@ -21,17 +21,17 @@
   (let [which-store (if-not (= :notes which)
                       :docs :notes)
         d           (get store which (which-store store))
-        parent      (:parent thing)
-        p           (io/file (str d "/" (when parent (thing->path parent))))
+        parent      (t/thing->parent thing)
+        p           (io/file (str d "/" (when parent (t/thing->path parent))))
         e           (case which
                       (:meta)     "/meta.edn"
                       (:related)  "/related.txt"
                       (:examples) "/examples/"
                       (:notes)    "/notes.md"
                       nil)
-        n           (if (= :def (:type thing))
-                      (util/munge (:name thing))
-                      (:name thing))
+        n           (if (= ::t/def (v/tag thing))
+                      (util/munge (t/thing->name thing))
+                      (t/thing->name thing))
         h           (io/file p (str n e))]
     h))

@@ -61,13 +61,3 @@
   [c thing]
   (let [h (thing->handle c :related thing)]
     h))
-
-(defn update
-  "λ [{A → B} A (λ [B args*] → C) args*] → {A → C}
-
-  Updates a key in the map by applying f to the value at that key more
-  arguments, returning the resulting map."
-
-  [map key f & args]
-  (assoc map key
-         (apply f (get map key) args)))


Added rsync domain schema

Added rsync domain schema

--- main/src/dda/pallet/dda_backup_crate/domain.clj
+++ main/src/dda/pallet/dda_backup_crate/domain.clj
@@ -60,6 +60,10 @@
     BackupBaseElement
     BackupPath)
    #(= (:type %) :file-plain)
+   (merge
+     BackupBaseElement
+     BackupPath)
+   #(= (:type %) :rsync)
    (merge
      BackupBaseElement
      BackupPath)))


folder:resourceLocation

folder:resourceLocation

--- src/grafter/rdf/ontologies/pmd.clj
+++ src/grafter/rdf/ontologies/pmd.clj
@@ -17,3 +17,4 @@
 (def folder:hasTree      (folder "hasTree"))
 (def folder:defaultTree  (folder "defaultTree"))
 (def folder:parentFolder (folder "parentFolder"))
+(def folder:resourceLocation (folder "resourceLocation"))


improve filter ugen documentation

improve filter ugen documentation

--- src/overtone/sc/machinery/ugen/metadata/filter.clj
+++ src/overtone/sc/machinery/ugen/metadata/filter.clj
@@ -148,48 +148,112 @@
     :auto-rate true}

    {:name "RLPF"
+    :summary "resonant low pass filter"
     :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
            {:name "freq", :default 440.0 :doc "cutoff frequency"}
-           {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq"}]
-    :check (nth-input-stream? 0)
-    :doc "a resonant low pass filter"
+           {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq. A lower rq results in more resonance."}]
+    :check (nth-input-stream? 0)
+    :doc "A resonant low pass filter is a standard subtractive synthesis
+          tool which removes frequencies above a defined cut-off
+          point. This typically has the effect of making bright sounds
+          duller. However, in addition to this behaviour, the resonant
+          low pass filter also emphasises/resonates the frequencies
+          around the cutoff point. The amount of emphasis is
+          controlled by the rq param with a lower rq resulting in
+          greater resonance. High amounts of resonance (rq ~0) can
+          create a whistling sound around the cutoff frequency.
+
+          Using a low pass filter allows you to have fine-grained
+          control of the level of brightness/dullness to tune your
+          timbre in addition to allowing you to modulate the effect in
+          real time thus creating movement in the sound."
     :auto-rate true}

    {:name "RHPF", :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
                          {:name "freq", :default 440.0 :doc "cutoff frequency"}
-                         {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq"}]
-    :check (nth-input-stream? 0)
-    :doc "a resonant high pass filter"
+                         {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq. A lower rq results in more resonance"}]
+    :check (nth-input-stream? 0)
+    :summary "resonant high pass filter"
+    :doc "A resonant high pass filter lets through the frequencies above
+          the cutoff point and successfily dampens the frequencies below
+          the cutoff point. This effectively removes the fundamental
+          frequency of the sound, leaving only the fizz harmonic
+          overtones. However, in addition to this behaviour, the
+          resonant low pass filter also emphasises/resonates the
+          frequencies around the cutoff point. The amount of emphasis
+          is controlled by the rq param with a lower rq resulting in
+          greater resonance. High amounts of resonance (rq ~0) can
+          create a whistling sound around the cutoff frequency.
+
+          High pass filters are rarely used in the creation of
+          instruments and are predominantly used to create effervescent
+          sound effects of bright tibres that can be laid over the top
+          of another low pass sound to increase the harmonic content."
     :auto-rate true}

    {:name "LPF",
+    :summary "second order Butterworth low pass filter"
     :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
            {:name "freq", :default 440.0 :doc "cutoff frequency"}]
     :check (nth-input-stream? 0)
-    :doc "a second order Butterworth low pass filter"
+    :doc "A low pass filter is a standard subtractive synthesis tool
+          which removes frequencies above a defined cut-off point. This
+          typically has the effect of making bright sounds
+          duller. Using a low pass filter allows you to have fine-grained
+          control of the level of brightness/dullness to tune your
+          timbre in addition to allowing you to modulate the effect in
+          real time thus creating movement in the sound."
     :auto-rate true}

    {:name "HPF",
+    :summary "second order high pass filter"
     :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
            {:name "freq", :default 440.0 :doc "cutoff frequency"}]
     :check (nth-input-stream? 0)
-    :doc "a second order high pass filter"
+    :doc "A high pass filter lets through the frequencies above the
+          cutoff point and successfily dampens the frequencies below the
+          cutoff point. This effectively removes the fundamental
+          frequency of the sound, leaving only the fizz harmonic
+          overtones.
+
+          High pass filters are rarely used in the creation of
+          instruments and are predominantly used to create effervexcent
+          sound effects of bright tibres that can be laid over the top
+          of another low pass sound to increase the harmonic content."
     :auto-rate true}

    {:name "BPF",
+    :summary "second order Butterworth bandpass filter"
     :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
            {:name "freq", :default 440.0 :doc "centre frequency in Hertz"}
            {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq"}]
     :check (nth-input-stream? 0)
-    :doc "a second order Butterworth bandpass filter"
-    :auto-rate true}
-
-   {:name "BRF",
+    :doc "A band pass filter permits the frequencies around a specified
+          centre frequency to pass unaltered through the filter while
+          the frequencies either side are attenuated. The frequences
+          that pass through are known as the bandwidth or the band pass
+          of the filter.
+
+          Used to create timbres consisting of fizzy harmonics, lo-fi
+          qualities or very thin sounds that may form the basis of sound
+          effects."
+    :auto-rate true}
+
+   {:name "BRF"
+    :summary "second order Butterworth band reject filter"
     :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
            {:name "freq", :default 440.0 :doc "centre frequency in Hertz"}
            {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq"}]
     :check (nth-input-stream? 0)
-    :doc "a second order lowpass filter"
+    :doc "Band reject filters, also known as notch filters, attenuate a
+          selected range of frequencies effectively creating a notch in
+          the sound.
+
+          This type of filter is handy for scooping out frequencies,
+          thinning out a sound while leaving the fundamental intact,
+          making them useful for creating timbres that contain a
+          discernable pitch but do not have a high level of harmonic
+          content."
     :auto-rate true}

    {:name "MidEQ",


Remove obsolete instructions

Remove obsolete instructions

--- src/leiningen/new/kraken_works.clj
+++ src/leiningen/new/kraken_works.clj
@@ -14,7 +14,6 @@
     (main/info (str "Generating fresh kraken-works project in directory " (:sanitized data) "/."))

     (main/info (str "TODO: (you probably want to `cd " name "` first)"))
-    (main/info " * in resources/config.edn, change queue name to something more appropriate")
     (main/info " * Review and address the TODO items in the README.")
     (main/info " * `chmod +x script/*`")
     (main/info " * `git init`")


Refactor file asset handling into a function that takes a path

--- src/main/clojure/cascade.clj
+++ src/main/clojure/cascade.clj
@@ -135,6 +135,11 @@
       .getTime
       (.format format))))

+(defn file-handler
+  "Inteprets the path as the pat to a file asset in the configured public folder."
+  [path]
+  (generic-asset-handler (file-asset path)))
+
 (defn initialize-assets
   "Initializes asset handling for Cascade. This sets an application version (a value incorporated into URLs, which
 should change with each new deployment. Named arguments:
@@ -158,8 +163,7 @@
     (printf "Initialized asset access at virtual folder %s\n" root)
     (wrap-exception-handling
       (GET [(str root "/file/:path") :path #".*"]
-        [path]
-        (generic-asset-handler (file-asset path))))))
+        [path] (file-handler path)))))

 (defn wrap-html
   "Ring middleware that wraps a handler so that the return value from the handler (a seq of DOM nodes)


Modified the picture tag from img to div.

--- src/tames/handler.clj
+++ src/tames/handler.clj
@@ -42,8 +42,7 @@
         [:link {:rel "shortcut icon" :href "core/favicon.ico"} ]]
       [:body
         [:div {:style "width:100%; text-align:center;height:50px;"}]
-        [:div {:style "width:80px; height:80px; margin: 0 auto;"}
-          [:img {:src "core/logo.svg" :style "width:100%; height:100%;"}]]
+        [:div {:style "width:100px; height:100px; background-image:url(core/logo.svg); background-size:100%;margin:auto;"} ]
         [:h1 {:style "text-align:center;height:50px;"} title]
         [:form {:method "post"}
           [:div {:style "width:100%; text-align:center;"}


Specify charset=utf-8 for CSV downloads :blush:

--- src/metabase/api/dataset.clj
+++ src/metabase/api/dataset.clj
@@ -27,39 +27,19 @@
     (driver/dataset-query query {:executed_by *current-user-id*})))

-(defendpoint GET "/csv"
+(defendpoint POST "/csv"
   "Execute an MQL query and download the result data as a CSV file."
   [query]
   {query [Required String->Dict]}
   (read-check Database (:database query))
   (let [{{:keys [columns rows]} :data :keys [status] :as response} (driver/dataset-query query {:executed_by *current-user-id*})
-        columns (map name columns)]                         ; turn keywords into strings, otherwise we get colons in our output
+        columns (map name columns)] ; turn keywords into strings, otherwise we get colons in our output
     (if (= status :completed)
       ;; successful query, send CSV file
       {:status  200
        :body    (with-out-str
                   (csv/write-csv *out* (into [columns] rows)))
-       :headers {"Content-Type" "text/csv"
-                 "Content-Disposition" (str "attachment; filename=\"query_result_" (u/date->iso-8601) ".csv\"")}}
-      ;; failed query, send error message
-      {:status 500
-       :body   (:error response)})))
-
-
-(defendpoint POST "/csv"
-  "Execute an MQL query and download the result data as a CSV file."
-  [query]
-  {query [Required String->Dict]}
-  (clojure.pprint/pprint query)
-  (read-check Database (:database query))
-  (let [{{:keys [columns rows]} :data :keys [status] :as response} (driver/dataset-query query {:executed_by *current-user-id*})
-        columns (map name columns)]                         ; turn keywords into strings, otherwise we get colons in our output
-    (if (= status :completed)
-      ;; successful query, send CSV file
-      {:status  200
-       :body    (with-out-str
-                  (csv/write-csv *out* (into [columns] rows)))
-       :headers {"Content-Type" "text/csv"
+       :headers {"Content-Type" "text/csv; charset=utf-8"
                  "Content-Disposition" (str "attachment; filename=\"query_result_" (u/date->iso-8601) ".csv\"")}}
       ;; failed query, send error message
       {:status 500


test fix

test fix

--- src/metabase/models/card.clj
+++ src/metabase/models/card.clj
@@ -40,8 +40,8 @@
                  :updated_at             (util/new-sql-timestamp)
                  :dataset_query          (cheshire/generate-string dataset_query)
                  :visualization_settings (cheshire/generate-string visualization_settings))
-    display (do (assert (contains? display-types (keyword display)))
-                (assoc :display (name display)))))
+    display #(do (assert (contains? display-types (keyword display)))
+                 (assoc % :display (name display)))))

 (defmethod post-select Card [_ {:keys [organization_id creator_id] :as card}]
   (-> card


Added in some tests

Added in some tests

--- storm-core/test/clj/backtype/storm/config_test.clj
+++ storm-core/test/clj/backtype/storm/config_test.clj
@@ -74,6 +74,20 @@
     (is (thrown-cause? java.lang.IllegalArgumentException
           (.validateField validator "test" (inc Integer/MAX_VALUE))))))

+(deftest test-pos-integer-validator
+  (let [validator ConfigValidation/NotNullPosIntegerValidator]
+    (is (thrown-cause? java.lang.IllegalArgumentException
+        (.validateField validator "test" nil)))
+    (.validateField validator "test" 1000)
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" 1.34)))
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" 0)))
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" -100)))
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" (inc Integer/MAX_VALUE))))))
+
 (deftest test-integers-validator
   (let [validator ConfigValidation/IntegersValidator]
     (.validateField validator "test" nil)


added notification on worker modification

--- src/hivewing_core/worker.clj
+++ src/hivewing_core/worker.clj
@@ -1,5 +1,6 @@
 (ns hivewing-core.worker
   (:require [hivewing-core.configuration :refer [sql-db]]
+            [hivewing-core.hive-image-notification :as hin]
             [hivewing-core.core :refer [ensure-uuid]]
             [hivewing-core.worker-events :refer :all]
             [hivewing-core.worker-config :refer :all]
@@ -62,7 +63,9 @@
                             :hive_uuid (ensure-uuid hive-uuid)
                             :apiary_uuid (ensure-uuid apiary-uuid)
                             :name  (or worker-name (namer/gen-name)))]
-    (first (jdbc/insert! sql-db :workers clean-params))))
+    (let [res (first (jdbc/insert! sql-db :workers clean-params))]
+      (hin/hive-images-notification-send-worker-update-message (:uuid res))
+      res)))

 (defn worker-join-hive
   "Add a worker to a given hive. Removing it from a hive it was in before.
@@ -71,11 +74,13 @@
   [worker-uuid hive-uuid]
   ; YOU MUST UPDATE THE HIVE And worker image
   ; YOU MUST inform the worker what hive it is in!
+  (throw "ACK")
   (println "TODO"))

 (defn worker-join-apiary
   "Adds the worker to an apiary, setting the hive_uuid to nil"
   [worker-uuid apiary-uuid]
+  (throw "ACK")
   (println "TODO"))

 (defn worker-delete
@@ -86,7 +91,10 @@
   [worker-uuid]
   (worker-config-delete worker-uuid)
   (worker-events-send worker-uuid :.deleted-worker true)
-  (jdbc/delete! sql-db :workers ["uuid = ?" (ensure-uuid worker-uuid)]))
+
+  (let [res (jdbc/delete! sql-db :workers ["uuid = ?" (ensure-uuid worker-uuid)])]
+    (hin/hive-images-notification-send-worker-update-message worker-uuid)
+    res))

 (defn worker-access?
   "Worker given the token and uuid, can it access?"


update comment.

update comment.

--- src/metabase/util.clj
+++ src/metabase/util.clj
@@ -84,7 +84,7 @@
       (java.sql.Date.)))

 (defn parse-iso8601
-  "parse a string value expected in the iso8601 format  into a `java.sql.Date`"
+  "parse a string value expected in the iso8601 format into a `java.sql.Date`."
   [datetime]
   (when datetime
     (->> datetime


Исправление функций работы с датами

Исправление функций работы с датами

--- src-cljs/ixinfestor/omut.cljs
+++ src-cljs/ixinfestor/omut.cljs
@@ -171,7 +171,9 @@

 (defn str-to-date [date-string]
-  (new js/Date (.parse js/Date date-string)))
+  (let [d (new js/Date (.parse js/Date date-string))]
+    (if (js/isNaN d) nil d)))
+

 (defn format-date
   "Format a date using either the built-in goog.i18n.DateTimeFormat.Format enum
@@ -185,7 +187,8 @@
   > \"July\"
   "
   [date-format date]
-  (.format (goog.i18n.DateTimeFormat. (or (date-formats date-format) date-format))  date))
+  (if (nil? date) nil
+      (.format (goog.i18n.DateTimeFormat. (or (date-formats date-format) date-format))  date)))

 (defn str-to-date-and-format [date-format alt-string s]
   (if (nil? s) alt-string
@@ -2015,7 +2018,7 @@
 ;;**************************************************************************************************

 (defn ui-list-group [list-groups-items & [class+]]
-  (apply dom/div #js {:className (str "list-group"
+  (apply dom/div #js {:className (str "list-group "
                                       (or class+ "col-xs-12 col-sm-12 col-md-12 col-lg-12"))
                       :style #js {:marginTop 10}}
          list-groups-items))
@@ -2035,7 +2038,10 @@

-(defn ui-list-group--counts-by [text f points & [nil-text]]
+(defn ui-list-group--counts-by [points f
+                                {:keys [text nil-text]
+                                 :or {text "метка в заголовке"
+                                      nil-text "не указано"}}]
   (let [items (->> points
                    (group-by f)
                    seq)]
@@ -2043,10 +2049,14 @@
      (reduce
       (fn [a [gi items]]
         (conj a (ui-list-group-item
-                 {:text (or  gi (or nil-text "не указано")) :badge (count items)
+                 {:text (or gi nil-text) :badge (count items)
                   :type (if (nil? gi) :warning :default)})))
       [(ui-list-group-item {:text text :active? true :badge (count points)})]
       items))))
+
+
+
+


Change "pyin" to execute-content.

Change "pyin" to execute-content.

Preps for protocol version 5.0.

--- src/ipython_clojure/core.clj
+++ src/ipython_clojure/core.clj
@@ -196,7 +196,8 @@
         (swap! execution-count inc)
         (send-message iopub-socket "status" (status-content "busy")
                       parent-header {} session-id signer)
-        (send-message iopub-socket "pyin" (pyin-content @execution-count message)
+        (send-message iopub-socket "execute-content"
+                      (pyin-content @execution-count message)
                       parent-header {} session-id signer)
         (try
           (let [s# (new java.io.StringWriter) [output results]


util/date.clj: prevent NullPointerException on empty string in format-long-date

--- src/org/altlaw/util/date.clj
+++ src/org/altlaw/util/date.clj
@@ -17,7 +17,7 @@
       "Converts a String date from YYYY-MM-DD format to
       'January 1, 2009' format."
       [string]
-      (when string
+      (when (seq string)
         (str (.format *long-date-format*
                       (.parse *iso-date-format* string
                               (ParsePosition. 0))


Remove unused import

Remove unused import

--- src/ktra_indexer/handler.clj
+++ src/ktra_indexer/handler.clj
@@ -9,7 +9,7 @@
             [immutant.web.middleware :refer [wrap-development]]
             [selmer.parser :refer :all]
             [cheshire.core :refer [parse-string]]
-            [buddy.auth :refer [authenticated? throw-unauthorized]]
+            [buddy.auth :refer [authenticated?]]
             [buddy.auth.backends.session :refer [session-backend]]
             [buddy.auth.middleware :refer [wrap-authentication
                                            wrap-authorization]]


lose superfluous fn

lose superfluous fn

--- src/main/clojure/org/dada/core.clj
+++ src/main/clojure/org/dada/core.clj
@@ -392,11 +392,6 @@
 ;; TODO: count, average (sum/count), mean, mode, minimum, maximum - min/max more tricky, need to carry state
 ;;----------------------------------------

-(defn make-reducer
-  [#^String name-prefix #^Object reduction-key #^Collection key-values #^Reducer$Strategy strategy #^Metadata tgt-metadata name-fn]
-  (let [view-name (str name-prefix "." (name-fn reduction-key))]
-    (Reducer. view-name tgt-metadata key-values strategy)))
-
 ;; sum specific stuff - should be in its own file

 ;; TODO - should just be a class, not a fn - but then we wouldn't be able to compile this file
@@ -438,8 +433,8 @@
    (do-reduce-sum model attribute-key attribute-type attribute-value (sum-reducer-metadata :key attribute-type)))
   ([#^Model model #^Keyword attribute-key attribute-type attribute-value #^Metadata tgt-metadata]
    (let [strategy (make-sum-reducer-strategy attribute-key (.getMetadata model) tgt-metadata)
-	 view-name-fn #(str "sum(" % ")")
-	 reducer (make-reducer (.getName model) attribute-key [attribute-value] strategy tgt-metadata view-name-fn)]
+	 value-name (str "sum(" attribute-key ")")
+	 reducer (Reducer. (str (.getName model) "." value-name) tgt-metadata [attribute-value] strategy)]
      (connect model reducer)))
   )

@@ -470,9 +465,10 @@
 ;TODO - pass plural values all way through

 (defn do-reduce-count [#^Model model #^Collection values #^Metadata tgt-metadata count-key]
-  (let [strategy (make-count-reducer-strategy (.getMetadata model) tgt-metadata)
+  (let [value-name (str "count(" (or count-key "") ")")
+	strategy (make-count-reducer-strategy (.getMetadata model) tgt-metadata)
 	view-name-fn (fn [arg] "count()")]
-    (make-reducer (.getName model) count-key values strategy tgt-metadata view-name-fn)))
+    (Reducer. (str (.getName model) "." value-name) tgt-metadata values strategy)))

 ;;----------------------------------------
 ;; refactored to here


fix setting team docs to read-only

fix setting team docs to read-only

--- src/pc/http/sente.clj
+++ src/pc/http/sente.clj
@@ -516,7 +516,8 @@
   (let [doc-id (-> ?data :document/id)
         cust (-> req :ring-req :auth :cust)
         ;; XXX: only if they try to change it to private
-        _ (assert (contains? (:flags cust) :flags/private-docs))
+        _ (assert (or (:document/team (doc-model/find-by-id (:db req) doc-id))
+                      (contains? (:flags cust) :flags/private-docs)))
         ;; letting datomic's schema do validation for us, might be a bad idea?
         setting (-> ?data :setting)
         annotations {:transaction/document doc-id


Use dummy function in defgame as well

Use dummy function in defgame as well

--- src/play_clj/core.clj
+++ src/play_clj/core.clj
@@ -51,9 +51,10 @@
   `(defonce ~name (defscreen* ~options)))

 (defn defgame*
-  [{:keys [on-create]}]
+  [{:keys [on-create]
+    :or {on-create dummy}}]
   (proxy [Game] []
-    (create [] (when on-create (on-create this)))))
+    (create [] (on-create this))))

 (defmacro defgame
   [name & {:keys [] :as options}]


Fix `chain'` variant to use properly `then'`.

--- src/promesa/core.cljc
+++ src/promesa/core.cljc
@@ -194,8 +194,8 @@
   "Chain variable number of computations to be executed serially. Unlike
   `chain` does not flattens the return value of each step (probably
   this is more performant than `chain`)."
-  ([p f] (then p f))
-  ([p f & fs] (reduce #(then %1 %2) p (cons f fs))))
+  ([p f] (then' p f))
+  ([p f & fs] (reduce #(then' %1 %2) p (cons f fs))))

 (defn catch
   "Catch all promise chain helper."


Update crux example app with new put api

--- examples/juxt.crux.demo/src/juxt/crux/demo/foo.clj
+++ examples/juxt.crux.demo/src/juxt/crux/demo/foo.clj
@@ -28,8 +28,7 @@
        (fn [ctx]
          (crux.api/submit-tx
            system
-           [[:crux.tx/put id
-             (merge {:crux.db/id id} (:body ctx))]])
+           [[:crux.tx/put (merge {:crux.db/id id} (:body ctx))]])
          (yada/redirect ctx ::read-write))}}}))

 ;; To populate data using cURL:


testing

testing

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

--- plugins/SlideExplorer2/src/slide_explorer/canvas.clj
+++ plugins/SlideExplorer2/src/slide_explorer/canvas.clj
@@ -331,9 +331,9 @@
               :join :bevel
               :miter-limit 10.0}}]
    [:text
-    {:x 180 :y 120 :text "Testing..."
-     :color :blue
-     :alpha 0.4
+    {:x 180 :y 120 :text "Testing!!!"
+     :color :white
+     :alpha 0.7
      :rotate 0.2
      :scale 1.1
      :fill true
@@ -344,10 +344,23 @@
             :underline false
             :strikethrough false
             :size 60}}]
+   (comment
+   [:ellipse
+    {:x 350 :y 350 :w 40 :h 40 :fill true :color :pink
+     :stroke nil}]
+   [:ellipse
+    {:x 350 :y 350 :w 40 :h 40 :fill false :color :red
+     :stroke {:width 4}}]
+   [:line
+    {:x 350 :y 350 :w 18 :h 18 :fill false :color :white :alpha 0.8
+     :stroke {:width 7 :cap :butt}}]
+   [:line
+    {:x 350 :y 350 :w -18 :h 18 :fill false :color :white :alpha 0.8
+     :stroke {:width 7 :cap :butt}}]
    [:line
     {:x 180 :y 220 :w 0 :h 50 :color :red
      :stroke {:width 10 :cap :round}
-     :alpha 0.7}]
+     :alpha 0.7}])
    [:line
     {:x 180 :y 220 :w 30 :h 0 :color 0x00AA00
      :alpha 0.6


replace middleware.clj to ring-transit

replace middleware.clj to ring-transit

--- src/om_next_leaflet/middleware.clj
+++ src/om_next_leaflet/middleware.clj
@@ -1,96 +0,0 @@
-(ns om-next-leaflet.middleware
-  (:require [ring.util.response :refer :all]
-            [cognitect.transit :as transit])
-  (:import [java.io ByteArrayOutputStream]))
-
-(defn- write [x t opts]
-  (let [baos (ByteArrayOutputStream.)
-        w    (transit/writer baos t opts)
-        _    (transit/write w x)
-        ret  (.toString baos)]
-    (.reset baos)
-    ret))
-
-(defn- transit-request? [request]
-  (if-let [type (:content-type request)]
-    (let [mtch (re-find #"^application/transit\+(json|msgpack)" type)]
-      [(not (empty? mtch)) (keyword (second mtch))])))
-
-(defn- read-transit [request {:keys [opts]}]
-  (let [[res t] (transit-request? request)]
-    (if res
-      (if-let [body (:body request)]
-        (let [rdr (transit/reader body t opts)]
-          (try
-            [true (transit/read rdr)]
-            (catch Exception ex
-              [false nil])))))))
-
-(def ^{:doc "The default response to return when a Transit request is malformed."}
-default-malformed-response
-  {:status 400
-   :headers {"Content-Type" "text/plain"}
-   :body "Malformed Transit in request body."})
-
-(defn wrap-transit-body
-  "Middleware that parses the body of Transit request maps, and replaces the :body
-  key with the parsed data structure. Requests without a Transit content type are
-  unaffected.
-  Accepts the following options:
-  :keywords?          - true if the keys of maps should be turned into keywords
-  :opts               - a map of options to be passed to the transit reader
-  :malformed-response - a response map to return when the JSON is malformed"
-  {:arglists '([handler] [handler options])}
-  [handler & [{:keys [malformed-response]
-               :or {malformed-response default-malformed-response}
-               :as options}]]
-  (fn [request]
-    (if-let [[valid? transit] (read-transit request options)]
-      (if valid?
-        (handler (assoc request :body transit))
-        malformed-response)
-      (handler request))))
-
-(defn- assoc-transit-params [request transit]
-  (let [request (assoc request :transit-params transit)]
-    (if (map? transit)
-      (update-in request [:params] merge transit)
-      request)))
-
-(defn wrap-transit-params
-  "Middleware that parses the body of Transit requests into a map of parameters,
-  which are added to the request map on the :transit-params and :params keys.
-  Accepts the following options:
-  :malformed-response - a response map to return when the JSON is malformed
-  :opts               - a map of options to be passed to the transit reader
-  Use the standard Ring middleware, ring.middleware.keyword-params, to
-  convert the parameters into keywords."
-  {:arglists '([handler] [handler options])}
-  [handler & [{:keys [malformed-response]
-               :or {malformed-response default-malformed-response}
-               :as options}]]
-  (fn [request]
-    (if-let [[valid? transit] (read-transit request options)]
-      (if valid?
-        (handler (assoc-transit-params request transit))
-        malformed-response)
-      (handler request))))
-
-(defn wrap-transit-response
-  "Middleware that converts responses with a map or a vector for a body into a
-  Transit response.
-  Accepts the following options:
-  :encoding - one of #{:json :json-verbose :msgpack}
-  :opts     - a map of options to be passed to the transit writer"
-  {:arglists '([handler] [handler options])}
-  [handler & [{:as options}]]
-  (let [{:keys [encoding opts] :or {encoding :json}} options]
-    (assert (#{:json :json-verbose :msgpack} encoding) "The encoding must be one of #{:json :json-verbose :msgpack}.")
-    (fn [request]
-      (let [response (handler request)]
-        (if (coll? (:body response))
-          (let [transit-response (update-in response [:body] write encoding opts)]
-            (if (contains? (:headers response) "Content-Type")
-              transit-response
-              (content-type transit-response (format "application/transit+%s; charset=utf-8" (name encoding)))))
-          response)))))