こんにちは。今回は現実逃避を兼ねて Jade の素晴らしさをお伝えしたいと思います。
[Jade][0] は JST (JavaScript Templates) の一つであり、HTML を書くための[軽量マークアップ言語][1] である [Haml][2] に影響を受けた JavaScript テンプレートエンジンでもあります。
curl http://monoroch.net/kinshi/kinshi.csv | nkf -u | grep '^"' | ruby -lane 'puts $_.split(/,/)[0].scan(/"(.+)"/)[0]' | sort | uniq |
function getRelativeTime(baseDateStr, targetDateStr){ | |
var baseDate = new Date(baseDateStr); | |
var targetDate = new Date(targetDateStr); | |
var elapsedTime = Math.ceil((baseDate.getTime() - targetDate.getTime())/1000); | |
var message = null; | |
// これ以下で一定時間未満のごとのメッセージの表示方法を条件分岐 |
public class Penis { | |
public static void main (String[] args) { | |
int n = 0; | |
while (n <= 1000) { | |
System.out.println("チンポ"); | |
n++; | |
} | |
} | |
} |
##レベルについて
現在のレベルの変数をlevelとすると、次のレベルまでの総ポイント数(nextPoint)は
nextPoint = (level+1)*7*level/2+1;
で与えられます。何でこんな仕様にしたかはわかりません。遥か昔に忘れました。
つまり、例えば現在2Lvでおひるねポイントが9の場合は、(2+1)72/2+1=22なので、あと13ポイントで3Lvに見事レベルアップ、というわけです。
##おひるねできる時間と獲得ポイントについて
BITS 32 | |
mov eax, 4 | |
mov ebx, 1 | |
push 0x0a21646c | |
push 0x726f576f | |
push 0x6c6c6548 | |
mov ecx, esp | |
mov edx, 12 | |
int 0x80 |
#はるアイコンMOD鯖 ##現状 ###バージョン等
###前提MOD
###MODリスト初版作成 @lastarrow21 初期リスト
# -*- encoding: utf-8 -*- | |
require 'rubygems' | |
require 'tweetstream' | |
require 'twitter' | |
require 'prime' | |
require 'date' | |
require './key.rb' | |
Twitter.configure do |config| | |
config.consumer_key = Const::CONSUMER_KEY |
# -*- encoding: utf-8 -*- | |
n = 0 | |
input = gets.to_i | |
while n < input do | |
print "「" | |
print "てら" | |
n.times do | |
print "あり" | |
end | |
print "w」" |
require "cgi" | |
Plugin.create(:mikutter_update_name) do | |
on_mention do |s, msgs| | |
msgs.each do |m| | |
if CGI.unescapeHTML(m.message.to_s) =~ /\A@#{Service.primary.user} update_name (.+)\z/ | |
n = $1 | |
(Service.primary/"account/update_profile").message(name: n) | |
Service.primary.post(message: ".@#{m.message.user} さんにより名前が #{n.inspect} に変更されました") | |
end |