自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(140)
  • 资源 (82)
  • 收藏
  • 关注

原创 Dynamic Proxy

<br />对于DynamicProxy的原理,很多地方都有介绍,里面最神秘的就是JVM会在运行时动态生成一个类,好奇心驱使,想看看这个生成的类的代码是啥样的。于是,跟踪到Proxy.newProxyInstance()中,发现生成代码的关键语句byte[]ProxyGenerator.generateProxyClass(String proxyname,Class[]instances),写了段代码来输出那个类文件,并得到反编译的结果<br />----------IPerson .ja

2011-04-21 20:03:00 318

原创 局部内部类为什么只能访问final局部变量,对于成员变量却可以随便访问?

<br />局部内部类为什么只能访问final局部变量,对于成员变量却可以随便访问?<br />public class OuterClass { private int memberField = 10; public void outerDo(){ final int localField = 20; class InnerClass{ public void innerDo(){ memberField = localField; }

2011-04-20 16:51:00 309

原创 WTP开发调试web应用时工作目录

<br />/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0<br />mark一下,使用eclipse内置的WTP开发调试web应用时,这个地址就是work directory,而不是在tomcat的安装目录下,也不是采用context文件的方式,而是全盘复制到上面的目录中

2011-04-20 16:09:00 318

原创 Java中Abstract class与interface的差别

对于语法差别,很多文章都写了,就不再赘述了,这儿主要讲本质的差异抽象类定义了其子类的核心特征和功能(is a),例如继承Thread通常表明该类“is a”线程而接口只是定义了类的附加能力(-able/can-do),例如Runable表示可以单独运行的任务,但是并不是说该类is a线程;Comparable表示类具有比较的功能,但是并不是说该类"is a"比较器如果需要为子类添加或修改默认的行为,此时应该选择抽象类,而不是接口如果需要为不相干的类提供公共的功能,应该使用接口;如果建立的模型在层次上很接近,

2011-04-14 16:53:00 655

原创 JAVA类装载的三个基本原则

<br />1.      委托原则:当加载一个类时,首先会委托父加载器来加载<br /><br />2.      可视化原则:子类加载器能看到父类加载器加载的所有类,但是反过来是不行的。同时,兄弟类加载器也看不到对方加载的类<br /><br />3.      唯一性原则:如果一个类加载器加载了某个类,那么它的子类加载器是不会再加载该类了的。<br /><br />Delegation Principle: If a class is not loaded already, the cla

2011-03-25 09:40:00 223

原创 ThreadPoolExecutor的线程池控制策略

If fewer than corePoolSize threads are running, the Executor always prefers adding a new thread rather than queuing. If corePoolSize or more threads are running, the Executor always prefers queuing a request rather than adding a new thread. If a reques

2011-03-18 14:13:00 713

原创 补码和反码

补码,two's complement,对于非负数x,我们用2w-x(这里只有一个2)来计算-x的w位表示;反码,ones’ complement,我们用[111...1]-x(这里有很多1)来计算-x的反码表示。

2011-03-06 01:03:00 711

原创 JSR133中volatile关键字的理解,有一个地方很迷惑

volatile的语义:1. 确保对volatile域的读写操作都是直接在主存内进行,不缓存到线程的本地内存中。2. 在旧的JMM中,volatile域的操作与nonvolatile域的操作之间可以重新排序。但是在JSR133以后,规定volatile操作和其他任何内存操作之间都不允许进行重新排序。3. 在新的JMM下,当线程A写一个volatile变量V,然后线程B读取V的时侯,任何在写入V时对线程A可见的变量值,都对B可见第3条很奇怪,感觉有点象synchronized的作用了。是不

2011-01-24 15:29:00 331

原创 同步和内存可见性

synchronized 关键字的作用:1. 作为线程间的互斥锁,防止多个线程同时访问由一个监视器保护的同步块2. 保证内存的可见性。它可以确保,当离开同步块的时候将缓存数据刷新到内存中,当进入同步块的时候使本地缓存失效,从内存中获取最新数据。如果两个同步块被同一个监视器所保护,那么这两个同步块根据运行的时间有一个happen-before的关系,并且在后面执行的同步块中是可以看到前面那个同步块对内存的更新的。3. 确保编译器不会将同步块中的指令移到同步块外面来(尽管在某些时候可以将同步块外面的

2011-01-24 14:22:00 445

原创 yield和sleep的区别

JDK1.5.0的API文档里的描述:yield:Causes the currently executing thread object to temporarily pause and allow other threads to execute.sleep:Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of millisecond

2011-01-24 11:56:00 1818

原创 DCL和happens-before的学习资料

DCL和happens-before的学习心得和资料

2011-01-12 09:15:00 342

转载 if的用法(英语语法)

There are four main types of if sentences in English, often called conditional sentences.These sentences are in two halves, with the if part in one half and the other part where you can use words such ascan, will, may, might, could and would.

2010-12-31 16:34:00 1262

原创 使用Spring的HTTP invoke调用时产生的异常归类

使用Spring的HTTP invoke调用时产生的异常归类

2010-12-30 16:29:00 460

原创 JTable中实现拖拽式多选、删除功能

从IBM notes邮箱中得到的灵感,在收件箱的最左侧可以使用鼠标拖拽选择多封邮件,或者是拖拽取消多封邮件的选择,以及Ctrl-A全选所有邮件的功能,觉得很是方便,省去了在界面中添加全选按钮导致界面难看、不易布局的问题

2010-12-24 11:27:00 966 1

原创 JTable中ListSelectionListener、MousePressed、MouseReleased、MouseClicked事件之间的先后顺序

当只点击一行(例子中数字为rowIndex)时,事件发生的顺序是ListSelection、MousePressed、ListSelection、MouseReleased、MouseClicked10:31:48,281 ERROR [MyTableDialog] ListSelection before mousePressed: getFirstIndex-1|getLastIndex-110:31:48,281 ERROR [MyTableDialog] after mousePressed:1 i

2010-12-22 10:51:00 831

原创 利用jdb转储线程的堆栈——where

<br /> <br />在jdb的help会输出下面这些帮助信息,但是“转储线程的堆栈”却没有命令,这是因为英文的转储命令是where,被翻译成了“其中”<br />threads [线程组]            - 列出线程<br />thread <线程 ID>            - 设置默认线程<br />suspend [线程 ID]           - 暂停线程(默认为所有线程)<br />resume [线程 ID]            - 恢复线程(默认为所有线程)<br />其

2010-12-21 19:03:00 317

原创 最近在读Java concurrency in practice,对其中文的翻译之差忍无可忍

非常详细并且易懂的书,但是如果你只看中文翻译版的话,那会把你看得晕死,一定得结合英文版来看由韩锴、方妙翻译的实在是太惨不忍睹了,基本上当作翻译改错在学习,句式稍微长点的翻译就生硬的不行,意思稍微多点的单词翻译就不准确例如把sticky翻译成“粘”,current翻译成“并发的”,custom翻译成“常用的”,poll翻译成“获取”,这些关键字一旦翻译错,导致整个句子就让人无法理解建议想学Java并发编程的同学还是老老实实的看英文原版吧,这本翻译可以用来改错用

2010-12-21 09:36:00 474

原创 TOMCAT默认配置的安全问题

<br />有一个文件tomcat/conf/server.xml,里面默认的内容为<br /><Server port="8005" shutdown="SHUTDOWN"> <!-- Comment these entries out to disable JMX MBeans support used for the administration web application --> <Listener className="org.apache.catalina.co

2010-12-06 12:10:00 290

原创 python写的一个串联文件的小程序

<br />为了看小说,下了一个zip包,打开一看居然是400多个散文件,没办法,只好鼓捣了半天python把文件给串起来了,由于中间有个字符有编码问题,只好捕捉了pass掉<br />import ospath = "E://Python Workspace//20429"newfile = open("E://Python Workspace//bbsl.txt",'w')filelist = os.listdir(path)for filename in filelist:

2010-11-19 17:44:00 202

原创 JS中正则表达式在IE和FF下的区别,global属性

<br /> $.extend({ /* * 验证是否为正确的车牌号 * @return {Boolean} true:验证通过;false:验证识别 * @param {String} plateNum 车牌号 */ isValidatePlateNum: function(plateNum){ //第一位为代表市地区的字母,后面五位可以为字母或数字,字母必须全部大写 var pattern = /^[A-Z]{1}[A-Z0-

2010-11-15 15:29:00 335

原创 当反复redeployed服务时,导致的web 服务器内存泄露问题【转】

http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java

2010-11-14 11:55:00 282

原创 System.getProperties的内容

java.runtime.name=Java(TM) 2 Runtime EnvironmentStandard Editionsun.boot.library.path=D:/Program Files/Java/jdk1.5.0_09/jre/binjava.vm.version=1.5.0_09-b01,shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jarjava.vm.vendo

2010-11-10 10:43:00 269

原创 实例变量初始化与不初始化的区别

<br />在做Swing的时候,为了把通用的界面框架抽象出来,经常采用模板方法,但是由于界面组件的初始化及布局都在构造函数中实现,于是就出现了下面的调用顺序<br />1.子构造函数->2.父构造函数->3.子模板方法->4.子类的实例变量初始化,在子类模板方法中初始化子类中的实例变量(子类的界面组件)之后,子类开始初始化自己的实例变量,结果把在模板方法中已经初始化的实例变量又初始化了一遍。如果子类不对其实例变量做初始化,那么第4步也不会进行,也就避免了这个问题<br />这就引出了一个问题,初始化实例变

2010-10-28 10:18:00 637

原创 Swing中UI代理的安装序列图

<br />

2010-10-26 11:01:00 205

原创 Axure RP快速开发界面原型

前期需要应标,使用Axure RP快速开发界面原型,支持SVN共同开发,在几天内就开发完了10多个系统的所有关键页面近百个。并且可以直接导出成HTML原型,和Word的规范文档,非常的方便。给老大留下了不错的印象具体使用很简单,参考一下配套的文档就没问题了。主要是通过SVN协同开发原型存在一点技巧:创建过程:先使用Axure创建一个共享工程,将其共享目录设置为SVN路径即可使用已有

2010-04-28 15:33:00 451

原创 页面按钮的onclick事件的函数名不能为clear?

页面代码如下: New Document <!-- function clear(){ alert("clear"); } // --> 此时,点击按钮,并不能弹出alert框。IE、FF、Opera、Safari、Chrome下均如此但是将方法名改成clear1或者

2010-03-16 09:11:00 273

转载 Understanding bytecode makes you a better programmer

http://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/ 

2010-03-15 13:16:00 213

原创 java class file及反汇编后的jvm指令

工程目录结构如下:HStudy         --src               --jvm                      --init         --classes               --jvm                      --init源码如下:package jvm.init;public class

2010-03-12 09:24:00 922

原创 在jdb中链接源码

在jdb中的很多命令都比较好理解,也很容易使用但是list命令缺总弄不好,总是报“找不到源文件”;此时应该使用use命令来链接源文件但是use的用法写的太简单了,只是说要跟源文件夹路径,但是也没说是相对哪儿的路径,经过一下午的试验,终于找到了规律 1.如果在工程路径下使用jdb,E:/workspace_RIA/HStudy>jdb -classpath classes jvm.i

2010-03-12 09:05:00 696 1

原创 jdb链接源文件

<br />在jdb中的很多命令都比较好理解,也很容易使用<br />但是list命令缺总弄不好,总是报“找不到源文件”;此时应该使用use命令来链接源文件<br />但是use的用法写的太简单了,只是说要跟源文件夹路径,但是也没说是相对哪儿的路径,经过一下午的试验,终于找到了规律<br /> 

2010-03-11 17:19:00 202

原创 jdb的基本用法

源代码如下:package jvm.init;public class Example5 { public static void main(String[] args) { int a = 2; int b = 3; if (args.length < 2) { System.out.println("Mu

2010-03-11 17:16:00 1325 2

原创 使用jdb调试时的命令

** 命令列表 **connectors - 列出此 VM 中可用的连接器和传送器run [类 [参数]] - 开始执行应用程序的主类threads [线程组] - 列出线程thread - 设置默认线程suspend [线程 ID] - 暂停线程

2010-03-11 15:45:00 1767

原创 调试JAVA的工具

VisualVM :JDK1.6_update7自带,可独立下载,太强大了JProfile:收费JConsole:JDK自带jdb:JDK控制台命令

2010-02-24 15:49:00 421

原创 FF与IE中输入回车符的区别

textarea输入的回车符在FF和IE下解析不同FF会在回车的地方插入“/n”IE会在回车的地方插入“/r/n”所以使用正则表达式应该是:(/r)?/n

2010-02-22 16:08:00 194

原创 JAVA规范学习——实例创建时的操作

创建一个类的实例时,1.会为它以及它的所有父类的实例变量分配内存空间,如果分配空间成功,则所有实例变量都会初始化为默认值0、false、null2.会递归调用父构造函数,但是暂不执行构造函数的语句;3.对该父构造函数对应的类的实例变量赋值4.执行父构造函数的其他语句5.对于子类,执行2-4步骤

2010-02-01 14:55:00 150

原创 JAVA规范学习——程序执行时的类加载操作

程序执行时会顺序经过loading、linking、initialization三个步骤1. loading:查找类或接口的二进制文件2. linking:装入类或接口的二进制文件,合为JVM的运行状态,使其可以被执行。此过程包括三个子过程:verification, preparation, and    resolution of symbolic references3. ini

2010-02-01 14:40:00 203

原创 JSON-RPC、XML-RPC、SOAP三者的关系

JSON-RPC规范:http://json-rpc.org/wiki/specificationXML-RPC规范:http://www.xmlrpc.com/specSOAP规范:http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383487参考:http://weblog.masukomi.org/writings/xml-

2010-01-27 11:15:00 4054 1

原创 JAVA规范学习——static成员初始化

class Super { static int taxi = 1729; }class Sub extends Super { static { System.out.print("Sub "); }}class Test { public static void main(String[] args) { System.out.println(

2010-01-26 13:03:00 321

原创 Ruby的装饰器模式实现

class Tree def initialize puts "Make a normal tree" end def decorate puts "Make sure the tree won/t fall" endendclass RedBalls < Tree def initialize(tree) @parent =

2010-01-21 17:09:00 319

原创 JS中装饰器模式的实现

var tree = {};tree.decorate = function() { alert(Make sure the tree won/t fall);};tree.getDecorator = function(deco){ tree[deco].prototype = this; return new tree[deco];};tree.RedBa

2010-01-21 16:46:00 304

Patterns of Enterprise Application Architecture

Patterns of Enterprise Application Architecture By Martin Fowler, David Rice, Matthew Foemmel, Edward Hieatt, Robert Mee, Randy Stafford

2012-07-05

SQLyog-10.0.0-1

SQLyog-10.0.0-1 cn:dd987f34-f358-4894-bd0f-21f3f04be9c1

2012-06-14

Head First Programming Python

Head First Programming Python English pdf

2012-02-22

Refactoring Databases Evolutionary Database Design

Refactoring Databases Evolutionary Database Design 2006 chm

2012-02-22

Manning.ActiveMQ.in.Action.Mar.2011.pdf

20M的高清正式英文版 ActiveMQ in Action is for software architects, developers, and integrators interested in enterprise message queuing in general and ActiveMQ in particular. This book is designed to serve as part introduction and part reference for both beginners and experienced application developers. It begins with an introduction to ActiveMQ and a high-level overview of JMS, followed by a progressively deeper dive into Active MQ as the book advances.

2011-11-25

log4j-manual

log4j-manual english pdf

2011-10-31

Pro Apache Log4j 2nd

Pro Apache Log4j 2nd 英文 清晰

2011-10-31

CollabNetSubversion-client-1.7.1-1.x86_64.rpm

CollabNetSubversion-client-1.7.1-1.x86_64.rpm 在fedora15上安装subclipse1.8时,报错,需要安装javahl

2011-10-29

GNU Linux Command−Line Tools Summary

GNU Linux Command−Line Tools Summary 英文 清晰

2011-10-25

Advanced Bash-Scripting Guide

Advanced Bash-Scripting Guide 英文 清晰版

2011-10-25

Linux Dictionary

Linux Dictionary linux里面所有名词解释

2011-10-25

The Linux System Administrators' Guide

The Linux System Administrators' Guide

2011-10-25

The Linux Cookbook: Tips and Techniques for Everyday Use

The Linux Cookbook: Tips and Techniques for Everyday Use 544页英文清晰版

2011-10-25

Concurrent Programming in Java: Design Principles and Patterns, Second Edition

Concurrent Programming in JavaTM: Design Principles and Patterns, Second Edition By Doug Lea In Concurrent Programming in Java, Second Edition, you will find thoroughly updated coverage of the Java 2 platform and new or expanded coverage of: • • • • Memory model Cancellation Portable parallel programming Utility classes for concurrency control The Java platform provides a broad and powerful set of APIs, tools, and technologies. One of its most powerful capabilities is the built-in support for threads. This makes concurrent programming an attractive yet challenging option for programmers using the Java programming language. This book shows readers how to use the Java platform's threading model more precisely by helping them to understand the patterns and tradeoffs associated with concurrent programming. You will learn how to initiate, control, and coordinate concurrent activities using the class java.lang.Thread, the keywords synchronized and volatile, and the methods wait, notify, and notifyAll. In addition, you will find detailed coverage of all aspects of concurrent programming, including such topics as confinement and synchronization, deadlocks and conflicts, state-dependent action control, asynchronous message passing and control flow, coordinated interaction, and structuring web-based and computational services. The book targets intermediate to advanced programmers interested in mastering the complexities of concurrent programming. Taking a design pattern approach, the book offers standard design techniques for creating and implementing components that solve common concurrent programming challenges. The numerous code examples throughout help clarify the subtleties of the concurrent programming concepts discussed.

2011-10-21

Apress.Beginning.SQL.Queries.From.Novice.to.Professional

Apress.Beginning.SQL.Queries.From.Novice.to.Professional.pdf 英文

2011-10-21

Practical API Design Confessions of a Java Framework Architect

Practical API Design Confessions of a Java Framework Architect pdf,en

2011-10-21

Refactoring: Improving the Design of Existing Code

PDF Refactoring: Improving the Design of Existing Code

2011-10-21

Apress.Pro.Java.EE.Spring.Patterns

Apress.Pro.Java.EE.Spring.Patterns.Aug.2008.pdf

2011-10-21

Tomcat与Java.Web开发技术详解

美河图书提供.孙卫琴.Tomcat与Java.Web开发技术详解.pdf

2011-03-02

私有娱乐开发的web工程

私有娱乐开发的web工程,学习CSS 私有娱乐开发的web工程,学习CSS

2010-04-27

Windows via C/C++, Fifth Edition

Microsoft Windows is a complex operating system. It offers so many features and does so much that it's impossible for any one person to fully understand the entire system. This complexity also makes it difficult for someone to decide where to start concentrating the learning effort.

2010-04-22

Programming Windows

This book shows you how to write programs that run under Microsoft Windows 98, Microsoft Windows NT 4.0, and Windows NT 5.0. These programs are written in the C programming language and use the native Windows application programming interfaces (APIs). As I'll discuss later in this chapter, this is not the only way to write programs that run under Windows. However, it is important to understand the Windows APIs regardless of what you eventually use to write your code.

2010-04-22

Essential Business Process Modeling

Ten years ago, groupware bundled with email and calendar applications helped track the flow of work from person to person within an organization. Workflow in today's enterprise means more monitoring and orchestrating massive systems. A new technology called Business Process Management, or BPM, helps software architects and developers design, code, run, administer, and monitor complex network-based business processes. BPM replaces those sketchy flowchart diagrams that business analysts draw on whiteboards with a precise model that uses standard graphical and XML representations, and an architecture that allows it converse with other services, systems, and users.

2010-04-22

Enterprise Service Bus

CHM版,全英文Dave Chappell 2004

2010-04-22

Ajax and REST Recipes.pdf

Ajax and REST Recipes.pdf 清晰非图片版

2008-07-10

JSEclipse plugin

JSEclipse plugin,非常好用的JS插件

2008-07-10

Java Object Persistence With Hibernate.pdf

Java Object Persistence With Hibernate.pdf

2008-03-21

introduction to spring framework

introduction to spring framework

2008-03-21

Manning Spring in Action

Manning.Spring.in.Action.2nd.Edition.Aug.2007.rar

2008-03-21

Pro Spring

APress Pro Spring

2008-03-21

Core J2EE Patterns 2nd Editioin

Core J2EE Patterns 2nd Editioin

2008-03-21

Professional.Java.Development.with.the.Spring.Framework

Professional.Java.Development.with.the.Spring.Framework

2008-03-21

Manning - Hibernate.Quickly.

Manning - Hibernate.Quickly.

2008-03-21

Expert One-on-One J2EE Design &amp; Development without EJB

Expert One-on-One J2EE Design &amp; Development without EJB

2008-03-21

Expert One-on-One J2EE Design

Expert One-on-One J2EE Design

2008-03-21

Expert.One.on.one.J2EE.Development.Without.EJB

Wrox - John.Wiley.and.Sons.Expert.One.on.one.J2EE.Development.Without.EJB.pdf

2008-03-12

j2ee-1_4-doc-tutorial

j2ee 1.4 doc tutorial

2007-12-19

The JDesktop Integration Components (JDIC)

The JDesktop Integration Components (JDIC) 有人提出分数太高,但是我无法修改分数,可以给大家提供别人的下载地址,希望能对你们有帮助 http://download.csdn.net/source/499302

2007-12-18

对象持久类框架的构架设计

对象持久类框架的构架设计

2007-12-18

Dive Into Python

Dive Into Python 经典 中文 非图片 pdf

2007-12-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除