2014-01-28から1日間の記事一覧
昨日ミスってたので忘れないように張り付け。 JSで if(hoge) とかで評価したときに falseと判定される値は、 false undefined null 0 NaN ''
よく忘れるのでメモ。 SET GLOBAL general_log = 'ON'; show variables like '%general_log%';
node.js におけるエラー処理のコーディングパターン (もしくは非同期 JavaScript における例外処理) http://d.hatena.ne.jp/kazuhooku/20120420/1334891656 繰り返しますが、「全ての」コールバックの第1引数を error にすることが重要です。 了解です。
もうこれなしでは生きられないunderscore.js. 今日は filter を使っているのを見かけた。 filter_.filter(list, iterator, [context]) Alias: select Looks through each value in the list, returning an array of all the values that pass a truth test (…
今月末と来月末の時間を取得する処理を書くときに非常に助かったライブラリ。 https://github.com/kidooom/node_test/blob/master/momentTest.jsこんな感じで今日は使った。 var moment = require('moment'); // 今のunixTime console.log(moment().unix());…