Tuesday, October 28, 2008

让Dell Latitute X1 不自动降频!

I have finally solved( partially) solved this problem.
1. You should have all ACPI related kernel module compiled as modules not in kernrel.
2. Run this: #modprobe -r acpi_cpufreq

OK, The frequency will never go down because of overheat.

Monday, October 27, 2008

(zz)关于修改注册表(hv或rgu)的小技巧

一、改hv是最吃力不讨好的事情,要改就尽量在rgu里面改。
二.、几种改注册表方法,在合成rom过程中的优先级:provxml>rgu>hv,高优先级的覆盖低优先级的。
三、 同样是rgu,在处理的时候经常会遇到同一个地方,不同的键值,有两种处理方法:
1.把所有rgu单独复制到一个文件夹中,attrib -h -s -r *.rgu; ren *.rgu *.txt,然后搜索,选择“文件中的一个字或者词组”,输入你的关键字,这样所有包含了相关内容的rgu你就找到了,保留其中一处,或者改成一样。这是 传统方法,可以清清楚楚重复的在什么地方。
2.简单的方法:GUID在处理的时候也是有分前后优先的,这两个rgu
c60ad864-134f-4bdb-87e7-880e72c03821.rgu f558e727-40f2-49f4-b20c-6db169a62777.rgu
在处理的时候,f558e727-40f2-49f4-b20c-6db169a62777是后处理的,如果有相同主键,后处理的就会覆盖之前的。
所以你要改注册表,可以不管3721,搞一个ffffffff开头的rgu就可以。
四、我估计还是有人喜欢直接改hv文件的,当然,有时候小改一下,这样也无妨。但是生成的txt在转hv之前,检查下是否已经是unicode格式,如果是用记事本编辑的,注意不要自动换行,不然就注定失败。
五、在rgu中,文件路径要有两个\\,这是最容易出错的地方之一。

From xbeta.cn

Saturday, October 18, 2008

看看程序员都祈祷什么

The daily prayer of MLDonkey developers:
Our MLDOnkey who art in heaven,
hallowed be thy name.
Thy version come,
Thy will be done
on Overnet as it is in eDonkey.
Give us this day our daily CVS.
And forgive us our annoying,
as we forgive those who annoy us.
And lead us not into chunkloss,
but deliver us better downloads.
For thine is the kingdom, and the power, and the glory,
for ever and ever.
Amen!

Thursday, September 11, 2008

Opera Mobile 9.5 With Flash lite 3.1

Opera mobile 9.5 has yet released. But many OEM versions can be extracted through ROMs.
Flash lite 3.1 will never be retailed. But it is also in some ROMs.
What about combination!
Kuhl! It works. Now Opera Mobile have the capability to Flash 8&9 contents!
I can now display youtube inside the little screen.

http://forum.xda-developers.com/showthread.php?t=425268
http://forum.xda-developers.com/showthread.php?t=423860

Monday, September 8, 2008

关于计算机围棋的一些事实

1.Yose in the opening
2.Sente - myth or legend?
3.The advantages of gote
4.Sides are for suckers
5.Helping your opponent
6.Life - How to avoid it
7.Increasing a dead group
8.Play threats before starting a ko
9.Invasions after dame
10.Don't secure, pass!

Wednesday, September 3, 2008

回学校了

Leave and return.

Thursday, August 21, 2008

Socket in python

server:
#!/usr/bin/env python
import socket
if __name__ == '__main__':
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('localhost', 8001))
sock.listen(5)
while True:
connection,address = sock.accept()
try:
connection.settimeout(5)
buf = connection.recv(1024)
if buf == '1':
connection.send('this is one')
else:
connection.send('this is not one')
except socket.timeout:
print 'time out'
connection.close()

client:
#!/usr/bin/env python
def send():
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', 8001))
import time
time.sleep(1)
time.sleep(1)
sock.send('1')
print sock.recv(1024)
sock.close()

if __name__ == '__main__':
while(True):
send()