RT, Android NDK中的C++调试, GDB调试比较麻烦,在ADT Eclipse中: 1.配置好NDK给工程加上Native Support 2.编译中加上NDK_DEBUG=1 3.然后改造下mk文件: #APP_DEBUG will be set by android-ndk if NDK_DEBUG=1 is set. ifdef APP_DEBUG ifeq ($(APP_DEBUG),true) CFLAGS+= -O0 -g LOCAL_CFLAGS+= -D_DEBUG…
lua 中pairs 和 ipairs区别 标准库提供了集中迭代器,包括迭代文件每行的(io.lines),迭代table元素的(pairs),迭代数组元素的(ipairs),迭代字符串中单词的 (string.gmatch)等等.LUA手册中对与pairs,ipairs解释如下: ipairs (t) Returns three values: an iterator function, the table t, and 0, so that the construction for i,v…
Python中__repr__和__str__区别 看下面的例子就明白了 class Test(object): def __init__(self, value='hello, world!'): self.data = value >>> t = Test() >>> t <__main__.Test at 0x7fa91c307190> >>> print t <__main__.Test object at 0x7fa91c3…