最近项目开始用Trigger来进行Validation Check.也知道可以通过配置Object里的Validation Rule来进行Check,但是项目想如果有Trigger里就都在Trigger里做Check算了, 分散开写反而也不好维护,一旦出问题了就得看两个地方,Apex里也比较自由,可 ...
分类:
其他好文 时间:
2021-03-31 12:16:09
阅读次数:
0
1.缓存工具 from django.core.cache import cache 存储缓存数据:cache.set('key', 内容, 有效期) 读取缓存数据:cache.get('key') 删除缓存数据:cache.delete('key') 注意:存储进去和读取出来的数据类型相同,所以读 ...
分类:
其他好文 时间:
2021-03-31 11:41:12
阅读次数:
0
在做监控的时候,有可能会发生agent挂掉,无法采取到告警的时候。 这个时候可能就无法发送告警了 # 解决方法 这个时候需要用《nodata》触发器 《nodata触发器》表达式参考 {docker container check health:net.tcp.listen[{#TCP_PORT}] ...
分类:
其他好文 时间:
2021-03-31 11:35:11
阅读次数:
0
在python的字典对象中,可以直接使用键名获取键值,像这样: >>> d = {"x":1,"y":2} >>> d["x"] 1 >>> d["y"] 2 >>> 但如果键名不存在,则会报错: >>> d["z"] Traceback (most recent call last): File ...
分类:
编程语言 时间:
2021-03-30 13:57:43
阅读次数:
0
. shell逻辑表达式 #!/bin/bash FILE_BASED_ENCRYPTION="true" if [ "$FILE_BASED_ENCRYPTION" == "true" ]then echo "if: first one" || echo "if: second one"else ...
分类:
系统相关 时间:
2021-03-30 13:52:37
阅读次数:
0
@Cacheable(value = "CACHE_BOOK",key = "#username", condition = "#language = 1") public List<Book> getBooksByUsernameAndLanguage(String username, int l ...
分类:
编程语言 时间:
2021-03-30 13:51:01
阅读次数:
0
(1)Windows系统计算SHA256/SHA512码的方式: certutil -hashfile yourfilename SHA256/SHA512 以计算readme.txt文档进行说明: 打开cmd命令行,进入readme.txt所在目录,执行命令: (2)linux系统计算SHA256 ...
分类:
其他好文 时间:
2021-03-30 13:45:30
阅读次数:
0
When dealing with `fs` library, the common problem you will meet is the path to file. Different envs may have different way to handle the path. The be ...
分类:
Web程序 时间:
2021-03-30 13:42:21
阅读次数:
0
在添加图片 请求到方法接收 open打开当前的图片路径 text 第一个参数时你要添加的水印是 第二个参数是路径 public function imlist(){ // 获取表单上传文件 例如上传了001.jpg $file = request()->file('img'); // 移动到框架应用 ...
分类:
Web程序 时间:
2021-03-30 13:35:21
阅读次数:
0
引申 1.Guava Cache和Ehcache一样也是本地缓存,虽然都是本地缓存,但是在细分领域中也还是有不同的应用场景,Guava是Google提供的一套Java工具包,而GuavaCache作为Guava的Cache部分而提供了一套非常完善的本地缓存机制。在Guava之前,JDK的Concur ...
分类:
系统相关 时间:
2021-03-30 13:27:56
阅读次数:
0