正则表达式:工具类之RegexUtils(正则工具类)
/******************** 正则相关常量 ********************/
/**
* 正则:手机号(简单)
*/
public static final String REGEX_MOBILE_SIMPLE = "^[1]\\d{10}$";
/**
* 正则:手机号(精确)
import java.net.MalformedURLException; | |
import java.net.URL; | |
import lombok.extern.slf4j.Slf4j; | |
/** | |
* 参考: https://github.com/scijava/scijava-common/blob/scijava-common-2.62.1/src/main/java/org/scijava/util/ClassUtils.java#L296-L355 | |
* @author Yang Guanrong | |
* @date 2020/04/10 12:30 |
------------- 查看用户 ----------- | |
use mysql; | |
select host,user,password from user; | |
------------- 查看用户权限 -------- | |
-- 查看本地root的权限,没有指定后面的localhost则默认为'%' | |
show grants for root@'localhost'; | |
-- 查看指定host的root的权限 | |
show grants for root@'192.168.122.12'; |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import net.coobird.thumbnailator.Thumbnails; | |
public class ImageShrinkWithDpi { | |
public static BufferedImage shrink(BufferedImage image, int imgWidthInUserSpaceUnit, int dpi) throws IOException { | |
int imageWidth = image.getWidth(); |
正则表达式:工具类之RegexUtils(正则工具类)
/******************** 正则相关常量 ********************/
/**
* 正则:手机号(简单)
*/
public static final String REGEX_MOBILE_SIMPLE = "^[1]\\d{10}$";
/**
* 正则:手机号(精确)