Monday, March 17, 2014

Default Color Order of Matlab's plot Function

[ 0 0 1]
[ 0 0.5 0]
[1 0 0]
[0 0.75 0.75]
[0.75 0 0.75]
[0.75 0.75 0]
[0.25 0.25 0.25]

Friday, July 12, 2013

Fix Duplicated items in "Open With" menu


In terminal, type
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -all s,l,u; killall Finder

Friday, March 15, 2013

關於MBR與GPT分區管理


http://www.ha97.com/5365.html
目前我們可以接觸到的大部分x86架構的pc和服務器,還在採用上世紀遺傳下來的BIOS+MBR組合。 BIOS,基本輸入輸出系統 (Basic Input-Output System),是軟件與硬件之間的一個接口,可以把它看作一個翻譯在中文與英語之間,雖然兩者完全不同,不過可以讓大家瞭解 BIOS 所處的位置,BIOS 通常被寫入一塊 ROM 芯片連接在主板上,當然也有直接寫入北橋的,不過相當少見。 BIOS 幾乎是完全用彙編語言編寫,很大程度上決定了主板的性能及穩定性。
MBR,主引導記錄 (Master Boot Record),也就是我們常見的分區方法,不過管理員外的最終用戶很少知道它的存在,MBR 分區的標準決定了MBR只支持在2TB以下 (超過2TB的只能管理 2TB) 的硬盤中創建4個分區表項,要獲得更多分區,需要次級結構–擴展分區。擴展分區可以再次被分成一個或多個邏輯磁盤,也就是普通情況下的C盤以外的盤,或說第一個分區以外的部分,有些情況下 Windows 裡的C盤可能會是一個邏輯分區。
EFI,可擴展固件接口 (Extensible Firmware Interface),由英特爾 (Intel) 公司提出的一種替代 BIOS 的升級方案。 EFI 的位置很特殊,它不像是 BIOS 那樣自己即是固件又是接口,EFI 只是一個接口,位於操作系統與平台固件之間。
GPT,全局唯一標識磁盤分區表 (GUID Partition Table),GUID,全局唯一標識符 (Globally Unique Identifier) 。GUID 分區表 (GPT) 是作為 Extensible Firmware Interface (EFI) 計劃的一部分引入的。當然,你也可以在 BIOS 的PC中使用 GPT 分區,雖然 GPT 來自以 EFI 計劃,但並不依賴於 EFI。GPT 相對於以往 PC 普遍使用的主引導記錄 (MBR) 分區方案更加靈活。比如可以超過 MBR 分區表項4個的限制,在 GPT 規範裡對分區的數量幾乎是沒有限制的,大家在網上可以查到的128個實際上是 Windows 系統 (支持 GPT 的 Windows) 做出的限制,Linux下沒這個限制。 GPT 對可管理磁盤大小也超過了 MBR 的2TB (1TB = 1024GB) 而達到了 18EB (1EB = 1024TB) 。在 MBR 分區方案中操作系統的引導是通過放在磁盤最開始 (第一扇區) 裡的 MBR (這裡的 MBR 是指主引導記錄,而不是主引導記錄分區方案,兩者是同名的。我的猜測是為了與 GPT 分區方案區分,使用了主引導記錄引導方式的名字 MBR 來命名此種分區方案,我查不到確切的資料正明我的猜測是否正確,只能大家努力區分一下了。) 。把重要的信息 (如分區信息、目錄等) 放在某個扇區裡是 MBR 分區方案的方法,而 GPT 把這個信息放到了分區裡,Intel的解釋是這樣可以更加明確更加安全。 GPT 分區為了保護自己不受 MBR 方案下磁盤管理軟件的危害,在磁盤的最開始位置 (第一個扇區) 建立了一個保護分區 (Protective MBR),這種分區的類型標識為 0xEE。蘋果系統Mac OS X下這個保護分區大小為 200MB,這個分區在 Window磁盤管理器裡名字叫做 GPT 保護分區。這個分區可以讓不能識別 GPT 的磁盤管理軟件把 GPT 磁盤看成一個未知格式的分區,而不是錯誤地當成一個未分區的磁盤。
常用的 MS-DOS 分區表格式不能在一個大於 2TB 的設備上使用。要支持大於2TB的設備,GPT 分區表格式必須被使用,並且必須使用parted工具程序來創建和管理 GPT 分區。

Monday, October 29, 2012

How to disable the Windows built-in zip functionality?

http://superuser.com/questions/37578/how-to-disable-the-windows-built-in-zip-functionality
Windows 7
The process is similar to Vista in terms of deleting the same registry keys. However, due to additional protections built-in, you must first change ownership of the keys to your username, which must be an administrator account.

Open Registry Editor (go to Start Menu -> Run and type “regedit“).
Navigate to HKEY_CLASSES_ROOT\CLSID and perform steps 3-7 for each of the two keys:
{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31} and
{0CD7A5C0-9F37-11CE-AE65-08002B2E1262}.
Right-click on the key and select “Permissions…”. Click “Advanced” and then the “Owner” tab.
Select your username from the list.
Check the box next to “Replace owner on subcontainers and objects”. Click “OK”.
In the “Security” tab, select your username and grant Full Control. (If your username is not there, click “Add…”, type your username, then click “Check Names” and “OK”.) Click “OK” to apply the permissions settings.
Delete the registry key.
Repeat the process for the second key.
Restart Windows and enjoy a life free from zip folders!

Sunday, October 21, 2012

How to disable The Splash of Office 2010?

HKEY_CLASSES_ROOT\Word.Document.8\shell\Open\command
"C:\Program Files\Microsoft Office\Office14\WINWORD.EXE" /q

HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command
"C:\Program Files\Microsoft Office\Office14\EXCEL.EXE" /e

HKEY_CLASSES_ROOT\PowerPoint.Slide.8\shell\Open\command
"C:\Program Files\Microsoft Office\Office14\POWERPOINT.EXE" /s

Saturday, August 18, 2012

Thursday, August 16, 2012

Connecting Linux and Windows Together With a Network Cable

http://www.ehow.com/how_7208875_connect-ubuntu-windows-crossover-cable.html


Windows:

1 Connect the crossover cable to the network port of both the Ubuntu and the Windows computers.

2 Go to the "Start" menu and type "netcpl.cpl" in the "Run" or "search programs and files" field and press "Enter."

3 Right-click on "Local Network connection" and select "Properties."

4 Select "TCP/IP V4" and click "Properties."

5 Select "Use the following IP address" and enter 192.168.1.1 in the "IP address" field.

6 Click on the "Subnet mask" field to fill it automatically. Click "OK."

Linux:

7 Press "CTRL + ALT + F1" to open a terminal.

8 Type "sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up" and press "Enter."

9 Type your password and press "Enter."

10 Press "CTRL + ALT + F7" to go back to the graphical interface.