2009年4月9日 星期四

MySQL乱码

1.SET NAMES utf8;

2.CREATE DATABASE aaaa CHARACTER SET utf8;

3.mysqli_connect.php=====
$dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ('Could not connect to MySQL: ' . mysqli_connect_error() );
mysqli_set_charset($dbc, 'utf8');
//mysqli_query($dbc,'SET NAMES utf8');

标签:

2009年4月8日 星期三

XAMPP


许多人通过他们自己的经验认识到安装 Apache 服务器是件不容易的事儿。如果您想添加 MySQL、PHP 和 Perl,那就更难了。

XAMPP 是一个易于安装且包含 MySQL、PHP 和 Perl 的 Apache 发行版。XAMPP 的确非常容易安装和使用:只需下载,解压缩,启动即可。

标签: , ,

aria2

aria2 is a multi-protocol & multi-source, cross platform download utility. The supported protocols are HTTP(S), FTP, BitTorrent (DHT, PEX, MSE/PE), and Metalink.

aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is uploaded to the BitTorrent swarm. Using Metalink's chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent.

There are other alternative applications. But aria2 has 2 distinctive features: (1) aria2 can download a file from several URIs(HTTP(S)/FTP/BitTorrent) and (2) If you give aria2 a list of URIs, aria2 downloads them concurrently. You don't have to wait for the current download queue to finish one file at a time anymore. aria2 tries to utilize your maximum download bandwidth and downloads files quickly.

There are also some applications that have the ability of segmented downloading. Typically these applications split a file by the number of threads and download them parallel and wait for all threads to finish. In other words, they don't split unfinished segments adaptively. Normally(if things goes well) there is no problem for this strategy, but if one thread is very slow(i.e. one of the server is very slow), then you have to wait for it to finish.
aria2 can cope with this peculiar situation. aria2 can split segment adaptively all the way down to 1MiB. So you don't have to worry about the above problem. But you might complain: if a slow server is downloading last 1MiB, then you have to wait for that none the less. The nswer is "no". Even in such case, aria2 does the job quite well: aria2 cancels slow server and use the faster server to finish download. In other words, aria2 is very clever and reliable in many situations.

Unlike original Aria, which has GTK+ interface, aria2 provides command-line interface only. But it brings lower resource requirement. The physical memory usage is typically 3MB(normal HTTP/FTP downloads) to 6MB(BitTorrent downloads). CPU usage in BitTorrent with download speed of 1500KB/sec is around 6%.

It is being actively developed by Tatsuhiro Tsujikawa.
Feature requests and comments are all welcome. Please refer to Contact page.

Usage example, FAQs and other useful information can be found at aria2 wiki.

Please visit the project page at sourceforge.net.

标签:

2009年3月28日 星期六

新的小树

杠开没有了,我得找一个新的来补上这个空位.


标签:

2009年3月25日 星期三

笑话

一位俄罗斯商人在中国旅游时迷了路,晚上走到一个小村庄时,下起了漫天大雪,他冷得受不了,便去敲一户农家的门请求住宿。
一位老太太在屋问:"谁啊?"
俄罗斯人说:"依力布奇-莫波洛夫-克里拉维奇。"
老太太大声说:"住一个人可以,你们人太多了,住不下。"