I have a class that needs to obtain a reference to it's application's AssetManager. This class does not extend any sort of android UI class, so it doesn't have a getContext() method, or anything similar. Is there some sort of static Context.getCurrentApplicationContext() type of method?
To clarify: my class is inte继续阅读 »
function 里的 this 在不同的时候,会有不同的表现,一般会有以下四种情况
Invocation as a function
Invocation as a method
Invocation as a constructor
Invocatuon with the apply() and call() method继续阅读 »
顾名思义,装饰模式就是给一个对象增加一些新的功能,而且是动态的,要求装饰对象和被装饰对象实现同一个接口,装饰对象持有被装饰对象的实例,关系图如下:
Source类是被装饰类,Decorator类是一个装饰类,可以为Source类动态的添加一些功能,代码如下:
public interface Sourceable {
public void method();
}
public class Source implements Sourceable {
@Override
public void method() {
System.out.println("the original 继续阅读 »
论文《Extended Supervised Descent Method for Robust Face Alignment》对SDM方法做了扩展,使程序更鲁棒。
more
论文主要在三方面做了Improments,分别是:
Adaptive Feature Block
在初始的SDM方法中,我们使用fixed-size blocks去提取SIFT特征进而预测shape。但实际上,从直观上来看,the feature extraction block size与the value of shape increment有很大关系。当shape increment比较大时,我们应该提取较大块的SIFT特征,这样就可以获取更多有用继续阅读 »