Sina Weibo • Open platform: http://open.weibo.com/I want to write an application needs Sina Weibo user authentication, made a variety of errors 1 days, reference to a large number of online interpretation finally succeeded,
Experience to write down
Methods and steps to analyze the high CPU usage of Java threads:
1) To view the CPU occupancy rate TOP10 PID
[Root@qipsuit1 ~]# Ps-aux | Sort-k3nr | head-10
Warning:bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.8/faq
root 30428 1
How to use the Split function in Java
There are also String.Split () methods in the Java.lang package, similar to. NET, where returns are a character array, but there are a few tricks to use.If executed: "2|33|4". Split ("|")
The result is:
""
2
|
3
Everyone knows that a Java application project can be packaged into a jar, and of course you have to specify a main class with a main function as the program entry for your jar package.
The specific method is to modify the Manifest.mf file in the
Java non-repetitive random number generation
Import java.util.*;public class test{public static void Main (string[] args) {Generate [0-n] a random number that is not repeated/ST To save these random numbersArrayList list = new ArrayList ();int n = 10
The following can be directly used to run, you can also download the attachment package directly, the compiler can see the effect of running directly.
//objectsort
Package sort;
Import java.util.ArrayList;Import java.util.Collections;Import
In the field of Object-oriented programming, a class is inherited from a class, such as a parent-child relationship in the Java world that requires only the extends keyword to determine the two classes, but in the world of relational databases,
XML transformations are a necessary and common task. Here is an example of XML conversion to HTML:
Myxml.xml:aaaa1aa1
Myxsl.xsl:Xmlns:xsl= "Http://www.w3.org/1999/XSL/Transform" >
this is a xsl2xml test
title:
The Java.util package contains a series of important collection classes. This article will start with the analysis of the source, in-depth study of the internal structure of a collection class, as well as traversing the collection of iterative mode
For debugging purposes, we need to print the method name as well as the current PID and Tid. Here's one way:
First, import android.os.Process, and then, where needed, print:
Import android.os.Process;
...
LOG.V (TAG, New Exception ().
Jswiff is an open source, Java-based Operation Macromedia Flash file framework that can create, and manipulate flash files.
Jswiff also provides Jswiff investigator, which can directly analyze the structure of existing SWF files and get information
Introduction to Transactions
in general, the Java EE Application Server supports JDBC transactions, JTA (Transaction API) transactions (typically managed by a container). In general, it is best not to use the above three transaction types in
Project Address:http://www.freeteam.cn/Integration Rule ManagementManagement loyalty processing rules for member operations . Integration Rule ManagementClick on the integration rules from the admin menu on the left.Add an integration ruleClick the "
1. Modification of Engineering documentsLocate the Project Workspace directory, open the. project file, locate the: code snippet, add the following to the code snippet, and Save:org.eclipse.wst.common.project.facet.core.natureorg.eclipse.wst.common.
A regular expression was used in the most recent Java project to crawl the contents of the Web page, but it was clearly the correct regex, but the matcher.find times was wrong: public static list Findstrs (STRINGREGX,STRINGSOURCESTR)
One, for loopFormat: for (loop variable initial value setting; loop condition Boolean value; statement executed after each loop) {Circulation body;}Execution process: Initial value setting is calculated first.The Boolean value is then computed, and
Author Chen Yaahua article reprint exchange please contact [email protected]This paper mainly introduces the related theory of cache in large-scale distributed system, the common caching components and the application scenarios.1 Caching Overview2
Directory
Basic concepts
Types of Mbean
Standardmbean
Dynamicbean
Modelmbean
How JMX is implemented
How to use Standardmbean
How JMX services are accessed
Jmx--notifications
Basic
1. Actually the first Java program is very simple, but when you write your first Java program, you need to pay attention to the following things:
Understand the running environment of Java programs
Verify that your Java environment
Java programming language has been developed since Jiuqi years, has been the language of the Darling, and Java20 for years, is because the advantages of the Java language too much, with the development of internet companies, software companies, Java
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