码迷,mamicode.com
首页 >  
搜索关键字:children    ( 1808个结果
Minimum no. of iterations to pass information to all nodes in the tree
Given a very large n-ary tree. Where the root node has some information which it wants to pass to all of its children down to the leaves with the cons...
分类:其他好文   时间:2014-11-09 06:13:47    阅读次数:177
关于Plants versus Zombies游戏中的Pogo stick玩具
安全性(安全第一): Are Pogo Sticks Safe? For some reason, many people seem to regard pogo sticks as relatively dangerous toys, and many parents are fearful of their children getting hurt on a pogo sti...
分类:其他好文   时间:2014-11-06 20:10:43    阅读次数:1207
ZooKeeper场景实践:(7) 分布式锁
我们准备来实现互斥的锁,按照官网的思路,给定一个锁的路径,如/Lock,所有要申请这个锁的进程都在/Lock目录下创建一个/Lock/lock-的临时序列节点,并监控/Lock的子节点变化事件。当子节点发送变化时用get_children()获取子节点的列表,如果发现进程发现自己拥有最小的一个序号,则获得锁。处理业务完毕后需要释放锁,此时只需要删除该临时节点即可。简单来说就是永远是拥有最小序号的进程获得锁。...
分类:其他好文   时间:2014-11-05 23:12:24    阅读次数:247
cocos2d-x-3.x bringToFront & sendToBack实现
void Node::sendToBack(Node* child) { if (this->_children.size() >= 2) { auto start = *this->_children.begin(); auto bottomOrderOfArrival = start->getOrderOfArrival(); auto...
分类:其他好文   时间:2014-11-05 17:19:25    阅读次数:191
POJ2912 Rochambeau (hard?or!hard?)
DescriptionNchildren are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three gr...
分类:其他好文   时间:2014-11-05 16:21:24    阅读次数:141
删除list中指针的三种方法
第一种方法:std::list children;for(auto&& child : children) { delete child;}children.clear(); 第二种方法:std::list children;for(auto itr = children.begin(); itr....
分类:其他好文   时间:2014-10-30 01:42:05    阅读次数:207
Nginx错误提示:504 Gateway Time-out解决方法
朋友说504 Gateway Time-out的错误提示与nginx本身是没有任何关系的我们可以通过fastcgi配置参数的调整进行解决。修改 php-fpm 配置文件:1.把 max_children 根据系统修改下,保证有充足的php-cgi进程可以被使用;修改php-fpm配置文件增加php-...
分类:其他好文   时间:2014-10-29 00:06:34    阅读次数:260
osg::NodeVisitor中计算一个节点对应的世界变换矩阵、法向量、顶点坐标
class MyNodeVisitor:public osg::NodeVisitor{pulic: MyNodeVisitor():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {} void apply(osg::Geo...
分类:其他好文   时间:2014-10-28 15:12:36    阅读次数:442
KVO监听
Main.m #import "Children.h" #import "Nurse.h" int main(int argc, const char * argv[]) { Children *children = [[Children alloc] init]; Nurse *nurse = [[Nurse alloc] initWithChildre...
分类:其他好文   时间:2014-10-27 23:09:56    阅读次数:200
通知的使用
Main.m #import "Children.h" #import "Nurse.h" int main(int argc, const char * argv[]) { @autoreleasepool { Children *children = [[Children alloc] init]; ...
分类:其他好文   时间:2014-10-27 23:07:59    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!