`
文章列表
    Package     Like most object-oriented languages, Java allows the programmer to declare who can access what parts (if any) of an object. As befits its C++ heritage, Java allows fields and methods to be accessed by any part of a class in which those fields and methods are declared. But outside of a ...
   这是一本只讲Java优点的书。     Jim Waldo先生是原Sun微系统公司实验室的杰出工程师,他亲历并参与了Java从技术萌芽、发展到崛起的整个过程。    类型系统     类、抽象类和接口。     用接口定义一种类型,再用一个类实现此接口,这样,要调用执行调用的性能损失是程序的设计者们不愿付出的。在早期的Java解释器中,可接受的性能是人们真正关心的,但即使在那时不通过接口的直接调用也只是一个微乎其微的优化,没有实际意义。考虑到如今的即时编译(just-in-time)编译器的性能,这种反对意见已经完全没有意义了。     关于效率,另一种反对意见在于接口导致系统中的信 ...
    The JavaServer Pages Standard Tag Library (JSTL) encapsulates as simple tags the core functionality common to many Web applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. It a ...
简单解决Eclipse"Failed to create the Java Virtual Machine" 今天在启动Eclipse,发现弹出提示框“ Failed to create the Java Virtual Machine” 几经周折终于找到了解决办法,特与朋友们分享,方法如下: 找到eclipse目录下的eclipse.ini,可以看到如下内容: -startup  plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar  --launcher.library  plugins/org.eclipse.equi ...

Useful Shell

find . -name "[.]*" -delete  #to delete the files start with "."
   List<A>    list    =    new    ArrayList<A>();      list.add(new    A());      list.add(new    A());          第一种:      for(Iterator<A>    it    =    list.iterator();    it.hasNext();    )    {       }   ...
javabean scope 概览: scope标示你定义的这个bean在上下文的有效范围; page:当前页面有效,只是当前页面可引用,离开了当前页面则不可引用; request: 请求有效,一个请求到另个请求之间,这里要区分1次请求还是2次请球,redirect是2次请求,forward 是一次请求.request.setAttribute()是放在一次请球中 session :会话有效,第一次进入jsp页面就和服务器建立了一条会话,只要你不关闭该浏览器,则可反复引用; application:应用上下文有效,注意跟session的区别就行,放在session中的数据是只能由当前会话可以存 ...
    作为Apache组织中的一个颇为成功的开源项目,Maven主要服务于基于Java平台的项目构建、依赖管理和项目信息管理。无论是小型的开源类库项目,还是大型的企业级应用;无论是传统的瀑布式开发,还是流行的敏捷模式,Maven都能大显身手。 Maven是优秀的构建工具,但是不仅仅是构建工具,它具有依赖管理和项目信息管理的功能。 其他的构建工具:     make将自己和操作系统绑定在一起了。也就是说,使用Make,就不能实现(至少很难)跨平台的构建,这对于Java来说是非常不友好的。此外,Makefile的语法也成问题,很多人抱怨Make构建失败的原因往往是一个难以发现的空格或Tab使用 ...
总结:     从下面的代码可以看出,C中几乎所有函数都需要持有list指针,而且在使用上也十分麻烦,需要在主函数中维护头指针。sdfdf     Java用了三个文件,ListNode.java,List.java还有一个Test.java。从下面贴出的List.java的代码可以看出,函数实现相对简单一些,不必要维护list指针,因为有对象属性存在。这里可以看出一些面向对象编程的好处。 LinkedList.c: #include <stdio.h> #include <stdlib.h> #include <string.h> type ...
导读: linux中有很多命令可以关于压缩的命令:tar,zip,compress;也有很多的压缩格式,tar,tar.gz,zip。对这些命令和格式有疑惑吗?他们的使用有什么区别呢? 摘要: tar是solid compress,rar和7zip也是;而zip不是。 tar是把文件集合起来,然后用各种方式压缩,如果用gzip便压为tar.gz,如果用bzip2便压缩为tar.bz2。 为适用MS-DOS's 8.3 filename limitations,tar.gz equals tgz,tar.bz2 equals tbz。 Details:     tar files usua ...
String is immutable whereas StringBuffer and StringBuilder can change their values.     The only difference between StringBuffer and StringBuilder is that StringBuilder is unsynchronized whereas StringBuffer is synchronized. So when the application needs to be run only in a single thread then it is ...
配置: 在Ubuntu11.10默认是vim.tiny,不能语法高亮,所以安装vim: sudo apt-get install vim             配置自动缩进,在vim下:version查看vimrc的位置,vimrc文件中添加 set autoindent    Normal mode: 3x # to delete three character Ctrl+r # and u to undo ZZ # write and exit vim Ex mode: :!bash # enter bash shell, exit to back t ...
adb(Android Debug Bridge) can be used to install apk, import files or reverse. # install apk for ouly usb devices adb -d install path/to/your/app.apk
type mount # find the the first mount command in the PATH whereis mount # find code or manual about mount locate mount # search the files about mount which mount # find the alias int he PATH mount --help # output the help info apropos mount # find the mount contained lines i ...
绘制流程图的步骤   为便于识别,绘制流程图的习惯做法是:  圆角矩形表示“开始”与“结束”。  矩形表示行动方案、普通工作环节用  菱形表示问题判断或判定(审核/审批/评审)环节  用平行四边形表示输 ...
Global site tag (gtag.js) - Google Analytics