Regular expression's regular character:A: Characterx character X, any character represents itself.\ \ backslash Character\ r Enter\ nthe line breakB: Character class[ABC] A, B, or C, any character at a time.[^ABC] Any character except A, B, or
For generics this chapter, when starting to write the frame, did not pay attention to the details, resulting in many methods or the wrong design of the class. This book makes up for me a short board at this point. The approximate summary is as
Day24: Multithreading "Wait for wake-up mechanism"Wait for wake mechanism [Object]Wait (): Leave the thread in a wait stateNotify (): Wake-up waiting threadWhen implementing or overriding a parent class method, the subclass can only try catch if
The Java filter is loaded when the service container is started, and its load order is consistent with the order of registration in Web. Xml.SERVLET3.0 below, you need to register in Web. XML with the following definitions.
Same point:
All inherits from Abstractlist and implements the list interface
Both Randomaccess and cloneable interfaces are implemented.
The default array size is 10
All support iterator traversal
Different points:
Pass in the corresponding file collection object that needs to be packaged When the file path is published to the production environment, it can be changed to*/File File = new file (Request.getsession (). Getservletcontext (). Getrealpath
Process Age:Wash the dishes after dinner---"Wash your hands before meals----"Dinner public interface Dinner {//meal method public void Havedinner ();} Delegate class public class Mydinner implements Dinner {@Overridepublic void Havedinner ()
Create a byte arraybyte[] bytes = new BYTE[10];Wrap a byte array into a bufferBytebuffer buf = bytebuffer.wrap (bytes);Retrieve bytes between the position and limit(see putting Bytes into a bytebuffer)bytes = new byte[buf.remaining ()];Transfer
Java object-oriented programming to organize athree major features:Package: EncapsulationInheritance: InheritancePolymorphic: PolymorphismTo create an object:person per = null; declaring objectsper = new person (); Instantiating an ObjectOrPerson
Just beginning to touch Java, always hear AOP technology is the aspect-oriented programming technology, has been very confused, what it is, what to do with, the implementation of the principle of what. Make a summary here today.Let's start by
1. Appearance mode (facade)Know the principle at least: a class should interact with the other classes as little as possible , making the classes relatively independent and the system functional modules relatively independent.Definition: Reduce the
Lintcode: Two Strings Are Anagrams, lintcodeanagrams
Write a method anams (s, t) to decide if two strings are anagrams or not. ExampleGiven s = "abcd", t = "dcab", return true
O (N) time, O (1) space
1 public class Solution {2/** 3 * @ param s:
1. Two Sum, twosum
Question:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum shocould return indices of the two numbers such that they add up to the target, where index1 must be
Java Design Pattern policy patternThis article continues to introduce the strategy modes of the 23 design patterns series.Background this situation is often encountered in software development. There are multiple algorithms or policies for
Custom dialog ----- activity
Generally, the dialog style that comes with android does not meet your requirements. Therefore, you must customize the dialog style.
In fact, the activity can also exist in the form of dialog. We only need to set its
Description of the Request Parameter url of struts2 and the integration of struts2 and Spring
When using struts2, we all know that the previous discrete value is used as the transmission unit. Their request url is written as follows: localhost: 8080/
Smart pointer (use count)STL smart pointer usage
Auto_ptr
Pi (new int (1024 ));
Define smart pointer class (use count)
Implementation Code:
Class RealPtr {friend class AutoPtr; int * ip; size_t use; RealPtr (int * p): ip (p), use (1 )
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