Java Dynamic agent -- principle explanation & source code analysis

Examples of using dynamic agents When it comes to Java's dynamic agent, I believe many developers are very familiar with it. However, in order to better explain and analyze the principle and source code of dynamic agent, let's first understand the actual use examples of dynamic agent: Now there is a scenario: Star Michel has two skills, sing ...

Added by jsschmitt on Wed, 09 Feb 2022 05:57:03 +0200

java multithreading: detailed explanation of ThreadLocal

Scenario: the problem of saving and obtaining the login User's information. In our conventional system design, the back-end system usually has a long call link (Controller - > Service - > Dao). Usually, after logging in, the User information will be saved in session or token. However, if we need to use User information in multiple calling ...

Added by ttroutmpr on Wed, 09 Feb 2022 04:08:27 +0200

Thread pool practice

1, Background of thread pool The creation of Java threads is very expensive and requires the cooperation of JVM and OS (operating system) to complete a lot of work: (1) A large number of memory blocks must be allocated and initialized for the thread stack, including at least 1MB of stack memory. (2) A system call is required to create and re ...

Added by bivaughn on Wed, 09 Feb 2022 02:36:41 +0200

[advanced Java] exception

Exception refers to the abnormal situation that occurs during the execution of the program, which will eventually lead to the abnormal stop of the JVM. In object-oriented programming languages such as Java, the exception itself is a class. Generating an exception is to create an exception object and throw an exception object. The way Java ...

Added by justspiffy on Wed, 09 Feb 2022 01:43:43 +0200

Elasticsearch learning notes

Elasticsearch installation Declaration: jdk1 8. Minimum requirements, Elasticsearch client, interface tool! Java development, the version of elasticsearch and the corresponding Java core jar package after us! Version correspondence! The JDK environment is normal It must be guaranteed here download Be sure to build on the server ...

Added by ari_aaron on Tue, 08 Feb 2022 18:27:33 +0200

C + + reference 10 minute introductory tutorial

C + + reference 10 minute introductory tutorial We know that the transfer of parameters is essentially a process of assignment, which is to copy the memory. The so-called memory copy refers to copying data from one memory to another. For basic types of data such as char, bool, int, float and so on, the memory they occupy is often only a few b ...

Added by LostOne on Tue, 08 Feb 2022 12:41:19 +0200

Understanding and basic usage summary of smart pointer in C + +

1 overview of smart pointer There is no doubt that the smart pointer is more intelligent than the ordinary bare pointer (that is, the pointer of the object we directly use new). The most clear embodiment is that it can automatically help you manage the problem of memory leakage. In other words, using the smart pointer does not require you ...

Added by dineshsjce on Tue, 08 Feb 2022 11:19:51 +0200

[lua language from bronze to king] Part 2: building a development environment + examples of three editors

preface In the previous chapter, we introduced the past and present lives of lua. Although we didn't see many small partners, we didn't recommend it, and there was no traffic; Most people think there is no nutrition. In fact, I personally don't think so: "if you like a language, do you need to understand the origin of the language; why di ...

Added by edkellett on Tue, 08 Feb 2022 09:22:42 +0200

Interface in Java

Basic introduction Interface is to give methods that are not implemented at one time, package them together, and write these methods according to the specific situation when a class is to be used. Syntax: interface interface name{ Attribute + method } class name implements interface{ Own properties / / methods } Note: before jdk7, there ...

Added by donnierivera on Tue, 08 Feb 2022 09:05:25 +0200

Name masking in C + + inheritance

Name masking in C + + inheritance If the members in the derived class (including member variables and member functions) have the same name as the members in the base class, the members inherited from the base class will be masked. The so-called masking means that when using this member in a derived class (including when defining a derived clas ...

Added by serial on Tue, 08 Feb 2022 04:53:38 +0200