单例的实现有多种方法,如下面class SwiftSingleton { class var shared: SwiftSingleton { if !Inner.instance { Inner.instance = SwiftSingleton() ...
分类:
编程语言 时间:
2014-10-28 11:54:51
阅读次数:
196
1.通过ng-app属性,告诉angular作用范围<htmlng-app="myapp">2.通过ng-controller属性,angular找到该属性内的html内容,并创建$scope对象传递该区域内的变量<bodyng-controller="acon">,传给用户名为“acon”的函数。所以一个acon函数可以控制多个ng-controller..
分类:
Web程序 时间:
2014-10-28 10:31:04
阅读次数:
177
JavaScript中有Scope(作用域),Scope chain(作用域链),Execute context(执行上下文),Active Object (活动对象),Dynamic Scope(动态作用域),Closure(闭包)这些概念,要理解这些概念,我们从静态和动态两个方面去分析一下。 ....
分类:
编程语言 时间:
2014-10-28 09:23:43
阅读次数:
207
gcc 动态编译(共享库) 动态编译的可执行文件需要附带一个的动态链接库,在执行时,需要调用其对应动态链接库中的命令优点:体积小,编译快缺点:依赖性高代码如下:[root@74-82-173-217 shared]# cat add.cint add (int x, int y) {return x...
分类:
其他好文 时间:
2014-10-28 00:23:59
阅读次数:
259
公司在用opus开源库,所以遇到了一些问题。 我将新下载的opus1.1替换掉老版本之后,单独编译opus没问题,可是编译相关的文件就会报错。 错误信息如下:g++ -Wall -fPIC -shared libusc_jni.o libusc.a ../api/libopus.a ../api/libspeex.a ../api/libamrnb.a ../api/libpcre.a -o li...
分类:
系统相关 时间:
2014-10-27 21:24:38
阅读次数:
241
基于Android的ELF PLT/GOT符号重定向过程及ELF Hook实现——by 低端码农 2014.10.27
引言
写这篇技术文的原因,主要有两个:
其一是发现网上大部分描述PLT/GOT符号重定向过程的文章都是针对x86的,比如《Redirecting functions in shared ELF libraries》就写得非常不错。虽然其过程跟ARM非常类似,但由于C...
分类:
移动开发 时间:
2014-10-27 15:43:25
阅读次数:
255
SQL> alter system set sga_max_size=2048M scope=spfile; alter system set sga_max_size=2048M scope=spfile * ERROR at line 1: ORA-32001: write to SPFILE ...
分类:
其他好文 时间:
2014-10-27 01:45:12
阅读次数:
179
Congestion Avoidance in TCP Consequence of lack of congestion control When a popular resource is shared without regulation the result is always ove...
分类:
其他好文 时间:
2014-10-27 01:41:51
阅读次数:
397
Likefor, theifstatement can start with a short statement to execute before the condition.Variables declared by the statement are only in scope until t...
分类:
其他好文 时间:
2014-10-27 00:12:31
阅读次数:
215
JDBCDemo.java:
package com.itheima.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.itheima.pool.MyPool;
pub...
分类:
数据库 时间:
2014-10-25 21:35:24
阅读次数:
227