Tip Bank

DevX - Software Development Resource

Treating a Vector As an Array

In certain contexts, you have to treat a vector as an array of its elements. For example, suppose you have a function that takes int * as its argument. How

DevX - Software Development Resource

The erase() Member Function of Associative Containers

The associative containers std::map, std::multimap, std::set, and std::multiset have the following three overloaded forms of the member function erase(): class map // simplified for brevity{public://..other members void erase(iterator position); //

DevX - Software Development Resource

Constructors and Member Variables

Question: After I have already declared an object, how can I call its constructor again to re-initialize its member variables? Answer: You can’t do that. C++ guarantees that for each

DevX - Software Development Resource

Object Class

Question: Every class in Java is supposed to extend the Object class by default. In case a user class extends some other class (e.g., if myclassextends yourclass), then is it

DevX - Software Development Resource

Static Methods

Question: What is the purpose of static methods in Java? Answer: Static methods can be invoked without an instance of an object. They provide the ability to execute methods in

DevX - Software Development Resource

Determining Database Size

Question: I am using Informix 7.24 and my raw partitions are getting quite large. Is there a way to tell the size of a database? I could then decide which

DevX - Software Development Resource

Choosing a Column Depending on Procedure Argument

Question: Can I specify the column I want to select from as an argument to the procedure? Something like: create procedure show_product(language char(2), ID integer) returning char(255);define p_prod_name CHAR (255);select

DevX - Software Development Resource

Ensuring Database Security

Question: What are some of the ways that databases can be secured so that they can’t be hacked into, etc.? Answer: The first level of security is always the OS

DevX - Software Development Resource

Selective Exchange Restore

Question: Is there a way to perform a selective restore? I need to restore just one mailbox or public folder. I’m using the NT backup/restore utility. Answer: I’m afraid not.