https://avatars.githubusercontent.com/u/6058558

程式狂想筆記

[Python]dict排序筆記

最近突然想到以前有在網路看到Dict做排序 覺得這些以後還用的到 所以記錄一下… 1 2 3 4 5 6 #http://www.saltycrane.com/blog/2007/09/how-to-sort-python-dictionary-by-keys/ for key in sorted(mydict.iterkeys()): print "%s: %s" % (key, mydict[key]) for key, value in sorted(mydict.iteritems(), key=lambda (k,v): (v,k)): print "%s: %s" % (key, value) 寫成現有method 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #http://code.activestate.com/recipes/52306-to-sort-a-dictionary/ # (IMHO) the simplest approach: def sortedDictValues1(adict): items = adict.items() items.sort() return [value for key, value in items] # an alternative implementation, which # happens to run a bit faster for large # dictionaries on my machine: def sortedDictValues2(adict): keys = adict.

[Python]使用pyDes.py動態加密解密

pyDes Github 1 2 3 4 5 6 7 8 9 10 11 from pyDes import * import base64 import time import random data =str(random.random())+"|"+"加密內容" k = des('DESCRYPT', CBC, '12345675', pad=None, padmode=PAD_PKCS5) d = k.encrypt(data) print "Encrypted: %r" % base64.b64encode(d) print "Decrypted: %r" % k.decrypt(d)

Win7 的視窗閃動、間歇地出現"沒有回應"

最近同學幫別人灌電腦遇到Win7裡的Office會有閃爍的問題 結果Google一下,還真的可以解決!!! 記錄一下,說不定哪天就用到了 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 一些 電腦優化程序 可能會把 電腦的關閉( Shutdown?? )速度 增加 , Win7 的視窗閃動、間歇地出現"沒有回應" ( 並非螢幕黑屏 ) 問題多數是由這所引起的 。 解 : 1 按左下角的"開始",輸入 "regedit" ,開 "regedit.exe", 程式的左方應包含一 "資料夾選巴"。 2 在選巴中選 " HKEY_USERS \ .DEFAULT \ Control Panel \ Desktop ", 程式的右方應出現一些 "登錄值" ,包含 名稱、類型、資料 等。 3 在 "登錄值" 中選取 " HungAppTimeOut " 和 " WaitToKillAppTimeOut ",點右鍵刪除。 4 在選巴中選 " HKEY_CURRENT_USER \ Control Panel \ Desktop "。 5 在 "登錄值" 中選取 " HungAppTimeOut "、" WaitToKillAppTimeOut "、" WaitToKillServiceTimeOut ",點右鍵刪除。 略解 : 1 開 登錄編輯程式( Registry Editor ) 。 2 刪除 " HKEY_USERS \ .

wifi抓到驅動但不能連wifi

今天幫主任重灌筆電,由於是用我同學整合的Win7安裝 發現驅動抓到無線網卡,但無線網卡沒法找無線Wifi 1 2 3 4 5 6 7 8 9 10 1.點擊開始菜單,在搜索欄中輸入「services.msc」(輸入時不要打引號),並按下回車。如果此時彈出用戶賬戶控制窗口,請您點擊「繼續」。 2.分別按順序雙擊打開"CNG Key Isolation" "Extensible Authentication Protocol" "WLAN AutoConfig"服務。點擊「常規」選項卡,確保「啟動類型」是「自動」或者「手動」。然後點擊「服務狀態」下面的「啟用」按鈕。 或者手動啟動三個服務 1. "CNG Key Isolation" 2. "Extensible Authentication Protocol" 3. "WLAN AutoConfig" http://rossic0989.pixnet.net/blog/post/29726514-%E7%84%A1%E6%B3%95%E5%95%9F%E5%8B%95wlan-autoconfig%E9%8C%AF%E8%AA%A4%E4%BB%A3%E7%A2%BC1068%28win7%29 結果是我同學Win7整合服務關掉orz 讓我搞這麼久

程式專案使用git的.gitignore設定

https://github.com/crilleengvall/gitignore/blob/master/Phonegap.gitignore https://github.com/crilleengvall/gitignore gitignore.io - Create Useful .gitignore Files For Your Project 參考來源: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit? http://stackoverflow.com/questions/17911204/gitignore-for-phonegap-cordova-3-0-projects-what-should-i-commit

Bower前端套件管理工具

參考來源: Gulp, Grunt, Bower以及npm http://blog.darkthread.net/post-2014-09-25-gulp-grunt-bower-npm.aspx Bower 前端套件管理工具 http://edentsai231.logdown.com/posts/198741-bower-front-end-kit-management-tool Day 1: Bower —— 管理你的客戶端依賴關係 http://segmentfault.com/a/1190000000349555

[CSS3]transition的轉場效果

1 transition: property duration timing-function delay|initial|inherit; http://www.w3schools.com/cssref/css3_pr_transition.asp http://www.wibibi.com/info.php?tid=CSS3_transition_%E5%B1%AC%E6%80%A7

Autoit筆記

由於最近多了一項收發文工作,每天都要開起電腦收發文程式。
我就想想有沒有讓程式自動化,這樣我以後就開機就好了XD
於是我就開始做了