Category Archives:

Changing mysql password

-- Use SET PASSWORD --
SET PASSWORD FOR 'user'@'host' = PASSWORD('newpass');

-- OR update statment --
UPDATE mysql.user SET Password=PASSWORD('123') WHERE User='user' AND Host='localhost';

-- remember to flush the user table --
FLUSH PRIVILEGES;

[ibus] Ubuntu 11.10 ibus 繁體倉頡處理

Ubuntu 11.10 用scim的話,在file browser會食不到type and search的,轉用ibus但真係sucks過活塞!

強國貨係咁上下,問題好在以下python script:

/usr/share/ibus-table/engine/table.py

def get_chinese_mode (self)
    '''Use LC_CTYPE in your box to determine the _chinese_mode'''
    try:
        if os.environ.has_key('LC_CTYPE'):
            __lc = os.environ['LC_CTYPE'].split('.')[0].lower()
        else:
            __lc = os.environ['LANG'].split('.')[0].lower()
 
        if __lc.find('zh_') == 0:
            # this is a zh_XX
            __place =__lc.split('_')[1]
            if __place == 'cn':
                return 0
            else:
                return 1
        else:
            if self.db._is_chinese:
                # if IME declare as Chinese IME
                # 原本是return 0 的,改做return 1
                return 1
            else:
                return -1
    except:
        return -1