会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Eric
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
28
29
30
31
32
33
34
35
下一页
2019年8月7日
mysql 表相关操作(1)
摘要: 查询语句 select * from t_deptselect empno,ename,sal from t_emp select empno, sal * 12 as "income" from t_emp 分页 select empno,ename from t_emp limit 10,5 去
阅读全文
posted @ 2019-08-07 14:52 EricBlog
阅读(244)
评论(0)
推荐(0)
2019年8月2日
python 装饰器
摘要: def log(func): def wrapper(): print("开始执行") func() print("执行完毕") return wrapperdef log_in(func): def wrapper(): print("开始进入...") func() print("结束...")
阅读全文
posted @ 2019-08-02 17:25 EricBlog
阅读(193)
评论(0)
推荐(0)
pyton 类(4) 静态方法
摘要: class Cat(): tag = ' 猫科动物 ' def __init__(self, name): self.name = name @staticmethod def breah(): print('需要呼吸空气') @classmethod def show_info(cls, name
阅读全文
posted @ 2019-08-02 14:38 EricBlog
阅读(247)
评论(0)
推荐(0)
python 类(3) property
摘要: class PetCat(): """ 家猫类""" def __init__(self, name, age): self.name = name # 私有属性 self.__age = age @property def age(self): return self.__age @age.set
阅读全文
posted @ 2019-08-02 11:41 EricBlog
阅读(248)
评论(0)
推荐(0)
python 类(2)
摘要: """"""class BaseCat(object): """ 猫科基础类""" tag = '猫科动物' def __init__(self, name): self.name = name def eat(self): print('吃东西')class Tiger(BaseCat): """
阅读全文
posted @ 2019-08-02 10:10 EricBlog
阅读(168)
评论(0)
推荐(0)
python 类(1)
摘要: class Cat(): """ 类 """ tag = '我是家猫' def __init__(self, name, age): self.name = name # 私有变量 self.__age = age def set_age(self, age): self.__age = age #
阅读全文
posted @ 2019-08-02 10:09 EricBlog
阅读(263)
评论(0)
推荐(0)
2019年8月1日
python 文件写入
摘要: def write_file(): """ 文件写入""" file_name = "wri2te_test.txt" # 以写入的方式打开 f = open(file_name,'w') # 写入内容 f.write('hello') # 换行符 f.write('\n') # 写入内容 f.wr
阅读全文
posted @ 2019-08-01 11:27 EricBlog
阅读(9946)
评论(0)
推荐(0)
python 文件读取
摘要: def read_file(): """ 读取文件 """ file_name = 'test.txt' # 打开文件 # f = open(file_name, encoding = 'utf-8') with open(file_name, encoding = 'utf-8') as f: #
阅读全文
posted @ 2019-08-01 10:49 EricBlog
阅读(315)
评论(0)
推荐(0)
python 高阶函数 lamdad reduce map
摘要: ## def use_filer(l):## # 过滤偶数# rest = filter(lambda n: n % 2 != 0, l)# return rest## if __name__ == '__main__':# l = [1,2,3,4,5,6,7,8,9,10,11]# rest =
阅读全文
posted @ 2019-08-01 10:14 EricBlog
阅读(284)
评论(0)
推荐(0)
2019年7月31日
python 时间转换
摘要: ## import datetime# from datetime import datetime# import time## now_time = datetime.now()# # now:2019-07-31 15:05:54.306301# print('now:{0}'.format(d
阅读全文
posted @ 2019-07-31 15:51 EricBlog
阅读(419)
评论(0)
推荐(0)
上一页
1
···
28
29
30
31
32
33
34
35
下一页
公告