lambda表达式的捕获跟参数差不多,可以是值或者引用。1.值捕获 与传值参数类似,采用值捕获的前期是变量可以拷贝;与参数不通透的是:被捕获的变量的值是在lambda创建时拷贝,而不是调用时拷贝。void func(){ int v1 = 1; auto f = [v1] { ret...
分类:
其他好文 时间:
2014-10-16 17:42:12
阅读次数:
156
为了确认内核打印等级以及prink 参数对打印的分级,在led驱动初始化代码【以及exit出口】加入如下代码。每次insmod 、rmmod led模块时,根据打印等级的设置,得到不同的打印结果:static int __init s3c24xx_leds_init() { int ret ; in...
分类:
其他好文 时间:
2014-10-16 16:57:22
阅读次数:
181
近来用ollvm来编译一些代码,主要是需要对so进行一些混淆的操作,发现了一个bug,记录如下:代码段1jintbegin_antidebug()
{
pthread_tantidebugtid;
intret=0;
ret=pthread_create(&antidebugtid,NULL,antidebug_listen_thread,NULL);
if(ret!=0)
{
LOGANTI("Createpthre..
分类:
其他好文 时间:
2014-10-15 21:44:32
阅读次数:
1229
function getNext( $str ){ $ret = array(0=>0); for( $j =1; $j $l2) return $rt; $i = $p; $j = 0; $next = getNext($sstr); whil...
分类:
编程语言 时间:
2014-10-15 21:06:11
阅读次数:
227
17.01:简单配置控制器1、一个controllerprotected ModelAndView handleRequestInternal(HttpServletRequest request,HttpServletResponse response) throws Exception {ret...
分类:
编程语言 时间:
2014-10-15 19:10:11
阅读次数:
156
info flex 可以查看flex帮助。 h就可以看到相关命令,常用命令已经加粗: x 关闭此帮助窗口。 q 一并退出 Info。 RET 跟随光标下的超文本连接。 [ 移动到本文档的上一个节点。 ] 移动到本文档的下一个节点。 p 移动到同级的上一个节点。...
分类:
其他好文 时间:
2014-10-15 13:28:50
阅读次数:
153
#include #include int main(){ char token[] ="abdzxbcdefgh"; char str[]="3:2:09"; int a1=0, a2=0, a3=0; int ret; printf("%s\n",token); ...
分类:
其他好文 时间:
2014-10-15 12:43:30
阅读次数:
144
我有这样的一个小算法,把数组中的所有的偶数或技术分别选择出来。很多人可能,会循环这个数组,而我恰恰不循环数组就能做到这一点,代码如下。
function odd($var)
{
// returns whether the input integer is odd
return($var & 1);
}
function even($var)
{
// ret...
分类:
编程语言 时间:
2014-10-13 18:06:39
阅读次数:
230
寄存器冲突问题,解决方案:在子程序的开始将子程序中所有用到的寄存器中的内容都保存起来,在子程序返回前再恢复。可以用栈来保存寄存器中的内容。以后,我们编写子程序的标准框架如下:子程序开始:子程序中使用的寄存器入栈 子程序内容 子程序中使用的寄存器出栈 返回(ret、ret...
分类:
其他好文 时间:
2014-10-11 20:07:16
阅读次数:
289
#include
#include
#include
#include
using namespace std;
typedef long long ll;
const int N = 108;
const int S = 10;
ll mult_mod(ll a, ll b, ll c) {
a %= c;
b %= c;
ll ret = 0;
whi...
分类:
其他好文 时间:
2014-10-09 22:24:38
阅读次数:
234