main string (RSS)

Design Patterns: Calculator Simple Implementation

If we are to write a calculator is not difficult: the following code But this code is far too bloated, and we want him to optimize the design patterns used to optimize the

Construction butt (2)

For sending data encryption of data Need to send data encryption, MD5 encryption first, then encrypt the result will be converted in accordance with Appendix 1, see "China Construction Bank appen ...

axis2 the entire process of creating webservice client (called. net web service)

Operating environment: myeclipse + tomcat6 +. Net web service 1. Download axis2-1.5-bin.zip url: http://ws.apache.org/axis2/download.cgi 2. Download Axis2 and extract to a target directory 3. AXIS2_HO ...

Design Patterns: Singleton pattern

Singleton pattern is to create an object-based model, using the Singleton pattern, you can ensure that only generated for a single instance of class as that is, the entire process space, there is only ...

Design Patterns: Abstract Factory

The abstract factory pattern is that all forms of factory pattern in the most abstract and most of its general nature. Abstract factory pattern can provide an interface to the client, enabling the cli ...

Convolution matrix algorithm, problem-solving thinking problems

The subject of a roundabout to require the digital matrix Java code int i = 5; 12345 161,718,196 152,425,207 142,322,218 131,211,109 int i = 6 123,456 20,212,223,247 19,323,334,258 18,313,635,269 173, ...

java of the Class to get a relative path, absolute path method

java of the Class to get a relative path, absolute path method

java regular expressions to achieve

Nepal may be encountered at work need to obtain one or a number of variables inside the http response, this time the role of regular expressions are embodied, and in general work, a lot of use to the ...

On how to debug a webapp using maven to create

There are many ways to debug webapp can be directly installed server, Can also be installed maven-jetty-plugin, maven-tomcat-plugin plug-ins In addition to these, but also can be directly embedded jet ...

Nothing to write a file to determine the same java program segment

Nothing to write a file to determine the same java program segment

You look at the difference between StringBuilder and StringBuffer it?

You look at the difference between StringBuilder and StringBuffer it? The two string classes, it is estimated there in front of me a couple of years old, but I have been concerned about the difference ...

JME Translation 1: Hello Series HelloWorld Translation

Here, we will learn how to build a foundation for JME procedures, and to explore SimopleGame, Box, and rootNode these keywords, good, let me look at bar-depth learning. Here we show you the basis for ...

Design Patterns: Factory Method

/ ** * Factory method to create models belong to the class-based model is also known as multi-state factory mode. * Factory Method pattern is to define the meaning of an object factory interface to cr ...

The Flyweight design pattern

Let us look at the following code: Here, Integer in the data between -128 to 127 with the use of the Flyweight pattern, if the data between -128 to 127, it will put them in "data pool" where ...

Java strings are not case sensitive and case-sensitive code to be able to replace the ---- a Gaoding (2 ways)

Java strings are not case sensitive and case-sensitive code to be able to replace the ---- a Gaoding (2 ways)

java code for the page

Recent studies have crawled pages, and discovered to obtain the page's encoding format, Java implementations is not ready, although there are a csdn Daren wrote an article, with code, unfortunatel ...

JAVA's role within the class

1, define in a class inside the class we are called inner classes. Second, the role of 1. Inside the implementation class is well hidden, that is encapsulation. General non-internal classes, is not al ...

About JAVA custom exceptions

To control the use of custom exceptions generated random number is not even! Hehe now review stage, the small circling the examples out on the share, the welcome given to criticizing

A simple method to test procedures for small-Speed

public static void main (String [] args) ( Long start = System.currentTimeMillis (); long sum = 0; for (long i = 1; i <520000l; i + +) ( sum + = i; ) Long end = System.currentTimeMillis ();// get c ...

Do not use any loop and recursion, the output print n of (n> 1) "Hello World

import java.util.Arrays; public class test ( public static void main (String [] args) ( String str = "Hello"; int num = 6; Object [] obj = new Object [num]; Arrays.fill (obj, str); String s ...

How to export the private key keystore

Under normal circumstances, you have passed the key pair generated by keytool in the private key can not lead ourselves, However, through their own Java code to do that.

Operate on the array using reflection

Operate on the array using reflection

Java's enum type

With an example to illustrate: Provided in the program values of traffic lights can only be RED, GREEN, YELLOW take other value will throw an error, and also know that according to the current color o ...

A multi-threaded note

A direct successor to thread class, override the RUN method, when the call starts with the start (); package com.Thread; class MyThread extends Thread (/ / inherit Thread class, as the thread implemen ...

hibernate tool

Generated mapping file from the table Table generated from the mapping file and the POJO

Briefly Jetty

Is a similar 1.jetty the tomcat server, you can control it through the process to start and stop. Official website: http://www.mortbay.org Jetty in 2.myeclipse integrated plug-ins, you can configure a ...

Sql2000 under JDBC database connectivity

1. Ready to connect SQL database JAR package. 2. To JAR into the project package. III. Under the JDBC call. The following is a test categories:

Hibernate.initialize (Object obj)

On lazy (lazy) and forced to load (Hibernate.initialize (Object proxy)), etc. Sustained in the use of hibernate when it is sometimes necessary to change the dynamic loading of objects, such as in the ...

Hibernate Projection Example (Sum)

Hibernate Projection Example (Sum)

Hibernate Avg ()

Hibernate Avg ()

Hibernate export database tables

Hibernate export database tables

webservice study II (2) axis2 client to develop summary (annex containing the item)

A, first of all create a webservice client projects webservice_client 1, Contents 2, will be required to include the jar to the lib directory under the project lib Second, the development of client-si ...

Examples of collection hibernate mapping

<? xml version = "1.0" encoding = "utf-8"?> <! DOCTYPE hibernate-mapping PUBLIC "- / / Hibernate / Hibernate Mapping DTD 3.0 / / EN" "http://hibernate.sourc ...

Data Access Objects DAO

Data Access Objects (Data Access Model - DAO) Requirements: A year ago, the staff requested information saved to the XML document, One year later, the customer also saved to the database. Analysis: 1. ...

java written Guinness Collection

This article is part of my summing up, attachment containing the full content, please download java written Guinness Collection 1. (&,|,^) Logical operation on the operation and conditions (&& ...

hibernate mapping files easy to use formula

Not previously used formula, today试了试, Student and books or use the one-to-many relationship to illustrate: Students.hbm.xml: Books.hbm.xml: Test code: Results: Hibernate implementation from the state ...

Inside JDBC (b)

At Inside JDBC (1), the introduction to the U.S. Class DriverManager interface with the Driver of the meaning and usage, from the beginning of this article, we take a look at the specific use of JDBC. ...

JavaScript html js java into the landing page displays the current user's IP areas, check IP network interface

Js interface with access to query the network ip address Jsp query interface with access to the network ip address Provide the network interface address: http://whois.pconline.com.cn/

Hibernate + ehcache secondary cache

Hibernate + ehcache secondary cache 2006-09-02 05:00 Author: Source: csdn duty Edit: Ark 1, the first set EhCache, set up configuration files ehcache.xml, the default position at the class-path, you c ...

Cactus containers used to carry out testing (integration testing jetty)

Jetty site first go download jetty5.1.12 the jar package, jetty server like tomcat server, and the whole to come myeclipse. jetty of the start-up mode: 1, at myeclipse clicking Start on the line 2, us ...

js Object-Relational articles java programmer

Oh, everyone OK.java category is the core, but a single category, has very little meaning, the key to have are kind of relationship! Inheritance, composition, and so on: Attachment can download the co ...

The operation of the database my base class (HIBERNATE)

The operation of the database my base class (HIBERNATE)

spring + struts + hibernate pagination full version

spring + struts + hibernate pagination operating principle is as follows: 1) When the pagination function call: it will trigger SplitPageAction category 2) SplitPageAction category and then through Pa ...

java remote communication technologies and easy implementation

public String sayHelloToSomeBody (String someBodyName) throws RemoteException; ) 2) remote object implementation 3) RMI server 4) RMI client Summary: From the above process, RMI on the server's IP ...

hibernate study of the thirteenth chapter

load method and principle analysis of lazy loading The purpose of lazy loading, to reduce unnecessary database queries and enhance performance. Mapping components to use in front of the user category, ...

Hibernate custom ClassLoader to load class files under the code and implement one of

One load a directory of a class file (the code is reproduced here) 2 use URLClassLoader to load the jar package, the main code is as follows: this part of code mainly used in server load when I start ...

ajax paging display

ajax paging display

log4j easy application in java

JAVA development, frequently used the log output, in a so-called most of the software company will have its own set of configuration style, re-read the configuration file to initialize property of the ...