Thursday, March 6, 2008

Great pictures to motivate oneself

改变你人生! 10张激励成功海报











misunderstand when using XmlNode.SelectSingleNode function

Keywords: System.Xml, XmlNode, XPath


在使用System.Xml命名空间的XmlNode类, 有一个方法 XmlNode.SelectSingleNode(string xpath).


刚开始使用它时, 对它的作用理解有误. 如果XPath以"/"开始, 其意义为从根节点开始搜索Node. 原本想使用XmlNode456对象的SelectSingleNode(XPath123)方法, XPath123这个表达式所指的根节点应是XmlNode456, 但事实是, 这个函数仍以XmlNode456所在文档的根节点root作为搜索的起点.


要搜索Node456下的Child节点, 有2个方法, 最好使用方法2, 因为它更加简单.


方法1: 如果想通过SelectSingleNode()来搜索的话, 构建一个从根节点root指向Child的绝对路径的XPath, (XPath表达式应该以"./"开头)


方法2: 将Node456.OutXml赋值给一个tempXmlDocument., 然后再使用tempXmlDocument.SelectSingleNode(AbsoluteXPath), 可以定位到子节点. 这时候, 你可以用tempXmlDocument来直接提取Node456节点的内容, 如果还要修改Node456, 应该在修改tempXmlDocument之后, 再将修改后的内容保存到原有的Node456节点上.




XmlDocument tempXmlDocument = new XmlDocument();
//Load the xml from Node456
tempXmlDocument.LoadXml(Node456.OutXml);

//extract Info from tempXmlDocument
//...


//change the tempXmlDocument info
//...

//save the result after changed into the Node456
Node456.InnerXml = tempXmlDocument.DocumentElement.InnerXml;

Monday, March 3, 2008

Cool igoogle gadgets I recommended


Keywords: iGoogle, Gadget


可以将iGoogle的页面作为浏览器的主页, iGoogle最大特点是能加载Gadget, 你可以在定制你自己的igoogle, 如果用的好的话, 可以提高你的办公效率.


iGoogle的主页是 www.igoogle.com


下面是我精心选择的20个Gadget.

1. Motivational Quotes of the Day
http://www.google.com/ig/directory?url=www.quotationspage.com/data/mqotd.rss
2. Money Tip of the Day
http://www.google.com/ig/directory?url=charles447.googlepages.com/finance-money-tips.xml
3. Date & Time
http://www.google.com/ig/directory?url=www.google.com/ig/modules/datetime.xml
4. World Clocks
http://www.google.com/ig/directory?url=www.ljmsite.com/google/gadgets/worldclocks.xml
5. Birthday Reminder
http://www.google.com/ig/directory?url=www.labpixies.com/campaigns/dates/dates.xml
6. Pregancy Calendar
http://www.google.com/ig/directory?url=www.labpixies.com/campaigns/pregnancy/pregnancy.xml
7. Chinese lunar Calendar
http://www.google.com/ig/directory?url=www.google.com/ig/modules/chinese_calendar_converter.xml
8. Sticky Note(网上有很多类似的Gadget, 很多都不能很好地保存你输入的信息, 这个经测试, 没有问题)
http://www.google.com/ig/directory?url=www.google.com/ig/modules/sticky.xml
9. Notekeeper(网上有很多类似的Gadget, 很多都不能很好地保存你输入的信息, 这个经测试, 没有问题)
http://www.google.com/ig/directory?url=realworldproductions.com/notekeeper/notekeeper-inlineoptional.xml
10. To-Do List(网上有很多类似的Gadget, 很多都不能很好地保存你输入的信息, 这个经测试, 没有问题)
http://www.google.com/ig/directory?url=www.google.com/ig/modules/todo.xml
11. CDICT: Chinese-English Dictionary
http://www.google.com/ig/directory?url=chunju.googlepages.com/cdict.xml
12. Compound gadget
http://www.google.com/ig/directory?url=www.google.com/ig/modules/compound.xml
13. IP Address Lookup
http://www.google.com/ig/directory?url=www.ip-lookup.net/ip-address-lookup.xml
14. Better Bookmarks
http://www.google.com/ig/directory?url=sinkpoint.railsplayground.net/gadgets/linkslist.xml
15. igoogle via HTTPS
http://www.google.com/ig/directory?url=iglocalhost.googlecode.com/svn/trunk/gadgets/iGoogleSecure/https.xml
16. Document to PDF
http://www.google.com/ig/directory?url=www.pdf24.org/plugins/google/google.xml
17. Google Docs
http://www.google.com/ig/directory?url=www.google.com/ig/modules/docs.xml
18. Google Analytics
http://www.google.com/ig/directory?url=r2unit.org/gmodule/analytics.xml
19. Yahoo! Weather-Shanghai
http://www.google.com/ig/directory?url=xml.weather.yahoo.com/forecastrss%3Fp%3DCHXX0116
20. 地区信息常用搜索
http://www.google.com/ig/directory?url=www.google.com/ig/modules/chinese_common_search.xml


Thursday, February 28, 2008

add gadget into igoogle and your webpage


Keywords: Gadget, Widget, iGoogle


Gadget is as one small applet, and it can hosted in desktop application or webpage.


Almost google gadgets can applicable for google Desktop and iGoogle. http://www.google.com/ig/directory


Some of them can add in YOUR webpage. http://www.google.com/ig/directory?synd=open



Tuesday, February 26, 2008

2007 CCTV cup English speaking contest video

Keywords: English Speaking Contest




2007CCTV杯英语演讲大赛决赛第一天
http://v.youku.com/v_show/id_co00XMTU4ODEwNTI=.html




2007CCTV杯英语演讲大赛决赛第2天
http://v.youku.com/v_show/id_co00XMTU4ODI2NzI=.html




2007CCTV杯英语演讲大赛决赛第3天
http://v.youku.com/v_show/id_cd00XMTU4ODQxMTY=.html


Monday, February 25, 2008

ruby dev tools

keywords: Ruby, JDT


One-Click Installer- Ruby interpretor and extenstion(Windows OS)


http://rubyforge.org/frs/?group_id=167


ActiveScriptRuby- Ruby interpretor and extenstion package(Windows OS)


http://arton.hp.infoseek.co.jp/indexj.html




RDE- Ruby Dev Eniviroment


http://homepage2.nifty.com/sakazuki/rde_en/index.html


RDT homepage


http://rubyeclipse.sourceforge.net/


Using the Ruby Development Tools plug-in for Eclipse


http://www.ibm.com/developerworks/opensource/library/os-rubyeclipse

Wednesday, February 20, 2008

open source net and security class library of c#

Keywords: C#, Opensource, Net library, Security Library, Certificate library


great opensource site http://www.mentalis.org/