配置静态目录 STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), ] ...
分类:
其他好文 时间:
2021-01-16 12:15:09
阅读次数:
0
数据库瓶颈 不管是IO瓶颈还是CPU瓶颈,最终都会导致数据库的活跃连接数增加,进而逼近甚至达到数据库可承载的活跃连接数的阈值。在业务service来看, 就是可用数据库连接少甚至无连接可用,接下来就可以想象了(并发量、吞吐量、崩溃)。 IO瓶颈 第一种:磁盘读IO瓶颈,热点数据太多,数据库缓存放不下 ...
分类:
其他好文 时间:
2021-01-15 11:48:39
阅读次数:
0
from threading import Thread from time import sleep a = 1 def foo(): global a a = 1000 def bar(): sleep(1) print("a = ",a) t1 = Thread(target = foo) t ...
分类:
编程语言 时间:
2021-01-13 10:50:50
阅读次数:
0
函数泛型 function join<T, P>(first: T, second: P) { return `${first}${second}`; } // 泛型虽然可以类型推断,但是还是建议明确写明类型。 join < number, string > (1, "2"); // 数组的形式 / ...
分类:
其他好文 时间:
2021-01-13 10:34:37
阅读次数:
0
public string GetMD5(string txt) { System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] frmData ...
import * as path from 'path'; import * as url from 'url'; const savePath = path.join('public', 'images', 'a.jpg'); // => \public\images\a.jpg const ur ...
分类:
Web程序 时间:
2021-01-12 10:31:13
阅读次数:
0
1、 查询Student表中的所有记录的Sname、Ssex和Class列。select sname,ssex,class from studentLinq: from s in Students select new { s.SNAME, s.SSEX, s.CLASS }Lambda: Stud ...
分类:
数据库 时间:
2021-01-11 11:29:57
阅读次数:
0
alert(CheckObjTime2('2021-1')) alert(CheckObjTime2('2021-1-1')) alert('好了') var time_obj = '2021-1'; //格式化为三位 var d_001 = time_obj.split('-'); if (d_0 ...
分类:
Web程序 时间:
2021-01-08 11:35:41
阅读次数:
0
哈希算法与 \(KMP\) 算法是两种处理字符串问题的常用算法 哈希 \(Hash\) 哈希算法是通过构造一个哈希函数,将一种数据转化为可用变量表示或者是可作数组下标的数 哈希函数转化得到的数值称之为哈希值 通过哈希算法可以实现快速匹配与查找 字符串 \(Hash\) 一般用于寻找一个字符串的匹配串 ...
分类:
其他好文 时间:
2021-01-08 11:26:36
阅读次数:
0
1)全局注册 1.在main.js中通过Vue.directive全局注册一个指令 Vue.directive('demo', { bind: function (el, binding, vnode) { var s = JSON.stringify el.innerHTML = 'name: ' ...
分类:
其他好文 时间:
2021-01-08 10:52:25
阅读次数:
0