Minimalist Code Artifact: Lombok Use Tutorial

From: https://mp.weixin.qq.com/s/7HebsMsH21LuDWPbHg6UBw Lombok is a magical java class library. It can automatically generate annotations to annoy annoying Getter s and Setter s in java beans. It can also automatically generate logger, ToString, HashCode, Builder and other java features or functions ...

Added by Griff1324 on Fri, 09 Aug 2019 05:42:25 +0300

python data analysis tool 1: numpy

1.1 Numpy Infrastructure NumPy array is a multidimensional array object called ndarray. It consists of two parts: (1) Actual data (2) Metadata describing these data # Multidimensional array ndarray import numpy as np ar = np.array([1,2,3,4,5,6,7]) print(ar) # Output arrays, note the format ...

Added by JJohnsenDK on Thu, 08 Aug 2019 16:55:51 +0300

Proficiency in ES6 Series I (iterator)

1. The Concept and Function of Iterator The main purpose of iterator is to provide a unified and convenient access and traversal mechanism for collections in JS such as Array, Map, Set or some custom collections. It is actually an interface. Any data structure can be traversed by deploying the itera ...

Added by cypr on Thu, 08 Aug 2019 11:28:29 +0300

Restart learning Java - Abstract classes, interfaces, internal classes

abstract class Why define abstract methods: If you cannot define a method in terms of its specific implementation details; for example, when you define the eat method of the Person class, you cannot determine its specific implementation details, because Chinese, Western and South Asian people eat differently.This method can be defined as an abs ...

Added by phpScott on Thu, 08 Aug 2019 04:53:03 +0300

Deep understanding of Concurrent HashMap source code

Concurrent HashMap in Java 7 Concurrency Level: Parallel level, concurrency number, Segment number, default is 16, that is, Concurrent HashMap has 16 Segments, at this time, in theory can support up to 16 threads concurrently write, as long as their operations are distributed on different Segments. T ...

Added by BETA on Wed, 07 Aug 2019 12:40:32 +0300

Object Oriented: Membership of Classes

I. Components of subcategories As we have mentioned before, classes can be roughly divided into two areas, as shown in the following figure: Detailed division of each area can be divided into: class A: company_name = 'Education for Old Boys' # Static variables (static fields) __iphone = '1353333xxxx' # Private static variables (priv ...

Added by osti on Wed, 07 Aug 2019 11:04:56 +0300

Remember a code refactoring

Single responsibility Single function Single function is the most basic requirement of SRP, that is to say, the function and responsibility of your class should be single, so that cohesion is high. For example, the following parameter class is used to query website Buyer information, according to SRP, it should be placed in the query Field. @Da ...

Added by jdaura on Wed, 07 Aug 2019 09:06:11 +0300

Realization and analysis of virtual DOM diff algorithm

React series React Simple Analog Grammar (I)Jsx, Composite Events and Refs (II) The complete code is available for viewing virtualdom-diff Rendering DOM Anyone who has experienced PHP template development or JQuery's baptism knows that the simplest and crudest way to render them is to rebuild DOM to replace old DOM, and the problem is obvious. ...

Added by ch3m1st on Wed, 07 Aug 2019 06:06:06 +0300

7. Rendering a list of VueJs filling Diaries

In the last post, we had a simple understanding and a general understanding of vue components.When we first learned about the project structure, we created a folder for components in the / src directory, which is used today to place our custom components.   Making header.vue componentsIn the compone ...

Added by piet on Tue, 06 Aug 2019 21:24:54 +0300

Angular 8 component communication infrastructure usage scenario

Component Interaction Parent-child component interaction (common) Input, Output attributes One of the most basic scenarios is very precautionary. Using method, the data in the parent component is bound to the variables declared by the child component to ensure that the child component can be used for internal rendering template. The main concer ...

Added by websitesca on Tue, 06 Aug 2019 12:15:08 +0300