学习日记走入绝境了吗

学习日记的起源是我的初学之作,当然谈不上技术份量,初学者真的看了还有误人子弟之嫌疑。

而且,作为一个JAVA业余爱好者,自己要学成有独特技术见解,并能重新开发学习日记的可能性很难,正如一位长者所说,你一个业余者都能写出来,那别人科班的博士、硕士是做什么的?此话不假呀。

本人很穷,想靠这点业余爱好找点钱补贴家用的目的从来就有。原来是想大家一起交流,可以把技术学好点,或者以开源模式的发展方式和参与者一起挣点钱。但是前者用不着独自来建一个网站,建一个网站并不是技术就能建好的,太多技术之外的东西需要涉及,如果想真的学技术的话,应该不要把精力放在这些上,专心去学技术;而且,想靠一个人的力量来撑起一个社区性质的网站,现在想来是几乎不可能的;而且,我的性格也决定了自己不大善于与人合作,喜欢接受任务,独自做事,而不是去组织别人一起来做事。我觉得麻烦。所以,我觉得自己不适合把学习日记做下去了。还有,我的性格和心理素质也不行,波动太大,受不得措责,碰到一点难事就心事重重,又很容易因为一个头脑发热的想法去埋头做一件事,做完一看效果-又错了。

所以,分析自己的实际情况和学习日记的现状,我可以在技术上把程序设计作为一项技能深入下去,但是不适合自己去运作一个网站。也没有必要去因为想挣钱而去做一个个人网站,像vbird.org,别人是高层次人才,发表的见解当然不同凡响。由他运作的个人网站当然人气很旺。我最好是去申请一个博客,可以记点日记自己用。而不是自己去建一个网站来写日记。一句话,没必要。

学习日记现在也许真该像我的那位长辈说的那样,放弃;也会像一位朋友预言的那样:迟早关闭。

虽然我为运作这个网站,把本应该陪家人的时间和本应该学技术的时间,甚至本应该做好本职工作的时间都浪费了太多在这上面,但是客观的规律不容违背;不要做那种“不见棺材不掉泪”、“不撞南墙头不回”的人。我已经浪费了几年时间,我不能再去浪费几年时间。

实际上,按那位长辈的建议,我根本就不应该在计算机上下太多的功夫。因为这在工作中用不上,学这个,还不如学打字,每分钟多打几个字,要是以后上不成班了还可以开个打字复印店;学程序做什么?谁用你的小儿科程序?各单位的信息化软件都是上级发放的,那些都是别个大公司做的。

上面的话虽丑,理却端。平时我的计算机知识主要是用来帮朋友、同事解决电脑故障而已。

也许,我7年前决定自考计算机,为自己多学一门技术,以防不时之需的决定根本就是错的?从头就是错的,如果真是这样,7年呀,人生还有几个7年呀?!真是失败的人生呀。。。

学习日记也许要关了,这是很可能的事。也许,关了以后,我会发觉,又错了。。。

也许我应该学习设计模式了

接触JAVA也有3年了吧,到现在还没有去看一看J2EE设计模式,别说J2EE设计模式,就是模式也没看,Bruce先生写了一本Thinking in Patterns(他也是经典的Thinking in java的作者),一直想看看,也没有时间去看。

今天早上,醒来睡不着了,在网上浏览看了一篇讲ebay的系统中如何借助了J2EE设计模式的好处,觉得自己真该去掌握一下。有机会,有时间的话,可以把这些设计模式看看。

一天十亿次的访问-eBay架构(原文地,不过其中的构架描述没有图片)

1、http://blog.csdn.net/yzhz/archive/2005/01/10/247116.aspx

2、http://blog.csdn.net/yzhz/archive/2005/01/10/247127.aspx

3、http://blog.csdn.net/yzhz/archive/2005/01/10/247133.aspx

4、http://blog.csdn.net/yzhz/archive/2005/01/10/247140.aspx

转载地(构架描述有图片)

http://www.zahui.com/html/6/41654.htm

jsp页面变量的作用域问题

一个jsp页面就是一个java类,它的变量也跟java类一样,有不同的作用域。用下面的实例说明一下。

下面是把“学习日记开源项目”里面的一个名为disall2.jsp的文件在“JAVA学习日记网站”改写的一个片断,我的目的是在一个循环语句的第一个循环中显示广告,后面的循环不显示。用彩色部分的变量来控制。下面是正确的使用方法。




  <% int count = 0; %>



   <logic:iterate id="aGroupGoals" name="groupGoalsList" type="com.learndiary.website.model.GroupGoalsInfo">

    <c:set var="group" value="${aGroupGoals.group}"/>

    <b><u><c:out value="${group.groupName}"/>(<c:out value="${group.goalsNum}"/>个目标)</u></b>

    <c:set var="goalsList" value="${aGroupGoals.goalsList}"/>

    <br>

  <logic:iterate id="aGoal" name="goalsList" type="com.learndiary.website.model.ArticleInfo">

    <html-el:link action="disGoalContentAction.do?goalID=${aGoal.articleID}&naviStr=${requestScope['naviStr']}" target="_blank" title="查看既定目标:${aGoal.articleName}的具体内容" >

     <c:if test="${aGoal.visibility == 1}">

      <font color="red">[私]</font>

     </c:if>

     <c:if test="${aGoal.joinNum >= 5 && aGoal.joinNum<10}">

      <font size="3">

     </c:if>

     <c:if test="${aGoal.joinNum >= 10}">

      <font size="4">

     </c:if>

     <c:out value="${aGoal.articleName}"/>

    </html-el:link>

    (<c:out value="${aGoal.joinNum}"/>/<html-el:link action="diaryAction.do?goalID=${aGoal.articleID}&naviStr=${requestScope['naviStr']}" target="_blank" title="查看实现目标:${aGoal.articleName}下的所有${aGoal.diarySize}篇日记" >

     <b><u> <c:out value="${aGoal.diarySize}"/> </u></b>

     </html-el:link>)

     </font>

      

   </logic:iterate>

   <p align=center>



   <% if (++count == 1) { %>

   <%@ include file="/common/google_intro_4.jsp" %>

   <% }

    %> 



   <hr size="1" noshade="noshade">

    <p>

  </logic:iterate>

但是,如果把蓝色的部分改动一点,只要你第二次刷新页面的时候,广告就消失了。如下:




  <%! int count = 0; %>


原因是:前者是类方法中的局部变量,作用域局限于java类中的一个方法中,即点击一次页面就重新调用类中的方法,于是,它的记数器总能正确的清零;而后者是类成员变量,作用域为类,在类的当前实例(你访问jsp页面时,这个类在服务器端机器的内存中为你一个人创建的一个对象实例)没有销毁之前,它里面的变量始终是一个,当你刷新页面时,记数器就递增了,不能正确的清零。

我是一个java的业余爱好者,理论基础不行。上面的说法如果不当,还希望见者提示一下。谢谢。

Redhat linux9.0下的宋体比windows下的宋体显示小字体效果好

在网页中我使用了<font size="-2">的字体(及<font size="1">),在Redhat linux9.0下的用中意宋体在firefox下浏览效果还可以,但是同样用firefox在windows XP中浏览页面就惨不忍睹了,用IE也一样。为了照顾大多数windows用户,看来,只有不用这种小字体了。下面是首页在windows下用firefox和在linux下的显示截屏。

1、windows xp下用Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,宋体字:

2、Redhat linux9.0下的用Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,中意宋体字:

大家一直都说linux下的中文字体不如windows下的,可我在redhat linux9.0下的使用结果得出的结论却是相反的。但是redhat linux9.0下的字体相对windows也有一点小问题,字体的稍稍有点发虚,不如windows下的清晰。但总体感觉还是比windows下的字体看起来舒服。

一封来自Gentleware的CEO的信

Gentleware的Poseidon for UML建模工具起源于开源UML建模工具:ArgoUML0.9。现在的Gentleware公司的CEO就是ArgoUML的项目拥有者之一:Marko Boger。你可以在ArgoUML的主页上看到。

从下面这封信中,我感到了起源于开源软件的商业软件的强大活力(他也提供共享版本,不过功能很受限,可以作为学习之用);反之,看他的开源前辈ArgoUML,可以说是鲜有使用者,也许在我不了解其中具体情况下下一个不成熟的结论:半死不活。

这是为什么?难道ArgoUML终究不能成为一个像其他开源工具如:ant、eclispe、Tomcat、Linux等一样的流行工具?难道说ArgoUML的存在就是因为有了它的商业分支版本"Poseidon for UML"? 难道ArgoUML就是”认知建模“的一个试验品(它的认知建模好像是可以智能的分析模型的合理程度,还可以根据知识库纠正一些问题或提出建议)?在我用来,它的认知建模好像没有多大用处(起源于它的Poseidon for UML就去掉了这个特性)。搞不懂,不过对我这个UML的学习者来说,用ArgoUML来画画图,理理思路还是够用了。

从下面这封订阅来自Poseidon for UML的信中可以大概知道:

1、它要发集成在eclipse中的Apollo for Eclipse建模插件了;

2、对于发行采用基于Web Service模型的新许可形式了,购买、延续、改变许可将更加自动化;

3、Apollo for Eclipse和 Poseidon for UML同时存在,定位不同,且都有供学习用的共享版本。

下面是这封电子邮件的原文,可以以此来看软件业的趋势、开源软件的命运和运作,以及这些给普通软件用户带来的影响。

××××××××××××××××××××××××××××××××××××××××××××××××××

A Letter to You: From Gentleware's CEO

Dear Loyal Poseidon User,

With this letter, I'd like to inform you about a series of major events and changes that will be occurring in the next few months. Please bear with me; I am certain that you will find this message to be worthwhile reading. You are part of the cherished user base that Gentleware has built up over the past 6 years. As such, you are one of the first to be informed.

We are proud and honored to have such a large and loyal audience, and we have been working extremely hard to fulfill your expectations. Our user community has grown so much that the range of users now extends beyond the scope of our previous tool lineup, and the range of expectations has correspondingly grown. Many users, especially those working in the later development phases who want to review and modify models and code simultaneously, expressed the need for a tight integration into Eclipse. Poseidon for UML is built on Swing while Eclipse is built in SWT, so an integration can only go so far. For a clean integration we had to start from scratch. And so we did.

   

   

Apollo for Eclipse

We are pleased to present our newest tool, Apollo for Eclipse, which will be released in the coming weeks.

Built from the ground up as an extension to Eclipse, Apollo for Eclipse makes use of all of the relevant modules from the Eclipse Modeling Project. Most notably, it uses EMF (Eclipse Modeling Framework) and its instantiation for UML, the UML2 project, as a repository. This provides a standard API and saving format and makes it easy to connect other tools like generators or transformation engines to it.

It is our understanding that this is the first professional modeling tool built using GMF. GMF is a framework to create graphical editors in Eclipse and was released just this summer. We regard it as the best technology available to build modeling tools. It provides a standardized yet adaptable user interface that is well adapted to Eclipse, and it provides us with great flexibility to quickly create editors for standard or domain specific notations.

With the initial release of Apollo for Eclipse, we have focused specifically on the class diagram and a clean, robust, and scalable roundtrip mechanism for Java 5 and UML 2.1. More details will be forthcoming in the next newsletter.

   

   

Poseidon for UML

This isn't to say that Poseidon for UML is going away. Poseidon for UML continues to be the best option on the market for analysts and designers who don't work as extensively with Eclipse. In just a short while, we will be bringing out version 5.0 of Poseidon for UML. As with every release, it has a number of important and interesting updates. But I have to say that this release is really special to me. I feel that after 6 years of development we have now reached what we initially started our quest for: namely, to provide the most usable UML modeling tool available. We will provide you with the specific details of the release in a separate newsletter.

   

   

New Licensing Based on the Web Service Model

The software industry is fast paced and changes quickly. With the ubiquity of the internet and with flexible download and update mechanisms provided by the Eclipse platform, software products today have much of the character of a web service. In response, we have adapted our pricing model to reflect this. We have worked hard to find a model that suits the wide variety of our users, from students with minimal budgets, to occasional users with high demands, and on to large corporations with long-term usage scenarios.

We are introducing a rental and subscription model for our new product, which may be familiar to you from other Internet services. Base functionality of the tool is available for free; extended functionality including all exporting capabilities requires a license.

This rental and subscription license model will apply to the Apollo for Eclipse product. Likewise, we will implement it for the Poseidon for UML Community Edition starting with the release of version 5.0. This solution eliminates the conflicts many users have had with our current license terms, which restricts how the Community Edition may be used through the stated condition, "free for non-commercial use".

The Community Edition was originally intended to be a learning tool for those just starting out in UML. It has become an important tool for analysts and designers who depend on Poseidon for UML to communicate with various stakeholders throughout the development lifecycle. The new licensing agreement now allows these users to take advantage of the many powerful features of Poseidon for UML for the nominal charge of only 5 Euros per month.

The unregistered version of the Poseidon for UML Community Edition can still be used for learning UML; all of the features needed to work alongside a textbook or tutorial remain available. Users can open and edit models to explore code and diagrams, but all export features such as saving, copying to the Windows clipboard, and printing are only available in the registered version.

   

   

Options

The first option is to rent a license for a fixed period of time; specifically, for a month, a quarter, or a year. The fee for one month is 5 EUR or 6 USD, longer periods are further discounted. You always maintain the option, but are not obligated, to renew the license after it expires.

The alternative option is to subscribe to the service and thus be assured of continuous access to the most current version. Updates and registration are automatically conducted as soon as you are online. You can decide on the automatically-renewing payment periods that best suit your needs, again with the choices of a month, a quarter, or a year. You can cancel the subscription easily and transparently at any time.

Students in accredited programs have the additional option to purchase the full Professional Edition at a deep discount, and site licensing for universities remains as an economical alternative. Current Community Edition users will be able to continue to operate under the old license agreement until the beginning of 2007.

   

   

Your Opportunity to Try Apollo for Eclipse

Poseidon for UML and Apollo for Eclipse address two very different types of usages. Whereas Poseidon for UML provides the full power of UML 2 during analysis and design phase, Apollo for Eclipse addresses the needs of developers and programmers. We realise that many of you indeed have both use cases, but at different times. To accomodate our users, soon we will be sending out keys for Apollo for Eclipse to premium edition Poseidon for UML customers for a limited introductory period, so that you can have full access and can immediately evaluate our new offering.

So stay tuned, there are a lot of compelling developments coming in the next few weeks. We hope that you are as excited as we are.

Best regards,

your Marko Boger

CEO, Gentleware AG

   

   

contact      impressum      privacy policy      sitemap      print version

© 2000 - 2006 Gentleware AG

If you no longer wish to receive these emails, please reply to this message with "Unsubscribe" in the subject line or simply click on the following link: Unsubscribe

Gentleware AG

Ludwigstrasse 12

20357 Hamburg

Germany

Read the VerticalResponse marketing policy.

Windows和Linux系统下面MySQL的大小写敏感性不同(含转帖)

同样的建表脚本,在windows下所有的表名都成了小写的了,在建表脚本中,本来"goalsgroup"是"goalsGroup",可是用脚本建表后就全成了小写了;在linux下用这个脚本建表则保持了表名的大小写状态。另外,列名在windows下和linux都能够区分大小写。

我的建表脚本如下:


use learndiarydb;

                                                                               

DROP TABLE IF EXISTS `goalsGroup`;

CREATE TABLE `goalsGroup` (

  `groupID` tinyint(2) unsigned NOT NULL auto_increment,

  `groupName` varchar(60) NOT NULL,

  `writeDate` datetime default NULL,

  `lastUpdate` datetime default NULL,

  `goalsNum` tinyint(2) unsigned NOT NULL default '0',

  `groupPriority` tinyint(1) unsigned NOT NULL default '0',

  PRIMARY KEY  (`groupID`)

) TYPE=InnoDB;

在windows下的表名和列名:

mysql> show tables;

+------------------------+

| Tables_in_learndiarydb |

+------------------------+

| article                |

| emailresetpsd          |

| forbid                 |

| goalsgroup             |

| user                   |

| usergoal               |

| usermailgoal           |

+------------------------+

7 rows in set (0.09 sec)

 

mysql>

mysql> describe goalsgroup;

+---------------+---------------------+------+-----+---------+----------------+

| Field         | Type                | Null | Key | Default | Extra          |

+---------------+---------------------+------+-----+---------+----------------+

| groupID       | tinyint(2) unsigned |      | PRI | NULL    | auto_increment |

| groupName     | varchar(60)         |      |     |         |                |

| writeDate     | datetime            | YES  |     | NULL    |                |

| lastUpdate    | datetime            | YES  |     | NULL    |                |

| goalsNum      | tinyint(2) unsigned |      |     | 0       |                |

| groupPriority | tinyint(1) unsigned |      |     | 0       |                |

+---------------+---------------------+------+-----+---------+----------------+

6 rows in set (0.09 sec)

 

mysql>

********************************************************************

在linux下的表名和列名:

mysql> show tables;

+------------------------+

| Tables_in_learndiarydb |

+------------------------+

| article                |

| emailresetpsd          |

| forbid                 |

| goalsGroup             |

| user                   |

| usergoal               |

| usermailgoal           |

+------------------------+

7 rows in set (0.01 sec)

 

mysql>

mysql> describe goalsGroup;

+---------------+---------------------+------+-----+---------+----------------+

| Field         | Type                | Null | Key | Default | Extra          |

+---------------+---------------------+------+-----+---------+----------------+

| groupID       | tinyint(2) unsigned |      | PRI | NULL    | auto_increment |

| groupName     | varchar(60)         |      |     |         |                |

| writeDate     | datetime            | YES  |     | NULL    |                |

| lastUpdate    | datetime            | YES  |     | NULL    |                |

| goalsNum      | tinyint(2) unsigned |      |     | 0       |                |

| groupPriority | tinyint(1) unsigned |      |     | 0       |                |

+---------------+---------------------+------+-----+---------+----------------+

6 rows in set (0.00 sec)

 

mysql>

******************************************************************

下面是网上一篇相同问题的blog,转自:http://www.zeali.net/entry/364

MySQL的大小写敏感性

zeal 2006-04-27 17:43 于 开发/理论 , 679 字 |  + 0 - 1   English

Made In Zeal 转载请保留原始链接:http://www.zeali.net/entry/364

关键字: mysql,lower_case_table_name,大小写

在 MySQL 中,数据库和表对就于那些目录下的目录和文件。因而,操作系统的敏感性决定数据库和表命名的大小写敏感。这就意味着数据库和表名在 Windows 中是大小写不敏感的,而在大多数类型的 Unix 系统中是大小写敏感的。

奇怪的是列名与列的别名在所有的情况下均是忽略大小写的,而表的别名又是区分大小写的。

要避免这个问题,你最好在定义数据库命名规则的时候就全部采用小写字母加下划线的组合,而不使用任何的大写字母。

或者也可以强制以 -O lower_case_table_names=1 参数启动 mysqld(如果使用 --defaults-file=...\my.cnf 参数来读取指定的配置文件启动 mysqld 的话,你需要在配置文件的 [mysqld] 区段下增加一行 lower_case_table_names=1)。这样MySQL 将在创建与查找时将所有的表名自动转换为小写字符(这个选项缺省地在 Windows 中为 1 ,在 Unix 中为 0。从 MySQL 4.0.2 开始,这个选项同样适用于数据库名)。

当你更改这个选项时,你必须在启动 mysqld 前首先将老的表名转换为小写字母。

换句话说,如果你希望在数据库里面创建表的时候保留大小写字符状态,则应该把这个参数置0: lower_case_table_names=1 。否则的话你会发现同样的sqldump脚本在不同的操作系统下最终导入的结果不一样(在Windows下所有的大写字符都变成小写了)。

I found a way for promoting LearnDiary and learning english

Two years past, I suddenly found may be the key of LearnDiary's lacking hot.

The key is no a specialized location for website, so no the specialized friends participate this website.

So, I am doing some changes these days, I think the work I have finished the most part.

Another found for learning english, I found a method of learning english at website: http://seawan.nyist.net/kle/index.php, it is saying, he, you can learning english well by see film. I will try it, is it a real way for me to learn english? Only the time can answer.

Happy these days!