原创 Pyqt4
Qt Designer: Signal pyuic4 qt.ui > qt.python Connect the signal with method: QtCore.Qobject.connect(object, signal, me
原创 py2exe
For windows application: #mysetup.py from distutils.core import setup import py2exe setup(windows=[{"script":"app.py"
原创 Ruby yield and block and Iterators
The key word 'yield' is the core of Iterators, So I use a Iterators to clarify the 'yield' class Sequence incl
原创 RSA算法研究與PYTHON實現
RSA算法是一種非對稱密碼算法,所謂非對稱,就是指該算法需要一對密鑰,使用其中一個加密,則需要用另一個才能解密。 RSA的算法涉及三個參數,n、e1、e2。 其中,n是兩個大質數p、q的積,n的二進制表示時所佔用的位數,就是所謂
原创 Ruby mysql lib compare with Python mysql lib
#Lib include: #Ruby: require "mysql" #Python: import MySQLdb as mdb #Connect db #Ruby: dbh = Mysql.real_connect("local
原创 sqlite3 modify the column
BEGIN TRANSACTION; CREATE TEMPORARY TABLE temp_table(a); INSERT INTO temp_table SELECT a FROM 表; DROP TABLE 表; CREATE
原创 Create desktop entry for ubuntu
[Desktop Entry] Encoding=UTF-8 Name=Wis twiki Type=Link URL=http://twiki.wiszhou.info Icon=gnome-fs-bookmark Name[en_US
原创 Trouble shooting during upgrade ubuntu 10.04 to 10.10
n unresolvable problem occurred while calculating the upgrade: Can not mark 'ubuntu-desktop' for upgrade This can be ca
原创 Build Git service on Linux and setup Git client on Windows
1. Build Git repository on Linux # apt-get install git gitweb# git --bare init --shared2. Setup Tortoisegit on Window
原创 Apach directory configure
<Directory "/usr/share/cactus/web"> #DirectoryIndex index.cgi # make sure the homepage is index.cgi Options +Ex
原创 MySQL engines MyISAM and InnoDB
The MySQL database has different types of storage engines. The most common are the MyISAM and the Inno
原创 Python child, parent, super CLASS
Python中對象方法的定義很怪異,第一個參數一般都命名爲self(相當於其它語言的this),用於傳遞對象本身,而在調用的時候則不必顯式傳遞,系統會自動傳遞。 舉一個很常見的例子: >>> class Foo: def ba
原创 The method of parameters given in Python
def fun(self, a, b, c=None): The default value can be given, but must be given all in the rightest def fun(self,a,b,
原创 Cookie
he Cookie info would be placed in the HTTP header Set-Cookie: name = VALUE; expires = DATE; path = PATH; domain = DOMA
原创 My shell environment variable
~/.bashrc invoke when user logging in /etc/bash.bashrc invoke when OS bootupping /etc/rc.local invoke when local shell