java code

sponsored links

Oracle in hibernate to achieve the automatic growth

According to the hibernate documentation, there are two ways to achieve the entity object's primary key auto-growth. The first: the growth strategy is to set the ID sequence, while the name of the specified sequence, it is best to build a table f

Encrypted file on the computer side, on the android on the decryption, but there pad block corrupted error, but the same java code program on a computer program can successfully decrypt the file.

Encrypted file on the computer side, on the android on the decryption, but there pad block corrupted error, but the same java code program on a computer program can successfully decrypt the file. 1 parameters must be byte [] type, if string.getbytes

[Share] Sina microblogging platform --- open the use of 01

[Share] Sina microblogging platform --- open the use of 01 Sina microblogging, applications, third-party, JAVA, there are a lot of documents open platform for third-party can be based on these open platforms to develop applications, Sina microbloggin

Use spring2.5 functional annotation-driven IOC

Outline Note the configuration relative to the XML configuration has many advantages: It can take full advantage of Java's reflection mechanism to obtain class structure information, which can effectively reduce configuration work. Configured to

Under Jboss jmx-console configuration with the web-console

JBoss installation is successful, can generally be accessed by http://localhost:port. Jmx Console and Jboss Web Console application which can modify and delete the parameters, if not to strengthen the security settings, would have serious security co

Topic: Spring annotation entry (reproduced)

Original link: 1 properties using Spring annotations to inject 1.1 How we use the annotations into the property before the class implementation: Java code public class UserManagerImpl implements UserManager { private

[Transfer] Tomcat log viewer

Today in debugging a web application, spring + webwork, mvn management, Start tomcat reported error: filterStart error 404 visits are reported to cause any error, while the console does not have any specific error messages. Looking for a long time, i

Enumeration Summary (rpm)

DK1.5 introduced a new type - enumeration. In Java, although it considered a "small" function, gave me to bring the development of a "large" convenience. Use a: constant In JDK1.5, we define the constants are: publicstaticfianl ..

LRU algorithm is a simple example

Turn: package com.aspboy.base.cache; / * * Created on 2004-8-18 * * "Least recently used algorithm" (LRU algorithm), it is the most recent period has been visited at least eliminated the li

Detailed examples of El expression Yong video (reproduced)

Original link: Of the JSTL EL expressions to do in the next test (the specific process can be found in Shang Xuetang video) Step 1: Add JstlElAction class Java code package com.bjsxt.struts; / ** * EL expression test

MongoDB's MapReduce use

Reference Articles # diff-2 MapReduce is a programming model that en

myeclipse workspace changes

Myeclipse find the installation directory, enter the configuration folder, find the config.ini file, to which Java code osgi.instance.area.default = @ user.home / Workspaces / MyEclipse 8.5 osgi.instance.area.default = @ user.home / Workspaces / MyEc

Chuan Zhi Yong Jdbc video podcast notes - transactions (reproduced)

Original link: 1, the concept of transactions and JDBC transactions (1) Atomic (atomicity): composed of transaction statements form a logical unit can not only perform part of it. (2) consistency (consisten

Production reports using Fusion Charts (dom4j generate XML)

For the first time that Fusion Charts is Bug Free, there is a statistical function, see the data report, implementation of Flash, and Open Flash Chart is similar, but different data formats. OFC using JSON data, and Fusion Chart to use XML data, OFC

HttpClient easy to overlook the details - connection closed

Java code HttpClient client = new HttpClient (); HttpMethod method = new GetMethod (""); try { client.executeMethod (method); byte [] responseBody = null; responseBody = method.getResponseBody (); } Catch (HttpException

ListView dynamically loaded

ListView dynamic loading, surely we have seen a lot of information in the Internet. I do not wordy here, provide a very simple Demo to some people in need. There are only two parts of this Demo, Activity to do shows, and a Factory to create informati

java code to achieve the principles of computer simulation (a) analog adder

Adder has two basic logic gates: XOR gates, and gate circuit of the Addition is the most basic arithmetic. So, if you want to build a computer (this is implicit in the book discuss the issue), Must first know how to construct a machine that can add t

The XFire WebService achieve authentication and Jax

Listed only part of the core code, other code is generated myeclipse, Annex. 1 server code: code: package test; public class HelloWorld implements IHelloWorld { public Float add(float a, float b) { return a + b; } public String sayHel

Of the read (byte [] b) and readFully (byte [] b) understanding

To find out read (byte [] b) and readFully (byte [] b) the difference, I analyze the following aspects: 1 concrete realization of the code (2) method and when to return 3 bytes are transmitted over the network in what way the (byte [] b) calls

apache + JK + tomcat load-balancing configuration (windows) (switch)

Transfer This paper is to record the windows apache + JK + tomcat load balancing configuration, to facilitate their future back, I hope to give new to the xd reference. Experimental environment of system already ins

Oracle insert picture and show (using BLOB type)

Oracle insert picture and show (using BLOB type) Store images in oracle using blob type inside First established in the database: - Connect to the administrator conn sys / tbsoft as sysdba; - Scott user authorization for the grant create any director

Log4j using a fully manual (reproduced)

Log4J is an Apache open source project ( ), it is a logging operation package. By using Log4J, you can specify the destination of the log information output to control the output format of each log to define the

java read xml file in four ways [turn]

Xml Code <? Xml version = "1.0" encoding = "GB2312"?> <RESULT> <VALUE> <NO> A1234 </ NO> <ADDR> Zhengzhou, Henan Province </ ADDR> </ VALUE> <VALUE> <NO> B1234 </ NO

java code for a variety of small tools

1 array into a List import java.util.Arrays; Arrays.asList(Object[] obj); (2) to determine whether a String value import org.springframework.util.StringUtils; if (StringUtils.hasText(str)) 3. To determine whether the value of a List import org.spring

JavaBean in JSP documents form the application of (14.1)

Build bean: jsp: useBean <jsp:useBean /> Phrase generally means "an instance of the class specified by the class, and instantiated objects bound to _jspService variables, the variable name specified by id." Note, however, be sure to u

super.getClass () trap

First given a problem, the following program output is the number? import java.util.Date; public class Test extends Date{ public static void main(String[] args) { new Test().test(); } public void test(){ System.out.println(super.getClass().getName())

MyBatis + Spring Principle of interface-based programming

Integration Spring3 and MyBatis3 For the integration of Spring and Mybatis no detail, can refer to: MyBatis 3 User Guide Simplified Chinese.pdf , put my main code is as follows: UserMapper Interface: Java code package org.denger.mapper; import org.apache.

oracle learning PLSQL (2) - Use the cursor (Abstract)

[Size = medium] cursor area of the environment is used to process SQL statements one oracle storage area. Cursor is a pointer to it or handle. By the cursor, PL / SQL program can control the environment in the region was prepared statement. Oracle cu

Apache Java project full description

Apache java projects full description Here are some under the Jakarta Commons: a very apt description csdn friends, Commons is like a treasure chest java. commons is divided into three parts Commons Proper, Commons Sandbox and the Commons Dormant. Commons

Linux (CentOS 5.x) under the memcached configuration installation

1. Yum install gcc 2. Cd / tmp 3. Wget ~ provos/libevent-2.0.4-alpha.tar.gz Note: memcached libevent uses this library for the Socket, so I also need to install libevent 4. Tar zxvf libevent-2.0.4-alpha.tar.gz 5. Cd libevent-2.

java code to regulate the time of writing

Use Hungarian notation naming convention Package naming Package names should be formed by a lowercase word. package com.neu.util Class naming Class names must start with capital letters and other letters are lowercase-word, for all identifiers, which cont

Detailed spring transaction attribute (reproduced)

Spring declarative transaction so that we get a complex transaction relief. So we no longer need to go to get a connection handle, close the connection, transaction commit and rollback operations such as these. We need no longer associated with the transa

JVM memory monitoring process instance analysis

JVM memory monitor whether you are familiar with, here to tell you briefly describe in this paper is to personally test the configuration process in detail, but not reproduced under linux do not need to modify / etc / hosts file, in fact, JDK itself has p

HtmlCleaner Html document parser

HtmlCleaner is an open source Java language Html document parser. HtmlCleaner can refresh each element of the HTML document and generate well-structured (Well-Formed) HTML document. It follows the default rule is similar to most web browsers to creat

Step by step teach you to use Proguard confuse Java source code

java code can easily be decompiled, use the following code proguard to protect our proguard many options, easily confused, it took me to write down the configuration (actual use) for reference 1 to download proguard 2. Rea

(R) mysql master-slave database configuration (windows)

System environment: Windows 2003 MYSQL version 5.1.38 1: the main server main IP Address: 2: From the server companion IP Address: 1, first stop the main server Mysql service, backup the database to ensure that from the se

H2 Database Getting Started

1. Introduction. Introduction of H2-related, here omitted. Related Home: 2. Download. Download: 3. Use. After download and install, From the "Start -" All

Oracle Applications comes with connection pool

Ojdbc14.jar package dependencies code: import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.sql.PooledConnection; import oracle.jdbc.pool.OracleConnectionPoolDataSource; /** * Oracle

JTA transactions and JDBC transactions

Under normal circumstances, J2EE application servers support JDBC transactions, JTA transactions, container-managed transactions. Here to discuss the difference between JTA and JDBC transactions. These two transactions are commonly used definition of

Oracle ranks of the exchange and vertical table horizontal table

Reproduced Ranks of the exchange Java code View photo accessories

Stored procedures commonly used techniques

Of the storage process structure 1.1 The first stored procedure Java code create or replace procedure proc1 ( p_para1 varchar2, p_para2 out varchar2, p_para3 in out varchar2 ) As v_name varchar2 (20); begin v_name: = 'Chi Master'; p_para3: =

Java code mysql import and export

Note mysql import and export must be prepared to achieve good environmental variables, such as: C: \ Program Files \ MySQL \ MySQL Server 5.1 \ bin; otherwise it will not work correctly. package cc.javaweb; import; import java.

BLOB data type of the operation into ORACLE database

Oracle's Blob field rather special, his performance is better than a lot of long fields, for example, can be used to save binary data like images. Writing Blob fields and other types of fields to write a very different way, because the Blob itself has

About ibatis how to pass arrays as arguments

Reproduced: Thank Tu Jian Kai A: Only incoming array parameter <select resultClass="EmailInfo_"> select * from MailInfo with (nolock) where ID in <iterate open="(" close=")" conjun

oracle CLOB and BLOB

First, the differences and definitions LONG: Variable length string data, up to 2G, LONG has the characteristics of VARCHAR2 columns, long text can be stored up to a table in a LONG column LONG RAW: Variable length binary data, up to 2G CLOB: Character La

Mysql Function: IFNULL, NULLIF, CASE

Today, only used a few functions as AVG (column) obtained null, not write code in java code to the sql in the. Here is the official document mysql Name Description CASE Case operator IF ()

About the database to optimize efficiency

Complex queries can be decomposed into database queries and code-level screening SQL statement is responsible for part of a simple query where = conditions, to avoid another part of the sub-query conditions related to the sub-query to the java code t

Java program to call Oracle stored procedure

A: no return value stored procedure Stored procedure is: CREATE OR REPLACE PROCEDURE TESTA (PARA1 IN VARCHAR2, PARA2 IN VARCHAR2) AS BEGIN INSERT INTO HYQ.B_ID (I_ID, I_NAME) VALUES (PARA1, PARA2); END TESTA; And then, when to call the java code with

Spring and Morphia, MongoDB a simple package and self-realization by ID (r)

Original Address: One pair of Spring and Morphia a simple package, aimed at Mongo's self-realization by ID and to facilitate integration with Spring. Tags: Spring, mongodb, morphia, nosql Snippet (15

Summary table space to the database method to increase

Had increased to a database or table space is system administrator dba doing live, but customers sometimes too much "trust" me, show me what living is dry, do anything but to bite the bullet and engage. Usually I encounter most of the datab
Recent Entries
Tag Cloud
Random Entries