devxlogo

Tip Bank

EncryptString – Encode and decode a string

Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal bytes As Long)’ encrypt a string using a password” you must reapply the same

Using “sprintf” function in Java

In C, the “sprintf” function will format a string, including integer values, to a specific length. For example, you could do “sprintf(%2d)”; and it would show 00 as part of

Learn Java from the Source

I’m continually suprised by the number of veteran Java programmers(those with more than six months’ experience) I encounter who aren’taware that the full source code for the standard Java libraries

Positioning the Cursor

Question: In qbasic there is a command called LOCATE. What it does is locate where you want your output on the screen, eg: locate 1,1: meaning one down and one

Maximum Number of Characters

Question: I’m reading approximately two million characters into an array. The max number of elements that Borland Turbo C++ 5.02 allows me is not enough. Can I declare this array

Creating a Temporary File

Many applications create temporary files that exist as long as the program is running and are later discarded. For example, a Web browser can store a list of pages that

Generating a Unique Filename

To generate a unique filename that won’t conflict with any other files that exist in the current directory, use the tmpnam() function declared in as follows: char * tmpnam(char *