Haskell is a general purpose, purely functional programming language. Haskell compilers are freely available for almost any computer.



Why Wicket?

If you are looking to do web application programming in Java, you have a very large number of choices these days. In fact, there are so many web application frameworks now that it has become somewhat of a joke. One blog site on the Internet poses the question: How many Java web frameworks can you name? The answer they show looks like this:

Frameworks, Frameworks Everywhere

Echo Cocoon Millstone OXF
Struts SOFIA Tapestry WebWork
RIFE Spring MVC Canyamo Maverick
JPublish JATO Folium Jucas
Verge Niggle Bishop Barracuda
Action Framework Shocks TeaServlet wingS
Expresso Bento jStatemachine jZonic
OpenEmcee Turbine Scope Warfare
JWAA Jaffa Jacquard Macaw
Smile MyFaces Chiba JBanana
Jeenius JWarp Genie Melati
Dovetail Cameleon JFormular Xoplon
Japple Helma Dinamica WebOnSwing
Nacho Cassandra Baritus

Why "Reinvent the Wheel"?

In light of this, you may be wondering "What good is another web application framework?" Indeed. Why "re-invent the wheel?" One snappy comeback to that old saw is: because this time we could make it rounder!

But it was not simply a desire for higher quality that drove the creation of Wicket. Even with so many options, there really is no web toolkit which fills exactly the niche that Wicket fills. In fact, Wicket is quite unlike each of the frameworks above.

Wicket’s closest cousins are probably Tapestry and Echo, but even there the likeness is very shallow. Like Tapestry, Wicket uses a special HTML attribute to denote components, enabling easy editing with ordinary HTML editors. Like Echo, Wicket has a first-class component model. But Wicket applications are not like applications written in either Tapestry or Echo, because in Wicket you get the best of both worlds. You get the benefits of a first-class component model and a non-intrusive approach to HTML. In many situations, this combination may prove to be a significant development advantage.

To understand why Wicket is so different, it may help to understand the motivations that created it.


Most existing web frameworks provide weak to non-existent support in managing server-side state.

This normally means lots of ad-hoc code in web applications dealing with the gory mechanics of state management. While Wicket will not allow you to stop thinking about server state, it goes a long ways towards making it easy and often transparent to manage that state.

In Wicket, all server side state is automatically managed. You will never directly use an HttpSession object or similar wrapper to store state. Instead, state is associated with components. Each server-side page component holds a nested hierarchy of stateful components, where each component’s model is, in the end, a POJO (Plain Old Java Object). Wicket maintains a map of these pages in each user’s session. One purpose of this page map (and the component hierarchy on each page) is to allow the framework to hide all details of how your components and models are accessed. You deal with simple, familiar Java objects and Wicket deals with things like URLs, session ids and GET/POST requests.

You will also find that this well-structured server state makes it very easy to deal with the dreaded "back button problem". In fact, Wicket has a generic and robust solution which can identify and expire browser-cached pages that have become stale due to structural changes to the model of a component on the page.

Finally, Wicket has been designed to work with POJO persistence frameworks such as JDO or Hibernate. This can make database driven web applications quite easy to write.

For many applications, it will be worth trading off the increased server load of extra server-side state for decreased development costs, lower maintenance costs, quicker time-to-market and generally higher quality software. The basic observation here is that software is expensive and complex while servers from companies like E-machines and Dell are relatively dirt cheap.

In terms of efficiency versus productivity, perhaps Wicket is to JSP as Java is to C. You can accomplish anything in Wicket in JSP. You may even do it more efficiently in terms of memory or processor consumption. But it may take you weeks or months longer to develop your application. And in the end, since state management in JSP is ad-hoc, you are likely find security problems and bugs popping up everywhere. Most of the other frameworks above will do only a little more to help you.

Most existing frameworks require special HTML code.

JSP is by far the worst offender, allowing the embedding of Java code directly in web pages, but to some degree almost all of the frameworks from the list (except Tapestry) above introduce some kind of special syntax to your HTML code.

Special syntax is highly undesirable because it changes the nature of HTML from the kind of pure-and-simple HTML markup that web designers are familiar with, to some kind of special HTML. This special HTML can be more difficult to preview, edit and understand.

Wicket does not introduce any special syntax to HTML. Instead, it extends HTML in a standards-compliant way via a Wicket namespace that is fully compliant with the XHTML standard. This means that you can use Macromedia Dreamweaver, Microsoft Front Page, Word, Adobe Go Live, or any other existing HTML editor to work on your web pages and Wicket components. To accomplish this, Wicket consistently uses a single id attribute in the Wicket namespace ("wicket:id") to mark HTML tags that should receive special treatment by the toolkit. If you prefer not to render Wicket namespaced tags and attributes to your end-users, Wicket has a simple setting to strip them all out, resulting in ordinary, standards-compliant HTML.

No "special sauce" in your HTML means designers can mock up pages that you can use directly in development. Adding Java components to the HTML is as simple as setting the component name attribute. And you can then give the HTML back to your web designers knowing that they can change it with confidence.

Wicket, more than any other framework gives you a separation of concerns. Web designers can work on the HTML with very little knowledge of the application code (they cannot remove the component name tags and they cannot arbitrarily change the nesting of components, but anything else goes). Likewise, coders can work on the Java components that attach to the HTML without concerning themselves with what a given page looks like. By not stepping on each other’s toes, everyone can get more work done.

Existing frameworks are not easy.

Most of the existing toolkits have poorly defined or non-existent object models. In some cases, the model is defined using special XML syntaxes. The syntaxes may be so cumbersome that special tools are required to manipulate all the configuration information. Since these toolkits are not simple Java libraries you may or may not be able to use your favorite IDE tools such as editors, debuggers and compilers.

Wicket is all about simplicity. There are no configuration files to learn in Wicket. Wicket is a simple class library with a consistent approach to component structure. In Wicket, your web applications will more closely resemble a Swing application than a JSP application. If you know Java (and especially if you know Swing), you already know a lot about Wicket.

Existing frameworks inhibit reusability.

Tapestry and JSF at least have component models that allow reuse, but you are likely to find that it is not particularly trivial to do, at least when compared with Wicket. Wicket has been explicitly designed to make it very, very easy to create reusable components. It’s surprisingly simple to extend existing components and to make compound components such as a SignInPanel or AddressForm. It is also relatively easy to create components that exploit new features of browsers. Components in Wicket can be packaged up in JAR files and reused by simply dropping them in your lib folder – no configuration necessary!

Web programming should be fun!

This is my most personal goal for writing Wicket . None of the existing frameworks are appealing to me in terms of intuitiveness, quickness, ease of development, etc. It is my hope that Wicket represents a significant step in the direction of making web applications easy and fun to write.


Coming from these motivations, the following goals for Wicket emerged:

    • POJO-centric
    • All code written in Java ala Swing
    • Minimize "conceptual surface area"
    • Avoid overuse of XML configuration files
    • Fully solve back button problem
    • Easy to create bookmarkable pages
    • Maximum type safety and compile-time problem diagnosis
    • Maximum diagnosis of run-time problems
    • Minimum reliance on special tools
    • Components, containers and conventions should be consistent
    • Components written in Wicket should be fully reusable
    • Reusable components should be easily distributed in ordinary JAR files
    • HTML or other markup not polluted with programming semantics
    • Only one simple tagging construct in markup
    • Compatible with any ordinary HTML editor
    • Easy for graphics designers to recognize and avoid framework tagging
    • Easy to add tagging back to HTML if designers accidentally remove it
  • SAFE
    • Code is secure by default
    • Only explicitly bookmarkable links can expose state in the page or URL
    • All logic in Java with maximum type safety
    • Easy to integrate with Java security
    • Efficient and lightweight, but not at the expense of other goals
    • Clustering through sticky sessions preferred
    • Clustering via session replication is easy to accomplish and easy to tune by working with detachable models.
    • The Wicket team is committed to deliver a feature complete, ready-to-use framework for developing Java web applications. The core framework was written and contributed by the author of this introduction, Jonathan Locke. The current team consists of a group of experienced programmers, some of which were active on some of the other frameworks stated above, and all of which have extensive experience building large scale Java web applications. We eat our own dogfood, and will thus work on Wicket from a framework user’s perspective.


Mentawai strives to be a small, simple, flexible and easy web framework.

  • Small: Mentawai does not try to be an one-solution-for-all-problems framework. Instead, it solves the basic (and probably the most important) problems that a web developer faces as simply as it can.

  • Simple: Mentawai is very simple to understand, configure and install. If it is difficult to start why should you go any further? Mentawai configuration is done with 100% pure Java code. No extra boring XML files. If you are tired of dealing with XML configuration files, you should try this new framework.

  • Flexible: Because it is small, it must be flexible. The API should be well designed and simple to allow for easy extension. Don’t like something, just change it yourself and have fun.

  • Easy: Look and understand. Don’t make me think much! I have a web project to do! High-level APIs for easy development. Just get the work done so you can concentrate on your site!


Mentawai uses the Action paradigm. The main characteristics of a Mentawai action are:

  • An action has an input (org.mentawai.core.Input) and an output (org.mentawai.core.Output).

  • An action generates a result (java.lang.String) after it is executed. The result is usually success or error, but you can create your own.

  • For each result there is a consequence. The consequences for a web application are usually forward or redirect, but you can create your own.

  • An action has access to contexts. The contexts for a web application are usually a SessionContext or a ApplicationContext, but you can create your own.


Before we talk any further, let’s see some code. Below is the example of a Mentawai action:

public class HelloMentawai extends BaseAction {

	public String execute() throws ActionException {
		String username = input.getStringValue("username");
		if (username == null || username.trim().equals("")) {
			return ERROR;
		output.setValue("username", username.toUpperCase());
		return SUCCESS;

This action looks for a username input parameter and outputs it in uppercase.

If it does not find the username parameter the result is ERROR otherwise SUCCESS.

HelloMentawai inherits from BaseAction, which is a useful implementation of the Action interface. BaseAction provides, through protected data members, access to input, output, session context, application context and more.

For each result (SUCCESS, ERROR, etc) we have to associate a consequence. Instead of using a boring XML file, Mentawai let’s you do that in code, by creating a ApplicationManager class that extends org.mentawai.core.ApplicationManager.

The file ApplicationManager.java extends the base org.mentawai.core.ApplicationManager and define the actions of your web application.

// no package (root package)

public class ApplicationManager extends org.mentawai.core.ApplicationManager {

	public void loadActions() {
		ActionConfig ac = new ActionConfig("/HelloWorld", HelloMentawai.class);
		ac.addConsequence(HelloMentawai.SUCCESS, new Forward("/hello.jsp"));
		ac.addConsequence(HelloMentawai.ERROR, new Forward("/username.jsp"));

The consequence for a SUCCESS is a forward to /hello.jsp.

The consequence for a ERROR is a forward to /username.jsp.

The method loadActions() is called by the Mentawai controller when the web application starts.

Throught ActionConfigs, you can define different names and consequences for the same action implementation. The Mentawai controller finds actions by name, so /HelloWorld will be called by http://www.myapp.org/HelloWorld.mtw and /customers/ListCustomers will be called by http://www.myapp.org/customers/ListCustomers.mtw.

You can put your ApplicationManager class in any package, but, by default, Mentawai will try to load it from the root (empty) package.

The file hello.jsp displays the action output:

<%@ taglib uri="/WEB-INF/lib/mentawai.jar" prefix="mtw" %>
<h3>Hello <mtw:out value="username" /> from Mentawai!</h3><!-- Menta Tags -->
<!-- alternatives -->
<h3>Hello <c:out value="${username}" /> from Mentawai!</h3><!-- JSTL -->
<h3>Hello ${username} from Mentawai!</h3><!-- EL -->
<h3>Hello $username from Mentawai!</h3><!-- Velocity -->

In the file hello.jsp, we use the custom tag <mtw:out value="username" /> to display the output of the action.

Mentawai provides many useful tags for displaying action output. It also provides a base custom tag implementation from where you can easily create your own mentawai tags.

Mentawai keeps the view layer (JSPs) clean from Java code through some very easy and simple custom tags. However you can use JSTL, EL, Velocity and your own taglibs if you prefer to.


  纳什认为:如果所有的人均相持不下,就没有一个人可以简单地胜出。在《博弈论》中,他给出了一个极其著名的博弈均衡,也称为 “大小猪均衡”。 

逆反思维  炒股的最高原则



1,记住该记住的,忘记该忘记的。改变能改变的,接受不能改变的  >>

2,能冲刷一切的除了眼泪,就是时间,以时间来推移感情,时间越长,冲突越淡,仿佛不断稀释的茶。 >>

3,怨言是上天得至人类最大的供物,也是人类祷告中最真诚的部分 >>

4,智慧的代价是矛盾。这是人生对人生观开的玩笑。 >>

5,世上的姑娘总以为自己是骄傲的公主(除了少数极丑和少数极聪明的姑娘例外) >>

6,如果敌人让你生气,那说明你还没有胜他的把握 >>

7,如果朋友让你生气,那说明你仍然在意他的友情 >>

8,令狐冲说“有些事情本身我们无法控制,只好控制自己。” >>

9,我不知道我现在做的哪些是对的,那些是错的,而当我终于老死的时候我才知道这些。所以我现在所能做的就是尽力做好每一件事,然后等待着老死。 >>

10,也许有些人很可恶,有些人很卑鄙。而当我设身为他想象的时候,我才知道:他比我还可怜。所以请原谅所有你见过的人,好人或者坏人 >>

11,鱼对水说你看不到我的眼泪,因为我在水里.水说我能感觉到你的眼泪,因为你在我心里。 >>

12,快乐要有悲伤作陪,雨过应该就有天晴。如果雨后还是雨,如果忧伤之后还是忧伤.请让我们从容面对这离别之后的离别。 微笑地去寻找一个不可能出现的你! >>

13,死亡教会人一切,如同考试之后公布的结果�D�D虽然恍然大悟,但为时晚矣~! >>

14,你出生的时候,你哭着,周围的人笑着;你逝去的时候,你笑着,而周围的人在哭!一切都是轮回!!!! 我们都在轮回中!!!! >>

15,男人在结婚前觉得适合自己的女人很少,结婚后觉得适合自己的女人很多 >>

16,于千万人之中,遇见你所遇见的人;于千万年之中,时间的无涯荒野里,没有早一步,也没有晚一步,刚巧赶上了 >>

17,每个人都有潜在的能量,只是很容易:被习惯所掩盖,被时间所迷离,被惰性所消磨. >>

18,人生短短几十年,不要给自己留下了什么遗憾,想笑就笑,想哭就哭,该爱的时候就去爱,无谓压抑自己 >>

19,《和平年代》里的话:当幻想和现实面对时,总是很痛苦的。要么你被痛苦击倒,要么你把痛苦踩在脚下 >>

20,真正的爱情是不讲究热闹不讲究排场不讲究繁华更不讲究嚎头的 >>

21,生命中,不断地有人离开或进入。于是,看见的,看不见的;记住的,遗忘了。 生命中,不断地有得到和失落。于是,看不见的,看见了;遗忘的,记住了。 然而,看不见的,是不是就等于不存在?记住的,是不是永远不会消失? >>

22,我们确实活得艰难,一要承受种种外部的压力,更要面对自己内心的困惑。在苦苦挣扎中,如果有人向你投以理解的目光,你会感到一种生命的暖意,或许仅有短暂的一瞥,就足以使我感奋不已。 >>

23,我不去想是否能够成功,既然选择了远方,便只顾风雨兼程; >>

我不去想,身后会不会袭来寒风冷雨,既然目标是地平线,留给世界的只能是背影. >>



c:\>ntsd -c q -p PID

只有System、SMSS.EXE和CSRSS.EXE不能杀。前两个是纯内核态的,最后那个是Win32子系统,ntsd本身需要它。ntsd从2000开始就是系统自带的用户态调试工具。被调试器附着(attach)的进程会随调试器一起退出,所以可以用来在命令行?罩菇獭J褂胣tsd自动就获得了debug权限,从而能杀掉大部分的进程。ntsd会新开一个调试窗口,本来在纯命令行下无法控制,但如果只是简单的命令,比如退出(q),用-c参数从命令行传递就行了。NtsdNtsd 按照惯例也向软件开发人员提供。只有系统开发人员使用此命令。有关详细信息,请参阅 NTSD 中所附的帮助文件。用法:开个cmd.exe窗口,输入:

  ntsd -c q -p PID


世界上下五千年(古代卷) http://www.culture.zju.edu.cn/booklib/1008143039.exe
世界上下五千年(近代卷) http://www.culture.zju.edu.cn/booklib/1008143123.exe
世界上下五千年(现代卷) http://www.culture.zju.edu.cn/booklib/1008143205.exe
米歇尔.沃尔德罗普:复杂 http://www.nease.net/~luolian/down/complexity.zip
【德】克劳斯.迈因策尔:复杂性中的思维 http://www.nease.net/~luolian/down/Complexit.zip
路德维希.冯.贝塔朗菲:生命问题 http://www.nease.net/~luolian/down/ProblemsOfLife.zip
N.维纳:人有人的用处 http://www.nease.net/~luolian/down/wiener.zip
K.R.波普:开放的宇宙 http://www.nease.net/~luolian/down/OpenUniverse.zip
K.R.波普:科学发现的逻辑 http://www.nease.net/~luolian/down/SciLogic.zip
K.R.波普:开放社会及其敌人 http://www.nease.net/~luolian/down/OpenSociety.zip
露丝.本尼迪克:文化模式 http://www.nease.net/~luolian/down/PatternsOfCult.zip
E.泰勒:人类学——人及其文化研究 http://www.nease.net/~luolian/down/tylor.zip
B.马林诺斯基:科学的文化理论 http://www.nease.net/~luolian/down/SciCult.zip
D.莫利斯:祼猿 http://www.nease.net/~luolian/down/NakedApe.zip
玛格丽特·米德:文化与承诺 http://www.nease.net/~luolian/down/meed.zip
伊夫林.凯勒:情有独钟 http://www.nease.net/~luolian/down/McClintock.zip
J.D.沃森:双螺旋 http://www.nease.net/~luolian/down/DoubleHelix.zip
杰拉耳德·霍耳顿:科学与反科学 http://www.nease.net/~luolian/down/kxyfkx.zip
W.海森伯:物理学和哲学 http://www.nease.net/~luolian/down/heisenberg.zip
艾.爱因斯坦利.英费尔德:物理学的进化 http://www.nease.net/~luolian/down/EvolutionOfPhysics.zip
尼耳斯.玻尔:尼耳斯.玻尔哲学文选 http://www.nease.net/~luolian/down/bohr.zip
巴伯:科学与社会秩序 http://www.nease.net/~luolian/down/science&order.zip
伊.拉卡托斯:科学研究纲领方法论 http://www.nease.net/~luolian/down/Scien_Reserch.zip
张文木:中国新世纪安全战略 http://www.pen123.net/book/zhangwenmuzhanlue.zip
圣经 http://www.godoor.net/download/bible.zip
第五项修炼 http://time.dufe.edu.cn/xsshuku/jingdiantushu02/dwxxl.exe
西藏生死之书 http://taoshare.myetang.com/xizangsss.exe
圣经(简体中文,繁体中文,及英文版) http://www.o-bible.com/gb/dlb.html
喻世明言 http://www.bookhome.net/gudian/fml/ysmy/ysmy.zip
警世通言 http://taoshare.myetang.com/sanyan1.exe
***道德经 http://taoshare.myetang.com/laozi.exe
菜根谭 http://www.zust2.com/libraryFTP/gudial/caigentan-gb.exe
五体不满足 http://taoshare.myetang.com/wuti.exe
顾准日记 http://www.nease.net/~luolian/down/GuzhunDiary.zip
冯友兰:中国哲学简史 http://www.nease.net/~luolian/down/chnph.zip
康德:纯粹理性批判 http://www.nease.net/~luolian/down/reason.zip
康德:未来形而上学导论 http://www.nease.net/~luolian/down/kant.zip
费希特:全部知识学的基础 http://www.nease.net/~luolian/down/fichet.zip
孔多塞:人类精神进步史表纲要 http://www.nease.net/~luolian/down/humanspir.zip
实用主义 http://time.dufe.edu.cn/xsshuku/shiyongzhuyi.zip
人类理解研究 http://time.dufe.edu.cn/xsshuku/renleiljyj.zip
杜威:哲学的改造 http://www.nease.net/~luolian/down/duwei.zip
黑格尔:小逻辑 http://www.nease.net/~luolian/down/logic.zip
B.罗素:哲学问题 http://www.nease.net/~luolian/down/ph_problem.zip
亚里斯多德:亚里斯多德全集(1) http://www.nease.net/~luolian/down/ylsdd.zip
唐诗三百首 http://www.bookbar.net/gdwx/05.zip
英汉对照——唐诗三百首 http://www.ezhon.com/poem/tan/300e/300e.zip
***诗词手迹 http://www.yishui.gov.cn/tjj/kswy/zhk/mzdsc.htm
李太白全集 http://www.ezhon.com/poem/tan/libai/libai.zip
汉·司马迁:史记 http://garden.2118.com.cn/dfmy/sjxz/shiji.zip
富爸爸·穷爸爸 http://www.bookbar.net/wgwx/zp/fbb/fbb.zip
价格理论(有1、2、3部分,请分别从三个地址下载) http://www.oklink.net/a/0101/0110/jgll/jgll.zip
经济学原理 http://www.oklink.net/zzjj/0229/019/019.zip
张五常作品集 http://www.oklink.net/a/0011/1113/zhangwuchang/zhangwuchang.zip
哲学的改造 http://www.oklink.net/a/0011/1101/zxdg/zxdg.zip
论人的天性 http://www.oklink.net/a/0010/1020/lrdt/lrdt.zip
未来形而上学导论 http://www.oklink.net/a/0011/1101/wlxe/wlxe.zip
纯粹理性批判 http://www.oklink.net/a/0011/1101/sclx/sclx.zip
新教伦理与资本主义精神 http://www.oklink.net/a/0011/1113/xjll/xjll.zip
文明的冲突与世界秩序的重建 http://www.oklink.net/a/0106/0613/wmdc/wmdc.zip
东史郎日记 http://member.netease.com/~miranda/downld/a0200/0158/ddiary-gb.exe
廊桥遗梦 http://rainmark.3322.net/title/dream.zip
马立诚、凌志军:交锋 http://www.oklink.net/zzjj/0229/jf/jf.zip
《第三条道路》安东尼·吉登斯 http://www.oklink.net/a/0011/1113/dstd/dstd.zip
小逻辑/黑格尔 http://www.tanqiu.net/download/hgexll.zip
StarWar(星球大战) http://www.oklink.net/00/0221/star/star.zip
韩德强:碰撞 http://read.cnread.net/jjzp/h/handeqiang/pz/pz.zip
经济发展理论 http://time.dufe.edu.cn/xsshuku/jjfzll.zip
法律与资本主义 http://www.oklink.net/a/0008/0819/flyz/flyz.zip
中国的门文化 http://www.oklink.net/a/0106/0613/zgdm/zgdm.zip
血沃朝鲜 http://huabao.topcool.net/star/xwcx.exe
关于二战 http://huabao.topcool.net/star/ww2.exe
人的条件 http://www.bookbar.net/zjzx/rdtj/rdtj.zip
生命问题 http://www.bookbar.net/zjzx/smwt/smwt.zip



最后要把foxmail收到的邮件导入outlook,发现outlook不能直接导入.eml文件,只好先把foxmail导出来的.eml文件从资源管理器拖到outlook express中,然后再用outlook导入outlook express的邮件。还好,foxmail可以批量导出邮件(选中所有邮件,然后选择导出),outlook express支持拖放,要不然可就麻烦了!