什么是LFU LFU Least frequently used, 基于访问的频次和时间来淘汰数据。比如缓存满了,使用LFU算法,可以淘汰掉访问频次最少且访问时间靠后的元素。 leetcode也有相应的题目,只要实现Get, Put接口即可。 本文除了实现Get, Put, 还实现了GetItera ...
分类:
编程语言 时间:
2021-03-15 11:36:50
阅读次数:
0
1、将函数存储在模块里 def fun1(x): ## 在模块module1.py中定义三个函数 print(x.upper()) def fun2(x): print(x.title()) def fun3(x): print(" ",x) 2、测试能否直接调用函数 >>> fun1("aaa") ...
分类:
编程语言 时间:
2021-03-15 10:39:46
阅读次数:
0
gnu http://www.gnu.org/software/binutils/ The GNU Binutils are a collection of binary tools. The main ones are: ld - the GNU linker. as - the GNU asse ...
分类:
其他好文 时间:
2021-03-11 20:36:58
阅读次数:
0
官方文档:https://github.com/alibaba/fastjson/wiki/JSONPath Entity entity = new Entity(123, new Object());JSONPath.eval(entity, "$.value")); API public cla ...
分类:
编程语言 时间:
2021-03-11 14:23:45
阅读次数:
0
介绍 分而治之是一个有效的处理大数据的方法,著名的MapReduce就是采用这种分而治之的思路。简单的说,如果要处理1000个数据,但是我们不具备处理1000个数据的能力,只可以处理10个数据。我们可以将这个任务分成100份,每份处理10个,并将最后的结果进行合成,形成1000个数据的处理结果。 把 ...
分类:
编程语言 时间:
2021-03-10 13:02:18
阅读次数:
0
  :first-of-type 表示第一个子元素 :last-of-type :nth-of-type (numberloddleven/倍数) ...
分类:
Web程序 时间:
2021-03-09 13:18:32
阅读次数:
0
1 int ngx_cdecl 2 main(int argc, char *const *argv) 3 { 4 ngx_buf_t *b; 5 ngx_log_t *log; 6 ngx_uint_t i; 7 ngx_cycle_t *cycle, init_cycle; 8 ngx_conf ...
分类:
其他好文 时间:
2021-03-09 13:10:05
阅读次数:
0
/** * 导出课程excel * * @return */ @AutoLog(value = "课程-导出课程excel") @ApiOperation(value = "课程-导出课程excel", notes = "导出课程excel") @GetMapping(value = "/expor ...
分类:
其他好文 时间:
2021-03-02 11:52:53
阅读次数:
0
一、题目描述 输入一个英文句子,翻转句子中单词的顺序,但单词内字符的顺序不变。为简单起见,标点符号和普通字母一样处理。例如输入字符串"I am a student. ",则输出"student. a am I"。 示例 1 输入: "the sky is blue"输出: "blue is sky ...
分类:
其他好文 时间:
2021-03-01 14:16:17
阅读次数:
0