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
| (defn show-lookup [path] | |
| (->> (scandir path) | |
| (r/filter is-file?) | |
| (r/filter has-video-extension?))) |
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 joy.unit-testing | |
| (:require [joy.futures :as joy])) | |
| (def stubbed-feed-children | |
| (constantly [{:content [{:tag :title | |
| :content ["Stub"]}]}])) | |
| (defn count-feed-entries [url] | |
| (count (joy/feed-children url))) |
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
| var Template = { | |
| compile: function(string, builder) { | |
| var rootNode = $(string); | |
| var map = {}; | |
| rootNode.find("[data-binding]").each(function () { | |
| var el = $(this); | |
| var bindingName = el.data("binding"); | |
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
| var Template = { | |
| compile: function(string, builder) { | |
| var rootNode = $(string); | |
| var map = {}; | |
| rootNode.find("[data-binding]").each(function () { | |
| var el = $(this); | |
| var bindingName = el.data("binding"); | |
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
| var templateString = $("#person-template").html(); |
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
| <script type="x-template" id="person-template"> | |
| <div> | |
| <div>Name: <span data-binding="name"></span></div> | |
| <div>Email: <span data-binding="email"></span></div> | |
| </div> | |
| </script> |
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
| (def frozen-pizza-recipe | |
| {:title "Frozen Pizza" | |
| :steps #_ ?}) |
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
| (def frozen-pizza-recipe | |
| {:title "Frozen Pizza" | |
| :steps [{:at 600 :message "put the pizza in!"} | |
| {:at 1320 :message "pizza ready, take it out!"}]}) |
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 travel-buddy.core | |
| (:require [liberator.core :refer [resource defresource]] | |
| [liberator.dev :refer [wrap-trace]] | |
| [ring.middleware.params :refer [wrap-params]] | |
| [ring.adapter.jetty :refer [run-jetty]] | |
| [compojure.core :refer [defroutes ANY]] | |
| [hiccup.core :refer [html]])) | |
| (def home-template | |
| [:html |
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") | |
| (defelem cell-input [{:keys [cell] :as attrs}] | |
| (let [target-value #(do! (-> % .-currentTarget) :value)] | |
| (input :type (:type attrs "text") | |
| :value cell | |
| :on-input #(reset! cell (target-value %))))) | |
| (defn form-input | |
| ([& {:keys [validator] :or {validator (fn [_] true)}}] |