Java parenting classic 3: if and switch conditional structure

Dad: have you finished your homework last time? Define your own variables and calculate the area of a triangleEvaluates the value of the specified expression Son: according to what I said last time, I soon made it! You said before that you can use if conditional structure to judge. Can you tell me about it? Dad: arrangement boolean typ ...

Added by twomt on Sun, 02 Jan 2022 03:05:27 +0200

C++ STL learning notes - vector

preface Vector is a vector type. Like a container, it can store any type of dynamic array and increase and reduce data. Unlike arrays, which can only be static space, the implementation of vector uses pointers. vector is part of the C + + standard template library. It is a multifunctional template library and function class that can operate a ...

Added by findshorty on Sun, 02 Jan 2022 03:02:51 +0200

In depth of Java thread pool: from design idea to source code interpretation

Why do I need a thread pool We know that the common way to create a thread is new Thread(), and every time new Thread(), a thread will be re created, and the creation and destruction of threads will take time, which will not only consume system resources, but also reduce the stability of the system. In jdk1 There is an executor in the JUC pack ...

Added by LordTyphon on Sun, 02 Jan 2022 01:54:06 +0200

A few things you need to know about java synchronized?

Key points of this paper This article mainly talks about the principle of synchronized lock expansion. It will expand the logic of lock expansion from the source code and explain why the designer should do so from the source code. synchronized analysis Because there are many articles on the Internet about the whole synchronized analysis, t ...

Added by welshmike on Sun, 02 Jan 2022 01:14:08 +0200

asyncio of python asynchronous programming (million concurrent) - Sun cool College

Sun cool College: https://shareku.ke.qq.com/             Micro signal: Please specify shaku college QQ group: 979438600         Due to the existence of GIL (global lock), python can not give full play to the advantages of multi-core, and its performance has been criticized all the time. However, in IO intensive network programming, asynchrono ...

Added by Trevors on Sun, 02 Jan 2022 01:00:47 +0200

Problems using buffer object pool (sync.Pool) (forward + summary)

sync.Pool can improve throughput in high concurrency scenarios, but improper use will lead to serious problems. Here is a detailed review of the problems encountered this time. # preface The problem of missing body always occurred in the test simulation environment before. After a long time of troubleshooting, the reason was finally found. Th ...

Added by A JM on Sun, 02 Jan 2022 00:41:16 +0200

This is the complete collection of Java zero basics and java reflection mechanism recommended by architects in front-line factories. You only need to read this article

Use of reflection 1: reflection of Constructor Again, we can construct a new Student through a public null parameter, but we cannot construct a new private full parameter. Student student = new Student(); Now let's construct the reflection constructor (create an instance in the form of reflection) public static void main(String[] args ...

Added by barrow on Sat, 01 Jan 2022 23:42:43 +0200

Java Date Computing, Formatting Tool Class

Java Date Computing, Formatting Tool Class Preface Use Date calculations when writing your project, such as getting data for the last month, to calculate the date 30 days ago from the current date, then place it in SQL for queries. Although I have calculated before, I always forget that I need to search every time I use it, so I want to do a ...

Added by onicsoft on Sat, 01 Jan 2022 22:40:12 +0200

Coding principle analysis (with java coding principle analysis)

FileOutputStream fileOutputStream = new FileOutputStream("module-11\\data\\out.txt"); fileOutputStream.write(100); fileOutputStream.write(35); FileInputStream fileInputStream = new FileInputStream("module-11\\data\\out.txt"); System.out.println(fileInputStream.read());// 1 ...

Added by RosieisSweet on Sat, 01 Jan 2022 18:41:55 +0200

Learn python from scratch day 3

Pre questions: Q1: what do lists and tuples belong to? Q2: what are the similarities and differences between lists and tuples? Learning content: 1. Definition of sequence. 1. List features, creation and common operations. 2. Characteristics, creation and common operations of tuples. Learning output: 1. Sequence 1.1 definitions A meth ...

Added by russian_god on Sat, 01 Jan 2022 16:38:06 +0200