码迷,mamicode.com
首页 >  
搜索关键字:traverse    ( 100个结果
simple_html_dom(3)
How to traverse the DOM tree?// If you are not so familiar with HTML DOM, check thislinkto learn more...// Exampleecho $html->find("#div1", 0)->childr...
分类:Web程序   时间:2014-10-14 22:27:19    阅读次数:259
php遍历文件夹下的文件夹及文件
function traverse($path = ‘.‘) { ? ?$current_dir = opendir($path); ? ?//opendir()返回一个目录句柄,失败返回false ? ?while(($file = readdir($current_dir)) !== false) { ? ?//readdir()返回打开目...
分类:Web程序   时间:2014-10-10 12:01:54    阅读次数:174
Cocos2d-x中android.mk文件中cpp文件的自动生成
1、这段代码下载自子龙山人,虽然没看懂,应该是通用版的。https://gist.github.com/andyque/6060595 LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := game_shared LOCAL_MODULE_FILENAME := libgame #traverse a...
分类:移动开发   时间:2014-09-25 18:00:17    阅读次数:207
先序遍历-二叉树
递归实现: 其实代码看似蛮简单的: 1 //先序遍历. 2 void 3 traverse(PNode p) { 4 if(!p) 5 return; 6 visit(p); //访问根结点. 7 if(p->lchild) 8 tra...
分类:其他好文   时间:2014-09-18 13:10:53    阅读次数:241
发现中文版《C Primer Plus第五版》示例程序的一个错误
错误的程序出现再第17章的499页ListItemCount()和500页的Traverse()两个函数上。原著包含所有函数定义的list.c如下: 1 #include 2 #include 3 #include "list.h" 4 5 static void CopyToNode(Item ....
分类:其他好文   时间:2014-08-26 22:39:06    阅读次数:356
Given a tree, find the node with the minimum sum of distances to other nodes
O(n) complexity, have a traversal for the tree. Get the information of all children, then traverse the tree again.  #include #include #include #include using namespace std; class Node { pub...
分类:其他好文   时间:2014-08-10 13:00:30    阅读次数:238
循环双链表的简单实现
//代码为自己编写,可能有问题,欢迎大家留言指正! #include #include using namespace std; typedef struct dnode { int val; dnode *prior; dnode *next; }dnode; dnode * create(); void traverse(dnode *pHead); bool insert(dn...
分类:其他好文   时间:2014-07-30 20:56:44    阅读次数:210
单链表操作实例程序
#include #include using namespace std; typedef struct node { int val; node *next; }node; node * create_list(); void traverse_list(node *pHead); int get_len_list(node *pHead); bool delete_list(no...
分类:其他好文   时间:2014-07-30 17:43:54    阅读次数:237
Traversing a list
The most common way to traverse the elements of a list is with a for loop. The syntax is the same as for strings: This works well if you onl...
分类:其他好文   时间:2014-07-13 19:38:51    阅读次数:324
Linux_shell脚本_遍历文件夹下所有文件
参考:lunar1983的专栏 实现:从给定目录树中grep出含制定字符串的行,并给出所在路径 代码如下所示: #!/bin/sh -if [ $# -ne 2 ] then echo "usage traverse " exitfi{function ergodic(){for file in `...
分类:系统相关   时间:2014-06-02 17:31:29    阅读次数:395
100条   上一页 1 ... 8 9 10
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!