[Java] in depth understanding of Comparable interface and Comparator interface | you can use it for sorting
Reference: Java language programming (Advanced) -- written by Mr. Liang Yong and translated by Mr. Dai Kaiyu
Operating environment
Windows10JDK8IDAE
1, Foreword
In the Java language, if you want to judge the size of two variables, you may think of it first
if(a > b){
// ...
}
However, this has great limitations. For example, t ...
Posted by MikeSnead on Sun, 21 Nov 2021 16:37:34 -0800
Basic algorithm set of graph (Java) (shortest path and minimum spanning tree)
Basic algorithm set of graph (shortest path and minimum spanning tree)
1. Shortest path algorithm (DFS Freud dijestra Bellman Ford)
1.1DFS two-point shortest path
In fact, not only depth first search, but also breadth first search can solve such problems. DFS is introduced here. DFS and BFS are not much different in solving the problem of th ...
Posted by scrupul0us on Sun, 21 Nov 2021 16:21:24 -0800
Hands on C + + game animation programming reading notes
Chapter 7: Exploring the glTF File Format
glTF is a standard format that can store both mesh and animation data. a file format that contains everything you need to display animated models. It's a standard format that most three-dimensional content creation applications can export to and allows you to load any arbitrary model.
glTF: Graph ...
Posted by pozer69 on Sun, 21 Nov 2021 15:45:07 -0800
MyBatis (NeiMu): basic support layer (DataSource)
review
In the previous article, we analyzed the type conversion, log adapter, class loading module and resolverutil (used to find qualified classes under the specified package), and also saw some design patterns used, such as adapter pattern and singleton pattern
Next, go to a core of the basic support layer, DataSource
DataSource
In th ...
Posted by darkside_3k on Sun, 21 Nov 2021 15:20:05 -0800
After learning this Nest.js actual combat, those who haven't started to hammer me! (long text warning)
After learning this Nest.js actual combat, those who haven't started to hammer me! (long text warning)prefaceHello, I'm koala , an interesting and willing to share, currently focuses on sharing the complete node.js technology stack, and is responsible for building the middle office of the Department and some capabilities of low code platform. I ...
Posted by Mactek on Sun, 21 Nov 2021 15:13:13 -0800
Lecture 5 dynamic programming
AcWing 2. 01 knapsack problem
State representation
f
(
i
,
j
)
f(i, j)
f(i,j) represents the optimal solution of the first i articles in the ca ...
Posted by paparanch on Sun, 21 Nov 2021 15:01:48 -0800
Peripheral driver library development notes 34: OLED display driver
nowadays, OLED displays are more and more used in embedded systems. For some requirements that display information is not too complex and mainly display information, we generally choose OLED display. In this article, we will discuss the design and implementation of OLED display driver.
1. Function overview
in terms of use, the 0 ...
Posted by Sven70 on Sun, 21 Nov 2021 14:15:58 -0800
Morris, recursive binary tree before, during and after traversal
Experiment time: 11.10
catalogue
Generating complete binary tree
Implementation of Morris algorithm
Introduction to morris traversal
Implementation principle of morris traversal
The essence of morris traversal
Briefly describe the algorithm process
Recursive implementation
Experimental results (including time, space and output results) ...
Posted by defeated on Sun, 21 Nov 2021 13:58:54 -0800
Functools.lru of Python caching mechanism_ cache
When it comes to the concept of cache, I think everyone should be familiar with it. Cache applications represented by Redis and Memcache have basically become the standard configuration of microservice architecture.
In fact, it does not mean that Redis and other services must be deployed to use cache. For example, in small single applications ...
Posted by vasse on Sun, 21 Nov 2021 13:58:22 -0800
interrupted() and isInterrupted() are still half understood?
preface
When it comes to how to terminate a thread, the method that some readers usually think of immediately must be stop(), but the stop() method is not recommended (it is prohibited in many specifications). The reason is that forcibly terminating a thread will lead to abnormal termination of the program, incorrect release of resources, ...
Posted by Patrick on Sun, 21 Nov 2021 13:41:24 -0800