字符串是不变对象,内容一旦创建不可改变,若改变一定会创建新对象。 频繁修改字符串带来的性能开销。 String s1 = "123hello"; String s2 = "123hello"; System.out.println(s1==s2);//true String s3 = "123hel ...
分类:
编程语言 时间:
2019-12-24 23:47:37
阅读次数:
98
1.Math对象的属性 2.min()和max()方法 console.log(Math.max(4,85,3))//=>85 let arr = [2,6,8,2,120]; console.log(Math.max.apply(Math,arr))//=>120 3.舍入方法 Math.ceil ...
分类:
Web程序 时间:
2019-12-24 23:31:12
阅读次数:
92
reudom Automated testing framework based on requests and unittest interface. 基于 Unittest 和 Requests 的 接口自动化测试框架 介绍 基于Unittest/Requests的接口自动化测试库 提供脚手架, ...
分类:
其他好文 时间:
2019-12-24 23:18:59
阅读次数:
167
const io = new IntersectionObserver(callback); let imgs = document.querySelectorAll('[data-src]'); function callback(entries){ entries.forEach((item) ... ...
分类:
其他好文 时间:
2019-12-24 20:46:29
阅读次数:
87
In XML based Spring MVC configuration, you must have seen two declarations in web.xml file i.e. ContextLoaderListener and DispatcherServlet. Let’s try ...
分类:
其他好文 时间:
2019-12-24 18:54:02
阅读次数:
85
1.引入依赖 1 <parent> 2 <groupId>org.springframework.boot</groupId> 3 <artifactId>spring-boot-starter-parent</artifactId> 4 <version>1.5.3.RELEASE</versio ...
分类:
其他好文 时间:
2019-12-24 18:40:08
阅读次数:
58
总结 关于equals 比较 记住:equals方法比较的是真正的值 两个包装类比较,比较的是包装的基本数据类型的值 基本数据类型和包装类型比较时,会先把基本数据类型包装后再比较 (但是因为equal比较的还是真正的值,因此最终结果没有影响) double i0 = 0.1; Double i1 = ...
分类:
编程语言 时间:
2019-12-24 18:36:59
阅读次数:
74
第一部分:ES6新增了块级作用域,let关键字用于声明变量,相较于var而言,let关键字不存在声明提前。 1.ES6真正的出现了块级作用域,使用双花括号括住并在其中用let声明变量,会存在暂时性死区,在作用域外面使用变量会报错。 2.在循环中,如for循环,let命令相较于var命令会更好,原因在 ...
分类:
其他好文 时间:
2019-12-24 18:29:59
阅读次数:
75
最近线上服务经常 出现cpu达到100%的问题,发现都是执行oracle操作的方法就没有返回。经过排查,最后定位到cpu消耗在以下方法 System.Collections.Generic.Dictionary`2<system.type,system.boolean>.FindEntry (... ...
分类:
其他好文 时间:
2019-12-24 13:39:07
阅读次数:
82
let list = [ { parentId: 0, id: 1, value: '1' }, { parentId: 3, id: 2, value: '2' }, { parentId: 0, id: 3, value: '3' }, { parentId: 1, id: 4, value: ...
分类:
其他好文 时间:
2019-12-24 13:24:13
阅读次数:
183