IO multiplexing (select, poll, epoll)

The TCP server can be explained with the following diagram: Welcome is equivalent to listenfd, which has been listening to the client's requests. When a customer arrives, guide the customer to the waiter in the lobby. At this time, a connection is established. The lobby waiter is equivalent to connfd, and all interactions with the current clien ...

Posted by egiblock on Sun, 28 Nov 2021 13:28:56 -0800

Learning Java concurrency tools -- CountDownLatch and CyclicBarrier

preface Continue to briefly summarize the tool classes for concurrent process control in Java. This article summarizes CountDownLatch and CyclicBarrier CountDownLatch Latch means door latch in Chinese. CountDown means CountDown. Count down to 0 and the door latch is opened. You can see the usage scenario of this tool from the name. For e ...

Posted by webAmeteur on Sun, 28 Nov 2021 13:16:17 -0800

Merge and sort: solve the problem of small sum and reverse order pairs

1, Small and problems 1. Title Description: In an array, the numbers on the left of each number that are smaller than the current number are added up, which is called the small sum of the array. Find the small sum of a given array. 2. Example: The array is: [1,3,4,2,5] 1 the number smaller than 1 on the left: No 3 the number smaller than ...

Posted by porco on Sun, 28 Nov 2021 10:30:33 -0800

String of Redis core data structure

From common String commands to actual application scenario requirements design and development, this chapter enables you who are unfamiliar with redis to quickly master and understand, and you who are familiar with redis to quickly consolidate relevant knowledge 1, Characteristic description (1) String is the most basic type of Redis. A key c ...

Posted by chrisdee on Sun, 28 Nov 2021 09:25:55 -0800

Java0 Basics_ day18_ Front end and back end integration of Java Web_ Ajax

Tags: JavaScript front end, HttpServlet back end, XML JSON mediation   1. Introduction to Ajax Ajax is an asynchronous combination of JS and XML, which can be understood as a new method. It integrates the front-end JavaScript, HTML, CSS, DOM programming and the back-end httpservlet Tomcat and Mysql databases. JS is used to create asynchr ...

Posted by jrinco11 on Sun, 28 Nov 2021 08:21:46 -0800

Actual combat and source code analysis of Alibaba micro service component Nacos configuration center

1, Nacos configuration center Official documents: https://github.com/alibaba/spring-cloud-alibaba/wiki/Nacos-config Nacos provides key/value storage for storing configuration and other metadata, and provides server-side and client-side support for externalized configuration in distributed systems. Using Spring Cloud Alibaba Nacos Config, ...

Posted by jOE :D on Sun, 28 Nov 2021 06:30:01 -0800

new and delete overloads, templates

new and delete Tmp* p=new Tmp();------new operator(Not reloadable) Request memory (call) operator new)Can overload Call construct delete p ;-----delete operator((not reloadable) Call destructor Memory release(operator delete)Can overload void* operator new(size_t size)overloaded function { cout<<"void* operator new(size_t siz ...

Posted by Fredix on Sun, 28 Nov 2021 06:10:33 -0800

[String class, static keyword, Arrays class, Math class]

Java Foundation Chapter 8 String class, static keyword, Arrays class, Math class (most of the commonly used methods are listed in the article. For details of other methods, please refer to the API document) String class Overview of String class summary The java.lang.String class represents a string. All string literals (such as &qu ...

Posted by squariegoes on Sun, 28 Nov 2021 03:55:48 -0800

C language selection structure and loop structure

1, Select structure 1. if select statement (1) Single branch if statement Syntax structure:   if(Conditional judgment expression){ sentence; } If the value of the conditional judgment expression is true, execute the statement; If false, the statement is not executed. Example: enter two integers and output the largest of ...

Posted by Kane250 on Sun, 28 Nov 2021 02:04:29 -0800

[Spring Boot quick start] 20. Spring Boot implements logging based on AOP annotations

preface   in many background management systems, there are clear permissions and role control, and of course, there is no lack of operation log records. This article will develop a logging function based on the AOP feature of Spring. Let's record the whole development project Quick start    using the AOP feature of Spring, fir ...

Posted by alsal on Sat, 27 Nov 2021 22:28:09 -0800