var obj = { foo: function () { console.log(this.bar) }, bar: 1 }; var foo = obj.foo; var bar = 2; obj.foo() // 1 foo() // 2 obj.foo()和foo() 是同一个函数,为什么 ...
分类:
编程语言 时间:
2021-06-22 18:30:25
阅读次数:
0
1.Object.prototype.tosString.call(); 最确定 使用最广 例子:console.log(Object.prototype.toString.call([])); 2.instanceof JS语法 和数组Array进行比较判断 例子:console.log([] i ...
分类:
编程语言 时间:
2021-06-22 18:14:25
阅读次数:
0
import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.os.Build; import android.ut ...
分类:
移动开发 时间:
2021-06-22 17:57:53
阅读次数:
0
简介OS: CentOS Linux release 8.2 开始清除mysql# 查看系统信息$ cat /etc/redhat-releaseCentOS Linux release 8.2.2004 (Core) # 查看有没有mysql$ rpm -qa | grep mysqlmysql- ...
分类:
数据库 时间:
2021-06-22 17:36:24
阅读次数:
0
script 使用不同属性的代码示例。 》 parser 》html引擎的解析,解析html文本的解析器 fetch 》获取脚本资源 execution==》执行 runtime==》执行的时间线 1. 解析html文本,碰到script标签,停止html解析,获取script引用外部文件, 获取后 ...
分类:
其他好文 时间:
2021-06-21 20:59:40
阅读次数:
0
今天完成了昨天的初步构想,详细介绍见上一篇博客,具体项目结构和案例如下: MainActivity.java: package com.example.familybooks; import android.os.Bundle; import android.provider.ContactsCon ...
分类:
移动开发 时间:
2021-06-21 20:51:37
阅读次数:
0
日志文件丢失有以下几种可能性 1:日志正在记录的时候,手动修改了/var/log/messages 2: 存储设备异常,系统无法将日志写入到/var/log/messages中 3:突然有大量日志写入,并提示 begin to drop messages due to rate-limiting 1 ...
分类:
其他好文 时间:
2021-06-21 20:43:49
阅读次数:
0
// break 结束整个循环 // continue 跳过当前循环 (跳过一次循环,后面会继续) // break 可以在循环和switch语句中使用 // continue 只能在循环中使用 // break 结束整个switch语句 // for (var i = 0; i < 10; i++ ...
分类:
其他好文 时间:
2021-06-21 20:23:04
阅读次数:
0
通过定时器实现间隔一秒输出1,在间隔一秒输出2 第一种通过定时器方式实现这个需求 setTimeout(()=>{ console.log(1); setTimeout(()=>{ console.log(2); },1000) },1000) 另一种通过promise来实现 let promise ...
分类:
其他好文 时间:
2021-06-21 20:07:56
阅读次数:
0
第八章 日志管理 一日志文件对于诊断和解决系统中的问题很有帮助,因为Linux内核和运行迚程通常会把系统消息和错误消息写入相应的日志文件,默认日志文件存储在/var/log目录中,日志内容可用于系统审计和故障排除。RHEL 7的日志系统基于syslog协议,许多程序使用此系统记录事件,并将记录消息整 ...
分类:
其他好文 时间:
2021-06-20 18:30:34
阅读次数:
0