2007-05-15から1日間の記事一覧

キーイベントハンドルのsnippet

LDRをパクった参考にした。 とりあえず、IE/FF/Operaで動作確認。MacとSafariは不明。 Firefoxの「キー入力時に検索を開始する」はstop_eventで抑止。 <html> <head> <script> function add_event(obj, type, handler, flag) { function handler_wrapper(e) { e = e || event; re</head></html>…

Search Plus!: viっぽいキーバインドにしてみた

WEB

http://storehouse.quickvps.net/search_plus/search?query=ruby+Array

Nora: バグかなぁ…

web/controller/simple.rbの次のコードでエラー。 121| when :flag 122| case value.trim.downcase 123| when /\A(?:on|yes|y|true|1)\z/ とりあえず、trim→stripに修正。 あとで作者の人に問い合わせてみよう。

Nora: セッションID

#!/usr/local/ruby-1.8/bin/ruby require 'web' api = Web::Interface::AUTO.new api.each {|req| rsp = Web::Response.new rsp.content_type = 'text/plain' api.get_session_id(req) rsp << req.session_id.value req.session_id = 'xxxxx' api.set_sessio…

Nora: セッションの永続化まわり

polystate.rbを参考にして。 #!/usr/local/ruby-1.8/bin/ruby require 'web' $stdout.binmode api = Web::Interface::AUTO.new api.each {|req| rsp = Web::Response.new rsp.content_type = 'text/plain' rsp << "Hello World!\n" persistent_id = req.cook…