This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(page "index.html") | |
;; --------------- | |
;; View cell | |
;; | |
;; A view cell is a type of formula cell that only uses lookup operations. | |
;; This allows it to stay updatable (unlike other formula cells) | |
;; It is defined by calling `view-cell` with the root and a path. | |
;; The path is a vector of keys or indexes, as used in assoc-in, or update-in | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns hoplon.dimple.chart | |
(:require-macros [tailrecursion.javelin :refer [cell=]]) | |
(:require [cljsjs.dimple])) | |
(def chart-types | |
{:line js/dimple.plot.line | |
:area js/dimple.plot.area | |
:bubble js/dimple.plot.bubble | |
:bar js/dimple.plot.bar}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; currently anonymous record types are not supported by postgres/jdbc | |
;; however, it is possible to create a custom type and query using that | |
CREATE TYPE some_composite_key AS (first_id UUID,second_id TEXT); | |
;; implement jdbc/ISQLValue | |
(defrecord SomeCompositeKey [first_id second_id] | |
jdbc/ISQLValue | |
(sql-value [_] | |
(doto (PGobject.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojure-sql-demo | |
(:require [clojure-sql.core :as sql]) ;;[clojure-sql "0.2.0-SNAPSHOT"] | |
(def user-emails | |
(-> (sql/table :user_email_history) | |
(sql/project {:email :user_email_history.email | |
:user_id :user_email_history.user_id | |
:email_request_id :user_email_history.email_request_id}))) | |
(def users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; [ WITH [ RECURSIVE ] with_query [, ...] ] | |
;; SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] | |
;; * | expression [ [ AS ] output_name ] [, ...] | |
;; [ FROM from_item [, ...] ] | |
;; [ WHERE condition ] | |
;; [ GROUP BY expression [, ...] ] | |
;; [ HAVING condition [, ...] ] | |
;; [ WINDOW window_name AS ( window_definition ) [, ...] ] | |
;; [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ] | |
;; [ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/planck | |
(ns eqt.core | |
(:require [cljs.pprint :refer [pprint]] | |
[cljs.reader :as edn] | |
[planck.core :as planck] | |
[clojure.string :as string] | |
[cognitect.transit :as transit])) | |
(->> (repeatedly planck/read-line) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/planck | |
(ns eq.core | |
(:require [cljs.pprint :refer [pprint]] | |
[cljs.reader :as edn] | |
[planck.core :as planck] | |
[clojure.string :as string])) | |
(->> (repeatedly planck/read-line) | |
(take-while identity) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-----------------------+--------------------------------+-----------------------+---------------------------------+-------------------------+ | |
| \ To | Reagent Component | Reagent Hiccup Vector | React Component | React Element | | |
| From \ | | | | | | |
|-----------------------+--------------------------------+-----------------------+---------------------------------+-------------------------| | |
| Reagent Component | identity | | reagent.core/reactify-component | | | |
|-----------------------+--------------------------------+-----------------------+---------------------------------+-------------------------| | |
| Reagent Hiccup Vector | | identity | | reagent.core/as-element | | |
|---------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-----------------------+--------------------------------+-----------------------+---------------------------------+-------------------------+ | |
| \ To | Reagent Component | Reagent Hiccup Vector | React Component | React Element | | |
| From \ | | | | | | |
|-----------------------+--------------------------------+-----------------------+---------------------------------+-------------------------| | |
| Reagent Component | identity | | reagent.core/reactify-component | | | |
|-----------------------+--------------------------------+-----------------------+---------------------------------+-------------------------| | |
| Reagent Hiccup Vector | | identity | | reagent.core/as-element | | |
|---------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.graphql | |
(:require [om.next :as om] | |
[clojure.string :as str] | |
[clojure.set :as set])) | |
(defn graphql-type [v] | |
(cond | |
(string? v) "String" | |
(int? v) "Int" | |
(float? v) "Float" |
OlderNewer