Friday, November 22, 2013

移除Windows 8的默認輸入法 Remove Default Input Method in Windows 8

在Windows 8裡,當你安裝慣用的輸入法后,就會自動出現難以移除的默認輸入法。
So in Windows 8, after you installed your beloved input methods, there will be default input methods that are automatically added, and refusing to be removed.


若你不懂得使用Registry Editor,請另請高明代勞,免得把系統搞亂。
A word of precaution: if you don't know how to operate Registry Editor, find someone to do it for you to avoid system malfunction. Here's how to remove it.

  1. Win+R打開Run窗口。輸入regedit,按OK
    Press Win+R to open the Run dialog. Type regedit and click OK.
  2. 展開到這里:HKEY_CURRENT_USER\Software\Microsoft\CTF\TIP
    Expand this key: HKEY_CURRENT_USER\Software\Microsoft\CTF\TIP
  3. 這時你必須展開你要移除的輸入法。如果你安裝了幾個語言的輸入法,你可能需要試幾下來找到正確的輸入法。
    At this point, you have to expand the Input Method that you want to remove. If you use multiple languages and have a few default input methods, you may have to experiment a bit to find the correct one.

  4. 雙點Enable。在出現的窗口中輸入0,然后按OK
    Double-click Enable. A dialog will appear. Enter 0 and click OK.

  5. 現在按Win+Space,討厭的輸入法不見了!
    Press Win+Space now, the silly input method is no longer there!











Monday, November 4, 2013

要買馬車嗎?來看檳城新報



算我孤陋寡聞,一直誤以為光華是檳城最早的報紙,其實應該是1895年8月8日創刊的《檳城新報》(Penang Sin Poe)。據說檳城新報在新馬淪陷前夕停刊,應該是1941年12月7日吧?

最棒的是,我們還可以看到當年的報紙,且是從1895年8月10日到1941年9月30日,就在新加坡國立大學圖書館。但不必跑去新加坡,直接就可以下載!上面的馬車就是1895年8月10日的廣告之一。

報頭上有清朝年號:大清光緒廿一年 乙未六月二十日。地址是“中街第二百三十號二百三十二號門牌”。就在Beach Street,但為什么叫“中街”?原來Beach Street不同路段有不同的中文名,總共有六個。早期的報紙連標點符號都沒呢!

1919年12月29日,“夢中孽緣”小說連載。這時清朝已經完蛋,進入民國了。報頭還有孔子紀年,就是孔子誕生開始算起的年份,由公元前551年開始。1919年就是551+1919=2470。標點符號也出現了!



1930年2月7日某頁有則啟事:“關仔角副刊今天出版,刊在第十頁,望閱者注意! ”。旁邊還有個“異禽發現”!還有“檳”字不知怎么却變成“梹”了。
但這“異禽”到底是什么東東?我來試著還原:
異禽發現
身長六十尺   翅寬二丈
飛如閃電    聲若雷鳴
據x日居民陳洪報告云。xx該處上空。恒有怪鳥飛旋。時高時低。身長度幾六十尺。飛如閃電。聲若雷鳴。動物家李君聞訊。特於前日上午駕輪抵陳家坐候。未幾。忽聞軋軋聲自遠飛來。陳x呼曰。“異禽至矣”。李急仰視。則飛機也。李知陳之錯誤。實由視官不良。乃出其眼鏡令戴而視之。則與圖畫中之飛機。無稍差異。因笑x李曰。“x習聞其聲而弗察其形。竟誤以為怪鳥,今而x知眼鏡之不可少x”。乃急往檳城新街亞東眼鏡公司配制一具云。

哈哈,這根本就是亞東的廣告帖!



這就是第十頁啦!看到“我們的關仔角”嗎?還是你在注意“双桃煙”啊?



這是圖書館保存的最后一份檳城新報:1941年9月30日,離新馬淪陷和停刊還有兩個月。報頭上寫著:報費 梹城報合光華報每月【一元九角】。我也不知道兩份報紙是什么關系,不過謝詩堅先生說“及后《檳城新報》承入《光華日報》”。


 大家没事就去下載讀讀當年檳城舊聞吧!


P/S: 本篇文章也帖在佳禮

Thursday, October 17, 2013

Installing Android ADB driver in Windows 8.1 64-bit when all else fails

For some reason I just couldn't get my machine to recognize Xperia J in Windows 8.1 64-bit. Even after installing latest Sony PC Companion (2.10.174).  Device Manager kept showing yellow exclamation mark to an 'Android'.

Here's the solution, but I don't promise it will work on your device!

1. Find out your device's VID and PID

  1. Open Device Manager, right-click that Android with yellow exclamation mark and click Properties.
  2. Go to Details tab.
  3. In Property, select Hardware Ids.
  4. Right-click the value and click Copy.
  5. Paste the value somewhere.


2. Download Android USB Driver

  1. Run Android SDK Manager.
  2. Expand Extras, tick Google USB Driver, click Install packages.
  3. After installation, look for the driver location by hovering mouse over Google USB Driver. The location will appear in the tooltip.


3. Modify android_winusb.inf

  1. Go to the usb driver location, for example in the above picture it is c:\Android\android-studio\sdk\extras\google\usb_driver
  2. Make a backup copy of android_winusb.inf
  3. Open android_winusb.inf with a text editor. Notepad is fine but Notepad++ is better, it will syntax highlight the inf file!
  4. Look for [Google.NTx86], and insert a line with your device's hardware ID that you copied above, for example
  5. [Google.NTx86]
    
    
    
    ; ... other existing lines
    
    
    
    ;SONY Sony Xperia J
    %CompositeAdbInterface% = USB_Install, USB\VID_0FCE&PID_6188&MI_01
    
    
  6. Look for [Google.NTamd86], and insert the same lines, for example:
  7. [Google.NTamd64]
    
    
    
    ; ... other existing lines
    
    
    
    ;SONY Sony Xperia J
    %CompositeAdbInterface% = USB_Install, USB\VID_0FCE&PID_6188&MI_01
    
    
  8. Save the file.

4. Disable driver signing

  1. Run Command Prompt as an administrator
  2. Paste and run the following commands:
    bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON
    
    
    
    
    
  3. Restart Windows.

5. Install driver

  1. Open Device Manager, right-click that Android with yellow exclamation mark and click Update Driver Software.
  2. Click Browse my computer for driver software.
  3. Enter or browse to the folder containing android_winusb.inf, eg: C:\Android\android-studio\sdk\extras\google\usb_driver
  4. Click Next.
  5. The driver will install.
  6. Run adb devices to confirm your device is working fine.

6. Re-enable driver signing

  1. Run Command Prompt as an administrator
  2. Paste and run the following commands:
    bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING OFF
    
    
    
  3. Restart Windows.
  4. Run adb devices to reconfirm!

Sunday, September 22, 2013

error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

Had this error when building a Qt program in Visual Studio 2012:
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
There was a main() in main.cpp, which was included and compiled in the project. So what happened?
Turned out that qtmaind.lib was removed from Linker Dependencies, added it back and problem solved. Don't ask me why I removed it in the first place :)

Here's my general way to solve this particular linker error when playing with Qt in Visual Studio:
  1. Ensure main() is defined in a file (eg: main.cpp).
  2. Ensure the file (eg: main.cpp) is included in the project.
  3. Ensure the file is really being compiled, type some garbage and build. If there are errors in the file then it's being compiled.
  4. Right-click the project and click Properties.
  5. Go to Configuration Properties -> Linker
    1. Go to Input, ensure Additional Dependencies has one of this entry:
      • qtmaind.lib (for Debug build)
      • qtmain.lib (for Release build)
    2. Go to System, ensure SubSystem is correct.
    3. Go to Advanced, ensure Entry Point is correct. The default is blank. Usually you don't mess with it and leave it blank.