Monthly Archives: July 2010

C Traps & Tips II -- Digraphs and Trigraphs

今天写个第二遍吧,这篇有点×疼,大家见谅。 先看代码: 1 2 3 4 5 6 7 #include <stdio.h>   int main() { printf("%s", "What's this??!\n"); return 0; } 1 2 3 4 5 6 7 int main() { int a = 0; //What's a's value??????????????/ a++; return … Continue reading

Posted in Information Technology | Tagged | 3 Comments

How to Change Font of NSTextField in Interface Builder

I spent nearly a hour finding the way of changing the font of text field in Interface Builder, and I found it's really easy but hard to find... Select the NSTextField you want to change its font, press Command+T or … Continue reading

Posted in Information Technology | Tagged , | 1 Comment

C Traps & Tips I -- Duff's Device

最近又对 C 的陷阱和奇怪的用法之类的感兴趣了,于是又想写点东西,完全是主观感觉奇怪的或者是感觉是陷阱就写出来了,外加无责任分析,错了还请大家斧正…… 今天写第一篇,希望以后能多写点…… 先上代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 send(to, from, count) register short *to, *from; register count; { register n=(count+7)/8; switch(count%8){ case 0: do{ *to = … Continue reading

Posted in Information Technology | Tagged | Leave a comment

ZTE MF637 on Snow Leopard == 地雷

今天老爸弄回来一张联通上网卡,ZTE MF637,于是插上试试,过了一会识别出来一个U盘,里面是驱动,.mpkg 的,很激动,于是装上了,然后就悲剧了…… 装好之后能上网了,速度不错(废话),但是打不开 Netword Preferences 了……以为重启能解决,于是重启了,然后卡在苹果标的地方了,一直转啊转啊……启动都启动不起来了…… (省略中间各种尝试万字……) 于是祭出雪豹的光盘,安装……安装过程跟第一次安装不一样,完全是无需人工干预的,于是我很不爽,打开 log 一直在看,安装了好一会之后 OK 了,重启之后竟然什么都没丢(我以为像 Windows 一样程序起码没了),应用程序都没丢,文档当然也没丢,只是 Xcode 没法运行了,因为操作系统版本太低……于是现在正在下载接近 1GB 的更新,10.6->10.6.4…… ZTE(中兴)还是好不靠谱啊……运行了一年多没见过四国(据说现在五国了?)的系统让它一下搞崩溃了……还是苹果靠谱(在说天线门吗?),插进安装盘一会就恢复如初。要说原因,是那个驱动不支持雪豹,把系统中的一个文件(libcurl.4.dylib)替换成自己的版本了,而它的版本没有 64 位的二进制,于是崩溃了……你装个驱动起码检测一下当前操作系统版本吧…… 考据党移步这里…… 中兴你浪费我一下午! PS:新的上网卡似乎有支持雪豹的驱动,网上似乎也有下载。 Tags:Mac,Snow Leopard,ZTE Related Posts How to Change Font of NSTextField in Interface Builder (1)

Posted in Information Technology | Tagged , , | 4 Comments