Kotlin has some new things: Unit Any and Nothing, here is my understanding of these three brothers. Unit First, look at the definition of Unit in Kotlin: package kotlin /** * The type with only one value: the `Unit` object. This type corresponds to the `void` type in Java. */ public object Unit { override […]
Tag: any
SpringBoot statistics code execution takes time, and there are so many ways to play!
Click on the “Java base” above, select “Set as star” Be a positive person, not a positive waste person! Update articles every day at 14:00, lose a million bits of hair every day… Source code boutique column Original | Java 2021 Super God Road, very liver~ An open source project with detailed annotations in Chinese […]
How many TCP connections can a server support at most?
1. The maximum number of files that can be opened by a server 1. Limit parameters We know that everything is a file in Linux, so how many files can a server open at most? The maximum number of files that can be opened on Linux is affected by three parameters, namely: fs.file-max (system-level parameter): […]
5. Find any component instance – findComponents series method
Overview In the previous section, we have introduced two methods of communication between components: provide / inject and dispatch / broadcast. They have their own usage scenarios and limitations. For example, the former is mostly used for child components to obtain the state of the parent component, and the latter is often used for communication […]
BOM object navigator: Secretly saved (cuán) so many tricks!
Foreword The book continues from the previous article. In the previous article, I introduced some properties of the bom object navigator API portal, so this article will continue to introduce some of its “magic” method APIs. Again: People are always afraid of what they don’t understand For most front-end boys, in fact, they only need […]
Nanyou Cryptography Experiment 1 – Java
The code is relatively bad, and there are some strange bugs, just for reference package src; import lombok. AllArgsConstructor; import lombok.Data; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; /** * Abstraction of geared machines * * @author zhou * @date 2023/2/28 */ @Data @AllArgsConstructor public class Gear { private LinkedHashMap<Character,Integer> forwardCharacterMap; private LinkedHashMap<Integer,Character> backwardCharacterMap; private LinkedHashMap<Integer,Integer> forwardBindMap; private […]
The @Autowired annotation is not recommended by Spring or IDEA, why are there so many people using it?
Default assembly for @Autowired We all know that the @Autowired annotation in spring is used to automatically assemble objects. Usually, we use it like this in our projects: package com.sue.cache.service; import org.springframework.stereotype.Service; @Service public class TestService1 { public void test1() { } } package com.sue.cache.service; import org.springframework.stereotype.Service; @Service public class TestService2 { @Autowired private TestService1 […]
Don’t use the main method to test anymore, it’s really too low…
Reply “Join the group” after paying attention, and pull you into the programmer exchange group From: Nuggets, Author: Richard_Yi Link: https://juejin.cn/post/6844903936869007368 Foreword “If you cannot measure it, you cannot improve it”. In daily development, we have many options for calling some code or using tools. When we are not sure about their performance, the first […]
Four ways to write Mybatise one-to-many association query
Mybatis one-to-many association query has the following writing methods: Use nested query (Nested Select): Use a subquery in the main query to convert the one-to-many relationship into two independent queries. After obtaining one data in the main query, obtain more data in the subquery. Finally the two results are merged together. The advantage of this […]