QA Official

Analysis of Interrupt, Exception, System Call, Trap and Other Concepts in Linux System

https://qaofficial.com/post/2019/04/09/69639-analysis-of-interrupt-exception-system-call-trap-and-other-concepts-in-linux-system.html 2019-04-09
Interrupt: for communication between the equipment and Central Processor.Typical examples are service requests, task completion reminders, etc.For example, we are familiar with the clock interrupt, hard disk read-write service request interrupt. The occurrence of interrupt is independent of whether the system is in user state or kernel state, and only depends on one flag bit (interrupt enable bit) in the EFLAGS register.We are familiar with sti, cli two instructions are

Differences and Similarities among Interrupt, Trap and softirqs

https://qaofficial.com/post/2019/04/09/69654-differences-and-similarities-among-interrupt-trap-and-softirqs.html 2019-04-09
Interrupt is external interrupt, which refers to interrupts from outside the processor and memory, including I/O interrupts from I/O devices, external signal interrupts, clock interrupt caused by various timers, debugging interrupts caused by breakpoints set in debugging programs, etc. Traps are internal interrupts, which mainly refer to interrupts generated inside the processor and memory.It includes various errors caused by program operation.Softirqs is a signal communication method used to simulate hard

Dynamic Proxy (III) ---Cglib Two Proxy Methods

https://qaofficial.com/post/2019/04/09/69739-dynamic-proxy-iii-cglib-two-proxy-methods.html 2019-04-09
Cglib generated proxy object codeComments have been added. // // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package com.cglib.test; import com.cglib.test.TestMain.TestBean; import java.lang.reflect.Method; import net.sf.cglib.core.ReflectUtils; import net.sf.cglib.core.Signature; import net.sf.cglib.proxy.Callback; import net.sf.cglib.proxy.Factory; import net.sf.cglib.proxy.MethodInterceptor; import net.sf.cglib.proxy.MethodProxy; public class TestMain$TestBean$$EnhancerByCGLIB$$784df3e2 extends TestBean implements Factory { private boolean CGLIB$BOUND; private static final ThreadLocal CGLIB$THREAD_CALLBACKS; private static final Callback[] CGLIB$STATIC_CALLBACKS; private MethodInterceptor CGLIB$CALLBACK_0; private static

How does Spring Dynamic Agent Decide to Use jdk Agent and cglib

https://qaofficial.com/post/2019/04/09/69718-how-does-spring-dynamic-agent-decide-to-use-jdk-agent-and-cglib.html 2019-04-09
Spring AOP uses JDK dynamic proxies or CGLIB to create proxies for target objects.(It is recommended to use JDK's dynamic proxy as much as possible) JDK dynamic proxy is used if the target object being proxied implements at least one interface.All interfaces implemented by this target type will be proxied.If the target object does not implement any interfaces, a CGLIB proxy is created.If you want to force CGLIB proxy (for example, you want to proxy all the methods of the target object, not just the methods that implement the self-interface), you can also do so.

Install python36 and pip3, Tensorflow offline

https://qaofficial.com/post/2019/04/09/69686-install-python36-and-pip3-tensorflow-offline.html 2019-04-09
Check the following two blogs first:QCloud Installs python36 and pip3, TensorflowYum downloads the installation package but does not install it The method of online installation of python36, pip3 and Tensorflow is described above. The method of offline installation is similar to online installation, but the dependency and record of yum and pip packages must be recorded. general outline This article is divided into two routes. The first route is to

Operating System-Traps, Interrupts, Exceptions

https://qaofficial.com/post/2019/04/09/69652-operating-system-traps-interrupts-exceptions.html 2019-04-09
Traps, interrupts and exceptions are common terms in the operating system. They run through the learning process of the operating system. This article mainly distinguishes between them. Trap The computer has two operating modes: user mode and kernel mode.Wherein the operating system runs in a kernel state, and in the kernel state, the operating system has full access to all hardware and can enable the machine to run any instruction;On

Selective Sorting-C # Implementation

https://qaofficial.com/post/2019/04/09/111717-selective-sorting-c-#-implementation.html 2019-04-09
One Algorithm Description Selection sort is a simple and intuitive sort algorithm.Its working principle is to select the smallest (or largest) element from the data elements to be sorted each time and store it at the beginning of the sequence until all the data elements to be sorted are sorted out. 2 Algorithm Implementation (C#) 1 is used for ascending sorting of integer arrays public static void SelectionSort(int[] array) {

Traps in Java

https://qaofficial.com/post/2019/04/09/69648-traps-in-java.html 2019-04-09
There are five general ways to create objects in Java:   1. Create Java objects by calling the constructor new; 2. Create the object by calling the constructor through the Class object's newInstance () method; 3. Recover objects from IO stream through the deserialization mechanism of Java; 4. Copy an object through clone method provided by Java object; 5. Basic types and String types can be directly assigned direct quantities.

Use @Aspect in Spring to Control Custom Annotations

https://qaofficial.com/post/2019/04/09/69742-use-aspect-in-spring-to-control-custom-annotations.html 2019-04-09
Use @Aspect in Spring to Control Custom Annotations reprint an introduction @Aspect 1. Define System Log Annotation [email protected](ElementType.METHOD)@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @interface SysLog { String value() default ""; } 2. Define tangent plane processing classes package com.kxs.common.aspect; import com.google.gson.Gson; import com.kxs.common.annotation.SysLog; import com.kxs.common.utils.HttpContextUtils; import com.kxs.common.utils.IPUtils; import com.kxs.modules.sys.entity.SysLogEntity; import com.kxs.modules.sys.entity.SysUserEntity; import com.kxs.modules.sys.service.SysLogService; import org.apache.shiro.SecurityUtils; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Method; import java.util.Date;

in-depth understanding of Java Proxy mechanism

https://qaofficial.com/post/2019/04/09/69740-in-depth-understanding-of-java-proxy-mechanism.html 2019-04-09
Dynamic Proxy is actually the Java. lang. reflection. proxy class dynamically generates a class byte according to all interfaces you specify, which inherits the proxy class and implements all interfaces you specify (the array of interfaces you pass in in the parameters);Then use the classloader you specified to load class byte into the system, finally generate an object of such a class, and initialize some values of the object, such as the invocationHandler, to be the Method members corresponding to all interfaces.