var xhr = new XMLHttpRequest();
// undefined
xhr.open('POST', 'http://localhost:4000/', true);
// undefined
xhr.onreadystatechange = function (a){console.log(a);}
// function (a){console.log(a);}
xhr.send('{"a":"b"}');
// undefined
// XMLHttpRequest cannot load http://localhost:4000/. Origin http://d.hatena.ne.jp is not allowed by Access-Control-Allow-Origin```
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 init [] | |
(def main (goog.dom/getElement "main")) | |
(def mydiv (goog.dom/createDom "div")) | |
(goog.dom/appendChild main mydiv) | |
(defn change-color-mydiv [] | |
(... mydiv))) |
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
text-shadow: 0 1px 0 rgba(255,255,255,0.4),0 0 5px rgba(0,0,0,0.1); |
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
(defmulti foo (fn [x] x)) | |
;=> #<[object Object]> | |
(defmethod foo ::a [x] "a!") | |
;=> #<[object Object]> | |
; Hierarchy setting | |
(derive ::a1 ::a) | |
;=> nil | |
; works well |
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
; http://d.hatena.ne.jp/anton0825/20101229/1293213099 | |
; 大体そのまま移植しただけ | |
; dfs なのにstackを用意していないように見えるのは | |
; 言語のstackをstackとして利用しているため。 | |
(defn dfs [k [fs & res] sum] | |
(println sum fs res) | |
(if fs | |
(or (dfs k res (+ fs sum)) | |
(dfs k res sum)) | |
(= sum k))) |
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
a:link { color:#111; text-decoration:none; } | |
a { color:#111; text-decoration:none; } | |
a:visited { color:#828282; text-decoration:none; } | |
@basic-background-color: #fdfdfd; | |
@basic-font-color: black; | |
@subtext-font-color: #828282; | |
@default-font-family: "メイリオ",Meiryo,"Meiryo UI","Segoe UI","ヒラギノ丸ゴ Pro W4",HiraMaruPro-W4,"Hiragino Maru Gothic Pro","ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro",Osaka,"MS Pゴシック","MS PGothic",Merriweather,Verdana,Helvetica,Arial,Sans-Serif; | |
body { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="style.less" rel="stylesheet/less" type="text/css"> | |
<script src="less-1.2.1.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="wrapper" class="webkit-scrollbar-gray"> | |
<div id="main"> | |
hello |
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 entity->map [convert-data entity] | |
(reduce (fn [m attr] | |
(if (keyword? attr) | |
(if-let [v (attr entity)] | |
(assoc m attr v) | |
m) | |
(let [[attr conv-fn] attr] | |
(if-let [v (attr entity)] | |
(assoc m attr (conv-fn v)) | |
m)))) |
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
set daemon 60 | |
set logfile syslog facility log_daemon | |
set idfile /var/.monit.id | |
set statefile /var/.monit.state | |
set mailserver smtp.gmail.com port 587 | |
username "[email protected]" password "mypassword" | |
using tlsv1 | |
with timeout 30 seconds | |
set alert [email protected] | |
set httpd port 2813 address localhost |
###Datomic Introduction
###Photos credit
- cover(universe) write_adam "IC443, the Jellyfish nebula" CC BY-NC 2.0 http://www.flickr.com/photos/astroporn/5234588981/
- fact(lens) Raymond Larose "No Crop, No Edit" CC BY-NC-ND 2.0 http://www.flickr.com/photos/lenscrack/5165225746/