`
mrjeye
  • 浏览: 177632 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
文章列表

C++读取lua table

lua_pushnil(tolua_S); int index = lua_gettop(tolua_S); map<string, string> dict; // 现在的栈:-1 => nil; index => table index = index - 1; while (lua_next(tolua_S, index)) { // 现在的栈:-1 => value; -2 => key; index => table ...

静态库类重复

如果两个静态库冲突的结构是相同的,可以考虑将两个静态库拆分出来进行合并。查看文件的架构有哪些$ lipo -info libzbar.aArchitectures in the fat file: libzbar.a are: armv7 (cputype (12) cpusubtype (11)) i386 将armv7解压出来lipo libzbar.a -thin armv7 -output libzbar-armv7.a新建立一个文件夹出来存放解压的(.o)文件$ mkdir armv7$ cd armv7将静态库中的文件解压$ ar -x ../libzbar-armv7.a然后将另 ...

mongo笔记

db.users.find({$where:function(){return this.age > 30 && this.age < 35;}}) db.users.find({$or:[{name:"mrj6"}, {name:"mrj9"}]}) // 查询 db.users.find({age:{$lt:30}}) db.users.find({$or:[{$where:function(){return this.age > 30 && this.age < 35;}} ...

mongo安装配置

下载地址:http://www.mongodb.org/downloads 以CentOS为例 安装参照:http://docs.mongodb.org/manual/tutorial/install-mongodb-on-redhat-centos-or-fedora-linux/ 启动服务器添加权限认证: 编辑 /etc/init.d/mongod 将OPTIONS改为 OPTIONS=" --auth -f $CONFIGFILE" 添加用户: use admin db.addUser("root", "123456&qu ...
[AVAudioSession sharedInstance].category = AVAudioSessionCategoryAmbient if ([[MPMusicPlayerController iPodMusicPlayer] playbackState] == MPMusicPlaybackStatePlaying) 判断ipod是不是在放歌

iPhone安装gcc

I search a lot on internet how to do this, and I found some info from Anastas Stoyanovsky. Most people posted that if you install libgcc on iOS 4 it will crash at boot but this is not true. Here is what you need to do in order to be able to compile and run a C application on iphone:     1. You will ...
https://developer.apple.com/membercenter/mcUpdateAgreement.action
LayoutParams params = recordProgress.getWindow().getAttributes(); params.y = 100; params.gravity = Gravity.TOP; recordProgress.getWindow().setAttributes(params);

CentOS svn安装配置

安装: 查看已安装的包 pm -qa |grep subversion 如果有,卸载 yum remove subversion-1.4.2-4.el5_3.1 yum install subversion.x86_64 创建工作目录 mkdir /svn svnadmin create /svn 按需要修改conf配置文件 passwd:用户-密码 authz:权限控制 启动SVN服务器 svnserve -d -r /svn 附上Eclipse插件更新地址:http://subclipse.tigris.org/servlets/Pro ...
在如下情况下,需要在本地方法中应用java对象的引用,就会用到类型之间的转换:   1)java方法里面将参数传入本地方法; 2)在本地方法里面创建java对象; 3)在本地方法里面return结果给java程序。    分为如下两种情况:   一、Java原始类型 像booleans、integers、floats等从Java程序中传到本地方法中的原始类型可以直接使用,下面是java中的原始类型和本地方法中的类型的对应: Java类型  本地类型  字节(bit) boolean   jboolean   8, unsigned byte    jbyte    8 ch ...
NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:error_code userInfo:nil]; NSLog(@"Error: %@", [error description]);
java -Dfile.encoding=utf-8 -jar xxx.jar
在svn命令行merge之后文件经常会出现local add, incoming add upon merge问题,导致无法提交,可以通过以下命令解决冲突 Summarizing to resolve the tree conflict committing your working dir with svn client 1.6.x you can use: svn resolve --accept working -R . where . is the directory in conflict.

mysql中文字段排序

select * from t_user_info order by convert(user_name USING gbk) COLLATE gbk_chinese_ci

取设备信息

NSLog([[UIDevice currentDevice] name]); // Name of the phone as named by user NSLog([[UIDevice currentDevice] uniqueIdentifier]); // A GUID like string NSLog([[UIDevice currentDevice] systemName]); // "iPhone OS" NSLog([[UIDevice currentDevice] systemVersion]); // "2.2.1" NS ...
Global site tag (gtag.js) - Google Analytics