Reprint: https://mp.weixin.qq.com/s/XaKqWUrXsDHQIyB_G5aPBw — Create database test create database if not exists test; use test; — Delete table drop table if exists tb_account; create table tb_account( id int primary key AUTO_INCREMENT comment ‘ID’, name varchar(10) comment ‘name’, money double(10,2) comment ‘balance’ ) comment ‘account table’; insert into tb_account(name, money) VALUES (‘李四’,2000), (‘王五’,2000); –Normal transfer situation — […]
Tag: repeat
rouyi backend development documentation – idempotence (preventing repeated submissions)
1. What is a duplicate submission For example, if the user quickly double-clicks a button, the front-end does not disable the button, resulting in two repeated requests being sent. Implementation Principle Its implementation principle is very simple. Methods targeting the same parameters can only be executed once within a period of time. The execution process […]
Java repeated call-method
Table of Contents 1. The concept of method 2. Definition and calling of methods 1. Parameterless method 1.1 Definition 1.2 Call 1.3 Exercise-Judge odd and even numbers 2. Method with parameters 2.1 Definition 2.2 Call 2.3 Formal parameters and actual parameters 2.4 Exercise-Print all odd numbers between n-m 3. Method with return value 3.1 Definition […]
Java method: Repeated operations can be written as methods
Column content: Java ?Personal homepage: Midnight Star’s homepage Motto: The road ahead is not far, keep walking Directory 1. The concept of method 1. What is a method? 2. Definition of method 3. The process of method calling 2. Method overloading 1. The concept of overloading 2. Method signature In daily life, if we cook, […]
The solution process for multiple nodes to repeatedly process requests due to program errors under nginx load on the website
Table of contents Preface Here comes the problem The problem comes again problem analysis Puzzled turning point Follow-up Foreword: This is a problem-solving process I had at work last week. It solves the problem of a certain request being processed repeatedly by multi-node sites due to application exceptions under nginx load environment. When I was […]
The road to growth if you want to become proficient in algorithms and SQL – the longest substring with at least K repeating characters
The road to growth if you want to master algorithms and SQL – the longest substring with at least K repeating characters Preface 1. The longest substring with at least K repeating characters 1.1 The premise of sliding window: two-stage nature 1.2 Manually add restrictions to make them two-stage 1.3 Complete code (sliding window) 1.4 […]
[Practical combat] Flowing arrows – linear flow component (repeating-linear-gradient, @keyFrames)
Article directory 1. Introduction 2. Component ideas 3. Effect drawing 4. Source code src\components\flow-arrow\index.js src\components\flow-arrow\keyFrames.js src\components\flow-arrow\constant.js Component call 5. Extend learning 1.repeating-linear-gradient 2.animation 3.@keyFrames Obtain component source code: Recommended books “Next.js in practice” 【brief introduction】 1. Introduction In large-screen data display, if the data in different data layers is displayed by nodes, in order to […]
SpringBoot anti-repeated submission AOP method
Anti-duplicate submission process Obtain the current HttpServletRequest object and record the requested address, request method, intercepted class name and method name and other information. Obtain request parameters through pjp.getArgs() and convert the parameters into strings for generating unique identifiers. The cache key cacheRepeatKey is generated based on the requested address, parameters, unique identification and other […]
The relationship between Mysql isolation level and dirty reads, phantom reads, and non-repeatable reads
Mysql isolation level The default isolation level of the MySQL database is repeatable read (REPEATABLE READ). READ UNCOMMITTED (read uncommitted data): One transaction can read data that has not yet been committed by another transaction, which may lead to problems such as dirty reads, non-repeatable reads, and phantom reads. READ COMMITTED (read committed data): A […]