1, Application scenario of policy pattern
Strategy Pattern refers to defining algorithm families and encapsulating them separately so that they can replace each other. This pattern makes the changes of algorithm not affect the users who use the algorithm.
1.1 application scenario
If there are many classes in the system, their difference is on ...
Posted on Tue, 25 Feb 2020 04:53:58 -0500 by Bad HAL 9000
Almost every single chip unit competition of the Blue Bridge Cup will test led module; especially for the provincial competition in recent years, the use of led module is more flexible; even though led is relatively simple, there are still likely to be errors in programming.
Now let's introduce how to u ...
Posted on Tue, 25 Feb 2020 04:13:52 -0500 by koolswans
This article mainly explains the use of Stream stream in JDK8, including how to filter, slice, map, find, match, reduce and so on. Each type will have corresponding cases which are easy to understand
1. The concept of stream
Stream API is a new key component of JDK8 to process collection. The stream stream here is different from I/O stre ...
Posted on Tue, 25 Feb 2020 03:50:22 -0500 by GreenCore
Official document: https://maven.apache.org/guides/introduction/introduction-to-the-pom.html
Introduction to POM
A project object model or POM is the basic unit of work in Maven.It is an XML file that contains information about the project and configuration details that Maven uses to build the project.It contains default values for most ...
Posted on Mon, 24 Feb 2020 22:07:05 -0500 by Lucnet
Use of CountDownLatch
CountDownLatch is one of the synchronization tool classes and can specify a count value to be subtracted by a thread in a concurrent environment. When the count value changes to 0, threads blocked by the await method will wake up to synchronize between threads.
import jav ...
Posted on Mon, 24 Feb 2020 18:08:00 -0500 by phpmash
1. What is JUC
Learning can refer to: source + official documents for learning
Document address: https://docs.oracle.com/javase/8/docs/api/
First let's look at what JUC is
Next let's look at what JUC has
So we can conclude that JUC can be divided into five categories
1. Synchronization Tool Class
2. lock class
Posted on Mon, 24 Feb 2020 12:00:54 -0500 by Grisu
Course design of data structure and algorithm
1, Title: Huffman encoder / decoder
1. Problem description
Using Huffman code to communicate can greatly improve channel utilization, shorten information transmission time and reduce transmission cost. This requires that the transmitted data be precoded ...
Posted on Mon, 24 Feb 2020 08:10:15 -0500 by revez2002
The last machine test question of the 2018 retest is about files. I found that I don't seem to be able to back up files. So let's put it aside and do it in 2019.
As before, the topics are all memories. There may be problems that are not explained clearly. Please forgive me
1, Programmi ...
Posted on Mon, 24 Feb 2020 07:50:53 -0500 by astribuncio
1, Application scenario of agent mode
In our life, we often see such scenes, such as: rental and sales agency, marriage agency, broker, express delivery, etc., which are the real life embodiment of agent mode. Proxy Pattern refers to providing a proxy for other objects to control access to this object. The proxy object plays an intermediary rol ...
Posted on Mon, 24 Feb 2020 04:39:03 -0500 by MattWeet
As we know, Map is used to store key value mapping. For the object acting as key, it cannot be repeated, and the equals method and hashCode method need to be overwritten correctly
If we only need to store non duplicate key s and do not need to store mapped value s, then we can use set.
Set is used to st ...
Posted on Mon, 24 Feb 2020 03:29:47 -0500 by hometoast