http://my.oschina.net/kkkkkkkkkkkkk/blog/521496 上一篇 续集 ..
其中handler?通过手动改?tolua?生成的?cpp文件获取
..
void?toLuaFunc::callLuaFunc(const?char*ARG)
{
CC_ASSERT(handler?>?0,?"ca...
分类:
编程语言 时间:
2015-10-24 14:30:20
阅读次数:
240
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
//链式访问
char*my_strcpy(char*dest,constchar*src)
{char*ret=dest;
assert(src!=NULL);
assert(dest!=NULL);
while(*dest++=*src++)
{
;
}
returnret;
}
intmain()
{
char*p="bit-tech";
chara..
分类:
编程语言 时间:
2015-10-22 19:34:34
阅读次数:
254
一、Console APIConsole.assert()判断第一个参数是否为真,false的话抛出异常并且在console输出相应信息。Console.count()以参数为标识记录调用的次数,调用时在console打印标识以及调用次数。Console.debug()console.log方法的别...
分类:
其他好文 时间:
2015-10-21 00:13:28
阅读次数:
377
单链表的熟悉使用,注意测试用例的全面//使用引用的作用等同于使用二级指针,在传递指针时
//传引用是可能改变Link,而有的函数只需改变->next,此时不需传引用
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#include<assert.h>
typed..
分类:
其他好文 时间:
2015-10-20 19:51:38
阅读次数:
283
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<assert.h>
#defineDATA_TYPEint
#defineMAX_CAPACITY5
typedefstructSeqList
{
DATA_TYPE*_array;//数据块指针
size_t_size;//当前有效的数据个数
size_t_capacity;//容量
}SeqL..
分类:
其他好文 时间:
2015-10-18 18:40:20
阅读次数:
214
以下程序实现126邮箱的写信、存草稿及预览验证package email;import static org.junit.Assert.fail;import java.util.concurrent.TimeUnit;import org.junit.After;import org.junit....
分类:
Web程序 时间:
2015-10-18 18:22:23
阅读次数:
250
静态链表的增删插改,注意方法中的边界检查和参数有效性检查。测试用例应全面!!!#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#defineMAX_SIZE10
typedefintDataType;
typedefstructSeqList
{
DataType_array[MAX_SIZE];//静态数组
size_t..
分类:
其他好文 时间:
2015-10-18 01:27:27
阅读次数:
234
最近博主的老师让博主写一个二分查找,并且计算他的时间复杂度。首先我是这样写的:1#include<stdio.h>2#include<assert.h>34voidbinary_search(intarr[],intlen,intnum){5assert(arr);6intleft=0;7intright=len-1;8while(left<right){9intmid=(left+right)/2;1..
分类:
其他好文 时间:
2015-10-17 19:21:42
阅读次数:
237
顺序表的搭建,就是一个本身的结构,利用的是数组,开辟的内存空间大小是固定的。没有链式结构那样的开辟空间的可控性。最基本的数据结构认知。然后我们来看看数据结构中的基本实现和思想:#include"seqList.h"
#include<stdio.h>
#include<assert.h>
//顺序表的初..
分类:
编程语言 时间:
2015-10-17 07:07:18
阅读次数:
149
教程:https://cnodejs.org/topic/516526766d38277306c7d277看着挺爽的。//同步var assert = require('assert');describe('Array', function(){ describe('#indexOf', funct...
分类:
其他好文 时间:
2015-10-11 00:28:42
阅读次数:
220