2012年12月20日 星期四

Free book info

http://it-ebooks.info/google/?q=android

Human Body 3D

http://www.zygotebody.com/#nav=3.21,123.53,250

[HTML] SEO

Follow the rule to do your website SEO.

http://searchengineland.com/seo-checklist-of-best-and-worst-practices-part1-43752
http://searchengineland.com/seo-checklist-part-2-best-practices-44075

雞蛋糕的作法


http://bbs.moninet.com.tw/board/topic.cgi?forum=53&topic=1278

目前使用鬆餅粉去作, 結果吃起來太硬, 上連結有很多可參考資料;等實作出鬆軟的蛋糕, 再作分享~

http://dorcaschang.pixnet.net/blog/post/25345073-【食譜】雞蛋糕
這裡有提到一些TIP,


1. 在參照完你所使用市面上的蛋糕粉食譜,以他的比例調配完所需的麵糊之後,將麵糊放入冰箱2~3小時。這個步驟會讓你的麵糊更安定,在製作的時候會發得比較好,你會發現相同的材料,冰過的麵糊做出來的比較好吃~
2. 如果你參照的是使用低筋麵粉直接調配麵糊的食譜,那千萬不要自行將糖減掉太多的量,因為不加糖或是糖太少會讓麵糊出筋。
這大概就是所謂的關鍵,因為作成糊之後,沒有等就去加熱;另外,不想吃太多糖,就沒加那麼多,是不是會出筋~
製作雞蛋糕所使用的材料,
大概也就是那幾樣:
使用市面上蛋糕粉製作(快速法):蛋糕粉、雞蛋、水或牛奶
省錢拼經濟法(較麻煩):低筋麵粉、雞蛋、水或牛奶、泡打粉、糖

打發也是一項關鍵: http://www.360doc.com/content/11/0301/20/837810_97264668.shtml


2012年12月19日 星期三

[HTML] Div align center

Refer to the page:
http://www.webtech.tw/info.php?tid=45

1. For FireFox、Chrome、Opera:
margin: 0px auto;

2. For IE8:
<div style="text-align:center;">
 <div style="margin:0 auto;border: 2px solid blue; width:150px;">這裡是文字</div>
</div>

3. For IE7:
*margin: 0px auto;

4. For IE6:
_margin: 0px auto;

2012年12月3日 星期一

Apply free SSL CA

Instantssl provides 90 days free CA for SSL connection.

http://www.instantssl.com/ssl-certificate-products/free-ssl-certificate.html

Before you apply your SSL solution, need to create server.key and server.csr based on your web server solution.

Then you need to have domain name account to get validated mail such as webmaster@yourdomain.com.

Finally, after reviewing your oganization then approval your CA.
Follow the SSL setup to install .crt file.

Set SMTP example for PHPMailer


The example is how to send mail via Gmail smtp server.

1. You need has Gmail account and set POP enable in mail setting.
2. You need to enable openssl function in php.ini or server is support openssl.
    extension=php_openssl.dll
3. Use the example in phpmailer.php and modify your mail information as below.

<?php
require_once('../class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded

$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch

$mail->IsSMTP(); // telling the class to use SMTP

try {
  $mail->Host       = "smtp.gmail.com"; // SMTP server
  $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
  $mail->SMTPAuth   = true;                  // enable SMTP authentication
  $mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
  $mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
  $mail->Port       = 465;                   // set the SMTP port for the GMAIL server
  $mail->Username   = "your@gmail.com";  // GMAIL username
  $mail->Password   = "xxxxx";            // GMAIL password
  $mail->AddReplyTo('you@gmail.com', 'First Last');
  $mail->AddAddress('to@com.tw', 'John Doe');
  $mail->SetFrom('you@gmail.com', 'First Last');
  $mail->AddReplyTo('you@gmail.com', 'First Last');
  $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
  $mail->MsgHTML(file_get_contents('contents.html'));
  $mail->AddAttachment('images/phpmailer.gif');      // attachment
  $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
  $mail->Send();
  echo "Message Sent OK</p>\n";
} catch (phpmailerException $e) {
  echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
  echo $e->getMessage(); //Boring error messages from anything else!
}
?>

Also can use Microsoft Exchange server as SMTP.


<?php

ini_set('display_errors', 1);   # enable PHP error reporting
error_reporting(E_ALL);

require_once('../class.phpmailer.php');
$mail = new PHPMailer();

$mail->IsSMTP();  // telling the class to use SMTP
$mail->Host     = "Exchange server name"; // SMTP server
$mail->SMTPAuth = true;
$mail->Username = "Domain\account";
$mail->Password = "xxxx";

//$mail->SetLanguage("en", DIR_3RDPARTY."/phpmailer/language/");

$mail->From     = "From@com.tw";
$mail->FromName = "your name";
$mail->AddAddress("To@com.tw");

$mail->Subject  = "SMTP Test";
$mail->Body = "Hello World";

if(!$mail->Send()) {
    echo 'Message was not sent.';
    echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
    echo "Sent";
}
?>

2012年12月2日 星期日

Generate and install Self Signed SSL Certificate for XAMPP


Step 1: Generate a Private Key
C:\xampp\apache\bin>openssl genrsa -des3 -out server.key 1024 

Step 2: Generate a CSR
C:\xampp\apache\bin>openssl req -new -key server.key -config “C:\xampp\php\extras\openssl\openssl.cnf” -out server.csr

Step 3: Remove Passphrase from Key
C:\xampp\apache\bin>copy server.key server.key.org
C:\xampp\apache\bin>openssl rsa -in server.key.org -out server.key

Step 4: Generating a Self-Signed Certificate
C:\xampp\apache\bin>openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt 

Step 5: Installing the Private Key and Certificate

C:\xampp\apache\bin>copy server.crt c:\xampp\apache\conf\ssl.crt
C:\xampp\apache\bin>copy server.key c:\xampp\apache\conf\ssl.key

or configure the setting

<VirtualHost ssltest.com:443>
    DocumentRoot "path/to/ssltest.com"
    ServerName ssltest.com
    ServerAlias www.ssltest.com
    ServerAdmin you@ssltest.com
 
    SSLEngine on
 
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW
    :+SSLv2:+EXP:+eNULL
 
    SSLCertificateFile "path/to/server.crt"
 
    SSLCertificateKeyFile "path/to/server.key"
 
    <FilesMatch "\.(cgi|shtml|phtml|php|php5|php4|php3?)$">
       SSLOptions +StdEnvVars
    </FilesMatch>
 
    <Directory "path/to/cgi-bin">
       SSLOptions +StdEnvVars
   </Directory>
    SetEnvIf User-Agent ".*MSIE.*" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
</VirtualHost>



Step 6: Restart Apache and Test

2012年11月29日 星期四

[Android] Rename Package in Eclipse



Changing package name is pain and may occur errors especially submit App and get the same package name feedback. I try several methods and found the way is easily.

1. Right click on the package name then Refractor > Rename.
    There may be many package name needed to change and should check all.
2. Right click on the project name Android tools > Rename Application Package.
3. Manually set the package names in the Manifest that have not been changed by the previous steps.

2012年11月28日 星期三

MAC 10.8 WebATM 網路IC讀卡機

在台灣,目前看看主要只有玉山銀行有 SUPPORT MAC 網路轉帳的功能;
我從 OS X 10.7 upgrade 10.8,  driver 需要重新安裝;

首先, 先重新安裝 EZ100PU driver, 
http://www.casauto.com.tw/in-download-02.aspx?cid=C_00000001&id=P_00000001
在網站裡沒有 10.8 的版本, 其實用 10.7 的也是 OK 的;

再來是進入玉山銀行 WebATM, 
http://netbank.esunbank.com.tw/webatm/Q&A_017.htm?ctype=b&cid=Machotervice_ebanking&oid=webatmst_03
下載 Safari plugin-in 元件,以上兩個動作要重開機和重開 Safari 

最後就是插入 USB, 重新整理WebATM 網頁, 就會捉到讀卡機囉~

2012年11月27日 星期二

VNC session connection failed

Use realVNC and met the error message "session connection failed" when logout remote account on windows based OS.

So I change to tightVNC and it works.
http://www.tightvnc.com/download.php

2012年11月16日 星期五

How to Install Windows 8 on Mac and PC

1. Install virtual box (free)
    Download VirtualBox for Windows, Mac or Linux: http://www.virtualbox.org/wiki/Downloads

2. Download Windows8 (90 days trial version)
    http://msdn.microsoft.com/en-US/evalcenter/jj554510.aspx?wt.mc_id=MEC_132_1_4

2. Run virtual box and select OS type --> Windows 8

Also reference to Windows version install
http://windows.appstorm.net/how-to/how-to-try-out-windows-8-in-virtualbox/

Refer to Microsoft Windows 8 System Requirements:

Windows 8 works on the same hardware that powers Windows 7:
  • Processor: 1 gigahertz (GHz) or faster
  • RAM: 1 gigabyte (GB) (32-bit) or 2 GB (64-bit)
  • Hard disk space: 16 GB (32-bit) or 20 GB (64-bit)
  • Graphics card: Microsoft DirectX 9 graphics device with WDDM driver



2012年11月13日 星期二

Update Apple Apple from iOS 5 to 6

Update Apple App to new version, following the steps.


  1. Select project to iOS device and edit scheme of archive.
  2. Build archive.
  3. Go to http://itunesconnect.apple.com to add new version.
  4. Edit update note then finish the new version process. Status will show waiting for upload.
  5. Xcode --> Select archive to do validate process
  6. Xcode --> Distribute archive
You will occurs the missing screen if update to iOS6 and forget to upload 4 inches screenshot.
Just upload the screenshots from your simulator or iOS devices including iPad & iPhone.

Good luck.



2012年11月12日 星期一

[Xcode] Upgrade App to iPhone5

1. Update Xcode to 4.5 & OS X to 10.8 for iOS6
2. Check machine name

machineName()
{
    struct utsname systemInfo;
    uname(&systemInfo);

    return [NSString stringWithCString:systemInfo.machine
                              encoding:NSUTF8StringEncoding];
}



@"i386"      on the simulator
@"iPod1,1"   on iPod Touch
@"iPod2,1"   on iPod Touch Second Generation
@"iPod3,1"   on iPod Touch Third Generation
@"iPod4,1"   on iPod Touch Fourth Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
@"iPad1,1"   on iPad
@"iPad2,1"   on iPad 2
@"iPad3,1"   on iPad 3 (aka new iPad)
@"iPhone3,1" on iPhone 4
@"iPhone4,1" on iPhone 4S
@"iPhone5,1" on iPhone 5

if iPhone5 then do action ...

3. Give launch image for myImage-568h@2x.png
4. Change UIView or UIImage of background as Autosizing.
    Adjust the origin of each component.
5. Test simulator and real iOS device to check without errors.

2012年10月8日 星期一

Edit your vedio online

Try to camera my own video for some demo. The most convenient tool is mobile phone.
After recording video, the file format is 3GP and the video is needed to rotate 90 degree.
Ha, it's easy to edit online. Just upload to Youtube then use Youtube editor.
The video also can set to private use.

2012年9月18日 星期二

[Android] Please ensure that adb is correctly located at 'C:\Program Files\Android\android-sdk-windows\platform-tools\adb.exe' and can be executed.

If you get the error message "Please ensure that adb is correctly located at 'XXX\platform-tools\adb.exe' and can be executed.", just check the path setting in your computer environment for Microsoft Windows Operation System.

The adb in tools/ is moved to platform-tools/ for new SDK version.
Add the real path to your path environment.

[Android] Auto detect target device phone

If you do not find your phone in ADB (Android Device Bridge), you may have some issues needed to check.

1. On the device, go to Settings > Applications > Development and enable USB debugging (on an Android   4.0 device, the setting is located in Settings > Developer options).

2. Check USB driver is installed.

3. Go to the folder where ADB.exe in, e.g, C:\Android\android-sdk\platform-tools.
Type command <adb devices> then it should have your device names list. If not, check USB driver first.

or Try adb commands to restart adb server.

adb kill-server
adb start-server


4. Check Android version of your project. Right click your project->Properties->Android->ProjectBuildTarget. Make sure that it's not newer than your device's version.

[Android] Simple way to set up development environment

It is recommended to use Eclipse.

First take time to read Android Official training materials here. http://developer.android.com/training/basics/firstapp/index.html

1. Because Android is Java based, Java SDK is needed to install.
    Better to choice the second latest version if possible. The newest version may have some bugs issue.

2. Download and install Eclipse. (The version is better newer because old version that Android SDK may not support)

3. Run Eclipse and install ADT (Android Development Tool)
    Help --> Install new software -->
   Paste the address http://dl-ssl.google.com/android/eclipse/site.xml then you can install the ADT.

4. Check Android version of your Android phone then update SDK if necessary by Android SDK Manager.

5. Set up Android Path. Eclipse --> Windows --> Preference --> Android
    For my case, I install SDK here.  C:\Android\android-sdk

6. Follow the tutorial to build your first App "Hello world".

2012年9月17日 星期一

[Android] Very good tutorial - Traditional Chinese


http://blog.chinatimes.com/tomsun/archive/2007/11/03/213763.html

[Xcode] Provisioning profile cannot be found

Use new iOS developer and add to portal as development device.
After building App, the error message shows "Provision profile XXX cannot be found".

Your xcode project file gets messed up your setting.
Just click your xcodeproj and click "Show Package Contents".
Use textedit to open project.pbxproj and remove XXX string.

Then re-open Xcode and build then it should work again.

2012年9月14日 星期五

[Android] Files



APK files
•Android Packages
• All class files and resources needed to run
• Class files recoded to dex
• Manifest defines activities and other facets

DEX
• Dalvik Executable
• More compressed form than bytecode
• Third party libs can be converted to dex

APK
• Install - put APK in data/app
• Uninstall - remove APKSecurity

[USB] Study about HID to serial

The bandwidth on basic HID is limited to 64 KB/sec.

Windows API abstract the software developer from HID reports, allowing the developer to think of the data interface as an unformatted stream of data, similar to a COM port.


Benefits of developing with HID include:
 Compatibility with all commonly-used operating systems (Windows 7/Vista/XP, Mac OS X, Linux)
 No need for driver development or distribution
 Streamlined device/host interface due to standardized (but flexible) HID specifications


Once a device has successfully enumerated, the host can begin sending and receiving data in the form of reports.All data passed between an HID device and a host must be structured according to specifications found in the report descriptor. These reports can be transmitted across either the “Control” pipe (endpoint 0) or the “Interrupt”  pipe (endpoints configured to be IN or OUT).
from AN249.pdf (Silicon Labs)



And UART baud rate is controlled by switch HID-to-Serial Chip.

How to differ each HID devices.

Get the number of physical USB devices on the system associated with this combination of vid and pid.

How to implement Software Application:

At the beginning of the application, the application should register device change notifications by using HID_RegisterForDeviceNotification().
2. Write ON_WM_DEVICECHANGE
3. Write a function OnDeviceChange() as a public function for the window.


2012年9月13日 星期四

[iPhone 5] Compare iPhone specification


The apple website shows the full specification of iPhone 5 as below.
http://www.apple.com/iphone/compare-iphones/

To sum up that:


OS: iOS6 (Upgrade to OSX 10.8 Mountain Lion)
Camera: 8MP (Multi-point camera)
CPU: Dual-core A5 to A6
Screen: 3.5 to 4.0 in-screen
Display: 1136-by-640 resolution
(960-by-640 iPhone 4S)
Cable: Lightning to USB Cable
Cellular: Add LTE
SIM Card: Nano SIM
Other: Battery Life /
     FaceTime camera /
           Headphone /
           Storage /
No NFC        

2012年9月12日 星期三

[iOS6] Online Passbook generator

Found several sites that support to create Passbook online.
This is new function so several function on sites are not ready.

http://passk.it/samples/
http://www.passsource.com/customize.php?template_id=2

[iOS6] Passbook status


Below link show the user test passbook function on Phone for airport but unlucky it doesn't work.
I think new technique should get real users and service providers support then it works.
http://www.youtube.com/watch?v=NqLLWh5JoXs&feature=player_embedded

In early of September, 2012, Virgin Australia, Amerian Airlines, United and Delta are first off the mark to confirm their mobile boarding passes will work with Apple's Passbook app being built into iOS 6, so we have chance to see it happen in the future.

2012年9月10日 星期一

買42吋電視

開始爬文, 找尋42吋電視標地

1. 距離
42~1920*1080 最佳觀賞距離 = 64.6/ 1080 * 3400  203公分=2.0
這個公式不知怎麼算來的,是用它的高來計算

2. Resolution
光看第四台,解析度會比傳統 CRT 差;除電漿電視或是 Full HD Channel

3. 電視會越來越大, 所以要儘量買大尺寸

4. Smart TV
若有閒錢或是有網路才買

5. 視訊盒內建
現在為數位時代,有的話就不用外接

6. HDMI
現在 Portable device 幾乎都有,所以一定要
1.3的更棒

7. 3D
現在內容還不夠多,先不用買

8. 兩萬有找
美國VIZIO 42吋120Hz 3D液晶顯示器+視訊盒(E3D420VX-TW)
BenQ 42吋LED液晶顯示器+視訊盒(SL42-6500)
CHIMEI奇美 42吋數位LED液晶顯示器+視訊盒(TL-42LX500D)
LG CS460系列42吋液晶電視42CS460
IPS頂級硬式面板 17910 NTD

9. 尺寸一定要先量過, 1170 mm

10. 有USB更好

2012年9月7日 星期五

[Android] NFC API



APIs give applications read and write access to a wider range of standard tag technologies, including:

NFC-A (ISO 14443-3A)
NFC-B (ISO 14443-3B)
NFC-F (JIS 6319-4)
NFC-V (ISO 15693)
ISO-DEP (ISO 14443-4)
MIFARE Classic
MIFARE Ultralight
NFC Forum NDEF tags

ClassDescription
TagTechnologyThe interface that all tag technology classes must implement.
NfcAProvides access to NFC-A (ISO 14443-3A) properties and I/O operations.
NfcBProvides access to NFC-B (ISO 14443-3B) properties and I/O operations.
NfcFProvides access to NFC-F (JIS 6319-4) properties and I/O operations.
NfcVProvides access to NFC-V (ISO 15693) properties and I/O operations.
IsoDepProvides access to ISO-DEP (ISO 14443-4) properties and I/O operations.
NdefProvides access to NDEF data and operations on NFC tags that have been formatted as NDEF.
NdefFormatableProvides a format operations for tags that may be NDEF formattable.

From Android

The platform also provides a limited peer-to-peer communication protocol and API. Foreground Activities can use the API to register an NDEF message that will get pushed to other NFC devices when they connect.

http://developer.android.com/about/versions/android-2.3.3.html
http://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html

2012年9月6日 星期四

[MAC] Some good tools

Find the useful tools from internet, try them later.


  • Adium to chat online with clients and co-workers
  • iCal so I never miss a meeting
  • Billings to track client expenses and invoice for time
  • svnX for sending files to SVN servers
  • Cyberduck for FTPing to servers and CDN’s
  • MAMP for running websites locally
  • Yammer for talking to the team
  • GasMask for easy .host file edits
  • MoneyDance for keeping track of home expenses

[NFC] Chipset marketing information

This article is very useful NFC marketing information for IC Chip.

http://www.digitimes.com/Reports/Report.asp?datepublish=2012/05/16&pages=VL&seq=201

2012年9月5日 星期三

[NFC] Technique



Nexus 7, Nexus S, Galaxy Nexus, Nexus Q, Samsung Galaxy S3, HTC One X contains the same NFC chip (PN544 by NXP Semiconductors).
MIFARE Classic is a technology by NXP, so it is supported by NXP's NFC chips

Blackberry contains an NFC chip by a different manufacturer so can't read NXP MIFARE Tag.

 Based on NFC Forum, list tag types:



  • Tag 1 Type: e.g. Broadcom's Topaz/Jewel
  • Tag 2 Type: e.g. NXP's MIFARE Ultralight (incl. Ultralight C) or NTAG203
  • Tag 3 Type: e.g. Sony's FeliCa chips (e.g. FeliCa Lite)
  • Tag 4 Type: e.g. NXP's MIFARE DESFire
NFC devices can operate in three different modes based on the ISO/IEC 18092, NFC IP-1 and ISO/IEC 14443 contactless smart card standards.


  1. Read / Write: NFC enabled phone can read or write data to any of the supported tag types in a standard NFC data format.
  2. Peer to peer: Two NFC-enabled devices can exchange data. Peer-to-Peer mode is standardized on the ISO/IEC 18092 standard.
  3. Card emulation: An NFC-enabled phone acts as reader when in contact with tags or act as a tag  for existing readers.
NFC devices:
Blackberry Bold 9900
HTC One X
LG Prada 3.0
LG Optimus Vu
Samsung Galaxy Nexus
Samsung Galaxy Note
Samsung Galaxy S II HD LTE
Samsung Galaxy S III
Samsung Galaxy S III LTE
Sony Xperia S
Sony Xperia acro S
Sony Xperia P
Sony Xperia sola
Sony Xperia ion
Asus Nexus 7



References:

2012年9月4日 星期二

SKU for APP

The Wikipedia explains that:

It is a unique identifier for each distinct product and service that can be purchased. The usage of SKU is rooted in data management, enabling the company to systematically track its inventory or product availability, such as in warehouses and retail outlets. They are often assigned and serialized at the merchant level. Each SKU is attached to an item, variant, product line, bundle, service, fee, or attachment

For our App SKU, just use <com>.<company name>.<product>, it's a little like program namespace.

[Xcode] Use if condition for storyboard segue push

Generally, we use storyboard seque is that drag button to destination view controller.
But if we want to do if some condition to different target view controller, should use another way.

1. Drag source view controller to destination view controller as seque push.
2. Give push identifier name.
3. Put the code [self performSegueWithIdentifier: @"goToDestination" sender: self]; to your button action.

Remember don't forget the identifier.

http://stackoverflow.com/questions/9044265/xcode-storyboard-cancel-push-if-a-condition-is-not-met

2012年9月3日 星期一

[Xcode] Using iOS Simulator

This article is great that introduce many detail information of simulator.
http://www.informit.com/articles/article.aspx?p=1829415&seqNum=3

Another reference:
http://www.engineeredaudio.com/blog/

Apple staff said if developing BLE, will need to use real hardware.
https://forums.developer.apple.com/thread/14983


CNN 認為 2012 年十大科技趨勢


CNN 認為 2012 年十大科技趨勢

  1. Touch Computing
  2. Social Gestures
  3. NFC and mobile payment
  4. Beyond the iPad
  5. TV Everywhere
  6. Voice Control
  7. Spatial Gestures
  8. Second-screen experiences
  9. Flexible screens
  10. HTML5
Source : CNN , 2011 年 12 月

調整 ios simulator 畫面


這裡有一個好方法去調整設定, 參考以下網址
http://www.applelife.tw/node/1997

2012年8月31日 星期五

Good Mobile Web & Web Design Hint


http://www.mobilexweb.com/blog/mobile-web-html5-performance-optimization


After you design done, use W3C tools to verify the HTML5 page.

checklink: check the page link could go to the target page or file.
https://validator.w3.org/checklink

HTML5 validator: check your page is meet HTML5 format.
https://validator.w3.org/

CSS validator: check your css file is meet CSS format.
http://jigsaw.w3.org/css-validator/

HTML5 test - compare browsers tool
http://html5test.com/

CanIuse HTML5 canvas
http://caniuse.com/#feat=canvas

Use different IE version to test your web page (Simulator):
http://netrenderer.com/index.php

Javascript for DOM keycode
http://www.dotblogs.com.tw/corner/archive/2009/07/19/9583.aspx

Javascript Lib:
JQuery:
http://jquery.com/

JQueryUI:
http://jqueryui.com/
http://ui.jquery.com/

Examples:

1. HTML5 & javascript game: (Chinese)
    http://www.slideshare.net/azole/javascript-html51?related=1
    http://www.slideshare.net/azole/javascript-html5-2-ball?related=2




2012年8月30日 星期四

BT 4.0 Chipset Solution


目前BT4.0 分為 Single mode Dual mode;
Single mode 可以說是 Sensor mode, GATT & GAP Profile, 目前有看到 Heart rate, Thermometer, (Glucose)
Dual mode 目前只看到 HCI, 也就是需要外掛 MCU drive Bluetooth, 並沒有看到有Flash type ;

Dual Mode若有出 external Flash, 依目前市場狀態肯定會比原先的BT,
因為它兼容double function, H/W S/W架構也會不同, 推估也不太會有這樣solution~

另一類Cost down solution就是使用Single mode, Client & Server 客制 GATT profile, 打通兩邊的 UART port, SPP模擬 ;
但這是客制化, 也就是不會是個標準~

由以下可以看出 Marvell, Broadcom 主打 PC/NB/MACHCI solution;
CSR雖有跨到 sensor, 依官網 Solution比較像是作客制solution
目前仍以 TI solution 最完整,

整體來看, 各家陸續在推出BT4.0 solution, SIG也在持續推廣標準profile,
雖有市場已經有devices採用,
Samsung Galaxy S3
Apple's iPhone 4S iPad (3rd gen)
Apple MacBook Air, Mac Mini and MacBook Pro (Retina, June 2012)
Pebble E-Paper Watch
Google Nexus 7 tablet

預估至少還要在過半年, solution 會比較成熟, 尤其在Software Application~
Bluetooth BLE Chip Vendor
Single mode
Dual mode
TI
CC2540 / CC2541
CC2564
Broadcom

BCM20702
BCM43142 (WiFi + BLE4.0)
Nordic
nRF8001

CSR
CSR µEnergy®
CSR8000 (v3, v4, FM)
Marvell

88W8897 (WiFi-ac, NFC, BT4.0)
EM Microelectronic
EM9301


若有錯誤, 請不吝嗇指教~ Thanks,

References:
CSR / TI / Nordic / Marvell / EM Microelectronic / Broadcom Office website

Use Microsoft IE browser on MAC

It's really magic that you can use IE browser on MAC.
Generally, it's needed to install Microsoft Windows OS then you can use IE.
For MAC users, people often use bootcamp, VMware or Virtual BOX to install MS OS for Intel CPU Macbook.
Now we can use the tool called WineBottler to install IE.

http://www.macuknow.com/node/10055

But it seems not support ActiveX. Ha~

2012年8月28日 星期二

[Android] Use Webview class to develop WEB App



If you want to deliver a web application as a part of a client App, can use WebView. The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity layout.
It does not include any features of a fully developed web browser, such as navigation controls or an address bar.

The demo code as below:

1. Import the Web View class
import android.webkit.WebView;  

2. Declass Web View and use loadUrl
WebView webView = new WebView(this);
webView.loadUrl("http://your web site");
setContentView(webView);

3. Also need to add permission to access your Internet.
Add permission setting at androidmanifest.xml 
<uses-permission android:name="android.permission.INTERNET" />

4. Develop web and make layout similar to Android App.


Taking Screenshots Of Your Android Device

Easy way is that use your Android tool - Dalvik Debug Monitor.

Just run the DDMS.BAT in your Android SDK tools folder.

And make sure your device is set enable USB debugging.
You can do this by going to Settings ->Applications->Development and click to enable “USB Debugging.”

Once that’s done, go ahead and plug your mobile phone into the USB port. Since you’ve already installed the driver for your device, your computer will identify and connect – if it doesn’t then just browse to directly where you downloaded the driver files (again, you’ll only have to do this once.)

Then you can get your device screen.

Also refer to this page: http://www.addictivetips.com/mobile/how-to-take-screenshots-of-android-device/

[Xcode] Follow the rule before submitting your App


Apple has his own review guide line needed to follow up.
https://developer.apple.com/appstore/resources/approval/guidelines.html

Don't forget to read Apple human interface guidance.

Also need to check other developer experiences such as:
http://mobileorchard.com/avoiding-iphone-app-rejection-from-apple/

2012年8月27日 星期一

[Xcode] Submit App when using core plot

When you arching your App and do validate at Organizer, the message may show "[Your App name]  does not contain a single-bundle application or contains multiple products."


1. Click on the Project CorePlot-CocoaTouch and go to the Build Settings.  Set "Skip Install" to Yes.
2. Click on the CorePlot-CocoaTouch target and set "Skip Install" to Yes.
3. Click Build Phases and under Copy Headers, move all of the Public and Private entries to the Project section.

Re-arching your App then your should pass validate check.

2012年8月22日 星期三

[Xcode] Viewing Console Output and Device Logs


The iOS frameworks, such as UIKit, send log entries to the console to indicate, among other things, when an unexpected event occurs. You can emit console messages in your iOS apps, too. One way to emit console messages is to use the NSLog function. Console logs can help you analyze your app’s logic and track down bugs.

When running your app in a simulator, you can access the app’s console logs in the Console app (located in /Applications/Utilities)

Mac OSx terminal sudo

I think for security reason, OSx require user not use blank password to run sudo command.

The content below is referred from Apple website:



 Mac OS X v10.6 or later, if you press the Return key at the password prompt without entering a password, the message "Sorry, try again." will be displayed and you will be prompted for a password again.
If your administrator account has no password (a blank password), you must give that user a password before using thesudocommand.
After you are done using thesudocommand, you can change your account password again, although it is recommended that your administrator account have a non-blank password.

Use UISwitch in custom UIViewTableCell

I use UISwitch in my cells and can do add, edit and delete.

But UISwitch is always disappeared after change to ON of OFF.
I search Google and find a lot of developer has this issue and spend a lot of time to debug.

Finally, this bug has removed. Why?

Don't put the code to the cell configure function and that will let you run the code several times.

    cell.accessoryView = enableUISwitch;
    cell.editingAccessoryView = enableUISwitch;


Use accessoryView is good because you need to get UISwitch status: ON or OFF.



- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject
       atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type
      newIndexPath:(NSIndexPath *)newIndexPath

Then you can use didChangeObject to get which row of UISwitch's status otherwise it can't be got.

It is only just run one time enough. 


This bug makes me almost crazy for two days.