Complete use of Scala collection of big data (Chapter 7)

1, Collection introduction 1) Scala's collections fall into three categories: sequence Seq, Set and Map. All collections are extended from Iterable Characteristics. 2) For almost all collection classes, Scala provides both variable and immutable versions, which are located in the following two places: Package Immutable set: ...

Posted by dhcrusoe on Fri, 25 Feb 2022 05:20:39 +0100

SpringBoot upload file

Uploading files should be the most frequently encountered scenario. Today, let's simply do a Spring Boot file uploading function with you. Without much nonsense, let's start directly.The project structure is as follows:pom dependency<dependencies> <dependency> <groupId>org.springframework.boot</groupId> ...

Posted by suncore on Fri, 25 Feb 2022 04:07:58 +0100

Use of Java UDP broadcast and multicast -- Series 1

1.UDP broadcast. The client opens a port to listen to data. The server specifies the port to send data, and the client can receive the data. The broadcast address bound by the server is 255.255.255.255 Client listening: public class BroadcastClient { private int MessageIndex = 0; private int port = 6787;//Data listening binding port ...

Posted by yuws on Fri, 25 Feb 2022 03:39:18 +0100

[learning notes] self study java notes

Java notes Java data type - basic type Character type Char Character type, which takes up 2 bytes. Only a single character is allowed. Character quotation marks are forced to use single quotation marks char a = 'a'; Forced digital conversion of Char Use Char to cast numbers to output Unicode values of corresponding characters ...

Posted by kotun on Fri, 25 Feb 2022 03:37:15 +0100

MyBatis caching mechanism

13.MyBatis caching mechanism 1. Why cache? When users frequently query some fixed data, they query these data from the database for the first time and save them in the cache. When users query these data again, they do not need to query through the database, but query in the cache. Reduce the loss caused by network connection and database quer ...

Posted by lajollabob on Fri, 25 Feb 2022 01:37:11 +0100

Java learning notes day23 - multithreading advanced

Multithreading advanced Six states of threads in virtual machine New status (NEW) -- create thread objectReady state (runnable) -- start methodBlocked ------------- unable to get lock objectWaiting -- waiting methodTimed_waiting -- sleep methodTerminated -------------- all codes have been run Thread pool code implementation Create a poo ...

Posted by rupam_jaiswal on Thu, 24 Feb 2022 19:00:56 +0100

[data structure and algorithm] unidirectional ring linked list and Josephu ring

Josephu Joseph Ring – the leading out of one-way ring linked list Josephu's problem is: let n people with numbers 1, 2,... N sit around. It is agreed that the person with number k (1 < = k < = n) will count from 1, and the person who counts to m will be listed. Its next person will count from 1, and the person who counts to m will ...

Posted by mvd7793 on Thu, 24 Feb 2022 19:00:53 +0100

@ModelAttribute and @ SessionAttributes and @ SessionAttribute and @ RequestAttribute

1, @ ModelAttribute usage Bind request parameters to command object (input parameter object): when placed on the input parameter of the controller method, it is used to bind multiple request parameters to a command object, so as to simplify the binding process, and is automatically exposed as model data for use in view page display; When t ...

Posted by everurssantosh on Thu, 24 Feb 2022 18:59:42 +0100

Bitmap addition and subtraction multiplication and division

Bitmap addition and subtraction multiplication and division Let's briefly explain what our bitmap is First of all, we can't avoid storing data in many cases during data processing. At this time, we will open up memory to create arrays to store our data But let's take shaping as an example. int takes up 4 bytes of space, Suppose I want t ...

Posted by StirCrazy on Thu, 24 Feb 2022 17:43:38 +0100

Reading HashMap source code from scratch

preface I believe that this article is not the first time for my classmates to see articles about HashMap. Most of the online HashMap articles are not suitable for me, so I decided to understand the source code from scratch. I will use the relatively simple logic to convince myself to understand the source code. If you are interested, please l ...

Posted by racing_fire on Thu, 24 Feb 2022 16:55:12 +0100