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 ...
Add Digits
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)
基本概念仓库: 就是项目文件存放的位置,如果只完成第一步,不需要私有仓库,因为现在私有仓库免费了,所以考虑用私有仓库作为你的博客内容文件,用来存一些你觉着可能会用到但是又不希望别人看到的文件.仓库的名字可以随便取,但有一个名字是有特殊含义的,就是 UserName.github.io, 这个往往用来作为博客域名,并且你可以为其申请免费 https CNAME: 当你不喜欢上面那个域名,就可以通过在根目录下添加该文件来作 CNAME 转发 自动化部署: 就是你觉着每次都不用改变的重复劳动, 写成脚本即可,比如博客部署流程 博客部署流程: 本地 source 目录决定内容, _config....
avatar
ReZero
大屁水饺的理想国.