2015年2月16日 星期一

Zenfone 5 USB Files Tra

Ref:  http://www.sogi.com.tw/mobile/articles/6228312-ASUS+PCLink+%26+iTools+v2_0_34+%E7%AE%A1%E7%90%86%E8%BB%9F%E9%AB%94
1.ZenFon 5 A500CG如果找不到USB偵錯 ,請至 設定 > 關於 > 軟體資訊 > "版本號碼" 點擊(三次)多下 ,就會出現 "開發人員選項".
2. The physical device shows in android studio 

3.



2015年2月15日 星期日

http://www.asus.com/tw/support/FAQ/1007851/

Ref: http://www.asus.com/tw/support/FAQ/1007851/
1安裝Android檔案傳輸程式(支援Mac OS X10.5或更高版本)
2. 可透過它在Mac和Android裝置間瀏覽及傳輸文件(支援Android3.0或更高版本)
3. 



2015年2月8日 星期日

Android Studio -Tutorial (Copy file into the sdcard of emulator)

Ref: 
1. https://diptimayapatra.wordpress.com/2013/07/04/copying-a-file-to-sd-card-image-using-adb-exe-for-android-emulator/
2. http://stackoverflow.com/questions/2083709/android-emulator-sdcard-push-error-read-only-file-system


1. Start Emulator.
2. Run command mode by administrator privileges
3. Change platform-tools directory (user as csjou)
C:\WINDOWS\system32>cd C:\Users\csjou\AppData\Local\Android\sdk\platform-tools
4. Follow Ref1 step fails to push file into sdcard.
C:\Users\csjou\AppData\Local\Android\sdk\platform-tools>adb push "C:\Users\csjou
\Pictures\HWUIC.jpg" /sdcard/
failed to copy 'C:\Users\csjou\Pictures\HWUIC.jpg' to '/sdcard//HWUIC.jpg': Read
-only file system
5. Change sdcard read-only status (Follow the command as red characters)
C:\Users\csjou\AppData\Local\Android\sdk\platform-tools>adb shell
root@generic_x86:/ # cd sdcard
cd sdcard
root@generic_x86:/sdcard # ls
ls
root@generic_x86:/sdcard # su
su
root@generic_x86:/storage/sdcard # mount -o rw,remount rootfs /
mount -o rw,remount rootfs /
root@generic_x86:/storage/sdcard # chmod 777 /mnt/sdcard
chmod 777 /mnt/sdcard
root@generic_x86:/storage/sdcard # exit
exit
root@generic_x86:/sdcard # exit
exit
6. 
C:\Users\csjou\AppData\Local\Android\sdk\platform-tools>adb push "C:\Users\csjou
\Pictures\HWUIC.jpg" /sdcard/
1388 KB/s (31311 bytes in 0.022s)

2015年2月6日 星期五

Mac Set $JAVA_HOME

Ref:http://liberalsprouts.blogspot.tw/2012/12/how-to-install-jdk-7-and-set-up.html
1. 確認設定
echo $PATH
echo $JAVA_HOME
2. vim .profile (原沒有此檔案,新建)
CSdeMacBook-Pro:~ csjou$ vim .profile
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/contents/Home;
export JAVA_HOME;
PATH=$PATH:$JAVA_HOME;
export PATH;
3. 重新載入

 su -l <user>
輸入密碼
4. echo $JAVA_HOME   OK!                                                          

2015年1月26日 星期一

Creator III - 1

1. Download  ReplicatorG0040 from http://replicat.org/download
2. Without python and related tools installed, there may be error as follows

3. Install
    Python-2.6.6
4. Install
    Psyco-1.6.win32-py25
    Fail due to missing mscvr71.dll (@ Win8.1 x64)
    4.1 Solved by download mscvr71.dll from http://www.addictivetips.com/windows-tips/fix-msvcp71-dll-and-msvcr71-dll-missing-error-in-windows-7/
    4.2 Copy msvcr71.dll into c:\Winodws\SysWow64
    4.3 Error due to the Chinese Simple name

    4.4 Copy file to a regular folder and then execute OK.
5. Test OK


2015年1月10日 星期六

Phonegap Helloworld for Android

Ref: http://www.moke.tw/wordpress/computer/advanced/438
        http://inspire.twgg.org/programming/html-css/item/389-html5-started-teaching.html
Ref1: Phonegap, Ref2: HTML5
1. Prepare HTML5 File (index.html,  the name of file has to be lower case letters)
<!DOCTYPE html>
<html>
      <head>
              <meta charset="UTF-8">
              <title>Example document</title>
       </head>
     <body>
              <header>
                    <h1><a href="#">Welcome to my page</a></h1>
               </header>
           <nav>
                       <ul>
                                <li><a href="#">Home</a></li>
                             <li><a href="#">About</a></li>
                            <li><a href="#">Contact</a></li>
                  </ul>
               </nav>
              <section>
                   <article>
                           <header>
                                    <h3><a href="#">Article 1</a></h3>
                                </header>
                           <section>
                                   <p>Lorem ipsum...</p>
                         </section>
                  </article>
                  <article>
                           <header>
                                    <h3><a href="#">Article 2</a></h3>
                                </header>
                           <section>
                                   <p>Lorem ipsum...</p>
                         </section>
                  </article>
          </section>
          <aside>
                     <h1><a href="#">Aside content</a></h1>
                    Lorem ipsum dolor sit amet..
              </aside>
            <footer>
                    <address>
                           Contact us at:<br />
                                <a href="http://itc.hwu.edu.tw/">itc.hwu.edu.tw</a>
                   </address>
          </footer>
   </body>
</html>
2. Prepare Config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns   = "http://www.w3.org/ns/widgets"
xmlns:gap   = "http://phonegap.com/ns/1.0"
id    = "tw.moke.testing"
versionCode = "10"
version     = "0.2.0" >

<name>HelloWorld</name>

<description>
專案描述
</description>

<author href="http://itc.hwu.edu.tw" email="092012@mail.hwu.edu.tw">
csjou
</author>

<!-- current version of PhoneGap -->
<preference name="phonegap-version" value="3.5.0" />
<!-- 設定畫面固定為水平(landscape)、垂直(portrait) -->
<preference name="orientation" value="landscape" />
<!-- 加入其它plugin設定 -->
</widget>
3. Zip both of them into a file say Helloworld.zip
4. Upload into Phonegap Builder
5. Select App platform.
6. Scan QR code (Download apk and install)


2014年12月10日 星期三

1. Simplify Kinect code based on version 1.8 --- Audio event

Ref : AudioBasic-WPF
This example demonstrates the audio sensor application by 6 steps.

// 1. Add Ref Kinect 1.8
// 2. Add namespace
using Microsoft.Kinect;

namespace AudioAngleEx1
{
    class Program
    {
        static void Main(string[] args)
        {
            // 3. Create Sensor object
            KinectSensor Sensor = KinectSensor.KinectSensors[0];
            // 4. Add event method
            Sensor.AudioSource.BeamAngleChanged += AudioSource_BeamAngleChanged;
            // 5. Start Sensor
            Sensor.Start();
            // 6. Start Microphone
            Sensor.AudioSource.Start();
            Console.WriteLine("Press 'Enter' then stop.");
            Console.ReadLine();

        }

        static void AudioSource_BeamAngleChanged(object sender, BeamAngleChangedEventArgs e)
        {
            Console.WriteLine("BeamAngle = {0} ", e.Angle);
        }
    }
}