Skip to content

Commit 73c7309

Browse files
committed
更新文件目录
1 parent 8f9f9bd commit 73c7309

File tree

10 files changed

+62
-74
lines changed

10 files changed

+62
-74
lines changed

Java/Head-First-Java-Concurrent-Programming/并发单元/线程.md

Whitespace-only changes.

Java/Head-First-Java-Concurrent-Programming/并发控制/Index.md

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ThreadLocal
2+
3+
Because if it were an instance level field, then it would actually be "Per Thread - Per Instance", not just a guaranteed "Per Thread." That isn't normally the semantic you're looking for.
4+
5+
Usually it's holding something like objects that are scoped to a User Conversation, Web Request, etc. You don't want them also sub-scoped to the instance of the class.
6+
One web request => one Persistence session.
7+
Not one web request => one persistence session per object.
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[![返回目录](https://parg.co/USw)](https://parg.co/bxN)
2-
3-
4-
5-
62

3+
# 函数声明与闭包

JavaScript/Modern-JavaScript-Development-Foundation/函数/函数调用与 this 绑定.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![返回目录](https://parg.co/USw)](https://parg.co/bxN)
2-
3-
4-
2+
3+
# 函数调用与 this 绑定
54

65
# 函数执行
76
我们已经知道, 浏览器第一次加载脚本, 它将默认进入 `全局执行上下文` 中。 如果,你在全局环境中调用了一个函数, 你的程序序列流会进入被调用的函数的当中,创建一个新的 `执行上下文` 并且将这个上下文压入`执行栈`之中。

JavaScript/Modern-JavaScript-Development-Foundation/函数/原型链与构造函数.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

JavaScript/Modern-JavaScript-Development-Foundation/类与对象/原型链与类的继承.md

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[![返回目录](https://parg.co/USw)](https://parg.co/bxN)
2-
3-
4-
5-
62

3+
# 原型链与类的继承
74

85
```
96
class A{
@@ -72,3 +69,51 @@ console.log(new B);
7269
// 删去 return {},则会报异常 ReferenceError: this is not defined
7370
```
7471
super(…); is basically sugar for this = new ParentConstructor(…);. Where ParentConstructor is the extended class, and this = is the initialisation of the this keyword (well, given that that's forbidden syntax, there's a bit more than sugar to it). And actually it will inherit from the proper new.target.prototype instead of ParentConstructor.prototype like it would from new. So no, how it works under the hood does not compare to ES5 at all, this is really a new feature in ES6 classes (and finally enables us to properly subclass builtins).
72+
73+
74+
```
75+
function Foo(){
76+
        getName = function() { console.log(1); };
77+
        return this;
78+
}
79+
80+
81+
Foo.getName = function () { console.log(2); }
82+
83+
84+
Foo.prototype.getName = function(){ console.log(3); };
85+
86+
87+
var getName = function(){ console.log(4); };
88+
89+
90+
function getName() { console.log(5); }
91+
92+
93+
// 2
94+
Foo.getName();
95+
96+
97+
// 4
98+
getName();
99+
100+
101+
// 1
102+
Foo().getName();
103+
104+
105+
// 1
106+
getName();
107+
108+
109+
// 2
110+
new Foo.getName();
111+
112+
113+
// 3
114+
new Foo().getName();
115+
116+
117+
// 3
118+
new new Foo().getName();
119+
```
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[![返回目录](https://parg.co/USw)](https://parg.co/bxN)
22

3-
4-
5-
6-
3+
# 基于 decorator-x 的实体类增强

JavaScript/Modern-JavaScript-Development-Foundation/类与对象/类的声明与实例化.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![返回目录](https://parg.co/USw)](https://parg.co/bxN)
22

3-
4-
3+
# JavaScript 中类的声明与实例化
54

65
[14.5.14 Runtime Semantics: ClassDefinitionEvaluation](http://www.ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-classdefinitionevaluation)
76

JavaScript/Modern-JavaScript-Development-Foundation/类与对象/类的继承与封装.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
[![返回目录](https://parg.co/USw)](https://parg.co/bxN)
22

3-
4-
5-
[![章节头]("https://parg.co/UG3")](https://parg.co/bxN)
6-
7-
8-
93

4+
# 类的继承与封装
105

116
```
127
class A{

0 commit comments

Comments
 (0)