类加载及执行子系统的案例与实战字节码生成技术与动态代理的实现在Java里面除了javac和字节码类库外,使用字节码生成的例子还有很多,如Web服务器中的JSP编译器,编译时椬人的AOP框架,还有很常用的动态代理技术,甚至在使用反射的时候虚拟机都有可能会在运行时生成字节码来提高执行速度。
在Spring内部都是通过动态代理的方式来对Bean进行增强的。动态代理中所谓的“动态”,是针对使用Java代码...
Continue reading
Solving Linear EquationsVectors and Linear Equations
The row picture shows tow lines meeting at a single point(solution).
The column picture combines the column vectors on the left side to product th...
Continue reading
Continue reading
Introduction to VectorsVectors and Linear CombinationsVECTOR ADDITION $v =\begin{bmatrix}v_1 \v_2 \\end{bmatrix}$ and $w =\begin{bmatrix}w_1 \w_2 \\end{bmatrix}$ add to $v + w = \begin{bmatrix}v_1 + w...
Continue reading
Continue reading
Vector Spaces and SubspacesSpaces of VectorsThe space $R^n$ consists of all column vectors $v$ with n components.
“Inside the vector space” means that the result stays in the space.
A subspace of a ve...
Continue reading
Continue reading
OrthogonalityOrthogonality of the Four SubspacesTwo vectors are orthogonal when their dot product is zero: $v \cdot w = 0$ or $v^Tw = o$.
ProjectionsWhen $Ax=b$ has no solution, multiply by $A^T$ an...
Continue reading
Continue reading
Linear TransformationsThe Idea of a Linear TransformationA transformation $T$ assigns an output of $T(v)$ to each input vector $v$ in $V$. The transformation is linear if it meets these requirements f...
Continue reading
Continue reading
DeterminantsThe determinant is zero when the matrix has no inverse.
$$\begin{vmatrix}a & b \ c & d \end{vmatrix}=ad-bc$$
The Properties of Determinants
The determinant of the $n$ by $n$ ident...
Continue reading
Continue reading
Eigenvalues and EigenvectorsIntroduction to EigenvaluesThe basic equation is $Ax = λx$. The number $λ$ is an eigenvalue of $A$.The vector $x$ is an eigenvector of $A$.
The Equation for the Eigenvalues...
Continue reading
Continue reading
Java内存模型与线程并发处理的广泛应用是使得Amdahl定律代替摩尔定律成为计算机性能发展源动力的根本原因,也是人类“压榨”计算机运算能力的最有力武器。
概述并发场景
- 充分利用计算机处理器的能力
- 一个服务端同时对多个客户端提供服务
## 硬件的效率与一致性
物理计算机中的并发问题
基于髙速缓存的存储交互很好地解决了处理器与内存的速度矛盾,但是也为计算机系统带来更高的复杂度,因为它引人了一...
Continue reading
Continue reading
线程安全与锁优化线程安全当多个线程访问一个对象时,如果不用考虑这些线程在运行时环境下的调度和交替执行,也不需要进行额外的同步,或者在调用方进行任何其他的协调操作,调用这个对象的行为都可以获得正确的结果,那这个对象是线程安全的。
弱化 如果把“调用这个对象的行为”限定为“单次调用”,这个定义的其他描述也能够成立的话,我们就可以称它是线程安全了。
Java语言中的线程安全不可变不可变(Immutabl...
Continue reading
Continue reading