外汇储备能用来"藏汇于民"吗?
刘纪鹏老师一篇很有意思的 文章,对这个问题有兴趣的同学建议读一读。
刘纪鹏老师一篇很有意思的 文章,对这个问题有兴趣的同学建议读一读。
注意:如果您熟悉RAID请不必浪费时间阅读这篇文章。
为什么用RAID-Z/RAID-Z2而不是RAID-5呢?
答案是:RAID-5有一个不可避免的问题,即它必须使用后备电源才能保证写入的正确性。这也是为什么我一直极力反对使用低档RAID卡和软件实现的RAID-5的原因。
1987年,菲律宾前总统访华,谈到南沙主权问题时说:“至少在地理上,那些岛屿离菲律宾更近。”
邓小平抽了口烟,说:“在地理上,菲律宾离中国也很近。”
很久没有shared chaos了,今天来一道小学数学题。
有一个水池,进水的速度恒定,提前接了一定时间的水;水池有若干出水口均在底部,假设所有出水口的出水速度一样(换言之,每多开一个出水口,速度即相应线性提高—-本人注)。同时打开3个出水口,水池水位在80秒后会下降到0;同时打开4个出水口,水池水位在50秒后会下降到0;问:如果同时打开8个出水口,水位需要多长时间下降到0?
其实是个很简单的常识,居然搞了我半个小时……
fgetc()的返回值是int,因为这个值除了返回拿到的字符之外,还兼作错误标志。由于fgetc()允许文件中包含任意内容,所以只好增大返回值的宽度来表达。
WxClassInfo的析构函数(~WxClassInfo)死循环是什么原因?检查发现RTTI的那个链表有个环,但是不太明白这个表(从上下文看是由Register()方法维护的)为什么能出现环?
Pretty interesting project: Haiku.
It looks like that it uses a lot of FreeBSD code by creating glue between FreeBSD and BeOS API, on the other hand they are using MIT license for most of their code, making sharing code easy.
I have taken some time to rewrite memchr(3) to utilize similiar algorithm as my strlen(3) did. Two different formular, however, would have a roughly 1/3 difference.
Currently I have taken an approach that when memchr(3) is trying to match a pattern of 8-bit, then consider the string as 8-bit, which uses the first formular which is expected to have uniform O(n) time complexity by reducing unnecessary branches.
This approach, however, might be bogus since if you find 7-bit character within a 8-bit string, in that case, memchr(3) would perform poorly, if there are a lot of characters having their MSB as 1.
今年 1 月 27 日发表的 《GCC运行环境豁免条款 (英文版)》 再次狠狠地打了苹果的耳光。
原先的豁免条款如下:
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.