This file contains 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 style-sheet) | |
(def ReactNative (js/require "react-native")) | |
(defn platform-style | |
[style-map & addl] | |
(let [platform (-> (.. ReactNative -Platform -OS) keyword)] | |
(cond-> style-map | |
(contains? style-map platform) (-> | |
(merge (get style-map platform)) | |
(dissoc platform)) |
This file contains 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
{:db/id #db/id[:db.part/db] | |
:db/ident :createWithComposedID | |
:db/fn #db/fn {:lang "clojure" | |
:params [db m compose-assoc existing-assoc parent-ident] | |
:code (let [parent (d/entity db parent-ident) | |
newRecord (merge m {:db/id (d/tempid :db.part/user) | |
compose-assoc (str (:db/id parent) ":" (existing-assoc m))})] | |
[new-record])}} |
This file contains 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
(require '[secretary.core :refer-macros [defroute]] | |
'[om.next :as om :refer-macros [defui]] | |
'[om.dom :as dom]) | |
(def app-state {:routing {:routing/name :home :routing/id ""} | |
:persons [{:id 1 :person/name "Test 1"} | |
{:id 2 :person/name "Test 3"}]}) | |
(defn update-route [location id] | |
(om/transact! reconciler |
This file contains 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 respond-ajax | |
(:require [io.pedestal.interceptor :as interceptor] | |
[cheshire.core :as json]) | |
(defn base-response [content-type status] | |
{:status (or status 200) | |
:headers {"Content-type" content-type}}) | |
(defmulti generate-response :content-type) |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace CalculateXNPV | |
{ | |
class Calculate | |
{ | |
IEnumerable<DateTime> dates; |