def getModelResult(model,*orders,**wheres): ret=model.objects ret=ret.filter(**wheres) for order in orders: ret=ret.order_by(order) return ret ret=get ...
分类:
其他好文 时间:
2020-06-28 13:40:57
阅读次数:
68
1. Your goal in this kata is to implement a difference function, which subtracts one list from another and returns the result. It should remove all va ...
分类:
其他好文 时间:
2020-06-28 09:41:17
阅读次数:
75
常见一些断言方法 Status code is 200 (状态码为200) pm.test("Status code is 200", function () { pm.response.to.have.status(200); }); Code name contains a string (代码 ...
分类:
其他好文 时间:
2020-06-28 09:40:32
阅读次数:
52
内置函数 进制转换相关 bin ,将十进制转换为二进制(0b) oct ,将十进制转换为八进制(0o) hex,将十进制转化为十六进制 int,将其他进制转化为十进制(0x) #将二进制转化为十进制 num = '0b1010111011' v1 = int(num,base=2) print(v1 ...
分类:
编程语言 时间:
2020-06-28 09:40:18
阅读次数:
65
#### 示例 ``` @contextlib.contextmanager def result(a): print('before') yield print('after') ``` #### 外层装饰源码 包装func函数,真实调用func()时,返回的为_GeneratorContextM ...
分类:
其他好文 时间:
2020-06-28 00:31:58
阅读次数:
64
#参数化库: ddt 前提:安装ddt库,>>> python -m pip install ddt import unittest from ddt import ddt, data,unpack from selenium import webdriver from time import sl ...
分类:
Web程序 时间:
2020-06-27 19:59:36
阅读次数:
79
一、第一个参数 // std::async 第一个参数介绍: // (1)std::launch::deferred: 表示延迟调用,并且不创建线程 // 直到future 对象的get() 函数或wait() 调用,才会执行 MyThread 入口函数,如果没有调用,则MyThread 不会被调用 ...
分类:
其他好文 时间:
2020-06-27 17:26:23
阅读次数:
61
ValueListenableBuilder<TextEditingValue>( valueListenable:volumeController, builder: (context, value, child) { final result = value.text.length == 0 ? ...
分类:
其他好文 时间:
2020-06-27 16:15:57
阅读次数:
60
部署LAMP环境 请注意centos版本, https://help.aliyun.com/document_detail/50774.html?spm=5176.11065259.1996646101.searchclickresult.329a675cZHKfON ...
分类:
其他好文 时间:
2020-06-27 09:43:59
阅读次数:
63
Shell script notes I used this tutorial to learn shell scripting: Shell Scripting Tutorial-Steve Parker. I given my executing result for almost every ...
分类:
系统相关 时间:
2020-06-26 22:22:32
阅读次数:
75