码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
C++:基类和派生类
4.1 派生类的声明 继承实例如下: class Person{ //声明基类Person public: void print() { coutusing namespace std;class Base{ ...
分类:编程语言   时间:2015-10-26 22:04:39    阅读次数:175
shell 多文件内容关联匹配
从A文件取出前两列?和另一个文件匹配?打印出匹配到的行 from=$1 compare=$2 tofile=$3 f1s=(?$(cat?$from??|awk?-F?‘\t‘?‘{print?$1}‘)?) f2s=(?$(cat?$from??|awk?-F?‘\t‘?‘{print?$2}‘)?...
分类:系统相关   时间:2015-10-26 19:08:51    阅读次数:258
python学习之——计算给出代码中注释、代码、空行的行数
题目:计算给出代码中注释、代码、空行的行数来源:网络思路:注释行以 ‘#’开头,空行以 ‘\n’ 开头,以此作为判断def count_linenum(fname): fobj = open(fname,"rU") #print fobj.readlines() count_bla...
分类:编程语言   时间:2015-10-26 18:21:54    阅读次数:174
python学习——基础(八)
python 内置了一套try...except...finally...的错误处理机制; try: print ‘try‘ r = 10 / 0 print ‘result:‘, r except ZeroDivisionError, e: print ‘except:‘, e finally: print ‘final...
分类:编程语言   时间:2015-10-26 17:08:27    阅读次数:195
C语言简介
-位和字节(256种状态8位)8b=B-程序书写:门 门的边框 int main() main函数可以调用其他函数 print-打印 f-函数printf-打印函数 /* */ 注释多个文本 多行注释不能嵌套 快捷注释:commend+/单行 程序入口 单行注释,多行注释02-变量...
分类:编程语言   时间:2015-10-26 13:34:20    阅读次数:214
a+aa+aaa+aaaa+aaaaa 1.0
#include<stdio.h> #include<stdlib.h> intmain() { inta,sum; scanf("%d",&a); if((a<10)&&(a>0)) { sum=a; sum=sum+a+a*10; sum=sum+a+a*10+a*100; sum=sum+a+a*10+a*100+a*1000; sum=sum+a+a*10+a*100+a*1000+a*10000; print..
分类:其他好文   时间:2015-10-26 07:06:47    阅读次数:164
tornado 在启动时候,启动1个线程,实现crontab的功能
fromtornadoimportweb,ioloop importdatetime period=5*1000#every5s classMainHandler(web.RequestHandler): defget(self): self.write(‘HelloTornado‘) deflike_cron(): printdatetime.datetime.now() defxiaorui(): print‘xiaorui2s‘ deflee(): print‘wansuilee3s‘ if__nam..
分类:编程语言   时间:2015-10-25 22:41:46    阅读次数:207
learn python the hard way 习题45-制作一个游戏
小白自学python。from sys import exit from random import randintclass Scene(object): def enter(self): print "it's no use" exit(1) cl...
分类:编程语言   时间:2015-10-25 20:50:09    阅读次数:253
enumerate
# -*- coding: utf-8 -*-#python 27#xiaodeng#enumeratecolours=['red','green','blue']for i,colour in enumerate(colours): print i,colour'''0 red1 green...
分类:编程语言   时间:2015-10-25 19:26:50    阅读次数:171
bluetooth
1hciconfig -a # print BT chipset address and features. Useful to checkifyou can communicate with your BT chipset.2hcidump -XVt # print live HCI UART t...
分类:其他好文   时间:2015-10-25 19:21:08    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!