Latex 数学符号表

用Latex写公式实在是太爽了,又快效果又好。但就是好多数学符号记不住,每次都要查一遍。

现在把Latex中常用的拉丁数学符号总结在这里,供参考:
α.Α.\alpha β.Β.\beta γ.Γ.\gamma \Gama
δ.Δ.\delta ε.Ε.\epsilon ζ.Ζ.\zeta
η.Η.\eta θ.Θ.\theta ι.Ι.\iota
κ.Κ.\kappa λ.Λ.\lambda μ.Μ.\mu
ν.Ν.\nu ξ.Ξ.\xi ο.Ο.o
π.Π.\pi \Pi ρ.Ρ.\rho σ.Σ.\sigma τ.Τ.\tau υ.Υ.\upsilon φ.Φ.\phi χ.Χ.\chi ψ.Ψ.\psi ω.Ω.\omega

Tags: Latex 数学符号 排版 拉丁字母 Comments: 7

Beautiful Soup处理unicode

在python众多的辅助脚本中,beautiful soup(美丽的汤)无疑是耀眼的一个。

BS解析HTML,XML相当方便,但其中还是有一些问题的,尤其是在处理unicode的问题上,其实这也不能怪BS,毕竟python的unicode解决方案就不是那么的优雅,当然pyython 3.0就好多了。

由于BS在解析HTML时,要把所有内容全部转换成unicode来进行存储,这就出现了一个问题,BS怎么判断原始的HTML文件的编码方式?

BS根据以下规则来判断:
* 可以通过fromEncoding参数传递编码类型给soup的构造器
* 通过文档本身找到编码类型:例如XML的声明或者HTML文档http-equiv的META标签。如果Beautiful Soup在文档中发现编码类型,它试着使用找到的类型转换文档。但是,如果你明显的指定一个编码类型,并且成功使用了编码:这时它会忽略任何它在文档中发现的编码类型。
* 通过嗅探文件开头的一下数据,判断编码。如果编码类型可以被检测到,它将是这些中的一个:UTF-*编码,EBCDIC或者ASCII。
* 通过chardet 库,嗅探编码,如果你安装了这个库。
* UTF-8
* Windows-1252


* An encoding you pass in as the fromEncoding argument to the soup constructor.
* An encoding discovered in the document itself: for instance, in an XML declaration or (for HTML documents) an http-equiv META tag. If Beautiful Soup finds this kind of encoding within the document, it parses the document again from the beginning and gives the new encoding a try. The only exception is if you explicitly specified an encoding, and that encoding actually worked: then it will ignore any encoding it finds in the document.
* An encoding sniffed by looking at the first few bytes of the file. If an encoding is detected at this stage, it will be one of the UTF-* encodings, EBCDIC, or ASCII.
* An encoding sniffed by the chardet library, if you have it installed.
* UTF-8
* Windows-1252

这并不能保证结果的正确性,所以,在BS不能正确判断的时候,需要使用者指定当前HTML页面的编码方式。
例如:

soup = BeautifulSoup(gbk, fromEncoding="gbk")

这样就ok了

Tags: 美丽的汤 Comments: 300

硬盘安装Freebsd

无光驱,无软驱。

现有系统XP,系统盘为NTFS结构。

没有找到合适的方法来安装,有知道的麻烦通知一下。

谢了

Tags: Freebsd Comments: 6

GAE 翻页功能 (2)

基本的previous,next功能实现了,接下来还要继续完善,做成一个完整分页,pagination模块,能够按照任意页数寻找。

Tags: Pagination Django Comments: 3

GAE 翻页功能

接下来要考虑在GAE的framework中实现和Django pagination类似的功能了。

Tags: page django Comments: 527

Django自定义tag

自定义的tag在重复显示的时候真是有用,赞一个:)

Tags: Comments: 57

8月8号飞

记得当时申奥成功的那天晚上,跟宿舍的人说到时候开幕式那天大家都在哪呢?

没想到的是我却要在太平洋上边了。

8月8日飞米国,开始新的生活

Tags: Comments: 554

Tor + Firefox + FoxyProxy自由浏览

既然我们生活在这片神奇的土地上,什么事情都有可能发生。

Tor + Firefox + FoxyProxy能解决浏览网站的一切问题。

不多说了...

Tags: Tor Comments: 44

浪点虚拟主机上装django


参考:

http://www.phppear.com/index.php?m=03&y=08&entry=entry080328-113652

1. 开通ssh服务
2. 从这里

http://peak.telecommunity.com/dist/virtual-python.py
http://peak.telecommunity.com/dist/ez_setup.py
分别下载 virtual-python.py和ez_setup.py

在主机上建立一个evn文件夹并把这两个文件上传进去

3. 执行python virtual-python.py
4. vim ~/.bashrc
翻到结尾,在最后加上
alias python=~/bin/python

5. 重新登录shell
切换到evn目录下面
运行
python ez_setup.py
来安装setuptools

6. 在django.fcgi的第一行写成
#!/var/www/virtualhost/浪点用户名/bin/python

7.pkill django.fcgi

8.转到要安装的django的目录下,python setup.py install

okay,接下来跑的就是自己版本的django了

Tags: django site Comments: 2

更新

最近还有些其它的code要写,这个blog的更新暂时慢了下来.

keep on it

Tags: progress Comments: 2

关于CSS和template的一些收集

第一个,Open Source Web Design(OSWD)开源设计 http://www.oswd.org/

第二个,solucija(精品) http://www.solucija.com/home/css-templates/

第三个 http://www.tristarwebdesign.co.uk/templates.html

第四个 sixshootermedia http://www.sixshootermedia.com/free-templates/

第五个 openwebdesign 和第一个Open Source Web Design(OSWD)是不同的哦,也是精品,不过有些是要钱的 http://www.openwebdesign.org/

感觉这个也有些不错的内容
http://www.mb5u.com/

Tags: CSS Comments: 0

source uploaded

这个blog的code已经放入google code里面了

http://code.google.com/p/xian-min/

献丑了。

Tags: source open Comments: 147

简单容错

到目前为止只有简单的错误处理,如果大家发现有什么地方不对的地方,欢迎指正。

Thanks

Tags: Comments: 0

留言

增加了留言功能,欢迎提意见!

Tags: comment Comments: 16

Progress Update, July, 10th, 2007


1. 修改了侧边栏categories和tags的数据获取方法。以前采用reference的方法,太笨

2. 增加了edit post的功能

Tags: progress Comments: 0