Month: 三月, 2006

VACUUM ANALYZE

29 三月, 2006 (14:24) | postgresql

这两个命令在postgresql中非常重要。
按照psotgresql文档里面的说明,VACUUM主要作用是回收垃圾,ANALYZE则用于分析。文档建议周期性的运行这两个命令以便保持数据库的性能。
昨天遇到...

textarea在IE和Firefox下的表现

23 三月, 2006 (23:36) | Web Design

textarea中的文字如果长度超过textarea的宽度,那么在IE下会有竖的滚动条,文字自动折行,而在Firefox下,则会有水平的滚动条,文字不会折行,在今天的项目中发现这一问题,真让我哭笑不得...

wangbin’s blog › 创建新文章 — WordPress

23 三月, 2006 (23:28) | Uncategorized

wangbin’s blog › 创建新文章 — WordPress

...

不能在div中嵌套table?

23 三月, 2006 (22:58) | Web Design

今天在项目中遇到一个问题,在一个div中有一个table,结果是在IE6下显示的时候,table会自动shrink到适合div的大小;而在firefox下,table会把div给撑开,显示效果很难看。还没有找到好的办法让...

stupid error on copy a list

17 三月, 2006 (16:51) | python

a = [1,2,3]
b = a
b.append(4)
then both a and b are [1,2,3,4]
The right way is:
b = a[:]

...

plan to move to debian

17 三月, 2006 (15:35) | linux

计划把家里电脑的操作系统从gentoo转移到debian,下面是我用的源:
deb http://mirror.vmmatrix.net/debian/ testing main
deb http://mirror.vmmatrix.net/debian/ testing non-free
deb http://mirror.vmmatrix.net/debian...

Localized month names

15 三月, 2006 (23:06) | linux, python

从python google groups(http://groups.google.com/group/comp.lang.python/browse_thread/thread/fc6150904657dcc4)看到的,获取某种编码的月份名称:
import locale
locale.setlocale(locale.LC_ALL, “zh_CN.utf-8″)
l...

字符与ascii码的转换

13 三月, 2006 (21:59) | python

chr(i)
将一个0到255的整数转换为一个字符.
ord(c)
返回单个字符c的整数顺序值.普通字符返回[0,255]中的一个值,Unicode字符返回 [0,65535]中的一个值
unichr(i)
将一个0到0×11100...

emacs的shell-mode乱码的解决方案

11 三月, 2006 (00:28) | emacs

我的gentoo设置的locale为utf-8,目的很明显。但是偏偏emacs有些水土不服,目前最头疼的问题有两个,一个是gnome下emacs没法打开输入法,另一个就是shell-mode乱码了。
第一个问题没有解决方...

subway 挂了

8 三月, 2006 (22:35) | python

今天看到一篇blog(http://thinkhole.org/wp/2006/03/07/subway-is-dead/)说subway挂了,真是可惜。原本以为和turbogears合并以后能和django有一拼的呢,不知道今后的turbogears将向何处发展。一个好的开源项目...