- PHP使用Composer
- Python中package管理使用easy_install或者pip
- Ruby中使用gem
- 在Node.js中使用npm ((Node.js Package Manager)
- perl使用CPAN
2016年12月19日 星期一
各程式語言的Package manager/Module manager
Package manager/Module manager:
2016年12月15日 星期四
改變Visual Studio Code的theme color
1. 按Ctrl-P,輸入>theme,再選preferences: color theme
2. 使用向上、向下鍵就可以選擇不同佈景顏色,而且立刻可以看到更換後的結果
Visual Studio Code的Zen mode (全螢幕模式)的使用
VSCode 1.8版開始有Zen Mode
1. Zen模式讓你隱藏除編輯器之外的所有UI(沒有Activity Bar, Status Bar, Sidebar and Panel)並切換到全螢幕模式來專注於你的代碼。
2. Zen Mode選單View menu, Command Palette或快捷鍵Ctrl + K Z切換。
3. 按二次ESC建鍵可以離開Zen Mode
1. Zen模式讓你隱藏除編輯器之外的所有UI(沒有Activity Bar, Status Bar, Sidebar and Panel)並切換到全螢幕模式來專注於你的代碼。
2. Zen Mode選單View menu, Command Palette或快捷鍵Ctrl + K Z切換。
3. 按二次ESC建鍵可以離開Zen Mode
2016年12月14日 星期三
解決Visual Studio Code的Suggest功能Ctrl+space和中文輸入法衝突
因為在editor中的Suggest功能Ctrl+space和中文輸入法衝突,所以
改Keybinding為alt+s
方法如下:
1.選File/Pref/Keyboard Shortcuts
視窗左邊為Default,視窗右邊為自訂
2. 視窗左邊用ctrl+F找Ctrl+space,複製設定到右邊視窗
改成
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "alt+s", "command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && editorTextFocus && !editorReadonly" },
]
3. 如下圖
改Keybinding為alt+s
方法如下:
1.選File/Pref/Keyboard Shortcuts
視窗左邊為Default,視窗右邊為自訂
2. 視窗左邊用ctrl+F找Ctrl+space,複製設定到右邊視窗
改成
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "alt+s", "command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && editorTextFocus && !editorReadonly" },
]
3. 如下圖
改變Visual Studio Code的編輯區的字型大小 (Editor font size設定)
編輯區的字型太小了,改大一點:
1.選File/Pref/User Settings
2. 從Default Settings複製到Settings.json
改成
// 將您的設定放入此檔案中以覆寫預設值
{
// Controls the font size in pixels.
"editor.fontSize": 17,
}
3. 如圖
1.選File/Pref/User Settings
2. 從Default Settings複製到Settings.json
改成
// 將您的設定放入此檔案中以覆寫預設值
{
// Controls the font size in pixels.
"editor.fontSize": 17,
}
3. 如圖
2016年12月13日 星期二
解決Visual Studio Code的node.js自動提示功能無法正確動作
在編輯javascript檔時輸入程式時VS Code會根據內容自動提示
1. root folder中建立一個新的jsconfig.json
只要有這個檔案存在,VS Code就會認為這個專案是Javascript,這樣Javascript的Auto Hint才會動作。
2.使用node.js的typings模組產生node.js的typing definition檔(TypeScript語言)
安裝typings模組的指令:
npm install -g typings
使用typings工具去安裝Node.js及Express的type definition檔的指令:
typings install dt~node --global --save
typings install dt~express dt~serve-static dt~express-serve-static-core --global --save
其中的dt~前置詞是要Typings工具去DefinitelyTyped repository找type definition檔。
1. root folder中建立一個新的jsconfig.json
只要有這個檔案存在,VS Code就會認為這個專案是Javascript,這樣Javascript的Auto Hint才會動作。
2.使用node.js的typings模組產生node.js的typing definition檔(TypeScript語言)
安裝typings模組的指令:
npm install -g typings
使用typings工具去安裝Node.js及Express的type definition檔的指令:
typings install dt~node --global --save
typings install dt~express dt~serve-static dt~express-serve-static-core --global --save
其中的dt~前置詞是要Typings工具去DefinitelyTyped repository找type definition檔。
2016年2月23日 星期二
如何decompile Android app取得Java程式碼及XML檔、圖檔等資源
1. 使用WinRAR將.apk檔,當做是.zip檔解壓縮,得到
classes.dex等檔案
2. decompil dex檔
解壓apk檔後,你會發現res目錄的圖片沒有加密,但java源碼編譯成了一個classes.dex檔,無法用普通的反編譯class檔的方法來處理,dex2jar可以將dex檔轉換成普通的jar包。
下載地址:
dex2jar:http://code.google.com/p/dex2jar/downloads/list
jd-gui:http://jd.benow.ca/
apktool:http://code.google.com/p/android-apktool/downloads/list
解壓下載的dex2jar,把解壓後的資料夾放到系統磁片跟目錄中並把這個目錄加到系統path變數中,就可以直接用:dex2jar.bat或dex2jar.sh轉換dex檔了。
DOS行命令如下:dex2jar.bat xx\classes.dex(xx是classes.dex檔所在的路徑)。
將在同目錄得到普通jar包:classes_dex2jar.jar,就可以用處理普通jar包的方法來反編譯這個jar包得到原文件。
APKDB下載地址:
https://bitbucket.org/idoog/apkdb/downloads
https://bitbucket.org/idoog/apkdb/downloads/Apkdb_v2.0.0_20160215.exe
說明網站:
http://www.idoog.cn/?cat=535
"APK+Dex文件反编译及回编译工具(APKDB)2.0.0调试版20160215"
http://hrtsea.com/15755.html
下載後執行,解壓到j:\apk目錄。
選擇語言[5]繁體(BIG5)。
選擇"[1]使用 預設圖示"。
選擇 "[Y]使用新的安裝器"。
使用方式:
在檔案總管中,以mouse右鍵點選.apk檔,選擇"反組建"
J:\apk\Apkdb\Craining>d2j_dex2jar.bat ..\..\unpack\classes.dex
dex2jar ..\..\unpack\classes.dex -> .\classes-dex2jar.jar
classes.dex等檔案
2. decompil dex檔
解壓apk檔後,你會發現res目錄的圖片沒有加密,但java源碼編譯成了一個classes.dex檔,無法用普通的反編譯class檔的方法來處理,dex2jar可以將dex檔轉換成普通的jar包。
下載地址:
dex2jar:http://code.google.com/p/dex2jar/downloads/list
jd-gui:http://jd.benow.ca/
apktool:http://code.google.com/p/android-apktool/downloads/list
解壓下載的dex2jar,把解壓後的資料夾放到系統磁片跟目錄中並把這個目錄加到系統path變數中,就可以直接用:dex2jar.bat或dex2jar.sh轉換dex檔了。
DOS行命令如下:dex2jar.bat xx\classes.dex(xx是classes.dex檔所在的路徑)。
將在同目錄得到普通jar包:classes_dex2jar.jar,就可以用處理普通jar包的方法來反編譯這個jar包得到原文件。
APKDB下載地址:
https://bitbucket.org/idoog/apkdb/downloads
https://bitbucket.org/idoog/apkdb/downloads/Apkdb_v2.0.0_20160215.exe
說明網站:
http://www.idoog.cn/?cat=535
"APK+Dex文件反编译及回编译工具(APKDB)2.0.0调试版20160215"
http://hrtsea.com/15755.html
下載後執行,解壓到j:\apk目錄。
選擇語言[5]繁體(BIG5)。
選擇"[1]使用 預設圖示"。
選擇 "[Y]使用新的安裝器"。
使用方式:
在檔案總管中,以mouse右鍵點選.apk檔,選擇"反組建"
J:\apk\Apkdb\Craining>d2j_dex2jar.bat ..\..\unpack\classes.dex
dex2jar ..\..\unpack\classes.dex -> .\classes-dex2jar.jar
2016年2月22日 星期一
How to get apk files of apps after installing them from Google Play Store ?
1. install "ASTRO file manager" into my mobile phone
2. run ASTRO app
3. open left side menu by touching Arrow icon on upper-left side
4. select "Tool" menu by touching lower-left side icon
5. select "App manager" in Tool menu
6. select the app that you want to backup in the list of installed app
7. select "Backup" in the bottom menu
8. connect phone to PC with USB cable
9. select Mobile phone storage disk driver and the select "Internal Storage" folder by using "File Manager" in Windows
10. Browse apk file item in that folder, such as "com.cousinHub.PFChartsWidget.apk"
或是
如何將已經安裝的app備份成apk?
在手機中安裝「ES檔案瀏覽器」軟體。執行軟體後,按下左上角選單功能/庫/程式,長按要備份的軟,點選下方的「備份」。備份的預設路徑為:"sdcard/backups/apps/"。
2. run ASTRO app
3. open left side menu by touching Arrow icon on upper-left side
4. select "Tool" menu by touching lower-left side icon
5. select "App manager" in Tool menu
6. select the app that you want to backup in the list of installed app
7. select "Backup" in the bottom menu
8. connect phone to PC with USB cable
9. select Mobile phone storage disk driver and the select "Internal Storage" folder by using "File Manager" in Windows
10. Browse apk file item in that folder, such as "com.cousinHub.PFChartsWidget.apk"
或是
如何將已經安裝的app備份成apk?
在手機中安裝「ES檔案瀏覽器」軟體。執行軟體後,按下左上角選單功能/庫/程式,長按要備份的軟,點選下方的「備份」。備份的預設路徑為:"sdcard/backups/apps/"。
2016年2月10日 星期三
Apache Cordova Tutorial 第一次測試筆記
依據Apache Cordova Tutorial網站
https://ccoenraets.github.io/cordova-tutorial/create-cordova-project.html
https://ccoenraets.github.io/cordova-tutorial/create-cordova-project.html
- Open a Command window (Windows), and type the following command to install the Cordova CLI:
npm install -g cordova
- Navigate (cd) to a directory where you store projects on your file system.
- Using the Cordova CLI, create a Cordova project named Workshop in a directory named workshop:
cordova create workshop com.tom.workshop Workshop 會自動建出一個workshop目錄。
- navigate to the project directory:
cd workshop
Add support for the Android platform
Make sure the Android SDK and the ant build tool are available on your system. The Android SDK is available here. Both the android and ant tools must be available in your path. On the command line, make sure you are in the workshop directory and type:
cordova platforms add android
Make sure you are in the workshop directory, and add basic plugins to your projects: cordova plugin add cordova-plugin-device
cordova plugin add org.apache.cordova.console
- navigate to the project directory:
PATH=...;C:\Android\sdk\platform-tools;C:\Android\sdk\tools
ANDROID_HOME=C:\Android\sdk
產生.apk檔
cordova build android
用USB cable,將android手機接上電腦。
在手機上執行.apk檔
cordova run android
就可以在手機上看到執行的結果了!
2016年1月26日 星期二
在Windows上安裝Node.js及PhoneGap
因為要試試PhoneGap,所以要開始安裝Node.js。
Node.js是使用Chrome's V8 JavaScript engine的JavaScript runtime。
步驟如下:
點選:
下載後執行v5.5.0 Stable。
選擇安裝目錄為 C:\Program Files\nodejs\
按照安裝軟體畫面出的步驟進行到安裝完成。
2. 在Windows的"開始" 選單中的搜尋程式或檔案對話框輸入:cmd
進入Windows系統的命令列模式。
輸入
npm install -g phonegap
初次執行 npm,大約需要2- 30分鐘。
3. 這樣就可以開始使用了 !
$ phonegap create my-app
$ cd my-app
$ phonegap run android
訂閱:
文章 (Atom)