1 def log(text=None): 2 3 if isinstance(text, str): 4 def decorator(func): 5 @functools.wraps(func) 6 def wrapper(*args, **kw): 7 print('%s %s():' % ( ...
分类:
编程语言 时间:
2019-12-16 19:21:03
阅读次数:
123
1,差值表达式{{}} 1 <p >{{ msg }}</p> 2、v-cloak解决差值表达式闪烁的问题 <p v-cloak>{{ msg }}</p> 3、v-text是没有闪烁问题的。 1 <h4 v-text="msg"></h4>//注意:v-text会覆盖元素中的原本的内容,差值表达式 ...
分类:
其他好文 时间:
2019-12-15 22:11:45
阅读次数:
150
mvvm是前端的层次开发思想。mvc是前后端的分离。 ...
分类:
其他好文 时间:
2019-12-15 22:07:33
阅读次数:
107
1. 编写脚本/root/bin/checkip.sh,每 5 分钟检查一次,如果发现通过 ssh 登录失败 次数超过 10 次, 自动将此远程 IP 放入 Tcp Wrapper 的黑名单中予以禁止防问 !/bin/bash while true;do mounth=$(date +%b) mda ...
分类:
系统相关 时间:
2019-12-15 12:18:56
阅读次数:
112
#装饰器实现简易限制函数调用频率,如10秒一次import mathimport timedef wrapper(func): start_time =0 def inner(*args,**kwargs): nonlocal start_time t = time.time() - start_t ...
分类:
其他好文 时间:
2019-12-14 12:20:47
阅读次数:
111
Drag and drop so simple it hurts Vue wrapper for dragula drag'n drop library, based on vue-dragula by @Astray-git. vue 为 dragula 拖拽 包装 减少 代码,基于 vue-dr ...
分类:
其他好文 时间:
2019-12-12 10:26:24
阅读次数:
326
[TOC] wrapper介绍: 1. AbstractWrapper: 用于查询条件封装,生成sql的where条件 2. AbstractLambdaWrapper: Lambda语法使用Wrapper统一处理解析lambda获取column 3. QueryWrapper: Entity 对象 ...
分类:
其他好文 时间:
2019-12-10 18:38:36
阅读次数:
1317
1、请求和响应 1、文档 https://www.django-rest-framework.org/tutorial/2-requests-and-responses/ https://q1mi.github.io/Django-REST-framework-documentation/tutor ...
分类:
其他好文 时间:
2019-12-09 12:13:35
阅读次数:
74
昨天周末晚上没有出去,码了一小段,先留着kangkang。 import numpy as npimport matplotlibmatplotlib.use('Agg')import matplotlib.pyplot as pltfrom tqdm import tqdm# wrapper cl ...
分类:
其他好文 时间:
2019-12-08 12:56:34
阅读次数:
104