Builder Model of Creative Design Patterns
1 Builder schema concept
1.1 Introduction
Builder pattern is a step-by-step creation pattern for complex objects, which allows users to control the object's construction process more finely without knowing the details of the internal construction. The purpose of this model is to decouple the process of building complex objects from its com ...
Posted by gortron on Fri, 05 Jul 2019 02:36:35 +0200
Core implementation principles and source code parsing for Java thread pools (ThreadPoolExecutor)
The previous article has analyzed the Executor framework and members of its family in detail, paving the way for the introduction of this article, so analyzing the core implementation principles of ThreadPoolExecutor is a call to action. Go straight to the topic!
Start with the construction method of ThreadPoolExecutor.
Construction method o ...
Posted by NCC1701 on Thu, 04 Jul 2019 20:29:01 +0200
C# Introduction to Classic Chapter4 Process Control
4.1 Boolean Logic
Boolean comparison operator
== != < > <= >=
Boolean Operator for Boolean Value Processing
! &|^ (XOR)
Conditional Boolean Operator
&&|| Better performance than & and | e.g. & & just judge the previous Boolean value to be false and the overall value to be false without calculat ...
Posted by Bind on Thu, 04 Jul 2019 00:37:00 +0200
Thread Local Cache TLAB for JVM Source Analysis
Short Book Occupy the wolfPlease note the origin of the original, thank you!
background
Before introducing TLAB, consider a question:When creating objects, you need to request memory of a specified size on the heap. If there are a large number of threads requesting memory at the same time, you can ensure that the same block of memory will not b ...
Posted by exoskeleton on Wed, 03 Jul 2019 18:35:43 +0200
Deep Exploration of Exceptions and Error Handling in Java
The exception handling mechanism in Java is mature, and our Java programs are full of exceptions. If these exceptions are not handled in advance, there will be no debugging for future program crashes and it is difficult to find the location of exceptions.This article will discuss how exceptions and errors are handled in Java, so let's take a ...
Posted by jonsjava on Tue, 02 Jul 2019 18:21:46 +0200
[JDK] JDK Source Analysis-HashMap
Summary
HashMap is one of the most commonly used container classes in Java development and a frequent visitor to interviews.It's actually the preceding " Notes on Data Structure and Algorithms (2) The implementation of Hash List in JDK 1.8 uses the Chain List method to handle hash conflicts, and it is optimized to turn a chain list int ...
Posted by tambo on Mon, 01 Jul 2019 20:06:01 +0200
List of Java.NIO Stream Programming
Simple differences between Java standard IO and Java NIO indicate:
Java Standard IO
Java NIO
API calls
simple
complex
Low-level implementation
Stream-oriented, one-way
channel Oriented, Release CPU, Memory Pressure
Results
Synchronized blocking
Synchronized non-blocking
Data Peep
Bloc ...
Posted by proxydude on Mon, 01 Jul 2019 00:27:07 +0200
EOJ 3260: Kangaroo Mom Looking for Children
Kangaroo Mother Finds Children
Time limit per test: 1.5 seconds
Time limit all tests: 10.0 seconds
Memory limit: 256 megabytes
Mother Kangaroo can't find her baby. Her child was captured by the monster.
The mother kangaroo is now in the upper left corner of the map, and her child is in line x and y of the map. The monster ...
Posted by Jeyush on Mon, 01 Jul 2019 00:14:50 +0200
How to Judge Data Type Accurately in JS
In my first article, I introduced the major types of JS and used typeof for output viewing. I also mentioned that each function has its own internal attribute [[class]. This class refers to the internal classification of js. This class roughly includes two types: data type and constructor.
Introduction to JavaScript Types
We talked about sever ...
Posted by uncleronin on Sat, 29 Jun 2019 22:59:15 +0200
Front-end misunderstanding of fast platoon
Writing this article stems from a previous interview and from various examples on the Internet that native sort s are faster than fast queues, because they have not written fast queues well. I was asked to write a quick line during the interview. I wrote a very concise piece of code that I read online (which I later found was in the JavaScript ...
Posted by matthewhaworth on Sat, 29 Jun 2019 21:25:46 +0200