定义 迪米特法则(Law of Demeter, LoD)是1987年秋天由lan holland在美国东北大学一个叫做迪米特的项目设计提出的,它要求一个对象应该对其他对象有最少的了解,所以迪米特法则又叫做最少知识原则(Least Knowledge Principle, LKP)。 意义 迪米特法 ...
分类:
其他好文 时间:
2020-05-05 00:23:12
阅读次数:
72
Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 ...
分类:
其他好文 时间:
2020-05-02 14:51:55
阅读次数:
49
1. 是什么? threadlocal而是一个线程内部的存储类,可以在指定线程内存储数据,数据存储以后,只有指定线程可以得到存储数据,官方解释如下 /** * This class provides thread-local variables. These variables differ fro ...
分类:
其他好文 时间:
2020-04-30 23:28:47
阅读次数:
92
LRU全称Least Recently Used,也就是 最近最少使用的意思,是一种内存管理算法,该算法最早应用于 Linux操作系统。 这个算法基于一种假设:长期不被使 用的数据,在未来被用到的几率也不大。因此,当数据所占内存达 到一定阈值时,我们要移除掉最近最少被使用的数据。 LRU算法中,使用 ...
分类:
编程语言 时间:
2020-04-30 13:33:34
阅读次数:
65
任务调度器。给定一个用字符数组表示的 CPU 需要执行的任务列表。其中包含使用大写的 A - Z 字母表示的26 种不同种类的任务。任务可以以任意顺序执行,并且每个任务都可以在 1 个单位时间内执行完。CPU 在任何一个单位时间内都可以执行一个任务,或者在待命状态。然而,两个相同种类的任务之间必须有 ...
分类:
其他好文 时间:
2020-04-26 14:04:34
阅读次数:
84
本文参考 今天在Java Language Specification上偶然看到一条关于枚举的语法特点说明 An enum declaration is implicitly final unless it contains at least one enum constant that has a... ...
分类:
编程语言 时间:
2020-04-22 16:57:35
阅读次数:
86
A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with ...
分类:
其他好文 时间:
2020-04-20 01:33:53
阅读次数:
85
题目描述 输入n个整数,找出其中最小的K个数。例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,。 代码: 1.普通人的大顶堆解法 class Solution { public: vector<int> GetLeastNumbers_Solution(vecto ...
分类:
其他好文 时间:
2020-04-19 12:51:54
阅读次数:
53
报错信息 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program 原 ...
分类:
编程语言 时间:
2020-04-17 20:09:52
阅读次数:
114
oracle dataguard配置说明系统环境 rh linux 6.3oracle 11g物理备库和逻辑备库 物理备库:physical standby, 备库与主数据库完全一样的备份(数据为物理块到块的复制),数据库的表和索引都相同,物理结构是相同的。基于RMAN实现,传输和直接应用redo ...
分类:
数据库 时间:
2020-04-17 09:48:49
阅读次数:
100