PHP的自带的函数中,有三个压缩相关的函数:gzcompress、gzencode、gzdeflate,下面我们通过一段程序,来比较一下这三个函数的压缩比。代码:$string = "8aeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeer8aaaaaaaaaaaaaaa Read More
posted @ 2014-05-21 00:31 harry0906 Views(1454) Comments(0) Diggs(0)
错误类型PHP 主要有两种错误:触发错误和异常。其中触发错误大概可以分为:编译错误、引擎错误和运行时错误,其中前两个是无法捕获的;异常都是可以捕获的,当没有尝试捕获时则会中断代码。触发错误可以通过error_get_last()来进行获得,异常可以使用标准的try...catch语句来捕获。处理方式... Read More
posted @ 2014-05-18 02:29 harry0906 Views(304) Comments(0) Diggs(0)
1.安装PEAR 官方网站: http://pear.php.net/ PHP 5.4 的 Windows 包中没有自带 PEAR,下载 http://pear.php.net/go-pear.phar 到PHP目录,并运行:php go-pear.phar 安装完成后PHP目录下会产生一个名为 p... Read More
posted @ 2014-05-17 00:26 harry0906 Views(302) Comments(0) Diggs(0)
一>java遍历Hashtabe:import java.util.Hashtable;import java.util.Set;public class HashTableTest { public static void main(String args[]){ Hashtable ht = ... Read More
posted @ 2014-04-13 20:46 harry0906 Views(386) Comments(0) Diggs(0)
当然了,前提是你已经安装了Python和MySQL。我的Python是2.6版本的。Python2.6的“Set”有点兼容性问题,自己照着改一下:http://sourceforge.net/forum/message.php?msg_id=58089481)__init__.py删除 from sets import ImmutableSet将 class DBAPISet(ImmutableSet):改成 class DBAPISet(frozenset)2) converters.py删除 from sets import BaseSet, Set3)converters.py将 &qu Read More
posted @ 2014-03-23 22:33 harry0906 Views(202) Comments(0) Diggs(0)
#!/usr/bin/python## os module testimport osprint 'os.name: ', os.nameprint 'os.getcwd(): ', os.getcwd()print '''========================================='''print 'os.getenv(\'path\'): ', os.getenv('path')print '''=========== Read More
posted @ 2014-03-21 22:28 harry0906 Views(202) Comments(0) Diggs(0)
一>使用FileUpload控件,将其拖入页面: 内容 二>后端代码btnUpload_Click:using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.IO;public partial class View : System.Web.UI.Page{ protected void... Read More
posted @ 2014-03-02 21:23 harry0906 Views(197) Comments(0) Diggs(0)