顯示具有 暫時存放 標籤的文章。 顯示所有文章
顯示具有 暫時存放 標籤的文章。 顯示所有文章

2009年4月13日 星期一

暫存-javascript記憶體管理

開完會~對記憶體部分有了一點消息
在開會時分別用 FF 與 IE demo系統 發現
兩者CPU都衝到50% 記憶體 IE:130,000 FF:55,000
執行時 IE明顯被打垮了

詢問後~
萍華兄:FF 原本就對javascript支援度高,IE..不適合跑過多javascript ,建議用PHP ,但..GMAP 用javascript寫的,也沒辦法改,試試刪除物件吧~ 怎麼刪 .. 我也不清楚 >< 現在找到的資料.. Java Script∕節省記憶體 for IE6.0
太多的程式碼同時載入會浪費記憶體嗎?
其實在<script language="javascript">...</script>內的程式碼,執行過之後便沒用了,但內裏的程式碼卻保留在系統之中,這樣實在太浪 費記憶體了。本單元的程式碼可令網頁載入後消掉一些沒用的程式敘述,可讓網頁走得更暢快,非常適合一些大量使用 JavaScript 的網頁
輕量級JAVASCRIPT編輯器 : 1st JavaScript Editor

深入研究Google瀏覽器
有幾張漂亮的數據圖
CSS測試是用http://www.howtocreate.co.uk/csstest.html的測試網頁。
JavaScript測試是用Celtic Kane所寫的測試程式(http://celtickane.com/webdesign/jsspeed2007.php)。
記憶體測試時,先開啟十個資料量很大的網頁,再用Google Chrome的about:memory指令查看記憶體用量。

AJAX七項原罪

新增程式方法
JavaScript Memoization

參考
Ajax記憶體無法釋放

Google新開發的原生用戶端(Native Client)軟體--這項研究計畫宣稱,可讓架構在網路上的
軟體跑起來幾乎像在電腦上執行一樣快

javascript引擎 Chrome的V8和Mozilla的TraceMonkey
SunSpider 是一個javascript測試網站

KB-Javascript Anonymous Function Memory Issue

探討 程式寫法
http://forum.moztw.org/viewtopic.php?t=18498
http://blog.xuite.net/vexed/tech/22697513

http://fillano.blog.ithome.com.tw/post/257/11011
http://o-asp.com/Art/Show.asp?id=3945 要註冊

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4/14 撿到寶了

Reducing Browser Memory Leaks

The Google Maps API encourages the use of function closures, and the API event handling system GEvent attaches events to DOM nodes in such a way that almost inevitably causes some browsers to leak memory, particularly Internet Explorer. Version 2 of the Maps API introduces a new method, GUnload(), that will remove most of the circular references that cause these leaks. You should call GUnload() in the onunload event of your page to reduce the potential that your application leaks memory:

<body onunload="GUnload()">

Using this function has virtually eliminated Internet Explorer memory leaks in Google Maps, though you should test for memory leaks on your own site using tools like Drip if you are noticing memory consumption problems.

看樣子要常逛GOOGLE MAP API

2009年4月10日 星期五

暫存

LBS :
即時行動追蹤組成
架構圖

定位方式
GPS , CELL-ID , WIFI,RFID,Blooth tooth



gps 歷史,規格,準確度,訊號格式

連結技術 :
webservice優 缺點 (socket)
SOAP

WEB2.0技術
什麼是HTML
什麼是XML
什麼是JAVASCRIPT
什麼是PHP

AJAX
XMLHTTP




開發工具

SDK:
windows mobile6.0
pocket pc
win CE

開發環境 .net framwork
IDE :visual studio 2005

web server : micorsoft IIS , apachy
database : mysql,mssql
google map api

skype api


2009年4月6日 星期一

暫放

簡易CSS語法教學,不含排版部分。新手適用!
CSS 語法教學

正規表達式,PHP繼承*NIX的一貫傳統,完全支援正規表達式的處理,split("-",$xx)函式是其中一例
PHP程式設計講義區

參考 Neo 's Blog,下面這篇提供了好幾個日期選擇器..
[Javascript] 免費、直覺的日期選擇元件

PHP與MySQL實務運用

新娘秘書專區 這個要講一下,這是個人Blog,重點不是在新娘..是在右下角的月曆,樣式蠻喜歡的~看了一下源碼是yahoo的API ..

問題是這樣的~
網頁一載入,就要有個日曆秀出哪幾天有資訊,點擊有資訊的那幾天會再秀出所有的時間點,
方法是用資料庫搜尋的方式, 先判斷當月哪幾天有資訊,if有,變更日期為可連結,點擊連結,責執行非同步下載當天資訊,再載入下拉式選單。

首先,google了關鍵字月曆、行事曆,但沒找到適合的,幾乎都是找到修初登入網頁時的當月月曆,後來看到"日期選擇器",是用來讓使用者方便點擊來輸入生日等日期資訊用的,還是找不到適合的,
而這些都是人家做好的,有的是直接在網頁裡嵌入這些原碼或者是引用JS檔,但如要與資料庫連線,應該就不提供了,原本想偷懶的,但看到程式碼..好多啊~ 所以看了這麼久,只好自己寫了,
從最簡單的NVU這個IDE下手,NVU有提供一個月曆元件,也是只有提供最簡單的秀出當天日期,

作修改的話,首先要產生<< >> 兩個連結, 就是可以點擊上一個月份 下一個月分,
第二步,連結資料庫秀出哪幾天有資訊
第三部,寫javascript 動態載入所點擊之當天日期內所有時間點資訊

而月曆寫法,應該都大同小異,
用date()得到本機日期時間,判斷是否為閏年,計算本月第1號是在星期幾,在之前的表格都設為空,判斷月曆的列數,印出整個月~

比較要注意的就是,日期函式中,getMonth()函式所得的月份要+1 數字才對。

javascript 日期函式
Javascript实例教程(15) 日期函数



PHP程式設計講義區


以下是時間選擇器~

[Javascript]Time Picker視覺化的時間選擇器



http://jsgears.com/thread-134-1-1.html

http://www.study-area.org/coobila/tutorial_468.html2

http://blog.darkthread.net/blogs/darkthreadtw/archive/2007/09/04/code-javascript-time-picker.aspx

2009年3月14日 星期六

開啟關閉 windows mobile WIFI

1.
[DllImport("coredll.dll")]
public static extern int DevicePowerNotify(string device, CEDEVICE_POWER_STATE state, int flags);


[DllImport("coredll.dll")]
public static extern int SetDevicePower(string pvDevice, int df, CEDEVICE_POWER_STATE ds);


没有专门针对WIFI设备的API, 但是可以通过上面两个方法,控制WIFI状态

2. ref: http://topic.csdn.net/u/20080728/20/a5efe62a-629c-4811-add5-bc6c53fcdd5b.html
用无线管理器ChangeRadioState函数可以指定打开或关闭某一设备,包括WIFI


首先使用函数HRESULT GetWirelessDevices()获得一个设备链表,在设备链表中根据设备类型,找到wifi设备,然后调用ChangeRadioState()打开或者关闭指定的设备。
有关上述函数的详细使用,可以查windows mobile 6 documentation

GetWirelessDevices(),ChangeRadioState()都是MS公布给OEM的标准接口,WM6都是支持的。

openNETCF有,且有例子,你找找去。


看看人家做的
http://www.cnblogs.com/MS-Frank/archive/2008/11/14/1333664.html

軟體 wifiswitch
http://www.winbile.net/bbs/forums/threads/1014040.aspx
http://www.pudn.com/downloads90/sourcecode/windows/comm/detail342414.html

Native Wifi api
该api的可以实现windows的无线客户端的网络参数配置(WlanSetProfile),连接指定的ap,断开连接和获得其他关于无线网络的信息(ssid,rssi等)。

並且有一個斷開WIFI的範例。

另一個繼續深入的搜尋資源
http://search.pudn.com/search.asp?keyword=%20wifi


coredll 全部的函式名稱
http://topic.csdn.net/t/20050826/13/4233161.html

2009年3月8日 星期日

開啟/關閉 WIFI 裝置

問題
http://topic.csdn.net/u/20080728/20/a5efe62a-629c-4811-add5-bc6c53fcdd5b.html

解法

Windows Mobile 中开关 WIFI 的“通用”代码

SystemState.WiFiStatePowerOn Property  讀取WIFI狀態的屬性,但無法設置開關
英文的 ><

Deactivate /Activate all Services like (Internet,WIFI,Bluetooth,WLAN..)

Enabling Radio in the Windows Mobile 5.0

WiFi Power On Event

開啟D0 關閉D4

We can implement this functionality with ease. Hope this can give your some idea.

See the code below:

// D0 indicates open; D4 indicates close;

CEDEVICE_POWER_STATE state = D0;

HRESULT hr = SetDevicePower(TEXT(""),POWER_NAME,state);

Note: We use SetDevicePower function here. It sets the device power state for a device.

  1. 1st parameter: specify the device.
  2. 2nd parameter: we use POWER_NAME here to indicate that the first parameter is just a device name.
  3. 3rd parameter: sets the power state.

In order to get information in details, you can find it in MSDN. Thanks!

Regards,

Zero Dai - MSFT



之後
Battery Status

GPS Application

Mobile GPS

2009年3月4日 星期三

尚須解決PDA端問題-暫存

function1
需於PDA 設定->連線->Wi-Fi->要存取的網路:僅存取點
要找開啟或關閉無線網路的API

2009年1月24日 星期六

notepad

account aliasing
http://seeseeya.com/node/72
http://www.chunmin.com/archives/85
http://010.idv.tw/ubb/showflat.php?Cat=&Number=3337&Main=3335
http://www.it.com.cn/f/edu/0410/27/40483.htm
http://it.com.cn/f/edu/0411/2/42832.htm
http://tw.myblog.yahoo.com/class2u-com/article?mid=883&prev=931&next=558&l=f&fid=7&sc=1
http://www.josephjiang.com/presentation/Web2.0/slide.htm
http://www.josephjiang.com/presentation/NoPostBack/demo.html
http://bbs.ecstart.com/google_search.php?cx=partner-pub-6598876181620527%3A7jim3afruom&cof=FORID%3A10&ie=big5&q=%AA%ED%B3%E6+%A4%A3%B4%AB%AD%B6

2009年1月19日 星期一

實驗用資料-區域設定座標資料

-------------Console.WriteLine("結束抓資料庫"); ------------

//point in polygon test----仁愛醫院1
/*Point point1 = new Point(25.036922, 121.544865);
Point point2 = new Point(25.036961, 121.544613);
Point point3 = new Point(25.036966, 121.544403);
Point point4 = new Point(25.037306, 121.544452);
Point point5 = new Point(25.037277, 121.544661);*/
//point in polygon test----中原噴水池-活動中心區
/*Point point1 = new Point(24.959268, 121.240246);
Point point2 = new Point(24.959312, 121.241593);
Point point3 = new Point(24.957673, 121.241587);
Point point4 = new Point(24.957216, 121.241646);
Point point5 = new Point(24.956812, 121.241303);
Point point6 = new Point(24.957581, 121.239962);*/

//point in polygon test----仁愛醫院2
/*Point point1 = new Point(25.037647, 121.544462);
Point point2 = new Point(25.037715, 121.545128);
Point point3 = new Point(25.036879, 121.545128);
Point point4 = new Point(25.036888, 121.544398);
Point point5 = new Point(25.037379, 121.544420);*/

//point in polygon test----中原門口騎機車模式
/*Point point1 = new Point(24.957449, 121.240037);
Point point2 = new Point(24.957522, 121.240509);
Point point3 = new Point(24.956997, 121.240810);
Point point4 = new Point(24.956803, 121.240525);
Point point5 = new Point(24.956880, 121.240193);
Point point6 = new Point(24.957245, 121.239983);*/


//point in polygon test----測試範圍為整個板橋市
/*Point point1 = new Point(25.086843, 121.309662);
Point point2 = new Point(25.093061, 121.522522);
Point point3 = new Point(25.027128, 121.559601);
Point point4 = new Point(24.928785, 121.592560);
Point point5 = new Point(24.913840, 121.404419);
Point point6 = new Point(25.003484, 121.280823);*/


//point in polygon test----公車模式區域1-板橋新公車站
/*Point point1 = new Point(25.014538, 121.463020);
Point point2 = new Point(25.015423, 121.461582);
Point point3 = new Point(25.016823, 121.461647);
Point point4 = new Point(25.017348, 121.462955);
Point point5 = new Point(25.016425, 121.464361);
Point point6 = new Point(25.015200, 121.464318);

//point in polygon test----公車模式區域2-大漢橋
Point point7 = new Point(25.039649, 121.457119);
Point point8 = new Point(25.040777, 121.462784);
Point point9 = new Point(25.037705, 121.465230);
Point point10 = new Point(25.033311, 121.466818);
Point point11 = new Point(25.031639, 121.460509);
Point point12 = new Point(25.035955, 121.456518);

//point in polygon test----公車模式區域3-五權路口
Point point13 = new Point(25.069827, 121.449620);
Point point14 = new Point(25.069944, 121.451572);
Point point15 = new Point(25.068584, 121.452549);
Point point16 = new Point(25.068020, 121.453149);
Point point17 = new Point(25.067437, 121.451776);
Point point18 = new Point(25.068826, 121.449512);*/
//-------------------------------------------------
//我的中原
string getgps0 = querycontent.Split(';')[0];
string getgps1 = querycontent.Split(';')[1];
string getgps2 = querycontent.Split(';')[2];
string getgps3 = querycontent.Split(';')[3];
string getgps4 = querycontent.Split(';')[4];
string getgps5 = querycontent.Split(';')[5];
Point point1 = new Point(double.Parse(getgps0.Split(',')[0]), double.Parse(getgps0.Split(',')[1]));
Point point2 = new Point(double.Parse(getgps1.Split(',')[0]), double.Parse(getgps1.Split(',')[1]));
Point point3 = new Point(double.Parse(getgps2.Split(',')[0]), double.Parse(getgps2.Split(',')[1]));
Point point4 = new Point(double.Parse(getgps3.Split(',')[0]), double.Parse(getgps3.Split(',')[1]));
Point point5 = new Point(double.Parse(getgps4.Split(',')[0]), double.Parse(getgps4.Split(',')[1]));
Point point6 = new Point(double.Parse(getgps5.Split(',')[0]), double.Parse(getgps5.Split(',')[1]));

/*
Point point1 = new Point(double.Parse(querycontent.Split(';')[0].Split(',')[0]),double.Parse( querycontent.Split(';')[0].Split(',')[1]));
Point point2 = new Point(double.Parse(querycontent.Split(';')[1].Split(',')[0]), double.Parse(querycontent.Split(';')[1].Split(',')[1]));
Point point3 = new Point(double.Parse(querycontent.Split(';')[2].Split(',')[0]), double.Parse(querycontent.Split(';')[2].Split(',')[1]));
Point point4 = new Point(double.Parse(querycontent.Split(';')[3].Split(',')[0]), double.Parse(querycontent.Split(';')[3].Split(',')[1]));
Point point5 = new Point(double.Parse(querycontent.Split(';')[4].Split(',')[0]), double.Parse(querycontent.Split(';')[4].Split(',')[1]));
Point point6 = new Point(double.Parse(querycontent.Split(';')[5].Split(',')[0]), double.Parse(querycontent.Split(';')[5].Split(',')[1]));
*/


// double x1 = double.Parse(querycontent.Split(';')[0].Split(',')[0]);//test用
// double y1 =double.Parse( querycontent.Split(';')[0].Split(',')[1]);//test用

// Console.WriteLine(x1) ;//test 用




/*
//point in polygon test----火車模式區域1-板橋新火車站
Point point1 = new Point(25.015452, 121.462923);
Point point2 = new Point(25.015180, 121.464103);
Point point3 = new Point(25.014257, 121.464640);
Point point4 = new Point(25.013430, 121.463642);
Point point5 = new Point(25.013848, 121.462344);
Point point6 = new Point(25.014888, 121.461926);
*/
//point in polygon test----火車模式區域2-桃園火車站
Point point7 = new Point(24.989919, 121.312044);
Point point8 = new Point(24.990201, 121.314297);
Point point9 = new Point(24.988820, 121.315563);
Point point10 = new Point(24.987925, 121.314726);
Point point11 = new Point(24.988022, 121.313224);
Point point12 = new Point(24.988985, 121.311765);

//point in polygon test----火車模式區域3-中壢火車站
Point point13 = new Point(24.955227, 121.225784);
Point point14 = new Point(24.954507, 121.227951);
Point point15 = new Point(24.953009, 121.228530);
Point point16 = new Point(24.951842, 121.225805);
Point point17 = new Point(24.952737, 121.223853);
Point point18 = new Point(24.955032, 121.224003);

//-------------------------------------------
//區域1
Point[] endPoints = new Point[7];
endPoints[0] = point1;
endPoints[1] = point2;
endPoints[2] = point3;
endPoints[3] = point4;
endPoints[4] = point5;
endPoints[5] = point6;
endPoints[6] = point1;
Polygon myPloygon = new Polygon(endPoints);

//區域2
Point[] endPoints1 = new Point[7];
endPoints1[0] = point7;
endPoints1[1] = point8;
endPoints1[2] = point9;
endPoints1[3] = point10;
endPoints1[4] = point11;
endPoints1[5] = point12;
endPoints1[6] = point7;
Polygon myPloygon1 = new Polygon(endPoints1);

//區域3
Point[] endPoints2 = new Point[7];
endPoints2[0] = point13;
endPoints2[1] = point14;
endPoints2[2] = point15;
endPoints2[3] = point16;
endPoints2[4] = point17;
endPoints2[5] = point18;
endPoints2[6] = point13;
Polygon myPloygon2 = new Polygon(endPoints2);

2009年1月5日 星期一

2008年6月4日 星期三

gmap進度

終於找到存區域設定端點座標的變數了 ->endPointsMarker[i]

但是這個變數存在於function內,非廣義變數,要看完全部才能確定是否另設成廣義變數
因為endPointsMarker[i]出現在很多函式內,用不同名稱的引數做傳遞。
目前想到兩個方法:
1.用廣義變數,一但對點做任何變動或更新,就改變值(字串)。但是會更動很多地方..
2.也許只要在端點移動結束且勾選已設定好區域在抓函式內的變數就好(物件)。

終於有點進度了~
但是資料庫那邊出現
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '140.115.51.5' (10060) in C:\Inetpub\wwwroot\php_pratice_gmapuser\db.php on line 8

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Inetpub\wwwroot\php_pratice_gmapuser\db.php on line 10

連線無法建立,孤狗結果是資料庫server那邊有問題,要重開,再跟他們說吧~