發表文章

Android的SQLite版本問題

使用SQLite上的Foreign Key Constraints與Full-Text Searches時,所要面對的版本問題。 一開始在開發Android上的SQLite時,並不會注意到版本的問題,直到想要使用Foreign Key Constraints與Full-Text Searches時,才注意到它們所支援的SQLite版本在Android上必須是什麼版本以上。 SQLite 3.7.11: 19-4.4-KitKat 18-4.3-Jelly Bean 17-4.2-Jelly Bean 16-4.1-Jelly Bean SQLite 3.7.4: 15-4.0.3-Ice Cream Sandwich 14-4.0-Ice Cream Sandwich 13-3.2-Honeycomb 12-3.1-Honeycomb 11-3.0-Honeycomb SQLite 3.6.22: 10-2.3.3-Gingerbread 9-2.3.1-Gingerbread 8-2.2-Froyo SQLite 3.5.9 7-2.1-Eclair  4-1.6-Donut 3-1.5-Cupcake 由於我所要開發的APP必須支援2.2以上的Android版本,根據SQLite官網上的文件 Foreign Key Constraints 必須是SQLite版本3.6.19以上,可支援Android 2.2以上。 Full-Text Searches FTS3:必須是SQLite版本3.5.0以上,可支援Android 1.5以上。 FTS4:必須是SQLite版本3.7.4以上,可支援Android 3.0以上。 如果要支援Android 2.2以上的話,Full-Text Searches只能使用FTS3。 參考資料 1. Version of SQLite used in Android? 2. SQLite官網

Git push的Matching與Simple

當git push沒有指定branch時,設定Matching或Simple會有什麼差別? 自從我把Mac OS 從10.7升級到10.9後,Git的版本也因此從1.7升級到了1.8.3.4,在每次要使用Git做push的動作時,都會跑出這個警告。 warning: push.default is unset; its implicit value is changing in Git 2.0 from ‘matching’ to ‘simple’. To squelch this message and maintain the current behavior after the default changes, use: git config —global push.default matching To squelch this message and adopt the new behavior now, use: git config —global push.default simple See ‘git help config’ and search for ‘push.default’ for further information. (the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode ‘current’ instead of ‘simple’ if you sometimes use older versions of Git) 但卻是有看沒有懂,可是Push並沒有失敗,我就沒有急著去找出為什麼XD 直到最近我看到了這篇文章,才了解到原來這是因為為改版後,git push可以設定成兩種模式:simple、matching。 主要的差異 當使用git push指令時,後面如果沒有指定branch時,設定Matching或Simple會有不同的結果。 Matching 這是在改版前預設的做法,它會push所有本地端跟伺服器端已經設定為upstream的braches。 Simple 它只會push當下所在的branch,並不會push其他的branches。 設定你的預設 設定好其中一種你想使用的p...

【Mac】提升工作效率必備APP-Alfred

圖片
Alfred 是筆者認為每一台Mac都一定要裝的APP,一款能夠大大提升工作效率的APP,更重要的是這是一款免費軟體,除非你想擁有更進階的功能才需要額外購買 Powerpack ! 免費版提供了以下功能: 1. 檔案搜尋File Search 2. 應用程式Application 3. 網頁搜尋Web Search 4. 計算機Calculator 5. 字典Spelling 6. 系統指令System Commands