Archive for 8月, 2008

修复jpeg-6b的一个bug

星期四, 8月 14th, 2008

记得一年前发现很多手机上传的照片经过打水印后会损坏图片,后来经过多方搜索,终于找到了解决方案,当时解决后就没做一下记录,时隔一年,终于又要用到,可一时找不到解决方法,突然想起当年打包(rpm)时还留下源码,于是去jpeg-6b下的源代码进行md5比对,终于找到jdmarker.c该文件做过一些修改,赶紧记录:

修改如下:

/*
* WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c);
*/

其实就是注释掉这段代码而已。

预先在存储节点上建立2级目录

星期二, 8月 12th, 2008

预先在存储节点上建立2级目录是个好方法,可以提高程序的执行效率,少了目录是否存在的判断。

同时也减少磁盘io的压力,毕竟一次性建好目录,以后是不会去调整的。

Q4M

星期四, 8月 7th, 2008

What is Q4M?

Q4M (Queue for MySQL) is a message queue licensed under GPL that works as a pluggable storage engine of MySQL 5.1, designed to be robust, fast, flexible. The development started in late December of 2007, and although it is very primitive, operates quite swiftly.
To start using Q4M, download either a binary or source distribution from the install page, and follow the installation instructions. A small tutorial is also avialable. You may use SQL to access Q4M queues, or there is a wrapper module available for perl (Queue::Q4M).
For more information, please read the developer’s weblog (Kazuho@Cybozu Labs) or subscribe to the mailing list
看上去非常不错,自己没实际用过,希望有用过的朋友分享一下经验。

获取教育网IP段

星期三, 8月 6th, 2008

做DNS要更新各SP的网段,下面简单的总结一下早上获取教育网的经过。

其实很简单,首先去教育网官方去获取最新的IP段:

只要下载:http://www.nic.edu.cn/RS/ipstat/ 这个url里的数据,然后进行分析(可惜这个url必须在教育网内才可以正常访问)。

内容如下:

(more…)