1,486 Answered Questions for the topic computer programming
06/01/19
What is tail recursion?
While learning lisp, I've come across the term *tail-recursive*. What does it mean exactly?
Computer Programming Web Design
05/29/19
What is the difference in web development and web designing?
CSS metaphysics: WHY is page vertical alignment so difficult?
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...
more
05/28/19
Why are C++ inline functions in the header?
<sub>NB This is not a question about how to use inline functions or how they work, more why they are done the way they are.</sub>The declaration of a class member function does not need...
more
What is the point of interfaces in PHP?
Interfaces allow you to create code which defines the methods of classes that implement it. You cannot however add any code to those methods. Abstract classes allow you to do the same thing, along...
more
Computer Programming Web Design
05/26/19
What are the responsibilities of a web developer?
How to determine whether a language is LL(1) LR(0) SLR(1)?
Is there a simple way to determine whether a grammar is LL(1), LR(0), SLR(1)... just from looking on the grammar without doing any complex analysis? For instance: To decide whether a BNF Grammar is...
more
05/25/19
Why is number of bits always a power of two?
We have 8-bit, 16-bit, 32-bit and 64-bit hardware architectures and operating systems. But not, say, 42-bit or 69-bit ones.Why? Is it something fundamental that makes 2^n bits a better choice, or...
more
05/24/19
What's "P=NP?", and why is it such a famous question?
The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting?
Comparing two Calendar objects?
I want to compare two Calendar objects to see if they both contain the same date. I don't care about any value below days.I've implemented this and I can't think about any case where it should...
more
Calling base class overridden function from base class method?
public class A { public void f1(String str) { System.out.println("A.f1(String)"); this.f1(1, str); } public void f1(int i, String str) { ...
more
How would you access Object properties from within an object method?
What is the "purist" or "correct" way to access an object's properties from within an object method that is not a getter/setter method?I know that from outside of the object you should use a...
more
05/24/19
Efficiently finding the intersection of a variable number of sets of strings?
I have a variable number of ArrayList<String>'s that I need to find the intersection of. A realistic cap on the number of sets of strings is probably around 35 but could be more. I don't want...
more
The consequences and pros/cons of flushing the stream in c++?
I have recently read an article which stated that using `\ ` is preferable to using `std::endl` because `endl` also flushes the stream. But when I looked for a bit more information on the topic I...
more
05/24/19
What is fuzzy logic?
I'm working with a couple of AI algorithms at school and I find people use the words Fuzzy Logic to explain any situation that they can solve with a couple of cases. When I go back to the books I...
more
How to write a simple database engine?
I am interested in learning how a database engine works (i.e. the internals of it). I know most of the basic data structures taught in CS (trees, hash tables, lists, etc.) as well as a pretty good...
more
The shortest path between two integers by adding or subtracting?
You are given two integers a and b. You want to find the shortest sequence of operations necessary to transform a into b, where at each step you are allowed to add or subtract 5, 7, or 12. For...
more
The recognizing power of "modern" regexes?
What class of languages do real modern regexes actually recognise?Whenever there is an unbounded length capturing group with a back-reference (e.g. `(.*)_\\1`) a regex is now matching a non-regular...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.