This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.NonNull; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* Created by Leo | |
* on 2017/8/4. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 api.ad.xiaomi.com | |
127.0.0.1 sdkconfig.ad.xiaomi.com | |
127.0.0.1 ad.mi.com | |
127.0.0.1 ad.xiaomi.com | |
127.0.0.1 ad1.xiaomi.com | |
127.0.0.1 adv.sec.miui.com | |
127.0.0.1 test.ad.xiaomi.com | |
127.0.0.1 new.api.ad.xiaomi.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* http://www.07net01.com/2016/04/1434487.html | |
1.引言 | |
随着项目不断的增大,尤其是一个在不断开发完善的项目,随着需求变化,数据库的schema也会跟着变化,数据库也需要不断的扩充,加表加字段,(每一次的增加称作一次DB的迁移migration)你是否还在用着最原始的方式, 用文件管理每次的SQL升级脚本,加了哪些字段,加了那些表,现在可以用数据库版本控制工具轻而易举搞定了。 | |
flyway支持Java API的操作方式,可以和spring 框架进行无缝连接,使其在系统启动的时候检查并升级数据库的版本(特别适合于java项目)。 | |
2.flyway的特点 | |
2.1使用它之前先要了解一些概念: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Java 8 (Oracle) Dockerfile | |
# Base image: Ubuntu | |
# Installs: Java 8 | |
FROM ubuntu:latest | |
# Install basic software support | |
RUN apt-get update && \ | |
apt-get install --yes software-properties-common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package port | |
import ( | |
"net" | |
"strconv" | |
) | |
// New gets an available port | |
func New() (port int, err error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
常用的数字正则(严格匹配) | |
------------------------------ | |
正则 含义 | |
^[1-9]\d*$ 匹配正整数 | |
^-[1-9]\d*$ 匹配负整数 | |
^-?[1-9]\d*$ 匹配整数 | |
^[1-9]\d*|0$ 匹配非负整数(正整数 + 0) | |
^-[1-9]\d*|0$ 匹配非正整数(负整数 + 0) | |
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ 匹配正浮点数 | |
^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ 匹配负浮点数 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* helper class to check the operating system this Java VM runs in | |
* http://stackoverflow.com/questions/228477/how-do-i-programmatically-determine-operating-system-in-java | |
* compare to http://svn.terracotta.org/svn/tc/dso/tags/2.6.4/code/base/common/src/com/tc/util/runtime/Os.java | |
* http://www.docjar.com/html/api/org/apache/commons/lang/SystemUtils.java.html | |
*/ | |
public final class OsCheck { | |
/** | |
* types of Operating Systems | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
hr{ | |
border-width: 0px; | |
border-top: 2px dashed #d8d8d8; | |
color: #d8d8d8; | |
height: 1px; | |
} |
NewerOlder