2012年11月28日 星期三

我的健康管理MyHealthApp Version 2.0 版

wow~

我的健康管理MyHealthApp Version 2.0 版更新發佈囉!!!

此次更新包含了


1.修正『我的記錄』資料重覆出現問題。

2.修正『我的記錄』」月」無法正常點擊。

3.圖表內容新增放大功能。

4.替換圖表顯示方式。

5.新增loading未出現問題。

6.修正無血壓或無血糖顯示方式。

7.健康資訊資料內容改由動態讀取顯示。

8.新增支援4 inch螢幕大小顯示。 (也就是iPhone5也可以使用呦!!)

9.標題顏色修改




2012年11月24日 星期六

滑鼠移上切換圖片

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
       

            icon = new Image();
            icon.src = "../image/1.png";
            icon2 = new Image();
            icon2.src = "../image/2.jpg";
            icon3 = new Image();
            icon3.src = "../image/3.jpg";
            icon4 = new Image();
            icon4.src = "../image/4.png";
            function showImages(obj) {
                // DOM
               // var theImg = document.getElementById("myID");
                // theImg.src = obj;
                // BOM
                document.images[0].src = obj;
        }
    </script>
</head>
<body>
<a href="#" onmouseover="showImages(icon.src)">icon1</a> | <a href="#" onmouseover="showImages(icon2.src)">icon2</a> | <a href="#" onmouseover="showImages(icon3.src)">icon3</a> | <a href="#" onmouseover="showImages(icon4.src)">icon4</a>
<hr />
<img id="myID" src="../image/1.png" width="200px" />
</body>
</html>

2012年11月23日 星期五

置換網頁,不出現上一頁

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
    </script>
</head>
<body>
    <input type="button" value="href"  onclick="location.href='http://www.yahoo.com.tw'"/>
    <input type="button" value="replace"  onclick="location.replace('http://www.yahoo.com.tw')"/>
</body>
</html>



通常用reload會出現上一頁的按鈕讓使用者回去前一頁,

但今天如果不想讓使用者回前一頁的話,

可以使用replace()的方式就不會有這個問題出現

[javascript]抓取螢幕屬性

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--螢幕物件-->
<head>
    <title></title>
    <script type="text/javascript">
        window.onload = function () {
            with (document) {
                write("<pre>");
                writeln("螢幕可用高度:" + screen.availHeight);
                writeln("螢幕可用寬度:" + screen.availWidth);
                writeln("高度:" + screen.height);
                writeln("寬 度:" + screen.width);
                writeln("色彩:" + screen.colorDepth);
                write("</pre>");
            }
        }
    </script>
</head>
<body></body>

2012年11月20日 星期二

ios APNS文字補充

1.鑰匙圈存取→憑證輔助程式→從憑證授權要求憑證…
 Common Name要記得填入什麼,等下會用到。

2. 儲存到磁碟(saved to disk) ,此時會是你的 檔名.cerSigningRequest。

3.前往→工具程式→鑰匙圈存取→點左下方類別的 鑰匙,會看見多出兩個剛才Common Name   輸入的文字密鑰(公用密鑰、專用密鑰)



5.登入iOS Provisioning Portal (就是要申請憑證的那裡)

6.新建一個App IDs 建立好後,找到剛才新建的App IDs項目,點選Configure→將Enable for Apple Push Notification service打勾,點選Configure,上傳剛才第一步得到的cerSigningRequest副檔名。

7. 選擇好後,按下Generate(產生),將產生的SSL檔下載下來,此時下載下來的預設檔名為 aps_development.cer,要記先點擊兩下!

8. (4).    在與剛才Common Name相同的專用密鑰上點選右鍵 Export ”Common Name輸入的名稱",此 時檔案格式會是 .p12檔→按下存儲後,會跳出密碼,請輸入要設定的密碼,之後會用到  唷( .net使用只要到此步即可)。

8. 下載完成後,點選done 此時你會看見Status會變為Enabled的綠燈

9.  現在你應該會有三個檔案,副檔名分別是  .cerSigningRequest  、 p12 、cer 三個檔

10.  現在要來合併提供給PHP使用的檔案,請開啟終端機

11. 首先我們要透過指令將 cer檔轉成.pem檔

12. 將終端機移到剛才三個檔案的位置,並且下下方指令:


openssl x509 -in aps_developer_identity.cer -inform der 

    -out 轉換出的檔.pem


13.  此時會產出       轉出來的檔案.pem

14.  再來我們要把 剛才的.p12 檔 轉出另個key的pem檔 到時要把兩個pem檔合併起來

15.



openssl pkcs12 -nocerts -out 轉出來的Key.pem -in 剛才你的p12檔檔名.p12

Enter Import Password:
MAC verified OK
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:


16. 再來 要將剛才產生的兩個pem檔 合併  下指令:



cat 剛才轉出來的Cert.pem 剛才轉出來的Key.pem > ck.pem






2012年11月6日 星期二

改變canvas原點座標到左下角

在HTML5裡頭,畫面的原點座標在左上角,

但要來做一些與我們一般數學座標系相同的事情時,

就會產生一些不方便,

來示範一下如何將canvas的座標(0,0)改到左下角


原始的程式
=========================================


<html>

<title></title>
<head></head>
<body>
<canvas id="square" width="400" height="400" style="border:1px solid #000000;"></canvas>
<script>
var canvas = document.getElementById("square");

var context = canvas.getContext("2d");

context.beginPath();
context.moveTo(0,0);
context.lineTo(200,200);

context.stroke();

</script>
</body>
</html>




=======================================

其實加上兩行就可以了,


context.translate(0, canvas.height);
context.scale(1, -1);

完整程式
=======================================



<html>

<title></title>
<head></head>
<body>
<canvas id="square" width="400" height="400" style="border:1px solid #000000;"></canvas>
<script>
var canvas = document.getElementById("square");

var context = canvas.getContext("2d");
context.translate(0, canvas.height);
context.scale(1, -1);
context.beginPath();
context.moveTo(0,0);
context.lineTo(200,200);

context.stroke();

</script>
</body>
</html>




=======================================



2012年11月1日 星期四

我的健康管理version 1.1

我的健康管理version 1.1版  已經上架了!

此次發佈上架花費8天

更新項目 包含

1. 新增loading畫面

2. 我的健康儀表板跑位問題




關於點選日 會死當問題等下一版v1.2會更新