開啟 apache
sudo su
apachectl start
/Library/WebServer/Documents
http://localhost/
開啟php
cd /etc/apache2
vim httpd.conf
開啟
LoadModule php5_module libexec/apache2/libphp5.so
apachectl restart
Enjoy my life
2015年9月23日 星期三
2015年8月10日 星期一
[其他] Acer ASPIRE 4830TG enable VT-x
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
2015年6月25日 星期四
[android] 測量android 開機時間
android source code 有詳細說明
\dev\android\system\core\init\README.BOOTCHART
This version of init contains code to perform "bootcharting", i.e. generating log
files that can be later processed by the tools provided by www.bootchart.org.
To activate it, you need to define build 'init' with the INIT_BOOTCHART environment
variable defined to 'true', for example:
activated for <timeout> seconds.
Otherwise, flash your device, and start it. Then create a file on the /data partition
with a command like the following:
for example, to bootchart for 2 minutes, do:
You can also stop the bootcharting at any moment by doing the following:
bootcharting. This is not the case of /data/bootchart-start, so don't forget to delete it
when you're done collecting data:
The log files are placed in /data/bootchart/. you must run the script tools/grab-bootchart.sh
which will use ADB to retrieve them and create a bootchart.tgz file that can be used with
the bootchart parser/renderer, or even uploaded directly to the form located at:
http://www.bootchart.org/download.html
NOTE: the bootchart.org webform doesn't seem to work at the moment, you can generate an
image on your machine by doing the following:
1/ download the sources from www.bootchart.org
2/ unpack them
3/ in the source directory, type 'ant' to build the bootchart program
4/ type 'java -jar bootchart.jar /path/to/bootchart.tgz
technical note:
this implementation of bootcharting does use the 'bootchartd' script provided by
www.bootchart.org, but a C re-implementation that is directly compiled into our init
program.
===============
ubuntu 安裝方式
\dev\android\system\core\init\README.BOOTCHART
This version of init contains code to perform "bootcharting", i.e. generating log
files that can be later processed by the tools provided by www.bootchart.org.
To activate it, you need to define build 'init' with the INIT_BOOTCHART environment
variable defined to 'true', for example:
touch system/init/init.c m INIT_BOOTCHART=trueOn the emulator, use the new -bootchart <timeout> option to boot with bootcharting
activated for <timeout> seconds.
Otherwise, flash your device, and start it. Then create a file on the /data partition
with a command like the following:
adb shell 'echo $TIMEOUT > /data/bootchart-start'Where the value of $TIMEOUT corresponds to the wanted bootcharted period in seconds;
for example, to bootchart for 2 minutes, do:
adb shell 'echo 120 > /data/bootchart-start'Reboot your device, bootcharting will begin and stop after the period you gave.
You can also stop the bootcharting at any moment by doing the following:
adb shell 'echo 1 > /data/bootchart-stop'Note that /data/bootchart-stop is deleted automatically by init at the end of the
bootcharting. This is not the case of /data/bootchart-start, so don't forget to delete it
when you're done collecting data:
adb shell rm /data/bootchart-start
The log files are placed in /data/bootchart/. you must run the script tools/grab-bootchart.sh
which will use ADB to retrieve them and create a bootchart.tgz file that can be used with
the bootchart parser/renderer, or even uploaded directly to the form located at:
http://www.bootchart.org/download.html
NOTE: the bootchart.org webform doesn't seem to work at the moment, you can generate an
image on your machine by doing the following:
1/ download the sources from www.bootchart.org
2/ unpack them
3/ in the source directory, type 'ant' to build the bootchart program
4/ type 'java -jar bootchart.jar /path/to/bootchart.tgz
technical note:
this implementation of bootcharting does use the 'bootchartd' script provided by
www.bootchart.org, but a C re-implementation that is directly compiled into our init
program.
===============
ubuntu 安裝方式
- apt-get install bootchart
訂閱:
文章 (Atom)