this is a test
这是一个测试
http://livesino.net/archives/3069.live
或许几周或甚至几天前朋友们还在讨论是否可以用 Writer 撰写新浪博客,事实上,就在新浪和 MSN 中国签署合作之时,新浪博客就已经低调宣布了对微软旗下的离线博客撰写软件 Windows Live Writer(下载)的支持。
新浪博客官方也给出了详细的 Writer 配置步骤,这里我做个总结:
■ 运行 Writer 后,依次点击“选项 –> 账户 –> 添加”,选择“其他服务”:
■ 填写自己的新浪博客地址、新浪用户名和密码(若是通过 Messenger Connect 绑定帐号的,也请填写新浪用户名):
■ 在是否“下载日志主题”的界面中 选择“否 No”:
■ 填写 Writer 中显示的博客名称:
至此新浪博客的帐号就添加完成了。
另外,新浪博客作为微软 Windows Live Spaces 大陆地区数据迁移唯一合作伙伴,已经成为迁移选项出现在了 Spaces 官方迁移流程之中。 ![]()
http://www.youtube.com/watch?v=sROKYelaWbo
http://courses.cit.cornell.edu/ee476/FinalProjects/s2007/msm39_sk398/msm39_sk398/finprojwebpage.html
http://www.instructables.com/id/Synchronizing-Fireflies/
http://article.chinautn.com/20080905/24816.html
http://www.sciencenet.cn/m/user_content.aspx?id=348186
TED这个应该都可以看到了,貌似还有多国语言的字幕。large-scale systems, 这个学期一门很有趣的课。
1. 注意
where <debug> $[some message [varname] ]
与
where <debug> [varname]
的区别。 如果varname代表一个数组/List,那么前者的输出为:
abc
后者的输出为
["a","b","c"]
见到前者的输出时,并不能由此就认定该变量没有保存一个list。
2. spoofax的api manual
http://releases.strategoxt.org/docs/api/libstratego-lib/stable/docs/html/index_all.html
3. 一些hints
Look-up transformations map names to information about the named element, e.g. a class name to a list of names of its ancestors. Since you have only a name, you typically have to get the declaration of the named element. Remember, you stored mappings from names to declarations earlier in this assignment. Either during or after this step, you project the declaration to the information you are interested in. In the ancestors example, you are not interested in the whole declaration but only in the name of the parent. You have already a projection strategy for this! You can use these strategies from the namespace library to get or project declarations:
Once you got the information you are interested in, you process this information further, maybe in another look-up or in a recursive call. Typical processes are mapping elements in a list to new elements in a new list or to filter elements from a list. Generic traversals are usually not involved here. The following strategies from the Stratego library might help you:
When you define recursive rewrite rules, start with the base cases. Define one rewrite rule for each base case. In the ancestors example, a base case is a class without a parent. Specify this condition in the where clause of the rewrite rule. Next, you can define recursive rewrite rules. You specify how to build the overall result from the result of a recursive call in the where clause. In the ancestors example, you need a rule for a class with a parent class. The ancestors of such a class include the ancestors of the parent class. You need to make sure that the recursion always terminate. In the ancestors example, you have to deal with cyclic inheritance. A possible solution is to add an additional parameter to your rewrite rules which accumulates the ancestor classes. You can then add another base case which checks if the current class is already in this accumulated list.
Note: If you are not familiar with the concept of an accumulator, this is a good point to change this. The inverse example from the lecture on Term Rewriting uses an accumulator.
昨儿个买了一堆东西,一股脑儿塞进书包,结果拉链拉不上了。只好敞着口背在肩上。价值一欧多的七根香蕉就在最上面放着。
一路上风雨交加,有些狼狈。到了住处,锁车。先锁后轮,然后弯腰探着身子去锁前轮。感觉好像有东西掉地上的声音。往地上观瞧,除了金黄的落叶,其他什么也没有。取下书包,发现放在最上面的香蕉没了。于是又仔细往地上看,还是什么也没有。进屋之后有些不爽,好不容易想起来买点香蕉吃,结果却弄丢了,浪费了十块钱人民币。这些钱在加点可以吃一个焢肉饭了。
今天在外面跑了一天,晚上图书馆回来还是在几乎同样的地方放车。锁车的时候,突然发现一把香蕉放在旁边车的后座上。顿时有些欣喜。回来马上吃了一根。
虽然香蕉是凉的,但是心中却是温暖的。
在读一本关于OO程序re-engineering的书,开篇有这么一个东西,看着感觉挺逗,贴出来分享一下:
A Fairy Tale
Once upon a time there was a Good Software
Engineer whose Customers knew exactly what
they wanted. The Good Software Engineer worked
very hard to design the Perfect System that would
solve all the Customers’ problems now and for
decades. When the Perfect System was designed,
implemented and finally deployed, the Customers
were very happy indeed. The Maintainer of the
System had very little to do to keep the Perfect
System up and running, and the Customers and
the Maintainer lived happily every after.
另外下面这条可能是给软件公司远远不断地带来盈利的理论基础:
The Law of Continuing Change —A program that is used in a real-
world environment must change, or become progressively less use-
ful in that environment.
但是还有另外一条:
The Law of Increasing Complexity — As a programevolves, it becomes
more complex, and extra resources are needed to preserve and sim-
plify its structure.
然后:
The best we can hope for is to build a useful system that will survive long enough for it to be
asked to do something new.