How AJAX uses get requests to submit data to the server and achieve partial data refresh——AJAX

<!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>Title</title> </head> <body> <script type=”text/javascript”> window.onload = function () { document.getElementById(“btn”).onclick = function () { var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function () { if(ajax.readyState === 4) { if(ajax.status === 200) { document.getElementById(“mySpan”).innerHTML = ajax.responseText; } else { alert(ajax.status); } } } //Open channel var username = […]

Custom annotations prevent forms from submitting code repeatedly

/** * Custom annotations to prevent repeated submission of forms * * @author LZJ */ @Inherited @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface RepeatSubmit { /** * Interval time (ms), less than this time is considered a repeated submission */ int interval() default 3000; /** * Interval time unit (milliseconds) */ TimeUnit timeUnit() default TimeUnit.MILLISECONDS; /** * […]

Git sets PreCommit to submit the main project code in case of hot iteration – Windows environment

Article directory I. Introduction 2. Set PreCommit of a project (1) Steps (2) Test effect 3. Set PreCommit for multiple projects 4. FAQ (1) If you have to submit the main project code of the hot update branch, how to submit it normally? (2) How to solve the problem if there is a false alarm? […]

JavaScript encapsulates form functions, validates rules, and then submits

<html> <head> <meta http-equiv=”Content-Type;charset=utf-8″/> <title>Function Curry</title> <style type=”text/css”> #user,#pwd {<!– –> color:red; font-size: 14px; } </style> </head> <body> <!– verify=”username|required” is the rule you want to add –> <form id=”form1″ method=”post” action=””> <input type=”text” name=”user” value=”” verify=”username|required” size=20/><span id=”user”></span> <br/> <input type=”password” name=”pwd” value=”” verify=”password|required” size=20/><span id=”pwd”></span> <br/> <input type=”button” name=”btn” value=”Submit”/> </form> <script type=”text/javascript”> […]

Kafka-Java 4: Spring configures the strategy for Kafka consumers to submit Offset

1. Strategy for Kafka consumer to submit Offset The strategies for Kafka consumers to submit Offset are Automatically submit Offset: After the consumer pulls the message and before it is consumed by the consumer, the offset is automatically submitted directly. Automatic submission may lose data. For example, the offset of the message has been submitted […]

Git guide: Submitting clean commit information

Why should we care about writing clean commit messages? Commits are the tangible building blocks of a programmer’s skills. They act as the icing on the cake for your code, and if written correctly, they bring tremendous value. Well-written commit messages become indispensable because they provide context – otherwise there would be no need for […]

The consumer submits the consumed offset

1. Overview After consuming the message, the consumer will submit the consumed offset to the built-in Topic of __consumer_offsets-; each consumer group maintains an offset for the current consumer group. So here comes the question: When does the consumer group update the offset to the partition in the broker? Kafka consumer configuration information Name Description […]

Two ways to submit code repository with Git

Table of contents 1: Synchronization of two local and remote warehouses 1 git remote repository Submit local repository operation Submit to remote repository operation 1.Git global settings: 2. Add a remote warehouse address 3. Query the currently existing remote warehouse 5. Submit the contents of the local repository to the remote warehouse 6. Query remote […]

git I submitted, but I regretted it again

Background In actual development work, when using git commit, you will always encounter some crazy submissions. It all stems from poor hands and unclear thinking, and you submit some things that should not be submitted together. But still using Git can still give us a chance to regret it. Scene simulation @PostMapping(“/hhh”) public String test1(){<!– […]

[Based on Thread multi-threading + random number (Random) + java version JDBC to manually submit transactions + EasyExcel to read excel files and generate millions of level simulation data to the database]

Based on Thread multi-threading + random number (Random) + java version JDBC manual submission of transactions + EasyExcel reads excel files and generates millions of simulated data to the database Based on Thread multi-threading + random number (Random) + java version JDBC manual submission of transactions + EasyExcel reads excel files and generates millions of […]