照片置顶

March 16th, 2009

zend framework中的Request 对象 的

April 13th, 2010

Request是zend framework中很重要的一个对象。
getParam 可以取得客户传来的参数,取数据的顺序为
1. GET
2. POST
3. COOKIE
4. SERVER
5. ENV

exception in zend_db_table

April 13th, 2010

I just met the following exception, when i was trying to implement a model:
Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound

It is because the refcolumns doesn’t exists ( i made this by a typo) , see the following code:

 protected $_referenceMap = array
( 'Institute' =>
array( 'columns' => array("exchange_institution_id"),
'refTableClass' => 'Application_Model_Institutions',
'refColumns' => array('institute_id')));
 // Here the foreign key should be institution_id instead of institue_id
//...

The error message helps just nothing!

ubuntu声卡的问题

April 8th, 2010

前几天突然间在看video和听音乐的时候,video和音乐都放的很快,像快进一样。最后发现是声卡驱动的问题。修改了声卡里面输出的设置就好了

HTML target Tag

January 27th, 2010

_blank, um den Verweis in einem neuen Fenster zu öffnen,
_self, um den Verweis im aktuellen Fenster zu öffnen,
_parent, um bei verschachtelten Framesets das aktuelle Frameset zu sprengen,
_top, um bei verschachtelten Framesets alle Framesets zu sprengen.

border-collapse的作用

January 23rd, 2010

border-collapse 属性设置表格的边框是否被合并为一个单一的边框,还是象在标准的 HTML 中那样分开显示

下面是没有设置 collapse, 注意没有内容的格子的边框:

table collapse is off

下面是在css中设置:border-collapse: collapse;

table collapse is on

命令行查看PHP的参数

January 21st, 2010

phpinfo()是个经常用来查看php配置的命令。每次查看都要创建一个PHP的文件,再在里面呼叫这个方法。

今天发现了一个PHP的命令行参数  -i ,通过输入这个参数就可以在命令行里看当前的php的配置了。

在命令行里输入:

php -i |less

看看你的php的参数是什么

yoono

November 5th, 2009

yoono是个forefox的插件,他把twitter,fachebook的客户端集成到了一起。可以同时对不同的socialnetwork更新当前的状态,共享有趣的信息。

Linux 下 Java GUI程序乱码

November 5th, 2009

ThinkRock 之类的程序,在linux下会出现中文显示不出来的问题(显示的都是小方块)。解决的办法是给jre添加字体。方法是:

在 jre/lib/fonts/ 下建立一个fallback的目录,再把中文字体拷贝到这个目录里。再此打开你的java程序,中文就可以显示出来了。fallback的意思,估计是找不到合适的字体就用在fallback里的

using php interactive shell

November 5th, 2009

php has a interactive shell.
Just input

php -a

in your shell.

$ php -a Interactive shell

php > $a=array(“name”=>”ting”); php > $a[]=3; php > print_r($a); Array ( [name] => ting [0] => 3 ) php >



Another way to try your script is using:
php -f yourPHP.php

$name = "ting";
if($name == "ting){
   print "hello";
}