2015年7月29日 星期三

[Tools] Android Studio 快速鍵




功能
Windows
Mac
刪除整行
Ctrl + Y
Cmd + Delete
清除沒用import
Alt + Ctrl + O
Option + Control + O
跳到目前變數宣告位置
Ctrl + B  or Ctrl + 滑鼠左鍵
程式架構
Ctrl + F12
Cmd + F12
尋找
Ctrl + F
Cmd + F
繼承架構圖
Ctrl + H
跳到警告位置
F2
把程式碼變註解 //
Ctrl + /
Cmd + /
把程式碼變註解 /* */
Ctrl + Shift  + /
Cmd + Option + /
取代
Ctrl + R
Cmd + R
縮排
Ctrl + Alt + L
Cmd + Option + L
擴大縮小選取範圍
Ctrl + W/Ctrl + Shift + W
Option + Up/Down
定位到字首/
Ctrl + Left/Right
Cmd + Left/Right
大小寫轉換
Ctrl + Shift + U
Cmd + Shift + U
跳行
Ctrl + G
Cmd + L
最近開啟文件
Ctrl+E
最近編輯文件
Ctrl+Shift+E
search everywhere
double Shift
全部尋找
Ctrl+Shift+R
列出目前class function和變數
 Ctrl+O
回到上次修改處
Alt+←

到下一個修改處
Alt+→

Replace in path
Ctrl+Shift+R

Settings
Ctrl+Alt+S

Project Structure
Ctrl+Alt+Shift+S

快速加上If/For/While/try-catch
Ctrl+Alt+T
Command+option+T









2015年7月10日 星期五

[Apache ] win7 灌 Apache HTTP Server


下載網址
http://www.apachelounge.com/download/

Apache 2.4.12 Win64 httpd-2.4.12-win64-VC14.zip 9 Jul '15 13.284K

修改 Apache24\conf\httpd.conf

Start apache in a DOS box:
  >httpd.exe Install as a service:



爬文網友表示skype 會佔據 port 80
關閉 skype 重開 apache 即可





2015年7月2日 星期四

[ubuntu] Shell Script 筆記


function 使用方式
    function Sync() {
        echo "sync $1"
        p4 sync "@$1"
    }
    Sync

時間使用方式
    Date=$(date +%Y%m%d)
    Time=$(date +%H%M%S)


if else 使用方式
    if [ -d "$tar" ]
    then
        echo "$tar found."
    else
        mkdir "$tar"
    fi



[ string1 = string2 ] string1 and string2 are equal
[ string1 != string2 ] string1 and string2 are not equal
[ string1 \< string2 ] string1 is lexically less than string2(e.g. 'a' is less than 'b')
[ string1 \> string2 ] string1 is lexically greater than string2(e.g. 'b' is greater than 'a')
[ -e file ] file exists
[ -f file ] file is a file
[ -d file ] file is a directory
[ n1 -eq n2 ] true if integer n1 = integer n2
[ n1 -ne n2 ] true if integer n1 <> n2
[ n1 -gt n2 ] true if n1 > n2
[ n1 -ge n2 ] true if n1 >= n2
[ n1 -lt n2 ] true if n1 < n2
[ n1 -le n2 ] true if n1 <= n2