(defn fetch-url[address] | |
(with-open [stream (.openStream (java.net.URL. address))] | |
(let [buf (java.io.BufferedReader. | |
(java.io.InputStreamReader. stream))] | |
(apply str (line-seq buf))))) | |
(fetch-url "http://google.com") |
-
git stash, then git stash pop
-
git commit --amend
-
git checkout -
-
コンフリクトのとき動作がう?
====
-
git add -p
(ns gannet.components.result-table | |
(:require [reagent.core :as r] | |
[gannet.style :as style] | |
[cljsjs.fixed-data-table])) | |
(enable-console-print!) | |
(def Table(r/adapt-react-class js/FixedDataTable.Table)) | |
(def Column (r/adapt-react-class js/FixedDataTable.Column)) | |
(def Cell (r/adapt-react-class js/FixedDataTable.Cell)) |
'use strict'; | |
import { scaleOrdinal, schemeCategory20c } from 'd3-scale'; | |
import React from 'react'; | |
module.exports = React.createClass({ | |
displayName: 'BarChart', | |
propTypes: { |
const not = fn => x => !fn(x) | |
const some = x => x != null | |
const notAtAll = x => !some(x) | |
// or | |
const notAtAll = x => not(some) |
This is not a introduction post to Clojure transducer. Instead there are a lots of great introduction post out there. This post aims to clarify the greatness of transduer. In the introduction blog, this is how they describe:
Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the essence of the transformation in terms of an individual element. Because transducers are decoupled from input or output sources, they can be used in many different processes - collections, streams, channels, observables, etc. Transducers compose directly, without awareness of input or creation of intermediate aggregates.
This post will help you understand the above statement.
For me transducer does 2 great things
- Parallel process
- Independence input source, therefore reuseable
Gisty testing |
("AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA |
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |