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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
value: null, | |
actions: { | |
change(e) { | |
return True; | |
} | |
} | |
}); |
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
# relevant code is at https://github.com/orestis/adventofcode/blob/master/2016/day11/lib/day11.ex | |
$ elixir -pa _build/MIX_ENV/consolidated -S mix profile.fprof --callers -e "Day11.solve" | |
... | |
<snip> | |
... | |
End of trace! | |
Processing data... | |
Creating output... |
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
;; Stream.iterate(0, &(&1 + 1)) | |
;; |> Enum.take(5) | |
;; gives us [0, 1, 2, 3, 4] | |
(take 5 (iterate #(+ % 1) 0)) | |
;; => (0 1 2 3 4) | |
;; Mandelbrot | |
;; defmodule Mandelbrot do |
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 scratch | |
(:require [clojure.string :as str])) | |
(defn csv-split [line] | |
(str/split line #",")) | |
(defn replace-col [cols idx s] | |
(map-indexed (fn [i x] (if (= i idx) s x)) cols)) | |
(defn index-of [coll value] |
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 hooks-store | |
(:require ["react" :as react] | |
["react-dom" :as react-dom])) | |
(defprotocol IStore | |
(-trigger-subs [this old-state new-state]) | |
(-get-value [this selector]) | |
(destroy [this]) |
OlderNewer