2011年5月15日

体验校园WLAN (CMCC-EDU)

今天路过北科大操场的时候,无意中在手机Wifi列表中发现了CMCC和CMCC-EDU.然后尝试连接了下CMCC-EDU,按照验证页面的提示,发送TYEDU到10086,开通了个体验账户,有效期至2011年12月21号,每月可以免费使用120小时。


找了个信号最好的地方(大概2格的样子),打开应用汇,下载了几个软件,感觉网速在100KB左右。然后用网速测试的软件,连到长春的server,测试速度下载40KB,上传150KB,估计是因为周围是学生宿舍,很多人在用这个下载东西吧。无论如何还算可以的,但是后来发现就那么很小的一块地方信号还可以,稍微走远一点,基本上就是龟速了。

上网查了下移动随e行的资费标准,北京的还挺贵的呀,好几个等级,其中一个是20元40小时,但是貌似比3G上网卡的便宜一点...

其实资费只是一方面,信号的覆盖的范围和强度才是关键。北京市国内Operator WLAN比较多的地方吧,但是感觉仍然只有一些写字楼或者高校里面才有,而且通常情况下,覆盖的范围都很小,信号强度也都一般。

例如我租住的房子里没有有线网络的,只能用3G上网卡,如果CMCC的WLAN信号可以覆盖到这里,也许我会考虑使用它的服务。

路漫漫兮其修远,Operator们得WLAN之路还要赶紧走呀!

2011年4月5日

How to fix graphics driver errors (Windows7 installed on Mac Mini 2009)

MAC MINI安装WINDOWS7 的显卡驱动错误的解决方案
详细步骤请见(我在自己的机器上测试成功) http://bbs.updrv.com/showtopic-10917.aspx


蓝牙驱动解决方案
直接驱动精灵更新蓝牙驱动, 给安装了最新的博通Broadcom的驱动

2010年4月26日

Mac下Vim的配置(以Snow Leopard为例)

Mac Snow Leopard中的Vim配置文件的路径如下
/usr/share/vim/vimrc

因此需要修改这个文件,如果修改这个文件,那么是对所有的用户均生效。

如果你的Mac是多用户,可以仅仅修改自己的配置文件:把这个vimrc copy一份到自己的用户目录下,重新命名为.vimrc即可

比如你的用户叫apple,执行如下命令:
cp /usr/share/vim/vimrc ~apple/.vimrc

进入自己的用户目录
cd ~apple

修改.vimrc文件归读写属性(或修改文件组)
sudo chmod o+w .vimrc (或者 sudo chmod 777 .vimrc)

在.vimrc文件最后加上
syntax on        "这一行设置语法高亮
set nu           "显示行号
set ts=2 et      "设置tab对其的字符数为2
set shiftwidth=4 "自动缩进对其的字符数为4
set fdm=syntax   "设置代码折叠模式
set autoindent   "开启自动缩进功能

保存退出

重新打开Terminal,打开一个C/C++文件,一个新的语法加亮的亮丽界面就出现了
Vim能够自动高亮大部分常用的语言:C/C++ ,perl ,python,shell,php....
各位喜欢Vim并且用Mac OS进行开发的Programers, just try & enjoy it

PS: 附送一张强悍的Vim命令图
Vim快捷键全图-Vim shortcut keybord

2010年4月25日

NKOJ 1040: The Tower of Babylon

NKOJ 1040: The Tower of Babylon
这是题目的原文,题目的分析和源码在后面

Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in line with the educational nature of this contest, we will tell you the whole story:
The babylonians had n types of blocks, and an unlimited supply of blocks of each type. Each type-i block was a rectangular solid with linear dimensions (xi, yi, zi). A block could be reoriented so that any two of its three dimensions determined the dimensions of the base and the other dimension was the height.
They wanted to construct the tallest tower possible by stacking blocks. The problem was that, in building a tower, one block could only be placed on top of another block as long as the two base dimensions of the upper block were both strictly smaller than the corresponding base dimensions of the lower block. This meant, for example, that blocks oriented to have equal-sized bases couldn't be stacked.

Your job is to write a program that determines the height of the tallest tower the babylonians can build with a given set of blocks.

2010年4月21日

文件相关的两个DOS 命令(Command)

Windows里面常见的文件操作,如果文件夹里面有很多的内容,比如nGB大小,那么在命令行下面去做会比较快的。


1.删除一个文件夹以及里面的所有内容。


RMDIR /S /Q [Your directory path here]


2.拷贝一个文件夹以及里面所有的内容到一个新的路径。


XCOPY [old path] [new path] /E /I /Q /H /K