(codeforces - 149d) colouring brackets (interval DP)
Title Link: https://codeforces.com/problemset/problem/149/D
Meaning:
Given a string s, it is a legal sequence of parentheses. We intend to dye this bracket sequence with the following requirements:
There are three conditions for each character: no dyeing, red dyeing and blue dyeingEach pair of matching parentheses has and only one character ...
Posted by polybiosis on Fri, 18 Feb 2022 16:01:13 +0100
Mybatis's past and present life
JDBC
When it comes to java operating database, JDBC must be inexcusable. Mybatis actually encapsulates JDBC
// Register JDBC Driver
Class.forName("com.mysql.cj.jdbc.Driver");
// open a connection
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/spring-shiwu? characterEncoding=utf-8&serverTimezone=UTC", "root", "1234 ...
Posted by nikbone on Fri, 18 Feb 2022 15:59:31 +0100
The life cycle of Java backend Android activity
Activity lifecycle
Activities in Android can be superimposed, which also means that each activity should have a corresponding life cycle. The onCreate method is used every time, which is also an important method in the life cycle function
The person in charge of each activity is called the activity stack. Obviously, one activity can be superi ...
Posted by 00king00 on Fri, 18 Feb 2022 15:56:17 +0100
Basic database syntax
SQL syntax
SQL add
INSERT INTO Table name VALUES (Value 1, Value 2,....)
INSERT INTO table_name (Column 1, Column 2,...) VALUES (Value 1, Value 2,....)
SQL query
Learn SQL website
Digital condition query
SELECT col,col,col what are you looking for?
Where can I find the FROM table?
What is the WHERE col condition?
select * from table ...
Posted by binit on Fri, 18 Feb 2022 15:53:52 +0100
spring boot integrates quartz
catalogue
summary
Preparation dependence
Configure
Design scheduled tasks
summary
In previous projects, the spring boot's built-in scheduled task function was basically used to manage scheduled tasks. The benefits of this are
Easy to use, and its functions are integrated in spring boot out of the boxThe code is easy to write and clear. ...
Posted by podarum on Fri, 18 Feb 2022 15:52:00 +0100
Record a fastdfs high and send the problem of upload failure
Recently, I received a request to convert text into voice MP3 files, store them in fastdfs, and then store the file path into the database.
Our fastdfs is version 5.05, and the fastdfs tool class has been changed to support concurrency
public class FastClient<main> {
private static Logger logger = Logger.getLogger(FastClient.class ...
Posted by gmcalp on Fri, 18 Feb 2022 15:48:36 +0100
pygame realizes tic tac toe chess - 3 Logical optimization
preface
Let's talk about the goal of this period first. First of all, when we judge the win or loss and draw, there is only one console output, which obviously does not conform to the doge of our game In addition, there is a loophole in the previous logic, that is, the player must be the first player (that is, the first person to play chess, w ...
Posted by wisewood on Fri, 18 Feb 2022 15:47:47 +0100
Linux common commands
1, Basic command
1.1. Startup and login
Boot will start many programs. They are called "service s" in Windows and "daemon s" in Linux. After successful startup, the text login interface will be displayed, which will not be displayed when entering the password. Generally speaking, there are three ways for users to log i ...
Posted by nickholt1972 on Fri, 18 Feb 2022 15:32:48 +0100
Interview shock: talk about thread life cycle and transformation process?
The life cycle of a thread refers to the whole process from creation to destruction. Generally, there are five kinds of thread life cycles:Initial stateOperational statusrunning state Dormant stateTermination statusTheir state transitions are shown in the following figure:Java thread lifecycleThe life cycle of Java thread is different from that ...
Posted by hongco on Fri, 18 Feb 2022 15:29:27 +0100
[brief volume of distributed system design] Raft
prefaceThis paper is about the experimental record of Raft in 2022-MIT 6.828;If you find any mistakes in the content, please don't be stingy with your keyboard.Basic concepts of RaftHow does Raft workRaft is a relatively simple consensus algorithm for Paxos, but no matter how simple "how raft works" can not be solved in a few words, a ...
Posted by fxchain on Fri, 18 Feb 2022 15:21:05 +0100