The examples in this article describe the regular tool classes for Java implementations. Share to everyone for your reference. Specifically as follows:
The regular tool class implemented here is applicable to: regular telephone number, mailbox, QQ number, QQ password, mobile phone number
The Java code is as follows:
Thread Affinity
Why thread CPU affinity is required
Applications are executed in a multi-threaded manner, most of which can be reasonably scheduled. In some cases, however, an important thread is paused, and the time slice is assigned to an irrelevant thread. When a thread is paused for hibernation each time and is awakened, the cache line (CPU L1/L2 cache) needs to be reloaded. When a thread's working time is short and needs to be awakened frequently, it means that the entire process is slow
IBM Heapanalyzer is a free graphical analysis tool for the JVM memory heap, which can effectively enumerate the memory usage of the heap and help analyze the cause of the Java memory leak.
Download after decompression has a Ha413.jar
Operating Environment requirements:
1, using Java 2 Platform, JDK 1.6 or to run IBM Heapanalyzer
2. Then configure the environmen
The custom tool in EditPlus uses-java:javac,javaJava JDK installation is configured as an environment variable using the%java_home% methodIn EditPlus, the shortcut tool is set to:Tool One: JavacMenu Text: JavacCommand: JavacParameter: $ (FileName)Starting directory: $ (FILEDIR)Tool Two: JavaMenu Text: JavaCommand: JavaParameters: $ (filenamenoext)Starting directo
This is a note to read Mat helper. Heap dump is a memory snapshot of the Java process at a specific time. A full GC is usually performed before the heap dump is triggered, so the contents of the dump include the object after the GC.What the dump file contains:1, all objects: class, domain, native value and reference;2, all classes: ClassLoader, class name, super class, Static domain;3,GC Root: A touch-accessible object defined by the JVM;4, line stack
= new string[cm.getparametertypes (). length];
int pos = modifier.isstatic (Cm.getmodifiers ())? 0 : 1;
for (int i = 0; i
Paramnames[i] = attr.variablename (i + POS);
//Paramnames is the name of the parameter
for(int i = 0; i
System.out.println (Paramnames[i]);
}
} catch (Notfoundexception e) {
E.printstacktrace ();
}
}
Publicstaticvoidmain (String[]args) {Classclazz= Testjavaassist.class;try{classpoolpool=classpool.getdefault (); Ctclasscc=pool.get (
Java build tool-ant Application Guide (3)
Call ant in your own program
Ant's task is actually a piece of functional code. A large number of built-in tasks of ant are of great significance for developing Java applications. Why cannot we use them directly?
Although it is not complicated to call ant tasks in a program, we know that ant tasks are actually
Sequenceinputstream can be seen as an ordered set of multiple inputstream objects. When the data of an inputstream object is read, it automatically retrieves the next inputstream object for reading until all the inputstream objects are read.
With this feature, we will compile a file splitting and merging tool.
Instructions for use:
Sequencedemo [Option] [filepath] [number]
Option:
-C: indicates the file to be merged.
-S: indicates the file to be spli
The tool execution process needs to interact with the map, and then execute the command, as shown in the following call statement.
Hoverimage = "images/selection.gif"Selectedimage = "images/selectiond.gif"Clientaction = "esrimaprectangle"Serveraction = "com. Demo. mycountfeaturetool"Clientpostback = "true"/>
For more information about clientaction, see COM. ESRI. ADF. web. faces. clientactions interface in event. The client supports map_circle, map_co
Backup a useful tool class. typeutilIts typetostring (string scope, object OBJ) method adopts the reflect mechanism of Java to print the content of any object.This is very useful for debugging programs.Usage:If you have an object (such as testclassobject) and want to print its content, you can use the following method:System. Out. println (typeutil. typetostring ("yourclassobjectname", testclassobject ));Th
S1. Json2javaautomatically generates corresponding Java entity classes based on JSon data, and also supports Parcel, Gson Annotations corresponding code generation. Expect subsequent extraction of the parent class as well as multiple URLs to build the entire project's functionalityProject Address: Https://github.com/jonfhancock/JsonToJavaOnline Demo: http://jsontojava.appspot.com/S2.jsonschema2pojoGenerates Java
Mutable parameters: When defining a method, you do not know how many parameters to defineFormat:Modifier returns a value type method name (data type ... Variable Name) {}Attention:The variable here is actually an arrayIf a method has a variable parameter, and there are multiple parameters, then the variable parameter is definitely the last1 Importjava.util.Scanner;2 public classArgsdemo {3 4 public Static voidmain (string[] Args) {5 intresult = Sum (1,2,3,4,5,6,7,8,9);//The number of numbers p
public static Turn an array into a setPrecautions:Although you can turn an array into a collection, the length of the collection cannot be changed.
Demo:
public class Arraysdemo {public static void Main (string[] args) {define an arrayString[] Strarray = {"Hello", "World", "Java"};listlistUnsupportedoperationexceptionList.add ("Java ee");UnsupportedoperationexceptionLis
In Java, the tool class defines a common set of methods that describe the most frequently used and most common Java tool classes in Java. The following tool classes, methods by popularity rankings, reference data from GitHub on a
Jstack to print out the Java stack information for a given Java process ID or core file or remote Debugging service, if it is on a 64-bit machine, the option "-J-D64" needs to be specified, and the Jstack usage of Windows supports only the following: jstack [-l][f] PIDIf a Java program crashes generating a core file, the Jstack
In comparison with Dex2jar,smali2java, this tool has at least the right result, and the first two are obviously wrong in dealing with loops, anomalies, etc.The gadget is based on Androguard production, originally wanted to write one, and then a find incredibly there are ready to use the simple Add function.Use the followingDexdecompile.exe Dexfilename OutputDirectoryLike Dexdecompile.exe c:\classes.dex C:\Test.After running, you will generate the
Array Tool class arraysSome of the static modifiers contained in the arrays class provided by Java can manipulate arrays directly. If the method in the inside is cooked, then the development efficiency will be greatly improved. The methods are described below.ListFunction: Converts the specified array or array element to a fixed-size list.Usage: String[] Strarr = {"AAA", "BBB", "VVV" }; // Us
Java 8 enhanced tool class Arrays notes, java8arrays
Make notes at willArrays tool categories are divided into two categories: Single-thread and multi-threadAll of the following statements with a subscript range are headers without tails.Single thread:1. binarySearch: The subscript of the key in the search array: binarySearch binary search. The array must be orde
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.