文件及目录管理文件管理不外乎文件或目录的创建、删除、查询、移动,有mkdir/rm/mv文件查询是重点,用find来进行查询;find的参数丰富,也非常强大;查看文件内容是个大的话题,文本的处理有太多的工具供我们使用,在本章中只是点到即止,后面会有专门的一章来介绍文本的处理工具;有时候,需要给文件创...
分类:
系统相关 时间:
2014-05-27 17:45:40
阅读次数:
435
Given an array of integers, find two numbers such
that they add up to a specific target number.The function twoSum should return
indices of the two nu...
分类:
其他好文 时间:
2014-05-26 19:50:39
阅读次数:
314
1.php str_replace函数:str_replace()
函数使用一个字符串替换字符串中的另一些字符。str_replace(find,replace,string,count)find:必须,表示被查找的值replace:必须,替换别查找的值的值string:必须,被查找的字符串coun...
分类:
Web程序 时间:
2014-05-26 19:38:05
阅读次数:
292
出题:并查集(Union-Find
Sets)分析:一种树型数据结构,用于处理不相交集合(Disjoint
Sets)的合并以及查询;一开始让所有元素独立成树,也就是只有根节点的树;然后根据需要将关联的元素(树)进行合并;合并的方式仅仅是将一棵树最原始的节点的父亲索引指向另一棵树;优化:加入一个ra...
分类:
其他好文 时间:
2014-05-26 18:48:46
阅读次数:
290
Cannot find executable for CFBundle 0x8f4d850 (not
loaded)解决办法:还原模拟器。
分类:
其他好文 时间:
2014-05-25 23:36:51
阅读次数:
313
在备份ltedecoder程序时,需要把此目录拷由到bak目录下,但decoder目录下有个大文件,不需要备份,还有日志问题,也不需要备份,如何实现呢??
方法:
cd /source-dir
find . -name .snapshot
-prune -o -print0 | cpio -pmd0 /dest-dir
解释: This command cop...
分类:
其他好文 时间:
2014-05-25 21:51:29
阅读次数:
518
原文:
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without ...
分类:
其他好文 时间:
2014-05-25 21:30:02
阅读次数:
276
Visual Assist X 快捷键 Shift+Alt+F Find References
查找引用 Shift+Alt+S FindSynbolDialog 打开查找符号对话框 Alt+G GotoImplementation 转到定义 Alt+M
ListMethodsInCurrentFi...
分类:
其他好文 时间:
2014-05-25 18:50:17
阅读次数:
350
gunzip -r hongchangfirst/data
如何递归删除那些剩余的非log结尾的文件?
先列出确认一下:
find hongchangfirst/data -type f ! -name "*.log"
然后真正的删除:
find hongchangfirst/data -type f ! -name "*.log" -exec rm -f {} \;...
分类:
系统相关 时间:
2014-05-25 09:41:05
阅读次数:
694
A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem you will be given two integers i j, you have to find...
分类:
其他好文 时间:
2014-05-25 07:41:08
阅读次数:
253