computer-science

“Finding all the code in a given binary is equivalent to the Halting problem.” Really?

我只是一个虾纸丫 提交于 2019-12-18 22:18:24
问题 Was just reading the highly voted question regarding Emulators and the statement It's been proven that finding all the code in a given binary is equivalent to the Halting problem. Really stuck out at me. Surely that can't be true? Isn't it just a large dependency graph? Would be really grateful for some further insight into this statement. 回答1: I believe what is meant is "finding all code that is ever executed", i.e. finding coverage, possibly in combination with dynamically generated code.

What does hysteresis mean and how does it apply to computer science or programming?

元气小坏坏 提交于 2019-12-18 19:28:15
问题 I was looking at some code and saw an out of context comment about 'hysteresis.' I think I have figured out what the code does so my question doesn't involve anything specific. I simply do not understand what the term means or how it is applicable in programming. I looked around and saw some mathmatic definitions but would like some more information. From what I can tell Hysteresis has something to do with predicting or assuming a given state for X based on what has happened to X in the past?

O(log N) == O(1) - Why not?

半腔热情 提交于 2019-12-18 10:03:11
问题 Whenever I consider algorithms/data structures I tend to replace the log(N) parts by constants. Oh, I know log(N) diverges - but does it matter in real world applications? log(infinity) < 100 for all practical purposes. I am really curious for real world examples where this doesn't hold. To clarify: I understand O(f(N)) I am curious about real world examples where the asymptotic behaviour matters more than the constants of the actual performance. If log(N) can be replaced by a constant it

What's a Turing machine?

被刻印的时光 ゝ 提交于 2019-12-18 09:59:20
问题 What is a Turing machine and why do people keep mentioning it? My IBM PC is all I need to do my computation! Why does anyone care about these machines? 回答1: The reason that Turing Machines are a big deal has to do with the study of classical Computing Science or Theory of Computation type stuff. It's basically about analyzing the general properties of a computer, such as what theoretical abilities and limitations a computer has, as well as what we mean when we talk about "computing" something

What are practical guidelines for evaluating a language's “Turing Completeness”?

北城余情 提交于 2019-12-18 09:59:20
问题 I've read "what-is-turing-complete" and the wikipedia page, but I'm less interested in a formal proof than in the practical implications of being Turing Complete. What I'm actually trying to decide is if the toy language I've just designed could be used as a general-purpose language. I know I can prove it is if I can write a Turing machine with it. But I don't want to go through that exercise until I'm fairly certain of success. Is there a minimum set of features without which Turing

How to begin with augmented reality? [closed]

巧了我就是萌 提交于 2019-12-18 09:58:44
问题 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 4 years ago . I'm currently an undergrad in computer science and I'll be entering my final year next year. Augmented reality is something I find to be a really interesting topic, but I have no idea where to start learning about it. Where do you start learning about this topic and what libraries

why must return statement precede a throw statement in a catch block

别来无恙 提交于 2019-12-18 07:37:23
问题 The code below will complain try { session.Save(obj); return true; } catch (Exception e) { throw e; return false; // this will be flagged as unreachable code } whereas this will not: try { session.Save(obj); return true; } catch (Exception e) { return false; throw e; } I dont get it...I thought my csc101 told me that return statements should always be the last statement in a function and that it exits the function and return control to the calling code. Why does this defy my professor's logic

Generating All Permutations of Character Combinations when # of arrays and length of each array are unknown

ぐ巨炮叔叔 提交于 2019-12-18 04:15:01
问题 I'm not sure how to ask my question in a succinct way, so I'll start with examples and expand from there. I am working with VBA, but I think this problem is non language specific and would only require a bright mind that can provide a pseudo code framework. Thanks in advance for the help! Example: I have 3 Character Arrays Like So: Arr_1 = [X,Y,Z] Arr_2 = [A,B] Arr_3 = [1,2,3,4] I would like to generate ALL possible permutations of the character arrays like so: XA1 XA2 XA3 XA4 XB1 XB2 XB3 XB4

Does anybody know from where the “layer of abstraction”/“layer of indirection” quote emerged?

纵然是瞬间 提交于 2019-12-18 03:05:17
问题 The quote goes something like this: There's no problem in Computer Science that can't be solved by adding another layer of abstraction to it (Copied in this wording from http://blogs.oracle.com/fcmartin/2009/01/pardon_my_dust.html) There are a number of variations but I have been unable to find an originator. Since I quite like the quote with its tongue in cheek and quite a bit of truth, I would be interested to hear if anybody knows where this may come from. 回答1: This website attributes it

Why are both little- and big-endian in use?

只愿长相守 提交于 2019-12-17 22:13:34
问题 Why are both little- and big-endian still in use today , after ~40 years of binary computer-science? Are there algorithms or storage formats that work better with one and much worse with the other? Wouldn't it be better if we all switched to one and stick with it? 回答1: When adding two numbers (on paper or in a machine), you start with the least significant digits and work towards the most significant digits. (Same goes for many other operations). On the Intel 8088, which had 16-bit registers