码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
python基础(文件输入/输出 内建类型 字典操作使用方法)
本文主要介绍了python基础入门,包括文件输入/输出、内建类型、字典操作等使用方法一、变量和表达式代码如下:>>>1+1 2>>>print‘helloworld‘helloworld>>>x= 1>>>y=2>>>x+y3Python是强类型语言,无法根据上下文自动解析转换成合适..
分类:编程语言   时间:2014-11-18 16:09:59    阅读次数:316
IEnumerable的几个简单用法
IEnumerable,它是一个公开枚举数,该枚举数支持在非泛型集合上进行简单的迭代。对于所有数组的遍历,都来自IEnumerable,,so我们可以一个遍历数组的通用法。public static void Print (IEnumerable myList){ int i = 0 ; for.....
分类:编程语言   时间:2014-11-18 13:08:26    阅读次数:131
java编程思想第四版第9章
练习3: public class MainTest { public static void main(String args[]){ Bcycle b=new Bcycle(); b.print(); } /** * 输出: * --Bcycle-------47 * ----print---...
分类:编程语言   时间:2014-11-18 11:51:56    阅读次数:269
python2读取utf8文件(中文)
直接上代码咯。(python2.7)#encoding=utf-8 #author:walker #date:2014-11-18 #function:示例python2读取utf8文件(含中文等特殊字符) importsys reload(sys) sys.setdefaultencoding(‘utf8‘) file=open(‘data.txt‘,‘r‘) print(‘*******************************‘) forlin..
分类:编程语言   时间:2014-11-18 10:25:37    阅读次数:564
extern用法
Extern用法用例子给你示范 // 1.cpp int x = 10; // 2.cpp 注意没有包含1.cpp #include using namespace std; extern int x;int main () { cout void print() { std::cout us...
分类:其他好文   时间:2014-11-18 06:54:26    阅读次数:502
C语言:冒泡排序法:将若干字符串按字母顺序(由小到大)排序输出
#include #include void sort(char *a[]); void print(char *a[]); int main() { char *a[] ={"ceo","define","basic","abc","empty"}; printf("原来的序列是:\n"); print(a); sort(a); printf("\n排序后的序列是:\n"); ...
分类:编程语言   时间:2014-11-17 22:56:55    阅读次数:461
Python读取txt文件
Python读取txt文件,有两种方式:(1)逐行读取1 data=open("data.txt")2 line=data.readline()3 while line:4 print line5 ...
分类:编程语言   时间:2014-11-17 22:49:08    阅读次数:211
[转] T-SQL中的ISNULL和IS NULL
T-SQL中,有时判断一个变量是否为NULL时,有人可能会用到函数ISNULL,如:1 DECLARE @VAR1 VARCHAR(20)2 DECLARE @VAR2 INT3 IF ISNULL(@VAR1, '') = '' PRINT '@VAR1 is null.'4 IF ISNULL(...
分类:数据库   时间:2014-11-17 21:04:33    阅读次数:191
python批量下载色影无忌和蜂鸟的图片 爬虫小应用
# -*- coding:utf-8 -*- import re,urllib,sys,os,time def getAllUrl(): entry=sys.argv[1] #try: getPage=urllib.urlopen(entry).read() #except: # print "Error" pattern=re.compile(r'') web_site_p...
分类:编程语言   时间:2014-11-17 17:55:13    阅读次数:304
python3 多线程的基本用法
#coding=utf-8import threading #导入threading包from time import sleepimport timedef task1(): print ("Task 1 executed." )sleep(1)def task2():print ("Task 2...
分类:编程语言   时间:2014-11-17 13:48:38    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!