码迷,mamicode.com
首页 >  
搜索关键字:dir    ( 11861个结果
search()小实例
编写一个search(s)的函数,能在当前目录以及当前目录的所有子目录下查找文件名包含指定字符串的文件,并打印出完整路径:defsearch(dir,w): forxinos.listdir(dir): nf=os.path.join(dir,x) ifos.path.isfile(nf)andwinnf: printnf elifos.path.isdir(nf): search(nf,w) searc..
分类:其他好文   时间:2015-03-02 11:27:53    阅读次数:167
LCA最近公共祖先 在线算法和离线算法 模板
原理讲解:http://dongxicheng.org/structure/lca-rmq/ 在线算法模板: /** LCA在线算法O(nlogn) 主函数调用: init(); tot=0,dir[1]=0; dfs(1,1); ST(2*n-1); int lca=LCA(u,v); */ #include #include #include #include #inclu...
分类:编程语言   时间:2015-03-01 18:33:50    阅读次数:168
Git基本操作
1.创建新项目上传cd parent_dir //进入项目父目录mkdir gitDemo //创建项目目录 gitDemocd gitDemo //进入项目目录git init //初始化空的 git 仓库touch README.md git add README.md //这两行添...
分类:其他好文   时间:2015-03-01 17:04:25    阅读次数:121
伪分布式下DataNode无法启动问题
DataNode无法启动:问题原因:执行文件系统格式化时,会在namenode数据文件夹(即配置文件中dfs.name.dir在本地系统的路径)中保存一个current/VERSION文件,记录namespaceID,标识了所格式化的namenode的版本。如果我们频繁的格式化namenode,那么...
分类:其他好文   时间:2015-02-28 22:51:43    阅读次数:151
linux下的数组的使用
数组定义的两个方法: 法一:将一个变量放进数组里,变量的值作为数组的内容 dir=($(ls .)) 法二:一一列出变量值: array=(red green blue yellow magenta) array=( oldboy zhangyue zhangyang ) 如何取数组中的一个值: ${array[i]} 如何表示数组长度: len=${#array[*]}...
分类:编程语言   时间:2015-02-28 16:36:38    阅读次数:142
<GMS>编译流程
1 #!/bin/bash 2 MY_ANDROID_DIR=$(pwd) 3 MY_BUILD_BOARD="polaris-g739_wifi_hd" 4 GMS_DEVICE=V_TAB_7_LITE_II 5 GMS_PRODUCT=V_TAB_7_LITE_II 6 IS_C...
分类:其他好文   时间:2015-02-28 16:22:36    阅读次数:264
BeautifulSoup的成员结构
>>> dir(soup)['ASCII_SPACES', 'DEFAULT_BUILDER_FEATURES', 'HTML_FORMATTERS', 'ROOT_TAG_NAME', 'XML_FORMATTERS', '__bool__', '__call__', '__class__', '...
分类:其他好文   时间:2015-02-28 14:30:28    阅读次数:174
python map记录
defchange_logic(string): dir=os.path.dirname(string)//得到上一级目录 return"%s/logic.xml"%dir config_logic=map(change_logic,config_topo)map(function,sequence[,sequence,...])->list通过定义可以看到,这个函数的第一个参数是一个函数,剩下的参数是一个或多个序..
分类:编程语言   时间:2015-02-28 11:34:53    阅读次数:156
jQuery选择器代码详解(八)——addCombinator函数
function addCombinator(matcher, combinator, base) 1、源码 function addCombinator(matcher, combinator, base) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName =...
分类:Web程序   时间:2015-02-26 20:19:39    阅读次数:207
Linux下DIR,dirent,stat等结构体详解
摘自:http://www.liweifan.com/2012/05/13/linux-system-function-files-operation/最近在看Linux下文件操作相关章节,遇到了这么几个结构体,被搞的晕乎乎的,今日有空,仔细研究了一下,受益匪浅。首先说说DIR这一结构体,以下为DI...
分类:系统相关   时间:2015-02-26 14:53:44    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!