1.       http协议   GET请求:数据放在url后面 POST请求:数据放在请求体中 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <!--<form action="" me…
python3.4学习笔记(十六) windows下面安装easy_install和pip教程 easy_install和pip都是用来下载安装Python一个公共资源库PyPI的相关资源包的 首先安装easy_install 下载地址:https://pypi.python.org/pypi/ez_setup 解压,安装方法cmd进入到对应目录下,执行命令:python ez_setup.py------------------------------------C:\Users\Admini…
math模块 提供基础的数学函数, cos(3.14) = -0.999..(弧度制) acos(1) = 0.0 sqrt(9) = 3.0 degrees(3.14) = 179.9999..(弧度转角度) radians(180) = 3.1415926..(角度转弧度) 常量 pi = 3.1415.. e = 2.7182.. cmath模块(complex math, 复数) 支持复数的运算, >>>import cmath >>>cmath.sqrt(-1…
十六. 预处理 ● 关键字typeof 作用: 为一个已有的数据类型起一个或多个别名(alias), 从而增加了代码的可读性. typedef known_type_name new_type_name1, new_type_name2... 例如: typedef double Area, Volume;    //double类型有Area和Volume两个别名 typedef int integer; integer a, b;     //就相当于int a, b; #include <…
time模块 python表示时间的三种方式:时间戳.元祖(struct_time).格式化时间字符串 三种格式之间的转换: 1.时间戳 就是从1970年1月1日0点0分0秒开始按秒计算的偏移量,时间戳所给的时间是给计算机识别的 import time t = time.time() print(t,type(t)) #1566992452.458001 <class 'float'> 时间戳->结构化时间: import time t = time.time() print(t) #1…
一,简介: 该库用于3D信息重建,姿态估计,摄像机标定等.…
一.os.sys模块 import os print(os.getcwd())#取当前工作目录,绝对路径 print(os.chdir("../"))#更改当前目录 print(os.pardir) # 父目录,相对路径 print(os.curdir)#当前目录,相对路径 os.rmdir("a")#删除指定的文件夹,空文件夹 os.remove("test") # 删除文件 os.rename("test1","…
django 请求流程图 django 路由系统 在django中我们可以通过定义urls,让不同的url路由到不同的处理函数 from . import views urlpatterns = [ url(r'^articles/2003/$', views.special_case_2003), #精确匹配 url(r'^articles/([0-9]{4})/$', views.year_archive), #动态路由 url(r'^articles/([0-9]{4})/([0-9]{2…
Module类的最后代码 /** * Registers sub-modules in the current module. * 注册子模块到当前模块 * Each sub-module should be specified as a name-value pair, where * name refers to the ID of the module and value the module or a configuration * array that can be used to c…
Protocol(协议)用于统一方法和属性的名称,而不实现不论什么功能. 协议可以被类.枚举.结构体实现.满足协议要求的类,枚举,结构体被称为协议的遵循者. 遵循者须要提供协议指定的成员,如属性,方法,操作符,下标等. 一.协议的基本的语法 咱们还是先上代码吧 protocol Human { var name:String{ get set } var isMan:Bool{set get} class var isUsable:Bool { set get } //类成员.表示这个类是否可用…