July 6, 2005

Mobile Java Gets a Much-needed Boost from Sun’s New Mobility Toolkit

ere you a little surprised recently that Sun’s J2ME Wireless Toolkit picked up several awards as product of the year in the mobile development tools area? I was. Not that the Wireless Toolkit is a poor tool. But after several years of writing applications in our favorite text editors and

Add Two Long Numbers Together Without Causing an Overflow Error

This function adds two long numbers together as if they were unsigned, and does not cause an overflow error. You may need this when implementing the SHA-1 Hashing function. ‘ Add two numbers together, without overflow or signed bitsFunction FullAdd(ByVal x As Long, ByVal y As Long) As Long Dim

Disable the Right Click Menu in the Browser

Sometimes you want to restrict users from saving the images on your Web pages. Use the following code to disable the right click menu in the browser: Disable Right Click Right Click is Disabled

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 your url as string URL url = new URL(“http://www.anywebsite.com/login.xml?user=xyz&password=pass1”); // opening the connection to the url URLConnection conn = url.openConnection();

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 store it by value. Here are some situations where this is true: When the header file for the member’s class