温故而知新 - 重新认识JavaScript的原型

2021-04-18
阅读 2 分钟
858
JavaScript中对象有一个特殊的[[Prototype]]内置属性,其实就是对于其他对象的引用。几乎所有的对象在创建时[[Prototype]]属性都会被赋予一个非空的值,可以通过__proto__访问该属性。此外,prototype是JavaScript中函数的一个属性。

温故而知新:重新认识JavaScript的this

2021-04-09
阅读 3 分钟
896
this是JavaScript中的一个关键字,关于讲解this的文章,网上资源很多。这里记录关于this的思考:什么是this、为什么有this。

温故而知新 - 重新认识JavaScript的Closure

2021-04-07
阅读 5 分钟
1.2k
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function. In JavaScript, closures are created every time a function is c...

温故而知新 - 重新认识JavaScript的Execution Context

2021-04-05
阅读 5 分钟
2k
An execution context is a specification device that is used to track the runtime evaluation of code by an ECMAScript implementation.

温故而知新 - 重新认识JavaScript的Hoisting

2021-04-03
阅读 4 分钟
1.3k
在JavaScript中,如果试图使用尚未声明的变量,会出现ReferenceError错误。毕竟变量都没有声明,JavaScript也就找不到这变量。加上变量的声明,可正常运行:

关于 Linux 下 root 登录 MySQL 报错的问题

2016-02-04
阅读 2 分钟
5.2k
mysql版本为:Ver 14.14 Distrib 5.7.10, for Linux(X86_64) using EditLine wrapper

限制直接通过地址栏键入链接地址访问xml配置文件

2015-12-12
阅读 3 分钟
4.5k
在实际的web项目中,有些配置项会放在xml文件里面,对于xml文件,我们其实并不希望访问者进行访问,毕竟xml文件里面可能配置了一些较为敏感的信息,比如内网IP、用户名及密码等。对此,希望能够限制访问者直接在地址栏键入链接地址访问到xml文件。