原创 arm linux下編譯xtrabackup-2.4.5

環境:aarch64/centos7.6  glibc-2.17 編譯器:gcc version 5.5.0 (GCC) 官方參考文檔:https://www.percona.com/doc/percona-xtrabackup/2.4/

原创 arm linux環境編譯mysql5.7.29

編譯過程 安裝工具、依賴包 編譯工具:cmake、make、devtoolset-7 依賴包:openssl-devel、ncurses-devel、libaio-devel、boost-1.59.0(boost-1.59.0源碼:boo

原创 [Tips] go語言中的空struct

參考:https://dave.cheney.net/2014/03/25/the-empty-struct#comment-2815 tips: 空struct的寬度爲0; 不同的空struct,有相同的地址(https://golan

原创 [LeetCode] Longest Palindromic Substring

題目鏈接:https://leetcode.com/problems/longest-palindromic-substring/ description: Given a string s, find the longest palin

原创 [LeetCode] ZigZag Conversion

題目鏈接:https://leetcode.com/problems/zigzag-conversion/submissions/ 思路: 假設最後一個頂點總是在上面的,會有如下兩種情況: func convert(s string,

原创 使用gorm時,主鍵爲空值時遇到的問題

問題描述: 最近在使用gorm時,發現db文件在某些情況下會多出來幾行重複的數據。 type Sip struct { SipPoolID uint Sip string `json:"-" gorm:"primary_key"`

原创 [LeetCode] Container With Most Water

題目鏈接:https://leetcode.com/problems/container-with-most-water/ 一開始我採用了遍歷對比了每個可能的面積,後來參考了題目裏給出的解決思路: 面積由距離和高度決定,而兩個指定點之間的

原创 [LeetCode] Longest Substring Without Repeating Characters

https://leetcode.com/problems/longest-substring-without-repeating-characters/ description: Given a string, find the len

原创 centos7安裝docker

整理記錄在centos7安裝docker時遇到的坑 我的安裝步驟: 參考了docker官網的安裝步驟 https://docs.docker.com/install/linux/docker-ce/centos/ 安裝好了docker之後

原创 [LeetCode] Add Two Numbers

https://leetcode.com/problems/add-two-numbers/ You are given two non-empty linked lists representing two non-negative i