代码改变世界

随笔档案-2012年5月28日

shell每日一句(3)

2012-05-28 20:46 by myjava2, 276 阅读, 收藏,
摘要: 5月28号 晚上8点:文件格式如下:123abc456456def123567abc789789def567要求输出:456ABC123123DEF456789ABC567567DEF789初看上去知道这里需要用到大小写字母转化,还有数字位置转换等:[root@fsailing1 shell]# sed 'y/abcdef/ABCDEF/' chen1.txt 123ABC456 456DEF123 567ABC789 789DEF567 [root@fsailing1 shell]# sed -r 's/([1-9]{3})([a-f]{3})([1-9]{3})/\ 阅读全文

Struts2与Struts1.x的深度比较

2012-05-28 17:43 by myjava2, 213 阅读, 收藏,
摘要: 转自:http://tech.it168.com/oldarticle/2007-07-13/200707131009859_4.shtmlStruts2和Struts1.x的全面比较特性Struts1.xStruts2Action类Struts1.x要求Action类要扩展自一个抽象基类。Struts1.x的一个共有的问题是面向抽象类编程而不是面向接口编程。Struts2的Action类实现了一个Action接口,连同其他接口一起来实现可选择和自定义的服务。Struts2提供一个名叫ActionSupport的基类来实现一般使用的接口。当然,Action接口不是必须的。任何使用execute 阅读全文

Comparing Struts 1 and 2

2012-05-28 17:39 by myjava2, 142 阅读, 收藏,
摘要: Comparing Struts 1 and 2Edit PageBrowse SpaceAdd PageAdd NewsFeatureStruts 1Struts 2Action classesStruts 1 requires Action classes to extend an abstract base class. Acommon(常规,普遍) problem in Struts 1 isprogramming(设计) to abstract classes instead of interfaces.An Struts 2 Actionmayimplement anActioni 阅读全文