码迷,mamicode.com
首页 >  
搜索关键字:direct path write temp    ( 55479个结果)
计算程序总行数的Python代码
最近需要统计一下项目中代码的总行数,写了一个Python小程序,不得不说Python是多么的简洁,如果用Java写至少是现在代码的2倍。importos path="/Users/rony/workspace/ecommerce/ecommerce/hot-deploy/" globaltotalcount totalcount=0 defcfile(path): allfiles=os.listdir(pa..
分类:编程语言   时间:2014-11-11 23:09:40    阅读次数:486
dd 使用说明
使用dd来测试硬盘读写速度dd只能提供一个大概的测试结果,而且是连续IO而不是随机IO,理论上文件规模越大,测试结果越准确。读性能测试#timeddiflag=direct,nonblockif=/dev/sda2of=/dev/nullbs=8kcount=8388608因为/dev/sda2是一个物理分区,对它的读取会产生IO,/dev/null是..
分类:其他好文   时间:2014-11-11 23:06:58    阅读次数:429
Tree
You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is the sum o...
分类:其他好文   时间:2014-11-11 22:57:13    阅读次数:280
[leetcode]Triangle
问题描述: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4...
分类:其他好文   时间:2014-11-11 21:09:06    阅读次数:207
排序练习
插入排序 public static int[] insert_sort(int arr[]){ int i = 0,temp; //插入排序 for(int j = 1;j0 && arr[i]>temp){ arr[i+1]=arr[i]; i-...
分类:编程语言   时间:2014-11-11 20:42:08    阅读次数:255
关于C/C++的一些讨论
1 #include"string.h" 2 #include"malloc.h" 3 4 5 void swap(int a,int b) 6 { 7 int temp; 8 temp=a; 9 a=b;10 b=temp;11 }12 13 int get_...
分类:编程语言   时间:2014-11-11 20:36:56    阅读次数:204
nodejs中文乱码
http.ServerResponse的write()或end()方法写出内容有中文乱码时, 首先要确定所有引用的JS文件的编码格式为UTF-8,再在write()或end()方法前加上 res.writeHead(200, ‘Content-Type:text/plain;charset=utf-8‘); 写...
分类:Web程序   时间:2014-11-11 19:26:21    阅读次数:155
RabbitMQ 的安装与工作模式
RabbitMQ 概念: fanout:不处理路由键,转发到所有绑定的队列上 direct:处理路由键,必须完全匹配,即路由键字符串相同才会转发 topic:路由键模式匹配,此时队列需要绑定要一个模式上。符号“#”匹配一个或多个...
分类:其他好文   时间:2014-11-11 19:22:45    阅读次数:238
SQL Server 2008杀死数据库连接
杀死数据库连接: DECLARE @temp NVARCHAR(20) DECLARE myCurse CURSOR FOR SELECT spid FROM sys.sysprocesses WHERE dbid = DB_ID('YourDatabaseName') OPEN myCurse FETCH NEXT FROM myCurse INTO @temp WH...
分类:数据库   时间:2014-11-11 19:12:36    阅读次数:214
关于合并“.a”文件时遇到的问题
今天在给工程添加百度地图SDK时,涉及到百度地图的模拟器与真机环境下的.a文件的合并,在使用终端进行 合并时,出现:xcrun: error: active developer path ("/Volumes/Xcode/Xcode.app/Contents/Developer") does not...
分类:其他好文   时间:2014-11-11 18:42:34    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!