Tip Bank

DevX

Short-Circuiting String Comparison

Normally, you don’t need to implement operator == for comparing string objects, as it’s already defined for you. However, for certain applications, you might need to provide a different version

DevX

Optimize Oracle’s SQL Statement Cache

When Oracle receives a SQL statement to execute, it first looks to see ifthe execution plan already exists in its cache. If the statement does existin the cache, the previous

DevX

Move a Form by Clicking Anywhere on It

The following code allows you to move a form by clicking anywhere on the formand dragging it: Option Explicit’define module level variables to store the last position of the form,

DevX

Counting “Live” Instances of a Class

Counting the number of object instances of a certain class can be necessary in debugging and performance tuning. To do that, declare a static data member as a counter, and

DevX

Fix Single Quotes in a SQL Statement

The following will replace all single quotes in a SQL statement [CHR(39)] with anapostrophe [CHR(180)]. This is useful if you are trying to add names to adatabase as parameter values

DevX

How Many Digits Does a Floating-Point Variable Have?

The standard function template std::numeric_limits (defined in < limits >) returns the implementation-dependent number of digits that a certain type has: #include int main(){std::numeric_limits < float >::digits10; //6 on my

DevX

Roles Are Disabled at Package Compilation Time

When granting permissions through roles, it is important to know that rolesare disabled while packages are compiled. For example, consider two schemas: User_A and User_B. Let’s create Role_A: CREATE ROLE

DevX

Viewing Source Code

Question: Is there a way to prevent users from using the VIEW/SOURCE to view the HTML in my pages? I need to have this for a form that uses sensitive