タグ

2007年8月31日のブックマーク (4件)

  • Perl&CGI最強講座 [smart]

    indexは、第1引数STRの先頭から第2引数SUBSTRが最初に見つかった位置を返します。 第3引数 POSITIONで検索する位置を指定することもできます。第3引数POSITIONには最初の文字を 0 として指定します。 返却値は 0、もしくは変数$[に設定した値です。SURSTRが見つからなかった場合は -1 を返します。 indexの使い方 $str = "How you always hurt the one you love."; print index($str,'you'); > 4

    Perl&CGI最強講座 [smart]
  • IO::Pollでcometなチャットサーバを書いてみた - 遥かな時代の階段を

    perl側 #!/usr/bin/perl use strict; use warnings; use IO::Socket; use IO::Poll qw( POLLIN POLLOUT POLLHUP POLLERR ); use Data::Dumper; use HTTP::Request; use CGI; my $_timeout = 15; $SIG{ALRM} = \&timeout; alarm($_timeout); my $port = shift || 3000; my $server = IO::Socket::INET->new( LocalPort => $port, Listen => 10, Reuse => 1, ) or die $@; my $poll = IO::Poll->new(); $poll->mask( $server => POLLI

    IO::Pollでcometなチャットサーバを書いてみた - 遥かな時代の階段を
  • Play the Petals Around the Rose game (JavaScript)

    Play Petals Around the Rose The name of the game is Petals Around the Rose. The name of the game is important. The computer will roll five dice and ask you to guess the score for the roll. The score will always be zero or an even number. Your mission is to work out how the computer calculates the score and become a Potentate of the Rose. Instructions: Click on "Roll Dice" to start the game. Type i

  • HTMLソースを隠す方法

    株式会社プランセスの全面協力の元、HTML暗号化ソフト「SHTML」を2005年7月11日にリリースしました。 Javascriptの知識が全くない方でも利用可能なように設計されています。最短ステップの場合、暗号化したいソースを貼り付けて、「暗号化する」ボタンをクリックするだけです!! 右クリック禁止+ソースの暗号化+印刷禁止+テキスト選択禁止・・・が今までにないほど簡単に!! (サンプル): オリジナル: 株式会社プランセスのメインページ 暗号化したページ: こちら * 画像保護機能を体感してもらうために、敢えて右クリック禁止機能を解除したページ (右クリックして画像を保存しようとしても無色のダミー画像しか保存できません。) HTMLソースを他人に見られたくない。HTMLソースについて、「他人(人間)には意味不明もしくは無意味な文字列でありながらブラウザにはしっかりと解釈してもらいたい」