码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
Python学习笔记(四)多进程的使用
python中多进程与Linux 下的C基本相同。 fork的基本使用 先看最简单的例子: # coding: utf-8 import os def my_fork(): pid = os.fork() if pid == 0: print 'this is child, pid = %d, pa...
分类:编程语言   时间:2014-11-12 22:58:05    阅读次数:300
java class文件解析(二)
继常量池后继续解析,代码如下:short tempShort = stream.readShort(); System.out.print("access_flags----->"); String value = UtilMap.getClassAccessMap().get(Long.val.....
分类:编程语言   时间:2014-11-12 22:48:39    阅读次数:499
PAT 1059. Prime Factors
反正知道了就是知道,不知道也想不到,很快#include #include #include using namespace std;inline void print_prime_k(long long p, long long k) { printf("%lld", p); ...
分类:其他好文   时间:2014-11-12 20:59:25    阅读次数:211
Beginning Python From Novice to Professional (5) - 条件与循环
条件与循环 条件执行: name = raw_input('What is your name? ') if name.endswith('Gumby'): print 'Hello, Mr.Gumby'What is your name? Gumby Hello, Mr.Gumbyname = raw_input('What is your name? ') if name.endswit...
分类:编程语言   时间:2014-11-12 19:50:03    阅读次数:245
第一个php小程序(学习)
2,"id"=>4); print_r(($b)); echo $b['name']; $a=1; while ( $a...
分类:Web程序   时间:2014-11-12 19:48:38    阅读次数:160
Python编写九九乘法表
x=1 whilex<10: y=list(range(x)) forziny: z+=1 print(‘%d*%d=%d‘%(x,z,x*z),end=‘‘) x+=1 print(‘\n‘)
分类:编程语言   时间:2014-11-12 17:58:56    阅读次数:237
Beginning Python From Novice to Professional (4) - 字符串格式示例
$ gedit price.py #!/usr/bin/env python width = input('Please enter width: ') price_width = 10 item_width = width - price_width header_format = '%-*s%*s' format = '%-*s%*.2f' print '=' * width...
分类:编程语言   时间:2014-11-12 16:33:21    阅读次数:248
find命令不查找子目录
跳过'src/emacs'和它下边的所有文件,列出其它发现的文件,执行下边的命令:1. find . -path './src/emacs' -prune -o -print只查找当前目录下,不搜索任何当前目录下的所有子目录2. find . -maxdepth 1 -name "*sql"1,2条...
分类:其他好文   时间:2014-11-12 16:24:12    阅读次数:181
程序猿之---C语言细节20(符号和有符号之间转换、两数相加溢出后数值计算)
主要内容:无符号和有符号之间转换、两数相加溢出后数值计算 #include /* 这个函数存在潜在漏洞 */ float sum_elements(float a[], unsigned length) { int i; float result = 0; for(i = 0; i <= length - 1; i++) { result += a[i]; print...
分类:编程语言   时间:2014-11-12 15:05:39    阅读次数:267
Beginning Python From Novice to Professional (2) - 命令行运行Python脚本
命令行运行Python脚本 Linux下先创建一个hello.py $ gedit hello.py 输入: #!/usr/bin/env python print 2+2保存退出,运行: $ python hello.py 4我们也可以让它变得和普通程序一样执行 执行之前,让脚本文件具备可执行属性: $ chmod a+x hello.py运行脚本: $ ./hello.py ...
分类:编程语言   时间:2014-11-12 13:47:51    阅读次数:180
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!