http://blog.sina.com.cn/lance[订阅]
个人资料
分类
    内容读取中…
评论
读取中...
访客
读取中...
博文
The variable-length encoding for u30, u32, and s32 uses one to five bytes, depending on the magnitude of the value encoded. Each byte contributes its low seven bits to the value. If the high (eighth) bit of a byte is set, then the next byte of the abcFile is also part of the value. In the case of s32, sign extension is applied: the seventh bit of the last byte of the encoding is propagated to fill out the 32 bits of the decoded value.
Antony said...

MySQL on Windows performs very poorly, and it is not the fault of Windows nor Microsoft.

Alas, for several years, I was perhaps the only server developer who regularly did some work on Windows.

I had patches to fix and improve the I/O concurrency issues on Windows but none of them ever were pushed to the tree because of the 'two reviewer' requirement and the absolute lack of any other developer with Windows development knowledge who were willing to review the code.

In a nutshell, the situation today is this: MySQL on Windows only really uses the APIs which existed at the time of Windows 95.

C'est la vié.

引自 http://mysqlha.blogspot.com/2009/08/mysql-on-windows-is-
今年收到一盒标着“稻香村”的月饼,突然起意想知道是北京的还是苏州的,结果仔细一看,保定稻香村!

实在是好奇,google一下

第一个看起来有意义的结果,互动百科,看起来像是那么回事。
节选:稻香村是一个老牌子,商标所有权最早归保定稻香村所有,但由于苏州稻香村整合了保定稻香村所以现在商标归苏州稻香村持有,一些地方如北京、苏州、保定都有用这个牌子,但北京稻香村已经改为三禾商标,只是名号还叫稻香村,而且稻香村品牌真正的发源地也是苏州。

好奇为什么不是百度百科,手工搜了一下,貌似是公关过的,下面只有“北京稻香村食品集团公司”和“山东省即墨市蓝村镇稻香村”两个子词条,苏州那个完全没提。

OK,再看看维基百科怎么说,

麦姐在 MTV 2009 VMAs 的开场白,原文照录


'Michael Jackson was born in August, 1958. so was I. Michael Jackson grew up in the suburbs of the Midwest. So did I. Michael Jackson had eight brothers and sisters. So do I. When Michael Jackson was 6 he became a superstar and was perhaps the world's most beloved child. When I was 6 my mother died. I think he got the shorter end of the stick.


'I never had a mother, but he never had a childhood. And when you never get to have something, you become obsessed by it. I spent my childhood searching for my mother figures; sometimes I was successful. But how do you recreate your childhood when you are under the magnifying glass of the world for your entire life?


'There i

穿 PRADA 的农民(2009-08-25 12:28)
记着这个主题,想起的时候再写

语出这里,不过现在好象打不开
http://www.bullogger.com/blogs/immusoul/archives/305667.aspx
看陈EASON,纪念MJ(2009-07-19 22:26)
昨天被老婆拉着去看陈奕迅演唱会,买的最便宜的票,坐在一大群真心歌迷旁边,开始我觉得自己有点置身事外的感觉。

随着演唱会的进行,我也开始没心没肺的渐渐投入进去,尤其是快歌的环节,虽然 EASON 跳得真是难看,但动感的舞曲还是让人禁不住跟着摇晃起来。

终于,全场的气氛在 encore 的倒数第二首达到最高潮,音乐声响起,全场齐唱 HEAL THE WORLD,我和老婆这些天以来积压的情绪就在这一首歌中全都释放了出来,唱完后 EASON 向天敬礼,YES,THIS IS WHAT I WANT!

我的嗓子在那之后一个多小时都是哑的。
前几天计算花数程序更新版,包括了用PHP实现的高精度整数计算(只包括加减乘和乘方),理论上可以支持到任意位数,但速度实在是不够环保,就放弃吧。

运算结果:

370
407
153
371
8208
1634
9474
93084
92727
54748
548834
9800817
4210818
1741725
9926315
24678050
24678051
88593477
146511208
912985153
472335975
534494836
4679307774
32164049650
40028394225
42678290603
49388550606
32164049651
94204591914
44708635679
82693916578
28116440335967

1961190
794.1020720005

用大数函数算出来的3-14位水仙花数,在某台服务器上运行,最后一行是时间(秒)。

<?php

set_time_limit(0);

$tn = 14;    // 最多算到几位

// 乘方表
function gen_table( $tn )
{
    $ret = array();
 &
递归算“水仙花数”(2009-06-15 17:57)
闲来无事,重写高中时做过的题,“水仙花数”扩展版,算任意位数。

可以指定最多算到几位,理论据说应该是34位,但php肯定搞不定了。

USE_FUNC 用来验证 php 调函数会导致性能下降。

做了很多算法优化,在我的thinkpad用debug模式跑9位用20秒左右,想起了当年用486调类似算法的日子。

<?php

define( 'USE_FUNC', 0 );    // 是否使用函数计算

$tn = 9;    // 最多算到几位

// 乘方表
function gen_table( $tn )
{
    $ret = array();
    for ( $i=0; $i<=9; $i++ )
        $ret[$i] = pow($i,$tn);
    return $ret;
}

// 计算函数
function c( $tn )
{
    global $i, $table, $start, $end;
    
    $s1 = $s2 = 0;
    for ( $tt=0; $tt<$tn; $tt++ ) $s1 += $table[$i[$tt]];
咱也用上n记了(2009-06-14 12:23)
故事要从我记事开始说起... 那时候似乎还没有手机。

小学一二年级的时候,家里装上了电话,军线,经常和楼下的同学打电话约出去玩,当然可能大喊一声更快。那时候对电话的记忆就是外线太难播了。

到小学高年级的时候,路上开始看到有人拿着大哥大了,那挺胸凹肚的样儿,透着一股NB。

上大学以后,用打工挣的第一笔钱,我在我们房间装了个独立的固定电话(后来升级成ISDN),买了个空调,并且用上了生平第一个手机,爱立信 T28。后来,爱立信变成索爱了。

改投西门子门下,前后用了 3568, 3508, SX1,现在还很怀念经典的大S。后来,西门子变笨球(BENQ)了。

本着坚持另类和开放的原则,我换成了采用嵌入式 Linux 的 Moto ROKR E6,因为不久后就开始开车,玩手机时间一下大幅减少,几年也没折腾出什么花儿来。机器嘛,大毛病没有,小毛病不断,终于,再一次没有接到老婆电话后,领导发话了,换!

顺便说一句,去年摩记宣布要分拆手机业务,市场上一般理解为要放弃手机业务的信号。

传出我要换手机的消息后,同事送来了各种热情的推荐,包括现在市场上各种经典智能机型,当我总
害己不害人(2009-04-24 10:49)
某加湿器广告:吸烟,害己害人,用xx牌空气净化加湿器,害己不害人!