返回博主主页
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 27 下一页
摘要: 先看例子: new Promise(function(resolve, reject) { console.log(1); setTimeout(function() { console.log("First"); resolve(); }, 1000); console.log(2); } ).t 阅读全文
posted @ 2021-11-17 11:46 懒惰的星期六 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 1. 深入理解 JS 引擎执行机制(同步执行、异步执行以及同步中的异步执行) 2. async function_实例说明async/await的执行顺序 3. setTimeout和setInterval 4. 微任务宏任务嵌套执行 5. async/await以及js中的微任务和宏任务 阅读全文
posted @ 2021-11-17 10:03 懒惰的星期六 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1. let f = {}; f.flip = (fn)=>(...args)=>fn(...args.reverse()); var divide = (a,b)=>a / b; var flip = f.flip(divide); flip(10, 5) // 0.5 flip(1, 10) / 阅读全文
posted @ 2021-11-11 12:49 懒惰的星期六 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1. 通过new的方式创建对象,自己会返回一个对象 function person(firstname, lastname, age, eyecolor) { this.firstname = firstname; this.lastname = lastname; this.age = age; 阅读全文
posted @ 2021-11-11 12:31 懒惰的星期六 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 1. // console.log(Object.keys(p.prototype)) // 报错console.log(Object.keys(p))//['x', 'y']console.log(Object.keys(Point.prototype))//['fun1', 'fun2']con 阅读全文
posted @ 2021-11-11 12:29 懒惰的星期六 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1. // Example POST method implementation: async function postData(url='15479453.html', data={}) { // Default options are marked with * const response 阅读全文
posted @ 2021-11-11 11:12 懒惰的星期六 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Git撤销未提交(commit)的修改 1.新建test.txt,添加内容如下: hello world 2.git add test.txt 3.修改test.txt为 hello world。 hello china (使用git status可以看到“待提交”的文件) 4.使用checkout 阅读全文
posted @ 2021-11-04 17:02 懒惰的星期六 阅读(2021) 评论(0) 推荐(0) 编辑
摘要: 原因:Handler在Android中用于消息的发送与异步处理,常常在Activity中作为一个匿名内部类来定义,此时Handler会 隐式地持有一个外部类对象(通常是一个Activity)的引用。当Activity已经被用户关闭时,由于Handler持有Activity的引用造成Activity无 阅读全文
posted @ 2021-11-04 14:21 懒惰的星期六 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 1.ctrl+H:光标在对应类所在的文件中,按下组合键,查看当前累的所有父类(直到Object)。 2.在project对应的目录树所在窗口,直接输入字符,可以通过字符检索对应的文件。 chrome: command+shif+T恢复上次关闭的标签页 一、搜索类Ctrl+N:搜索类的快捷键是Ctrl 阅读全文
posted @ 2021-11-04 11:27 懒惰的星期六 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 结论现行:关闭activity的时候,需要解绑服务 1.应该重写onDestroy方法,取消绑定,这样就ok了。 2.可以通过广播机制。 Android】关于Activity Crash后,其调用绑定的Service依然在后台运行的问题???? 我的Activity里同时使用了bindService 阅读全文
posted @ 2021-11-03 20:20 懒惰的星期六 阅读(1043) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 27 下一页

Welcome to here

主页