Thursday, January 01, 2009

元旦快乐

2009来到了。 祝大家元旦快乐。 
中国的新年(春节)还有一个月左右。。

元旦GF放假,一起出去转转。 最近一直做宅男很少外出。
今天陪陪女友。
明天去香港一趟。

Tags: 2009


Thursday, January 01, 2009

一个模仿google finance的基于flash的走势图

Google Finance 是google推出的股票的信息的网站。其中的 股票走势图做的很好用。如下图:

在网上找了一下,在google code 找到一个开源项目 http://code.google.com/p/time-series-graph/ 是模仿这种图,他的效果如下:

大致效果已经很像。 如果自己对actionscript 3熟悉的可以进行对time-series-graph做写扩展和自定义。

当然用flash做chart的话,还有其他的一些选择:
open-flash-chart  http://teethgrinder.co.uk/open-flash-chart/
http://code.google.com/p/asopenchart/

Tags: flash, as, flash:chart, chart


Thursday, January 01, 2009

用几句Python做一个简单的web服务器

使用 一句python语句启动一个web server

python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"
python -c "from SimpleHTTPServer import test;test()"
 
自定义端口启动一个web server
python -c "import SimpleHTTPServer;import SocketServer;PORT = 82;Handler = SimpleHTTPServer.SimpleHTTPRequestHandler;httpd = SocketServer.TCPServer(('', PORT), Handler);print 'serving at port', PORT;httpd.serve_forever()"


当然也可以自定义目录,请参考:
PYTHON 指定目录的WEB服务器

Tags: python, webserver