Reference
Kenneth Ko - Dojo ComboBox Test Pagehttp://home.exetel.com.au/cweatures/combosample/combotest.html
via
phpspot開発日誌 - 2006-08-15 - Dojoライブラリを使ったオートコンプリート付きComboBoxhttp://phpspot.org/blog/archives/2006/08/dojocombobox.html
function replaceText($str){
$arr = array(
// ADA0 - ADB4
"\xAD\xA1" => "(1)",
"\xAD\xA2" => "(2)",
"\xAD\xA3" => "(3)",
"\xAD\xA4" => "(4)",
"\xAD\xA5" => "(5)",
"\xAD\xA6" => "(6)",
"\xAD\xA7" => "(7)",
"\xAD\xA8" => "(8)",
"\xAD\xA9" => "(9)",
"\xAD\xAA" => "(10)",
"\xAD\xAB" => "(11)",
"\xAD\xAC" => "(12)",
"\xAD\xAD" => "(13)",
"\xAD\xAE" => "(14)",
"\xAD\xAF" => "(15)",
"\xAD\xB0" => "(16)",
"\xAD\xB1" => "(17)",
"\xAD\xB2" => "(18)",
"\xAD\xB3" => "(19)",
"\xAD\xB4" => "(20)",
// ADB5 - ADBF
"\xAD\xB5" => "I",
"\xAD\xB6" => "II",
"\xAD\xB7" => "III",
"\xAD\xB8" => "IV",
"\xAD\xB9" => "V",
"\xAD\xBA" => "VI",
"\xAD\xBB" => "VII",
"\xAD\xBC" => "VIII",
"\xAD\xBD" => "IX",
"\xAD\xBE" => "X",
"\xAD\xBF" => "?",
"\xAD\xC0" => "ミリ",
"\xAD\xC1" => "キロ",
"\xAD\xC2" => "センチ",
"\xAD\xC3" => "メートル",
"\xAD\xC4" => "グラム",
"\xAD\xC5" => "トン",
"\xAD\xC6" => "アール",
"\xAD\xC7" => "ヘクタール",
"\xAD\xC8" => "リットル",
"\xAD\xC9" => "ワット",
"\xAD\xCA" => "カロリー",
"\xAD\xCB" => "ドル",
"\xAD\xCC" => "セント",
"\xAD\xCD" => "パーセント",
"\xAD\xCE" => "ミリバール",
"\xAD\xCF" => "ページ",
"\xAD\xD0" => "mm",
"\xAD\xD1" => "cm",
"\xAD\xD2" => "km",
"\xAD\xD3" => "mg",
"\xAD\xD4" => "kg",
"\xAD\xD5" => "cc",
"\xAD\xD6" => "m2",
"\xAD\xDF" => "平成",
"\xAD\xE0" => "``",
"\xAD\xE1" => "''",
"\xAD\xE2" => "No.",
"\xAD\xE3" => "K.K.",
"\xAD\xE4" => "",
"\xAD\xE5" => "(上)",
"\xAD\xE6" => "(中)",
"\xAD\xE7" => "(下)",
"\xAD\xE8" => "(左)",
"\xAD\xE9" => "(右)",
"\xAD\xEA" => "(株)",
"\xAD\xEB" => "(有)",
"\xAD\xEC" => "(代)",
"\xAD\xED" => "明治",
"\xAD\xEE" => "大正",
"\xAD\xEF" => "昭和",
"\xAD\xF0" => "",
"\xAD\xF1" => "",
"\xAD\xF2" => "",
"\xAD\xF3" => "",
"\xAD\xF4" => "",
"\xAD\xF5" => "",
"\xAD\xF6" => "",
"\xAD\xF7" => "",
"\xAD\xF8" => "",
"\xAD\xF9" => "",
"\xAD\xFA" => "",
"\xAD\xFB" => "",
"\xAD\xFC" => "",
"\xFC\xF1" => "i",
"\xFC\xF2" => "ii",
"\xFC\xF3" => "iii",
"\xFC\xF4" => "iv",
"\xFC\xF5" => "v",
"\xFC\xF6" => "vi",
"\xFC\xF7" => "vii",
"\xFC\xF8" => "viii",
"\xFC\xF9" => "ix",
"\xFC\xFA" => "x",
);
return strtr($str,$arr);
}
function unhtmlspecialchars( $str )
{
$entry = array_flip( get_html_translation_table( HTML_SPECIALCHARS ) );
return strtr( $str, $entry );
}
function unhtmlentities($string)
{
// 数値エンティティの置換
$string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
$string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
// 文字エンティティの置換
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
for($year = 2004; $year < 2014; $year++){
$isLeapYear = checkdate(2, 29, $year) ? "leap year" : "not leap year";
echo "{$year} is {$isLeapYear}.\n";
}
$t = microtime_float();
for($i=1;$i<=1000000;$i++){
if(ctype_digit(1234567890)) {
print "";
}
}
print microtime_float()-$t."\n";
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$t=microtime_float();
for($i=1;$i<=1000000;$i++){
if(is_int(1234567890)) {
print "";
}
}
print microtime_float()-$t."\n";
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
// PHP 5の動作を模擬する簡単な関数
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
<?php
include('msnp9.class.php');
include('msn_sb.class.php');
$msn = new msn;
if ($msn->connect('EMAIL@hotmail.com', 'PASSWORD'))
{
$msn->rx_data();
}
?>
username | demo |
password | demo |
# aptitude install php5.1-pdo php5.1-pdo-mysql php5.1-pdo-sqlite
# apache2ctl restart
DBMS | DSN |
MySQL | mysql:host=localhost; dbname=pdotest |
PostgreSQL | pgsql:host=localhost; dbname=pdotest |
Firebird | firebird:dbname=localhost:pdotest.fdb |
Oracle | oci:dbname=/localhost/pdotest |
Sybase | dblib:host=localhost; dbname=pdotest |
SQLite2 | sqlite2:/path/to/pdotest.sq2 |
SQLite2 (memory) | sqlite2::memory: |
SQLite3 | sqlite:/path/to/pdotest.sq3 |
SQLite3 (memory) | sqlite::memory |
# PHP5
#deb http://people.debian.org/~dexter php5 sarge
deb http://people.debian.org/~dexter php5.1 sarge
# aptitude install php5.1 php5.1-gd php5.1-mbstring
$ COLUMNS=112 dpkg -l |grep php5.1
ii libapache2-mod-php5.1 5.1.4-0.1~sarge1 HTML-embedded scripting language (apache 2.0 module)
ii php5.1 5.1.4-0.1~sarge1 server-side, HTML-embedded scripting language (meta-package)
ii php5.1-cgi 5.1.4-0.1~sarge1 HTML-embedded scripting language (CGI binary)
ii php5.1-cli 5.1.4-0.1~sarge1 command-line interpreter for the PHP 5.1 scripting language
ii php5.1-common 5.1.4-0.1~sarge1 common files for packages built from the php5.1 source
ii php5.1-gd 5.1.4-0.1~sarge1 GD module for PHP 5.1
ii php5.1-mbstring 5.1.4-0.1~sarge1 mbstring module for PHP 5.1
ii php5.1-mysql 5.1.4-0.1~sarge1 MySQL module for PHP 5.1
ii php5.1-session 5.1.4-0.1~sarge1 session module for PHP 5.1
ii php5.1-sqlite 5.1.4-0.1~sarge1 SQLite module for PHP 5.1