码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
#define替换
#define替换 Table of Contents 1 #与##2 宏与函数 1 #与## #argument这种结构被预处理器翻译成“argument”,这种翻译可以让你像下面这样编写代码: #define PRINT(FORMAT,VALUE) printf("the value of " #VALUE "is "...
分类:其他好文   时间:2014-11-24 11:54:35    阅读次数:214
sqlserver判断该路径是否存在该文件
declare @result int =0declare @path nvarchar(200)='d:\1.csv'execute master.dbo.xp_fileexist @path ,@result output if @result =1begin print'有文件'endpri....
分类:数据库   时间:2014-11-24 11:47:44    阅读次数:190
【Spark学习】Apache Spark调优
Spark调优本文系根据官方文档翻译而来,转载请注明本文链接 http://www.oschina.net/translate/spark-tuning?print数据序列化内存优化确定内存用量调整数据结构序列化RDD存储垃圾收集调整其他考虑因素并行化水平Reduce任务的内存用量Broadcast...
分类:Web程序   时间:2014-11-24 09:56:40    阅读次数:335
linux下如何获取某一进程占用的物理内存和虚拟内存
首先,ps -A查看你所查看进程的进程号 ps -A 加入进程号为pid 那么使用如下脚本,可以打印该进程使用的虚拟内存和物理内存: root@Storage:/mnt/mtd# cat rss.sh #!/bin/sh while true do  cat /proc/pid/stat | awk -F" " '{print "virt:"$23}'  cat /pr...
分类:系统相关   时间:2014-11-23 18:59:39    阅读次数:244
关于调用函数
#include int main (){ int number(int c); int n; scanf("%d",&n); printf("%d\n",number(n)); return 0;}int number(int c){ int a,b=1; while(c>1) { a=(b+1....
分类:其他好文   时间:2014-11-23 18:50:13    阅读次数:133
elipse+pydev+python开发arcgis脚本程序
环境配置参考:添加arcpy类库、arctoolbox、arcgis-bin如下所示。os.getcwd()返回的是当前文件的目录。假如我的代码文件放在C:\Users\scfeng\workspace\arcgispython\src\root\tested包下1 import os2 print...
分类:编程语言   时间:2014-11-23 11:38:18    阅读次数:310
python 装饰器
1.>>> def deco(func):... print "In deco"... return func...>>> @deco... def foo():... print "In foo"...In deco #因为deco()返回的...
分类:编程语言   时间:2014-11-23 07:00:31    阅读次数:191
飘逸的python - 为什么修改全局的dict变量不用global关键字
比如下面这段代码 s = 'foo' d = {'a':1} def f(): s = 'bar' d['b'] = 2 f() print s print d 为什么修改字典d的值不用global关键字先声明呢? 这是因为, 在s = 'bar'这句中,它是“有歧义的“,因为它既可以是表示引用全局变量s,也可以是创建一个新的局部变量,所以在python中...
分类:编程语言   时间:2014-11-23 00:43:31    阅读次数:194
求500内所有质数平方和
#include#includemain(){int i,j;float a,m=0;for(i=2;i<=500;i++){for(j=2;j<=i;j++){ if(i%j==0) break;} if(i==j) { a=sqrt(i); m=m+a; }}printf("所有质数的平方和为%...
分类:其他好文   时间:2014-11-23 00:32:18    阅读次数:205
SQL Server 2005中的CTE递归查询得到一棵树
感觉这个CTE递归查询蛮好用的,先举个例子: ? [c-sharp] view plain copy print ? use?City;?? go?? create?table?Tree?? (?? ??ID?int?identity(1,1)?primary?key?not?null,?? ??Name?...
分类:数据库   时间:2014-11-22 23:22:46    阅读次数:592
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!