LittleCloud's Java World

Live and learn.
posts - 18, comments - 29, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

2008年3月4日



谢朓《王孙游》赏析

绿草蔓如丝①,杂树红英发②。无论君不归③,君归芳已歇④。 


  


想要下载直接在地址栏输入:http://www.blogjava.net/Files/ash011/wangsunyou.mp3


    【注释】①蔓:蔓延。 ②英:花。这两句是说地上长满了如丝的绿草,树上开满了各样的红花,已是暮春时节了。 ③无论:莫说。 ④歇:尽。这两句是说莫说你不回来,即使回来,春天也过去了。

    【赏析】
  这是一首乐府诗,《乐府诗集》收入“杂曲歌辞”一类。魏晋以来,文人创作乐府诗往往有一个特点:总是围绕着“古辞”(汉乐府)打转转,或拟古辞,或以古辞为引子生发开去(当然也有弃古辞于不顾而自铸伟辞的)。这种从古辞中寻找“母题”使创作上有所依傍的作法,已形成一个程式。南朝诗人写乐府诗虽然也依这一程式,但却出现另一种倾向,他们有时撇开汉乐府古辞,而直接上溯到《楚辞》中去寻找“母题”。比如,南齐王融和萧梁费昶都写过一首《思公子》,中心题旨就是采自《楚辞·九歌》:“风飒飒兮木萧萧,思公子兮徒离忧。”谢朓的这首诗也属于这种情况,其“母题”出于《楚辞·招隐士》:“王孙游兮不归,春草生兮萋萋。”也就是说,诗人的创作灵感获自《楚辞》,而所写内容则完全是现实生活中的感受。在古老的“母题”之中,贯注了活生生的现实内容。
  蔓,蔓延;红英,即红花。春天,绿草如丝,葱葱茸茸,蔓延大地,绘写出一派绿的世界;各种各样的树上,红花竞放,绚丽夺目。绿的氛围,红的点染,在鲜明的对比之中,烘托出一派生机勃勃的景象。窈窕少女,目睹此景,心伤离情,不禁怦然心动,情思缱绻,不无惆怅地发出了感叹:“无论君不归,君归芳已歇。”且不要说心上的人儿不回来,即使等到他回来,那绚丽的花朵早已凋谢了,那大好春光早已白白地流逝了,我那美妙的年华也早巳悄然飘去了。红颜难久持啊!这里,诗人不主要写少女如何急切地等待着情人,如何急不可耐,而是着重写她对于红花的珍惜,对于大好春色的留恋,由此描写出她思君、恋君的春一般的情愫。如此写来,就把主人公的心态从一般的少女怀春,从感情的倾诉和渲泄,升华到了一种对春的珍惜、对时的留恋的理性高度,渗透出一种强烈的时间意识和生命意识。这样,从景的描绘,到情的抒发,再到理性的升华,三者水乳交融般地融汇在一起了。所以,这是一首充满了生命意识的景、情、理俱佳的好诗。
  诗虽短小,艺术风格却颇具特色,体现了齐梁间诗歌创作雅俗结合的一种倾向。首先,从《楚辞》中生发出来的母题,显而易见带有文人的雅、艳色彩,暗示了它与文人文学的关系;但诗人却用南朝乐府民歌五言四句的诗歌形式,来表现这一古老“母题”,这便将原有华贵、雍雅的色彩悄悄褪去,淡化,使之在语言风格上呈现出清思婉转,风情摇曳的特色。其次,诗写春的景色逗引起春的情思,因景而生情,情景相生,短章逸韵,风姿绰约,这原是南朝乐府民歌的本色,是“俗”。然而在描写笔法上却颇具匠心,诗人在绿的氛围中缀以红花的点染,巧笔对比,着意渲染,流露出文人精心构制的痕迹,表现出“雅”。雅俗结合,创为佳构。另外,诗的用韵也值得一提。诗用仄韵,短促,急切,对表现出主人公惜春、惜时的时不我待的急切心情,起到很好的作用,呈现出语浅意深、韵短情长的艺术风貌。



我本人很喜欢,听了心里很平静的感觉~

posted @ 2008-07-09 12:56 walkingpig 阅读(3198) | 评论 (7)编辑 收藏



Listen:/Files/ash011/struts2.rar

Since arriving on the scene in 2000, Apache Struts has enjoyed a very successful run, by most any standard, helping to build many, if not most, of the Java-based web applications deployed today. Its history tells of how Struts provided a solid framework to organize the mess of JSP and Servlets to make developing applications, which used mostly server-generated HTML with a touch Javascript for client-side validation, easier to develop and maintain. As time moved forward, and customer demands of web applications grew and grew, Struts 1 pretty much stayed the same, leaving more and more plumbing to the web developer.

At JavaOne 2005, several of the Struts developers (Martin Cooper, Don Brown) sat down with Rich Feit (Apache Beehive) and a few Struts users to discuss the future of Struts. We came up with the Struts Ti proposal, which described a framework that brought together a lot of good things that were developing in the web framework community. The problem is that the Struts 1 code base didn’t lend itself to drastic improvements, and its feature set was rather limited, particularly lacking in features such as Ajax, rapid development, and extensibility.

At the same JavaOne, I sat down with Jason Carreira of the OpenSymphony WebWork 2 project to discuss how we could better work together. I was interested in building on XWork, the core of their command pattern implementation, but he suggested building on WebWork 2 directly. As Rich and I worked on the first few versions of Struts Ti, we decided to take Jason’s advice. We thought it was time for a framework to address higher level application needs, and by building on the proven WebWork 2 framework, we could spend our precious spare time where we felt it would make a difference. From then on, Rich and I worked mostly with Patrick Lightbody, also a core WebWork 2 developer, and found ourselves constantly “stealing” each others ideas for our respective code bases.

Around this time, Patrick and Keith Donald of the Spring WebFlow project were kicking around an idea of a web framework to bind them all, Clarity. Clarity brought together Spring WebFlow (Keith), Struts (Ted Husted and myself), WebWork (Patrick and Jason), and Beehive (Rich) to talk about the possibility of combining efforts into one framework. Unfortunately, the devil is in the details as soon as Beehive and WebFlow were unable to make progress on merging their wizard/conversion scope features, and questions about project ownership, brand, and identity soon broke up the party.

Not wanting to lose momentum, Ted and I started discussions with Patrick and Jason on how we could better work together, and after Patrick casually suggested the idea of a merger, Ted jumped on it and the Struts/WebWork merger was born. Since Struts Ti was already based on WebWork, it wasn’t that far a leap to bring the WebWork code into the Struts project. We started the Apache Incubator process for WebWork 2 in January and graduated the WebWork 2 code, developers, and community to Apache Struts that May.

At that time, Struts was struggling with the project’s core identity, whether it was an umbrella for multiple web frameworks or not. We had Apache Shale, a web framework based off JSF, as a Struts subproject, along side Struts Action 1 (now called Struts 1) and Struts Action 2 (the graduated WebWork 2 code). Unfortunately, these subprojects were confusion to the developer and user community, accustomed to the name “Struts” referring to a single framework. After an attempt to unify the Struts Action 2 and Shale subprojects into a single Struts 2 framework, the Shale developers felt it would be better if they were their own top level project (TLP) where they are today. Struts Action 2 was soon after renamed to simply Struts 2.

Today, the Apache Struts project has two major versions of its framework, but it is one action-based framework project. WebWork continues to deliver patch releases, and will certainly continue to do so until Struts 2 goes GA or final, but all new development takes place on the Struts 2 code. For those looking for drama or a controversy in the Struts/WebWork merger story, you’ll have to look elsewhere. Both groups of developers are working happily towards a Struts 2.0 GA release, trying to combine the stability and accessibility of Struts 1 with the elegant architecture of WebWork 2. Since the initial incubation, the Struts 2 code has added major features including a plugin framework, a new API, and better Ajax tags, and as promised in the Struts Ti proposal, we won’t stop there.

I decided to write this down to help clear up where this Struts 2.0 project came from and why it includes WebWork 2 code. Mergers are tricky things and it seems even in the Open Source community, one that champions collaboration, a merger between two projects is a rarity and needs to be defended. Amusing, because you’d be hard pressed to find a Java web developer that felt there are too few web frameworks. I think the WebWork and Struts communities pulled off something special in Struts 2, and hope the merger fever catches on in the Open Source world.

posted @ 2008-06-26 10:40 walkingpig 阅读(439) | 评论 (0)编辑 收藏

偶也是第一次配这东西,参考了许多网友的帖子,可半路上出现了很多报错,郁闷得死,

这里我把我自己最后成功的笔记分享给大家.

 

CVS服务器的安装:

1. 查看你的操作系统上是否安装了CVS
#> rpm -qa|grep cvs

guile-1.8.0-8.20060831cvs

cvs-1.11.22-4

2. 建立cvs用户组:

/usr/sbin/groupadd cvs

3         建立cvs组的cvsroot用户和所属的目录:
#> /usr/sbin/useradd -g cvs -G cvs –d /cvsroot cvsroot

4         cvsroot用户添加密码:
#> passwd cvsroot

      密码:cvsroot123456

5         改变 /cvsroot/ 的目录属性:
#> chmod –R 770 /cvsroot


6
改变用户登陆身份:
#> su cvsroot

开始创建单个项目:
#> cd /cvsroot
#> mkdir configuration
#>mkdir psgui

#>mkdir davinci


开始建立仓库:
#> cvs –d /cvsroot/configuration init
#> cvs –d /cvsroot/psgui init

#> cvs –d /cvsroot/davinci init
#> chmod -R 770 ./configuration/ ./psgui/ ./davinci/

9建立CVS服务启动文件,我们使用xinetd方式:
#> [Crtl]+[d]
切换到root用户身份
#> cd /etc/xinetd.d
#> vi cvspserver

service cvspserver

{

        disable = no

        flags = REUSE

        socket_type = stream

        wait = no

        user = root

        server = /usr/bin/cvs

        server_args = -f --allow-root=/cvsroot/configuration --allow-root=/cvsroot/psgui --allow-root=/cvsroot/davinci pserver

        log_on_failure += USERID

}

注:由于xinetdserver_args长度限制,当你想运行很多的单个仓库的时候,可以这么做:

10 加入cvs服务:
#>vi /etc/services

cvspserver 2401/tcp #pserver cvs service
cvspserver 2401/udp #pserver cvs service

已经存在了,如下:(没有添加了)

cvspserver      2401/tcp                        # CVS client/server operations

cvspserver      2401/udp                        # CVS client/server operations

11 启动cvs服务:
#> /etc/init.d/xinetd restart

12 检查cvspserver服务是否已经启动:
#> netstat -l |grep cvspserver
应该有如下结果:
tcp 0 0 *:cvspserver *:* LISTEN

已经有上面的显示结果

CVS服务的用户管理:

上面我们已经建立了configurationpsguidavinci三个CVS仓库,下面我们分别给这三个仓库建立cvs用户。

13创建可以登陆cvs服务器的用户名和密码:

#> su cvsroot
#> vi /cvsroot/configuration/CVSROOT/passwd
yujiabo:*****:cvsroot

#>vi /cvsroot/psgui/CVSROOT/passwd

lianghuoyan:*****:cvsroot
yujiabo:*****:cvsroot

这两个文件的意思是有yujiabolianghuoyan两个cvs用户,lianghuoyan拥有psgui的使用权限,yujiabo拥有configurationpsgui的使用权限,登陆后的权限是cvsroot权限。
注意:这里的cvs用户和系统用户是不同的。


14 *****
为密码,由以下文件生成:

#> vi /cvsroot/passwd.pl

#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift;
my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}
";
#>chmod a+x /cvsroot/passwd.pl


15
如果你想生成一个密码是“123456”,则:
#> /cvsroot/passwd.pl “123456”
回车即可得到加密密码,用其替换passwd文件中的*****


16 Ok
cvs现在已经全部安装完成了,如果你想让一个用户拥有psgi的权限,你就在/cvsroot/psgui/CVSROOT/passwd中给他加入一个用户;如果你想让一个用户同时具有psguidavinci的权限,你就给/cvsroot/psgui/CVSROOT/passwd/cvsroot/davinci/CVSROOT/passwd里给他加一个用户名和密码相同的用户即可。最后,我们试用一下:
#> cvs -d :pserver:yujiabo@168.68.73.122:/cvsroot/psgui login


敲入命令回车后提示输入yujiabo的密码,你按照自己设置的密码输入,如果没有什么错误信息出现就是成功了(我的机器IP地址是168.68.73.122)

客户端测试:

ash用户登陆168.68.73.123

运行#

cvs -d :pserver:yujiabo@168.68.73.122:/cvsroot/configuration login

123456(输入的密码)

出现错误:2401 failed: No route to host

客户端连接不上,放开服务器防火墙2401端口,方法如下:

168.68.73.122root登陆后,运行#system-config-securitylevel

选择“定制”,其它端口处输入:2401,然后“确定”设置。

现在客户端可以连接了。

Windows下的客户端软件WinCvs1.3配置如下:
CVSROOT
认证方式:pserver
路径:/cvsroot/configuration
用户名:yujiabo
CVSROOT:yujiabo@168.68.73.122:/cvsroot/configuration

posted @ 2008-04-17 16:38 walkingpig 阅读(1819) | 评论 (2)编辑 收藏

安装好TestLink 和Mantis后,所有配置好以后,发现测试相关的BUG标题中文是乱码,网上找了若干文章没有解决,自己摸索出一下方法。

Mantis版本: 1.1.0(RC2)
TestLink版本:1.7.1
PHP版本:5.2.5
MySQL版本:5.0.22

需要修改TestLink的文件:lib\bugtracking\int_mantis.php

 function getBugSummaryString($id)
 {
  if (!$this->isConnected())
   return false;
  
  //$this->m_dbConnection->aaa();
  $this->m_dbConnection->exec_query("set names 'GB2312'");  //<-新增加的
  
  $status = null;
  // 20070302 - {$this->m_dbName}.mantis_bug_table -> mantis_bug_table
  // Problems with MS-SQL
  $query = "Select summary FROM mantis_bug_table Where id='" . $id."'";
  
  $result = $this->m_dbConnection->exec_query($query);
  if ($result)
  {
   $summary = $this->m_dbConnection->fetch_array($result);

   // 20070302 - BUGID - on MS-SQL fetch_array() does not returns numeric indexes, then
   //                    only choice is accessing my field name (IMHO better)
   if ($summary)
    $summary = iconv("GB2312",TL_TPL_CHARSET,$summary['summary']);//<-修改的
   else
    $summary = null;
  }
  return $summary;
 }



源文出自:http://www.joyblog.cn/article.asp?id=463

posted @ 2008-04-15 16:18 walkingpig 阅读(921) | 评论 (1)编辑 收藏

TestLink中集成Mantis bug 管理系统

相信大家在选择测试管理工具的时候,除了Free这个重要因素之外,是否也想让其功能更全呢?如果功能不够全,那么就想着是否能集成其他系统的功能进而完善呢?下面要说的就是一个集成功能的运用,希望对大家有帮助。

简述

在TestLink和bug 管理系统集成必须具备以下特点:
1.       在TestLink和bug 管理系统之间所有的信息交流都是在数据库中完成。
2.       TestLink(现在版本)既不能发信息给bug 管理系统,也不能从bug 管理系统接收信息,只是单纯的调用。
在配置完成之后运行,TestLink用户的使用步骤如下:
1.       当执行某个测试失败。
2.       用户点击链接打开bug 管理系统,将issue提交。
3.       当issue提交完毕之后,用户必须将bug 管理系统的issue ID记录到TestLink。
4.       用户返回到TestLink的测试执行页面,将issue ID记录到Bug问题的地方。
5.       在用户保存执行结果之后,Testlink将显示从Bug 管理系统获取的数据。

环境要求示例:
l       TestLink和Mantis安装在同一台服务器上
l       Mantis的链接:http://168.68.73.29/mantis/
l       TestLink的链接:http://168.68.73.29/TestLink/
l       Mantis数据库名字:mantis
l       Mysql登录名字:mantis_user
l       登录密码:Mantis_passwd
第一步:编辑config.inc.php
找到$g_interface_bugs='NO';
改成$g_interface_bugs='MANTIS';

第二步:在mantis上设置匿名登录权限
l       匿名登录的设置需要打开。
l       Mantis的匿名用户具备对所有的项目都可以浏览的权限。
Change the following in your mantis config_inc.php (replace dummy with your created user)
# --- anonymous login -----------
# Allow anonymous login
$g_allow_anonymous_login = ON;
$g_anonymous_account = 'dummy';

注:这个dummy用户需要administrator在后台添加,注册不了的

第三步:在TestLink里配置mantis的界面参数。
你必须编辑TL_ABS_PATH/cfg/mantis.cfg.php,如下所示:
/** The DB host to use when connecting to the mantis db */
define('BUG_TRACK_DB_HOST', 'localhost');

/** The name of the database that contains the mantis tables */
define('BUG_TRACK_DB_NAME', 'manti');

/** The DB type being used by mantis
values: mysql,mssql,postgres
*/
define('BUG_TRACK_DB_TYPE', 'mysql');

/** The DB type being used by mantis */
define('BUG_TRACK_DB_USER', 'mantis_user');

/** The DB password to use for connecting to the mantis db */
define('BUG_TRACK_DB_PASS', 'mantis_passwd');

/** link to the bugtracking system, for viewing bugs */
define('BUG_TRACK_HREF', "http://168.68.73.29/mantis/view.php?id=");

/** link to the bugtracking system, for entering new bugs */
define('BUG_TRACK_ENTER_BUG_HREF'," http://168.68.73.29/mantis/");


测试配置:
首先在TestLink里面执行一条测试用例,执行之后,如果发现问题,则点击“Create New Bug”,则打开mantis页面,将发现的问题报告至mantis上,报告成功之后,回到TestLink,将Issue ID填写到“Bug/Problem Report”的文本框里,然后点击“Save Result”,这样,Testlink就能把Mantis上的issue数据显示在执行测试用例页面下方了。

此外,你还可以TestLink的bug报表功能,点击“Total Bugs For Each Test Case”,则在右边的页面里显示该项目所有测试用例下的bug列表。

posted @ 2008-04-15 15:27 walkingpig 阅读(2353) | 评论 (0)编辑 收藏

     摘要:   <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@...  阅读全文

posted @ 2008-04-11 18:41 walkingpig 阅读(2260) | 评论 (0)编辑 收藏

可惜不是java 写的,用的php
在本机装好两天了,
今天一天都在用这个系统,
可是发现里面的用户权限有些乱.
搞不清楚项目经理应该分配什么权限,
项目组员分什么权限,
项目总经理应该是什么权限来的,

中文资料也很少,在opensorce里找到英文手册看不懂,
有个中文手册讲得不清不楚的~~~晕
看样子要自己慢慢摸索了

posted @ 2008-04-08 15:34 walkingpig 阅读(1683) | 评论 (3)编辑 收藏

去年8月份做的"房地产案件管理系统"
到现在为止,客户那边已经上线,
这两天客户反映的问题比较多,
由此,对这个项目有些感慨,现在记录下来,


以便往后借鉴:

1 需求不稳定,从一开始,需求就没有完全确定过,直到现在,需求还在增加或变动。
感觉现在整个系统就像在打补丁,客户那这突然想起哪里缺了什么,就要补什么,
不会顾及系统架构,这样子多多少少会破坏之前搭建好的系统架构.

2 我自己犯的错,在实施过程中,发现某些需求有歧义,但未反馈给客户确认,
自己下了结论,按自己的想法做,结果并不是客户的意思.

3 这个是最烦人的,整个系统代码一个月多一点就全部完成,但那时一直打电话要求客户那边协助测试,
因为客户的业务很复杂,也有很多特例,系统哪里有问题,只要他们自己一用就会发现的,可那时客户那边
没有专门负责这方面的人,一直都拖着,直到现在他们没有怎么测试,就上线,发现问题较多。

posted @ 2008-03-18 15:40 walkingpig 阅读(1223) | 评论 (3)编辑 收藏

要导入的需求xml文件requirement.xml内容如下:

<?xml version="1.0" encoding="gb2312"?>
<requirements>
    
<requirement>
    
<docid><![CDATA[需求001]]></docid>
    
<title><![CDATA[需求001标题]]></title>
    
<discription><![CDATA[需求001的描述]]></discription>
    
</requirement>
    
        
<requirement>
    
<docid><![CDATA[需求002]]></docid>
    
<title><![CDATA[需求002标题]]></title>
    
<discription><![CDATA[需求002的描述]]></discription>
    
</requirement>
    
        
<requirement>
    
<docid><![CDATA[需求003]></docid>
    <title><![CDATA[需求003标题
]]></title>

    
<discription><![CDATA[需求003的描述]]></discription>
    
</requirement>
  
</requirements>
但不知道什么原因,我导入时总是报错:
"please check the file format,seems is not possible get any requirement"
这是为何,请有经验的朋友帮我解答一下下,呵呵

posted @ 2008-03-04 16:19 walkingpig 阅读(733) | 评论 (2)编辑 收藏