tag:blogger.com,1999:blog-58841358620138930362024-03-14T01:47:42.120-07:00VITA。LEEBrain memory is badVITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-5884135862013893036.post-36516429330106145562016-12-23T00:55:00.001-08:002016-12-23T00:56:38.940-08:00<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">Install SikuliX on Ubuntu14.04 </span><br />
SikuliX automates anything on the screen of your desktop computer.<br />
<br />
<div style="line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
<span style="color: #e06666;">Step 01: </span></div>
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><code style="border-radius: 5px; color: black; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// Confirm java version (java version 1.7.0)</span></b></span></code><code style="border-radius: 5px; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; font-size: medium; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ java -version </span></code></span></code><code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// PreInstall tools</span></b></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo apt-get install wmctrl</span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo apt-get install xdotool</span></code></div>
<div style="line-height: 30px;">
<br />
<span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif; font-size: 16px;">Step 02: </span>download sikulixsetup-1.1.0.jar</div>
<div>
<span style="font-size: x-small;">(https://launchpad.net/sikuli/sikulix/1.1.0/)</span><br />
<span style="font-size: x-small;"><br /></span>
<span style="font-size: x-small;"><span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif; font-size: 16px;">Step 03: </span></span><span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif;">R</span><br />
<div>
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>install sikuli-ide sikulixsetup-*.jar</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans serif" , sans-serif , serif; font-size: xx-small;">vm@vm:~$ sudo java -jar </span><span style="background-color: transparent;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;">sikulixsetup-1.1.0.jar</span></span></code><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-MsiTJs-IPUc/WFzmKc73xcI/AAAAAAAAAO8/pJr456t_cO4kuR4yOFRIL2oRCPJLyu_jwCLcB/s1600/setup_dialog.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="331" src="https://2.bp.blogspot.com/-MsiTJs-IPUc/WFzmKc73xcI/AAAAAAAAAO8/pJr456t_cO4kuR4yOFRIL2oRCPJLyu_jwCLcB/s640/setup_dialog.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
</div>
<br />
<div style="line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
<div style="font-family: "Times New Roman"; font-size: medium;">
</div>
</div>
</div>
<br />
<span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif; font-size: 16px;"> </span><span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif;"><span style="font-size: x-small;">OR</span></span><br />
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>install sikuli-ide from apt-get</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans serif" , sans-serif , serif; font-size: xx-small;">vm@vm:~$ sudo apt-get install sikuli-ide</span></code></div>
</div>
<div>
<br /></div>
<div style="line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
<div style="font-family: "Times New Roman"; font-size: medium;">
<span style="font-size: x-small;"><span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif; font-size: 16px;">Execute sikuli-ide: </span></span><br />
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>execute sikuli-ide</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo java -jar sikulix.jar</span></code></div>
</div>
<br />
<div style="font-family: "Times New Roman"; font-size: medium; line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
</div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<code style="line-height: 14px;"><br /></code></div>
<div style="font-family: "Times New Roman"; font-size: medium;">
<span style="font-size: x-small;"><span style="color: #e06666; font-family: "trebuchet" , "trebuchet ms" , "arial" , "verdana" , sans-serif; font-size: 16px;">Execute sikuli script: </span></span><br />
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>execute sikuli scripts</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo java -jar sikulix.jar -r *.sikuli</span></code></div>
</div>
<div style="font-family: "Times New Roman"; font-size: medium;">
<code style="line-height: 14px;"></code></div>
<br />
<div style="font-family: "Times New Roman";">
<code style="line-height: 14px;"><code style="line-height: 14px;"><br /></code></code></div>
<br />
<div style="font-family: "Times New Roman"; font-size: medium; line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
</div>
</div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<br /></div>
</div>
<div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div>
<div>
<div style="line-height: normal;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 14px;"></span><span style="line-height: 14px;">Reference:</span></span></b></div>
</div>
<div style="line-height: normal;">
<span style="font-family: "times new roman"; font-size: x-small;">SikuliX - QUICKSTART- http://www.sikulix.com/quickstart/</span><br />
<span style="font-family: "times new roman"; font-size: x-small;">Offline Setup - </span><span style="font-family: "times new roman"; font-size: x-small;">http://sikulix.com/specials/files/offline-setup.html</span><br />
<span style="font-family: "times new roman"; font-size: x-small;">Sikuli 在你的 Ubuntu - </span><span style="font-family: "times new roman"; font-size: x-small;">http://ccaloha.cc/blog/2011/12/17/install-sikuli-in-ubuntu/</span></div>
</div>
<div style="font-family: "times new roman"; line-height: normal;">
<span style="line-height: 14px;"><br /></span></div>
<div style="font-family: "times new roman"; line-height: normal;">
<br /></div>
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-14553221019584266862016-12-23T00:34:00.000-08:002016-12-23T00:34:37.523-08:00<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">Shell Script: scripts pacakge for PC-Monitor on Ubuntu</span><br />
<br />
<span style="color: #3d85c6; font-size: medium;">PC_Monitor.sh</span><br />
<pre class="prettyprint" style="-webkit-text-stroke-width: 0px; background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); color: black; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 1em; orphans: 2; overflow: auto; padding: 1em; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="line-height: 14px;"><span style="color: black; font-size: medium;">
#!/bin/bash
echo -------------------------------------------
echo SCRIPT: "$(basename "$0")"
echo -------------------------------------------
BASEDIR=$(cd "$(dirname "$0")"; pwd -P) # for normal file
###### MAIN ######
echo $BASEDIR
ping 127.0.0.1
uname -a > $BASEDIR/Log/ifconfig.log
date >> $BASEDIR/Log/ifconfig.log
ifconfig >> $BASEDIR/Log/ifconfig.log
</span></code></pre>
<br />
<span style="color: #3d85c6; font-size: medium;">exec_PC_Monitor.sh</span><br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span style="color: black; font-size: medium;">
#!/bin/bash
echo -------------------------------------------
echo SCRIPT: "$(basename "$0")"
echo -------------------------------------------
BASEDIR=$(cd "$(dirname "$0")"; pwd -P) # for normal file
CALLSCRIPT=$BASEDIR/PC_Monitor.sh
LOGDIR=$BASEDIR/Autoit_Log
###### check Keyboard key:CapsLock ######
echo "[CHK] ...check Keyboard key:CapsLock"
$SikulixDIR/turnoff_key_CapsLock.sh
###### MAIN ######
echo "[TIME-START]" $(date)
mkdir $BASEDIR/Autoit_Log
## CAPTURE SCREEN
scrot -q 70 $BASEDIR/Autoit_Log/exec-screen.jpg
## CALL PROCESSNAME
echo "[CALL] ...>>> " $CALLSCRIPT
gnome-terminal --geometry=80x10+0+360 -x $BASEDIR/PC_Monitor.sh
## CAPTURE SCREEN DONE
scrot -q 70 $BASEDIR/Autoit_Log/exec-screen-done.jpg
# xterm -e $CALLSCRIPT
echo "[TIME-END]" $(date)
</span></code></pre>
<div>
<div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div style="font-family: "times new roman"; line-height: normal;">
<br />
<div style="font-family: "Times New Roman";">
<span style="color: #3d85c6; font-size: medium;">kill_PC_Monitor.sh</span></div>
<pre class="prettyprint" style="-webkit-text-stroke-width: 0px; background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); color: black; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 1em; orphans: 2; overflow: auto; padding: 1em; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="line-height: 14px;"><span style="color: black; font-size: medium;">
#!/bin/bash
echo -------------------------------------------
echo SCRIPT: "$(basename "$0")"
echo -------------------------------------------
BASEDIR=$(cd "$(dirname "$0")"; pwd -P) # for normal file
PROCESSNAME=PC_Monitor
SCREEN_Q=10
###### MAIN ######
echo "[TIME-START]" $(date)
## KILL PROCESSNAME
scrot -q $SCREEN_Q $BASEDIR/Autoit_Log/kill-screen01.jpg
ping -c 3 127.0.0.1
echo "[CALL] ...>>> kill process" $PROCESSNAME
kill -15 $(ps aux | grep $PROCESSNAME | grep -v grep | awk '{print $2}')
## KILL-DONE
ping -c 3 127.0.0.1
scrot -q $SCREEN_Q $BASEDIR/Autoit_Log/kill-screen-done.jpg
echo "[TIME-END]" $(date)
</span></code></pre>
</div>
</div>
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-27791989451295075402016-12-23T00:06:00.001-08:002016-12-23T00:34:57.855-08:00<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">Shell Script: install NVMe driver and format DUT on Ubuntu</span><br />
<br />
<span style="color: #3d85c6; font-size: medium;">turnoff_key_CapsLock.sh</span><br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span style="color: black; font-size: medium;">
#!/bin/bash
echo -------------------------------------------
echo SCRIPT: "$(basename "$0")"
echo -------------------------------------------
BASEDIR=$(cd "$(dirname "$0")"; pwd -P) # for normal file
echo $BASEDIR
rmmod dnvme
modprobe nvme
## reinstall NVMe driver
echo lsmod | grep nvme
echo $(lsblk)
sleep 5
echo $(lsblk)
## fdisk NVMe device
echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/nvme0n1
mkfs -t ext4 /dev/nvme0n1p1
mkdir -p /media/nvme
mount /dev/nvme0n1p1 /media/nvme
sleep 5
echo 'DONE...'
</span></code></pre>
<div>
<div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div style="font-family: "times new roman"; line-height: normal;">
<br /></div>
</div>
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-15877350568684953132016-12-22T23:47:00.000-08:002016-12-22T23:47:02.691-08:00<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">Shell Script: TurnOff Key-Capsslock on Ubuntu</span><br />
<br />
<span style="color: #3d85c6; font-size: medium;">turnoff_key_CapsLock.sh</span><br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span style="color: black; font-size: medium;">
#!/bin/bash
echo -------------------------------------------
echo SCRIPT: "$(basename "$0")"
echo -------------------------------------------
BASEDIR=$(cd "$(dirname "$0")"; pwd -P) # for normal file
PIC=$BASEDIR/ClientAP-Wallpaper.png
KEY_CAPSLOCK_TURNOFF='00000002'
KEY_CAPSLOCK_TURNON='00000003'
###### MAIN ######
KEY_CAPSLOCK_STATE=$(xset q | grep LED | awk {'print $10'})
echo $KEY_CAPSLOCK_STATE
if [ "$KEY_CAPSLOCK_STATE" == "$KEY_CAPSLOCK_TURNON" ]
then
echo "Turn off KEY: CAPSLOCK."
xdotool key Caps_Lock
fi
</span></code></pre>
<div>
<div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div style="font-family: "times new roman"; line-height: normal;">
<br /></div>
</div>
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-4571054644864177012016-12-22T23:41:00.002-08:002016-12-22T23:46:28.482-08:00<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">Shell Script: set desktop wallpaper on Ubuntu</span><br />
<br />
<span style="color: #3d85c6; font-size: medium;">set_wallpaper.sh</span><br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span style="color: black; font-size: medium;">#!/bin/bash
echo -------------------------------------------
echo SCRIPT: "$(basename "$0")"
echo -------------------------------------------
BASEDIR=$(cd "$(dirname "$0")"; pwd -P) # for normal file
PIC=$BASEDIR/My-Wallpaper.png
###### MAIN ######
gsettings set org.gnome.desktop.background picture-uri "file://$PIC"
</span></code></pre>
<div>
<div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div style="font-family: "times new roman"; line-height: normal;">
<br /></div>
</div>
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-84988560441463384002016-12-22T23:21:00.001-08:002016-12-22T23:59:44.548-08:00Linux工具軟體安裝<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">Linux其它工具軟體安裝</span><br />
<br />
<br />
<div style="line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
<span style="color: #e06666;">● For Capture screenshot:</span></div>
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// Auto install scrot</span></b></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ apt-get --assume-yes install scrot</span></code></div>
<div style="line-height: 30px;">
Command line example scrot:</div>
<div>
<span style="font-size: x-small;">(http://www.tecmint.com/take-screenshots-in-linux-using-scrot/)</span><br />
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>Take Specific Window Screen Shot</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ scrot -s /home/tecmint/Window.jpg</span></code></div>
<div style="line-height: 30px;">
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>Adjusting the Image Quality</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ scrot -q 90 /home/tecmint/Quality.jpg</span></code></div>
</div>
</div>
<code style="line-height: 14px;"><br /></code>
<div style="line-height: 30px;">
<div style="font-family: trebuchet, "trebuchet ms", arial, verdana, sans-serif; font-size: 16px;">
<span style="color: #e06666;">● For connect windows server share folder:</span></div>
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>Auto install cifs-utils</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ apt-get --assume-yes install cifs-utils</span></code></div>
<div style="line-height: 30px;">
Command line example cifs-utils:</div>
<div>
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>connect to share folder</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ mount -t cifs //Win-ipaddress/DirName /home/Linux-DirPath/ -o rw,user=,passowrd=,file_mode=0777,dir_mode=0777,iocharset=utf8</span></code></div>
<div style="line-height: 30px;">
<div style="line-height: 30px;">
<code style="background-color: #0e0e0e; border-radius: 5px; display: block; line-height: 25px; padding: 4px;"><span style="color: white; font-family: "verdana" , "ms sans" serif , sans-serif , serif; font-size: xx-small;"><b><span style="color: white;"> </span><span style="color: lime;">// </span></b></span><span style="background-color: transparent;"><span style="color: lime; font-size: xx-small;"><b>disconnect to share folder</b></span></span></code><code style="background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: verdana, "ms sans serif", sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ umount -a -t cifs -l</span></code></div>
</div>
</div>
<span style="color: red; font-size: medium;"></span><br />
<code style="line-height: 14px;"><br /></code>
<span style="color: red; font-size: small;"><br /></span><br />
<div>
<div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div>
<div>
<div style="line-height: normal;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"></span><span style="line-height: 14px;">Reference:</span></span></b></div>
</div>
<div style="font-family: "times new roman"; line-height: normal;">
<span style="line-height: 14px;">http://www.tecmint.com/take-screenshots-in-linux-using-scrot/</span></div>
</div>
<div style="font-family: "times new roman"; line-height: normal;">
<span style="line-height: 14px;"><br /></span></div>
<div style="font-family: "times new roman"; line-height: normal;">
<br /></div>
</div>
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-30092154905328934212014-09-04T21:09:00.001-07:002014-10-12T22:58:01.377-07:00安裝Android (AOSP) Build Environment <span style="color: #6aa84f; font-size: x-large;">1. Installing the JDK</span><br />
<br />
Java 7: For the latest version of Android<br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); color: #006600; font-size: 13px; line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span class="pln" style="color: black;">$ sudo apt</span><span class="pun" style="color: #666600;">-</span><span class="kwd" style="color: #000088;">get</span><span class="pln" style="color: black;"> update
$ sudo apt</span><span class="pun" style="color: #666600;">-</span><span class="kwd" style="color: #000088;">get</span><span class="pln" style="color: black;"> install openjdk</span><span class="pun" style="color: #666600;">-</span><span class="lit" style="color: #006666;">7</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">jdk</span></code></pre>
<div>
<code style="line-height: 14px;"><span class="pln" style="color: black;"><br /></span></code></div>
Optionally, update the default Java version by running:<br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); color: #006600; font-size: 13px; line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span class="pln" style="color: black;">$ sudo update</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">alternatives </span><span class="pun" style="color: #666600;">--</span><span class="pln" style="color: black;">config java
$ sudo update</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">alternatives </span><span class="pun" style="color: #666600;">--</span><span class="pln" style="color: black;">config javac</span></code></pre>
<br />
<br />
<br />
<span style="color: #6aa84f; font-size: x-large;">2. Installing required packages (Ubuntu 12.04)</span><br />
<br />
You will need a 64-bit version of Ubuntu. Ubuntu 12.04 is recommended. Building using an older version of Ubuntu is not supported on master or recent releases.<br />
<br />
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); font-size: 13px; line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span class="pln" style="color: black;">$ sudo apt</span><span class="pun" style="color: #666600;">-</span><span class="kwd" style="color: #000088;">get</span><span class="pln" style="color: black;"> install git gnupg flex bison gperf build</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">essential </span><span class="pun" style="color: #666600;">\</span><span class="pln" style="color: black;">
zip curl libc6</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev libncurses5</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev</span><span class="pun" style="color: #666600;">:</span><span class="pln" style="color: black;">i386 x11proto</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">core</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev </span><span class="pun" style="color: #666600;">\</span><span class="pln" style="color: black;">
libx11</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev</span><span class="pun" style="color: #666600;">:</span><span class="pln" style="color: black;">i386 libreadline6</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev</span><span class="pun" style="color: #666600;">:</span><span class="pln" style="color: black;">i386 </span><span style="color: #cc0000;"><b><span class="pln">libgl1</span><span class="pun">-</span><span class="pln">mesa</span><span class="pun">-</span><span class="pln">glx</span><span class="pun">:</span><span class="pln">i386</span></b></span><span class="pln" style="color: black;"> </span><span class="pun" style="color: #666600;">\</span><span class="pln" style="color: black;">
libgl1</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">mesa</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev g</span><span class="pun" style="color: #666600;">++-</span><span class="pln" style="color: black;">multilib mingw32 tofrodos </span><span class="pun" style="color: #666600;">\</span><span class="pln" style="color: black;">
python</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">markdown libxml2</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">utils xsltproc zlib1g</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">dev</span><span class="pun" style="color: #666600;">:</span><span class="pln" style="color: black;">i386
$ sudo ln </span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">s </span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">usr</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">lib</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">i386</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">linux</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">gnu</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">mesa</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">libGL</span><span class="pun" style="color: #666600;">.</span><span class="pln" style="color: black;">so</span><span class="pun" style="color: #666600;">.</span><span class="lit" style="color: #006666;">1</span><span class="pln" style="color: black;"> </span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">usr</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">lib</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">i386</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">linux</span><span class="pun" style="color: #666600;">-</span><span class="pln" style="color: black;">gnu</span><span class="pun" style="color: #666600;">/</span><span class="pln" style="color: black;">libGL</span><span class="pun" style="color: #666600;">.</span><span class="pln" style="color: black;">so</span></code></pre>
<div>
<br /></div>
<div>
<code style="line-height: 14px;"><span class="pln"><span style="color: #cc0000;">錯誤訊息:</span></span></code></div>
<div>
<pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #f7f7f7; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(221, 221, 221); margin-bottom: 1em; overflow: auto; padding: 1em;"><code><span class="pln"><code><span class="pln" style="line-height: 14px;">The following packages have unmet dependencies:
libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 8.0.4-0ubuntu0.6)
Recommends: <b>libgl1-mesa-dri:i386 (>= 7.2)</b>
E: Unable to correct problems, you have held broken packages.</span></code></span></code></pre>
<code><span class="pln">
</span></code>
<br />
<div style="line-height: 14px;">
<code><span class="pln"><br /></span></code></div>
<code><span class="pln">
</span></code></div>
<div>
<code style="line-height: 14px;"><span class="pln" style="color: black;"><br /></span></code></div>
<div>
<code style="line-height: 14px;"><span class="pln">參考:http://source.android.com/source/initializing.html</span></code></div>
<div>
<code style="line-height: 14px;"><span class="pln"><br /></span></code></div>
<div>
<code style="line-height: 14px;"><span class="pln"><br /></span></code></div>
<div>
<code style="line-height: 14px;"><span class="pln">錯誤訊息解法參考:(未測試)</span></code></div>
<div>
<code><span class="pln" style="line-height: 14px;">http://www.rover12421.com/2013/08/12/ubuntu-12-04-on-libgl1-mesa-glx-i386-installation-problems.html</span></code></div>
<div>
<code><span class="pln" style="line-height: 14px;">http://blog.csdn.net/</span></code><span style="line-height: 14px;">lqxandroid2012/article/details/9792365</span><br />
<code><span class="pln" style="line-height: 14px;"><br /></span></code>
<code><span class="pln" style="line-height: 14px;"><br /></span></code>
<code><span class="pln" style="line-height: 14px;"><span style="color: #6aa84f; font-family: 'Times New Roman'; font-size: x-large; line-height: normal;">3. 取得Android源始碼</span></span></code><br />
<span style="line-height: 14px;"><br /></span>
<span style="line-height: 14px;"><br /></span><span style="color: #93c47d; font-size: large; line-height: 14px;"><b>3.1 準備必要的工具</b></span><br />
<span style="line-height: 14px;"><br /></span>
<span style="line-height: 14px;">要下載 AOSP 的程式碼,你至少需要 curl、git、python 這三個程式。在 Debian 或 Ubuntu 上面你只要使用:</span><br />
<div>
<pre class="prettyprint" style="background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); line-height: 1.5; margin-bottom: 1em; overflow: auto; padding: 1em;"><code style="line-height: 14px;"><span class="pln" style="color: black;"><span style="white-space: normal;"><span style="font-family: Courier New, Courier, monospace;"><span style="font-size: x-small;">$</span><span style="font-size: x-small;"> sudo apt-get install curl git python</span></span></span></span></code></pre>
</div>
<div>
<span style="line-height: 14px;">就可以把它們弄到手。接下來我們要先設定 git:</span><br />
<pre class="prettyprint" style="-webkit-text-stroke-width: 0px; background: rgb(247, 247, 247); border: 1px solid rgb(221, 221, 221); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px 0px 1em; orphans: auto; overflow: auto; padding: 1em; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px;"><span style="line-height: 14px;">$ git config --global user.name 名字
$ git config --global user.email email</span></pre>
<span style="line-height: 14px;"><br /></span>
<span style="line-height: 14px;"><br /></span>
<span style="color: #93c47d; font-size: large; line-height: 14px;"><b>3.2 下載 repo 版本管理工具</b></span><br />
<span style="line-height: 14px;"><br /></span>
<span style="line-height: 14px;">接下來我們必需下載 repo 版本管理工具,我們可以在家目錄之下建立一個資料夾,並把這個資料夾加到 $PATH 裡面:</span><br />
<span style="line-height: 14px;"><br /></span>
<span style="line-height: 14px;">$ mkdir ~/bin</span><br />
<span style="line-height: 14px;">$ export PATH=~/bin:$PATH </span><br />
<span style="line-height: 14px;"><br /></span>
<span style="line-height: 14px;"><strike>$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo</strike> (錯誤)</span><br />
<span style="line-height: 14px;"><span style="color: red;"><b>$ curl http://git-repo.googlecode.com/files/repo-1.13 > ~/bin/repo</b></span></span><br />
<span style="line-height: 14px;">$ chmod +x ~/bin/repo</span><br />
<br />
<br />
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<div>
<div>
<b><span style="color: #93c47d; font-size: large;">3.3 開始下載 Android 程式碼</span></b><br />
<span style="line-height: 14px;"><br /></span>下載 Android 程式碼,首先我們先建立一個用來放置 Android 程式碼的資料夾:<br />
$ mkdir ~/android-src<br />
$ cd ~/android-src<br />
<br />
初始化 repo 相關的設定:(查找自己要下載的版本)<br />
$ repo init -u https://android.googlesource.com/platform/manifest<br />
<br />
接著 repo 會問你一些問題,通常使用預設值就可以了。最後就是按下:<br />
$ repo sync<br />
<span style="font-size: x-small;"># 備註:你可以加上 -j2 或 -j4 平行下載。</span><br />
<br />
<br />
或是選擇自已要下載的版本,這裡舉4.3為例<br />
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.3_r2.1<br />
<br />
<br />
之後經過漫長的等待,你就會有一份完整的 Android 程式碼!<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="line-height: 14px;"><br /></span><span style="line-height: 14px;"><br /></span><span style="line-height: 14px;"></span><span style="line-height: 14px;">參考:</span></div>
</div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="line-height: 14px;">http://blog.logan.tw/2011/10/android-open-source-project-android.html</span></div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="line-height: 14px;">http://blog.chinaunix.net/uid-26074270-id-2458828.html</span></div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="line-height: 14px;">http://www.360doc.com/content/14/0109/11/11948835_343813571.shtml</span></div>
</div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="line-height: 14px;"><br /></span></div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
</div>
</div>
</div>
<code><span class="pln" style="line-height: 14px;"><span style="color: #6aa84f; font-family: 'Times New Roman'; font-size: large; line-height: normal;"><br /></span></span></code></div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-61843127815333793932014-09-04T06:25:00.003-07:002014-09-04T06:25:26.422-07:00Linux捷徑建立<br />
終端機指令:<br />
vm@vm:~$ sudo ln -s /mnt/hgfs/VITA_640GB /home/vm/VITA_640GB<br />
<br />
<br />
在VM的桌面目錄下建立一個VITA_640GB的捷徑,指向目錄/mnt/hgfs/VITA_640GB.<br />
<div>
<br /></div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-62459301141022799642014-09-03T23:51:00.001-07:002014-09-03T23:51:04.831-07:00Ubuntu 12.04 application shortcut on top panel<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<span style="font-size: large;">建立捷徑</span></div>
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
You are logged into Gnome-Classic session with compiz enabled "Gnome-Classic (with effects)". Compiz block those customization.</div>
<h2 style="border: 0px; font-family: 'Trebuchet MS', 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 19px; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<span style="color: #6aa84f;"><br /></span></h2>
<h2 style="border: 0px; font-family: 'Trebuchet MS', 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 19px; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<span style="color: #6aa84f;">
Drag and drop</span></h2>
<ol style="border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;">
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
First Logout from this session.</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Log into "Gnome-Classic (without effects)" session</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Then choose a menu item, Press and hold <kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background: rgb(247, 247, 247); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; margin: 0px 0.1em; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Alt</kbd> key and drag the icon at the top panel.</div>
</li>
</ol>
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
You can now Logout and Login again to the "Gnome-Classic (with effect)" session.</div>
<h2 style="border: 0px; font-family: 'Trebuchet MS', 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 19px; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<span style="color: #6aa84f;"><br /></span></h2>
<h2 style="border: 0px; font-family: 'Trebuchet MS', 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 19px; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<span style="color: #6aa84f;">
Without drag and drop</span></h2>
<ol style="border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;">
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Login to "Gnome-Classic (No effect)" session</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Press and Hold the <kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background: rgb(247, 247, 247); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; margin: 0px 0.1em; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Alt</kbd></div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
While holding Alt key, right click on the top panel</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Select "Add to panel"</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Choose "Application launcher"</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Click on the "Forward" button at the bottom.</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Select the desired application icon from the list. You can add a complete category such as "Sound & Video" to the panel!</div>
</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><div style="background: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Click "Add" button or double click the Application entry.</div>
</li>
</ol>
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
You're done. Now login again to Gnome-Classic (with effect) session.</div>
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
If you want to remove any icon, Login back to the "gnome-classic (No effect" session and remove the icon by holding the <kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background: rgb(247, 247, 247); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; margin: 0px 0.1em; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Alt</kbd> key , right click and select "Remove from panel".<br />
<br />
<br />
參考:http://superuser.com/questions/476634/ubuntu-12-04-application-shortcut-on-top-panel</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-76449380681776507112014-09-03T23:47:00.000-07:002014-09-04T20:29:31.511-07:00Install google chrome on ubuntu 12.04<span style="font-size: large;">安裝Chrome</span><br />
<strong style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;"><span style="color: #6aa84f; font-size: large;"><br /></span></strong>
<strong style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;"><span style="color: #6aa84f; font-size: large;">Method 1</span></strong><br />
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
We can install chrome from google official repository . first we need to add the repository source to the update manager.</div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;">
<div style="font-size: 16px;">
<span style="color: #993300;">Step 1</span> » Setup key .</div>
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -</span></code></div>
<span style="color: #993300; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;"><br /></span>
<span style="color: #993300; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">Step 2</span><span style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;"> » </span>Type this command exactly to add chrome repositories .<br />
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'</span></code><span style="color: #993300;"></span><br />
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
<span style="color: #993300;"><span style="color: #993300;"><br /></span></span></div>
<span style="color: #993300;">
Step 3</span> » Now Update the package list .<br />
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo apt-get update</span></code><br />
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
<span style="color: #993300;"><br /></span></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;">
<div style="font-size: 16px;">
<span style="color: #993300;">Step 4</span> » Finally install google chrome</div>
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo apt-get install google-chrome-stable</span></code></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
<a href="http://www.krizna.com/wp-content/uploads/2012/06/google_chrome_ubuntu_12_04.jpg" style="color: #0f4884; text-decoration: none;"><img alt="google chrome ubuntu 12.04" class="aligncenter size-medium wp-image-318" src="http://1-ps.googleusercontent.com/h/www.krizna.com/wp-content/uploads/2012/06/300x113xgoogle_chrome_ubuntu_12_04-300x113.jpg.pagespeed.ic.mqBCbXfW3F.jpg" height="113" style="border: 1px solid rgb(230, 230, 230); clear: both; display: block; margin: 10px auto; max-width: 100%; padding: 5px;" title="google_chrome_ubuntu_12_04" width="300" /></a></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
<strong><br /></strong></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;">
<strong><span style="color: #6aa84f; font-size: large;">Method 2 : ( Manual installation)</span></strong></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
Download google-chrome-stable_current_i386.deb from official google website (https://www.google.com/chrome/) .</div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
</div>
<div class="ngg-gallery-singlepic-image ngg-center" style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px; margin-bottom: 1em; margin-left: auto !important; margin-right: auto !important; margin-top: 0px; max-width: 320px;">
<a class="shutterset_81c26a317f5af3a05652b751dff7ec99" data-description="" data-image-id="56" data-src="http://www.krizna.com/wp-content/gallery/general/ubuntu-chrome-download.jpg" data-thumbnail="http://www.krizna.com/wp-content/gallery/general/thumbs/thumbs_ubuntu-chrome-download.jpg" data-title="ubuntu-chrome-download" href="http://www.krizna.com/wp-content/gallery/general/ubuntu-chrome-download.jpg" style="color: #0f4884; max-width: 100%; text-decoration: none;" target="_self" title=""><img alt="ubuntu-chrome-download" class="ngg-singlepic" src="http://1-ps.googleusercontent.com/h/www.krizna.com/wp-content/gallery/general/dynamic/320xNxubuntu-chrome-download-nggid0256-ngg0dyn-320x240x100-00f0w010c010r110f110r010t010.jpg.pagespeed.ic.nSgmogjmnB.jpg" style="border: none; display: block; margin: 0px; max-width: 100%; padding: 4px;" title="ubuntu-chrome-download" width="320" /></a></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
</div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;">
<div style="font-size: 16px;">
Just follow the steps .</div>
<div style="font-size: 16px;">
Before installing , we need to install dependencies .</div>
<div style="font-size: 16px;">
<span style="color: #993300;">Step 1</span> » Type apt-get update on terminal as a sudo user.</div>
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo apt-get update</span></code>This command will update the packages list index.<br />
<div style="font-size: 16px;">
<span style="color: #993300;"><br /></span></div>
</div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; line-height: 30px;">
<div style="font-size: 16px;">
<span style="color: #993300;">Step 2</span> » Now we need to install libnss3-1d and libxss1</div>
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$ sudo apt-get install libnss3-1d libxss1</span></code><span style="color: #993300;"></span></div>
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
<span style="color: #993300;"><br /></span></div>
<span style="color: #993300; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">Step 3</span><span style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;"> » </span> Finally install the downloaded package.<br />
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; line-height: 25px; padding: 4px;"><span style="font-size: xx-small;">vm@vm:~$sudo dpkg -i google-chrome-stable_current_i386.deb</span></code><br />
<span style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;"></span><br />
<div style="font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;">
<a href="http://www.krizna.com/wp-content/uploads/2012/06/google_chrome_ubuntu_12_04_1.jpg" style="color: black;"><img alt="google chrome manual installation ubuntu 12_04" class="aligncenter size-medium wp-image-320" src="http://www.krizna.com/wp-content/uploads/2012/06/google_chrome_ubuntu_12_04_1-300x104.jpg" height="104" style="border: 1px solid rgb(230, 230, 230); clear: both; display: block; margin: 10px auto; max-width: 100%; padding: 5px;" title="google_chrome_ubuntu_12_04_1" width="300" /></a></div>
<br />
<br />
<br />
參考:http://www.krizna.com/ubuntu/install-google-chrome-ubuntu-12-04/VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-59471984807750178472014-09-03T23:26:00.002-07:002014-09-03T23:29:38.978-07:00Installing VMware Tools in an Ubuntu virtual machine<b><span style="font-size: large;">視窗調整問題</span></b><br />
<b>Ubuntu or Ubuntu Server with a graphical user interface</b><br />
<br />
To mount the CD image and extract the contents:<br />
Power on the virtual machine.<br />
Log into the virtual machine using an account with administrator or root privileges.<br />
Go to Virtual Machine > Install VMware Tools (or VM > Install VMware Tools).<br />
<br />
Note: If you are running the light version of Fusion, a version of Workstation without VMware Tools, or VMware Player, you are prompted to download VMware Tools before they can be installed. Click Download Now to begin the download.<br />
<br />
Open the VMware Tools CD mounted on the Ubuntu desktop.<br />
<span style="color: #6aa84f;">Right-click the file name that is similar to </span><b><span style="color: #e06666;">VMwareTools.x.x.x-xxxx.tar.gz</span></b><span style="color: #6aa84f;">, click Extract to, and select the Ubuntu Desktop to save the extracted contents.</span><br />
<br />
The vmware-tools-distrib folder is extracted to the Ubuntu Desktop.<br />
To install VMware Tools in Ubuntu:<br />
<br />
1. Open a Terminal window. For more information, see Opening a command or shell prompt (1003892).<br />
2. In the Terminal, run this command to navigate <b>to the vmware-tools-distrib folder</b>:<br />
<span style="color: #e06666;">cd Desktop/vmware-tools-distrib</span><br />
<br />
3. Run this command to install VMware Tools:<br />
<span style="color: #e06666;">sudo ./vmware-install.pl -d</span><br />
<br />
<b>Note: </b>The -d switch assumes that you want to accept the defaults. If you do not use -d, press Return to accept the defaults or supply your own answers.<br />
<br />
4. Enter your Ubuntu password.<br />
5. Restart the Ubuntu virtual machine after the VMware Tools installation completes.<br />
<br />
<br />
<br />
<br />
<br />
<br />
參考:http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022525VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-81559154146330651782014-09-03T23:06:00.001-07:002014-09-03T23:31:30.054-07:00Ubuntu 12.04 切換至傳統介面Gnome<span style="font-family: arial, sans-serif; line-height: 26px;">在 Ubuntu Linux 中若想要使用 Gnome 3 的話,就必須要自己裝,這裡就介紹如何在Ubuntu Linux 12.10 中自己安裝 Gnome 3 的桌面環境。</span><br />
<br style="font-family: arial, sans-serif; line-height: 26px;" />
<span style="font-family: arial, sans-serif; line-height: 26px;">首先加入 Gnome 3 repository:</span><br />
<code style="background: rgb(51, 51, 51); border-bottom-left-radius: 0.3em; border-bottom-right-radius: 0.3em; border-top-left-radius: 0.3em; border-top-right-radius: 0.3em; border: 1px solid rgb(51, 51, 51); clear: both; color: #eeeeee; display: block; font-family: 'Droid Sans Mono', Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 16px; line-height: 26px; margin: 1em 0px; overflow: auto; padding: 0.8em 1em;">sudo add-apt-repository ppa:gnome3-team/gnome3</code><br />
<span style="font-family: arial, sans-serif; line-height: 26px;">接著更新 apt:</span><br />
<code style="background: rgb(51, 51, 51); border-bottom-left-radius: 0.3em; border-bottom-right-radius: 0.3em; border-top-left-radius: 0.3em; border-top-right-radius: 0.3em; border: 1px solid rgb(51, 51, 51); clear: both; color: #eeeeee; display: block; font-family: 'Droid Sans Mono', Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 16px; line-height: 26px; margin: 1em 0px; overflow: auto; padding: 0.8em 1em;">sudo apt-get update</code><br />
<br style="background-color: white; font-family: arial, sans-serif; font-size: 18px; line-height: 26px;" />
<span style="font-family: arial, sans-serif; line-height: 26px;">然後在安裝 Gnome 3 套件:</span><br />
<code style="background: rgb(51, 51, 51); border-bottom-left-radius: 0.3em; border-bottom-right-radius: 0.3em; border-top-left-radius: 0.3em; border-top-right-radius: 0.3em; border: 1px solid rgb(51, 51, 51); clear: both; color: #eeeeee; display: block; font-family: 'Droid Sans Mono', Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 16px; line-height: 26px; margin: 1em 0px; overflow: auto; padding: 0.8em 1em;">sudo apt-get install gnome-shell</code><br />
<br style="background-color: white; font-family: arial, sans-serif; font-size: 18px; line-height: 26px;" />
<span 18px="" 26px="" arial="" font-family:="" font-size:="" line-height:="" sans-serif="">裝完之後,在登入畫面的右上角就會出現一個的選單:</span><br />
<br />
<div class="separator" style="background-color: white; clear: both; font-family: arial, sans-serif; font-size: 18px; line-height: 26px; text-align: center;">
<a href="http://1.bp.blogspot.com/-oX0rLx62iVU/UKxH_GvDnRI/AAAAAAAAC8A/1TVvhj28lHQ/s1600/login-1.png" imageanchor="1" style="-webkit-font-smoothing: antialiased; -webkit-transition: background-color 0.3s; background: transparent; color: #ed702b; margin-left: 1em; margin-right: 1em; text-decoration: none; transition: background-color 0.3s;" wrc_done="true"><img border="0" src="http://1.bp.blogspot.com/-oX0rLx62iVU/UKxH_GvDnRI/AAAAAAAAC8A/1TVvhj28lHQ/s1600/login-1.png" style="border: none; height: auto; max-width: 650px; position: relative;" /></a> </div>
<br style="background-color: white; font-family: arial, sans-serif; font-size: 18px; line-height: 26px;" />
<br style="background-color: white; font-family: arial, sans-serif; font-size: 18px; line-height: 26px;" />
<span style="font-family: arial, sans-serif; line-height: 26px;">點下去就可以選擇使用 Gnome 作為桌面環境: </span><br />
<br />
<div class="separator" style="background-color: white; clear: both; font-family: arial, sans-serif; font-size: 18px; line-height: 26px; text-align: center;">
<a href="http://2.bp.blogspot.com/-SDU2S86zqrs/UKxIPukVorI/AAAAAAAAC8I/Vta87EjoP1g/s1600/login-2.png" imageanchor="1" style="-webkit-font-smoothing: antialiased; -webkit-transition: background-color 0.3s; background: transparent; color: #ed702b; margin-left: 1em; margin-right: 1em; text-decoration: none; transition: background-color 0.3s;" wrc_done="true"><img border="0" src="http://2.bp.blogspot.com/-SDU2S86zqrs/UKxIPukVorI/AAAAAAAAC8I/Vta87EjoP1g/s1600/login-2.png" style="border: none; height: auto; max-width: 650px; position: relative;" /></a> </div>
<br style="background-color: white; font-family: arial, sans-serif; font-size: 18px; line-height: 26px;" />
<span style="font-family: arial, sans-serif; line-height: 26px;">其中 GNOME 是新版的介面,類似 Unity,如果不習慣,可以選擇 GNOME Classic,使用傳統的選單介面:</span><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background-color: white; color: black; font-family: arial, sans-serif; font-size: 18px; line-height: 26px; margin-left: auto; margin-right: auto; padding: 4px; position: relative; text-align: center;"><tbody>
<tr><td><a href="http://2.bp.blogspot.com/-LPocAUTsleM/UKxVgM5NR9I/AAAAAAAAC9Q/BaeOv9EpTjo/s1600/gnome_classic.png" imageanchor="1" style="-webkit-font-smoothing: antialiased; -webkit-transition: background-color 0.3s; background: transparent; color: #ed702b; margin-left: auto; margin-right: auto; text-decoration: none; transition: background-color 0.3s;" wrc_done="true"><img border="0" src="http://2.bp.blogspot.com/-LPocAUTsleM/UKxVgM5NR9I/AAAAAAAAC9Q/BaeOv9EpTjo/s400/gnome_classic.png" height="250" style="border: none; height: auto; max-width: 650px; position: relative;" width="400" /></a> </td></tr>
<tr><td class="tr-caption" style="font-size: 14px;">傳統 Gnome 選單介面</td></tr>
</tbody></table>
<br />
<div>
<br /></div>
<div>
參考:http://www.gtwang.org/2012/11/ubuntu-linux-1210-gnome-3.html</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-35519650848180033672014-09-03T21:53:00.005-07:002014-09-22T22:16:42.464-07:00Android開發環境配置On UbuntuUbuntu 10.04 TLS 環境配置<br />
<br />
<br />
<b><span style="color: #6aa84f; font-size: large;">一、安裝JDK 1.7.x</span></b><br />
增加軟體源<br />
$sudo add-apt-repository ppa:webupd8team/java<br />
<br />
更新軟體源<br />
$sudo apt-get update<br />
<br />
安裝jdk<br />
$sudo apt-get install oracle-java7-installer<br />
<br />
檢查Java版本<br />
$java -version<br />
<br />
切換Java版本指令<br />
$sudo update-alternatives --config java<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-sUyrdGEHjzo/VAhtGvysvCI/AAAAAAAAAL8/G9LA53HrQ7s/s1600/39069511_6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-sUyrdGEHjzo/VAhtGvysvCI/AAAAAAAAAL8/G9LA53HrQ7s/s1600/39069511_6.PNG" /></a></div>
<br />
<br />
<br />
<b><span style="color: #6aa84f; font-size: large;">二、安裝Eclipse環境</span></b><br />
拷貝Eclipse 4.3資料夾至預放置的目錄下<br />
1. 設置Android SDK指定目錄位置<br />
(解壓縮完的資料夾要改讀寫權限$ sudo chmod -R 755 android-sdk-linux/)<br />
2. 安裝ADT plugin(Help->Install New Software)<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Xz_U4uciqas/VAh5SEpIcvI/AAAAAAAAAMM/xLk4wb-kEFI/s1600/39069511_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Xz_U4uciqas/VAh5SEpIcvI/AAAAAAAAAMM/xLk4wb-kEFI/s1600/39069511_14.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-P_J-5mt5wEk/VAh5R3pm7sI/AAAAAAAAAMQ/wkfEGo5O_HI/s1600/39069511_15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-P_J-5mt5wEk/VAh5R3pm7sI/AAAAAAAAAMQ/wkfEGo5O_HI/s1600/39069511_15.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div style="text-align: left;">
3. 利用eclipse工具 Android SDK Manager下載Android API</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-g6vLTXJDg6A/VAh5R9IZPqI/AAAAAAAAAMU/cboaJ2vr8M8/s1600/39069511_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-g6vLTXJDg6A/VAh5R9IZPqI/AAAAAAAAAMU/cboaJ2vr8M8/s1600/39069511_13.png" /></a></div>
<div style="text-align: left;">
<br /></div>
<br />
<b><span style="color: #6aa84f; font-size: large;">三、設定在終端機下執行ADB環境配置</span></b><br />
1. 編輯:vm@vm:~$ sudo gedit ~/.bashrc<br />
<div>
<br />
2. 貼上配置</div>
<div>
<div>
<br /></div>
<div>
## For Android (OLD)<br />
<strike>#export ANDROID_HOME=/home/vm/_develop_lib/android-sdk-linux</strike><br />
<strike>#export PATH=$PATH:$ANDROID_HOME/tools/</strike><br />
<strike>#export PATH=$PATH:$ANDROID_HOME/platform-tools/</strike><br />
<br />
#Android SDK<br />
ANDROID_SDK_ROOT=~/_develop_lib/android-sdk-linux<br />
PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH<br />
export PATH<br />
<br />
#Android NDK<br />
ANDROID_NDK_ROOT=~/_develop_lib/android-ndk-linux<br />
PATH=$ANDROID_NDK_ROOT:$PATH<br />
ANDROID_NDK_Sample=$ANDROID_NDK_ROOT/samples<br />
ANDROID_NDK_Workspace=~/workspace<br />
export ANDROID_NDK_ROOT ANDROID_NDK_Sample ANDROID_NDK_Workspace PATH<br />
<br />
3. 更新環境變數:vm@vm:~$ source ~/.bashrc<br />
<br />
<br />
<strike>4. 建立捷徑:sudo ln -s /home/vm/_developer_SDK/android-sdk/platform-tools/adb(實測不需要)</strike><br />
<br />
<b><span style="color: #e06666;">Notes:</span></b><br />
如果在Ubuntu 64 OS下執行ADB會出現No Such file or directory<br />
<div style="background-color: #404040;">
<code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; display: block; padding: 4px;"><span style="color: white; font-family: Verdana, MS Sans Serif, sans-serif, serif;"><span style="font-size: xx-small; line-height: 25px;">vm@vm:~$ ls -l adb</span></span></code><code style="background-color: #0e0e0e; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; display: block; padding: 4px;"><span style="color: white; font-family: Verdana, MS Sans Serif, sans-serif, serif;"><span style="font-size: xx-small; line-height: 25px;">ls: cannot access adb: No such file or directory</span></span></code></div>
<br />
解法:安裝lib32ncurses5和lib32stdc++6.<br />
$sudo apt-get install lib32ncurses5 lib32stdc++6</div>
</div>
<br />
<br />
實際測實ADB環境配置是否成功:<br />
1. USB 連結Android Phone<br />
2. $adb devices<br />
<br />
<br />
----------------------------------------------------------------------------------------------<br />
<br />
<b><span style="color: #3d85c6; font-size: large;">環境設置詳細參考如下</span></b><br />
<br />
<span style="color: #6aa84f;"><b>用戶環境變數通常被存儲在下面的文件中:</b></span><br />
~/.profile<br />
~/.bash_profile 或者 ~./bash_login<br />
~/.bashrc<br />
上述文件在Ubuntu 10.0以前版本不推薦使用。<br />
<br />
<span style="color: #6aa84f;"><b>系統環境變數一般保存在下面的文件中:</b></span><br />
/etc/environment<br />
/etc/profile<br />
/etc/bash.bashrc<br />
/etc/profile和/etc/bash.bashrc在Ubuntu 10.0版本中不推薦使用。<br />
<br />
<br />
<b><span style="color: #e06666;">Ubuntu Linux 環境變數的優先級</span></b><br />
/etc/profile:在登錄時,操作系統定制用戶環境時使用的第一個文件,此文件為系統的每個用戶設置環境信息,當用戶第一次登錄時,該文件自動被執行。<br />
/etc/environment:在登錄時操作系統使用的第二個文件,系統在讀取你自己的profile前,設置環境文件的環境變數。<br />
~/.bash_profile:在登錄時用到的第三個文件是.profile文件,每個用戶都可使用該文件輸入專用於自己使用的shell信息,當用戶登錄時,該文件僅僅執行一次!默認情況下,他設置一些環境變數,執行用戶的.bashrc文件。 /etc/bashrc:為每一個運行bash shell的用戶執行此文件.當bash shell被打開時,該文件被讀取.<br />
~/.bashrc:該文件包含專用於你的bash shell的bash信息,當登錄時以及每次打開新的shell時,該該文件被讀取。<br />
/etc/bash.bashrc:當用戶進入shell或桌面系統自動執行的腳本<br />
幾個環境變數的優先級:1>2>3<br />
<br />
<br />
<br />
<b><span style="color: #e06666;">Ubuntu Linux中設置adb環境變數</span></b><br />
當前用戶(homer)<br />
vi ~/.bashrc (root默認目錄下的bashrc文件)<br />
在這個文件中加入:export PATH=/home/homer/android-sdk-linux/platform-tools/:$PATH<br />
重啟或再次登陸後生效,如果想立即生效,則執行:source ~/.bashrc<br />
<br />
<b><span style="color: #6aa84f;">超級用戶(root):</span></b><br />
su root<br />
vi ~/.bashrc (root默認目錄下的bashrc文件)<br />
在這個文件中加入:export PATH=/home/homer/android-sdk-linux/platform-tools/:$PATH<br />
重啟或再次登陸後生效,如果想立即生效,則執行:source ~/.bashrc<br />
<br />
<b><span style="color: #6aa84f;">全局設置(homer、root、sudo):</span></b><br />
1. 實現思路:<br />
在PATH默認的bin目錄下,新建adb的軟鏈接<br />
<br />
2. 查看sudo $PATH: echo 'echo $PATH' | sudo sh<br />
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin<br />
<br />
3. 進入sudo默認PATH:<br />
cd /usr/local/bin/<br />
<br />
4. 建立軟鏈接:<br />
sudo ln -s /home/homer/android-sdk-linux/platform-tools/adb<br />
<br />
5. 這樣,在普通用戶(homer)、超級用戶(root)、sudo用戶,都可以直接使用adb命令,因為這些用戶的PATH環境變數都包含了目錄/usr/local/bin<br />
<br />
<span style="color: #6aa84f;"><b>Ubuntu Linux 無法識別手機</b></span><br />
homer@ubuntu:~$ <span style="color: #e06666;">adb devices</span><br />
List of devices attached<br />
???????????? no permissions<br />
<br />
Ubuntu Linux 啟動手機識別<br />
homer@ubuntu:~$ <span style="color: #e06666;">sudo adb kill-server</span><br />
homer@ubuntu:~$ <span style="color: #e06666;">sudo adb start-server</span><br />
* daemon not running. starting it now on port 5037 *<br />
* daemon started successfully *<br />
homer@ubuntu:~$ <span style="color: #e06666;">adb devices</span><br />
List of devices attached<br />
FH6111131808 device<br />
<br />
<br />
參考:<br />
http://blog.csdn.net/zero10100/article/details/8769303<br />
http://www.360doc.com/content/14/0213/00/11400509_352058800.shtmlVITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-46697477304417626492014-09-03T21:26:00.003-07:002015-04-14T22:09:21.757-07:00Android開發環境配置On Mac OS X<b>Mac OS X </b><b>10.9</b><br />
<b><span style="color: #6aa84f;"><br /></span></b>
<br />
<b><span style="color: #6aa84f;"><br /></span></b>
------------------------------------------------------------------------------------<b><span style="color: #6aa84f;"><br /></span></b><b><span style="color: #6aa84f;">安裝Apache Ant</span></b><br />
<div class="p1">
$ant -v<br />
<br /></div>
<b><span style="color: #6aa84f;">下載Apache Ant</span></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.mkyong.com/wp-content/uploads/2015/01/install-apache-ant-on-mac-osx.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.mkyong.com/wp-content/uploads/2015/01/install-apache-ant-on-mac-osx.png" height="200" width="400" /></a></div>
<b><span style="color: #6aa84f;"><br /></span></b>
<div class="p1">
</div>
<div class="p1">
http://ant.apache.org/bindownload.cgi<br />
$ tar vxf apache-ant-1.9.4-bin.tar.gz<br />
$ ln -s apache-ant-1.9.4/ apache-ant (建立捷徑)<br />
<br />
<br /></div>
------------------------------------------------------------------------------------<b><span style="color: #6aa84f;"><br /></span></b>
<b><span style="color: #6aa84f;">顯示隱藏檔</span></b><br />
<div class="p1">
defaults write com.apple.finder AppleShowAllFiles TRUE;\killall Finder<br />
<br /></div>
<b><span style="color: #6aa84f;">不顯示隱藏檔</span></b><br />
<div class="p1">
</div>
<div class="p1">
defaults write com.apple.finder AppleShowAllFiles FALSE;\killall Finder</div>
<div class="p1">
<br />
<br />
------------------------------------------------------------------------------------</div>
<b><span style="color: #6aa84f;"> 方法︰</span></b><br />
開啟Finderv --> 名字的目錄 --> .bash_profile檔<br />
<br />
<br />
<b><span style="color: #6aa84f;">加入相關Lib路徑:</span></b><br />
## For Java<br />
export JAVA_HOME=/Library/Java/Home<br />
<br />
## For Android<br />
export ANDROID_HOME=/develope/Lib/android-sdk<br />
export PATH=$PATH:/develope/Lib/android-sdk/tools/<br />
export PATH=$PATH:/develope/Lib/android-sdk/platform-tools/<br />
<br />
## For ANT<br />
export ANT_HOME=/develope/Lib/apache-ant<br />
export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/bin:$ANT_HOME/bin<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-LkWPUEBSXuQ/VAfou8Hrl5I/AAAAAAAAALk/8NvpPhUdC88/s1600/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7%2B2014-09-04%2B%E4%B8%8B%E5%8D%8812.20.54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-LkWPUEBSXuQ/VAfou8Hrl5I/AAAAAAAAALk/8NvpPhUdC88/s1600/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7%2B2014-09-04%2B%E4%B8%8B%E5%8D%8812.20.54.png" height="143" width="400" /></a></div>
<span style="font-family: Tahoma; line-height: 26px;">存檔-->離開</span><br />
<span style="font-family: Tahoma; line-height: 26px;">重啟或重新登入失效,則可以執行,即生效:</span><br />
<span style="font-family: Tahoma; line-height: 26px;">$source .bash_profile</span><br />
<span style="font-family: Tahoma;"><span style="line-height: 26px;">$touch .bash_profile</span></span><br />
<br />
<div>
<br /></div>
<span style="font-family: Tahoma;"><span style="color: #6aa84f; line-height: 26px;"><b>檢查配置:</b></span></span><br />
<span style="font-family: Tahoma;"><span style="line-height: 26px;">echo $</span></span>JAVA_HOME<br />
<span style="font-family: Tahoma;"><span style="line-height: 26px;">echo $</span></span>ANDROID_HOME<br />
<span style="font-family: Tahoma;"><span style="line-height: 26px;">echo $</span></span>ANT_HOME<br />
<span style="font-family: Tahoma;"><span style="line-height: 26px;">echo $PATH</span></span><br />
<span style="font-family: Tahoma;"><span style="line-height: 26px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-FSLS8BuJcus/VAfp7ZoBFvI/AAAAAAAAALs/9WGbKXz1O28/s1600/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7%2B2014-09-04%2B%E4%B8%8B%E5%8D%8812.24.37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-FSLS8BuJcus/VAfp7ZoBFvI/AAAAAAAAALs/9WGbKXz1O28/s1600/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7%2B2014-09-04%2B%E4%B8%8B%E5%8D%8812.24.37.png" height="157" width="400" /></a></div>
<span style="font-family: Tahoma;"><span style="line-height: 26px;"><br /></span></span>VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-25812834398538502892014-08-25T01:18:00.002-07:002014-08-25T18:33:26.320-07:00Raspberry Pi智慧家庭應用-2.硬體模組規劃基於先前的智慧家庭系統規劃,由實體應用連結層來看,為了達成家電控制、智慧家庭主體裝置移動控制、環境監控和影音娛樂分享等...各個方法,在實作上需配合相關硬體模組,架構主要可分為五部分。<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-NHlU1ZCMI94/U_rv1Y0L-wI/AAAAAAAAALM/7HSko2-KE8k/s1600/08%E5%9C%96%E5%85%AB%E3%80%81%E7%A1%AC%E9%AB%94%E6%A8%A1%E7%B5%84%E6%9E%B6%E6%A7%8B%E5%9C%96.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-NHlU1ZCMI94/U_rv1Y0L-wI/AAAAAAAAALM/7HSko2-KE8k/s1600/08%E5%9C%96%E5%85%AB%E3%80%81%E7%A1%AC%E9%AB%94%E6%A8%A1%E7%B5%84%E6%9E%B6%E6%A7%8B%E5%9C%96.png" height="246" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
【硬體模組架構】</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<b><span style="color: #6aa84f;">第 一部為紅外線模組:</span></b>使用其中的紅外線接收器,錄製居家環境中的具有紅外線功 能的家電裝罝,例如:電視、冷氣;再利用紅外線發射器,透過預錄的紅外線訊 號操控裝置電家。<br />
<span style="color: #6aa84f;"><b>第二部分為顯示模組:</b></span>當智慧家庭系統開啟時,系統取得網路 IP 位址後,即可透過 HD44780 顯示螢幕,觀看裝置網路 IP 及系統時間狀態。<br />
<span style="color: #6aa84f;"><b>第三部分為移動模組:</b></span>方便使用者可以透過遠端操控的方法,移動智慧家庭系統車 體裝置,可利用於居家環境巡邏之用。<br />
<span style="color: #6aa84f;"><b>第四部分則是環境監控模組:</b></span>其中包含 Logitech C170 視訊攝影機和一個 Sg90 舵機,這樣的搭配可使攝影機做角度旋轉,透過移動模組讓使用者在監控居家環境時更無死角。<br />
<span style="color: #6aa84f;"><b>第五部分為溫溼度感測模組:</b></span>用以觀察居家環境中的溫度與溼度情形。<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-pf3DOjBfXB4/U_rwrAJIj2I/AAAAAAAAALU/55Qrv32FZZ8/s1600/15%E5%9C%96%E5%8D%81%E4%BA%94%E3%80%81%E6%99%BA%E6%85%A7%E5%AE%B6%E5%BA%AD%E7%B3%BB%E7%B5%B1%E8%A3%9D%E7%BD%AE%E5%AF%A6%E9%AB%94%E5%A4%96%E8%A7%80.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-pf3DOjBfXB4/U_rwrAJIj2I/AAAAAAAAALU/55Qrv32FZZ8/s1600/15%E5%9C%96%E5%8D%81%E4%BA%94%E3%80%81%E6%99%BA%E6%85%A7%E5%AE%B6%E5%BA%AD%E7%B3%BB%E7%B5%B1%E8%A3%9D%E7%BD%AE%E5%AF%A6%E9%AB%94%E5%A4%96%E8%A7%80.JPG" height="320" width="179" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
【實作以車體型式呈現的智慧家庭實體裝置成品】</div>
<br />VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-43050342135338512652014-08-25T00:22:00.000-07:002014-08-25T01:27:33.390-07:00Raspberry Pi智慧家庭應用-1.系統規劃<b><span style="font-size: large;">純單以自我實作完成的方法做個簡單分享與介紹</span></b>,基於作者研究主題是以Raspberry Pi Model B 開發版為硬體基礎平台,用以達成居家環境的自動化與智慧化目標,所以在這邊簡單敘述作者利用Raspberry Pi為基礎所建置的智慧家庭系統應用,包含家電控制、智慧家庭主體裝置移動控制、環境監控和影音娛樂分享等...各個的實現方法說明。<br />
<br />
選用 Raspberry Pi Model B 是考量未來擴充的便利性,期能透過觀察將現有傳統居家環境缺乏之處予以加強改善,使智慧家庭系統更符合使用者的需求,並易於人性化操作。<br />
如圖所示,將智慧家庭系統規劃分為三層,分別是<b><span style="color: #6aa84f;">使用者應用介面層</span></b>、<b><span style="color: #6aa84f;">網路層</span></b>及<b><span style="color: #6aa84f;">實體應用連結層</span></b>。<br />
<br />
規劃使用者應用介面層之目的是讓智慧家庭系統提供的操作介面可在不同裝置平台上執行(跨平台操作使用),並提供使用者一致的系統操作體驗,使其更易於人性化操作。<br />
<br />
網路層的規劃考量是因應智慧裝置和網際網路的普及,其目的是讓使用者可以隨時使用隨身的智慧型裝置或是電腦,透過網路傳輸命令來操控居家環境中的智慧家庭裝置,讓使用者在使用上更便利。<br />
<br />
實體應用連結層的部分又劃分為兩大單元,分別為遠端控制和影音娛樂,其系統實體裝置提供的功能單元,以及單元中的細部項目詳如下圖所示。<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-R_y3eXS3dzQ/U_rhvDTaRzI/AAAAAAAAAJY/OVQ7QGDke20/s1600/06%E5%9C%96%E5%85%AD%E3%80%81%E6%99%BA%E6%85%A7%E5%AE%B6%E5%BA%AD%E7%B3%BB%E7%B5%B1%E8%A6%8F%E5%8A%83.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-R_y3eXS3dzQ/U_rhvDTaRzI/AAAAAAAAAJY/OVQ7QGDke20/s1600/06%E5%9C%96%E5%85%AD%E3%80%81%E6%99%BA%E6%85%A7%E5%AE%B6%E5%BA%AD%E7%B3%BB%E7%B5%B1%E8%A6%8F%E5%8A%83.png" height="280" width="320" /></a></div>
<div style="text-align: center;">
【智慧家庭系統規劃】</div>
<div class="page" title="Page 22">
<div class="layoutArea">
<div class="column">
<br />
本智慧家庭系統之軟體基礎平台是採用源自於 Linux Kernel 3.6 的 Wheezy Raspbion作業系統,此系統建構在 Raspberry Pi Model B 上,就如同小型個人電腦,其與一般個人電腦的差異是多了 24Pin 的 GPIO 腳位,以提供系統硬體模 組擴展之用。如此的設計架構有助於方便擴充其它所需的硬體電子元件與軟體模 組擴展,讓系統規劃更符合本論文所要建置的智慧家庭需求目標。<br />
<br />
<br />
<span style="color: #6aa84f; font-size: large;"><b>系統規劃</b></span><br />
目的為讓智慧家庭系統負責遠端家電控制和多媒體影音娛樂以及監控系統應用操作,系統裝置能夠移動於無線網路的居家環境,並能即時監控現場居家環境狀況,讓使用者能經由第三方裝置即時透過網際網路掌握和控制居家情況,像是電腦、智慧型手機,平板電腦等智慧型可攜式裝置,希望經由這樣的智慧家庭系統機制,讓使用者在離開家後,仍能隨時透過網際網路與居家環境保持資訊交換,並予以監控狀況。<br />
<br />
我的系統規劃是將智慧家庭系統裝置主要劃分兩大單元:<br />
<b><span style="color: #6aa84f;">(1) 控制中心: </span></b>使用 Whezzy Raspbion 作業系統平台為基礎中心,包含遠端 控制和裝置移動以及環境監控都建構於此作業系統平台架構上,透過網路遙控裝 置,接收使用者端的命令請求,並發送至控制中心,使裝置能夠於居家環境空間 中移動,或是針對系統中的功能下達啟動關閉等操作命令。<br />
<b><span style="color: #6aa84f;">(2) 影音娛樂: </span></b>具備多媒體影音娛樂功能,透過網路串流服務,操作使用者 端裝置達到影音串流播放,或是直接操作系統提供的使用者介面讓裝置輸出音源 播放和相片預覽。<br />
<br />
由於行動上網人數已大幅增加,為提高未來智慧家庭系統使用的方便性,在使用者操作介面上,希望能讓使用者透過簡單的瀏覽器界面,即可以達到對操作智慧家庭系統的控制操作。<br />
觀察目前市面上較為普及的智慧型裝置平台,從市佔率較高的兩大作業系統平台分別為 iOS 及 Android觀之,若是開發者要特別針對這兩個平台分別設計不同的操作原生型的 APP 應用程式,需考量各平台所提供的函式庫,因此會使其所設計出來的 UI(User Interface)界面難免會有所差異,因此為讓使用者能在不同裝罝上操作一致,選擇以瀏覽器做為使用者操作介面平台,讓使用者不論是在個人電腦、智慧型手機或是平板電腦等不同裝罝,使用的操作介面皆能有統一的一致性,更可以減少在開發時間成本上的浪費,對於後續的使用者操作介面維護也能更有效率。</div>
</div>
</div>
<div class="page" title="Page 22">
<div class="layoutArea">
<div class="column">
</div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-25365403768038056162014-08-24T20:36:00.001-07:002014-08-24T20:48:44.732-07:00Admob sdk 遷移至 Google Mobile Ads SDK(Google Play service) <div style="width: 90%;">
<span style="color: #cc0000;">獨立式 Android SDK 將於 8 月 1 日全面淘汰</span><br />
自 2014 年 8 月 1 日起,凡是使用獨立式 Google AdMob SDK 的應用程式 (包括新應用程式和舊有應用程式的更新),都會遭到 Google Play 商店拒登。這是因為獨立式 SDK 並未使用廣告 ID,因此屆時將無法符合 Google Play 廣告政策的規定。<br />
<br />
<br />
<span style="color: #6aa84f; font-size: large;">Google Mobile Ads SDK 入門指南</span><br />
<b>Android 範例程式:</b>https://github.com/googleads/googleads-mobile-android-examples/tree/master/doubleclick/banner<br />
<b>iOS 範例式:</b>https://github.com/googleads/googleads-mobile-ios-examples/tree/master/doubleclick/DFPBannerExample<br />
<br />
<br />
<span style="color: #6aa84f; font-size: large;">Google Play 服務遷移</span><br />
https://developers.google.com/mobile-ads-sdk/docs/admob/play-migration?hl=zh-tw <br />
<br />
<br />
<br />
【Reference】<br />
https://developers.google.com/mobile-ads-sdk/docs/admob/play-migration?hl=zh-tw<br />
https://developers.google.com/mobile-ads-sdk/docs/<br />
<div itemprop="articleBody" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 22.399999618530273px; margin: 0px; padding: 0px; vertical-align: baseline;">
<div itemprop="articleBody" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
<br /></div>
</div>
</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-83713131222928680792014-08-24T20:35:00.000-07:002014-08-24T20:49:52.454-07:00Add google-play-services_lib project<span style="color: #6aa84f; font-size: large;">Add google-play-services_lib project </span><br />
<br />
1. 在 Android SDK Manager 中,確認 Extras -> Google Play service 已安裝.<br />
<br />
2. 由Eclipse 進行 project import:File -> Import -> Android -> Existing Android Code Into Workspace -> 挑選 google-play-services_lib 的位置 (ex: /develope/Lib/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib),記得選擇libproject 裡的資料夾.<br />
<br />
3. 在原本的 project 設定:Eclipse -> Project ->Properties -> Android -> Library -> Add -> 挑選 google-play-services_lib.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-hrCMffntTUA/U9HVaf1SBmI/AAAAAAAAAGM/SHCHKV6s4us/s1600/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7+2014-07-25+%E4%B8%8A%E5%8D%8811.55.56.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-hrCMffntTUA/U9HVaf1SBmI/AAAAAAAAAGM/SHCHKV6s4us/s1600/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7+2014-07-25+%E4%B8%8A%E5%8D%8811.55.56.png" height="320" width="296" /></a></div>
<br />
<br />
<br />
<span style="color: #6aa84f; font-size: large;">條件</span><br />
1. 請確認您使用的是最新版的 Android SDK,並依據 Android v3.2 或更新版本進行編譯 (將 project.properties 中的 target 設為 android-13)。<br />
<br />
2. Android 專用 Google Mobile Ads SDK 要求 Android 2.3 或更新版本 (將 AndroidManifest.xml 中的 android:minSdkVersion 至少設為 9) 的執行階段。也就是說,您可以使用最新版本的 Android SDK 進行開發,而您的應用程式仍然可以在較早的 Android 版本 (至少 2.3 版) 上運作。<br />
<br />
<br />
<span style="color: #6aa84f; font-size: large;">整合 SDK</span><br />
將 Google 行動廣告整合進應用程式相當簡單:<br />
<br />
1. 在 Eclipse 工作區中新增並參照 Google Play 服務程式庫專案。<br />
2. 在 AndroidManifest.xml 加入 meta-data 標記。<br />
<pre class="prettyprint" style="-webkit-font-smoothing: auto; background-color: #fafafa; border: 1px solid rgb(221, 221, 221); color: #007000; font-family: 'Droid Sans Mono', monospace; line-height: 1.5; margin-bottom: 1.5em; margin-top: 1.5em; overflow: auto; padding: 6px 10px; vertical-align: baseline;"><span style="font-size: x-small;"><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><?</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">xml version</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"1.0"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> encoding</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"utf-8"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">?></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><manifest</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">xmlns:android</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"http://schemas.android.com/apk/res/android"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">package</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"com.company"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:versionCode</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"1"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:versionName</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"1.0"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><application</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:icon</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@drawable/icon"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:label</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@string/app_name"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:debuggable</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"true"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><b style="color: inherit;"><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><meta-data</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"com.google.android.gms.version"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span></b><b style="color: inherit;"><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:value</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@integer/google_play_services_version"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span></b><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><activity</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:label</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@string/app_name"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"BannerExample"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><intent-filter></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><action</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"android.intent.action.MAIN"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><category</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"android.intent.category.LAUNCHER"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></intent-filter></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></activity></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></application></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></manifest></span></span></pre>
<br />
<br />
3. 在資訊清單中宣告 com.google.android.gms.ads.AdActivity。<br />
<pre class="prettyprint" style="-webkit-font-smoothing: auto; background-color: #fafafa; border: 1px solid rgb(221, 221, 221); color: #007000; font-family: 'Droid Sans Mono', monospace; line-height: 1.5; margin-bottom: 1.5em; margin-top: 1.5em; overflow: auto; padding: 6px 10px; vertical-align: baseline;"><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="font-size: x-small;"><?</span></span><span style="font-size: x-small;"><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">xml version</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"1.0"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> encoding</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"utf-8"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">?></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><manifest</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">xmlns:android</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"http://schemas.android.com/apk/res/android"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">package</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"com.company"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:versionCode</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"1"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:versionName</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"1.0"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><application</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:icon</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@drawable/icon"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:label</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@string/app_name"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:debuggable</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"true"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><meta-data</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"com.google.android.gms.version"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:value</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@integer/google_play_services_version"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><activity</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:label</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"@string/app_name"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"BannerExample"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><intent-filter></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><action</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"android.intent.action.MAIN"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><category</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"android.intent.category.LAUNCHER"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></intent-filter></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></activity></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><b style="color: inherit;"><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><activity</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:name</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"com.google.android.gms.ads.</span></b><b style="color: inherit;"><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">AdActivity"</span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span></b><b style="color: inherit;"><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="atn" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">android:configChanges</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="atv" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">"keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/></span></b><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></application></span><span class="pln" style="border: 0px; color: black; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="tag" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></manifest></span></span></pre>
<br />
4. 在資訊清單中設定網路權限。<br />
<b>INTERNET</b><br />
必要。用來存取網路,以發出廣告請求。<br />
<b>ACCESS_NETWORK_STATE</b><br />
選用。用來在發出廣告請求前,先行檢查是否有可用的網路連結。<br />
<br />
<br />
【Reference】<br />
https://developers.google.com/mobile-ads-sdk/docs/<br />
<br />VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-82734631057804211032014-08-24T20:32:00.002-07:002014-08-24T20:33:53.613-07:00Raspberry Pi Install development kit<div class="p1">
<span style="color: #6aa84f; font-size: large;">安裝遠端連線xrdp套件</span></div>
<div class="p2">
pi@raspberry:~$sudo apt-get install xrdp</div>
<div class="p3">
<br /></div>
<div class="p3">
<br /></div>
<div class="p1">
<span style="color: #6aa84f; font-size: large;">安裝Python GPIO套件</span></div>
<div class="p2">
pi@raspberry:~$sudo apt-get update</div>
<div class="p2">
pi@raspberry:~$sudo apt-get upgrade -y</div>
<div class="p4">
<span class="s1">pi@raspberry:~$</span><span style="color: #e06666;">sudo apt-get install python-dev</span></div>
<div class="p2">
pi@raspberry:~$sudo apt-get install python-setuptools</div>
<div class="p2">
pi@raspberry:~$sudo easy_install -U distribute</div>
<div class="p4">
<span class="s1">pi@raspberry:~$</span><span style="color: #e06666;">sudo apt-get install python-pip</span></div>
<div class="p4">
<span class="s1">pi@raspberry:~$</span><span style="color: #e06666;">sudo pip install rpi.gpio</span></div>
<div class="p3">
<br /></div>
<div class="p3">
<br /></div>
<div class="p1">
<span style="color: #6aa84f; font-size: large;">安裝Java JRE</span></div>
<div class="p2">
sudo apt-get remove python3</div>
<div class="p2">
sudo apt-get clean</div>
<div class="p2">
JDK: sudo apt-get install openjdk-7-jdk (不用裝,裝JRE即可啟動Apache WebService)</div>
<div class="p2">
JRE: sudo apt-get update && sudo apt-get install openjdk-7-jre</div>
<div class="p2">
sudo apt-get install openjdk-7-jre</div>
<div class="p5">
OR</div>
<div class="p2">
sudo apt-get install openjdk-6-jre (new)</div>
<div class="p3">
<br /></div>
<div class="p3">
<br /></div>
<div class="p3">
<br /></div>
<div class="p6">
<span style="color: #6aa84f; font-size: large;">Uninstall OpenJDK related packages.</span></div>
<div class="p2">
sudo apt-get purge icedtea-* openjdk-*</div>
<div class="p2">
sudo apt-get remove openjdk-6-jre</div>
<br />
<div class="p2">
sudo apt-get remove default-jre</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-87441646091489854782014-08-24T20:31:00.000-07:002014-08-24T20:31:01.940-07:00Raspberry Pi setup nework<div class="p1">
<b><span style="color: #6aa84f; font-size: large;">Setup nework設定網路</span></b></div>
<div class="p2">
01 搜尋無線網路</div>
<div class="p2">
pi@raspberry:~$sudo iwlist scan | grep ESSID</div>
<div class="p3">
<br /></div>
<div class="p2">
02 pi@raspberry:~$sudo nano /etc/network/interfaces</div>
<div class="p2">
Add below...</div>
<div class="p3">
<br /></div>
<div class="p4">
<span style="color: #f1c232;">【Example】</span></div>
<div class="p2">
---------------------------------------------------------------------------------------------------------------------</div>
<div class="p5">
<span style="font-size: x-small;">#/etc/network/interface</span></div>
<div class="p5">
<span style="font-size: x-small;">#修改/etc/network/interface文件,修改成功後保存,最後執行/etc/init.d/networking restart即可</span></div>
<div class="p5">
<span style="font-size: x-small;"><br />
iface lo inet loopback</span></div>
<div class="p5">
<span style="font-size: x-small;">iface eth0 inet dhcp</span></div>
<div class="p5">
<span style="font-size: x-small;"><br />
auto wlan0</span></div>
<div class="p5">
<span style="font-size: x-small;">allow-hotplug wlan0</span></div>
<div class="p5">
<span style="font-size: x-small;">iface wlan0 inet dhcp</span></div>
<div class="p5">
<span style="font-size: x-small;">wpa-ssid "myssid"</span></div>
<div class="p5">
<span style="font-size: x-small;">wpa-psk "mypsk"</span></div>
<div class="p5">
<span style="font-size: x-small;"><br />
Explanation說明:</span></div>
<div class="p5">
<span style="font-size: x-small;">auto wlan0 :說明系統啟動時自動啟動wlan0;</span></div>
<div class="p5">
<span style="font-size: x-small;">allow-hotplug wlan0:允許熱插拔wlan0;</span></div>
<div class="p5">
<span style="font-size: x-small;">iface wlan0 inet dhcp:對wlan0網口使用dhcp方式獲取IP地址;</span></div>
<div class="p5">
<span style="font-size: x-small;">wpa-ssid "myssid":設置准備連接的wifi熱點的ESSID;</span></div>
<div class="p5">
<span style="font-size: x-small;">wpa-psk "mypsk":設置wifi熱點的密碼。這裏需要注意的是mypsk不是wifi熱點的密碼,而是通過使用wpa_passphrase命令得到的結果的psk值;</span></div>
<div class="p2">
---------------------------------------------------------------------------------------------------------------------</div>
<div class="p3">
<br /></div>
<div class="p3">
<br /></div>
<div class="p4">
<span style="color: #f1c232;">【網路配置方法】</span></div>
<div class="p2">
---------------------------------------------------------------------------------------------------------------------</div>
<div class="p5">
<span style="font-size: x-small;">#sudo nano /etc/wpa_supplicant/wpa_supplicant.conf</span></div>
<div class="p5">
<span style="font-size: x-small;"><br />
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev</span></div>
<div class="p5">
<span style="font-size: x-small;">update_config=1</span></div>
<div class="p5">
<span style="font-size: x-small;"><br />
network={</span></div>
<div class="p5">
<span style="font-size: x-small;"> ssid="AirPort_Router"</span></div>
<div class="p5">
<span style="font-size: x-small;"> psk="abcdefghij123"</span></div>
<div class="p5">
<span style="font-size: x-small;"> proto=RSN</span></div>
<div class="p5">
<span style="font-size: x-small;"> key_mgmt=WPA-PSK</span></div>
<div class="p5">
<span style="font-size: x-small;"> pairwise=CCMP</span></div>
<div class="p5">
<span style="font-size: x-small;"> auth_alg=OPEN</span></div>
<div class="p5">
<span style="font-size: x-small;">}</span></div>
<div class="p5">
<span style="font-size: x-small;"><br />
network={</span></div>
<div class="p5">
<span style="font-size: x-small;"> ssid="ssidname"</span></div>
<div class="p5">
<span style="font-size: x-small;"> psk="ssidpassowrd"</span></div>
<div class="p5">
<span style="font-size: x-small;"> proto=RSN</span></div>
<div class="p5">
<span style="font-size: x-small;"> key_mgmt=WPA-PSK</span></div>
<div class="p5">
<span style="font-size: x-small;"> pairwise=CCMP</span></div>
<div class="p5">
<span style="font-size: x-small;"> auth_alg=OPEN</span></div>
<div class="p5">
<span style="font-size: x-small;">}</span></div>
<br />
<div class="p2">
---------------------------------------------------------------------------------------------------------------------</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-80533917186430406582014-08-24T20:29:00.001-07:002014-08-24T20:29:07.281-07:00Raspberry Pi SD backup and restore<div class="p1">
</div>
<div class="p1">
<b><span style="color: #6aa84f;">01. Start up your terminal tool on computer.</span></b></div>
<div class="p2">
<br /></div>
<div class="p1">
<b><span style="color: #6aa84f;">02. Backup 備份:BackupSDImg (MaxOS)</span></b></div>
<div class="p3">
<b>02-1。</b>$df -h ( look for your SD Card. My card is listed as /dev/disk1s1. Once you know which card is your SD Card type)</div>
<div class="p3">
<b>02-2。</b>$diskutil unmount /dev/disk1s1 (or whatever your SD Card is listed as)</div>
<div class="p3">
<b>02-3。</b>$sudo dd if=/dev/disk1 of=/develope/rpi_backupImg/wheezy-raspbian-Backup.img bs=4m</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p4">
<b><span style="color: #6aa84f;">03. Restore 還原:WritingSDImg (MaxOS) </span></b></div>
<div class="p3">
<b>03-1。</b>$diskutil unmount /dev/disk1s1 (or whatever your SD Card is listed as)</div>
<div class="p3">
<b>03-2。</b>$sudo dd if=/develope/rpi_backupImg/wheezy-raspbian-Backup.img of=/dev/disk1 bs=4m</div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p3">
【Other】</div>
<div class="p3">
$Ctrl+t (check backup process status查看備份進度)</div>
<div class="p3">
$diskutil eject /dev/rdisk1 (Once the backup is complete execute)</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0tag:blogger.com,1999:blog-5884135862013893036.post-70095212333167082042014-08-24T20:09:00.003-07:002014-08-24T20:26:42.815-07:00Raspberry Pi 介紹<br />
<div class="p1">
<span class="s1"><b><span style="color: #e06666;">Raspberry Pi</span></b></span><span class="s2">(簡稱RPI,中文稱樹莓派),</span>由英國的<span class="s2">Raspberry Pi</span>基金會所開發,其目的主要是為促進學校的電腦科技學教育,採用低價的硬體及自由軟體,<span class="s3">平台以</span><span class="s2">Linux</span><span class="s3">為基礎系統。</span></div>
<div class="p2">
<br /></div>
<div class="p3">
<span class="s2">Raspberry Pi</span>外形只有一張信用卡大小,但具有電腦的所有基本功能,類同小型電腦主機板,支援滑鼠、鍵盤、螢幕輸出、還有音訊與網路,以及包含<span class="s2">GPIO</span>傳輸介面,並且還可以執行<span class="s2">Debian</span>作業系統<span class="s2">(Linux Kernel)</span>或者其它嵌入式系統如<span class="s2">Arch Linux ARM</span>、<span class="s2">QtonPi</span>的一台小型迷你電腦。</div>
<div class="p3">
<br /></div>
<div class="p1">
<br /></div>
<div class="p1">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-VmCQ0wuj4XU/U_qokC7S17I/AAAAAAAAAIo/JdWv6XwPhhc/s1600/03%E5%9C%96%E4%B8%89%E3%80%81Raspberry%2BPi%2BModel%2BB%E7%B5%90%E6%A7%8B%E5%9C%96.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-VmCQ0wuj4XU/U_qokC7S17I/AAAAAAAAAIo/JdWv6XwPhhc/s1600/03%E5%9C%96%E4%B8%89%E3%80%81Raspberry%2BPi%2BModel%2BB%E7%B5%90%E6%A7%8B%E5%9C%96.jpg" height="282" width="320" /></a></div>
</div>
<div class="p3">
</div>
<div class="p2">
<div style="text-align: center;">
<span style="color: #6aa84f;">【 <span class="s1"> </span>Raspberry Pi Model B<span class="s2">結構圖 </span>[1]<span class="s2"> 】</span></span></div>
</div>
<div class="p2">
<span class="s2"><br /></span></div>
<div class="p2">
<span class="s2"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Qxri_l-LJC8/U_qorHIimFI/AAAAAAAAAIw/nrrKTF9lRfQ/s1600/04%E5%9C%96%E5%9B%9B%E3%80%81Raspberry%2BPi%2BPCB%E9%9B%BB%E8%B7%AF%E6%9D%BF%E9%85%8D%E7%BD%AE%E5%9C%96.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Qxri_l-LJC8/U_qorHIimFI/AAAAAAAAAIw/nrrKTF9lRfQ/s1600/04%E5%9C%96%E5%9B%9B%E3%80%81Raspberry%2BPi%2BPCB%E9%9B%BB%E8%B7%AF%E6%9D%BF%E9%85%8D%E7%BD%AE%E5%9C%96.png" height="222" width="320" /></a></div>
</div>
<div class="p2">
<span class="s2">
</span></div>
<div class="p1">
<div style="text-align: center;">
<span style="color: #6aa84f;"><span class="s1">【 </span><span class="s2"> </span>Raspberry PiPCB<span class="s2">電路板配置圖</span><span class="s3"> [2]</span><span class="s2"> 】</span></span></div>
<div style="text-align: center;">
<div style="text-align: left;">
<span class="s2"><br /></span></div>
<div style="text-align: left;">
<span class="s2"><br /></span></div>
</div>
</div>
<div class="p1">
<span class="s2"><br /></span></div>
<div class="p1">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ecgwzzYjU0w/U_qs5aR9wHI/AAAAAAAAAJE/wdDZUjbm8AI/s1600/05%E5%9C%96%E4%BA%94%E3%80%81Raspberry%2BPi%2BModel%2BB%2B26%2BPin%E8%85%B3%E4%BD%8D%E9%85%8D%E7%BD%AE%E5%9C%96.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-ecgwzzYjU0w/U_qs5aR9wHI/AAAAAAAAAJE/wdDZUjbm8AI/s1600/05%E5%9C%96%E4%BA%94%E3%80%81Raspberry%2BPi%2BModel%2BB%2B26%2BPin%E8%85%B3%E4%BD%8D%E9%85%8D%E7%BD%AE%E5%9C%96.png" height="301" width="320" /></a></div>
</div>
<div class="p1">
<div style="text-align: center;">
<span style="color: #6aa84f;"><span class="s1">【 </span>Raspberry Pi Model B 26 Pin<span class="s2">腳位配置圖 </span>[3] 】</span></div>
</div>
<div class="p1">
<br /></div>
<div class="p1">
<br />
<div class="p1">
<div align="center">
<br class="Apple-interchange-newline" />
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-color: white; border-collapse: collapse; border: none; color: black; margin-left: -11.05pt; text-align: center;"><tbody>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">尺寸</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">85.60mm x 53.98mm</span><span lang="EN-US"><o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">處理器</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">Broadcom BCM2835<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">每秒周轉速數</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">ARM1176JZF 700MHz<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">記憶體</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">512MB<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">外接儲存媒體</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">SD/MMC/SDIO card slot<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">輸入電壓</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">5V (via MicroUSB or GPIO header)<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">最低輸出功率</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">700mA(3.5W)<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">周邊</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">GPIO, SPI, I2C, UART<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="EN-US">RTC<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">No clock or battery<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">網路埠</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">10/100 wired Ethernet<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="EN-US">USB 2.0<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">2 (via iterated USB hub)<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">影像輸出</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">Composite RCA, HDMI<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="ZH-CN" style="font-family: "DFKai-SB","serif";">音頻輸出</span></b><b><span lang="EN-US"><o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">3.5mm jack, HDMI<o:p></o:p></span></div>
</td></tr>
<tr><td style="background: rgb(230, 230, 230); border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 108.9pt;" valign="top" width="109"><div class="MsoNormal" style="text-indent: 26pt;">
<b><span lang="EN-US">Digital GPIO<o:p></o:p></span></b></div>
</td><td style="border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; border-style: none solid solid none; padding: 0cm 5.4pt; width: 286.35pt;" valign="top" width="286"><div class="MsoNormal" style="text-indent: 24pt;">
<span lang="EN-US">8<o:p></o:p></span></div>
</td></tr>
</tbody></table>
</div>
<span class="s2"></span></div>
<div style="text-align: center;">
<span style="color: #6aa84f;">【 </span><span style="color: #6aa84f;">Raspberry Pi Model B</span><span style="color: #6aa84f;"><span lang="ZH-CN" style="font-family: DFKai-SB, serif; font-size: 12pt; line-height: 24px;">規格 】</span></span></div>
<br />
<br />
<br />
<br />
<br />
<br /></div>
<div class="p1">
【Ohter】</div>
<div class="p1">
Downloads | Raspberry Pi:http://www.raspberrypi.org/downloads/</div>
<div class="p1">
硬Pi製作:https://sites.google.com/site/raspberrypidiy/home</div>
<div class="p2">
<br /></div>
<div class="p3">
<br /></div>
<div class="p1">
【Reference】</div>
<div class="p1">
[1] Raspberry Pi, http://www.raspberrypi.org/.</div>
<div class="p1">
<span class="s1">[2]</span><span class="s2"> </span>Raspberry Pi PCB, http://en.wikipedia.org/wiki/Raspberry_Pi.</div>
<div class="p1">
</div>
<div class="p1">
<span class="s1">[3] </span>Raspberry Pi GPIO Connector, http://www.combinatorialdesign.com/boards/Raspberry_Pi/P1.</div>
VITALEEhttp://www.blogger.com/profile/03896611284485549754noreply@blogger.com0