ZigBee 、Mesh
-
mark一下
-
记录一下。
IO测试工具:IOZone : http://www.iozone.org/
电影:Body of Lies (谎言之躯) : http://www.douban.com/subject/2091015/
-
MySQL的奇怪问题
MySQL : 5.1.22-rc
FreeBSD : 7.0 release有个表 (MyISAM) 420M大小,内有一mediumtext字段,占据了大部分的空间。
把这个字段删掉之后表大小变成1.1G了。囧死了~~。谁能告诉我这个是怎么回事。-_-~ -
php_url_encode
最近几天在折腾网站的url规范化的问题。
对urlencode函数比较好奇,扒出C代码来看了一下。原来是16进制的东东。
Ascii Table : http://www.asciitable.com/
C代码 (取自php-5.2.6/ext/standard/url.c 430-489行)- /* rfc1738:
- …The characters ";",
- "/", "?", ":", "@", "=" and "&" are the characters which may be
- reserved for special meaning within a scheme…
- …Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
- reserved characters used for their reserved purposes may be used
- unencoded within a URL…
- For added safety, we only leave -_. unencoded.
- */
- static unsigned char hexchars[] = "0123456789ABCDEF";
- /* {{{ php_url_encode
- */
- PHPAPI char *php_url_encode(char const *s, int len, int *new_length)
- {
- register unsigned char c;
- unsigned char *to, *start;
- unsigned char const *from, *end;
- from = s;
- end = s + len;
- start = to = (unsigned char *) safe_emalloc(3, len, 1);
- while (from < end) {
- c = *from++;
- if (c == ‘ ‘) {
- *to++ = ‘+‘;
- #ifndef CHARSET_EBCDIC
- } else if ((c < ‘0‘ && c != ‘–‘ && c != ‘.‘) ||
- (c < ‘A‘ && c > ‘9‘) ||
- (c > ‘Z‘ && c < ‘a‘ && c != ‘_‘) ||
- (c > ‘z‘)) {
- to[0] = ‘%‘;
- to[1] = hexchars[c >> 4];
- to[2] = hexchars[c & 15];
- to += 3;
- #else /*CHARSET_EBCDIC*/
- } else if (!isalnum(c) && strchr("_-.", c) == NULL) {
- /* Allow only alphanumeric chars and ‘_‘, ‘–‘, ‘.‘; escape the rest */
- to[0] = ‘%’;
- to[1] = hexchars[os_toascii[c] >> 4];
- to[2] = hexchars[os_toascii[c] & 15];
- to += 3;
- #endif /*CHARSET_EBCDIC*/
- } else {
- *to++ = c;
- }
- }
- *to = 0;
- if (new_length) {
- *new_length = to – start;
- }
- return (char *) start;
- }
- /* }}} */
-
休假纪(四)一句话
生活教会你如何生活
2009-2-2心态发生了很好的转变
生命快乐 -
UPDATE、DELETE里的子查询
直接套用子查询在条件里会出错。
- 如子查詢是以下列形式出現,
- SELECT … FROM (子查詢)
- 則必須給子查詢一個別名,
- SELECT … FROM (子查詢) AS 別名 …
- http://gradyli.wordpress.com/2008/03/06/mysql-%E5%AD%90%E6%9F%A5%E8%A9%A2/
-
转型
60% sale & market
-
Windows Server 2003 Resource Kit Tools
Windows Server 2003 Resource Kit Tools
里面很多小工具还是很实用的。
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd
-
干了一件蠢事
FreeBSD上折腾gmirror。
VMWare上,用两个虚拟磁盘,然后测软Raid1(split)的I/O。
还在奇怪为什么Raid Array的读取速度还不如单个磁盘的快。。。。
昨天才突然想起。。。。。
在VMWare上测磁盘的I/O是件多么愚蠢的事情。。
再怎么折腾,也跳不出物理磁盘的限制。。。囧~~
