definition

Live Range vs Reaching Definitions

In compiler data flow analysis, what is the difference between a live range of a variable and it's reaching definition? Both seem to refer to the same thing... ...

I cannot grok MVC, what it is, and what it is not?

I cannot grok what MVC is, what mindset or programming model should I acquire so MVC stuff can instantly "lightbulb" on my head? If not instantly, what simple programs/projects should I try to do first so I can apply the neat things MVC brings to programming. OOP is intuitive and easier, object is all around us, and the benefits of cod...

Static factory method OR Creation method

I am wondering about correct definition for such construction: class A { public static A create() { return new A(); } private A() { } } In Effective Java (Item 1) and on wikipedia article I found that this is called Static Factory Method (some kind of Factory Method). But during reading of Refactoring to Patterns (Chapter 6)...

What does the term "Tuple" Mean in Relational Databases?

Please explain what is meant by tuples in sql?Thanks.. ...

What's the relationship between "a" heap and "the" heap?

A heap is a tree data structure where higher levels of the tree always contain greater (or lesser, if it's set up that way) values than lower levels. "The" heap is a bunch of free RAM that a program has available for dynamic allocation. They're both called "heap," but what does the one have to do with the other? ...

what happens when we include the same taglib url with same prefix twice?

what happens when i define the same tag lib twice in a jsp. for ex i am having a.jsp and b.jsp inside a.jsp i include b.jsp (@ include not jsp include) and at times i call b.jsp using ajax and i define a taglib <%@ taglib uri="http://www.myorg.com/my/mytaglib" prefix="mytaglib"%> inside a.jsp and b.jsp and use it in a.jsp and b.jsp i...

What is a code cave, and is there any legitimate use for one?

I encountered this word for the first time in the StackOverflow question "C# Theoretical: Write a JMP to a codecave in asm." I see that according to Wiktionary, a code cave is: an unused block of memory that someone, typically a software cracker, can use to inject custom programming code to modify the behavior of a program. Did ...

When exactly does a method have side effects?

As I always understood it, any change to the programs state (or anything to do with IO) is a side effect. It does not matter, whether the change occurs in a global variable or in a private field of the object the method is called on. It follows that all methods which do not return anything either do nothing at all or have a side effect. ...

What is Surfacing?

Joel Spolsky mentioned "surfacing" on the SO podcast. What's it mean? (perhaps something like "exposing" (as in "exposing an interface)? ...

Why is ClassName ClassName variable definition in C++ compiling and working properly?

Say I have a class definition: class CustomClass { int member; }; Why is the following variable definition compiling and working correctly: CustomClass CustomClass; // the variable is properly constructed Should't this confuse the compiler and cause it to indicate an error? ...

What exactly is Reflection and when is it a good approach?

What exactly is Reflection? I read the Wikipedia article on this subject and I understand that it is a kind of meta-programming, where the program can modify itself at run-time, but what does this mean? In what kind of situations is this a good approach and when is it the best to use it? ...

Is it possible to declare a class without defining it? (C++)

I know the questions seems ambiguous, but I couldn't think of any other way to put it, but, Is it possible to do something like this: #include<iostream> class wsx; class wsx { public: wsx(); } wsx::wsx() { std::cout<<"WSX"; } ? ...

Web Service Security: What are the pros and cons of WSE3.0 and WCF?

I'm developing a new set of web services at my company. My manager asked me to provide a greater level of security for this, as the web services will handle sensitive informations. I've searched the net for resources about how to secure an web service and the two runner ups are WSE3.0 and WCF. But I have no idea which one is the best ...

How decide what to put in a MOSS site template/definition

Hi When deciding on what elements to include in a MOSS site definition, i.e. lists, libraries etc. is there a rule of thumb on how best to make this decision? Would appreciate anyones suggestions. All the best ...

What does the term legacy database mean?

I read this term a lot. What exactly is a legacy database? I ask because I had thought it meant an old database like dbase or rdb, but I don't think I'm right. When looking at RoR or Django and "legacy database" integration, what does legacy database really mean? Is it different than a generic term "legacy database"? ...

One line class definition?

I'm updating some code and while I was working in a header, I came across the following line. . . . class HereIsMyClass; . . . That's it. It's just one line that precedes another, longer class definition. HereIsMyClass is in fact another class somewhere else, but I don't understand why this line is written here. What does it do? ...

Is the size of an object needed for creating object on heap?

When compiler need to know the size of a C (class) object: For example, when allocating a C on the stack or as a directly-held member of another type From C++ Coding Standards: 101 Rules, Guidelines, and Best Practices Does that mean for a heap allocated object, size is not necessary? Class C;//just forward declaration C * o...

Definition of 'clean code'

Robert C. Martin offers in the fist chapter of his book 'Clean Code' several definitions of 'clean code' from differen well known software experts. How do you define clean code? ...

What is AJAX, really?

I have to start using AJAX in a project and I don't know where to start. Can someone please help? ...

C++ overloaded operator declaration and definition problems

I am having a hard time getting this to work file: myclass.hpp Class MyClass { public: template <class T> MyClass &operator<<(const T &val); }; file: myclass.cpp template <class T> MyClass &MyClass::operator<<(const T &val) { ... } I can compile this in to a object without a problem, But when other functions try to ca...