自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(89)
  • 收藏
  • 关注

原创 Batch Insert In Java – JDBC

Let’s see how we can perform batch insert in Java using JDBC APIs. Although you might already knew this, I will try to explain the basic to a bit complex scenarios.In this note, we will see how we...

2012-07-10 11:00:11 193

原创 JDBC basic

The JDBC ( Java Database Connectivity) API defines interfaces and classes for writing database applications in Java by making database connections. Using JDBC you can send SQL, PL/SQL statements to al...

2012-06-25 23:51:48 169

原创 JDBC学习笔记-----jdbc性能优化[转载]

jdbc程序的性能主要由两个因素决定,一是数据库本身的性质,另一个是与数据库相对独立的jdbc应用程序接口(api)的使用.这里说的是如何正确使用jdbc编程接口,以获得更好的性能. jdbc主要优化有: 1.选择正确的jdbc驱动程序 2.Connention的优化 使用连接池来管理Connection对象 3.Statement的优化 使...

2012-06-25 22:56:04 162

原创 本机上的mysql 启动

cd c:\mysql\binstart server1) mysqld start2, connect server mysql -h localhost -u root -p3) show databases;4) connect database;

2012-06-21 02:21:16 159

原创 常用 SQL 语句大全

语 句 功 能--数据操作  SELECT --从数据库表中检索数据行和列  INSERT --向数据库表添加新数据行  DELETE --从数据库表中删除数据行  UPDATE --更新数据库表中的数据--数据定义  CREATE TABLE --创建一个数据库表  DROP TABLE --从数据库中删除表  ALTE...

2012-06-20 05:31:53 79

原创 Java Collection summary

Collection:List、Set Map:HashMap、HashTable 如何在它们之间选择 一、Array , Arrays Java所有“存储及随机访问一连串对象”的做法,array是最有效率的一种。 1、 效率高,但容量固定且无法动态改变。 array还有一个缺点是,无法判断其中实际存有多少元素,length只是告诉我们array的容量。 2、Jav...

2012-06-16 02:40:12 102

原创 When to use Comparable vs Comparator

[code="java"]I have a list of objects I need to sort on a field, say Score. Without giving much thought I wrote a new class that implements Comparator, that does the task and it works. Now looking...

2012-06-15 00:52:46 86

原创 Arrays.fill with multidimensional array in Java

[code="java"]How can I fill a multidimensional array in Java without using a loop? I've tried:double[][] arr = new double[20][4]; Arrays.fill(arr, 0); This results in java.lang.ArrayStoreExce...

2012-06-15 00:09:53 118

原创 Immutable objects

[code="java"]Immutable objects are simply objects whose state (the object's data) cannot change after construction. Examples of immutable objects from the JDK include String and Integer. Immutable...

2012-06-14 23:49:38 129

原创 Implementing hashCode; Transaction.java

[code="java"]Below is the syntax highlighted version of Transaction.java from § Algorithms. /************************************************************************* * Compilation: javac Tran...

2012-06-14 23:43:03 86

原创 Lazy initialization

http://www.javapractices.com/topic/TopicAction.do;jsessionid=6E104A048475638493BA555238EC17F4?Id=34[code="java"]Lazy initialization is a performance optimization. It's used when data is deemed t...

2012-06-14 22:48:20 109

原创 How to sort an array,mid of linkedlist, reverse int

A common mistake for a beginner to Java is to try and write some more or less complex method for sorting an array when in fact it can be done with just one line of code.The Arrays class has a static...

2012-06-13 07:47:01 105

原创 Java各类型转换

各种数字类型转换成字符串型: String s = String.valueOf( value); // 其中 value 为任意一种数字类型。 字符串型转换成各种数字类型: String s = "169"; byte b = Byte.parseByte( s ); short t = Short.parseShort( s ); int i = Integ...

2012-06-13 05:25:44 86

原创 regular expression

1、Java对反斜线处理的问题 在其他语言中,\\表示要插入一个字符\; 在Java语言中,\\表示要插入正则表达式的反斜线,并且后面的字符有特殊意义。 看API文档: 预定义字符类 . 任何字符(与行结束符可能匹配也可能不匹配) \d 数字:[0-9] \D 非数字: [^0-9] \s 空白字符:[ \t\...

2012-06-13 03:08:16 69

原创 string functions

[code="java"]import java.util.*;public class AppendEle { public List getAppendList(List inputList) { List result = new ArrayList(); StringBuilder tsb = new StringBuilder(); for (int...

2012-06-13 00:09:22 94

原创 String array to arraylist

There are some important things to note with the solutions given above: Garrett's solution, with Arrays.asList() is efficient because it doesn't need to copy the content of the array. This met...

2012-06-13 00:07:05 260

原创 core java interview summary

http://blog.sina.com.cn/s/blog_3f4dc73b0100afub.html

2012-06-12 04:11:26 84

programming with String

Question:1) Write code to check a String is palindrome or not?以下是我一开始写的CODE,后来仔细一看就有很多问题了:public class CheckStringPalindrome { String original; public CheckStringPalindrome(String ...

2012-06-12 01:43:17 83

原创 jQuery UI全教程之一(dialog的使用教程)

http://jqueryui.com/demos/autocomplete/#remote-jsonphttp://hi.baidu.com/li_mingzhu/blog/item/1279308d319a0ea60e2444fd.html

2012-06-08 00:35:32 108

原创 SpringMVC, JQuery, JSON

http://viralpatel.net/blogs/2012/05/spring-3-mvc-autocomplete-json-tutorial.htmlJava Spring MVC3 Annotations, Jquery & Json : AutoComplete Example Java Spring MVC 3 Annotations, Jquery and J...

2012-06-07 21:33:50 133

原创 OO Design books -good website

I’m always on the search on good interview questions as I’m doing a lot of IT recruiting. Sometimes in interviews I talk about books the candidate has read recently, to gain some insight into his inte...

2012-06-07 03:13:58 105

原创 Write a String Reverser (and use Recursion!)

Java Interview questions: Write a String Reverser (and use Recursion!)Interviewing developers for a programming job is hard and tedious. There are some excellent Guides, like the Joel Guerilla Gui...

2012-06-07 03:03:32 113

原创 ejb2.1_programmer_guide

http://jonas.ow2.org/JONAS_5_1_1/doc/doc-en/html/ejb2_programmer_guide.html1. Developing EJB 2.1 Session Beans 1.1. EJB 2.1 Session Beans Description 1.1.1. Introduction 1.1.2. The Home Inte...

2012-06-01 10:51:23 90

原创 UML class diagram

Interface : 实现interface用空心三角形加虚线表示。class:继承用空心三角形加实线表示。关联关系用实线箭头来表示。聚合表示一种弱的“拥有”关系,体现的是A可以包含B,但B不是A的一部分,用空心的菱形+实线箭头表示。(大雁和雁群)合成(composition)是一种强的拥有关系,体现了严格的部分和整体的关系,部分和整体的生命周期一样,...

2012-05-31 23:36:19 79

原创 web.xml

The name of the application C'mon, you know what goes into a description, don't you? name_of_context_initialization_parameter va...

2012-05-31 21:31:46 76

原创 JSF配置常用说明

http://www.itzhai.com/jsf-notes-jsf-configuration-file-configuration-instructions-and-common-elements.html传统MVC框架的简化流程图: 所有的Web应用都是基于请求/响应架构的,虽然说JSF不是基于请求/响应的,而是以事件响应机制来进行通信的,可以将视图页面的UI组件状...

2012-05-31 10:48:09 110

原创 关于在java中定义常量 和加log4j

http://www.blogjava.net/SmileFace/archive/2006/12/21/89179.html首先:java没有叫 全局变量 的东西(有全局变量还叫OO吗?);原因:Java将所有设计都基于对象的基础上。Java的全局变量只能对一个类内部而言。能够在类内的任何地方使用的变量就是全局变量,而只在某个特定的函数或者局部的程序块内使用的变量则是局部变量。所...

2012-05-29 03:30:47 290

原创 Java高手必会的要点

http://developer.51cto.com/art/200907/136757.htmJava高手必会的要点1. 你需要精通面向对象分析与设计(OOA/OOD)、涉及模式(GOF,J2EEDP)以及综合模式。你应该了解UML,尤其是class、object、interaction以及statediagrams.2. 你需要学习Java语言的基础知识以及它的核心类库...

2012-05-29 03:28:35 80

原创 How to use getClass().getClassLoader().getResource()

This is the simplest wat to get the File object to which a certain URL object is pointing at:File file=new File(url.toURI()); Now, for your concrete questions:•finding all resources in the ...

2012-05-29 03:13:21 113

原创 JSF导航文件设置示例

JSF Navigation by Examples JSF导航文件设置示例 作者: Sergey Smirnov 翻译:fei 原文见 http://forum.exadel.com/viewtopic.php?t=579 The JavaServer Faces (JSF)的Navigation框架提供了一些导航规则,可以使您在设计网站应用程序时定义v...

2012-05-29 02:11:40 74

原创 使用一个PhaseListener来熟悉JSF 生命周期

作者: cschalk 翻译: icess http://blog.matrix.org.cn/page/icess JSF新手可能常常听到 "JSF Request Processing Lifecycle" ,但是不一定知道在生命周期中都发生了什么事情.这里有一点代码, 一个 PhaseListener, 我们可以用她来了解 JSF's Request ...

2012-05-29 01:47:09 91

原创 推荐阅读清单: Java EE 与 WebSphere Application Server

[url]http://www.ibm.com/developerworks/cn/websphere/library/techarticles/0305_issw/recommendedreading.html[/url]

2012-05-26 02:20:51 73

原创 IBM WebSphere 开发者技术期刊: 最重要的 Java EE 最佳实践

摘自 IBM WebSphere 开发者技术期刊。引言在过去的几乎整整十年中,人们编写了很多有关 Java™ Platform, Enterprise Edition (Java EE) 最佳实践的内容。现在有十多本书籍和数以百计(可能更多)的文章,提供了关于应该如何编写 Java EE 应用程序的见解。事实上,这方面的参考资料如此之多,并且这些参考资料之间往往还存在着一些矛盾...

2012-05-26 02:06:28 88

原创 step by step guide to DWR 3.RC1 and Sprig 3.0.2 Integration

step by step guide to DWR 3.RC1 and Sprig 3.0.2 IntegrationHere are the required steps to integrate dwr and spring-mvc framework. There are some other pages about this topic on the net, but most...

2012-05-25 04:16:12 111

原创 dwr step by step

http://blog.csdn.net/bruesz/article/details/6977031#step 1:导入需要的两个Jar包:(下载地址:http://directwebremoting.org/dwr/downloads/index.html) •dwr.jar•commons-logging-1.1.1.jar 第二步:创建web.xml文件 (目录...

2012-05-25 03:50:20 87

原创 DWR+SpringMVC integration

http://directwebremoting.org/dwr/documentation/server/integration/spring.htmlhttp://www.butterdev.com/dwr/2009/12/dwr-3-x-and-spring/December 6, 2009DWR 3.x and SpringIf you want to in...

2012-05-17 22:04:31 93

原创 Steps for creating Remote Java WebServices in eclipse

http://www.coderanch.com/t/543976/Web-Services/java/Steps-creating-Remote-Java-WebServicesConfiguring JBoss: 1.) To run JBoss through eclipse, simply add it to the servers. 2.) To run JBoss ...

2012-05-17 22:01:51 75

原创 Catalina-Ant for Tomcat 7

http://paulgrenyer.blogspot.co.uk/2011/11/catalina-ant-for-tomcat-7.htmlI recently upgraded from Tomcat 6 to Tomcat 7 and all of my Ant deployment scripts stopped working. I eventually worked out ...

2012-05-17 11:03:11 170

原创 Annotation Based Spring MVC Basics

http://sites.google.com/site/sritechforjava/spring-docs/spring-mvc-basicsAssuming that the student knows basic web application structure and all the configuration files required for Basic web appl...

2012-05-16 23:31:00 105

原创 Spring MVC Tutorial

http://www.mkyong.com/tutorials/spring-mvc-tutorials/Happy learning Spring MVC :)Let go through a quick start to understand how Spring MVC framework works.Spring 3 MVC hello world example wh...

2012-05-16 03:57:42 138

空空如也

空空如也

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

TA关注的人

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