devxlogo

June 24, 2003

Determine the Last Day of the Month

This can be accomplished with just one line of code: FindEOM = DateSerial(Year(ADate), Month(ADate) + 1, 0) Setting the day parameter of DateSerial to 0 always returns the day prior

A Useful Retrieval Procedure

This procedure retrieves the table name, table id, column or fieldname, data type, the length of the field in bytes, and the order in which the fields were created. I

Change the Read-only Permissions of a File (JDK 1.2.2)

Use this code to change the read-only permissions of a file in JDK 1.2.2: public void changeFilePermission(){ String osName = System.getProperty(“os.name”); try{ if (osName.equalsIgnoreCase(“WINDOWS NT”) ||osName.equals(“Windows 2000”) ) { Runtime.getRuntime().exec(“cmd.exe

The Trim Function in JavaScript

JavaScript doesn’t have a trim to strip the spaces around strings. This little bit of code uses regular expressions to strip the spaces around given input. function trim(input){ var lre

How to Double Image Size

Use the following code to scale an image into double its original size: import java.applet.*;import java.awt.*;import java.net.*;public class ScaleImage extends Applet{ Image img; public void init() { try { img