方法引用 方法引用可以被看作仅仅调用特定方法的Lambda的一种快捷写法。如果一个Lambda代表的只是“直接调用这个方法”,那最好还是用名称来调用它,而不是去描述如何调用它。 当要传递给Lambda体的操作,已经有实现的方法了,可以使用方法引用。 构建方式 类 :: 静态方法 Comparator ...
分类:
编程语言 时间:
2020-09-16 12:23:35
阅读次数:
31
全局变量的设置 在miniprogram > app.js 文件中设置,globalData对象就是存储全局变量的。 App({ globalData: { hasLogin: false, openid: null }, onLaunch: function () { } }) 2.全局变量的使用 ...
分类:
微信 时间:
2020-09-16 12:07:43
阅读次数:
53
最近写项目时发现通过meta标签已无法禁止移动端双指缩放,一般的js写法也无法阻止,最终解决方案如下: 重点:passive //禁止双指放大 document.documentElement.addEventListener('touchstart', function (event) { if ...
分类:
移动开发 时间:
2020-09-15 21:08:02
阅读次数:
65
258. 各位相加258. 各位相加Table of Contents1. 题目2. 代码3. 思路1 题目258. 各位相加2 代码class Solution { /** * @param Integer $num * @return Integer */ function addDigits(... ...
分类:
其他好文 时间:
2020-09-15 20:56:20
阅读次数:
33
1.问题:当iframe的页面加载过再关闭之后,如果iframe的src没有发生变化,js不会重新加载,再次打开页面不会刷新; 2.解决方法:关闭页面时清空src,再次打开时即可重新加载最新数据。 $scope.updateCandidateUserValue = function (data) { ...
分类:
其他好文 时间:
2020-09-14 19:10:08
阅读次数:
31
//获得视频文件的总长度时间和创建时间 根据视频长度判断是否失效 public function getTime($url) { //获取视频重定向后的链接 $location = locationUrl($url); //获取视频Content-Length $responseHead = get ...
分类:
Web程序 时间:
2020-09-12 21:38:52
阅读次数:
67
```js // log /** * 找到第一个字母,若没有满足要求的返回null * @param {string} str */ function getFirstCharThatAppearsOnce(str) { let result let len = str.length let bla... ...
分类:
编程语言 时间:
2020-09-12 21:11:02
阅读次数:
39
In previous blog Wechat development series 1 – setup your development environment I introduce the necessary step to setup environment for Wechat devel ...
分类:
微信 时间:
2020-09-11 14:17:18
阅读次数:
59
在项目根目录下创建vue.config.js文件 vue.config.js内容: const path = require('path');//引入path模块 function resolve(dir){ return path.join(__dirname,dir)//path.join(__ ...
分类:
Web程序 时间:
2020-09-10 22:36:41
阅读次数:
155
console.log(Object) console.log(Object.prototype) console.log(Object.prototype.__proto__) // null function Fn () { this.test1 = function () { console. ...
分类:
Web程序 时间:
2020-09-08 21:04:15
阅读次数:
55