How CountDownLatch works and use cases

Definition: a multi-functional synchronization tool that allows one or more threads to wait until a set of operations performed in other threads are completed. Literally translates to "countdown latch.". Function: initialize CountDownLatch with the given count. Because of the call to the c ...

Posted by ruttiger on Fri, 28 Feb 2020 12:55:26 +0100

Architect's internal mental skill, a detailed explanation of the decorator model necessary for the reconstruction project experience

1, Application scenario of decorator mode In our life, for example, add an egg to a pancake, add some fruit to the cake, decorate the house, etc. Extend the responsibilities of some extra objects to objects. Decorator Pattern means that it provides a more flexible alternative (extending the function of the original object) than inheritance with ...

Posted by kutyadog on Fri, 28 Feb 2020 12:50:01 +0100

Architect's internal mental skill, detailed explanation of the template model of workflow standardization in the workplace

Template pattern, also known as Template Method Pattern, refers to defining the skeleton of an algorithm and allowing subclasses to provide implementation for one or more steps. The template method enables the subclass to redefine some steps of the algorithm without changing the structure of the algorithm. 1, Application scenario of template me ...

Posted by Jr0x on Wed, 26 Feb 2020 14:58:28 +0100

Interpretation of the first summary from the front-end framework

First, record the structure of the project that people can't understand: Here's the structure that we didn't understand, which is a little more detailed: I. clear structure As a small white, it still needs a lot of knowledge to build a structure like this. However, in this process, it is also necessar ...

Posted by DaCheata on Wed, 26 Feb 2020 13:10:47 +0100

Eclipse deployment spring MVC + Maven project

Recently, I was tutoring in spring MVC foundation. In view of having contacted Maven before, I couldn't leave it. So Maven was chosen to introduce dependency. However, my previous work projects have exposed me to SpringBoot+maven, and spring MVC has no maven, both of which I still remember. However, spring MVC + maven, this combination, really ...

Posted by ph0ngwh0ng on Tue, 25 Feb 2020 16:24:30 +0100

Linux mmc Driver Framework -- important data structure

Linux mmc Driver Framework Summary mmc_host mmc_card mmc_ios mmc_dirver mmc_bus_ops mmc_host_ops mmc_command mmc_data mmc_request sdio_func Summary data structure describe struct mmc_host Used to represent an mmc host controller struct mmc_card Used to represent an mmc device (card) st ...

Posted by aa-true-vicious on Tue, 25 Feb 2020 16:05:33 +0100

Day05 Java training notes - object oriented

1. Classes and objects Understanding of classes and objects All things that exist objectively are objects, so we often say that all things are objects. class Class understanding Class is the abstraction of a kind of things with common properties and behaviors in real life A class is a data type ...

Posted by Zack on Tue, 25 Feb 2020 13:54:08 +0100

How can I break up with you

The indissoluble distinction between if and else In the actual programming, we always need a lot of logic judgment to help us to do things under various branches. In any case, we need if and else to help us solve it? The answer is not necessarily. For java, design pattern is to better encapsulate, decou ...

Posted by threaders on Tue, 25 Feb 2020 10:07:21 +0100

Getting Started with mycat

First read the quick start of the official website, then build it yourself. The result is various errors and pits.Record it. 1. Environment A virtual machine, a cloud server, a local Mac (because mysql is installed on the cloud server and locally, or you can use the virtual machine entirely, just look at yourself), mycat is deployed on the virt ...

Posted by eerikk2 on Tue, 25 Feb 2020 03:48:46 +0100

Minecraft Fabric Tutorial 9 adding armor

First appeared in Enaium's personal blog Create a armor class public class EndArmorMaterials implements ArmorMaterial { [...] } Copy it private static final int[] BASE_DURABILITY = {13, 15, 16, 11}; private final String name; private final int durabilityMultiplier; private final int[] protectionAmounts; private final i ...

Posted by Sianide on Sat, 22 Feb 2020 18:28:42 +0100