css width height not working

sometimes you may find that css width height does not working for html tag b, span,div i came across it also i set the position: absolute, then it do work well below is my css, you can test .loading { left: 25px; position: absolute; top: 20px; background-image: url(“./Resources/loading.gif”); overflow: hidden; height: 40px; width: 40px; background-repeat: no-repeat; }  

如何查看linux版本

如何得知自己正在使用的linux是什么版本呢,下面的几种方法将给你带来答案! 1. 查看内核版本命令: 1) [root@q1test01 ~]# cat /proc/version Linux version 2.6.9-22.ELsmp (bhcompile@crowe.devel.redhat.com) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 19 18:00:54 EDT 2005 2) [root@q1test01 ~]# uname -a Linux q1test01 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux 3) [root@q1test01 ~]# uname -r 2.6.9-22.ELsmp 2. 查看linux版本: … Read more

how to assign var to php template view file

 the function below demo how to assign var to php template view file 下面的函数显示怎么传递变量到模板文件里 public function renderInternal($_viewFile_,$_data_=null,$_return_=false) { // we use special variable names here to avoid conflict when extracting data if(is_array($_data_)) extract($_data_,EXTR_PREFIX_SAME,’data’); else $data=$_data_; if($_return_) { ob_start(); ob_implicit_flush(false); require($_viewFile_); return ob_get_clean(); } else require($_viewFile_); }

安装watir gem install watir 出了好多错

安装watir   gem install watir 出了好多错

例如:too many connection resets

SocketError: getaddrinfo:

Unable to resolve dependencies:

the installation aborts because of the network issue, but i don’t know why, the only thing i can do is that retry over and over again, it finally install successfully,  below is my retry history

但有时好像又可以进行下去, 可能是由于网络的原因, 中途会失败,也不知道是为什么, 只能一次一次进重试,最终还是成功啦, 花了不少时间

C:\Users\guangjun>gem install watir
ERROR:  While executing gem … (Gem::RemoteFetcher::FetchError)
too many connection resets (http://production.cf.rubygems.org/gems/win32-a
-1.4.8-x86-mingw32.gem)

C:\Users\guangjun>gem install watir
ERROR:  While executing gem … (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: No such host is known.  (http://rubygems.org/gem
win32-api-1.4.8-x86-mingw32.gem)

C:\Users\guangjun>gem system –update
ERROR:  While executing gem … (RuntimeError)
Unknown command system

C:\Users\guangjun>gem update –system
Latest version currently installed. Aborting.
C:\Users\guangjun>gem install watir –no-ri –no-rdoc
Fetching: windows-pr-1.2.0.gem (100%)Fetching: windows-pr-1.2.0.gem
Fetching: win32-process-0.6.5.gem (100%)
Fetching: xml-simple-1.0.15.gem (100%)
Fetching: hoe-2.9.4.gem ( 37%)ERROR:  While executing gem … (Gem::RemoteFetc
r::FetchError)
too many connection resets (http://production.cf.rubygems.org/gems/hoe-2.9
.gem)

Read more

perl ldap start_tls Operations error

When i use php script to call perl script which will query the ldap , the perl function start_tls always return the error message “Operations error”, but it works well when call perl script directly with command line, it almost spent me a day to fix this problem, i finally found the root cause is that php process doesn’t have read permission to the cert/key file

chmod a+r /path/to/cert file

chmod a+r /path/to/key file

those two commands fixed the problem.

following code demo how php call perl:

$pipespec = array
    (
    1 => array('pipe', 'w'), // client's stdout
    2 => array('pipe', 'w'), // client's stderr
);

$pipes = array();
$command = "/usr/bin/perl /path/to/perl/script.pl";
$process = proc_open($command, $pipespec, $pipes, $cwd, NULL);

Read more

xdebug调试php,断点不起作用

在xp上装了eclipse和VMware, 在VMware上装了redhat, 在redhat上装了apache,php,xdebug,在php.ini里配置xdebug如下: zend_extension=/usr/lib/php/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so xdebug.remote_enable=On xdebug.remote_autostart=On xdebug.remote_handler=dbgp xdebug.remote_host=xx.xx.xx.xx xdebug.remote_port=9000 xdebug.remote_mode=req 然后在eclipse里设置断点,发现断点不起作用,直接所有的代码一次性运行完了,到xdebug官网仔细看了下配置的说明, 原来xdebug.remote_host并不是apache所在服务器的IP, 而是远程调试机的IP, 我的情况,也就是xp的ip, 而不是VMware上redhat的IP,可原来我却把xx.xx.xx.xx配成了redhat的IP, 修改xx.xx.xx.xx为xp的IP,重启apache, 一试,果然单步调试成功了。