The use pit of @ Data in Lombok
When you're using Lombok's @Data When commenting, there will be some holes that need attention. Let's see today.
Lombok
Let's briefly introduce Lombok. Its official introduction is as follows:
Project Lombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code ...
Posted by jaytux on Sat, 02 Nov 2019 03:21:15 -0700
Analysis of memory leak
I. problem description
When the memory of a process is abnormally large, there may be a memory leak, or there may be no limit on the length of data structures such as related queues in memory.
II. Solutions
If the problem is easy to appear, it is better to use umdh tool to make judgment. The usage of this tool is detailed in its help manual, an ...
Posted by jp2php on Fri, 01 Nov 2019 00:30:49 -0700
[LOJ Chen 2162] [POI2011] Garbage (Euler circuit)
Problem surface
LOJ
Title Solution
First of all, there is an obvious conclusion that the edges that do not need to be modified can be deleted directly, and the edges that need to be modified can be reserved. The white dot is that the number of times each edge is to be visited can be directly modeled as two. If an edge is proved to be connected ...
Posted by tsinka on Thu, 31 Oct 2019 15:04:54 -0700
Multithreaded learning
Simple multithreaded applet code implementation:
1. Write a program to print out "I am a programmer" letter by letter by multithreading cooperation. The string has array storage of char type.
import static jodd.util.ThreadUtil.sleep;
public class CharNum {
static String str = "i am a programmer";
String[] str1 = ...
Posted by ConcreteDJ on Thu, 31 Oct 2019 09:05:07 -0700
Super detailed: summary of six common design patterns
Singleton mode
Simply put, in an application, there is only one instance object of a class. You can't go to new because the constructors are decorated by private. Generally, they get their instances through getInstance(). The return value of getInstance () is a reference to an object, not a new instance, so don't misunderstand it as multiple ob ...
Posted by xzilla on Wed, 30 Oct 2019 03:33:22 -0700
Problems in sharing mutable state and how to avoid them
By Dr. Axel RauschmayerCrazy technology house
Original text: https://2ality.com/2019/10/sh...
No reprint without permission
This paper answers the following questions:
Is shared mutable state?
Why is there a problem?
How to avoid its problems?
The section marked "(Advanced)" will go deeper, so if you want to read this article faste ...
Posted by SensualSandwich on Mon, 28 Oct 2019 20:28:37 -0700
Assembler - 2 (recursive Caller - factorial)
This is also the school's curriculum, which deals with the factorials of 0-9.
Why only deal with factorials of 0 -- 9? Ha ha, because in hexadecimal notation, 9! The factorial of can be put down by DX: AX, and it's only the factorial of one digit (single character input). If there's more, we have to think about circular calling. It's a bit tro ...
Posted by IThinkMyBrainHurts on Mon, 28 Oct 2019 10:59:34 -0700
CSR8675 uses UART transceiver function of serial port
CSR8675 uses UART transceiver function of serial port
There are two ways for CSR8675 to realize UART function, one is managed connection, the other is direct connection.
Managed connection: do not operate Stream directly, create Source and Sink through VM layer to realize data transmission, which is p ...
Posted by tyrol_gangster on Sun, 27 Oct 2019 21:38:36 -0700
On State mode
I. Preface
State mode is very convenient to use in some situations. What is state? If you have learned the compilation principle, you will understand DFA M and NFA M. in determining finite state machines and non deterministic finite state machines, state is the smallest unit. When certain conditions are met, state will change. We can treat a m ...
Posted by torrentmasta on Fri, 25 Oct 2019 02:00:42 -0700
Using js to implement those data structures 06 (queues)
In fact, there are many similarities between queues and stacks, including some of the methods and ways of using them. Only queues use a completely different principle from stacks. Stacks use the last in first out principle, while queues use the First In First Out principle.
I. queue
queue It is a ...
Posted by Jason28 on Thu, 24 Oct 2019 00:00:59 -0700