默认分类

使用try,catch防止页面出错.

Posted in 默认分类 on 六月 7th, 2010 by admin – Be the first to comment
jQuery(function(){
	try{
		$(':input').each(function(i){
			var t = $(this).attr('type');
			if(t==='button' || t==='submit'){
				$(this).css({'cursor':'pointer'});
			}
		});
	}catch(e){}

});

python合并多个TXT

Posted in 默认分类 on 五月 18th, 2010 by admin – Be the first to comment

今天用PYTHON采集多个TXT的URL需要合并起来。 总共有2K多条记录,人工合并太累了,写了这个合并程序,功能很简单,代码也很简单

#! /usr/bin/env python
#coding=utf-8

if __name__ == "__main__":

    data = ''
    for n in range(1, 2835):
        filename = 'qidian'+str(n)+'.txt'
        data += file(filename).read()
        file(filename).close()

    wFile = file('all.txt','w')
    print >> wFile, data
    wFile.close()

使用 jquery取 form表单中的name的值

Posted in 默认分类 on 五月 18th, 2010 by admin – Be the first to comment

html代码结构



js代码

window.alert( $('[name=pj]').val() );
window.alert( $('[name=zj]').val() );
window.alert( $('input[name=zj]').val() );

判断PHP采集数据时数据源有没有出错

Posted in 默认分类 on 五月 15th, 2010 by admin – Be the first to comment
        $cs = @file_get_contents($url);
        if(error_get_last()==null){
            $this->content = $cs;
        }else{
            die('error');
            return false;
        }

发现可以使用 error_get_last() 函数来判断是否出错. 效果很好.

关于IIS与APACHE的对width:100%的解析区别

Posted in 默认分类 on 四月 14th, 2010 by admin – Be the first to comment

在FF浏览器下

.issuance_from .form_fill li .wareinfo ul li {
    clear:both;
    line-height:24px;
    width:100%;
}

APACHE平台下面可以不写width:100%,但在IIS中一定要指明,不知道这个是什么原因导致的。

手背发青啊! 医生说是雷诺综合证!

Posted in 默认分类 on 三月 26th, 2010 by admin – Be the first to comment

有个”专家”说是我每天手指运动过量导致的,我也不知道要不要相信这个事实了。说是雷诺综合证。
检查这个,检查那个..

现在的医生真不知道应该相信不相信他啊。
预诊那些人也是,MD都不知道挂哪个科才是正确的,一会这个科一会那个科,一个个医生说都不是他看。
MDGBL…

印像12年前也出现过类似的问题,那次更严重些脸都黑了。后来去看了是毛细血管的微循环问题。吃几天药就好了。没有这么夸张啊…

=======
昨天开了点抗血小板的药(阿司匹林),
还有开了一个按血凝的药(…)

今天MS没有什么问题了。明天再去查下血液.

功能类似,界面类似!

Posted in 默认分类 on 三月 18th, 2010 by admin – Be the first to comment
1

vs

2

vs

3

vs

4

vs

是不是很像.
http://www.5173.com/
http://game.taobao.com/

js调试函数

Posted in 默认分类 on 二月 23rd, 2010 by admin – 1 Comment

参考php的debug函数修改了一下JS版的。 firebug 下使用控制台 ie使用 alert弹出

/**
 * 内部调试
 **/
function debug(v){
    if(window.console && window.console.log){
        window.console.log(v);
    }else{
        alert(v);
    }
}

代替远程桌面连接的软件

Posted in 默认分类 on 一月 28th, 2010 by admin – Be the first to comment

visionapp Remote Desktop

下载地址
下载

【全球号召】拯救MySQL!

Posted in 默认分类 on 一月 21st, 2010 by admin – Be the first to comment

作为MySQL的多年忠实用户,并且个人也非常喜欢MySQL,看到了MySQL创始人发出的号召,毫不犹豫的

参加了签名活动,希望大家也能参加!(希望大家转发此文,共同参与)

马上参加“拯救MySQL”签名活动!

MySQL 创始人请求帮助邮件:http://www.cnbeta.com/articles/102517.htm

国内媒体报道:http://tech.sina.com.cn/it/2010-01-04/21153736195.shtml