I hereby claim:
- I am rarous on github.
- I am rarous (https://keybase.io/rarous) on keybase.
- I have a public key whose fingerprint is 2E9E BF60 0857 3878 D1BE C8E3 3E72 43AA 6F02 B915
To claim this, I am signing this object:
import Kefir from 'kefir'; | |
import {List, Stack} from 'immutable'; | |
import {comp, filter, map} from 'transducers-js'; | |
function register(stream, messageType, handler) { | |
let xform = comp( | |
filter(x => x.first() === messageType), | |
map(x => x.rest())); | |
stream.transduce(xform).onValue(handler); | |
} |
initialize: function() { | |
_.bindAll(this, 'updateBox'); | |
joint.dia.ElementView.prototype.initialize.apply(this, arguments); | |
this.$box = $(_.template(this.template)()); | |
// FIX: `pointer-events: none` like behavior for IE 10 and older | |
// Prevent "blank:pointerclick" event | |
this.$box.data('view', this); | |
// Propagate events on HTML element to SVG |
(ns joyful-game.game-of-life) | |
(defn neighs [[x y]] | |
(for [dx [-1 0 1] | |
dy [-1 0 1] | |
:when (not (= 0 dy dx))] | |
[(+ x dx) (+ y dy)])) | |
(defn should-be-alive [nc is-alive] | |
(or (= nc 3) |
package cz.tejnora.pokusy; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicInteger; |
I hereby claim:
To claim this, I am signing this object:
private Map<Integer, ? extends Address> getAddressIndex(Optional<SubjectData> currentSubjectData) { | |
return currentSubjectData. | |
map(s -> s.getAddresses().stream(). | |
filter(a -> a.getEsoId() != null). | |
collect(toMap(Address::getEsoId, t -> t))). | |
orElse(emptyMap()); | |
} |
(use 'speclj.core) | |
(require '[clojure.string :as str]) | |
(defn- assert-positives [^String s] | |
(if-let [neg (re-seq #"-\d+" s)] | |
(throw (Exception. (str "Unexpected negative numbers: " (str/join ", " neg)))))) | |
(defn- parse-input [^String s] | |
(if-let [[[_ sep text]] (re-seq #"//(.+)\n(.+)" s)] | |
[text sep] |
"scripts": { | |
"preinstall": "npm install -g grunt-cli bower", | |
"test": "grunt test", | |
"build": "grunt" | |
}, |
(ns piskvorky.core | |
(:require [clojure.string :as s]) | |
(:gen-class)) | |
(defn usage [] | |
(println "Ahoj v piskvorkach naslepo.\nPovolene prikazy jsou:\nnew - nova hra\nquit - konec\n[a-i][0-9] - tah na pole, kde rada je pozice a, b, c, d, e, f, g, h, i. Sloupec je 1 ... az 9.\nformat zapisu je napr. e5\nZacina x")) | |
(defn make-board [] | |
(vec (repeat 9 (vec (repeat 9 :nothing))))) | |
var DeeplyNestedComponent = React.createClass({ | |
contextTypes: { | |
updateStream: React.PropTypes.object | |
}, | |
handleChange: e => { | |
e.preventDefault(); | |
this.context.updateStream.emit(e.target.value); | |
}, | |
// ... | |
}); |