昔の JSON は Object か Array しかルートに書けなかったけど RFC 7159 では true/false/null/number/string を書けるようになってて便利だっておじいちゃんが言ってました。 https://tools.ietf.org/html/rfc4627 https://tools.ietf.org/html/rfc7159
brew install valgrind qcachegrindとしてインストール。 valgrind --tool=callgrind ./kiji -e '(-> $n { say($n) })(4)'でプロファイルとって、 qcachegrind callgrind.out.92249とすると こういう風にみれてよい。
(この記事は Node.js アドベントカレンダー不参加記事です) チャットサーバー的な使い方とか意外とみんな興味なくて、普通のウェブアプリケーションなどをかく、という用途にちょっと node.js がつかえたらいいのにな、とおもっている人がおおいようにかんじています。Node.js が人気なのは、v8 をうまくパッケージングしているのが node.js ぐらいで、そして v8 をうまくパッケージングするのが結構めんどくさいから、というところが大きいのです。ぶっちゃけ node.js が〜 とさわいでる人のうち8割は I/O multiplexing だからとかそういう理由で支持しているわけではなかったりするのです(偏見)。 さて、普通の web application のようなものを書こうとしたときに Node.js って基本シングルスレッドだし、なんかうっかり重い処理したときにどうした
http://chalow.net/2011-04-02-1.html にかいてあるものを node.js にしてみた。 HTTPのリクエストには https://github.com/driverdan/node-XMLHttpRequest を使用。node.js の HTTP クライアントライブラリは Furl::HTTP とおなじぐらい低レベルなので、ラッパーをかませないととてもつかえない。 var sys = require('sys'); var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; var APPID = 'APPID'; var URL = 'http://setsuden.yahooapis.jp/v1/Setsuden/latestPowerUsage?appid=' + APPID; va
Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at
Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at
Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く