Cron is a common solution for recurring jobs, but it has a confusing syntax. In this episode I show you how to use Whenever to create cron jobs using Ruby. Some alternative scheduling solutions are also mentioned.
CreditCard = cleanNumber: (number) -> number.replace /[- ]/g, "" validNumber: (number) -> total = 0 number = @cleanNumber(number) for i in [(number.length-1)..0] n = +number[i] if (i+number.length) % 2 == 0 n = if n*2 > 9 then n*2 - 9 else n*2 total += n total % 10 == 0 jQuery -> $("#order_credit_card_number").blur -> if CreditCard.validNumber(@value) $("#credit_card_number_error").text("") else $
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く