<![CDATA[日本語検索エンジン]]> <![CDATA[日本語検索エンジン]]> http://mim1314.com http://mim1314.com/pic/250-250.JPG http://mim1314.com ja Mim1314.com FREE <![CDATA[ java使用代理访问]]> http://mim1314.com/somewordsdetail/504 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/504 <![CDATA[软件后面缀个RC是什么意]]> http://mim1314.com/somewordsdetail/503 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/503 alpha公测->beta公测->RC版->正式版上市;通常微软的RC版本筛选会经历2-3个过程,也就是说微软会推出RC1、RC2或者RC3的操作系统,而随后就是正式版操作系统上市了,因此通常来看RC1版操作系统已经同最终零售版操作系统相差无几了。 ...]]> <![CDATA[Adobe ActionScript 3.0 * 处理]]> http://mim1314.com/somewordsdetail/502 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/502 <![CDATA[ipa文件的安装方法|iPhone ]]> http://mim1314.com/somewordsdetail/501 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/501 我的音乐->iTunes->Mobile Applications文件夹中,双击.ipa文件将其导入iTunes,然后打开iTunes将此破解文件同步进iPhone即可完成安装。   4.个别玩家可能会在同步中出现不能行的问题,解决方法如下:   删除文件夹/private/var/mobile/Application/并重启iPhone,之后在AppStore中下载任意一个免费软件,同步后行此软件一次(切记以后不要删除此软件,否则会造成同步进iPhone的破解软件不能行),之后再次同步你的破解软件就可以了,如果中途报错可再次同步。...]]> <![CDATA[iText Tutorials - iText Table, Ja]]> http://mim1314.com/somewordsdetail/500 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/500 <![CDATA[iText Tutorials - iText Table, Ja]]> http://mim1314.com/somewordsdetail/499 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/499 <![CDATA[DOS命令下打开一个文件夹]]> http://mim1314.com/somewordsdetail/498 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/498 <![CDATA[2.1、2.2 用91安装APP、IPA简]]> http://mim1314.com/somewordsdetail/497 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/497 <![CDATA[1T3XT: Product]]> http://mim1314.com/somewordsdetail/496 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/496 <![CDATA[2.7.1.2.Linuxの]]> http://mim1314.com/somewordsdetail/495 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/495 <![CDATA[Flashビデオのライブ配信]]> http://mim1314.com/somewordsdetail/494 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/494 <![CDATA[33333333333333]]> http://mim1314.com/somewordsdetail/492 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/492 <![CDATA[111111111111111]]> http://mim1314.com/somewordsdetail/491 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/491 <![CDATA[test]]> http://mim1314.com/somewordsdetail/490 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/490 <![CDATA[MINIXソースの旅]]> http://mim1314.com/somewordsdetail/485 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/485 2 #define ARG_MAX 16384 /* # bytes of args + environ for exec() */ #else #define ARG_MAX 4096 /* args + environ on small machines */ #endif ..... #define SSIZE_MAX 32767 /* max defined byte count for read() */ #endif /* _POSIX_SOURCE */ ...]]> <![CDATA[WindowsでMYSQLのレプリケーション【replication】を作る]]> http://mim1314.com/somewordsdetail/484 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/484 grant replication slave on *.* to \'rep\'@\'localhost\' identified by \'rep\'; >flush tables with read lock; >show master status; +------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+------------------+ | mysql-bin.000002 | 228 | | | +------------------+----------+--------------+------------------+ 1 row in set (0.00 sec) スレーブ mysql -uroot -ppassword -P3307 >CHANGE MASTER TO MASTER_HOST=\'localhost\',MASTER_USER=\'rep\',MASTER_PASSWORD=\'rep\',MASTER_LOG_FILE=\'mysql-bin.000002\',MASTER_LOG_POS=0; >start slave; マスター >unlock tables; [テスト] マスター >create database aa; >use aa: >create table test(i int); >insert into test values(1); スレーブ >use aa: >select * from test; もし +------+ | i | +------+ | 1 | +------+ 1 row in set (0.00 sec) と表示されたら、成功しました。...]]> <![CDATA[P2P技術]]> http://mim1314.com/somewordsdetail/481 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/481 NAT <==> 外部のサーバ ...]]> <![CDATA[フランス語Tips]]> http://mim1314.com/somewordsdetail/479 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/479 <![CDATA[今日からEmacs 挑戦]]> http://mim1314.com/somewordsdetail/477 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/477 <![CDATA[大きいなファイルを小さくにする]]> http://mim1314.com/somewordsdetail/474 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/474 <![CDATA[Smartyを使ってみよう]]> http://mim1314.com/somewordsdetail/471 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/471 <![CDATA[PHPセキュリティ防御]]> http://mim1314.com/somewordsdetail/466 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/466 <![CDATA[Cビット演算趣味ある方ヘ]]> http://mim1314.com/somewordsdetail/465 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/465 <![CDATA[Linux Tips]]> http://mim1314.com/somewordsdetail/464 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/464 <![CDATA[LINUX簡単なデータバックアップ方法]]> http://mim1314.com/somewordsdetail/463 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/463 <![CDATA[LINUX簡単なファイルを見つける方法]]> http://mim1314.com/somewordsdetail/462 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/462 <![CDATA[Linuxサーバー間のファイルコピー]]> http://mim1314.com/somewordsdetail/461 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/461  Aサーバで作業 B> Bサーバで作業 準備 A>whereis keychain 見つけない場合 A>wget http://mirror.caoslinux.org/cAos-1/creation/keychain-2.0.3-1/RPMS/noarch/keychain-2.0.3-1.noarch.rpm A>rpm -i keychain-2.0.3-1.noarch.rpm 手順: 1. A>ssh-keygen -t dsa A>id_dsa.pub中の公開鍵内容をコピー B>ユーザCしたの.sshしたのauthorized_keysに先作った鍵を貼り付け A>ssh ユーザC@B #問題なければ、Bサーバに入ります A>su - [Aサーバのrsync実行出来るユーザ] -c \"rsync --verbose --progress --stats --delete --recursive --times --perms --rsh=/usr/bin/ssh --links --exclude \"除きたいファイル\" [ソースディレクトリ]/* ユーザC@B:[目標ディレクトリ] >[AサーバのLOGディレクトリ]/rsync_`date \'+%y%m%d\'`.log 2>&1\" scp AからBまでファイル/tmp/a.txtをコピー A>usr/bin/scp ユーザC@B:/tmp/a.txt /tmp/a.txt BからAまでファイル/tmp/a.txtをコピー A>/usr/bin/scp /tmp/a.txt ユーザC@B:/tmp/a.txt ...]]> <![CDATA[JAVA EXEファイル作る手順]]> http://mim1314.com/somewordsdetail/458 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/458 Export->JAVA・JARファイル->NEXT... 2.exewrapの解凍したフォルダーに行って、 exewrap.exe -j -g jarファイル  実行して、EXEファイルを入手。 ...]]> <![CDATA[CSS謎?]]> http://mim1314.com/somewordsdetail/26 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/26

その2 aaaaa{ background-color:#111111; padding:6px; text-align:left; color:#ffffff; } その3 .bbbbb { text-align:center; margin:10px 0px; }

Example:

This is header 1

This is header 2

This is a paragraph

...]]>
<![CDATA[Eclipse]]> http://mim1314.com/somewordsdetail/22 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/22 Help->Software Updates->Find Install->Search for New future to intall->New remote site->NEXT thing ... コードフォーマットホットキー CTRL+SHIFT+F...]]> <![CDATA[MXとA記録]]> http://mim1314.com/somewordsdetail/18 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/18 <![CDATA[PERL MAIL::sendmail]]> http://mim1314.com/somewordsdetail/17 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/17 {Sender} = \'\'; $rh_mail->{From} = \'\'; $rh_mail->{To} = \'\'; $rh_mail->{Content-Type} = \'text/plain\'; $rh_mail->{Subject} = \'\'; $rh_mail->{Message} = \'\'; sendmail(%$rh_mail); ...]]> <![CDATA[WINDOWSシャットダウン]]> http://mim1314.com/somewordsdetail/12 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/12 <![CDATA[WINDOWSファイル合併]]> http://mim1314.com/somewordsdetail/11 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/11 <![CDATA[PHPとPERL]]> http://mim1314.com/somewordsdetail/10 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/10 \'y\', $h = array( \'x\' => \'y\', \'z\' => \'w\', \'z\' => \'w\', ); ); $h{\'x\'} = 7; $h[\'x\'] = 7; while (($key,$value) = each(%h) foreach ($h as $key => $value) { .. } { .. } $a = keys(%h); $a = array_keys($h); $b = values(%h); $b = array_values($h); delete $h{\'x\'}; unset( $h[\'x\'] ); -- Perl data structures -- -- Php data structures -- %h = (\'a\'=>13, \'b\'=>25); $h = array(\'a\'=>13, \'b\'=>25); @x = (\'hi\', \'there\', \'all\',); $x = array(\'hi\', \'there\', \'all\',); @mix = ( \\%h, \\@x, $mix = array($h, $x, [33..39], range(33,39), { x=>15, yy=>23, }, array(\'x\'=>15, \'yy\'=>23), ); ); $mix[0]->{\'b\'} # == 25 $mix[0][\'b\'] # == 25 $mix[0]{\'b\'} # == 25 $mix[2]->[2] # == 35 $mix[2][2] # == 35 $mix[2][2] # == 35 -- Perl array split/join -- -- Php array split/join -- @a = split( \',\', $s ); $a = preg_split( \'/,/\', $s, -1, PREG_SPLIT_NO_EMPTY ); @a = split( \'\\s+\', $s ); $a = preg_split( \'/\\s+/\', $s, -1, PREG_SPLIT_NO_EMPTY ); $s = join( \",\", @a ); $s = join( \",\", $a ); -- Perl case conversion -- -- Php case conversion -- $s = lc($s); $s = strtolower($s); $s = uc($s); $s = strtoupper($s); $s =~ tr/a-z/A-Z/; -- Perl string comparisons -- -- Php string comparisons -- $s1 eq $s2 strcmp($s1,$s2) == 0 # or $s1 === $s2 $s1 lt $s2 strcmp($s1,$s2) < 0 -- Perl functions -- -- Php functions -- sub foo { function foo() { my @args = @_; $args = func_get_args(); } } sub foo { function foo() { $x = 5; global $x; } $x = 5; } function foo2($x, $y) { } foo2( \\@a, \\%h ); foo2( $a, $h ); -- Perl string matching operations -- -- Php string matching operations -- $s =~ m/(\\w+)/; preg_match( \"\"/(\\w+)/\"\", $s, $match ); $substr = $1; $substr = $match[1]; @all = ($s =~ m/(\\w+)/g); preg_match_all( \"\"/(\\w+)/\"\", $s, $match ); $all = $match[0]; $s =~ s/\\s+/X/; $s = preg_replace( \"\"/\\s+/\"\", \'X\', $s, 1 ); $s =~ s/\\s+/X/g; $s = preg_replace( \"\"/\\s+/\"\", \'X\', $s ); $s =~ s/^\\s+竖线\\s+$//g; $s = trim($s); -- Perl basename/dirname -- -- Php basename/dirname -- use File::Basename; $b = basename($path); $b = basename($path); $d = dirname($path); $d = dirname($path); -- Perl environment variables -- -- Php environment variables -- %ENV $_SERVER $ENV{REQUEST_METHOD} $_SERVER[REQUEST_METHOD] $ARGV[$i] $argv[$i+1] $0 $argv[0] # Php/CGI only -- Perl POST/GET parameters -- -- Php POST/GET parameters -- #form/hyperlink parameters: #form/hyperlink parameters: # s : single-valued # s : single-valued # m : multi-valued # m[] : multi-valued # (such as multi-selections use CGI (:standard); # and checkbox groups) $PARAM = array_merge($_GET, $_POST); $s = param(\'s\'); $s = $PARAM[\'s\']; # a scalar @m = param(\'m\'); $m = $PARAM[\'m\']; # an array @param_names = param(); $param_names = array_keys($PARAM); $num_params = param(); $num_params = count($PARAM); -- Perl HTML elements -- -- Php HTML elements -- use CGI (:standard); # The Perl/CGI functions have the # additional property of \"\"stability\"\" # when used in reentrant forms. # The values of the HTML elements are # set according to the incoming # parameter values for those elements. # The versions below are not stable. $ref = \"\"x.cgi\"\"; $ref = \"\"x.php\"\"; a({href=>$ref}, \"\"yy\"\") \"\">yy textfield({name=>\"\"yy\"\", size=>5}) password({name=>\"\"yy\"\", size=>5}) textarea({name=>\"\"yy\"\", submit({value=>\"\"yy\"\"}) button( {name=>\"\"xx\"\", \"\"yy\"\", name=\"\"xx\"\" value=\"\"yy\"\" onclick=>\"\"submit()\"\", onclick=\"\"submit()\"\"> } ) %labels = (0=>\'a\',1=>\'q\',2=>\'x\'); @a = (\'xx\',\'yy\',\'zz\'); $a = array(\'xx\',\'yy\',\'zz\'); radio_group( { name=>\'nn\', foreach ($a as $_) values=> \\@a, echo \"\"\'_\', name=nn value=\'$_\'>$_
\"\"; linebreak=>1, } ) %labels = (\'xx\'=>\'L1\',\'yy\'=>\'L2\'); $labels = array(\'xx\'=>\'L1\',\'yy\'=>\'L2\'); @a = keys( %labels ); foreach (array_keys($labels) as $_) checkbox_group( { name=>\'nn\', echo \"\" \\@a, name=nn value=\'$_\'>\"\", labels=> \\%labels, $labels[$_]; } ) table( Tr( [ td([\'a\',\'b\']), td([\'x\',\'y\']), ] ) )
ab
xy
-- Perl URL encode -- -- Php URL encode -- use URI::Escape; uri_escape($val) urlencode($val) uri_unescape($val) urldecode($val) -- Perl MySQL database access -- -- Php MySQL database access -- use DBI; $dbh = DBI->connect( $dbh = mysql_connect( \'DBI:mysql:test:localhost\', \'localhost\', $usr, $pwd $usr,$pwd ); ); mysql_query(\'USE test\') $dbh->do( $sql_op ) mysql_query( $sql_op ); $query = $dbh->prepare( $sql_op ); $results = mysql_query( $sql_op ); $query->execute(); while( while($record = @record = $query->fetchrow() ) mysql_fetch_row($results)) { .. } { .. } $dbh->quote($val) \"\'\"\" . addslashes($val) . \"\"\'\"\"...]]>
<![CDATA[Apache達人]]> http://mim1314.com/somewordsdetail/9 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/9 setHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader On DirectoryIndex index.cgi Order allow,deny Allow from all ↑ mod rewrite 試す† RewriteEngine On RewriteRule /cgi-bin/(.+)$ http://www.google.com/$1 [L] ↑ apacheにcモジュールを入れる † apxs -c -o mod_hello_world.so mod_hello_world.c cp -f mod_hello_world.so libexec/mod_hello_world.so bin/apachectl stop bin/apachectl start PS1: 格式化插入字符串 sql = ap_psprintf( r->pool, \"insert into table values(NULL,\'%s\',NULL,\'%d\')\", a,b); 插入操作 mysql_query(&mysql,sql) PS2: mod_hello_world.c #include \"httpd.h\" #include \"http_config.h\" #include \"http_protocol.h\" #include \"http_core.h\" #include \"ap_config.h\" #include static int hello_world( request_rec *r { MYSQL mysql; MYSQL_RES *res; MYSQL_ROW row; unsigned int num_fields; unsigned int i; char *query=\"SELECT * FROM test\"; r->content_type = \"text/plain\"; ap_send_http_header( r ; char * time = ap_get_time(); char * args = r->args; ap_rprintf( r, \"%s%s%s\", \"hello world\\n\",time,args ; /*Initializing MySQL connection*/ if(mysql_init(&mysql)==NULL) { ap_rprintf( r, \"%s\", \"Failed to initate MySQL connection\"; return 1; } /*Connecting to MySQL server*/ if (!mysql_real_connect(&mysql,\"ip\",\"user\",\"pass\",NULL,0,NULL,0)) { ap_rprintf( r, \"%s\", mysql_error(&mysql)); return 1; } /*Selecting database*/ if(mysql_select_db(&mysql,\"ok\"!=0){ ap_rprintf( r, \"%s\", mysql_error(&mysql)); return 1; } /*Performing SQL query*/ if(mysql_query(&mysql,query)) { ap_rprintf( r, \"%s\", mysql_error(&mysql)); return 1; } res = mysql_store_result(&mysql); ap_rprintf( r, \"\\n\"; if (res) { num_fields = mysql_num_fields(res); while ((row = mysql_fetch_row(res))) { for(i = 0; i < num_fields; i++) { ap_rprintf( r, \"%s\\t\", row[i] ?row[i]:\"NULL\"; } ap_rprintf( r, \"\\n\"; } mysql_free_result(res); }else { ap_rprintf( r, \"fail\"; } if(mysql_query(&mysql,\"insert into test values(66,66)\") { ap_rprintf( r, \"%s\", mysql_error(&mysql)); return 1; } mysql_close(&mysql); return OK; }; static handler_rec hello_world_handlers[] = { {\"hello_world\", hello_world}, {NULL} }; module MODULE_VAR_EXPORT mod_hello_world = { STANDARD_MODULE_STUFF, NULL, /* module initializer */ NULL, /* create per-dir config structures */ NULL, /* merge per-dir config structures */ NULL, /* create per-server config structures */ NULL, /* merge per-server config structures */ NULL, /* table of config file commands */ hello_world_handlers, /* [#8] MIME-typed-dispatched handlers */ NULL, /* [#1] URI to filename translation */ NULL, /* [#4] validate user id from request */ NULL, /* [#5] check if the user is ok _here_ */ NULL, /* [#3] check access by host address */ NULL, /* [#6] determine MIME type */ NULL, /* [#7] pre-run fixups */ NULL, /* [#9] log a transaction */ NULL, /* [#2] header parser */ NULL, /* child_init */ NULL, /* child_exit */ NULL /* [#0] post read-request */ };...]]> <![CDATA[LINUXバージョン見る方法]]> http://mim1314.com/somewordsdetail/8 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/8 <![CDATA[LINUXシャットダウン]]> http://mim1314.com/somewordsdetail/7 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/7 <![CDATA[ベシック認証つける方法]]> http://mim1314.com/somewordsdetail/5 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/5 <![CDATA[BASHプロ]]> http://mim1314.com/somewordsdetail/3 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/3 $RTN } function sub { local res let \"res = $1 - $2\" #res=`expr $1 - $2` echo $res > $RTN } function mul { local res let \"res = $1 * $2\" #res=`expr $1 - $2` echo $res > $RTN } function div { local res let \"res = $1 / $2\" #res=`expr $1 / $2` echo $res > $RTN } function add_from_to { local counter=$1 local sum=0 while [ $counter -le $2 ]; do let sum=sum+counter let counter=counter+1 done echo $sum > $RTN } function sub_string { local string=$1 local pos=$2 local len=$3 if [ \"x$len\" = \"x\" ] ; then echo ${string:$pos} > $RTN else echo ${string:$pos:$len} > $RTN fi } function replace_string { local string=$1 local before=$2 local after=$3 local global=$4 if [ \"x$global\" = \"x\" ] ; then echo ${string/$before/$after} > $RTN else echo ${string//$before/$after} > $RTN fi } function print { until [ -z \"$1\" ] do echo -n \"$1\" echo -n \" \" shift done echo \"\" } function join { local joiner=$1 shift `rm -f $RTN`; until [ -z \"$1\" ] do echo -n \"$1\" >> $RTN shift if [ -z \"$1\" ] ; then : else echo -n \"$joiner\" >> $RTN fi done } function save_to_file { local file_name=$1 shift join \" \" $@ cat $RTN > $file_name } function retrive_from_file { local file_name=$1 local rec=`cat $file_name` for i in $rec; do echo item : $i done } function select_menu { local menu=$1 local opt select opt in $menu; do for i in $menu; do if [ \"$opt\" = \"$i\" ]; then echo $opt > $RTN return 0 else : fi done print please select one operation done } function input { local num local value `rm -f $RTN` num=$1 if [ \"x$num\" = \"x\" ] ;then let \"num = 1\" else : fi while [ $num -gt 0 ] ;do read value echo $value >> $RTN let \"num = $num - 1\" done } function input_password { stty_orig=`stty -g` stty -echo read secret stty $stty_orig echo $secret > $RTN } function print_color { local text=$1 local fg=$2 local bg=$3 #change to right form case \"$fg\" in red) fg=\"31m\" ;; green) fg=\"32m\" ;; yellow) fg=\"33m\" ;; blue) fg=\"34m\" ;; white) fg=\"37m\" ;; black) fg=\"30m\" ;; *) fg=\"37m\" ;; esac case \"$bg\" in red) bg=\"41m\" ;; green) bg=\"42m\" ;; yellow) bg=\"43m\" ;; blue) bg=\"44m\" ;; white) bg=\"47m\" ;; black) bg=\"40m\" ;; *) bg=\"40m\" ;; esac echo -en \"\\033[$fg\\033[$bg$text\\033[0m\" } function print_array { print_color \"======================================\" yellow echo print_color \"|\" yellow print_color \"Dump Of Array \" white print_color \"(\" yellow print_color ${#array[@]} white print_color \")\" yellow echo print_color \"++++++++++++++++++++++++++++++++++++++\" yellow echo for (( i = 0 ; i < ${#array[@]} ; i++ )) do print_color \"|\" yellow print_color \"Element \" green print_color $i yellow print_color \": \" green print_color ${array[$i]} red echo done print_color \"--------------------------------------\" yellow echo } function push_array { array=(\"${array[@]}\" $1) echo $1 > $RTN } function pop_array { local array_len=${#array[@]} if [ $array_len -le 0 ] ;then echo > $RTN return fi echo ${array[$(($array_len-1))]} > $RTN array=(${array[@]:0:$(($array_len-1))}) } function shift_array { echo ${array[0]} > $RTN array=(${array[@]:1}) } function unshift_array { array=($1 \"${array[@]}\") echo $1 > $RTN } function del_array { local i for (( i = 0 ; i < ${#array[@]} ; i++ )) do if [ \"$1\" = \"${array[$i]}\" ] ;then break fi done #not exist if [ $i -ge ${#array[@]} ] ;then return fi #at first if [ $i -eq 0 ] ;then shift_array return fi #at last if [ $(($i + 1)) -eq ${#array[@]} ] ;then pop_array return fi #at middle echo ${array[$i]} > $RTN array=(${array[@]:0:$i} ${array[@]:$(($i + 1))}) } function del_array_index { local i=$1 #not exist if [ $i -ge ${#array[@]} ] ;then return fi #at first if [ $i -eq 0 ] ;then shift_array return fi #at last if [ $(($i + 1)) -eq ${#array[@]} ] ;then pop_array return fi #at middle echo ${array[$i]} > $RTN array=(${array[@]:0:$i} ${array[@]:$(($i + 1))}) } function exist_array { for (( i = 0 ; i < ${#array[@]} ; i++ )) do if [ \"$1\" = \"${array[$i]}\" ] ;then echo 1 > $RTN return 1 fi done echo 0 > $RTN return 0 } function print_rtn { local rtn=`cat $RTN` echo $rtn } function load_array_from_file { array=( `cat $1 | tr \'\\n\' \' \'` ) } function sum { local sum=0 local param_len=$# for (( i = 0 ; i < $param_len ; i++ )) do sum=`expr $sum + $1` shift done echo $sum > $RTN return $sum } ...]]> <![CDATA[apache+mysql+php4+perl+ssl インストール完璧]]> http://mim1314.com/somewordsdetail/2 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/2 <![CDATA[catalyst勉強始まった]]> http://mim1314.com/somewordsdetail/1 hi@mim1314.com (Mim1314.com) http://mim1314.com/somewordsdetail/1 new; my $vars = {name => \'xiaosheng\'}; #方法1 my $template_str = \'hi, my name is [% name %]\'; $tt->process(\\$template_str, $vars) || die $tt->error(), \"\\n\"; #方法2 my $template_file = \'a.tt\'; #a.tt内容は\'hi, my name is [% name %]\' $tt->process($template_file , $vars) || die $tt->error(), \"\\n\"; #方法3 my $template_str = \'hi, my name is [% name %]\'; my $output;$tt->process(\\$template_str, $vars, \\$output) || die $tt->error(), \"\\n\"; ...]]>