• Technology sharing | MySQL show processlist time is negative


    Author: Gao PengAt the end of the article, there is his book “deep understanding of MySQL master-slave principle 32 lectures”, in-depth and thorough understanding of MySQL master-slave, gtid related technical knowledge. 1、 Source of the problem This is a question a friend asked me. The question is as follows: in MTS, the worker thread sees […]

  • Front end knowledge points


    It mainly records some small notes in work and study. There is no specific technical classification and order. As long as it is related to the front end, it will be put in the bottom, and then collated into a volume later. I hope I can keep updating 1. > > > 0-bit operation >>>Unsigned […]

  • [SQL common functions] Part 5 date functions


    After reading this chapter, you will learn the following: Months_ Order of two dates between NEXT_ Notes on day return date –ADD_ Months (D, n), adding the specified number of months to a certain date D, returns the new date after calculation. D is the date, n is the number of months to add (n […]

  • Understanding the Mars (regular) expressions: trapping elements and non trapping elements


    Want to understand all those abnormal regular expressions in the world? Dream, young, what do you want, do your best to learn Introduction JS has been learning and using for nearly one or two years. When you find objects, you can use them, and you can also learn how to inherit them. However, when you […]

  • [30 day leetcoding challenge] day 3


    Hi, everyone. I’m a pig. Welcome to “baby can understand” series special – 30 day leetcoding challenge. This is a small official event for leetcode. As you can see on the official website, from April 1, every day, the official will select a question and complete it within 24 hours to get a small reward. […]

  • Displacement operation


    Original code, inverse code, complement code Signed displacement operation (< and > >Signed displacement operations are divided into < (shift left) and > > (shift right). These two kinds of displacements are for complement operation. Symbol bits are involved in displacement operation. Except for the negative number to fill 1 in the high position, the […]

  • Why should negative numbers be represented by complement?


    The last article talked about “how negative numbers are stored in computers”. After reading, we should have a basic understanding of the original code, the inverse code and the complement code. Today, let’s talk about why we use complement to express negative numbers in computers? First of all, we should be clear that the original […]

  • leetcode454. 4Sum II


    Title Requirements Given four lists A, B, C, D of integer values, compute how many tuples`(i, j, k, l)`there are such that`A[i] + B[j] + C[k] + D[l]`is zero. To make problem a bit easier, all A, B, C, D have same length of N where 0 ≤ N ≤ 500. All integers are in […]

  • Case analysis of positive and negative prefetch in regular expressions


    In this paper, the positive and negative pre queries in regular expressions are illustrated. Share with you for your reference. The specific analysis is as follows: Here’s an example to explain what a forward lookup is. Example: there is a paragraph called “coming soon, going go gogogo”, which requires finding out com and go. The […]

  • Using jsonpath in fastjson to process JSON data


    introduce The version after fastjson 1.2.0 supports jsonpath. , which can be used as the JSON object query language (OQL) in the Java framework. Common API public class JSONPath { //Evaluation, static method public static Object eval(Object rootObject, String path); //Evaluation, static method,按需计算,性能更好 public static Object extract(String json, String path); //Calculate size, number of map […]

  • SQL number to Chinese uppercase


    USE [SPECIAL_BLD]GO SET ANSI_NULLS ONGO SET QUOTED_IDENTIFIER ONGO CREATE FUNCTION [dbo].[get_upper] ( @num numeric(18,5))RETURNS VARCHAR(500)ASBEGIN DECLARE @n_data VARCHAR(20),@c_data VARCHAR(100),@n_str VARCHAR(10),@i int SET @n_data=RIGHT(SPACE(14)+CAST(CAST(ABS(@num*100) AS bigint) AS varchar(20)),14) SET @c_data=” SET @i=1 WHILE @i<=14 BEGIN SET @n_str=SUBSTRING(@n_data,@i,1) IF @n_str<>’ ‘ BEGIN IF not ((SUBSTRING(@n_data,@i,2)=’00’) or ((@n_str=’0′) and ((@i=4) or (@i=8) or (@i=12) or (@i=14))))Set @ c_data […]

  • 61. Rotating list


    Given a list, rotate the list, and move each node of the list to the right by K positions, where k is a non negative number. Example 1: Input: 1 – > 2 – > 3 – > 4 – > 5 – > null, k = 2Output: 4 – > 5 – > 1 […]