devxlogo

Tip Bank

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

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

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

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

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

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

Uploading Larger Files

To upload larger files, you have to configure the web.config httpRuntime tag’s maxRequestLength property.