[ travel ] 14 九月, 2009 16:53

    ???????????, ???????, ??????????..

http://www.ete.com.tw/springvilla/

http://www.springvilla.com.tw/

    ?????????????, ?????, ??????????.

    ??????????????, ????????????????, ?????????????.

[ Linux ] 04 九月, 2009 16:32

awstats????????????????, ????IP????????, ????????GeoIP, ???60%, ???????75%

Geo:IP ??perl?????C library??

????library

  1. C library???yum ??
    yum install GeoIP
  2. Perl library  ???CPAN
    cpan
    install Geo::IP (?????????)

????library????

  1. perl?Geo::IP???C library??
    wget http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz
    tar zxvf GeoIP-1.4.6.tar.gz
    cd GeoIP-1.4.6
    ./configure
    make
    make check
    make install
    echo '/usr/local/lib' >> /etc/ld.so.conf
    /sbin/ldconfig /etc/ld.so.conf
    cd ..
  2. perl?Geo::IP
    wget http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.38.tar.gz
    tar zxvf Geo-IP-1.38.tar.gz
    cd Geo-IP-1.38
    perl Makefile.PL
    make
    make test
    make install
    cd ..

????????

wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
gunzip GeoIP.dat.gz
mv GeoIP.dat /var/lib/GeoIP/GeoIP.dat (????????????)

??awstats.domainname.conf

vi awstats.domainname.conf
???????
LoadPlugin="geoip GEOIP_STANDARD /var/lib/GeoIP/GeoIP.dat"

?????awstats???ok?, ????????????IP???

?????????
vi /usr/connexone/bin/update_GeoIP.sh
#!/bin/bash
# Name: update_GeoIP.sh
# Version: 0.1
# Last Modified: 2009-09-04
wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
gunzip GeoIP.dat.gz
mv GeoIP.dat /var/lib/GeoIP/GeoIP.dat

?????? 
crontab -e
15 7 5 * * /usr/connexone/bin/update_GeoIP.sh >/dev/null

[ MySQL ] 02 九月, 2009 17:58

??phpmyadmin???????big5?????utf-8

??????????????????big5??????\??????????????????

  1. ?phpmyadmin????????????latin1???????????????????4.0??mysql????????4.1????mysql??phpmyadmin???utf-8??, ??????phpmyadmin????big5?utf-8, ???big5??, ????????big5????.??????database.sql
  2. ???????? sql ????????? ??”DEFAULT CHARSET=latin1″ ?”DEFAULT CHARSET=utf8″??
  3. ????big5?utf-8??????, ?big5?database.sql?????utf-8??, notepad++?????????, ???????????->???utf-8???(???BOM)??
  4. big5???????????????, ????????????????\ ?ex ?\ ??????????????\??, ?????utf8??????????????\??????????????????????
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
    ?\\
  5. ?phpMyadmin???MySQL ???: UTF-8 Unicode (utf8)
  6. phpMyadmin???MySQL ???? ? utf8_general_ci
  7. ???????phpmyadmin?????????????
  8. ??????????????????
    $this->query(”SET NAMES ‘utf8′” );
[ MySQL ] 02 九月, 2009 17:56

??????????????????big5??????\?????????????????? 

????????????PHP ? MySQL ??????? query ??????

mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_CONNECTION=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");

??????????????????

mysql_query("SET NAMES utf8");

? MySQL???big5?utf8?

Step1??????dump??

?????????latin1???dump?????iconf?piconf????UTF-8???dump??????-default-character-set=latin1

#mysqldump -u ?? -p --default-character-set=latin1 ??? >output.sql

Step2?big5??utf8

?????Big5???? dump???????Big5??UTF-8??

#piconv -f big5 -t utf8 output.sql >utf8.sql

?????UTF-8????dump???????Big5???????UTF-8?????dump???????UTF-8?lantin1?????UTF-8

#mysqldump -u ?? -p -default-character-set=latin1 ??? >output.sql
#piconv -f utf8 -t big5 output.sql > big5.sql
#piconv -f big5 -t utf8 big5.sql >utf8.sql

Step3???sql?

1??????sql??????‘’\”??????(???????‘\n’)

2??dump???sql???????
SET NAMES utf8;
SET CHARACTER_SET_CLIENT=utf8;
SET CHARACTER_SET_RESULTS=utf8;

:1,$s/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/g
:1,$s/latin1/utf8/gc
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g
:1,$s/?\\/?/g


???????????TYPE=MyISAM???DEFAULT CHARSET=latin1;
??????ENGINE=MyISAM DEFAULT CHARSET=utf8;

Step4????????

??1. SQL??
CREATE DATABASE `???` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

??2. ?phpMyAdmin??????????”??”??utf8_general_ci

????import??

??1. SQL??

#mysql -u ?? -p ??? < utf8.sql

??2. ???phpMyAdmin??import????import???????????utf8???????phpMyAdmin import ????????????sql????????

? ???????MySQL?my.cnf???????????
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci

http://yumax1012.blogspot.com/2009/04/mysql-big5-utf8.html

[ MySQL ] 02 九月, 2009 17:50

??

???????MySQL database ? table ?? latin1??????big5?????? big5???????? escape char("\") ?????? UTF-8 ????? mysqldump ????????? big5 ? \?????????? \?? iconv ? piconv ? dump ???????? UTF-8 ???????????????????????????????????????????????????????????????????????????????????????


?????

??????? MySQL version 5
????? OLD_DB ?charset ? latin1?????? table ?? tbl? charset ?? latin1

my.cnf ??

[client] ???? default-character-set = utf8

[mysqld] ???? default-character-set = utf8 ?? skip-character-set-client-handshake

[mysql] ???? default-character-set = utf8

??????? php ???

<?
$outputfile= "OUTPUT.sql";
$DB_HOST="localhost";
$DB_USER="testuser";
$DB_PASS="testpass";
$DB_DBNAME="OLD_DB";
$DB_TABLE="tbl";

$fp=fopen($outputfile, "w+");
if(!$fp){
echo "Can not open file for writing.\n";
exit;
}

$dbcon=mysql_connect($DB_HOST, $DB_USER, $DB_PASS);
mysql_query("SET NAMES latin1", $dbcon);
mysql_select_db($DB_DBNAME, $dbcon);
$sqlstr="select * from $DB_TABLE";
$rs=mysql_query($sqlstr, $dbcon);
$NAMESTR="SET NAMES utf8;\r\n\r\n";
fwrite($fp, $NAMESTR, strlen($NAMESTR));
while($rsrow=mysql_fetch_row($rs)){
$i_sqlstr="INSERT INTO $DB_TABLE VALUES(";
foreach($rsrow as $rid=>$rval){
$rsrow[$rid]=iconv("BIG5", "UTF-8", $rval);
if(strval($rid)=="0")
$i_sqlstr.="'".addslashes($rsrow[$rid])."'";
else
$i_sqlstr.=", '".addslashes($rsrow[$rid])."'";
}
$i_sqlstr.=");\r\n\r\n";
fwrite($fp, $i_sqlstr, strlen($i_sqlstr));
}
mysql_free_result($rs);
mysql_close($dbcon);
fclose($fp);

exit;
?>

???? php ???????? OUTPUT.sql

?????????? database ? table????? databae ? table ??? utf8 ? default charset

????? mysql -u XXX -p < OUTPUT.sql

??? UTF-8 ????????? mysqldump ??? import ??????

http://blog.sikazozo.org/index.php?/archives/95-Mysql-latin1-table-UTF8-PHP.html

[ MySQL ] 02 九月, 2009 17:47
??? mysql ? UTF-8 ?????????????????

????(collation)???

utf8_general_ci
?
utf8_unicode_ci

?????????
? phpMyAdmin ?????????????

utf8_general_ci ??? (Unicode) (???), ??????
utf8_unicode_ci ??? (Unicode) (???), ??????

utf8_general_ci ?????????
utf8_unicode_ci ????????

????????
????????????????????????
mysql ???? codepage ?????????????????
? utf8_general_ci ????? codepage ?????????????? codepage ????????
? utf8_unicode_ci ?????? codepage ??????????? codepage ?????????????
?????? ß ????????????? utf8_unicode_ci ???????? ss ?
????? utf8_general_ci ????????? s ???

???????????? utf8_unicode_ci ???? utf8_general_ci ?
??? multibyte ???????????
?? utf8 ???????????????????????????
?????? utf8_unicode_ci ??????????????????????
[ MySQL ] 02 九月, 2009 17:24

??????latin1?(my.cnf??????default-character-set=utf8), ?????mysql 4.1?5?????, create database????????latin1???, ????????utf-8

????????phpmyadmin??????, ????????utf8_unicode_ci???

 ALTER DATABASE `database_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci

[ life ] 21 八月, 2009 11:23

?????????????, ?????????????????

????

??????????????????????????????????????????????????
??????????????????????
??????????????  

???? 

???????????????????????????
1. ????????????????
Respectfully yours,
Respectifully,

2. ???????????????????
Very truly yours,
Yours truly,
Yours very truly,
Very cordially yours,
Very sincerely yours,

3. ????????????????
Sincerely,
Sincerely yours,
Best regards,
Best wishes,
Cordially,
Cordially yours,
Regards,
Love,
Kindest/Warmest regards,  

??????

???????????????
????????????
????????????????????????
????????????
?????????????????????????
???????????????

??????????????
?????????????????????
???????????????????
?????????????????
????????????
???????????????????????
??????????????
??????????????????????????????????????????
?????????????????

????????????????????????????????????????????????????
????????????????????
?????????????????
??????????????
?????????????

??????????????
????????????????
?????????
????

?????????????
?????????
???????????????????
?????????????
??????????
?????????????

??????????

?????????????????
????????????????????????????????
???????????????????????????
????????????????????????????

????????
????????????P.S.(Postscript)????
??????
??????????????????

????????????????
??????????
????????????????????
????????????????
???????????????????
??????????????????????
??????????????????????????
??????????????????????
???????????????????????????????????

?????????????????????
????????????????????
????????????????????
????????????????????
???????????????????
??????????????????????
??????????????????????
??????????????????????
??????????????????????
??????????????????????
??????????????????????
??????????????????????
???????????????????
??????????????????????
?????????????????????

????????????
???????
????????????
??????????????????

?????
?(?)????????
?????????
????????????????????
?????????
??????????????????

?????
?(?)??????????????
???????????????
???????????????
?????????????????????????
???????????????

?????
?(?)???????????
?????????
?????????
????????????
????????????

????
?(?)??????????????
?????????
?????????
????????
?????????

 

 

[ php ] 14 八月, 2009 15:55

configure php 5.2.10 --with-imap ???

checking for U8T_CANONICAL... no
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

 ??libc-client-devel?????
yum install libc-client-devel

 ??????????ssl?????????
--with-imap-ssl

 

 

[ Computer ] 10 八月, 2009 22:58

Intel g4?????????????, ???????G41/G43/G45 ??????GM45/GS45, ????????????3???????, ???????. ??potplayer?????????G45?????, ????????????, ??????Cyberlink powerdvd????.

?Cyberlink PowerDVD Ultra v8.0.2217a ?????,??v9,???????,?????potplayer??, ??????V7.3 BD????????, ?????Pioneer?BD-Combo???.

????:

  1.  ???g45?driver????
  2. ??powerdvd 7.3??????update, ???????????????, cpu????20%??
  3. Potplayer G45????:
    ??potplayer????G45??????,???????HD??????, ??powerDVD 7.3?G45???
    ?????cyberlink????

    ????H264/AVC1????

    ???????Dxva

    ????vista?windows 7 , ???????,  ???xp????????, ?????, ?????, ???????

    ????????????
  4. ????????, ????????ok?
[ life ] 30 七月, 2009 12:28

??????????, ????????.

FedEx ???? UPS ????
???????????UPS??????????????FedEx?
TNT DHL??????TNT??????????????????????????65??DHL?????????????TNT?
????????UPS FEDEX TNT DHL?
??????????80??????????????????????????????DHLd????????50????????15?????DHL??????????????????????????????????????????2003??2004??????????????????????DHL?????????????
????????????????????FEDEX?UPS??????????????TNT???????????????DHL?????????????????????????????????????????????????????????????????????????

????????UPS???????, ??????.

[ Linux ] 24 七月, 2009 09:56

??nessus??, ?????Bind version?????????, ???????????. 

How To Hide BIND DNS Sever Version
by Vivek Gite · 2 comments

Q. How do I hide my dns server version number from command such as:
dig @ns1.example.com -c CH -t txt version.bind

How do I hide version under BIND9 Linux / UNIX systems?

A. This is nothing but security through obscurity. You can hide version but one can always fingerprint your name server to find out exact version details using fpdns tool.

Open your named.conf file, find out options { ... }; section,

options
{
        query-source    port 53;
        query-source-v6 port 53;
        listen-on { 174.ttt.xx.yy; };
        directory "/var/named"; // the default
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";
        dnssec-enable yes;
        recursion no;
        allow-notify { 174.zzz.yy.zz; 172.xx.yy.zz; };
        version "BIND";
};To hide your bind version:

version "YOUR Message";

OR

version "use fpdns to get version number ;)";

Save and close the file. Restart named, enter:

# service bind9 restart

OR

# service named restart

How do I see bind version?
Use dig command, enter

$ dig @ns1.softlayer.com -c CH -t txt version.bind

As usual, you can use fpdns to find out version number.

[ MySQL ] 22 七月, 2009 14:57

select * from write_Art a join
 (SELECT wc_id, MAX(wa_date) AS aa FROM write_Art GROUP BY  wc_id)b where a.wa_date = b.aa

????????????,??sql??????????????,??????????????????

?????MySQL 4.1????????? 

[ 財經 ] 22 七月, 2009 08:27

?????????????..?2003????????????????????????, ?????????, ??????????????. 

????????21????????1??????????????1???????1??????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

??2003????????????????????5???????5??????????????????????????????????????????????????????

???????????IBM??????30?????????????????????????????????????????????????????????????????????????

??????????????????????????????????????????????????????????????????????????????????????????????????????????????

???????????????????????????????????????????????????????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????

??????????????????????????????????????????????????????????????????????????1??

??????????????????????

[ Computer ] 01 七月, 2009 11:44
??Iperf??????
???ithome 

?????????????????????????????????????

?????????????????????????????????????????????????????????IT??????????????????????????????????????????????????????????????????????????

???????????????????????????????????????????????????????????????Iperf???????????????????????????????????????????????????

??Windows??????????
???????Windows??Iperf??????????http://www.noc.ucf.edu/Tools/Iperf/iperf.exe??????Windows?Linux????????????????????????????????Netperf?

????????Windows??????????????????????Iperf.exe??????????????C:\??????????????????????????Iperf????????

?????????????????Iperf?????????????????????????????????????????????????????

????????????????Iperf?????????????iperf.exe -s???????????Iperf???????

?????????????????????-c?????Iperf???????????????Iperf??????IP?????????????????

???????????????????????????Jperf????????Iperf???????????Java????????????????????JVM???????Jperf.bat?????????????????Iperf??????

?????????
Iperf???????????????????NAT???????Vigor2110??????????????????????WAN?LAN???????????????????????NAT???76.9Mbps??????????????????+???????76~77Mbps???

??????????????????NAT???????????????????UTM??????????????IPS?VPN???????????????????QoS????????????????????NAT???????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????

??????????????????????????????????????????????????????

??????NAT??????????????????????????????????????????????????????????????????????????????

???????????????????
Iperf????????10?????????10???????????????????????????????????????????????????????????????-t?????????????????

?????????????Iperf????????????????-P??????????????????????????????????????????????????????????????????????Linux?FreeBSD???Iperf???????

?????????????
???????????Iperf??????????????????802.11n??????????

?????Ixia?IxChariot?Qcheck???????????????????????????????IxChariot???????????????????????????????????????????????????????Qcheck??????1MB?????????802.11n?????????????????????????????802.11a/b/g??????????????

?????????????????????Iperf??????????????SMC?SMCWBR14S-N2???????????USB???SMCWUSBS-N????40GHz???802.11n??????Iperf????????79.4Mbps????IxChariot 5.4????????????????????

??Iperf????????

?????4??????Iperf??????????????Vigor2110???802.11n???????SMC SMCWBR14S-N2?????????????Iperf????????????????????????????????
???????Vigor 2110???WAN????????iperf.exe–s???????????Iperf?????


???????LAN???????????????????????????????????????????????????


???????????????5?Session??Vigor 2110???????????????????????????????Session???


?????????????????USB ???SMCWUSBS-N???????perf??79.4Mbps??????????802.11n??????