ReZero's Utopia.

# ReZero's Utopia.

Everything is permitted.

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...
Power of Two
Given an integer, write a function to determine if it is a power of two. 123bool isPowerOfTwo(int n) { return n > 0 && !(n&(n-1));} Explain: 100 & 011 = 0 Try think about power of 4: return num > 0 && (num & (num - 1)) == 0 && (num - 1) % 3 ...
Implement Stack using Queues
Implement the following operations of a stack using queues. 1234567891011121314151617181920212223242526272829303132333435363738394041424344class MyStack {public: queue<int> q; /** Initialize your data structure here. */ MyStack() { } /** Push element x ...
reverse the bits
Input: 00000010100101000001111010011100 Output: 00111001011110000010100101000000 Explanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261596, so return 964176192 which its binary representation is 00111001011110000010100101000000. https://l...
Newton
https://leetcode.com/problems/sqrtx/discuss/25057/3-4-short-lines-Integer-Newton-Every-Language/24092 1234long r = x;while (r*r > x) r = (r + x/r) / 2;return r;
Jdk8 feature or trouble ?
Since jdk 8 update, some tools has broken cause it’s new feature. For example, javasisit: Ebean lazyloading get failure that data not load all but only one attribute like UUID from children model. And for the reason, finally found this: https://github.com/jboss-javassist/javassist/pull/10 The...
Hexo & (GithubActions | Travis CI)

ReZero