BASIC | AutoLISP | C | HTML | JavaScript | Assembly








TITLE Selective ROT Cryptography
FILETYPE BASIC source code
ENVIRONMENT Created in QBASIC under MS-DOS 6.22
DESCRIPTION The decimal value of any letter of the English alphabet (lower or upper case) in the input will be fed into a user specified mathematical formula to yield the output.
FOOTNOTE A simple way to camouflage the content of a document would be to add say, decimal value of 1 to every character. This would mean then for example, to shift all letters 'A' into 'B', all numbers '1' into '2' and so on. One formula for doing this is EncryptedOUTPUT = RawINPUT + 1, where output and input are decimal correspondences. This very same idea may be employed inversely to retore the original data: in other words in this particular case, RestoredOUTPUT = EncryptedINPUT - 1. So here we got ourself the entire 256 bytes of ASCII table to play with, but a little inconvenience arises at the recepient's end if he or she were to key-in by hand every character of the encrypted data. Imagine keying in ASCII code 13 in Microsoft Winword, or keying in a back space. For this reason our little program here has limited the transformation to be performed only on the alphabets. Any other characters outside this alphabet pool, for example a plus sign, will be left unprocessed and output as is. In this case also, a 'z' after being shifted forward one place will become 'a'.


TITLE Shortest Connection
FILETYPE AutoLISP source code
ENVIRONMENT AutoDesk AutoCAD R14 for Windows
DESCRIPTION Draws one straight line of shortest distance between midpoint of selected line, and/or insertion point of selected text, and/or one of the eight spots on the circumference of selected circle.
FOOTNOTE This lisp program allows the user to make two window selections of at least one entity in each. The mid points of line entities, insertion points of text entities, octrants of circle entities will be extracted. Next, distances between various combinations of two of these points will be calculated, concluding to one single shortest distance. A line will now connect these two points of shortest distance.


TITLE Layout
FILETYPE AutoLISP source code
ENVIRONMENT AutoDesk AutoCAD R14 for Windows
DESCRIPTION Lays out lights (desirable blocks) over a two dimentional plan
FOOTNOTE Assume one light effectively governs a circular area of radius 2 meters, then a narrow corridor of 8 meters length would require two lights (4 meters apart from each other, and each 2 meters away from closest ends of the corridor). This lisp program allows the user to select two opposite corners of a room and will automatically calculate and position desirable number of lines and rows of lights.


TITLE Midline
FILETYPE AutoLISP source code
ENVIRONMENT AutoDesk AutoCAD R14 for Windows
DESCRIPTION Draws a third parallel line through the mid point between one selected pair of parallel lines


TITLE Probe
FILETYPE AutoLISP
ENVIRONMENT AutoDesk AutoCAD R14 for Windows
DESCRIPTION Counts the number of relations
FOOTNOTE For example, we want to count how many bathtubs there are in one drawing. A bathtub is made of say, one semicircle and three straight lines. Every two entities of these four entities has a relationship in terms of distance and angle. So in effect, we have 4C2 relations. Probe.lsp scans the entire drawing and sees how many matching relations we have. One special feature of this program is that, even if the bathtubs are rotated, they will still be covered.


TITLE FIO.H
FILETYPE C header file
ENVIRONMENT Created in Turbo(Borland) C v2.0 under MS-DOS 6.22 and tested normal under MS-DOS 6.22
DESCRIPTION Contains a handful of functions for easier array and file manipulation
FOOTNOTE Some of the functions screw up if called under Windows95 simulated DOS.


TITLE BMP COORDINATE COLLECTOR
FILETYPE C source code
ENVIRONMENT Created in Turbo(Borland) C v2.0 under MS-DOS 6.22 and tested normal with Windows 3.1 paintbrush.exe in black & white mode
DESCRIPTION Extracts the coordinates of points in a bitmap file
FOOTNOTE Bitmap is one of the most straight forward way of recording images. This exercise was designed specifically for Windows3.1 paintbrush.exe handling 440x640 pixels with no RLE (Run-Length Encoding) compression.


TITLE X-Find
FILETYPE C source code and MS-DOS batch file
ENVIRONMENT Created using Turbo(Borland) C v2.0. Heavily MS-DOS reliant.
DESCRIPTION Searches recursively in specified directories for files that contain a specific string, and presenting the paths and names of these files.
FOOTNOTE One day I found myself opening and closing files one by one across my hard drive, trying to locate a document from some five years ago. I had no recollection of the filename, pathname, and most of the document content apart from two key words - "your worship". These were enough as key words that distinguish one document from all the other thouthands of files in the computer
The batchfile Xfind.bat starts off generating a file list using dir/s. Next, FFF.exe (fff.c) packages each of these filesname with the DOS command "FIND.EXE" and appropriate parameters; all of these going into a newly generated batch file of the name Search.bat, this when executed, collects the results from each individual find.exe session into one single final log file called "found!!!". The user can now perform find.exe for the last time on this log file for the names of files that contained the keywords.


TITLE HTML Master Reference
FILETYPE .HLP file for Windows
ENVIRONMENT Windows95 or above
DESCRIPTION Complete reference (including syntax and examples) to html commands


TITLE Mouse Hunt (Text Mode)
FILETYPE Java Script
ENVIRONMENT Tested normal on Internet Explorer 4.0 for Windows98
DESCRIPTION Enabling hyperlink texts to alter in response to mouse status
FOOTNOTE In this example, the text switches its color as the mouse pointer moves onto and off from the herperlink.


TITLE Mouse Hunt (Graphical Mode)
FILETYPE Java Script
ENVIRONMENT Tested normal on Internet Explorer 4.0 for Windows98
DESCRIPTION Enabling hyperlink images to swap spontaneously in response to mouse status
FOOTNOTE There are a number of ways to do this, but the important thing is to make sure that all those images to be used for onMouseover events are loaded well in advance, ie. to load all the images as the current page loads itself and not to wait and only started loading when the mouse pointer has arrived at a particular link - that would be too slow over ordinary modems. (Click here to see examples of untolerable time delay.)


TITLE Random Phrase Generator
FILETYPE Java Script
ENVIRONMENT Tested normal on Internet Explorer 4.0 and Netscape Communicator 4.7 for Windows98
DESCRIPTION Presents upon execution, one phrase chosen randomly out of the phrases data base (eg. of proverbs)


TITLE Warm Reboot
FILETYPE MS-DOS batch file feeding into debug.exe
ENVIRONMENT Created and tested effective under MS-DOS 6.22
DESCRIPTION Warm reboot equivalent to Ctrl-Alt-Del in DOS
FOOTNOTE Insert 32 12 (hex) into memory segment 40 offset 72. The command "E 40:72 34 12" in debug.exe does just this. Next we use "G=FFFF:0" command to start execute from segment FFFF. By the way, this routine works only on MS-DOS 6.22 or earlier. Running it in Windows DOS will simply close off that window. I wonder if it is possible to initiate a reboot from a Windows DOS...


TITLE FAT Eraser
FILETYPE MS-DOS batch file feeding into debug.exe
ENVIRONMENT Created and tested effective under MS-DOS 5
DESCRIPTION Erases file allocation table and thereby impairing access to files
FOOTNOTE What happens upon running this little program is that the specified floppy disk in the disk drive would become corrupted that "(R)etry, (I)gnore, (A)bort" become the only options at attempt to access the disk. This is probably achieved by erasing the FAT. And if I am not mistakened, the actual files are still there well and healthy just without a index to point to their starting positions. Not very useful, but provides a bit more exercise using debug.exe. This program worked fine under MS-DOS 5 on 5.25" and 3.5" floppy disks, but never had the chance to be tested on a hard disk. Volunteers are always welcome (^^)









¦^®a

Home