Java learning notes XML and JSON
XML and JSON
1, XML(eXtensible Markup Language)
characteristic:
xml is a platform independent markup language xml is self descriptive effect:
Network data transmissiondata storage configuration file xml file: xml file is a way to save xml data xml syntax (see a case)
<?xml version="1.0" encoding="UTF-8"?>
<!--First l ...
Added by frost on Wed, 02 Mar 2022 01:37:57 +0200
leetcode363 - the maximum value of the rectangular area does not exceed the sum of K (prefix and + dichotomy) (TreeSet or auxiliary array dynamic return)
introduce
My LeetCode homepage, one problem one solution
Tags: queue, dynamic programming, binary search
363. The rectangular area does not exceed the maximum value of K and Difficulty difficulty
363. The rectangular area does not exceed the maximum value of K and: https://leetcode-cn.com/problems/max-sum-of-rectangle-no-larger-than-k ...
Added by Piba on Wed, 02 Mar 2022 01:12:42 +0200
Spring - dependency injection
1. Concept
The so-called dependency injection (DI) actually means that when a bean instance references another bean instance, the spring container helps us create a dependent bean instance and inject (pass) it into another bean.
Dependency: the creation of a Bean object depends on the container, and the Bean object depends on resourcesInj ...
Added by nikneven on Wed, 02 Mar 2022 00:06:47 +0200
[MyBatis notes] 7 - customize the mapping resultMap, handle the one to many / many to one mapping relationship, handle the consistency of attribute fields, and load MyBatis lazily
Video link: https://www.bilibili.com/video/BV1VP4y1c7j7?p=48&spm_id_from=pageDriver
preparation
(1) New maven project
See the following steps for details: https://editor.csdn.net/md/?articleId=123185097
(2) Create two forms in sql: t_emp,t_dept
t_dept form:
t_emp form:
Add a did to connect with the primary key of the ...
Added by BrettCarr on Tue, 01 Mar 2022 18:32:40 +0200
Java distream: data continuous stream processing, different java stream
background
I still prefer the streaming data processing of java8 stream. Its map, filter and other operations make me look at Java again. It's like a flash in front of you when you accidentally meet your beautiful ex girlfriend after breaking up for many years (I'm talking nonsense, don't take it seriously!!!)
However, after a period of time ...
Added by massimoGornatti on Tue, 01 Mar 2022 17:23:05 +0200
park() and unpark() functions of LockSupport class and case analysis
Official interpretation:
LockSupport is the basic thread blocking primitive used to create locks and other synchronization classes; LockSupport class uses a concept called permission to block and wake up threads. Each thread has a permission; permit has only two values: 1 and zero. The default value is zero; You can think of a license as a ...
Added by elecktricity on Tue, 01 Mar 2022 14:19:31 +0200
Detailed explanation of multithreading
Detailed explanation of multithreading
summary
Core concept
Threads are independent execution pathsWhen the program is running, there will be multiple threads in the background, such as main thread and gc thread, even if there is no thread created by itselfmain() is called the main thread, which is the entry of the system and is used to exec ...
Added by vinoindiamca on Tue, 01 Mar 2022 13:21:07 +0200
mybatis framework: first and second level cache
The previous article mentioned that the cache will be used when querying. Its built-in two-level cache is as follows:// The L1 cache is bound to sqlsession in the executor
// org.apache.ibatis.executor.BaseExecutor#localCache
// Point to org apache. ibatis. cache. impl. PerpetualCache#cache
private Map<Object, Object> cache = new HashMap& ...
Added by ceemac on Tue, 01 Mar 2022 13:04:40 +0200
Java -- generics and collections
generic paradigm
A generic type is actually a type parameter used to specify a type.
In order to count students' scores, it is required to design a Score object, including course name, course number and course Score. However, there are two kinds of scores: one is to take excellent, good and qualified as the result, and the other is to use dig ...
Added by saami123 on Tue, 01 Mar 2022 12:45:50 +0200
Library management system Part3 (practice of encapsulation, inheritance, polymorphism and interface)
Library management system is a common small project in learning programming. After learning classes and objects, encapsulation, inheritance, polymorphism and interfaces, we can use these ideas to realize our library management system. Here I will use two blogs to explain the specific implementation methods. According to the first two blogs, we ...
Added by bad_goose on Tue, 01 Mar 2022 12:39:36 +0200