ReZero's Utopia.

# ReZero's Utopia.

Everything is permitted.

Request record
https://github.com/ReZeroS/request-record This post is used to explain how to write the plugin: request-record.I got a mission this week to record all api from function requests in our system. I have finished it, but I still wanna to write a plugin to simplify this work. Well, it maybe does not w...
KMP
How to calc the next array. Calc the max length of suffix and prefix as follows: string a b a a b c a b a length 0 0 1 1 2 0 1 2 3 next -1 0 0 1 1 2 0 1 2 As you can see, the next array is the suffix equals prefix length array move on one step and init the first values as -1. 1234567...
Mybatis collection mapping
123456789101112131415161718192021222324252627282930313233343536373839<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" ><mapper namespace="com.hand.persistence.AttachmentTypeLjMapper">...
liquibase
As Liquibase executes the databaseChangeLog, it reads the changeSets in order and, for each one, checks the “databasechangelog” table to see if the combination of id/author/filepath has been run. If it has been run, the changeSet will be skipped unless there is a true “runAlways” tag. After all ...
Since 10^{i}$\equiv 1（mod 9) ,then =>(a_{i}$ * 10^{i}$+ a_{i-1}$ * 10^{i-1}$+ …) mod 9 = (a_{i}$ * 10^{i}$mod 9 + a_{i-1}$ * 10^{i-1}$mod 9 + …) mod 9= (a_{i}$ + a_{i-1}\$ + …) mod 9 https://leetcode.com/problems/add-digits/discuss/68580/Accepted-C%2B%2B-O(1)-time-O(1)-space-1-Line-Solutio...