Description: This is "Dahua design pattern" a Book of Learning abstracts and online related information Digest, the original book code examples in C # write, the following Java rewrite.
1. Agent mode: Provides a proxy for other objects to
This is a test example of how the object is invoked by reflection. Testref.java import Java.lang.reflect.Method;
Import java.lang.reflect.InvocationTargetException;
/**
* Created by IntelliJ idea.
* File:TestRef.java
* User:leizhimin
* Date:2008-1-
I can't remember peek poll. A large pile of operations, record the difference deque interface
AddFirst AddLast
Offerfirst Offerlast
Removefirst Removelast
Pollfirst Polllast
GetFirst GetLast
Peekfirst Peeklast
(Push pop stack operation is
Nonsense has been implemented in Java encryption phone number, there is a specific encryption process annotation this inside said, this article I directly on the code.
Please see:
/** * @Title: Testmain.java * @Package org.test * @Description:
1. Scene Restore
recently in the project's front-end project, there is such a demand: random generation of verification code, click on the image verification code can also replace the verification code, and transmission to the background
First, the processing of the array of println methods is first converted to string type, we can enter the println source code look, I was creating a string array to look at the next
public void println (Object x) {
String s =
public class Util {public static string Deunicode (String content) {//convert 16 number to Chinese charactersString Enunicode=null;String Deunicode=null;for (int i=0;iif (enunicode==null) {Enunicode=string.valueof (Content.charat
With the frontline synchronization only know the Synchronize keyword, then know that there is a lock, why also have a lock to achieve synchronization? Synchronized's limitations occupy the lock thread waiting for IO or other reasons to be blocked,
1. A method for qualifying the end of a string (example: Let the end not contain,-,,)while (Strtrue.endswith ("+") | | Strtrue.endswith ("-") | | Strtrue.endswith (","))//filter out the end of the + + numberStrtrue=strtrue.substring
Import java.util.*;
/**
Interview questions:
Array element Lookup:
1, ordinary array element lookup
2, two-point search
3, Interview questions: The use of two-point search method
4, with Java internal function arrays.binarysearch array binary search,
Java format time to milliseconds:
SimpleDateFormat formatter = new SimpleDateFormat ("dd-mmm-yyyy HH:mm:ss:SSS");
String formatstr =formatter.format (new Date ();
Appendix:
Java formatted alphabet
Symbol
meaning
Presentation
Java simulation Post/get Way to send data the main method is in the post
Import java.io.*;
Import java.net.HttpURLConnection;
Import Java.net.URL;
Import Java.net.URLEncoder;
public class Httpurl {private static final String TAG = "NetUtils";
Package Com.youku.paycenter.admin.subGate.service.impl;
Import java.io.UnsupportedEncodingException;Import Java.util.regex.Matcher;Import Java.util.regex.Pattern;
public class TestString{
public static final String chinese_reg_exp = "[\u4e00-\u9fa5]"
Public final class Imageutils ... {
Public Imageutils () ... {
}
Public final static String Getpressimgpath () ... {
Return Applicationcontext.getrealpath ("/template/data/util/shuiyin.gif");
}
/** *//**
* Print the picture to the picture
*
Jenkins automatically deploys MAVEN +tomcat+linux environment Java project and automatically deploys to extranet
Front
Some of the problem logs that Jenkins encountered on the CentOS system of Aliyun 1. Question one: Maven JVM terminated
Statement: This blog for the original blog, without permission, may not be reproduced. Small partners if it is in other places to see, suggest or to csdn to see it (the original link address for http://blog.csdn.net/bettarwang/article/details/2616640
The intent of the singleton pattern is to ensure that a class has only one instance in the entire JVM and provides him with a global access point.single case mode mechanismHow to prevent other developers from creating new instances of the class.You
Java General Chinese judgments are based on regular expressions
Pattern pattern = Pattern.compile ("[\u4e00-\u9fcc]+");
SYSTEM.OUT.PRINTLN (Pattern.matcher (str). find ());
Or
System.out.println (Str.matches ("[\u4e00-\u9fcc]+"));
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service