前言 此篇博客用来记录一些常用的正则表达式 判断是否是全汉字 /** * 判断是否是全中文汉字 * * @param str * @return */ public static boolean isChinese(String str) { String pattern = "[\u4e00-\u ...
分类:
编程语言 时间:
2020-06-16 12:45:42
阅读次数:
65
1.下列输出可能不是“aa,bb”的是(B) d0 = {"a":"aa","b":"bb"} print("d0: {a},{b}".format(**d0)) d1 = {"aa","bb"} print("d1: {0},{1}".format(*d1)) d2 = ["aa","bb"] p ...
分类:
编程语言 时间:
2020-06-16 01:05:24
阅读次数:
62
Searching a string using the ‘Find‘ or ‘Find & Replace‘ function in text editors highlights the relevant match (e.g. searching ‘le‘ highlights it insi ...
分类:
其他好文 时间:
2020-06-15 23:19:53
阅读次数:
101
控制结构 Scala的控制结构有:if、while、for、try、match和函数调用。 if表达式 if可以作为一个返回值,如下面的代码。同时用val,就像Java的final变量一样,一旦初始化就不会改变。 val filename = if (!args.isEmpty) args(0) e ...
分类:
其他好文 时间:
2020-06-15 19:21:42
阅读次数:
42
// test // 判断字符串是否满足某个匹配模式,满足的话,返回true,否则,返回false let reg = /^a/ let str = '123abc' console.log(reg.test(str)) //false // exec // 用于检索字符串中的正则表达式的匹配。该函 ...
分类:
其他好文 时间:
2020-06-13 19:03:06
阅读次数:
65
1 """正则表达式小案例""" 2 3 import re 4 5 # 1、验证手机号码 6 # text = "13979391000" 7 # ret = re.match('1[34578]\d{9}', text) 8 # print(ret.group()) 9 # 2、验证邮箱 10 ...
分类:
其他好文 时间:
2020-06-13 00:45:41
阅读次数:
61
1. Caused by: java.lang.RuntimeException: Row arity of from does not match serializers. at org.apache.flink.api.java.typeutils.runtime.RowSerializer.c ...
分类:
其他好文 时间:
2020-06-12 11:09:07
阅读次数:
129
本次做后台管理系统,采用的是 AntD 框架。涉及到图片的上传,用的是AntD的 upload 组件。 我在上一篇文章《AntD框架的upload组件上传图片时使用customRequest方法自定义上传行为》中讲到:AntD 的 upload 组件有很多坑,引起了很多人的关注。折腾过的人,自然明白 ...
分类:
Web程序 时间:
2020-06-11 16:50:08
阅读次数:
67
When release a version, we want to check the version number whether match. so we define some rules to follow to avoid mistakes. 1. VERSION file locate ...
分类:
其他好文 时间:
2020-06-11 13:37:42
阅读次数:
53
写在前面 当bean是单实例,并且没有设置懒加载时,Spring容器启动时,就会实例化bean,并将bean注册到IOC容器中,以后每次从IOC容器中获取bean时,直接返回IOC容器中的bean,不再创建新的bean。 如果bean是单实例,并且使用@Lazy注解设置了懒加载,则Spring容器启 ...
分类:
编程语言 时间:
2020-06-10 13:32:19
阅读次数:
66