Reprint Please specify source: http://blog.csdn.net/lhy_ycu/article/details/40021651Enjoy meta mode (Flyweight): Use shared technology to effectively support a large number of fine-grained objects. The main purpose is to realize the sharing of
Concepts: Threads and processesProcess: Simply put, a process is an application, that is, a program. Today's operating systems are generally multi-process operating systems. For example: You can open the music player at the same time, you can also
First, the recursive function, the popular saying is that the function itself calls itself ...such as: N!=n (n-1)!You define the function f (n) =nf (n-1)and f (n-1) is the function of this definition. This is recursion.Second, why use recursion: The
This series of blogs record myself learning the Java process. This series does not intend to introduce Java in all its details, but only to record its own quick learning of Java records and to provide help. By documenting your own learning so that
Dead lockA deadlock is a situation in which multiple threads are blocked at the same time, and one or both of them are waiting for a resource to be freed. The program cannot terminate gracefully because the thread is blocked indefinitely.The root
KeepAliveTime: If there are currently more than corepoolsize threads in the pool, these extra threads will be terminated when the idle time exceeds KeepAliveTime.The red Word illustrates the difference between the following two method return
Java implementation template method (TemplateMethod) Mode
Class Diagram
/*** Business process template, which provides the basic framework * @ author stone **/public abstract class BaseTemplate {public abstract void part1 (); public abstract void
Fractal of the Sierpinski triangleThe generation process is: Take a solid triangle. (Most of which use equi triangles) are connected along the midpoint of the three sides and divided into four small triangles. Remove the small triangle in the middle.
Use POI to operate images in different versions of Word documents and create Word documents
We all know that the most common technology to use java for office operations should be POI. Here I will not talk about what POI is and how it is used. Let
Leetcode: Reverse Words in a String, leetcodereverse
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What constitutes a word?A sequence
Custom progressdialog to improve user experienceCustom progressdialog to improve user experience
:
Specific implementation methods:
1. Define the Layout of Dialog
2. Set the animation anim
3. Create a custom dialog Style
4. Create a common method
Core Ajax objects-Quick Start With XmlHttpRequestIntroduction:
For non-TGB instances, skip this step ......
After JQuery started school, the computer stopped for a while. When I got bored one day, I took my BS stuff and looked at it again. I found
Struts2 no extension
Many of struts2's friends want to modify or remove the action extension. This article helps you implement
Struts2-core-2.3.16.jar,: http://repo1.maven.org/maven2/org/apache/struts/struts2-core/2.3.16/
Org. apache.
Use of JUnit Rule
Brief Introduction to the simple usage of JUnit Rule. Prepare for source code analysis on JUnit.
Rule is a annotation used to test a unit class. For example, if MyTest defines a field, the field must be public, not static, and a
Search and replace strings
Search for the target string in the string and replace it with the specified string. The number of replacement times is returned. The interface is
Int find_str_replace (char * & str, const char * find_str, const char *
Java list deduplication with one line of codeUnsupported Syntax 1. No type Syntax:
List listWithoutDup = new ArrayList(new HashSet(listWithDup));2. Write the String type ):
1) Java 7:
List
listWithoutDup = new ArrayList
(new HashSet
Java Decorator Mode
In Java, many classes in the I/O package are the embodiment of the typical modifier mode, such:
NewBufferedOutputStream (OutputStream out)
NewBufferedInputStream (InputStream in );
NewPrintWriter (OutputStream
Fast Sorting Algorithm
Algorithm principleQuick sorting adopts the concept of "divide and conquer.The Divide and conquer policy is used to Divide a sequence (list) into two subsequences (sub-lists ).
Steps:
1. Pick out an element from the series,
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