Introduction to the core concept of elasticSearch: simple use of search
Simple use of search
In the previous chapter, we introduced the basic use of the document. If you are interested, you can refer to it Introduction to the core concept of elasticSearch (III): addition, deletion, modification and query of documents In this chapter, we will make a simple use of search.
1, Let's delete all the indexes in ...
Added by abitlikehomer on Sat, 19 Feb 2022 03:28:22 +0200
The most elegant way to write values in a Map that increase, decrease, or recalculate
The most elegant way to write a value in a Map that increases or decreases automatically or re operates a value without calling get() and put()
I believe you can always meet such needs in the process of development: query a key value in the Map, add one if there is one, and put the new key value as 1 if there is no one (or perform other operat ...
Added by Ward on Sat, 19 Feb 2022 02:50:01 +0200
[Java] learning notes - use of methods
[Java] use of learning notes 4- method
preface
Main contents: ☑️ Understanding and use of methods. ☑️ The understanding and application of recursion.
Tip: the following is the main content of this article. The following cases can be used for reference
1, Basic usage of method
1. What is the method
A method is a snippet of code ...
Added by tripc1 on Sat, 19 Feb 2022 02:39:31 +0200
Enumeration of the path of Java engineers to God
Original author: Hollis
Enumeration usage
1 background
Before the introduction of enumeration types in the java language, the common mode of representing enumeration types was to declare a set of constants with int. Previously, we usually used the public final static method to define the following codes: 1 for spring, 2 for summer, 3 for aut ...
Added by Valord on Sat, 19 Feb 2022 02:29:01 +0200
LevelDB looks at the comparison process from the source level
Comparison process
In LevelDB, there are two main types of comparison:
Minor compact: This is the process of immutable persistence to Level 0. The most important requirement here is high performance, because once it is blocked, memtable cannot be written, but is there any way to convert it to immutable.major compaction: it is responsible ...
Added by harrymanjan on Sat, 19 Feb 2022 01:33:33 +0200
HashMap source code put() method
preface
As for thread safety, the put method can expose the problem of thread safety. When two different hashcode s get the same index through hash calculation, they should form a linked list. However, if multiple threads are placed in the same index, it may be overwritten, which is when judging whether the table[index] is empty.
No more nons ...
Added by fastfingertips on Sat, 19 Feb 2022 01:27:26 +0200
4, Java common class I
object
The Object class is the root class of the class hierarchy. Each class uses Object as its superclass. Each class directly or indirectly inherits from the Object class.
Common methods in Object include:
public int hashCode() //Returns the hash code value of the object.
// Note: the hash value is a value calculated according to the hash ...
Added by shane0714 on Sat, 19 Feb 2022 01:17:59 +0200
Java common class II
array
Arrays is a tool class that operates on arrays.
Common member methods
public static String toString(int[] a) //Convert array to string
public static void sort(int[] a) //Sort the array
public static int binarySearch(int[] a,int key) //Binary search
The toString() source code is as follows:
public static String toString(int[] a) {
...
Added by Cultureshock on Sat, 19 Feb 2022 01:06:59 +0200
SSM - aop idea - three ways to implement aop (interface, customization, annotation)
preface
In the software industry, AOP is the abbreviation of Aspect Oriented Programming, which means: Aspect Oriented Programming, a technology that realizes the unified maintenance of program functions through precompiled mode and dynamic agent during operation. AOP is the continuation of OOP, a hot spot in software development, an impor ...
Added by iceblox on Sat, 19 Feb 2022 00:49:58 +0200
Learn Java--day04--Process Control Statement &Method from scratch
Learn Java - day04 - Process Control Statements from scratch (2) & Methods
1. Process control statements
1. Dead cycle
Dead Loop: A loop that cannot be terminated by self-control in a program Classification: Dead loop of for statement
for ( ; ; ) {
Loop body statement;
}
Dead loop of while statement
while (true) {
Loop body ...
Added by r3dn3ck on Sat, 19 Feb 2022 00:39:46 +0200