Feeds:
文章
评论

Archive for 2009年三月月

用UTF-8字符集合,每个中文按字索引,适合简单的过滤型搜索和排序
#
# Sphinx configuration file sample
#
# WARNING! While this sample file mentions all available options,
# it contains (very) short helper descriptions only. Please refer to
# doc/sphinx.html for details.
#
#############################################################################
## data source definition
#############################################################################
source src1
{
# data source type. mandatory, no default value
# known types are ‘mysql’, ‘pgsql’, ‘xmlpipe’, ‘xmlpipe2′
type                    = mysql
#####################################################################
## SQL settings (for ‘mysql’ [...]

Read Full Post »

会议室

手机拍的

Read Full Post »

把项目deploy到根目录下,要把path设置成空字符串,而不是”/”

<Context path=”” docBase=”D:ProjectsFooBar” />

Read Full Post »

64位JDK的好处:

更​宽​的​数​据​路​径​:RAM 和 CPU 之​间​的​管​道​加​倍​了​,这​提​高​了​受​内​存​限​制​的​程​序​的​性​能​。
64 位​内​存​解​析​机​制​提​供​了​虚​拟​的​无​限​制​的​(1 exabyte)堆​分​配​。​然​而​,大​的​堆​会​影​响​到​垃​圾​回​收​(garbage collection)。
运​行​在​大​于 1.5GB 内​存​(包​括​用​于​垃​圾​回​收​优​化​的​空​闲​空​间​)的​系​统​里​的​应​用​程​序​应​该​使​用 64 位​的 JVM。
运​行​在 32 位 JVM 上​且​不​要​求​大​于​最​小​堆​大​小​的​应​用​程​序​并​不​能​在 64 位​的 JVM 里​受​益​。​除​去​内​存​因​素​,运​行​在​具​有​相​同​的​相​对​时​钟​和​体​系​结​构​的 64 位​硬​件​上​的 Java 程​序​并​不​比​在 32 位​平​台​上​快

调整系统缺省的JDK:

[root@vsr ~]$ /usr/sbin/alternatives –config java
There are 2 programs which provide ‘java’.
Selection Command
———————————————–
1 [...]

Read Full Post »

How to change git commit’s author and contact email?
不说不知道,方法很简单啊:
[~/path/to/repo]$ git config user.name “hugozhu”
[~/path/to/repo]$ git config user.email hugozhu@gmail.com
方法出处:http://github.com/guides/tell-git-your-user-name-and-email-address

Read Full Post »

See: How FriendFeed uses MySQL to store schema-less data
FriendFeed是风头比较旺,据说跟Twitter和Facebook的NewsFeed比有后来居上,他们是这样使用Mysql的:
1)尽量把Mysql作为数据存储而已, 表结构尽量简单;
2)  增加功能,尽量创建新表而不是修改已有的表结构;
3)  应用程序的数据数据实体,使用hash结构,用zlib打包后存在一个字段内,几乎不用Join;
4)对于查询需求,建立相应的索引表(表里存储需查询的实体属性),而不是在实体数据表上建索引;
上面那些经验有不少是反范式的,但对于苛刻性能要求,范式就让它一边凉快去吧。。。

Read Full Post »