2009, 三月 月的彙整

WindowsXP 自動啟動 NumLock

昨天剛重灌完,因為我有設登入密碼,我發現那個 numlock 不會自己亮真的很造孽
goo了一下以後得到這個資料,筆記一下…在regedit內…
HKEY_USERS\.DEFAULT\ControlPanel\Keyboard
修改InitialKeyIndicators的值可以達到開關NumLock , CapsLock , ScrollLock

「0」:關閉指示燈。
「1」:啟動「Caps Lock」鍵。
「2」:啟動「Num Lock」鍵。
「3」:「Caps Lock」及「Num Lock」兩鍵均啟動。
「4」:啟動「Scroll Lock」鍵。
「5」:「Caps Lock」及「Scroll Lock」兩鍵均啟動。
「6」:「Num Lock」及「Scroll Lock」兩鍵均啟動。
「7」:「Caps Lock」、「Num Lock」及「Scroll Lock」三鍵均啟動。

[Ghost]Load Error: NO DPMI Memory

damn… 2g 以上不能動…
要拔掉… damn…我竟然為了這個又打了一篇= = …

修改 XP 的「姓名」還有「組織」

note… save as *.reg
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"RegisteredOrganization"="組織"
"RegisteredOwner"="姓名"

PHP + JSON

筆記一下..
input:

  1. $data = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5)
  2. echo json_encode($data);

output:

  1. {"a":1,"b":2,"c":3,"d":4,"e":5}

input:

  1. $data = '{"a":1,"b":2,"c":3,"d":4,"e":5}'
  2. var_dump(json_decode($data))
  3. var_dump(json_decode($data, true));

output:

  1. object(stdClass)#1 (5) {
  2.     ["a"] => int(1)
  3.     ["b"] => int(2)
  4.     ["c"] => int(3)
  5.     ["d"] => int(4)
  6.     ["e"] => int(5)
  7. }
  8.  
  9. array(5) {
  10.     ["a"] => int(1)
  11.     ["b"] => int(2)
  12.     ["c"] => int(3)
  13.     ["d"] => int(4)
  14.     ["e"] => int(5)
  15. }