此文基于switch的注意事项而发,其中某些情况可能并不常见,但还是小心为好,能够帮助我们精简代码(编译环境:cmder) 匹配项不精准 ①某些case可能永远匹配不到,造成浪费 package main import "fmt" func test(char byte) byte { return ...
分类:
其他好文 时间:
2020-07-09 22:33:34
阅读次数:
77
Feign客户端请求远程服务接口时,需要携带token进行认证(详见《微服务迁移记(六):集成jwt保护微服务接口安全》),token有超时时间设置,当超时后,需要重新刷新token。如果每个接口都去判断,那就费事了,最好的办法是在拦截器里做。我这里使用的是OkHttp,新增一个OkHttpInte ...
分类:
Web程序 时间:
2020-07-09 22:06:21
阅读次数:
213
1.为什么需要正则表达式? 简洁的代码 严谨的验证文本框中的内容 生产环境中更为常用的方式 2..定义正则表达式 普通方法 var reg=/表达式/附加参数 构造函数 var reg=new RegExp("表达式","附加参数"); 3.表达式的模式 简单模式 只能表示具体的匹配 复合模式 可以 ...
分类:
其他好文 时间:
2020-07-09 20:52:19
阅读次数:
76
SELECT p.PatientID ,p.SBP, p.SBP2,p.SBP-p.SBP2 FROM ppg_data AS p where p.SBP2 is not null and p.SBP is not null 更改为 SELECT p.PatientID ,p.SBP, p.SBP2 ...
分类:
数据库 时间:
2020-07-09 19:37:08
阅读次数:
94
*** Settings *** Library Collections #RF操作列表和字典的一个库 *** Test Cases *** case1 @{list} create list 111 222 333 log to console ${list} #结果:['111', '222', ...
分类:
其他好文 时间:
2020-07-09 01:13:04
阅读次数:
77
package club.interview.design_pattern.chapt9_chain; import java.util.ArrayList; import java.util.List; /** * 加工一个字符串 * 1. 过滤敏感字符 * 2. 修改大小写 * 3. 增加笑脸 ...
分类:
其他好文 时间:
2020-07-09 00:45:19
阅读次数:
83
https://blog.csdn.net/qq_40613029/article/details/106622528?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.nonecas ...
分类:
其他好文 时间:
2020-07-08 22:50:28
阅读次数:
232
import java.util.Scanner;public class cs{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); System.out.pr ...
分类:
其他好文 时间:
2020-07-08 20:21:33
阅读次数:
63
在Scala中可以通过map映射操作来解决: 将集合中的每一个元素通过指定功能(函数)映射(转换)成新的结果集合这里其实就是所谓的将函数作为参数传递给另外一个函数,这是函数式编程的特点 以HashSet为例说明 def map[B](f: (A) ? B): HashSet[B] //map函数的签 ...
分类:
其他好文 时间:
2020-07-08 01:01:44
阅读次数:
67
1. 原生js的Base64方法 encodeURIComponent() 函数可把字符串作为 URI 组件进行编码,有一个必传参数. unescape() 函数可对通过 escape() 编码的字符串进行解码。 // base编码 // value 是编码后的值 // input 是需要编码的值 ...
分类:
其他好文 时间:
2020-07-07 23:38:07
阅读次数:
110