Wesley13 Wesley13
3年前
java判断字符串是否为数字或中文或字母
1.判断字符串是否仅为数字:1用JAVA自带的函数public static boolean isNumeric(String str){  for (int i  str.length();i0;){      if (!Character.isDigit(str.charAt(i))){
梦
4年前
微信小程序字符串展示为二维码
微信小程序中要将一个字符串展示为二维码的形式,需要引入该js文件//Corecodecomesfromhttps://github.com/davidshimjs/qrcodejsvarQRCode;(function(){/Getthetypebystringlength
Kent_Sun Kent_Sun
4年前
java截取url后缀以及判断是否带参数
java获取url后缀,以及判断是否带参数(?paramsxxx)java//使用了String对象的方法截取字符串StringfileUrl"http://www.baidu.com?a1234";intindexfileUrl.lastIndexOf("?");if(index1){file
Wesley13 Wesley13
3年前
mysql基础 Like关联查询
//mysql中使用concat连接字符串selectt1.id,t1.title,t2.keywordfromt1innerjoint2ont1.titlelikeconcat('%',t2.keyword,'%');其它思路:exists(是否存在)、regexp(正则)、
Easter79 Easter79
3年前
SpringBoot自定义序列化的使用方式
场景及需求:项目接入了SpringBoot开发,现在需求是服务端接口返回的字段如果为空,那么自动转为空字符串。例如:\    {        "id":1,        "name":null    },    {        "id":2,        "name":"x
可莉 可莉
3年前
20个常用java代码段
下面是20个非常有用的Java程序片段,希望能对你有用。1\.字符串有整型的相互转换12StringaString.valueOf(2);//integertonumericstringint iInteger.parseInt(a);//numericstringtoanin
Wesley13 Wesley13
3年前
C++如何输入含空格的字符串
1、scanf函数(包含头文件include<stdio.h)  scanf函数一般格式为scanf(“%s”,st),但scanf默认回车和空格是输入不同组之间的间隔和结束符号,所以输入带空格,tab或者回车的字符串是不可以的。解决方法如下:1)利用格式符“%\\”它的作用为扫描字符集合。Scanf(“%\^c\”,str);其中“
Wesley13 Wesley13
3年前
Java判断中文字符串是否乱码
转自CSDN一个博主的文章,感觉很有用,转发收藏一下。importjava.util.regex.Matcher;importjava.util.regex.Pattern;publicclassChineseUtill{privatestaticbooleanisChinese
Wesley13 Wesley13
3年前
lz
原文链接: lzstring面向localstorage的字符串压缩库(https://my.oschina.net/ahaoboy/blog/4696653)https://www.npmjs.com/package/lzstring(https://www.oschina.net/action/GoToLink?urlhttps%3A
Stella981 Stella981
3年前
Impala常用函数索引
增加X自然天selectdays_add(now(),2)字符串转Timestampselectto\_timestamp('2019101420:00:01','yyyyMMddHH:mm:ss');注意,Impala的timestamp的标准是ISO8601 参考:https://en.wiki