theory

What is starvation?

狂风中的少年 提交于 2019-12-28 07:39:13
问题 In multitasking systems, some abnormal conditions prevent progress of executing processes or threads. I'll refer to both processes and threads simply as "processes". Two of these conditions are called dead-lock and live-lock. The former refers to processes which are blocking each other, thus preventing either from executing. The latter refers to processes which prevent each other from progressing, but do not actually block the execution. For instance, they might continually cause each other

CSS metaphysics: WHY is page vertical alignment so difficult?

本秂侑毒 提交于 2019-12-28 05:35:58
问题 Relative to the page, horizontal alignment in CSS is easy - a margin:0 auto gets you by much of the time, and a text-align:center for some other cases. My question to the gurus is not how to vertically align, but why is it so much more difficult? Why isn't there margin:auto 0 ? I mean, from a programming perspective. Theoretically, it seems like the same algorithms would apply to both types of centering. 回答1: Good question and I don't know, but I would suspect the root of the problem is going

“const correctness” in C#

若如初见. 提交于 2019-12-27 13:38:25
问题 The point of const-correctness is to be able to provide a view of an instance that can't be altered or deleted by the user. The compiler supports this by pointing out when you break constness from within a const function, or try to use a non-const function of a const object. So without copying the const approach, is there a methodology I can use in C# that has the same ends? I'm aware of immutability, but that doesn't really carry over to container objects to name but one example. 回答1: I've

“const correctness” in C#

淺唱寂寞╮ 提交于 2019-12-27 13:37:21
问题 The point of const-correctness is to be able to provide a view of an instance that can't be altered or deleted by the user. The compiler supports this by pointing out when you break constness from within a const function, or try to use a non-const function of a const object. So without copying the const approach, is there a methodology I can use in C# that has the same ends? I'm aware of immutability, but that doesn't really carry over to container objects to name but one example. 回答1: I've

粗糙集 rough set theory

流过昼夜 提交于 2019-12-27 01:58:43
最近看到一篇文章上有用到关于粗糙集的理论,所以到网上查了些资料学习了一下,目前应该脑子里有一个大致的概念了,知道这是干啥的,能够用来做些什么工作。接下来就记录下 对我理解这个概念很有帮助的一些资料 以及 我自己的一些理解 ,然后把我看到的那篇论文上的关于 粗糙集的case 也写一下。 ———————————————————————————————————— 对我理解粗糙集很有帮助的一些资料 王国胤, 姚一豫, 于洪. 粗糙集理论与应用研究综述[J]. 计算机学报, 2009, 32(7). 上述论文获取 关于粗糙集一些概念通俗易懂的解释 大佬写的博文,不过都是英文的 维基百科,可以直接访问 百度百科中的找到好工作的例子可以一看 顺带看一眼好了 可以先看一下第一篇paper,对粗糙集的一些基本概念和拓展、运用有一个大致的理解,当然里面的概念都偏数学,比较难理解,所以不必全部都完全领会,先过一遍大致理解,心里有个印象,然后看一下第二篇文章,很通俗易懂,并且给了一个实际的例子,基本可以对粗糙集的概念进行理解了,第三篇是一个大佬记录的wiki的关于粗糙集的内容,全是英文的,直接看有点累,不过看完前两个再看就轻松多了,第四个链接是维基百科,可以直接访问的,第五个和第六个也可以顺带一看,不看也OK。 《张文修, 吴伟志, 粱吉业, 李德玉. 粗糙集理论与方法[M]. 北京: 科学出版社

Can I define `default constructor` in Java?

自古美人都是妖i 提交于 2019-12-25 19:42:09
问题 My question below is rather theoretical then practical. From many Java resources available online I found out that a default constructor for a class has below specification: takes no arguments has no throws clauses has an empty body Java language specification does not provide definition for default constructor , it only states that If a class (definition) contains no constructor declarations, then a default constructor is implicitly declared (by a compiler). Please notice that wording

Can I define `default constructor` in Java?

佐手、 提交于 2019-12-25 19:41:23
问题 My question below is rather theoretical then practical. From many Java resources available online I found out that a default constructor for a class has below specification: takes no arguments has no throws clauses has an empty body Java language specification does not provide definition for default constructor , it only states that If a class (definition) contains no constructor declarations, then a default constructor is implicitly declared (by a compiler). Please notice that wording

Why is not Swing “thread safe”? [closed]

风格不统一 提交于 2019-12-25 07:50:22
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . In the final minutes of a Java lesson about threads, our professor suggested us to pay specific attention when developing complex Swing-based applications, since Swing is not thread-safe. Is there any specific reason behind this? Swing is not thread safe due to a design decision,

How to support restoring complex dependencies in a rdb

回眸只為那壹抹淺笑 提交于 2019-12-25 01:44:07
问题 I am having some trouble formulating a solution for this foreseen situation. TableA has a FK to TableB. TableC has a FK to TableA. TableC has a FK to TableD. TableA ------ taId tbId TableB ------ tbId TableC ------ tcId taId tdId TableD ------ tdId A brief series of events: 1) A cascade soft-delete is issued to a record in TableB. This causes all related records in TableA to be soft-deleted, cascading to all related records in TableC being soft-deleted. 2) At a later time, a record in TableD

How to support restoring complex dependencies in a rdb

不羁的心 提交于 2019-12-25 01:29:19
问题 I am having some trouble formulating a solution for this foreseen situation. TableA has a FK to TableB. TableC has a FK to TableA. TableC has a FK to TableD. TableA ------ taId tbId TableB ------ tbId TableC ------ tcId taId tdId TableD ------ tdId A brief series of events: 1) A cascade soft-delete is issued to a record in TableB. This causes all related records in TableA to be soft-deleted, cascading to all related records in TableC being soft-deleted. 2) At a later time, a record in TableD