/// <summary> /// </summary> /// <typeparam name="T"></typeparam> /// <param name="parent"></param> /// <returns></returns> public IEnumerable<T> Find ...
今天遇到一个问题,一个文件名是“-MXV9.log”,直接用rm删除的时候就报错,如下: 通常对这类文件都可以使用引号括起来删除,但是这里带引号删除也一样报illegal option的错。 找了一些资料后发现这种文件可以这样删除:先ls -i 查到文件的inode,然后用find命令删除 最前面一 ...
分类:
系统相关 时间:
2016-09-02 21:57:38
阅读次数:
235
问题描述: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca", When s3 = "aadbbcbcac ...
分类:
其他好文 时间:
2016-09-02 21:41:52
阅读次数:
130
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. ...
分类:
其他好文 时间:
2016-09-02 18:33:23
阅读次数:
152
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2016-09-02 06:24:29
阅读次数:
140
[题目] Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assum ...
分类:
其他好文 时间:
2016-09-02 00:22:19
阅读次数:
194
在写C++程序中,总会遇到要从一个字符串中查找一小段子字符串的情况,对于在C中,我们经常用到strstr()或者strchr()这两种方法。而对于C++的string,我们往往会用到find()。 C++:#inlcude<string>C: #include<string.h>find():在一个 ...
分类:
编程语言 时间:
2016-09-01 22:54:01
阅读次数:
205
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5492 题目大意: 一个N*M的矩阵,一个人从(1,1)走到(N,M),每次只能向下或向右走。求(N+M-1)ΣN+M-1(Ai-Aavg)2最小。Aavg为平均值。 (N,M<=30,矩阵里的元素0< ...
分类:
其他好文 时间:
2016-09-01 20:05:14
阅读次数:
145
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2016-09-01 18:35:05
阅读次数:
108
python判断mongo查询结果是否为空,可以使用cursor.count()来判断,为0则查询返回结果为空。conn=pymongo.MongoClient(host="192.168.3.6",port=27017)db=conn.testdbdb.authenticate("appuser","apppass")mylog=db.system.profilea=mylog.find({"ts":{‘$gt‘:tn}}).sort("ts",..
分类:
数据库 时间:
2016-09-01 16:34:07
阅读次数:
3336