使用struct定义结构体,使用Teacher t = {"", "", ""} 进行初始化操作 /* 结构体 */ #include <iostream> using namespace std; struct Teacher{ char name[20]; int age; double sal ...
分类:
编程语言 时间:
2020-03-30 11:10:03
阅读次数:
93
一.类的静态属性 即是将类的函数属性,封装成类似数据属性。比如:类方法函数的返回值获取。通过:@proporty class Who(object): what = 'what' # brother = 'jack' def __init__(self,name,age,gender): self. ...
分类:
其他好文 时间:
2020-03-30 09:17:33
阅读次数:
76
一.类的组成 class Who(object): what = 'what' def __init__(self,name,age,gender): self.name = name self.age = age self.gender =gender def information(self): ...
分类:
其他好文 时间:
2020-03-30 00:12:38
阅读次数:
66
一、格式化输出 # 1、格式化输出 %:占位符 s:字符串 d:数字 %%:转义 name = input("your name: ") age = int(input("your age: ")) height = int(input("your height: ")) msg = "name: ...
分类:
编程语言 时间:
2020-03-29 12:40:28
阅读次数:
94
1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 6 class Dog 7 { 8 private: 9 string name; 10 int age; 11 char sex; 12 double weig ...
分类:
其他好文 时间:
2020-03-29 01:12:41
阅读次数:
74
1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 6 class Dog 7 { 8 private: 9 string name; 10 int age; 11 char sex; 12 double weig ...
分类:
其他好文 时间:
2020-03-28 18:02:58
阅读次数:
85
SpringMvc: <mvc:cors> <mvc:mapping path="/**" allowed-origins="*" allow-credentials="true" max-age="1800" allowed-methods="GET,POST,PUT,DELETE,PATCH,O ...
分类:
编程语言 时间:
2020-03-27 23:25:07
阅读次数:
147
补充函数的知识点: 类型提示 Type hinting(最低 Python 版本为 3.5)def register(name:"必须传入名字傻叉",age:1111111,hobbbies:"必须传入爱好元组")->"返回的是整型": # 可以在函数形参的后面跟 :加提示信息 print(name ...
分类:
其他好文 时间:
2020-03-27 23:22:06
阅读次数:
203
我们在写Hybird App时,一般都是利用Token来代替Cookie实现用户会话。 如果是发布成app的话,由于app自带了webview环境,运行时与后端服务器的关系相当于Server 2 Server,因此一般不涉及跨域的问题。 但如果发布成H5 App的话,因为是直接在终端的浏览器里运行, ...
分类:
移动开发 时间:
2020-03-27 12:51:08
阅读次数:
247
一、字典访问 dict = {"age":18,"weight":65} print(dict.get("age"))print(dict.get("height")) # 由于字典dict中没有height这个键,返回的是默认值None。 print(dict.get("height",0)) # ...
分类:
编程语言 时间:
2020-03-27 11:03:20
阅读次数:
83