Confusion around om functionality
(defn static-data []
(for [row (range 10)]
{:a "some" :b "fake" :c "data"}))
(def app-state (atom {:items (static-data)}))
;;; components
- hosts: all | |
tasks: | |
- file: dest="~/foo/bar" content="baz" | |
# usage: ansible-playbook test.yaml -i localhost, -c local | |
# says ok, but | |
# cat ~/foo/bar |
Confusion around om functionality
(defn static-data []
(for [row (range 10)]
{:a "some" :b "fake" :c "data"}))
(def app-state (atom {:items (static-data)}))
;;; components
use std::fmt::Default; | |
enum List<T> { | |
Cons(T, ~List<T>), | |
Nil | |
} | |
fn cons<T>(x: T, xs: List<T>) -> List<T> { | |
Cons(x, ~xs) | |
} |
fn gen_closure(x: int) -> proc(int) -> int { | |
return proc(y: int) { x * y }; | |
} | |
fn main() { | |
println!("{}", gen_closure(2)(3)) | |
} | |
// 6 |
; egghead@thoth: ~/projects/clojure/async | |
; ~> time lein run | |
; => lein run 7.29s user 0.60s system 114% cpu 6.888 total | |
; egghead@thoth: ~/projects/clojure/async | |
; ~> cat output.txt | wc -l | |
; => 97 | |
; egghead@thoth: ~/projects/clojure/async | |
; ~> cat src/async/core.clj | |
(ns async.core | |
(:require [clojure.core.async :refer (chan go-loop <! >!!)]) |
input { | |
generator {} | |
} | |
filter { | |
metrics { | |
meter => "events" | |
add_tag => "metric" | |
} | |
} |
function template(href, text) { | |
return ['<a href="', href, '" target="_blank">', text, "</a>"].join(''); | |
} | |
Running "nodeunit:files" (nodeunit) task | |
Testing linkify_test.js.............................F........... | |
>> test.com/"/onmouseover="alert(document.cookie) | |
>> Error: false == true | |
>> at Object.tests.(anonymous function) (tests/linkify_test.js:85:10) |
Running "jshint:all" (jshint) task | |
Linting routes/index.js ...ERROR | |
[L13:C5] W033: Missing semicolon. | |
}) | |
Linting routes/index.js ...ERROR | |
[L132:C19] W117: 'req' is not defined. | |
ip: req.connection.remoteAddress, | |
Linting routes/index.js ...ERROR | |
[L133:C28] W117: 'req' is not defined. | |
fingerprint: req.body.fingerprint, |
31 Oct 2013 11:45:08,436 WARN [lifecycleSupervisor-1-2] (org.apache.flume.channel.file.Log.replay:442) - Checkpoint may not have completed successfully. Forcing full replay, this may take a while. | |
org.apache.flume.channel.file.BadCheckpointException: Configured capacity is 100000000 but the checkpoint file capacity is 1000000. See FileChannel documentation on how to change a channels capacity. | |
at org.apache.flume.channel.file.EventQueueBackingStoreFile.<init>(EventQueueBackingStoreFile.java:100) | |
at org.apache.flume.channel.file.EventQueueBackingStoreFileV3.<init>(EventQueueBackingStoreFileV3.java:49) | |
at org.apache.flume.channel.file.EventQueueBackingStoreFactory.get(EventQueueBackingStoreFactory.java:75) | |
at org.apache.flume.channel.file.Log.replay(Log.java:412) | |
at org.apache.flume.channel.file.FileChannel.start(FileChannel.java:301) | |
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251) | |
at java.util.concurr |
function proxy(methodName) { | |
return function(s) { | |
return s[methodName].apply(this, arguments); | |
} | |
} | |
console.log([1,2,3].map(proxy("toString"))); |