- 博客(131)
- 资源 (8)
- 收藏
- 关注
原创 支持数据落地的memcached
<br />tstdb : http://code.google.com/p/tstdb/1. 索引结构基于ternary search tree,数据持久靠appending only log.2. 支持memcache的get、set和delete操作,支持set操作的flag和expire属性。3. 性能和memcache接近,可以下载后用bench.py来测试。缺点是还不够成熟,欢迎试用:-)
2011-04-15 10:59:00
1535
原创 Go语言的后缀数组模块尝鲜
<br /> <br />golang.org网站的全文搜索是基于suffix array实现的【http://t.cn/hBJekg】,可能觉得效果不错,就把suffix array添加到golang的标准库里面了。【http://t.cn/hBJekd】<br /> <br />package mainimport "fmt"import "index/suffixarray"func main() { fmt.Println("Hello, 世界") str:= `The Go p
2011-04-02 11:19:00
1557
原创 用Luajit玩Linux共享内存
<br /><br />1. shmtest_wirte.lua<br /> <br /> <br />ffi = require 'ffi'<br />ffi.cdef[[<br /> int shmget(int key,int size,int flag);<br /> void * shmat(int shmid,const void* ptr,int flag);<br /> void perror(const char* msg);<br /> char * strcpy(cha
2011-03-25 16:08:00
1976
原创 [备忘]通过LuaJIT的FFI使用mmap功能
ffi = require 'ffi'ffi.cdef[[typedef __int32 __time32_t;typedef __int64 __time64_t;typedef __time64_t time_t;typedef __time32_t time_t;typedef __time32_t time_t;typedef long _off_t;typedef _off_t off_t;typedef unsigned int _dev_t;typedef short _dev_t;type
2011-03-09 17:29:00
3345
2
原创 发起一个开源项目TreapDB
<br />NoSQL盛行的年代,我也趟趟水。<br /> <br />地址:http://code.google.com/p/treapdb/<br /> <br />感觉在开发过程中学到了很多东西,有空再总结一下。<br /> <br />
2010-12-05 15:09:00
1461
原创 关于ACID中的I
<br />一直以来对于ACID中的Isolation不是很清楚,偶然发现wiki上解释的挺清楚的:<br />http://en.wikipedia.org/wiki/Isolation_(database_systems)<br />
2010-09-07 12:13:00
994
转载 一个比较优美的partition算法的写法
<br /> private int partition(long[] array, int lo, int hi) { long x = array[hi]; int i = lo - 1; for (int j = lo; j < hi; j++) { if (array[j] <= x) { i++; swap(array, i, j);
2010-09-03 16:57:00
1258
转载 统计单词个数
<br />编程珠玑上摘抄一个<br />cat $* | // 输入文件<br />tr -cs A-Za-z '/012' | // 每行一个单词<br />tr A-Z a-z | // 大写变小写<br />sort | // 排序<br />uniq -c | // 相同连续的单词换成一行并计数
2010-08-18 13:48:00
792
原创 发现httpsqs是一个学习unix下c编程的很好的范例
<br />地址:http://code.google.com/p/httpsqs/source/browse/trunk/httpsqs.c<br /> <br /> <br />除了unix的经典如文件操作,socket,signal等,还有tokyo carbinet和libevent等时尚lib的用法
2010-08-17 14:38:00
887
转载 [mark]DoctorInterview.Com
<br />常见算法面试题(全):http://www.doctorinterview.com/A.html
2010-08-15 23:40:00
654
原创 Lua 求海量数据Top 100
local function heapfy_up(heap) local i = heap.size local p = math.floor(i/2) local t while i>1 and heap.data[i] t = heap.data[i] heap.data[i] = heap.data[p] heap.data[p] = t i = p p = math.floor(i/2) endend
2010-08-14 20:24:00
968
原创 LuaJIT-2.0.0-beta4 windows binary
<br />我编译的Luajit的windows版,有空真得研究下它的算法,为什么优化得这么快呢? python的psyco也无法做到。<br /> <br />http://xmlgrid.appspot.com/static/luajit.zip<br /> <br />
2010-08-06 16:00:00
1434
原创 在windows下使用cython
环境:cygwin或mingw,总之要有gcc.exe相关工具 A. 安装cython: 1. 修改D:/Python25/Lib/distutils/distutils.cfg [build] compiler = mingw32 2. setup.py install B. 弄个快捷方式: D:/P
2010-05-04 15:56:00
4258
原创 微软的State Machine Workflow
http://channel9.msdn.com/shows/Endpoint/Endpoint-Screencasts-Creating-Your-First-State-Machine-Workflow/ 这个视频挺好的,对我有点启发。
2010-03-17 13:32:00
823
原创 const char *
The trick is to read the declaration backwards (right-to-left): const int a = 1; // read as "a is an integer which is constant"int const a = 1; // read as "a is a constant integer"Both are the sa
2010-03-15 09:56:00
778
原创 [转]JVM性能调优
1:64位机器可以突破内存3G的限制 2:Xmx和XmsMaxPermSize和MinPermSize设置一样大,这样可以减轻伸缩堆大小带来的压力 3:如果对响应时间要求比较高,是有CMS垃圾回收算法 4:对于像使用SSH,EOS之类的perm 区域设置大一些 5:为了避免Perm区满引起的full gc,建议开启CMS回收Perm区选项:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled 6: 避免程序调用System.gc()。(r
2010-01-14 19:24:00
657
原创 python性能增强工具shedskin 0.3版发布
http://code.google.com/p/shedskin/ Shed Skin 0.3 - support for 3 new standard library modules (now about 20 in total): - itertools (jeremie roquet) - heapq (jeremie roquet) - csv (convert
2010-01-12 15:03:00
1432
原创 [转]java不同容器不同操作系统下中文问题解决方法
java不同容器不同操作系统下中文问题解决方法 -Ddefault.client.encoding=GBK -Dfile.encoding=GBK -Duser.language=Zh -Duser.region=CN 添加以上java虚拟机参数即可
2010-01-11 10:19:00
762
原创 Python-- 有权重的随机选择, Weighted Random Choice
import random def windex(lst): an attempt to make a random.choose() function that makes weighted choices accepts a list of tuples with the item and probability as a pair wt
2010-01-09 12:17:00
4454
原创 MySQL 存储 schema-less的数据
from timyang’s blog 综合取舍,使用MySQL来存储key/value(schema-less)数据,value中可以放: Python dict JSON object 实际friendfeed存放的是zlib压缩的Python dict数据,当然这种绑定一种语言的做法具有争议性。
2009-12-24 10:52:00
1711
原创 van der Aalst真牛
拜读了这篇《Formalization and Verification of Event driven Process Chains》,无论是思想还是写作技巧都让我受益匪浅。
2009-12-16 17:02:00
702
原创 MySQL服务器主从同步版本问题
[ERROR] Master reported an unrecognized MySQL version. Note that 4.1 slaves cant replicate a 5.0 or newer master.
2009-12-15 09:07:00
570
原创 C++里面的几个生僻操作符
今天看一本算法书,发现C++竟然支持这样几个操作符:<?, <?=,>?,>?= 大概相遇max,min这种函数的作用,带等号的可以赋值。
2009-12-11 17:27:00
482
原创 Sphinx将推出实时增量搜索引擎
And, while youre busy upgrading, well probably be busy building 1.x-alpha with incremental (real-time) updates for Christmas. http://www.sphinxsearch.com/index.html
2009-12-10 10:12:00
588
原创 如何快速的阅读一本书的精华
网络时代的新办法: 在Goolge中输入: 书名 “笔记” 尤其适合只想了解下书中干活的情况。 例如:C陷阱与缺陷 “笔记”
2009-11-25 18:10:00
658
原创 JOIN 还是 IN ; 一条还是多条
Join Decomposition Many high-performance web sites use join decomposition. You can decompose a join by running multiple single-table queries instead of a multitable join, and then per- forming t
2009-11-25 15:43:00
499
原创 快速的表复制
mysql> CREATE TABLE innodb_table LIKE myisam_table; mysql> ALTER TABLE innodb_table ENGINE=InnoDB; mysql> INSERT INTO innodb_table SELECT * FROM myisam_table;
2009-11-25 14:29:00
384
原创 MyISAM比InnoDB快是误传
It’s an excellent idea to run a realistic load simulation on a test server and then literally pull the power plug. The firsthand experience of recovering from a crash is priceless. It saves nasty
2009-11-25 14:20:00
467
原创 MySQL的内存表的局限性
Although Memory tables are very fast, they often don’t work well as a general- purpose replacement for disk-based tables. They use table-level locking, which gives low write concurrency, and they
2009-11-25 13:57:00
535
原创 InnoDB的Primary Key不易过大
InnoDB tables are built on a clustered index, which we will cover in detail in Chapter 3. InnoDB’s index structures are very different from those of most other MySQL storage engines. As a result,
2009-11-25 13:50:00
499
QRe 正则表达式测试工具
2008-01-05
小孙Java反编译专家2.0
2007-08-16
IceSword终结者
2007-04-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人