2011年1月30日 星期日
[影片分享] 祝我生日快樂 (Hank Wang covered)
謝謝大家給我的祝福
我的生日願望就是希望大家都能很快樂
不管是大學時一起努力的同學、當兵一起同甘苦的弟兄、平日玩在一起的朋友、一起工作的同事
雖然大家都為了生活各忙各的很少見面
但是至少我們都曾經為同一個目標努力過
希望未來我們都能過的更好、更快樂
別忘記自己的初衷、努力實現自己的夢想
2011年1月27日 星期四
[iOS Dev] 預設顯示/隱藏鍵盤 Controll Keyboard Display
顯示鍵盤
隱藏鍵盤
[tfInput becomeFirstResponder];
隱藏鍵盤
[tfInput resignFirstResponder];
2011年1月26日 星期三
[Xcode] 常用快捷鍵
Command + Alt + ↑ 在.h及.m間切換
Command + Ctrl + Arrow 在.h及.m間切換 (XCode 4)
Command + Shift + E 編輯器視窗最大化
Command + ] 增加縮排
Command + [ 減少縮排
ESC 展開所有可能的自動完成列表
Command + Ctrl + ← / → 展開或收起整個function
Command + Alt + ← / → 展開或收起整個function (Xcode 4)
Command + Shift + R 打開Console
Command + Ctrl + Alt + R 清除Console Log
2011年1月25日 星期二
[Python] PythonBee - 冠軍賽- 用嘴巴講出一套好程式
(不負責任翻譯XD)
This is from the final round where our last two contestants competed for a Kindle.
這影片是最後決戰的兩位參賽者
這影片是最後決戰的兩位參賽者
Contestants were not allowed to see their code or have it read back to them in any way. They had to specifically dictate all spelling and punctuation (and tabbing).
參賽者不允許看他們的程式碼或是反悔已經唸過的程式碼, 他們必須唸出所有的標點符號跟空白和Tab
The challenge for the last round was to write a function that would return true if and only if the string passed to it hadmatching sets of parentheses.
The challenge for the last round was to write a function that would return true if and only if the string passed to it hadmatching sets of parentheses.
最後一回合的比賽, 參賽者必須寫一個程式, 檢查匹配括號的字串, 如果是則return True
[Objective-C] 將NSDictionary新增至NSMutableArray
建立一個words的陣列, 然後建立一個dictionary存入words
Source Code
See Also
NSDictionary Class Reference
NSMutableArray Class Reference
Source Code
// 宣告array NSMutableArray *words = [NSMutableArray array]; // 宣告dictionary NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: @"Title 01", @"title", @"Explain 01", @"explain", nil]; // 將dict新增至array裡 [words addObject:dict]; // print出dict中所有資料 for (id key in dict) NSLog(@"key: %@ value: %@", key, [dict objectForKey:key]); // print出Array中所有資料 for (NSInteger i=0; i < [words count]; i++) NSLog(@"%@", [words objectAtIndex:i]); // print Array有幾筆資料 NSLog(@"Words count : %i", [words count]);Result
See Also
NSDictionary Class Reference
NSMutableArray Class Reference
2011年1月21日 星期五
[MySQL] 讓Windows下的MySQL允許使用大寫資料表(Table)名稱
Linux是對大小寫敏感的系統, 也就是同個英文字, 大小寫是不相同的
但是Windows則是不敏感的系統, 會把WINDOWS跟WinDows認成同一個字。
從Linux匯出的資料庫, 若匯入Windows會被自動轉成小寫
解決方法如下
修改
C:\Program Files\MySQL\MySQL Server 5.1\my.ini
加入以下這行
然後重新啟動MySQL Server
接著重新匯入一次資料庫即可
但是Windows則是不敏感的系統, 會把WINDOWS跟WinDows認成同一個字。
從Linux匯出的資料庫, 若匯入Windows會被自動轉成小寫
解決方法如下
修改
C:\Program Files\MySQL\MySQL Server 5.1\my.ini
加入以下這行
lower_case_table_names = 2
然後重新啟動MySQL Server
接著重新匯入一次資料庫即可
訂閱:
文章 (Atom)
