zend studio打不开页面

今天想试一下zend studio, 在官方网下载好在win7下安装后,发现zend server其实就是apache, zend studio就是扩展了eclipse,但zend server/studio却还要收钱,真不知道是怎么遵守开源协议的。 创建一个test项目后,结果页面都打不开,返回的错误是这样的:Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about … Read more

shell电话本

前几天在MSDN上看到有人用shell写了个电话本程序,为了巩固一下以前学过的, 自己也来弄一个shell电话本[绝非抄袭]。其实不能算一个电话本,因为只有两个域:名字和地址,权当练习,不尽完美之处,请海涵:D

#!/bin/sh
#Date: 2010-08-22
#QQ: 32281309
#MSN: pgj1207@hotmail.com
#Site: www.genepeng.com

function AddUser()
{
while :
do
echo -n “Enter user name: ”
read UserName
if [ “$UserName” = “” ]; then
continue
else
break
fi
done

while :
do
echo -n “Enter Address: ”
read Address
if [ “$Address” = “” ]; then
continue
else
break
fi
done

echo -e “$UserName\t$Address” >> $FileName
}

Read more

win7 VMware 7.0下centos不能上网

之前的CentOS是xp和VMware下安装的,上网等功能一切正常,但后来装了win7后上网功能出现了问题 情况如下: -> win7 ping不通虚拟机下CentOS -> CentOS 能ping win7和外网,但是不能浏览网页 -> 在win7下,用putty也访问不了CentOS -> win7, CentOS的防火墙都关了 后来发现原来是安装的瑞星防火墙的原因, 改变相应的设置,或直接把瑞星防火墙关掉就可以了

install_driver(Oracle) failed: Can’t load `…/DBD/Oracle/Oracle.so’ for module DBD::Oracle

Description This section is from the "Practical mod_perl " book, by Stas Bekman and Eric Cholet . Also available from Amazon: Practical mod_perl Here’s an example of the full error report that you might see: install_driver(Oracle) failed: Can’t load ‘/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at … Read more

Perl String Comparison Operators

In order to compare for string equality, or if one string is alphabetically bigger than another, you can use the six string comparison operators. Here are the string operators together with the numerical operators they correspond too: String Operator Numerical Operator eq == ne != gt > lt < ge >= le <= Notice that … Read more

Do not throw exception in exception_handler function and __destruct without try-catch

Do NOT throw exception in exception_handler function, if you do it like below, the error “Fatal error: Exception thrown without a stack frame in Unknown on line 0” will occur set_exception_handler(‘handle_exception’); function handle_exception($e) { throw new Exception(‘throwed in handle_exception’); } throw new Exception(‘error occur’); if you try-catch the Exception in exception_handler function, it will be … Read more

在windows下用wingrub安装backtrack 4 final双系统

在windows操作系统下利用wingrub安装backtrack 4 final,不需要你另外的磁盘分区、U盘. 下面讲一下安装过程 1. 安装WinGrub/Grub4DOS 从 http://sourceforge.net/projects/grub4dos/ 下载,然后安装,安装好了之后,打开wingrub, 点击Tools/Install Grub, 选择BOOT.ini, 填入”Back Track 4 Final”到Title, 再点击 Install, 这时会自动拷贝GRLDR 到c:\ ,还会创建c:\grub文件夹. 2. 从bt4-final.iso里拷贝/casper and /boot 到c:\ 3. 修改C:\boot\grub\menu.lst. 当你打开文件时已经有一些内容, 但没有find –set-root /GRLDR这句话,所以应该加上。 最终内容应该为:<!– more –> # By default, boot the first entry. default 0 # Boot automatically after 30 secs. timeout 10 splashimage=/boot/grub/bt4.xpm.gz title BackTrack4 … Read more

window live writer wordpress出错

当出现下面的问题时: The response to the metaWeblog.getRecentPosts method received from the blog server was invalid: Invalid response document returned from XmlRpc server 可以用下面的方法解决: 因为wordpress本身的一个bug,在utf-8编码下,在wp-includes文件夹下, xml-rpc返回的格式不正确,缺了三个字节,要修正这个问题,按如下操作即可: 用一个文本编辑工具打开class.ixr.php,查找: $length = strlen($xml); 替换为:<!–more –> $length = strlen($xml)+3; 就可以解决这个问题了!

ruby版本的discuz自动注册机

概要:
为了让别人以为你discuz网站的注册用户比较多,你可能需要注册大量虚假用户来伪造discuz网站的人气,如果手动地注册,那效率肯定会很低,势必需要一个工具来帮我们自动化地完成这个工作,本人就用ruby写了这样一个自动为discuz注册用户的工具.

Read more

ruby watir安装

照官方网站上说的安装[http://watir.com/installation/#win],老是在运行

gem update --system
gem install watir

的时候出错,错误如下:

C:\ruby\bin>gem update –system
Updating RubyGems…
Attempting remote update of rubygems-update
Install required dependency builder? [Yn]  Y
ERROR:  While executing gem … (Gem::GemNotFoundException)
    Could not find builder (>= 0) in any repository

Read more