Programming with Qt – QGraphicsView – (1)

Programming with Qt – QGraphicsView2

CKEditor插件开发

本文简单并明了的介绍了CKEditor插件的开发过程

Qt中文乱码

注意: 可以使用QObject::trUtf8(xxx)

虽然内容比较旧, 但值得一看

Linux: 移除多余的行

移除多余的行可以用:

$ sed ‘/^$/d’ input.txt > output.txt
$ grep -v ‘^$’ input.txt > output.txt

Bash: 命令行参数传递

假如你需要写一个 shell 用来执行另外的程序, 那么就需要把命令行下的参数传递给那个程序. Bash下正确的做法是使用 $@. 并且需要增加括号. 比如

grep “$@”

执行python但不产生.pyc的方法

在python 2.6的后续版本中加入了 -B 选项, 来禁止产生不需要的.pyc文件. (比如在开发状态你不期望产生多余的.pyc文件来扰乱版本控制系统)

Bash: 检查变量是否设置

[ -n “${VAR+x}” ] ## Fails if VAR is unset
[ -n “${VAR:+x}” ] ## Fails if VAR is unset or empty
[ -n “${VAR-x}” ] ## Succeeds if VAR is unset
[ -n “${VAR:-x}” ] ## Succeeds if VAR is unset or empty

diff算法

DIFF算法论文 by EUGENE W.MYERS
An O(ND) difference Algorithm and Its Variations

用c++写php扩展

本篇是比较经典的学习用c++开发php扩展的教程, 可惜出处已经不可访问.

Sunrise/Sunset算法(En)

和夏令时有关的算法

分页导航: