Tip Bank

DevX - Software Development Resource

Query from One Informix Database to Another

Question: I have two Informix databases existing on a Unix server. How do I write a stored procedure in one database that can access data from the other database? Answer:

DevX - Software Development Resource

Making System Calls in Stored Procedures

Question: I’m writing a procedure to send an e-mail that will receive two parameters: the e-mail address of the recipient and the subject of the e-mail (e-mail content is not

DevX - Software Development Resource

Taking the Address of a Member Function

Question: class a;typedef void(a::*func)();class a{protected: int x;public: func f; void fg(){f=&a::as;}; void as();}; This code compiles in Visual C++6.0. However, Borland C 3.1 gives me the following error at line”void

DevX - Software Development Resource

References

Question: I want to know if the following declaration is possible: int *p;p= new int;int &refval= *p; Answer: It’s valid C++. You’re binding a reference to an l-value of type

DevX - Software Development Resource

Memory Addresses

Question: How do I get the addresses of primitive variables, reference variables, and objects in Java? Answer: Unlike systems programming languages like C, Java does not have pointers. Objects are

DevX - Software Development Resource

String Equality

Question: When you compare two objects through the”== operator,” Java checks for reference equality. For example, if you create two String objects with “new” keywords and initialize them with same

DevX - Software Development Resource

Swap the mouse buttons’ behavior and meaning

You can programmatically swap the meaning of the left and right mouse buttons, to account for your left-handed users. All you need is a call to the SystemParameterInfo API function