lua中的小技巧,即基础lua语言本身的特种,进行一个些简化的操作 一. 巧用or x = x or v 等价于: if not x then x = v end 假设x为nil或false,就给他赋值为 二.三元运算符实现 a and b or c 类似C语言: a ? b : c and 的运算由优先级高于or 三.不足位补0 str = string.format("%02d",num) 相当于 if num < 10 then str = string.format(&q…
1.打包后提交报错误 错误信息:ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. The binary at path [******.app/build-libidn.sh] 解决方案:在Archive 界面上 选择刚生成的那个app 右键 Show in Finder 显示包含内容->Products->Application->应用 右键显示包含内容,找到文件 build-li…
1.where 字段名 regexp '正则表达式' 正则符号: ^ $ . [ ] * | . 表示1个任意字符 * 表示前面重复0次,或者任意次 ^ 开始 $ 结尾 [] 范围 | 或 sql示例: #查询以[李]开头的 select name from user where name regexp '^李'; #查询以[小]结尾的 select name from user where name regexp '小$'; #查询以[李]开头,中间任意,结尾以[四]的 select name…
1.where 字段名 regexp '正则表达式' 正则符号: ^ $ . [ ] * | . 表示1个任意字符 * 表示前面重复0次,或者任意次 ^ 开始 $ 结尾 [] 范围 | 或 sql示例: #查询以[李]开头的 select name from user where name regexp '^李'; #查询以[小]结尾的 select name from user where name regexp '小$'; #查询以[李]开头,中间任意,结尾以[四]的 select name…