java multithreaded programming -- thread pool

reference resources: https://blog.csdn.net/qq_27581243/article/details/86650682 https://www.cnblogs.com/zincredible/p/10984459.html Thread is a heavyweight resource. The creation, startup and destruction of threads consume system resources. At the same time, it is limited by system resources. The relationship between the number of threads and ...

Posted by yumico23 on Mon, 29 Nov 2021 17:18:16 -0800

Java web learning notes day02--JavaScript

JavaScript JavaScript overview summary Is a scripting language that is parsed and executed directly by the browser Development history In 1995, Netscape developed a client script language: LiveScript. Later, experts from SUN company were invited to modify LiveScript and name it JavaScriptIn 1996, Microsoft copied JavaScript and developed JS ...

Posted by eZe616 on Mon, 29 Nov 2021 17:17:48 -0800

Spring highlights summary

spring is actually a container, and IOC is one of them to collect our objects IOC create object User public class User { private String name; public User(){ System.out.println("User Nonparametric structure of"); } public String getName() { return name; } public void setName(String name) { ...

Posted by eleven0 on Mon, 29 Nov 2021 16:18:12 -0800

Source code analysis of ConcurrentHashMap

1, Why use ConcurrentHashMap Using HashMap in concurrent programming may lead to program loop, but using thread safe HashTable is very inefficient. In order to solve this problem, ConcurrentHashMap came out. 1) For thread unsafe HashMap, in a multithreaded environment, using HashMap for put operation will cause an endless loop (JDK1.7), which ...

Posted by deathrider on Mon, 29 Nov 2021 15:46:01 -0800

LeetCode brush questions - perfect rectangle

Preface description Algorithm learning, daily problem brushing records. Topic connection Perfect rectangle Topic content Give you an array of rectangles, where rectangles[i] = [xi, yi, ai, bi] represents a rectangle with parallel coordinate axes. The lower left vertex of the rectangle is (xi, yi) and the upper right vertex is (ai, bi). Re ...

Posted by sgoku01 on Mon, 29 Nov 2021 15:25:38 -0800

Login registration interface test

Make a simple login registration page In the past few days, I have learned about the java graphical user interface (GUI) and started to make a simple login interface. I don't talk much nonsense 1. Login interface The so-called design of a UI interface is nothing more than two layered modules: one UI display design involves some aesthetic con ...

Posted by drew69 on Mon, 29 Nov 2021 14:06:09 -0800

Computer exercises

13. Given two strings containing only lowercase letters, calculate the length of the maximum common substring of the two strings. Note: the definition of substring refers to a string formed after deleting some prefixes and suffixes (or not deleted). import java.util.*; public class Main{ public static void main(String[] args) { Sca ...

Posted by wesley1189 on Mon, 29 Nov 2021 13:41:36 -0800

String to integer (atoi)

Title: Please realize one   myAtoi(string s)   Function to convert a string into a 32-bit signed integer (similar to the atoi function in C/C + +). function   The algorithm of myAtoi(string s) is as follows: Read in the string and discard useless leading spaces Check whether the next character (assuming it has not reached the ...

Posted by bryson on Mon, 29 Nov 2021 13:28:35 -0800

Distributed transaction solution

Distributed transaction solution Distributed transaction What is distributed transaction It means that a large operation consists of different small operations distributed on different servers. Distributed transactions need to ensure that these small operations either succeed or fail. In essence, distributed transaction is to ensure the data c ...

Posted by michaeru on Mon, 29 Nov 2021 12:19:03 -0800

ConsumeQueue for source code analysis

ConsumeQueue for source code analysis When sending a message, the data is displayed in the ConsumeQueue Five messages are sent continuously. The messages are of variable length. First, all information is put into the Commitlog. Each message needs to be locked when it is put into the Commitlog to ensure sequential writing. ​ After the Comm ...

Posted by adnan1983 on Mon, 29 Nov 2021 11:06:44 -0800