码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
PHP常用函数整理
错误报告: error_reporting(E_ALL);字符串: addslashes(); stripslashes(); trim(); ltrim(); rtirm(); explode(); implode()或join(); echo(); htmlspecialchars(...
分类:Web程序   时间:2014-06-25 19:02:09    阅读次数:247
String to Integer (atoi)
题目 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possibl...
分类:其他好文   时间:2014-06-24 23:14:28    阅读次数:238
《python源码剖析》笔记 python虚拟机中的函数机制
1.Python虚拟机在执行函数调用时会动态地创建新的 PyFrameObject对象, 这些PyFrameObject对象之间会形成PyFrameObject对象链,模拟x86平台上运行时栈 2.PyFuctionObject对象 typedef struct { PyObject_HEAD PyObject *func_code; //对应函数编译后的PyCodeObject对象 PyObject *func_globals; //函数运行时的global空间 PyObject *func_...
分类:编程语言   时间:2014-06-24 21:56:10    阅读次数:415
swift http请求返回json数据并解析
1 AppDelegate.swift // // AppDelegate.swift // QQDemo // // Created by 赵超 on 14-6-21. // Copyright (c) 2014年 赵超. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIRes...
分类:Web程序   时间:2014-06-24 19:13:48    阅读次数:385
简明Python教程笔记(一)
#!/usr/bin/envpython#Filename:helloworld.py#Theuseof‘and"print‘hello,world!‘print"hello,world!"#Theuseof‘‘‘and"""print‘‘‘Thisisamulti-linestring.Thisisthefirstline.Thisisthesecondline."What‘syourname?"Iasked.Hesaid"Bond,JamesBond."‘‘‘print"""Thisisamulti-li..
分类:编程语言   时间:2014-06-24 17:05:23    阅读次数:239
python smtplib 模块发送邮件
发送邮件是大家经常碰到的,接下来看一下使用pythonsmtplib模块发送邮件,好了废话不多说,直接上代码:importsmtplib,sys,os,timefromemail.mime.textimportMIMETextimportnewreportdefsend_mail(me,tomail,sub,content):#要发给谁,可以发送多个人mailto_list=[tomail+‘;‘]#..
分类:编程语言   时间:2014-06-24 17:02:29    阅读次数:302
简明Python教程笔记(二)----用户交互raw_input()
raw_input()python内建函数将所有输入看做字符串,返回字符串类型input()对待纯数字输入时具有自己的特性,它返回所输入的数字的类型(int,float)input()本质上还是使用raw_input()来实现的,只是调用完raw_input()之后再调用eval()函数例子:#!/usr/bin/envpythonthis_year=2..
分类:编程语言   时间:2014-06-24 16:57:50    阅读次数:297
打印简单公司员工信息表
要求,输入name不为空,输入次数最多3次,3次后跳出程序;知识点:raw_inputstr转intwhilifelifelsecontinuebreakfor导入模块引用变量值格式化输出vim#!/usr/bin/envpython importsys user_name="carson" this_year=2014 counter=0 whileTrue: ifcounter<3: name=raw_input(..
分类:其他好文   时间:2014-06-24 16:52:27    阅读次数:290
【初学菜鸟作--KVM虚拟机配置及用法】
KVM虚拟机配置及用法1.主要存放位置:安装kvm虚拟机默认存放位置--/var/lib/libvirt/p_w_picpathskvm虚拟机配置文件存放位置--/etc/libvirt/qemu/2.常用管理命令:管理命令virshlist --查看已打开虚拟机列表virshlist--all --查看所有虚拟机列表virshversion..
分类:其他好文   时间:2014-06-24 16:51:46    阅读次数:235
Python 常用的异常类型
Python中的异常类型转自http://blog.csdn.net/fcoolx/archive/2009/05/20/4202872.aspx1、NameError:尝试访问一个未申明的变量>>>vNameError:name‘v‘isnotdefined2、ZeroDivisionError:除数为0>>>v=1/0ZeroDivisionError:intdivisionormodulobyzero3、Synt..
分类:编程语言   时间:2014-06-24 16:43:45    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!