Tip Bank

DevX - Software Development Resource

Use Java to Extract All the Name-value Pairs from a URL

import java.net.*;import java.io.*;import java.util.*;import java.text.*;//Program to get all the cookies(name/pair values) from the URL passed as parameterpublic class GetCookieFromURL{ public static void main(String args[]) { try{ //create url by pass

DevX - Software Development Resource

When to Use Whole-object Member Variables

While it’s usually best to use pointers for member variables rather than storing them by value, sometimes it’s better to store the member as a whole object, that is, to

DevX - Software Development Resource

Passing Pointers Instead of Const Reference Parameters

Usually, you pass const reference parameters to functions like this: class OneKind;class AnotherKind;class Example{ public: Example( const OneKind &inParam ); // conversion operator Example( const Example &inOriginal ); // copy

DevX - Software Development Resource

Printing the Contents Displayed in an Applet

Step 1: Draw any graphics objects in the applet as shown below: public void drawDemo(int w, int h, Graphics2D g2) { GeneralPath p = new GeneralPath(GeneralPath.WIND_EVEN_ODD); p.moveTo(w*.2f, h*.25f); // adds

DevX - Software Development Resource

Forcing HTML Data to Render Properly

If the data in your database looks like “SomeValue or other HTML, you have to do something to prevent the browser from showing the tags, when you want just to

DevX - Software Development Resource

Building .NET Projects with the Correct References

Building projects with VS.NET 2003 (devenv.exe), you run into some hassles with the ReferencePath property. You can see this property in the project user file: .vbproj.user and .csproj.user. The problem

DevX - Software Development Resource

Managing the Form Flow in J2ME

To manage form flow, the first thing you need to do is create a singleton class with static methods. Next, you implement a stackable system in which to store any