theory

What is the intersection of two languages with different alphabets? [closed]

馋奶兔 提交于 2019-12-11 13:44:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I did some googling on this and nothing really definitive popped up. Let's say I have two languages A and B. A = { w is a subset of {a,b,c}* such that the second to the last character of w is b } B = { w is a subset of {b,d}* such that the last character is b } How would one define this? I think the alphabet

soft delete common attributes with regards to cascade recovery

十年热恋 提交于 2019-12-11 11:09:03
问题 What type of fields are generally used to accompany soft delete? Any of these, any others? bool IsDeleted // nice because the default value is 0 (no) just in case date DateDeleted // is this a common one? date DateCreated // more of a temporal db aspect date DateModified // same with respect to created The reason I ask is that when using soft-deletes, cascading must still be implemented in order to maintain integrity. However, the real trick is not cascade deleting, which is rather easy. The

粗糙集理论(Rough Set Theory)

醉酒当歌 提交于 2019-12-11 01:49:04
粗糙集理论(Rough Set Theory) 一种 数据分析处理 理论。 《粗糙集—关于数据推理的理论》。 数据挖掘 (Data Mining)和 知识发现 ( KDD )。 集合近似定义的基本思想及其应用和粗糙集合环境下的机器学习基础研究。 在粗糙集中使用 信息表 (information table) 描述论域中的数据集合.信息表的形式和大家所熟悉的关系数据库中的 关系数据模型 很相似,是一张二维表格。 数据库(数据挖掘)、粗糙集、粗糙集合论、集合A(列表)、 对象、 属性(条件属性,决策属性)、论域、知识、知识库、知识系统、集合的划分(划分关系)、近似集合 (上近似 ,下近似 ) 。 在所有的现有知识里面找出跟他最像的两个一个作为下近似,一个作为上近似。下近似集是在那些所有的包含于X(A上的子集合X)的知识库中的集合中求并得到的(包含在X内的最大可定义集),而上近似则是将那些与X有交集的知识库中的集合求并得到的(包含X的最小可定义集)。 下近似集合=X集合内可区分对象的集合。 上近似集合=下近似集合∪X中对象不可区分的所有对象的集合。 一般的,我们可以用下面的图来表示上、下近似的概念。 这其中曲线围的区域是X的区域,蓝色的内部方框是内部参考消息, 是下近似 ,绿的是边界加上蓝色的部分 就是上近似集。其中各个小方块可以被看成是论域上的知识系统所构成的所有划分。 研究方向 理论

Why should “miter” joints be slower than others?

时间秒杀一切 提交于 2019-12-11 01:48:02
问题 I'm having a graphics problem on drawing lines in Flash Player, where two lines drawn on top of each other with different thickness don't align properly if I use any other JointStyle than MITER . For pictures of the effect, and for the graphics oriented part of the question, see my post over on doctype. However, there's also a second angle on this problem, which is: why should drawing the "mitered" joints be so much slower than others? This seems to be a problem since at least FP 8, but I

Javascript: creation of object from an already instantiated object versus the prototype

馋奶兔 提交于 2019-12-10 19:58:52
问题 I have a rather academic question that doesn't particularly apply to anything I'm doing, I just really want to know the answer! Say we have a simple object definition in the global namespace as such: TestObject = function(){}; It has a method added to it's prototype that can be instantiated into a new object itself: TestObject.prototype.AnotherObject = function() {}; Instantiate the first object: var myObject = new TestObject(); Now my question is this: How does myObject.myProperty = new

Is there a difference between a list and a tuple?

风流意气都作罢 提交于 2019-12-10 13:49:17
问题 I see existing questions that relate to specific programming languages. There are implementation differences in specific languages, but is there a theoretical conceptual difference? Mutable vs immutable : In Python, lists are fully mutable while tuples are immutable or persistently immutable so that modifications create new tuples and do not do in place modifications. But this is purely an implementation detail. In other languages tuples are mutable and lists are immutable. Heterogeneous vs

What are the pros and cons of specifying a Controller class via URL vs. having a script for each Controller?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 13:26:20
问题 I have setup two different PHP systems this summer. Each uses two different methods: Method #1: One PHP File Per Task This method requires that a PHP file be created for each major task. For example, my upload script would be access via http://www.domain.com/upload.php . On upload.php , a "controller" and a "view" class are instantiated and used. For example, upload.php might look something like this: <?php require_once PATH_LIBRARY . 'control/Uploader.class.php'; require_once PATH_LIBRARY .

Can you encode to less bits when you don't need to preserve order?

送分小仙女□ 提交于 2019-12-10 09:50:52
问题 Say you have a List of 32-bit Integers and the same collection of 32-bit Integers in a Multiset (a set that allows duplicate members) Since Sets don't preserve order but List do, does this mean we can encode a Multiset in less bits than the List? If so how would you encode the Multiset? If this is true what other examples are there where not needing to preserve order saves bits? Note, I just used 32-bit Integers as an example. Does the data type matter in the encoding? Does the data type need

Why does tail call optimization need an op code?

萝らか妹 提交于 2019-12-10 01:06:44
问题 So I've read many times before that technically .NET does support tail call optimization (TCO) because it has the opcode for it, and just C# doesn't generate it. I'm not exactly sure why TCO needs an opcode or what it would do. As far as I know, the requirement for being able to do TCO is that the results of a recursive call are not combined with any variables in the current function scope. If you don't have that, then I don't see how an opcode prevents you from having to keep a stack frame

P != NP question

不问归期 提交于 2019-12-09 15:18:22
问题 Not a 'pure' programming question, but since it is deeply involved in programming theory, I thought it best to ask here. Regarding the P NP problem, this excerpt from http://en.wikipedia.org/wiki/P_versus_NP_problem : "In essence, the question P = NP? asks: Suppose that yes answers to a yes or no question can be verified quickly. Then, can the answers themselves also be computed quickly?" I am left wondering, how is the speed of verifying an answer related to the speed of generating a