為了推動手機操作系統Android迅速普及,谷歌計劃以1000萬美元獎金,獎勵開發出最佳應用程式的人。
谷歌上周宣布,將聯合多家手機廠商和運營商開發一款手機操作系統,目的是推動手機互聯網發展,同時削弱運營商對於手機行業的控制。谷歌計劃開發的手機操作系統名為「Android」,基於這一平台的首款手機將於明年下半年面世。Android將採用開放源代碼模式,面向所有程序員開放。谷歌希望通過此舉促使更多程序員為Android開發新應用和系統增強,從而吸引更多終端使用者。
谷歌計劃舉辦一次「Android開發者大賽」,比賽項目既有簡單的外觀改進,例如個性化屏幕;也有更加複雜的社交網絡應用,這類應用需要整合來自互聯網的資料(如地圖和個人主頁),以及來自使用者手機的資料(如通信錄和手機定位)。這項賽事將於2008年1月2日啟動,3月3日結束。
比賽結束後,評審委員會將選出50名獲勝者,每人可以獲得2.5萬美元獎金,並且可以角逐10個每人10萬美元的獎項,以及另外10個每人27.5萬美元的獎項。谷歌並未公布此次大賽的評定標準,但該公司明確表示,獲勝的程序應該能為消費者提供最具吸引力的體驗。本周一,谷歌還發布了一個Android開發工具包。
Friday, December 21, 2007
Thursday, December 20, 2007
按摩院涉傳「 超級惡菌 」(星島) 12月 20日 星期四 05:30AM
(綜合報道)
(星島日報 報道)社區抗藥性金黃葡萄球菌(CA-MRSA)被喻為是新一代「超級惡菌」,可引致皮膚紅腫、膿瘡、發熱,嚴重可引致肺炎、腦膜炎等高死亡率病症。食物及生局昨向立法會 表示,去年至本年十月共有一百七十五宗「超級惡菌」個案,當中約一成感染者曾在發病前一年內光顧按摩院,但當局表示暫未有足夠科學證據顯示患者在按摩院感染。
食物及生局局長周一嶽昨以書面回覆立法會議員劉江華 ,有關金黃葡萄球菌感染提問,指出自○六年一月一日至本年十月三十一日為止,生署共接獲一百七十五個社區型抗藥性金黃葡萄球菌感染呈報個案,其中有兩宗死亡個案。自今年一月五日起,社區型抗藥性金黃葡萄球菌感染,已成為法定須呈報傳染病。
對抗生素呈抗藥性
上述一百七十五個個案中,一百六十三個為零星個案,而流行病學調查並沒有足夠證據確定這些個案的感染源頭。其餘十二個屬於家庭群集個案,涉及六個家庭,相信是由於親密接觸而受感染。在所有個案中,約一成感染者曾在發病前一年內光顧按摩院,但目前沒有足夠科學證據顯示光顧按摩院與上述的呈報個案有關。
當局強調為保障美容院顧客及技術員安全及健康,生署於○五年九月修訂《皮膚刺穿行業控制感染建議指引》,包括保障個人生要求、顧客皮膚消毒、用具儀器、玷污物處理等,加強業界對傳染病的認識。
金黃葡萄球菌常見於人體皮膚表面及黏膜當中,可進入人體引致皮膚或傷口感染等,原本抗生素可治多種金黃葡萄球菌,但近年由於濫用抗生素,使該菌呈抗藥性。
本報記者
(星島日報 報道)社區抗藥性金黃葡萄球菌(CA-MRSA)被喻為是新一代「超級惡菌」,可引致皮膚紅腫、膿瘡、發熱,嚴重可引致肺炎、腦膜炎等高死亡率病症。食物及生局昨向立法會 表示,去年至本年十月共有一百七十五宗「超級惡菌」個案,當中約一成感染者曾在發病前一年內光顧按摩院,但當局表示暫未有足夠科學證據顯示患者在按摩院感染。
食物及生局局長周一嶽昨以書面回覆立法會議員劉江華 ,有關金黃葡萄球菌感染提問,指出自○六年一月一日至本年十月三十一日為止,生署共接獲一百七十五個社區型抗藥性金黃葡萄球菌感染呈報個案,其中有兩宗死亡個案。自今年一月五日起,社區型抗藥性金黃葡萄球菌感染,已成為法定須呈報傳染病。
對抗生素呈抗藥性
上述一百七十五個個案中,一百六十三個為零星個案,而流行病學調查並沒有足夠證據確定這些個案的感染源頭。其餘十二個屬於家庭群集個案,涉及六個家庭,相信是由於親密接觸而受感染。在所有個案中,約一成感染者曾在發病前一年內光顧按摩院,但目前沒有足夠科學證據顯示光顧按摩院與上述的呈報個案有關。
當局強調為保障美容院顧客及技術員安全及健康,生署於○五年九月修訂《皮膚刺穿行業控制感染建議指引》,包括保障個人生要求、顧客皮膚消毒、用具儀器、玷污物處理等,加強業界對傳染病的認識。
金黃葡萄球菌常見於人體皮膚表面及黏膜當中,可進入人體引致皮膚或傷口感染等,原本抗生素可治多種金黃葡萄球菌,但近年由於濫用抗生素,使該菌呈抗藥性。
本報記者
Thursday, December 6, 2007
Building a Yahoo stock quote ticker
Abstract
A step-by-step guide on how to create a Yahoo Stock Quote Ticker using ASP.Net and Flash Remoting.
Summary
This article will take you through a step-by-step guide on how to create a Yahoo Stock Quote Ticker using ASP.Net and Flash Remoting.
This tutorial requires prior knowledge of ASP.Net web services using C# and Flash MX as well as Flash UI component set 2 and Flash Remoting installed.
Yahoo Stock Quote Ticker Overview
The Yahoo Quote Ticker consists of an ASP.Net web service that connects to Yahoo quotes and grabs detailed data on stocks. The application also features a Flash-based user interface that scrolls through each stock using the Flash Ticker component.
This application follows n-tier application design by dividing the application into data, business, and presentation logic. This way a designer can focus on building usable interfaces and leave the structure of the backend to the developers.
Building the Web Service
The first step in developing the Yahoo Quote Engine is creating the web service. The web service will be responsible from grabbing the data from Yahoo and parsing this to create a friendly structure. In this application I'll use ASP.Net with C#, but web services can easily be developed using VB.Net, Java and Code fusion.
We can start our web service by creating a file named YahooQuoteWebService.asmx in the editor of your choice. I'll use DreamWeaver MX.
Once the file is created we'll declare the contents of the file as a web service using C# and also provide the class name with its namespace.
<@ WebService Language="c#" class="outthebox.web.services.YahooQuoteWebService" >Next, let's build the structure for our web service by defining the namespaces to use, providing a namespace where our web service will sit, and defining our service as a public class that implements the WebService object.
using System.Collections;
using System.Web.Services;
using System.Net;
using System.IO;
namespace outthebox.web.services
{
[WebService(Namespace="outthebox.web.services")]
public class YahooQuoteWebService : WebService
{
}
}
With our class declared we can implement the one and only method for this web service GetQuote( string ). This method will handle the logic involved in getting our quotes from Yahoo.
[WebMethod(Description="Using stock symbol gets delayed stock information from Yahoo.",EnableSession=false)]
public string[] GetQuote( string symbol )
{
string url; //stores url of yahoo quote engine
string buffer;
string[] bufferList;
WebRequest webRequest;
WebResponse webResponse;
url = "http://quote.yahoo.com/d/quotes.csv?s="+symbol+"&d=t&f=sl1d1t1c1ohgvj1pp2wern";
webRequest = HttpWebRequest.Create( url );
webResponse = webRequest.GetResponse();
using( StreamReader sr = new StreamReader( webResponse.GetResponseStream() ) )
{
buffer = sr.ReadToEnd();
sr.Close();
}
buffer = buffer.Replace( "\"", "" );
bufferList = buffer.Split( new char[] {','} );
return bufferList;
}
The above is a lot of code so I'll take you through the implementation chunk-by-chunk.
First we have to create a connection to Yahoo and grab the quotes. The following code grabs a comma delaminated file from Yahoo using the symbol variable and stores the results in a string variable named buffer.
url = "http://quote.yahoo.com/d/quotes.csv?s=" + symbol + "&d=t&f=sl1d1t1c1ohgvj1pp2wern";
Creates a connection to the url and stores our results in the string buffer array.
webRequest = HttpWebRequest.Create( url );
webResponse = webRequest.GetResponse();
using( StreamReader sr = new StreamReader( webResponse.GetResponseStream() ) )
{
buffer = sr.ReadToEnd();
sr.Close();
}
Once we have the results from Yahoo we need to break it up and store the results in a string array. This code calls the string method Split( char[] ) to separate the buffer string into chunks using the comma as the delaminator. The method returns a string[] (string array) with quotes details.
buffer = buffer.Replace( "\"", "" );
bufferList = buffer.Split( new char[] {','} );
return bufferList;
Now that you have a working web service, place it on your web server and go to the address in a web browser. You should see Microsoft's web service page with information on how to access this web service. If you don't see the page make sure ASP.Net is installed properly on your web server and check your code for errors.
Connecting Flash to the Web Service
In order for your flash application to communicate with the web service, you need to install the Flash remoting package from Macromedia. Also, it's very important that you place the flashgateway.dll file (included with Flash remoting for ASP.Net) into your web server's bin folder and make the below changes to your web.config file. These changes will allow Flash to determine what calls are meant for your flash application and call the proper web service. You'll also need to create a blank file named gateway.aspx and place it on your web server. I placed this file in the same location as my web service, but it's up to you.
To establish the connection to our web service we must include the NetServices.as file. This file, included with Flash remoting, will implement the classes necessary to create a wrapper to our service.
Then we can create a connection to the web server gateway. In your code you will replace the //gateway.aspx and //YahooQuoteWebService.asmx?wsdl with the address of your web server and path to the gateway.aspx and YahooQuoteWebService.asmx files.
#include "NetServices.as"
////////////////////////////////////////////
// Inits Web Service
////////////////////////////////////////////
//creates connection to ASP.Net web service
//should never ever run more than once!!
if( init == null )
{
//insures this code block is only run once
init = true;
//sets the gatway will always be this
NetServices.setDefaultGatewayURL("http:////gateway.aspx");
gatewayConnnection = NetServices.createGatewayConnection();
//gets the Yahoo quote service and sets instance
//uses WSDL to create proxy dll file
YahooQuoteWebService = gatewayConnnection.getService("http:////YahooQuoteWebService.asmx?wsdl", this);
}
We need to develop call back functions and wrappers for our web service methods. When we call the GetQuote( string ) method on our web service, Flash will connect to the service and send the response back to _Result( result ) or _Status( error ). If a error occurs while trying to connect to the service, the _Status( error ) call back will be used, otherwise _Result( result ) will be called with the data from the service in the result object. Our result object is an array of strings so we can access this array like we would any Flash array object. NOTE: For a full list of result objects supported by Flash, see the Flash Remoting documentation.
////////////////////////////////////////////
// Call Back Function Wrappers
////////////////////////////////////////////
//gets quote data from web service
function GetQuote( symbol )
{
YahooQuoteWebService.GetQuote( symbol );
trace( "getting " + symbol + " from yahoo quote web service" );
}
////////////////////////////////////////////
// Call Back Functions
////////////////////////////////////////////
//call back function for GetQuote method
function GetQuote_Result( result )
{
buffer = result[ 0 ] + " " + result[ 1 ] + " " + result[ 4 ];
trace( buffer );
}
//call back function tracks status of GetQuote method
function GetQuote_Status( error )
{
trace( error.details );
}
After building our call back functions we can test our application by inserting the below lines of code at into our Action Script. This code will get the symbol, current value, and change data for Microsoft and display it in your trace window.
GetQuote( "MSFT" );
Stop();
Creating the Flash Ticker Component
Now that the logic to grab our quotes is in place, we need to build the actual ticker. To do this you must install Flash UI Components 2 from Macromedia and drag and drop the Ticker object into the main movie clip.
Next select your new ticker object and select the parameters tab on the properties bar. This will let us make the below customizations for the desired look and feel.
Speed = 15
Spacing = 20
Orientation = Horizontal
Scroll Direction = Decremental
Frame Width = 0
Highlight Color = #000066
You should also create a box with color #000066 behind the ticker for our background and reset the document size to 325 * 25. When done your ticker should look like the one below.
With the look down, let's remove the test code on the main movie clip, GetQuote( "MSFT" ), and replace it with the below code. This will allow us to enter as many stock quotes as we like at once.
////////////////////////////////////////////
// variables
////////////////////////////////////////////
quoteArray = new Array( "MSFT", "COKE", "SUNW", "MACR", "AAPL", "CTL", "AMD", "INTC", "DELL", "CSCO", "YHOO");
stop();
Next, let's change the instance name of our ticker to stockTicker and insert this code into the stockTicker movie clip. This code will loop through the quoteArray array and insert each quote into our ticker when it loads.
//sets interval for timer
onClipEvent( load )
{
//sets first set of stocks
_root.quoteArray.sort();
for( quotes in _root.quoteArray )
{
_root.GetQuote( _root.quoteArray[quotes] );
}
this.setDataAllWidth( 0 );
this.sortItemsBy( "text", "ASC" );
}
We're almost done, but first we need to change our GetQuote_Result( result ) call back function to add the quotes into the stockTicker. The stockTicker.addItem method takes a string or TextFormat object and places it into the ticker.
//call back function for GetQuote method
function GetQuote_Result( result )
{
buffer = result[ 0 ] + " " + result[ 1 ] + " " +result[ 4 ];
stockTicker.addItem( { text:buffer, textColor:0xFFFFFF, background:false, bold:true, size:10 } );
}
Test the application and watch the stocks scroll.
Auto-Updating the Flash Ticker
We could stop here, but why not make our ticker auto update? We know that the Yahoo stock data is updated every 20 minutes so let's make our stock ticker check how long its been running and update itself using that interval.
Luckily, Flash has included the getTimer() method, which allows us to get the time in milliseconds our application has been running. With this we can set the current time on the timer and set an interval equal to 20 minutes or (20 * 60000). Now using the ClipEvent( enterFrame ) call back function we can determine if the ticker has been running for 20 minutes and, if so, update the stocks. For those who don't know, the ClipEvent( enterFrame ) is constantly called during the life time of an Flash Application, making it a good place for constant data checks.
To implement the timer, make the following code changes to the stockTicker movie clip.
//sets interval for timer
onClipEvent( load )
{
var current = getTimer();
var interval = (20 * 60000); //every 10 minutes syncs stock data
//sets first set of stocks
this.removeAll();
_root.quoteArray.sort();
for( quotes in _root.quoteArray )
{
_root.GetQuote( _root.quoteArray[quotes] );
}
this.setDataAllWidth( 0 );
this.sortItemsBy( "text", "ASC" );
}
//checks to see if timer has elapsed
onClipEvent( enterFrame )
{
//time has elapsed
if( (current + interval) <= getTimer() )
{
current = getTimer();
//gets new data fro stocks
this.removeAll();
_root.quoteArray.sort();
for( quotes in _root.quoteArray )
{
_root.GetQuote( _root.quoteArray[quotes] );
}
this.setDataAllWidth( 0 );
this.sortItemsBy( "text", "ASC" );
}
}
Conclusion
As you can imagine, this is only the tip of the iceberg. The possibilities of combining the power of ASP.Net for data and business logic with the rich real time interface of Flash can make the most complex web applications simple to use.
A step-by-step guide on how to create a Yahoo Stock Quote Ticker using ASP.Net and Flash Remoting.
Summary
This article will take you through a step-by-step guide on how to create a Yahoo Stock Quote Ticker using ASP.Net and Flash Remoting.
This tutorial requires prior knowledge of ASP.Net web services using C# and Flash MX as well as Flash UI component set 2 and Flash Remoting installed.
Yahoo Stock Quote Ticker Overview
The Yahoo Quote Ticker consists of an ASP.Net web service that connects to Yahoo quotes and grabs detailed data on stocks. The application also features a Flash-based user interface that scrolls through each stock using the Flash Ticker component.
This application follows n-tier application design by dividing the application into data, business, and presentation logic. This way a designer can focus on building usable interfaces and leave the structure of the backend to the developers.
Building the Web Service
The first step in developing the Yahoo Quote Engine is creating the web service. The web service will be responsible from grabbing the data from Yahoo and parsing this to create a friendly structure. In this application I'll use ASP.Net with C#, but web services can easily be developed using VB.Net, Java and Code fusion.
We can start our web service by creating a file named YahooQuoteWebService.asmx in the editor of your choice. I'll use DreamWeaver MX.
Once the file is created we'll declare the contents of the file as a web service using C# and also provide the class name with its namespace.
<@ WebService Language="c#" class="outthebox.web.services.YahooQuoteWebService" >Next, let's build the structure for our web service by defining the namespaces to use, providing a namespace where our web service will sit, and defining our service as a public class that implements the WebService object.
using System.Collections;
using System.Web.Services;
using System.Net;
using System.IO;
namespace outthebox.web.services
{
[WebService(Namespace="outthebox.web.services")]
public class YahooQuoteWebService : WebService
{
}
}
With our class declared we can implement the one and only method for this web service GetQuote( string ). This method will handle the logic involved in getting our quotes from Yahoo.
[WebMethod(Description="Using stock symbol gets delayed stock information from Yahoo.",EnableSession=false)]
public string[] GetQuote( string symbol )
{
string url; //stores url of yahoo quote engine
string buffer;
string[] bufferList;
WebRequest webRequest;
WebResponse webResponse;
url = "http://quote.yahoo.com/d/quotes.csv?s="+symbol+"&d=t&f=sl1d1t1c1ohgvj1pp2wern";
webRequest = HttpWebRequest.Create( url );
webResponse = webRequest.GetResponse();
using( StreamReader sr = new StreamReader( webResponse.GetResponseStream() ) )
{
buffer = sr.ReadToEnd();
sr.Close();
}
buffer = buffer.Replace( "\"", "" );
bufferList = buffer.Split( new char[] {','} );
return bufferList;
}
The above is a lot of code so I'll take you through the implementation chunk-by-chunk.
First we have to create a connection to Yahoo and grab the quotes. The following code grabs a comma delaminated file from Yahoo using the symbol variable and stores the results in a string variable named buffer.
url = "http://quote.yahoo.com/d/quotes.csv?s=" + symbol + "&d=t&f=sl1d1t1c1ohgvj1pp2wern";
Creates a connection to the url and stores our results in the string buffer array.
webRequest = HttpWebRequest.Create( url );
webResponse = webRequest.GetResponse();
using( StreamReader sr = new StreamReader( webResponse.GetResponseStream() ) )
{
buffer = sr.ReadToEnd();
sr.Close();
}
Once we have the results from Yahoo we need to break it up and store the results in a string array. This code calls the string method Split( char[] ) to separate the buffer string into chunks using the comma as the delaminator. The method returns a string[] (string array) with quotes details.
buffer = buffer.Replace( "\"", "" );
bufferList = buffer.Split( new char[] {','} );
return bufferList;
Now that you have a working web service, place it on your web server and go to the address in a web browser. You should see Microsoft's web service page with information on how to access this web service. If you don't see the page make sure ASP.Net is installed properly on your web server and check your code for errors.
Connecting Flash to the Web Service
In order for your flash application to communicate with the web service, you need to install the Flash remoting package from Macromedia. Also, it's very important that you place the flashgateway.dll file (included with Flash remoting for ASP.Net) into your web server's bin folder and make the below changes to your web.config file. These changes will allow Flash to determine what calls are meant for your flash application and call the proper web service. You'll also need to create a blank file named gateway.aspx and place it on your web server. I placed this file in the same location as my web service, but it's up to you.
To establish the connection to our web service we must include the NetServices.as file. This file, included with Flash remoting, will implement the classes necessary to create a wrapper to our service.
Then we can create a connection to the web server gateway. In your code you will replace the //gateway.aspx and //YahooQuoteWebService.asmx?wsdl with the address of your web server and path to the gateway.aspx and YahooQuoteWebService.asmx files.
#include "NetServices.as"
////////////////////////////////////////////
// Inits Web Service
////////////////////////////////////////////
//creates connection to ASP.Net web service
//should never ever run more than once!!
if( init == null )
{
//insures this code block is only run once
init = true;
//sets the gatway will always be this
NetServices.setDefaultGatewayURL("http:////gateway.aspx");
gatewayConnnection = NetServices.createGatewayConnection();
//gets the Yahoo quote service and sets instance
//uses WSDL to create proxy dll file
YahooQuoteWebService = gatewayConnnection.getService("http:////YahooQuoteWebService.asmx?wsdl", this);
}
We need to develop call back functions and wrappers for our web service methods. When we call the GetQuote( string ) method on our web service, Flash will connect to the service and send the response back to _Result( result ) or _Status( error ). If a error occurs while trying to connect to the service, the _Status( error ) call back will be used, otherwise _Result( result ) will be called with the data from the service in the result object. Our result object is an array of strings so we can access this array like we would any Flash array object. NOTE: For a full list of result objects supported by Flash, see the Flash Remoting documentation.
////////////////////////////////////////////
// Call Back Function Wrappers
////////////////////////////////////////////
//gets quote data from web service
function GetQuote( symbol )
{
YahooQuoteWebService.GetQuote( symbol );
trace( "getting " + symbol + " from yahoo quote web service" );
}
////////////////////////////////////////////
// Call Back Functions
////////////////////////////////////////////
//call back function for GetQuote method
function GetQuote_Result( result )
{
buffer = result[ 0 ] + " " + result[ 1 ] + " " + result[ 4 ];
trace( buffer );
}
//call back function tracks status of GetQuote method
function GetQuote_Status( error )
{
trace( error.details );
}
After building our call back functions we can test our application by inserting the below lines of code at into our Action Script. This code will get the symbol, current value, and change data for Microsoft and display it in your trace window.
GetQuote( "MSFT" );
Stop();
Creating the Flash Ticker Component
Now that the logic to grab our quotes is in place, we need to build the actual ticker. To do this you must install Flash UI Components 2 from Macromedia and drag and drop the Ticker object into the main movie clip.
Next select your new ticker object and select the parameters tab on the properties bar. This will let us make the below customizations for the desired look and feel.
Speed = 15
Spacing = 20
Orientation = Horizontal
Scroll Direction = Decremental
Frame Width = 0
Highlight Color = #000066
You should also create a box with color #000066 behind the ticker for our background and reset the document size to 325 * 25. When done your ticker should look like the one below.
With the look down, let's remove the test code on the main movie clip, GetQuote( "MSFT" ), and replace it with the below code. This will allow us to enter as many stock quotes as we like at once.
////////////////////////////////////////////
// variables
////////////////////////////////////////////
quoteArray = new Array( "MSFT", "COKE", "SUNW", "MACR", "AAPL", "CTL", "AMD", "INTC", "DELL", "CSCO", "YHOO");
stop();
Next, let's change the instance name of our ticker to stockTicker and insert this code into the stockTicker movie clip. This code will loop through the quoteArray array and insert each quote into our ticker when it loads.
//sets interval for timer
onClipEvent( load )
{
//sets first set of stocks
_root.quoteArray.sort();
for( quotes in _root.quoteArray )
{
_root.GetQuote( _root.quoteArray[quotes] );
}
this.setDataAllWidth( 0 );
this.sortItemsBy( "text", "ASC" );
}
We're almost done, but first we need to change our GetQuote_Result( result ) call back function to add the quotes into the stockTicker. The stockTicker.addItem method takes a string or TextFormat object and places it into the ticker.
//call back function for GetQuote method
function GetQuote_Result( result )
{
buffer = result[ 0 ] + " " + result[ 1 ] + " " +result[ 4 ];
stockTicker.addItem( { text:buffer, textColor:0xFFFFFF, background:false, bold:true, size:10 } );
}
Test the application and watch the stocks scroll.
Auto-Updating the Flash Ticker
We could stop here, but why not make our ticker auto update? We know that the Yahoo stock data is updated every 20 minutes so let's make our stock ticker check how long its been running and update itself using that interval.
Luckily, Flash has included the getTimer() method, which allows us to get the time in milliseconds our application has been running. With this we can set the current time on the timer and set an interval equal to 20 minutes or (20 * 60000). Now using the ClipEvent( enterFrame ) call back function we can determine if the ticker has been running for 20 minutes and, if so, update the stocks. For those who don't know, the ClipEvent( enterFrame ) is constantly called during the life time of an Flash Application, making it a good place for constant data checks.
To implement the timer, make the following code changes to the stockTicker movie clip.
//sets interval for timer
onClipEvent( load )
{
var current = getTimer();
var interval = (20 * 60000); //every 10 minutes syncs stock data
//sets first set of stocks
this.removeAll();
_root.quoteArray.sort();
for( quotes in _root.quoteArray )
{
_root.GetQuote( _root.quoteArray[quotes] );
}
this.setDataAllWidth( 0 );
this.sortItemsBy( "text", "ASC" );
}
//checks to see if timer has elapsed
onClipEvent( enterFrame )
{
//time has elapsed
if( (current + interval) <= getTimer() )
{
current = getTimer();
//gets new data fro stocks
this.removeAll();
_root.quoteArray.sort();
for( quotes in _root.quoteArray )
{
_root.GetQuote( _root.quoteArray[quotes] );
}
this.setDataAllWidth( 0 );
this.sortItemsBy( "text", "ASC" );
}
}
Conclusion
As you can imagine, this is only the tip of the iceberg. The possibilities of combining the power of ASP.Net for data and business logic with the rich real time interface of Flash can make the most complex web applications simple to use.
Friday, November 23, 2007
BOC Fund Saving
| Symbol | Name | Price | Lot | Lot price | Interest rate |
| 0001 | 長江實業 | 131.3 | 1,000 | 131300 | 1.30 |
| 0002 | 中電控股 | 50.8 | 500 | 25400 | 3.15 |
| 0003 | 香港中華煤氣 | 20.35 | 1,000 | 20350 | 1.72 |
| 0005 | 匯豐控股 | 131.3 | 400 | 52520 | 3.72 |
| 0008 | 電訊盈科 | 4.63 | 1,000 | 4630 | 3.74 |
| 0011 | 恆生銀行 | 135.4 | 100 | 13540 | 3.43 |
| 0013 | 和記黃埔 | 86.85 | 1,000 | 86850 | 1.70 |
| 0016 | 新鴻基地產 | 139.3 | 1,000 | 139300 | 1.58 |
| 0066 | 地鐵公司 | 23.95 | 500 | 11975 | 1.75 |
| 0144 | 招商局國際 | 40.85 | 2,000 | 81700 | 1.19 |
| 0293 | 國泰航空 | 18.52 | 1,000 | 18520 | 3.16 |
| 0386 | 中國石油化工股份 | 10.3 | 2,000 | 20600 | 1.21 |
| 0388 | 香港交易所 | 214 | 500 | 107000 | 0.44 |
| 0494 | 利豐 | 29 | 2,000 | 58000 | 1.57 |
| 0857 | 中國石油股份 | 14.2 | 2,000 | 28400 | 2.42 |
| 0883 | 中國海洋石油 | 13.32 | 1,000 | 13320 | 0.00 |
| 0939 | 建設銀行 | 7.04 | 1,000 | 7040 | 1.28 |
| 0941 | 中國移動 | 129 | 500 | 64500 | 0.42 |
| 0945 | 宏利金融 | 313.4 | 100 | 31340 | 0.00 |
| 1398 | 工商銀行 | 5.87 | 1,000 | 5870 | 0.00 |
| 1800 | 中國交通建設 | 20.25 | 1,000 | 20250 | 0.00 |
| 2318 | 中國平安 | 78.3 | 500 | 39150 | 0.54 |
| 2328 | 中國財險 | 11.6 | 2,000 | 23200 | 0.31 |
| 2388 | 中銀香港 | 18.08 | 500 | 9040 | 4.44 |
| 2628 | 中國人壽 | 39.05 | 1,000 | 39050 | 0.24 |
| 2800 | 盈富基金 | 26.45 | 500 | 13225 | 0.00 |
| 2823 | Α50中國基金 | 22.5 | 100 | 2250 | 1.11 |
| 3328 | 交通銀行 | 11.08 | 1,000 | 11080 | 0.81 |
| 3968 | 招商銀行 | 32.2 | 500 | 16100 | 0.37 |
| 3988 | 中國銀行 | 4.04 | 1,000 | 4040 | 2.97 |
勃艮地紅酒雞(4人份)
勃艮地紅酒雞(4人份)
材料: 培根200克(切成2吋長) 雞塊2公斤 洋蔥2個(1個切碎末、1個切絲)
蒜頭12粒(去皮保持完整) 紅酒不甜的3杯 清雞湯2/3杯
乾燥的百里香(thyme)1小匙半 月桂葉(bay leaf)1片 蘑菇200克(切對半)
奶油1大匙半 鹽及胡椒少許
作法:
1.用中火及少許油煎脆培根片,煎妥後放在紙巾上,吸去多餘油份。利用鍋中剩油,分批煎雞塊,煎好後置旁備用。
3.洋蔥末與蒜頭入鍋煎炒,約五分鐘後,加洋蔥絲再炒3分鐘。
4.將酒、高湯及兩樣香料入鍋,煮至沸騰後,加入雞塊與培根片,蓋上鍋蓋,轉小火燉 40分鐘左右。
5.放入蘑菇,繼續燉煮至雞肉熟爛,約50分鐘。
6.取出雞肉,丟棄月桂葉,留湯汁於鍋中,轉成大火,將湯汁略微收乾至較濃稠。添加 一大匙半的奶油,少許鹽及胡椒,將雞肉回鍋拌合即可。
材料: 培根200克(切成2吋長) 雞塊2公斤 洋蔥2個(1個切碎末、1個切絲)
蒜頭12粒(去皮保持完整) 紅酒不甜的3杯 清雞湯2/3杯
乾燥的百里香(thyme)1小匙半 月桂葉(bay leaf)1片 蘑菇200克(切對半)
奶油1大匙半 鹽及胡椒少許
作法:
1.用中火及少許油煎脆培根片,煎妥後放在紙巾上,吸去多餘油份。利用鍋中剩油,分批煎雞塊,煎好後置旁備用。
3.洋蔥末與蒜頭入鍋煎炒,約五分鐘後,加洋蔥絲再炒3分鐘。
4.將酒、高湯及兩樣香料入鍋,煮至沸騰後,加入雞塊與培根片,蓋上鍋蓋,轉小火燉 40分鐘左右。
5.放入蘑菇,繼續燉煮至雞肉熟爛,約50分鐘。
6.取出雞肉,丟棄月桂葉,留湯汁於鍋中,轉成大火,將湯汁略微收乾至較濃稠。添加 一大匙半的奶油,少許鹽及胡椒,將雞肉回鍋拌合即可。
Subscribe to:
Posts (Atom)