凹 [tDiary] ひらがなフィルタ きのうのひらがなフィルタ.超手抜き. module TDiary module Filter class HiraganaFilter < Filter def comment_filter(diary, comment) comment.body =~ /[ぁ-ん]/ ? true : false end end end end # vim: ts=3
第IV部〜テキスト編集を極める!! 正規表現について ●正規表現について 秀丸だけでなく、高度で自由度の高い検索をするには必須の「正規表現」。 ここでは実用上重要な例をとりあげながら、わかりやすく解説します。 今日からあなたの「検索」が変わります。 正規表現に関する話題は、 次の「【0】いんとろだくしょん」に続く 以下の5章から構成されています。 【1】 基本編 〜表記のルールと意味〜 【2】 実践編 〜正規表現による置換の実際〜 【3】 まとめ 【4】 参考文献 【5】 (補足) 秀丸上での複数行にまたがる検索について ※以下の内容は、秀丸ヘルプの「検索系コマンド→検索→正規表現」の 内容についての補足です。 よってヘルプを参照しながら読まれる事を想定して書かれています。 【0】 いんとろだくしょん いきなりですがここでクイズです。
セッションを使うと、ユーザが画面遷移してもユーザ特有の情報を失わないようにできます。 フツー、このセッション情報は、ユーザのクッキーの値と、サーバのセッション情報の値が同じものをつきあわせて、サーバのセッション情報を使います。 ではサーバにはどうやってセッション情報が保存されているかというと、デフォルトではファイルで保存されているそうです。 それをファイルではなくてDBに保存するには、例のレ・レ・レイク(by ジーコ)を使うらしいです。 早速やってみよう! # rake db:sessions:create (in /home/roruser/myApplication) exists db/migrate create db/migrate/001_add_sessions.rb と、migrationファイルができました。 ちょっと中をのぞいでみましょう。 class AddSessi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く