I hereby claim:
- I am staypufd on github.
- I am staypufd (https://keybase.io/staypufd) on keybase.
- I have a public key ASCXD3EQsLw74ZdDgbVp8a8FSbdsPZTfKXFLm3H65kggqwo
To claim this, I am signing this object:
| // Gist inspired by comment to: | |
| // | |
| // https://medium.com/javarevisited/re-write-this-java-if-else-code-block-or-ill-reject-your-pull-request-953f20c0f544 | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| class Scratch { | |
| // Sample ops and input data for demo below |
| initialize | |
| | sampleCell width height n | | |
| super initialize. | |
| n := self cellsPerSide. | |
| sampleCell := LOCell new. | |
| width := sampleCell width. | |
| height := sampleCell height. | |
| self bounds: (5 @ 5 extent: (width * n) @ (height * n) + (2 * self borderWidth)). | |
| cells := Array2D new: 5 tabulate: [ :i :j | self newCellAt: i at: j]. |
| ```clojure | |
| (ns specialdemo.core | |
| (:require [special.core :refer [condition manage]]) | |
| (:gen-class)) | |
| (defn fizz-buzz [i] | |
| (let [f (fn [n] | |
| (for [i (range n)] | |
| (cond | |
| (and (= (mod i 3) 0) |
I hereby claim:
To claim this, I am signing this object:
| export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7 | |
| MYSQL=/usr/local/mysql/bin | |
| MYBIN=~/bin | |
| export PATH=$PATH:$MYBIN | |
| export PATH=$PATH:$MYSQL | |
| export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH | |
| # Colors |
| http://app.klipse.tech/?container&cljs_in.gist=viebel/69a7c0cdf289bad342fefe82fdeb7179 |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;;; 1. Example of using quicklisp to laod in | |
| ;;; cl-utilities and use one function | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;;; Load in the cl-utilities package | |
| (ql:quickload "cl-utilities") | |
| ;;; Tell the cl-user namespace to use the cl-utilities package |
| ;; Assumes a Datomic DB where an Entity is defined that has attribute | |
| ;; :park.amenity/label of type string. Subsitute your query in place | |
| ;; of this example. | |
| (let [vec-str (->> | |
| (d/q '[:find ?amenity-name | |
| :where [?e :park.amenity/label ?amenity-name]] | |
| (db)) | |
| (sort-by first))] | |
| (doseq [x vec-str] |
| (defn section-button-view [title-and-symbol-vector owner] | |
| (om/component | |
| (sab/html | |
| [:div {:style {:color "black" | |
| :border "1px solid grey" | |
| :border-radius "4px" | |
| :padding "5px" | |
| :margin "5px" | |
| :text-align "center" |
| create table quote ( | |
| id identity, | |
| quotation varchar(1000) not null, | |
| author varchar(100) not null, | |
| ); | |
| insert into quote (quotation, author) values ('The hardest thing in the world to understand is the income tax.', 'Albert Einstein'); | |
| insert into quote (quotation, author) values ('The only thing that interferes with my learning is my education.', 'Albert Einstein'); | |
| insert into quote (quotation, author) values ('I am convinced that He (God) does not play dice.', 'Albert Einstein'); |