码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
python 5 条件判断和循环
#!/usr/bin/env python # -*- coding: utf-8 -*- age = 3 if age >= 18: print 'adult' elif age >= 6: print 'teenager' else: print 'kid' print '----------------------' names = ['jie', 'bob', 'trcy'] f...
分类:编程语言   时间:2015-05-02 01:07:38    阅读次数:171
媒体查询的应用以及在css3中的变革
CSS一直都支持设置与媒体相关联的样式表。它们可以适应不同媒体类型的显示。例如,文档在屏幕显示时使用sans-serif字体,在打印时则使用serif字体。screen和print是两种预定义的媒体类型。 在html4中,媒体样式表的写法是在css3中,媒体查询扩展了媒体类型的功能,至此更为精...
分类:Web程序   时间:2015-05-01 18:43:03    阅读次数:168
Python标准库:内置函数str(object='') str(object=b'', encoding='utf-8', errors='strict')
本函数是实现返回字符串对象。参数object是要转换内容的对象;参数encoding是编码方式;errors是错误处理方式。例子:#str() print(str(b'abc')) print(str(200)) print(str(b'\xe5\x93\x88\xe5\x93\x88', encoding = 'utf-8', errors = 'ignore')) print(str('蔡...
分类:编程语言   时间:2015-05-01 10:44:04    阅读次数:493
使用python将元组转换成列表,并替换其中元素
aa = (1, 2, 3, 4, 5, 6)b = [(x == 5 and 8 or x) for x in aa]z = map(lambda x: 8 if x == 5 else x, [i for i in b])print(b)print(z)
分类:编程语言   时间:2015-04-30 23:16:19    阅读次数:567
jsp <%! %> 与 <% %> 区别
转自huangqiqing123.iteye.com/blog/1922014 1 2 17 18 ");26 out.print(outStaticMethod());27 out.print("");28 out.print(count);29 %>30 1 2 17 18 ");26 o...
分类:Web程序   时间:2015-04-30 19:39:44    阅读次数:109
第四节 PHP常用功能
第四节 PHP常用功能1.字符串';//分割$result = str_split($str,2);print_r($result);echo '';//字符串分割$str = "Hello PHP Java C# C++";$result = explode(' ',$str);print_...
分类:Web程序   时间:2015-04-30 15:57:50    阅读次数:154
查看连接数
# netstat -an | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'TIME_WAIT 22387CLOSE_WAIT 11SYN_SENT 1FIN_WAIT1 1ESTABLISHED 423LISTEN 73# nets...
分类:其他好文   时间:2015-04-30 15:47:52    阅读次数:124
lua table 初识
1 local demo = {"demoValue"} 2 local function fun() 3 print"hello world" 4 end 5 local tableDemo = { 6 ["a3132t"] = "valide?", 7 ...
分类:其他好文   时间:2015-04-30 13:59:26    阅读次数:120
C++虚函数用法举例
program1:class A{public:void print(){ coutprint();p2->print();}输出:This is AThis is Aprogram3:class A{public:virtual void print(){ cout<<”This is A”<<e...
分类:编程语言   时间:2015-04-30 12:12:22    阅读次数:109
VBA第三课 常量与变量
Sub 常量() Const pi = 3.1415926 End Sub Sub 变量() Dim a As Integer a = 100 a = 200 End Sub Sub 应用() Const pi = 3.1415926 '常量 a = 200 '变量,可不用声明 Debug.Print pi * a '在立即窗口显示 End Sub 转载请注明作者与出处:ht...
分类:编程语言   时间:2015-04-30 08:58:34    阅读次数:148
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!