May 27, 2006
Flickr
This is a test post from
, a fancy photo sharing thing.
Filed by
charlie
at 4:20 pm under Uncategorized
No Comments
This is a test post from
, a fancy photo sharing thing.
Filed by
charlie
at 4:20 pm under Uncategorized
No Comments
今天发现Blogger上写完东西之后,显示出来变乱。纠察原因是Template被截断了。应该是属于Blogger.com的事故吧。既然Dreamhost提供了一键安装Wordpress,不如就试试。blogger的“发布到其他主机”的模式,可能是最难割舍的吧。
在DreamHost 的Panel 中通过 “One-click Install” 安装Wordpress,很简单。安装到了 /charliezhu.com/wp 文件夹下。
Wordpress管理界面中的Import功能很好用。
通过DreamHost的 Remap Sub-dir功能,把 http://www.charliezhu.com/blog 映射到 charliezhu.com/wp文件夹上。
提交后,大约几分钟后就生效了。
把原来 charlie.chempedia.com 这个子域名,修改到 charliezhu.com/wp文件夹上。
新增 blog.charliezhu.com 这个子域名,同样指向这个文件夹。
修改生效很快,十几分钟吧。
用了子域名之后,原来站内相对路径的图片或者站内链接,可能就失效了。要修改,以后也要注意。
Restore Google Adsense code on sidebar.
默认的rss 地址 http://blog.charliezhu.com/feed/ ,修改到Feedburner 的feed ,http://feeds.feedburner.com/charliezhu。
把这个feed修改到Wordpress 的模版中。仅修改了Sidebar,没修改Footer。
Feedburner的确很有用,尤其是这样频繁迁移折腾的情况下,如果有人订阅,不会受到影响。
blogger.com的这个功能始终不能用,换了Wordpress 可以如愿以偿尝试一下了。
首先为del.icio.us添加一个用于post的用户,放在了Author组里。
设置如下:
| job_name | out_name | out_pass | out_url | out_time | out_blog_id | out_cat_id | controls |
|---|---|---|---|---|---|---|---|
| WordPressDailyPost | delicious_user | password_for_delicious_user | http://blog.charliezhu.com/xmlrpc.php | 11 | 15 |
out_time 是这个job运行的时间。好像是GMT时间,怎么换算到本地的时间,还需要研究。
References:
修改本地资源的相对路径为绝对路径。
修改分类信息(Categories) 。Blogger里面没有分类的功能。既然google收购了blogger,不使用分类也可以使用tag或者google常用的label 啊。Google已经从专注于做好一个产品的阶段到了多种产品开发同时进行的阶段,光环慢慢消散了。
配置Writely ,把这片记叙文post到新blog上。
Filed by
charlie
at 8:27 am under Network, Tools
No Comments
Filed by
charlie
at 12:53 am under Life
No Comments
试了两个天气预报的rss。分别是Yahoo和Weather.com提供的。
Yahoo的天气数据也是
提供的。 Yahoo天气的rss在Yahoo Developer Network中最为一个项目提供出来。 rss的地址是http://xml.weather.yahoo.com/forecastrss ,有两个参数p和u。 p是地址代码,可以在http://weather.yahoo.com/页面上查询,比如北京就是CHXX0008。这个代码和weather.com上用的代码相同。 u是温度单位。取值c就是摄氏,取值f就是华氏。 这样,摄氏温度的北京天气预报的rss就是 http://xml.weather.yahoo.com/forecastrss?p=CHXX0008&u=c 一个小时一条,似乎太频繁了一点。但是用在google reader上就比较好,一健就跳过了。rss的一个特点就是实时的信息,google reader处理这种高频率的信息就很合适。bloglines的话就排出密密麻麻一排不好用了。
weather.com提供的 rss包括的信息丰富得多,有点累赘,而且格式也不是很好。
Filed by
charlie
at 10:52 pm under Life
No Comments
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
Filed by
charlie
at 9:56 pm under Uncategorized
No Comments
原来的一段程序,自从把MSXml的版本换成4.0之后(Msxml2.DOMDocument.4.0),发现selectSingleNode 和selectNodes的返回结果发生了变化。变化发生在对Yahoo image的搜索结果的处理上,与这段程序中处理的其他xml文件不同,Yahoo的这个返回结果,有Namespace的存在。
查了资料,得到的这个问题的原因:
1. MSXml4.0 在调用selectSingleNode 和 selectNodes的时候,使用的是XPath而不是3.0中默认的XSL Patterns
2. XPath中不支持默认命名空间(default namespace)的概念。所以要设置有前缀的namespace。
3. 在selectSingle/ selectNodes的参数中(XPath)中要使用namespace。
4. MSXml3.0 这两个函数如果要使用XPath,要在SelectionLanguage属性中设置。
XML 代码贴在最后了。
原来的代码:
dom.selectNodes(’//Result’)
用了4.0之后:
dom.setProperty(”SelectionNamespaces”,’xmlns:yh=”urn:yahoo:srchmi”‘ )
dom.selectNodes(’//yh:Result’)
<google groups >
When you were using .selectSingleNode (and for that matter, selectNodes) you were actually using “XSL Pattern” selections rather than XPath. This is because MSXML3 DOM supported and defaulted to
using “XSL Pattern”.
<What’s New in MSXML 4.0 >
<MSDN: SelectionLanguage Property >
(SelectionLanguage property) Used in MSXML 3.0 to specify whether the DOM object should use XPath language (”XPath”) or the old XSLPattern language (default) as the query language.
In MSXML 3.0 only, the default for this property is “XSLPattern”; however, you can set this property to “XPath” to switch the query language from XSLPattern to XPath. Once the property is set, there is no way to switch back without creating an instance of a new DOM object.
For MSXML 4.0 and later, only a value of “XPath” is recognized as XPath is the only query language supported and therefore, this property can be ignored.
<google groups >
XPath does not support the concept of a default namespace.
You MUST provide a binding to a prefix which idnetifes the namespace to which your node(set) belongs.
<?xml version=”1.0″ encoding=”UTF-8″?>
<ResultSet xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”urn:yahoo:srchmi”
xsi:schemaLocation=”urn:yahoo:srchmi http://api.search.yahoo.com/ImageSearchService/V1/ImageSearchResponse.xsd” totalResultsAvailable=”4″ totalResultsReturned=”4″ firstResultPosition=”1″>
<Result><Title>institutmitlogo.jpg</Title><Summary /><Url>http://elib.uni-stuttgart.de/img/institutmitlogo.jpg</Url><ClickUrl>http://elib.uni-stuttgart.de/img/institutmitlogo.jpg</ClickUrl><RefererUrl>http://elib.uni-stuttgart.de/opus/volltexte/2004/1704</RefererUrl><FileSize>18051</FileSize><FileFormat>jpeg</FileFormat><Height>142</Height><Width>142</Width>
<Thumbnail><Url>http://mud.mm-a6.yimg.com/image/2140405770</Url><Height>125</Height><Width>125</Width></Thumbnail>
</Result><Result><Title>freebsd-powered.gif</Title><Summary /><Url>http://www.beetfoundation.com/images/freebsd-powered.gif</Url><ClickUrl>http://www.beetfoundation.com/images/freebsd-powered.gif</ClickUrl><RefererUrl>http://www.beetfoundation.com/words/h/hyperoxide.html</RefererUrl><FileSize>999</FileSize><FileFormat>gif</FileFormat><Height>31</Height><Width>88</Width>
<Thumbnail><Url>http://mud.mm-a4.yimg.com/image/1136824734</Url><Height>31</Height><Width>88</Width></Thumbnail>
</Result>
</ResultSet>
<!– ws01.search.scd.yahoo.com compressed/chunked Sat May 13 07:31:42 PDT 2006 –>
Filed by
charlie
at 6:34 am under Uncategorized
No Comments
水木社区上xiaxianyue (下弦月)网友在天安门排的照片“城墙下的笑容”,很感染人。一家人其乐融融,对孩子来说,世界的中心就是自己的家,爸爸和妈妈。想念我自己的妈妈。
Filed by
charlie
at 10:37 pm under Life
No Comments