码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
去掉正在打印对话框
在网上找了很久的资料,经过验证,已成功,网上内容如下:PrintDocument类进行打印,当使用PrintDocument.Print()时,会自动出现一个“正 在打印,第?页,共?页”这样一个窗口提醒用户,该窗口上只有一个“取消”按钮,看来微软是很人性化的,想得也很周到,但微软的人性化却给我带来...
分类:其他好文   时间:2014-09-28 17:17:13    阅读次数:315
java 相关面试
(一)以下代码输出的结果:publicclassTest{ publicstaticvoidmain(String[]args){ inti1=10,i2=20; inti=i2++; System.out.print("i="+i); System.out.println("i2="+i2); i=++i2; System.out.print("i="+i); System.out.println("i2="+i2); i=--i1; System.out.print("i="+i..
分类:编程语言   时间:2014-09-28 14:30:03    阅读次数:141
php empty()和isset()的区别
empty() 判断变量是否为“空”,isset() 判断变量是否已经设置。例:$id=0;empty($id)?print"It'sempty.":print"It's$id.";//结果:It'sempty.!isset($id)?print"It'sempty.":print"It's$id....
分类:Web程序   时间:2014-09-28 13:02:02    阅读次数:171
python 输出字符串如果遇到字典
>>> d = {'a':1}>>> print '%s' % 1,d1 {'a': 1}>>> print '%s %s' % 1,dTraceback (most recent call last): File "", line 1, in TypeError: not enough argu....
分类:编程语言   时间:2014-09-28 04:29:10    阅读次数:203
Python学习-21.Python的代码注释
在Python中有两种注释,一种是普通注释,另一种是文档注释。普通注释是使用#开头1 print('output something') # here is comment而Python中多行注释也是使用#1 # comment 12 # comment 23 # comment 3而文档注释则是使...
分类:编程语言   时间:2014-09-28 03:05:00    阅读次数:176
python 装饰器
由于函数也是一个对象,而且函数对象可以被赋值给变量,所以,通过变量也能调用该函数。>>> def now():... print '2013-12-25'...>>> f = now>>> f()2013-12-25函数对象有一个__name__属性,可以拿到函数的名字:>>> now.__...
分类:编程语言   时间:2014-09-28 02:47:40    阅读次数:382
Python学习-13.Python的输入输出(二)
在Python中,读取文件使用open函数1 file=open(r'E:\temp\test.txt','r')2 var = file.read()3 print(var)4 file.close()第一行打开E:\temp\test.txt文件,注意字符串开头使用了r,r表明字符串内的内容不转...
分类:编程语言   时间:2014-09-27 20:05:20    阅读次数:143
Python学习-12.Python的输入输出
在Python中,输出使用print函数,之前用过了。输入的话,则使用input函数。1 var = input()2 print('you input is' + var)输入haha则将输出you input is haha。可见input的作用与C#中的Console.ReadLine方法一样...
分类:编程语言   时间:2014-09-27 17:50:00    阅读次数:206
Python学习-10.Python函数定义(二)
在Python中定义函数的时候,可以使用参数默认值的方式定义函数例子:1 def welcome(who,state='is',action='talking'):2 print(who,state,action)调用函数:1 welcome('Tom')输出Tom is talking1 ...
分类:编程语言   时间:2014-09-27 16:33:59    阅读次数:195
Python学习-8.Python的循环语句-while语句
例子:1 i = 12 while i < 10:3 print(i)4 i+=15 else:6 print('finish')输出1至9和finish在while语句中同样支持for语句所支持的continue、break和else
分类:编程语言   时间:2014-09-27 15:21:59    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!