//: Playground - noun: a place where people can play import UIKit var str = "Welcome to Play Swift! Step by Step learn Swift language from now!" // range str.rangeOfString("Step") // 默认从前面开始搜索 str.rangeOfString("Step", option…
使用命令 java -jar springBoot.jar 启动项目,结果报错如下: Exception at java.lang.String.substring(String.java:) at org.springframework.boot.loader.jar.JarFile.createJarFileFromDirectoryEntry(JarFile.java:) at org.springframework.boot.loader.jar.JarFile.createJarFi…
有一个sql用union拼接的如下: select id,(**还有很多字段**),'' as NewName from tb1 union select id,(**还有很多字段**),name as NewName from tb2 union select id,(**还有很多字段**),name as NewName from tb3 tb1表中不存在这个字段所以用'' as NewNametb2,tb3中有这了个字段是varchar的查询以一直报错:StringIndexOutOfBo…
使用mac安装MySQLdb的时候出现string index out of range 大概的错误是这样的: 然后尝试手动安装,我下载了包后,依然出现这个错误. 于是百度了下: https://www.jianshu.com/p/da9dd5dd4bd2 这个匹配度是最高的,但是这个兄弟居然半路放弃了(没有转载哈).... 后来我就google了下, 原贴地址:https://stackoverflow.com/questions/51123044/pip-install-mysql-pyth…
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiLogMapper' defined in file : Invocation of init method failed; nested exception is tk.mybatis.mapper.MapperException: tk.mybatis.mapper.MapperException: java.l…
NS是Cocoa类对象类型的前缀,来源于乔布斯建立的另一家公司--NeXTNSString的使用方法,和Swift语言中的String有很多相似之处. 1.字符串的定义String类 var str1:String = "My name is strengthen" NSString类 var nsStr1:NSString = "My name is strengthen" var nsStr2:NSString = NSString(string: "…
1.字符串拼接 var num1 = "hello,world" var name = "xiaoming" var age = let student = num1 + name let info = name + String(age) print(name + "\(age)") 2.字符串判断与比较 1⃣️.判断是否为空 var string1 = " " if string1.isEmpty { print(&quo…