The internal mental skill of the architect belongs to the detailed explanation of the game design mode

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

Blue Bridge Cup Electronic monolithic unit module led display (general function)

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

Use of Stream stream

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

Apache Maven uses POM to define the project structure

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

Implementing principle of java analysis CountDownLatch

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. package com.edison; import java.util.Random; import jav ...

Posted on Mon, 24 Feb 2020 18:08:00 -0500 by phpmash

Multithreaded Advancement - Night before JUC concurrent programming

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 3. Atoms 4. ...

Posted on Mon, 24 Feb 2020 12:00:54 -0500 by Grisu

Course design of data structure and algorithm / / Huffman code / decoder

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

Master of software engineering, School of computer science, South China Normal University (2019 postgraduate entrance examination)

Preface: 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

A detailed explanation of the agent model of the architect's mental skill

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

Java learning 68: using Set

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