attention to this point.
2. Main components
Good power, no lack of good detail
Large electrolytic capacitors, Schottky diodes, transistors and so on, the selection of these components directly affect the life of the power supply. Some manufacturers to reduce costs, the use of old materials, but manufacturers can not know the old devices still have how much life, it is likely that the factory soon, the device's life, light power outages, heavy device explosion. In addition, the ca
Set upTextViewa string on a widget on Android
newInstance()creates an object using a static methodTransformerFactory. As shown in Listing 9,factoryan object is created using the object'snewTransformer()methodTransformer.
Listing 9. Create a Transformer object
Transformerfactory factory = Transformerfactory.newinstance ();
Transformer
In the jdk5.0 version, a new interface java.lang.instrument.Instrumentation is added, which can be used to modify the byte code of the class when the class is loaded, and to change the implementation of the function of the class. In this way, we can implement the functions of AOP, which is another kind of AOP implementation different from proxy dynamic proxy.
The principle of this method is very simple, that is, by modifying the compiler has compiled the bytecode to modify the class, and we usua
"2010/3/8"
1:Array_pop ($array ());//php Delete the last element of the arrayArray_shift ($array ());//Delete First element
2:java1.5 written on the program, let put on the java1.4 server running, how to do, Internet search a bit,The following bytecode conversion tool converts 1.5 compiled *.class files to 1.4, with a tool called Retrotranslator.How do you retrotranslator from the command line?
1. Download and unzip the binary distribution file Retrotranslator-n.n.n-bin.zip, where N.N.N is the
Heartbeat error: attempted replay attack, heartbeatattempted
Two lvs servers are configured for heartbeat hot backup. However, an error is reported after the configuration is started:
Jan 28 15:50:22 usvr-211 heartbeat: [2266]: ERROR: should_drop_message: attempted replay attack [usvr-210]? [Gen = 1418354318, curgen = 1418354319]Jan 28 15:50:24 usvr-211 heartbeat: [2266]: WARN: nodename usvr-210 uuid changed to usvr-211Jan 28 15:50:24 usvr-211 heartbe
Heartbeat error attempted replay attack
Two lvs servers are configured for heartbeat hot backup. However, an error is reported after the configuration is started:
Jan 28 15:50:22 usvr-211 heartbeat: [2266]: ERROR: should_drop_message: attempted replay attack [usvr-210]? [Gen = 1418354318, curgen = 1418354319]Jan 28 15:50:24 usvr-211 heartbeat: [2266]: WARN: nodename usvr-210 uuid changed to usvr-211Jan 28 15:50:24 usvr-211 heartbeat: [2266]:
Hadoop's automated distributed cache Distributedcache (the new version of the API) is often used in the write MapReduce program, but executes in eclipse under Windows, with an error similar to the following:2016-03-03 10:53:21,424 WARN [main] util. Nativecodeloader (nativecodeloader.java:2016-03-03 10:53:22,152 INFO [main] Configuration.deprecation (Configuration.java:warnOnceIfDeprecated (1019))- Session.id is deprecated. Instead, use Dfs.metrics.ses
flexibly control the opening or closing of any granularity of log information without modifying the code, and then use the custom format to output the log information to one or more places that you need. And, log4j also has a smooth learning curve, in three minutes to learn its simple use. As you go deeper, you will find that the log4j function is powerful enough to meet all the requirements of the log.Quick StartLook at a piece of code first and see how easy log4j is, and the code is as follow
Recently made a Sina Weibo crawler, using the httpclient-4.3.3, the program runs very well, that is, there will always be a cookie rejected warning, log as follows:
2014-06-05 10:27:17.417 [main] WARN O.a.h.c.p.responseprocesscookies-cookie rejected [u_trs1=] 000000ea.ef542aa2.538fd58b.ec8a8e2c ", version:0, domain:.sina.com.cn, path:/, Expiry:sun June 10:27:23 CST 2024] Illegal domain attribute "sina.com.cn". Domain of Origin: "passport.weibo.com"
Do not get webservicecontext property from stateless bean context, it shoshould already have been injected
This is mainly because of the stateless bean implementation class.
After careful viewing, I found that I added @ webmethod before every method of the implementation class (specifying the method exposed to the outside world), so I can remove it.
13:41:39, 168 warn [statelessbeancontext] EJBTHREE-1337: do not get webservicecontext property
performed, which improves the situation. However, the out of memory situation still occurs after 2-3 days of running, later, I analyzed the log file messages and found the bold part. The analysis was caused by insufficient low memory. Later I tried to use sync; Echo 3>/proc/sys/Vm/drop_caches to release the memory, check whether/proc/buddyinfo memory is released. Jun 10 13:33:11 XX user. Warn kernel: DMA free: 3548kb min: 68kb low: 84kb high: 100kb a
LOG4J supports two configuration file formats, one is the Java property file (the key-value) and the other is the XML format file.
Here is a description of how to configure the Java properties file.First look at the configuration file: Log4j.properties
Log4j.rootcategory=debug,stdout,r
Log4j.appender.stdout=org.apache.log4j.consoleappenderLog4j.appender.stdout.layout=org.apache.log4j.patternlayoutlog4j.appender.stdout.layout.conversionpattern=%5p [%t] (%f:%l)-%m%n
Log4j.appender.r=org.apache.log
.
Tracemode
Set the trail mode: sortbycategory or sortbytime.
Method
Description
Warn
The trace information is displayed in red.
Write
Write tracking information.
To program to disable tracing, you can use the following statement in the load event of webform1:
Trace. isenabled = false
In our example, the trace information is not explicitly
, and an optional addtivity property.
name:Used to specify a package or a specific class that is subject to this loger constraint.
Level:Used to set the print level, case-insensitive: TRACE , DEBUG INFO , WARN , ERROR all , 和 OFF ,还有一个特俗值 inherited 或者同义词 NULL ', which represents the level of enforcement of the ancestor.If this property is not set, the current Loger will inherit the level of the ancestor.
addtivity:Whether to pass
trace attribute in the Page object is an instance of a TraceContext class. The TraceContext class provides two methods: Write and warn, which allow statements to be written to trace records. Each method is overloaded and allows you to specify trace categories, text messages, and optional error messages. The only difference between the two methods is that the Warn method displays its text in red.
Note When
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.