IBM與一群軟體公司聯合發起一項稱為「Open Ajax」的開放原始碼計畫,用意在提供簡易的開發工具,以製作AJAX式的網路應用程式。……… IBM發起開放AJAX工具運動CNET新聞專區:Martin LaMonica 2006/02/06 IBM與一群軟體公司聯合發起一項稱為「Open Ajax」的開放原始碼計畫,用意在提供簡易的開發工具,以製作AJAX式的網路應用程式。 這項計畫將以IBM捐獻的程式碼為基礎,希望讓軟體開發者運用Eclipse開發工具撰寫支援AJAX的全球資訊網應用程式。 AJAX的全名是「Asynchronous JavaScript + XML」,是一種撰寫應用程式的方法,可豐富網頁的互動功能,如此一來,使用者不必常常按螢幕上的更新按鈕,網頁資訊也會時時更新。 此計畫獲得許多軟體公司支持,成員包括IBM、Google、BEA Systems、Red Hat、Borland Software、Novell、Oracle、Yahoo、PHP工具製造商Zend Technologies、電子郵件軟體公司Zimbra,以及手機軟體公司Openwave Systems。此外,Eclipse基金會、 Mozilla Corporation和Dojo基金會也有意加入。 自從GoogleMaps等採用AJAX的互動式軟體應用推出後,這一年來,AJAX式的程式開發愈來愈受歡迎。目前市面上已有幾種工具包(toolkit),或稱架構(framework),用來簡化 AJAX的開發過程。Open AJAX計畫的目標,是讓開發者挑選一種AJAX架構,並與Eclipse軟體搭配使用。 IBM先進技術副總裁Rod Smith說:「現在已有許多工具包,我認為會趨於整合。」 Smith預期,一年內,這類工具包的種類可能精簡為兩種到五種較專門的工具組合。例如,一種AJAX工具包可能側重於前端網頁設計,另一重可能專門用來協助企業應用開發者打造商用的功能。 目前,Open Ajax軟體只支援Dojo Toolkit和Kabuki兩種工具包。 Smith說:「我們發現,AJAX太難,不容易上手,所以務必降低使用的門檻。我們認為,這一步是好的開始,但要擴大社群,仍需擴充工具。還有許多工作要做。」(唐慧文)
http://www.j2mepolish.org/index.html J2ME Polish is suite of tools for creating “polished” J2ME applications. Each tool meets a definite need of J2ME developers: Build-tools with an integrated device-database, a powerful GUI, a framework for building localized applications, a game-engine, a logging framework and a collection of utilities.
原來 ChoiceGroup 係唔可以 implicit 的… 會return error ….
1 2 |
ChoiceGroup cg = new ChoiceGroup ("select location", Choice.IMPLICIT); //error !! |
change to following today:
1 2 3 4 5 6 7 |
private void displayListSelect() throws Exception { stringArray = new String[]{"KCR station", "U gym", "HCA", "UC", "NA"}; ImplicitList = new List("select location", List.IMPLICIT, stringArray, null); ImplicitList.addCommand(exitCommand); ImplicitList.setCommandListener(this); display.setCurrent(ImplicitList); } |
HTTP cache !!!! find out the problem when i back hostel …. WTF ….. The XML is served with no mime type by your web server. It should have a mime type “text/xml”. Configure your server to associate “.xml” files with the correct mime, or, if you generate the XML dynamically, use a directive to …
put kaXmlOverlap.js and points.xml into the same folder of those js add this in the index.html modify the startup.js in function myMapInitialized( eventID, mapName )
1 2 3 4 5 6 7 8 9 |
// *_3_ Create a kaXmlOverlay object: myXmlOverlay = new kaXmlOverlay( myKaMap, 250 ); // *_4_ Add some objects on the overlay layer. There are two ways to do that //Call the loadXml method: this method load an XML document from the web server. myXmlOverlay.loadXml('points.xml'); //* _5_ To have a periodic update: myInterval = setInterval("myXmlOverlay.loadXml('xmlget.php')",5000); |
modify the points.xml
http://www.csie.dyu.edu.tw/~joekinsi/files/J2ME/Chap_5/Chap_5.pdf
1 2 3 4 5 6 |
List l = new List("ShuttleQuery",Choice.IMPLICIT) ; l.append("Railway Station",null) ; l.append("U gym",null) ; l.append("HCA",null) ; l.setCommandListener((CommandListener)this) ; display.setCurrent(l); |
http://www-128.ibm.com/developerworks/wireless/library/wi-p2pmsg/ Send SMS messages Sending messages with the WMA is very simple. You can send a message to an arbitrary phone number and/or an SMS port through a MessageConnection constructed for that destination, as shown in Listing 1. Listing 1. Sending an SMS message
1 2 3 4 5 6 7 8 9 |
String addr = "sms://+123456789"; // Or: String addr = "sms://+123456789:1234"; MessageConnection conn = (MessageConnection) Connector.open(addr); TextMessage msg = (TextMessage) conn.newMessage( MessageConnection.TEXT_MESSAGE); msg.setPayloadText( "Hello World" ); conn.send(msg); |
We can also send out messages through a server connection, …
payment:
1 2 3 4 5 6 7 8 9 |
while(minRate < maxRate - 0.0001){ midRate = (maxRate + minRate) / 2; result = (loan * midRate * (1 + midRate) ^ period)/((1 + midRate)^period - 1) ) - mthPay; if(result < 0) { minRate = midRate; }else{ maxRate = midRate; } } |
rec:
1 2 3 4 5 6 7 8 9 10 11 12 |
do { Xi= Xi+1; Xi+1 = g(Xi, r); if(Xi+1 != 0){ ea = abs((Xi+1 - Xi) / Xi+1) * 100; } iter++; } while(ea > es ); ........... public static double g(double x, double r){ return x * (2 - x * r); } |
ai…..Google….good? bad? wrong way to learn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
struct Tree{ int info; Tree * left, * right; }; Tree * ReadTree(); void Level(Tree *); int IsSpecified(Tree *); int currentNode; const int MAX_NODES = 300; Tree * nodes[MAX_NODES]; // grab max nodes up front void ZeroNodes() // postcondition: all nodes are illegal (no children, 0 info) { ................ } void InitNodes() // postcondition: nodes allocated and zero'd { ................ } main() { Tree *t; InitNodes(); while (t = ReadTree()){ if (!IsSpecified(t)){ cout << "not complete" << endl; } else{ Level(t); } } } void AddTree(Tree * & t, char *s, int val) // add node with 'val' using path 's' to tree 't' { .................. .......... AddTree(t->left,s+1,val); // go left } else{ AddTree(t->right,s+1,val); // go right } ........... t->info = -1; // already seen it } } } Tree *ReadTree() { char buf[100]; Tree * t = NULL; ZeroNodes(); while (cin >> buf){ if (strcmp(buf,"()") == 0){ break; } else{ buf[strlen(buf)-1] = ''; // remove ')' char *b = buf; while (*b != ','){ // look for comma b++; } *b = ''; AddTree(t,b+1,atoi(buf+1)); } } return t; } |
update to ka-map-0.2 1. modify the config.php in /ka-map-0.2/include/ in $aszMapfiles = …… “cuhk” => array (……) in $szMap for default map…. 2. set path in httpd.conf with the content in the httpd.d/https_ka-map.conf 3. set the cumap folder inside apps…. /cumap/htdocs/cu_data