ITeye博客

2012 年文章归档

共 23 篇文章

CentOS-5.5中文设置

我是在VM安装的。 在ISO包中找到这两个文件: fonts-chinese-3.02-12.el5.noarch.rpm fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm 一 个是中文字体,一个是字体显示包。 安装: #rpm -ivh XXXX ( XXXX 代表上面那两个包的全名, rpm 不会不知道怎么用吧?) CentOS系统安装完成后,重新启动即可。

2012-09-04 14:26 · Linux&Unix

Nagios项目参考

<1> Nagios项目中文文档 http://nagios-cn.sourceforge.net/nagios-cn/index.html <2> Nagios 安装完毕,Map部分无法显示,这个的问题是没有安装 gd gd-delev 直接安装这两个包,删除原来的Nagios安装文件,然后按照官方文档安装就会正确生成:statusmap.cgi 等cgi文件

2012-02-14 11:42 · 开源项目学习研究

25-设计模式学习总结

在学习Thinking in patterns之前,我认真学习了Thinking in Java。承前启后的学习,让我对OO有了更近一步的认识, 继承、多态等面向对象的概念,不是仅仅了解概念就OK。一些深层次的知识是需要在实际操作后才能真正明白,很多知不是简单样例讲解能够代表的,最主要的是自己在实际项目参与时,或者在平时的开源代码学习、应用中,将编程思想贯彻进去,这才是软件开发的绝妙境界! 此次学习,主要是向着拓展知识面、丰富设计内容、学习高级编程思想去的。整个过程中各种参考和引用是必不可少的,很是感叹这个学习环境,可以断言:只要你认真深入,几乎所有问题都能在这个学习环境中得到解决,很感激这…

2012-02-06 15:42 · Thinking in patterns( 阅读笔记)

24-Prototype

Prototype(原型模式):用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。 该模式允许一个对象再创建另外一个可定制的对象, 根本无需知道任何如何创建的细节 ,工作原理是:通过将一个原型对象传给那个要发动创建的对象,这个要发动创建的对象通过请求原型对象拷贝它们自己来实施创建。 由于Java提供clone()方法来实现对象的克隆,所以Prototype模式实现一下子变得很简单,具体可以查看 参考 .此外,还可以应用反射机制来实现之(教材中就是这样).

2012-02-06 14:56 · Thinking in patterns( 阅读笔记)

23-Interpreter

If the application user needs greater run time flexibility, for example to create scripts describing the desired behavior of the system, you can use the Interpreter design pattern. Here, you create and embed a language interpreter into your program. ...... 的确,Intepreter设计模式的应用比较高级,这在实际应用是重要的,但是不是普遍…

2012-02-05 14:51 · Thinking in patterns( 阅读笔记)

22-Visitor

The assumption is that you have a primary class hierarchy that is fixed; perhaps it’s from another vendor and you can’t make changes to that hierarchy. However, you’d like to add new polymorphic methods to that hierarchy, which means that normally you’d have to add something to the base class inter…

2012-02-05 11:12 · Thinking in patterns( 阅读笔记)

21-Memento

Use serialization to create an undo mechanism.这是教材中唯一一句讲解! 正如Memento(纪念物)的含义提示一样,该设计模式有记忆效果,能恢复原状态!准确来说就是: 在不破坏封装性的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态。这样以后就可将该对象恢复到原先保存的状态。 该设计模式实际应用举例是:jsp+javabean 在一系统中新增帐户时,在表单中需要填写用户名、密码、联系电话、地址等信息,如果有些字段没有填写或填写错误,当用户点击“提交”按钮时,需要在新增页 面上保存用户输入的选项,并提示出错的选项。这就是利用JavaBea…

2012-02-03 17:57 · Thinking in patterns( 阅读笔记)

20-Chain of responsibility

Chain of Responsibility might be thought of as a dynamic generalization of recursion using Strategy objects. You make a call, and each Strategy in a linked sequence tries to satisfy the call. The process ends when one of the strategies is successful or the chain ends. In recursion, one method calls…

2012-02-03 16:25 · Thinking in patterns( 阅读笔记)

19-Command: choosing the operation at run-time

A Command is a function object in its purest sense: a method that’s an object . By wrapping a method in an object, you can pass it to other methods or objects as a parameter, to tell them to perform this particular operation in the process of fulfilling your request. You could say that a Command is…

2012-02-01 17:45 · Thinking in patterns( 阅读笔记)

2011总结

2011年总结 很早就想来总结一下,算是对过去一年作回顾。正所谓:有总结才有所得、方可展望。 这个时间段内,经历过很多挫折,主要是来自专业学习、技术深入等。 从专业知识方面来说: 先是学习C,然后是Java,期间反复有C应用,最有确定了专注Java方向。 原因是,作为最流行语言,Java有很多思想值得借鉴,而且有很多成型思想值得学习,很多资源可供参考! 当然中间还夹杂了Linux、Shell、Oracle、PHP、WebService等相关技术的学习! 从项目经验来说: 先是电子政务,主要是负责了彩信发送程序的维护,WebService协议编辑及后期程序开发,整个项目的存储过程,和一些she…

2012-01-31 20:45 · 一点点想法...

18-Facade

Facade模式 : 为子系统中的一组接口提供一个一致的界面.简言之,就是为凌乱、繁杂的接口(或者是类)构造一个统一的接口(或者是类),便于使用、很多时候达到了复用的目的。这在教材中的例子能够看出来,有一句是很好的总结: A tax adviser is a Façade between you and the tax code, and a mediator between you and the tax system. 此外可以参考这个例子 www.jdon.com/designpatterns/designpattern_Facade.htm http://www.cnblogs.co…

2012-01-15 15:22 · Thinking in patterns( 阅读笔记)

17-Mediator

Mediator模式:用一个中介对象来封装一系列的对象交互,使各对象不需要显示地相互调用。简单而言就是封装了多个对象之间的复杂操作,使的两个对象解耦! http://www.jdon.com/designpatterns/mediator.htm http://gary0416.iteye.com/blog/913462 以上两个连接都是不错的参考,例子比较很好理解! ( Mediator模式在事件驱动类应用中比较多,例如界面设计GUI.;聊天,消息传递等,在聊天应用中,需要有一个MessageMediator,专门负责request/reponse之间任务的调节. MVC是J2EE的一个基…

2012-01-14 19:40 · Thinking in patterns( 阅读笔记)

16-Observer

好久之前看过Observer,但是,当时不是很清楚,应该是Java刚刚入门的原因....现在看来啊,是比较优秀、很好的设计模式! Like the other forms of callback, this contains a hook point where you can change code. The difference is in the observer’s completely dynamic nature. It is often used for the specific case of changes based on other object’s change of…

2012-01-12 21:35 · Thinking in patterns( 阅读笔记)

15-Composite

Composite模式,有时又叫做部分-整体模式(Part-Whole)。它将对象组织到树结构中,可以用来描述整体与部分的关系。合成模式可以使客户端将单纯元素与复合元素 同等 看待。 这个模式的具体含义是很好理解的,教材中讲解的还行。具体再 参考这个案例 一下就更好了!!主要是在具体的实际的中用总结一下!后续......

2012-01-12 10:11 · Thinking in patterns( 阅读笔记)

14-Bridge

思考了好一阵,总是没有一个合适的答案,感觉没有办法继续往下写了.... 先展示一下Bridge设计模式的目的就是:将抽象与其实现解耦,使它们可以独立的适应变化,这是在Gof中的描述(很是通用,但是没有感觉....) 老实说,教材中的例子比较抽象啊,不是很容易理解,但是讲解还算可以,毕竟是外文啊,参考了一些博客内容,感觉这个讲解比较集中,好理解。 桥梁模式的用意是将问题的抽象和实现分离开来实现,通过用聚合代替继承来解决子类爆炸性增长的问题。** 比如我们有一个画图程序 有2个图形(Circle Rectangle )和2种画图方法(Drawing1 Drawing2) 图形可能会使用Drawi…

2012-01-11 17:06 · Thinking in patterns( 阅读笔记)

13-Adapter

接下来的两个模式目的就是:Connecting different types Adapter takes one type and produces an interface to some other type. When you’ve got this , and you need that , Adapter solves the problem. The only requirement is to produce a that , and there are a number of ways you can accomplish this adaptation. //: adap…

2012-01-10 21:38 · Thinking in patterns( 阅读笔记)

12-Decorator:too many classes

呵,从翻译这个标题开始这个模式学习吧: The use of layered objects to dynamically and transparently add responsibilities to individual objects is referred to as the decorator pattern.--利用多层对象动态、透明地给一个对象添加功能,称之为装饰模式(或者是: Decorator模式指的是,利用通过层组织起来的多个对象,以动态、透明地方式,来给某单个对象增加新功能,我自己的翻译是:通过将对象分层,然后动态、透明地给一个对象添加功能的应用称之为Decorat…

2012-01-06 20:17 · Thinking in patterns( 阅读笔记)

五年java人的一点感悟(转)

恍然间,发现自己在这个行业里已经摸爬滚打了五年了,原以为自 己就凭已有的项目经验和工作经历怎么着也应该算得上是一个业内比较资历的人士了,但是今年在换工作的过程中却遭到了重大的挫折。 详细过程我就不再叙述,在 此,只想给大家说一说被拒绝的原因,看看大家有没有相似的经历,和类似的感悟。面试官对我的答复大致是这样的,我们不需要熟练工,我们需要在某领域拥有超 过常人的积累认知,和拥有整套完整思维模式和优秀认知事物能力的人…他很诚恳地告诉我,你还年轻,真的应该好好地静下心来,深入地研究一些东西,自己写一 些东西,而不是这也用过,那也知道,但是多半都是局限于仅仅见过,会用,却从来没有认真思考过其代码背后…

2012-01-06 16:37 · 一点点想法...

11-Flyweight: too many objects

The odd thing about flyweight, in the company of the other design patterns, is that it’s a performance hack. It’s generally ideal to simply make an object for every item in your system, but some problems generate a prohibitive number of objects, which may result in excessive slowness or running out…

2012-01-06 16:10 · Thinking in patterns( 阅读笔记)

10-Builder

The goal of builder is to separate the construction from the “representation,” to allow multiple different representations . The construction process stays the same, but the resulting object has different possible representations.GoF points out that the main difference with Abstract Factory is that…

2012-01-06 09:14 · Thinking in patterns( 阅读笔记)