码迷,mamicode.com
首页 >  
搜索关键字:direct path write temp    ( 55479个结果
Search in Rotated Sorted Array II leetcode java
题目:Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a funct....
分类:编程语言   时间:2014-07-22 22:47:55    阅读次数:214
[转]在Linux里设置环境变量的方法
在Linux里设置环境变量的方法(export PATH)一般来说,配置交叉编译工具链的时候需要指定编译工具的路径,此时就需要设置环境变量。例如我的mips-linux-gcc编译器在“/opt/au1200_rm/build_tools/bin”目录下,build_tools就是我的编译工具,则有...
分类:系统相关   时间:2014-07-22 00:09:36    阅读次数:343
Class.getResourceAsStream() VS. ClassLoader.getResourceAsStream()
For Class.getResourceAsStream(String name), if the name parameter doesn't start with a "/", then it's a relative path to the class's package. If the n...
分类:其他好文   时间:2014-07-22 00:08:34    阅读次数:277
javascript Math.random函数参数
random函数参数 无参数 random函数返回值 返回0和1之间的伪随机数,可能为0,但总是小于1,[0,1) random函数示例 document.write(Math.random()); 返回随机数 document.write(Math.random()*(20-10)+10); 返回10-...
分类:编程语言   时间:2014-07-21 23:30:03    阅读次数:278
poj3041 Asteroids --- 最小点覆盖
#include #include #include #include #include #include #include const int maxn=510; using namespace std; int my[maxn],mx[maxn],vis[maxn],e[maxn][maxn],n; int path(int i) { int j; for(j=1;j<=n...
分类:其他好文   时间:2014-07-21 23:29:42    阅读次数:199
Android用getIdentifier()获取资源Id
主要由两种方法: 1、不把图片放在res/drawable下,而是存放在src某个package中(如:com.drawable.resource),这种情况下的调用方法为:String path = "com/drawable/resource/imageName.png"; InputStream is = getClassLoader().getResourceAsStream(pat...
分类:移动开发   时间:2014-07-21 22:36:08    阅读次数:252
python文件查找
1、importglobshell干的就是glob 在windows下使用搜索*.py需要导入glob才可以进行*.py的搜索 glob.glob(‘*.py‘)返回以py结尾的列表 2、处理参数最方便的工具: fromoptparseimportOptionParser 3、os.path os.path.dirname(sys.argv[0]) or os.path.dirname(__file__) os.path..
分类:编程语言   时间:2014-07-21 19:34:02    阅读次数:284
python打开外部应用
1、打开外部程序1.1os.system—>发送命令,让系统执行,没有返回值os.popen—>可执行系统命令,可以获取标准输出lll=os.popen(‘ls’)lll.read()os.popen2—>元组方式返回标准输入和标准输出stdin,stdou=os.popen2(‘sort’)s=‘’’ecdbe’’stdin.write(s)stdin.clo..
分类:编程语言   时间:2014-07-21 19:27:02    阅读次数:322
python标准输出 标准错误 重定向
1、sys.stdin为文件对象,当对文件对象做循环的时候,返回的为行数2、ls>log2>&1标准输出和标准错误都输出到log,&>log也可以,但是会有版本限制3、print和stdout的区别:print是调用一个对象的write方法,通常是stdoutprint会先进行格式转换print123456==sys..
分类:编程语言   时间:2014-07-21 19:24:02    阅读次数:251
动态规划第六讲——leetcode上的动态规划汇总(下)
接下来的几道题,都是有关路径问题,这可以说是DP问题的一种典型应用。路径有一个维度的;也有两个维度的。 Eg10:Climbing Stairs 这道题目比较简单,重在分析思路。 Eg11:Minimum Path Sum  分析:略 class Solution { public: int minPathSum(v...
分类:其他好文   时间:2014-07-21 16:48:55    阅读次数:191
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!