摘要: $pop:-1移除数组的第一个元素,1移除最后一个元素eg:db.c.update({"name" : "toyota"},{$pop:{"title":1}}),数组修改器$pull:移除数组中满足条件的元素:db.c.update({"name" : "toyota"},{$pull:{"title":"t2"}}),数组修改器$addToSet:将数组看成set,向数组中添加不存在的元素,存在就不添加了,貌似和$each一起使用能够向数组中每个元素都 阅读全文
posted @ 2014-04-11 22:19 zzyoucan 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 无论走到哪,什么时候,别忘了自己的梦想,命运一定要掌握在自己的手里 阅读全文
posted @ 2014-04-11 21:37 zzyoucan 阅读(133) 评论(0) 推荐(0) 编辑
摘要: virtual void setCurActorAtt(int actorID, ActorAtt att, int value);//设置单项值,或者双向值得第一个virtual void setMaxActorAtt(int actorID, ActorAtt att, int value);//设置双向值得第二个//两个函数都调用_setActorAtt,通过true,false判断设置当前还是最大的virtual void setKnapsackEq;//可以更改,添加删除 阅读全文
posted @ 2014-04-11 15:14 zzyoucan 阅读(139) 评论(0) 推荐(0) 编辑
摘要: void asynDBCenter::isGetActorInfoEx(void* on_process, const char* arg){ std::stringstream ros(arg); boost::property_tree::ptree pt; boost::property_tree::read_json(ros, pt); int actorID = pt.get("actorID"); ActorInfoEx info={0}; bool ret = m_dbcenter->getActorInfoEx(actorID, &info). 阅读全文
posted @ 2014-04-11 13:34 zzyoucan 阅读(9720) 评论(0) 推荐(0) 编辑