gbCodeLib Source Code Snippets Gary Beene's Information Centers http://www.garybeene.com ----T 01 Common features _Language Summary Language Comparisons 2005-02-17 22:33:34 ----O 0 0 0 ----E ----D ----E ----C Most languages share common features, different in their details, but similar in functionality. A programmer skilled in one language can typically learn a new language by starting on the similar aspects and then branching out into the differences between the two languages. The gbCodeLib tutorials are modelled after the following language comparisons. As the tutorials grow they will contain sections on each of these common areas, as well as sections on capabilities unique to each language: //Languages reflect the following common programming concepts: 1. Syntax (how the language is written) 2. IDE - Integrated Development Environment, is it exists. Sometimes third party IDEs are available 3. Data types / operators / variables 4. Strings 5. Arrays 6. Flow control 7. Functions and Subroutines //Languages also provide functionality in all of these common areas: 8. Files and Folder 9. System functions 10. Graphics 11. Sound 12. Date/time 13. Math 14. Printing 15. Error handling 16. Objects / Classes / Heirarchy //Languages differ in the extent to which they provide access to external capabilities such as: 17. Windows API access 18. Components and libraries, such as DLLs and OCXs ----E ----H ----E ----T 02 Language famillies _Language Summary Language Comparisons 2005-02-17 22:33:38 ----O 0 0 0 ----E ----D ----E ----C Based on similarities in structure and syntax, most languages can be grouped with other, similar languages. //The Visual Basic Family - run uncompiled in IDE, compile for distribution VB VB.net VBA (Excel, Outlook, Access) //OOP Languages - compile before use C++ Java C# //CGI Scripts - no compiliation Perl ASP //Web page and scripting technologies - intrepreted by the browser HTML XML JavaScripot VBScript ----E ----H ----E ----T 03 IDE _Language Summary Language Comparisons 2005-02-17 22:48:50 ----O 0 0 0 ----E ----D ----E ----C Languages differ greatly in the type of IDE (Integrated Development Environment) they use. //Most come with an IDE as part of the language VB, VBA, VB.net, Delphi, Excel, Outlook, Access, C++ //Some have no IDE (from the language manufacturer) HTML, XML, DOS, Perl, ASP, PHP, C#, Java, JavaScript, Java, SQL, PL1 Third party IDE as available for most of the ones which do not comes with and IDE as part of the original language purchase: Common third-party IDEs include the following: //Perl OptiPerl http://www.xarka.com ----E ----H ----E ----T 04 Commenting _Language Summary Language Comparisons 2005-02-17 22:51:23 ----O 0 0 0 ----E ----D ----E ----C Commenting is the placement of text in the source code that is to be ignored by the compiler or interpreter. It is there to explain the code. Most iDE's usually color the comments green to highlight them from executable code. Comments are typically identified by the use of special characters, as follows: //Visual Basic family: Text to the right of an apostrophe (') is highlighted, provided the apostrophe is not enclosed within quotes //HTML, XML Text between is highlighted //ASP Text to the right of an apostrophe (') is highlighted, provided the apostrophe is not enclosed within quotes, and lines which start with "REM" //Perl, PHP Text to the right of "//" Text to the right of a "#" is highlighted //Delphi Text to the fight of "//" or between curly braces "{}" or between "(*" and "*)" //JavaScript, Java, C++, C# Text to the right of "//" on a line, or between "/*" and "*/" on multiple lines are highlighted //DOS, VB, VB.net, VBA Any line that starts with "REM" ----E ----H ----E ----T 05 Case-sensitivity _Language Summary Language Comparisons 2005-02-17 22:49:05 ----O 0 0 0 ----E ----D ----E ----C Some languages are case sensitive and others are not. //Case sensitive Java, JavaScript, C++, C#, Perl, PHP //Not case sensitive VB, VBA, VB.net, Delphi, HTML, XML, ASP, DOS, Excel, Outlook, Access, Cobol, PL1, SQL ----E ----H ----E ----T 06 Keywords _Language Summary Language Comparisons 2005-02-17 22:49:10 ----O 0 0 0 ----E ----D ----E ----C While there are some similarities, keywords are considerably different from language to language ----E ----H ----E ----T 07 Top 100 Snippets (applications) _Language Summary Language Comparisons 2005-02-18 21:35:46 ----O 0 0 0 ----E ----D ----E ----C //For stand alone applications, regardless of the language, these are the Top 100 //capabilities which most applications will feature, and which programmers will need //to know. //As the gbCodeLib database grows, a snippet will be added under each language //for these Top 100 snippets. //In some languages, particularly the CGI and scripting languages, where programming //does not generally result in standalone applications, the Top 100 list will be much //different. //The gbCodeLib database will reflect different Top 100 snippets for such each language //Top 100 snippets have the keyword 'Top100' so you can list them as a search result Applications 1. Associate an extension with an application 2. Create a shortcut to an application (to a specified folder, including Windows special folders) 3. Open a Color dialog 4. Open a File dialog 5. Open a Folder dialog 6. Open a Font dialog 7. Put app icon in the system tray 8. Put app in the Explorer context menu 9. Put app in the SendTo context menu 10. Start a new application and wait for it to finish 11. Start an application when Windows starts up 12. Test whether the application is running within the IDE 13. Maintain MRU file (most recent files updated) 14. Read/write INI files 15. Create context menus 16. Resize controls when form resizes Arrays 17. Cycle througn an array 18. Randomly shuffle an array 19. Remove an element of an array (by content or by position) 20. Search an array Clipboard 21. Copy or retrieve text and images from the clipboard Controls 22. Automatically highlight textbox content on focus 23. Capture any key (Enter, TAB, arrow keys, home/end, F-keys, ...) 24. Forces lower/upper case on text input 25. Richtextbox manipulation (word wrap, find and replace, TAB control, flicker control, merge two controls, ...) 26. Toolbar manipulation (customize, dropdowns, images, sync with menus, ...) 27. Statusbar manipulation Date-Time 28. Compute elapsed time between 2 dates 29. Compute elapsed time between 2 events (ms accuracy) 30. Display time in multiple formats Files 31. Create valid full pathname from folder and file names 32. Extract file name from a full path 33. Determine if a file exists 34. Get file properties (size/date/attributes) 35. Delete a file to the recycle bin 36. Backup/restore a file File - Text 37. Read file one line at a time or all at once 38. View content File - Binary 39. Read/write data at a specific location 40. Read entire file at once 41. View contents in hex or binary-stripped format Folders/Drives 42. Determine if a file exists 43. Delete a folder and its subfolders 44. Get list of dirve letters 45. Get type of drive 46. Open DOS windows at a specific folder 47. Open a Window at a specific folder 48. Open Windows Explorer at a specific folder 49. Create a fll path of folders Forms 50. Center a form 51. Keep form on top 52. Set min/max size of form 53. Add a splitter (vertical/horizontal) 54. Unload all forms Graphics 55. Convert between Long, RGB, VB, and web colors 56. Get image size without reading entire file (JPG/GIF/BMP) 57. Get screen resolution 58. Generate a gradient fill 59. Overlay an image with transparency control 60. Read/write/display/convert images (JPG/GIF/BMP) 61. Resize and image, keeping aspect ratio 62. Capture the screen or any part of the screen 63. Set wallpaper - center/stretch/tile Internet 64. Check for Internet connection 65. Create URL shortcut 66. Create web page (HTML) from code 67. Download text/binary file, with progress indicator 68. Upload text/binary file, with progress indicator 69. Get remote file information (size/date0 70. Open a web page in a browser 71. Send email using default email application 72. Update file via FTP Math 73. Create random integer within specified range 74. Round number to specified number of decimals Multimedia 75, Play CD 76. Play sound or video file (.wav, .mp3, ..mid, avi, .mpg) 77. Record sound or video Navigation 78. List all files and folders beneath a specified full path Printing 79. Print images (positioned, scaled, or tiled) 80. Print preview 81. Color text printing 82. Send page eject to the printer 83. Print justified text (left/right) Registry 84. Clear application setting from registry 85. Write/edit application settings 86. Write/edit/delete anywhere in the registry Security 87. Calculate checksum 88. Encrypt/decrypt a file/string (with or without a password) 89. Disable Ctrl-Alt-Del Sort 90. Bubble sort 91. QuickSort Strings 92. Convert strings to upper/lower case 93. Find/replace a string within a string 94. Split string into an array based on delimeters 95. Find text between two strings System 96. Get computer name 97. Get user name 98. Get name of special folders (Windows, System, SendTo, Startup, 99. Get Windows version 100. Reboot / restart / logoff system ----E ----H ----E ----T - Tutorial 01 - Overview ASP _tutorials bookmark 2005-02-17 22:16:23 ----O 0 0 0 ----E ----D ----E ----C ASP - Active Server Pages An Active Server Page is an HTML file with some additional code (ASP) in it, separated from the HTML markup by a different delimiter: <% %> <% ASP Code evaluated here %> As with HTML, you can use any text editor to create ASP code. ASP files use the extension .asp. The HTML page is fed to an HTTP server, which in turn pages the ASP code to the IIS server (a microsoft application) for execution. The ASP code is executed on the server and the results displayed within the page on the browser. The ASP code can be written using one of many scripting languages - as long as the server can execute it. VBScript is the default and is well supported by the Microsoft IIS server. IIS stands for Internet Information Services and is free from Microsoft. PSW stands for Personal Web Server. It is a smaller, but fully fully functional -version of IIS. It is free from Microsoft. Both IIS and PWS can be run on your PC to help try out ASP pages locally. PWS require Win95+, whereas IIS requires NT4 or higher. When a browser requests an HTML file, the server returns the file When a browser requests an ASP file, IIS passes the request to the ASP engine. The ASP engine reads the ASP file, line by line, and executes the scripts in the file. Finally, the ASP file is returned to the browser as plain HTML. ----E ----H ----E ----T - Tutorial 02 - Sample Code ASP _tutorials 2005-02-17 22:16:23 ----O 0 0 0 ----E ----D ----E ----C <%@ Language=VBScript %> Example 1

<% Response.Write("Hello, world!") %> If you save this file as .asp and put it on an ASP-ready server, you'll see the "Hello, world!" in the page above. The important thing to note is that the server will assume that anything between the delimiters is code and will then try to execute it. Don't put HTML there, or else it'll break. The first line, <%@ Language=VBScript %> is optional. If you leave it out, the server will assume you're using VBScript ----E ----H ----E ----T - Tutorial 03 - Syntax ASP _tutorials 2005-02-17 22:16:23 ----O 0 0 0 ----E ----D ----E ----C The Write method of the ASP Response Object is used to send content to the browser. For example, the following statement sends the text "Hello World" to the browser: <% response.write("Hello World!") %> The ASP code can be any script of your chosing - VBScript, JavaScript. But you must specify the language at the top of the page. <%@ language="javascript"%> ... <% Response.Write("Hello World!") %> Note that JavaScript is case sensitive. You must write your ASP code to match the requirements of the script language you use. ASP is shipped with VBScript and JScript (Microsoft's implementation of JavaScript). You can use other CGI scripts to, such as Perl or Python, but the server has to support them. Because the server hands off the ASP (script) code, the browser does not need to support scripting al all. ----E ----H ----E ----T - Tutorial 04 - Using IIS / PWB ASP _tutorials bookmark 2005-02-17 22:16:23 ----O 0 0 0 ----E ----D ----E ----C PSW on Windows 98: - Install PWS - Run the web server - From within your browser type in "http://localhost/myweb/test.asp" to view the test.asp page IIS on Windows XP Professional - IIS will not run on Windows XP Home Edition - Install IIS - Run the web server - From within your browser type in "http://localhost/myweb/test.asp" to view the test.asp page ----E ----H ----E ----T Detect browser ASP navigation 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C <%@ Language=VBScript %> <% dim BrowserType set bc = Server.CreateObject("MSWC.BrowserType") if bc.browser="IE" then BrowserType = "MSIE" elseif bc.browser="Netscape" then BrowserType = "Netscape" elseif bc.browser="Lynx" then BrowserType = "Lynx" end if %> <% select case BrowserType case "Lynx" Response.Write("You're using Lynx! How do you manage to live without 3-D backgrounds and endless download times? Whatever!") case "MSIE" Response.Write("You're using Internet Explorer! Thank you for helping keep Microsoft afloat!") case "Netscape" Response.Write("You're using Netscape! And you're wearing those great pink pants! ASP knows everything about you!") case else Response.Write("You're using some other browser I don't know about.") End select %>
----E ----H ----E ----T - Tutorial 01 - Overview C++ _tutorials 2005-02-17 22:16:28 ----O 0 0 0 ----E ----D ----E ----C ----E ----H ----E ----T Snippet 13 Cobol _tutorials 2005-02-17 22:16:32 ----O 0 0 0 ----E ----D ----E ----C ----E ----H ----E ----T - Tutorial 01 - Overview CSharp _tutorials 2005-02-17 22:16:36 ----O 0 0 0 ----E ----D ----E ----C C# competes with C++ and VB as a language to write Windows applications. C# uses the .NET software development kit Every C# program contains a Main method where program execution begins and ends. ----E ----H ----E ----T - Tutorial 02 - Basic Code (Hello World) CSharp _tutorials 2005-02-17 22:16:36 ----O 0 0 0 ----E ----D ----E ----C class HelloWorld { static void Main() { System.Console.WriteLine("Hello World!"); } } Save this file as HelloWord.cs Compile in a DOS window by typing in: csc HelloWorld.cs This creates an EXE files called HelloWorld.exe ----E ----H ----E ----T - Tutorial 03 - Syntax CSharp _tutorials 2005-02-17 22:16:36 ----O 0 0 0 ----E ----D ----E ----C C# is case sensitive C# statements end with the semicolon ; memory = 2 + 5; Each line consists of only 1 statement C# programs consist of sequences of C# statements that execute in ascending order like the following example: { statement 1 statement 2 statement 3 } Comments: // This text will be treated as a comment /* As are these text lines treated as comments */ ----E ----H ----E ----T - Tutorial 01 - Overview Delphi _tutorials 2005-02-17 22:16:41 ----O 0 0 0 ----E ----D ----E ----C ----E ----H ----E ----T - Tutorial 01 - Overview DOS _tutorials 2005-02-17 22:16:45 ----O 0 0 0 ----E ----D ----E ----C Microsoft DOS (Disk Operating System) is a command line user interface. MS-DOS 1.0 was released in 1981 for IBM computers and the latest version of MS-DOS is MS-DOS 6.22, released in 1994. A command line interface (MS-DOS or an emulation of it) continues to be available in each new version of Microsoft. To get a DOS window , click Start / Run and type "command" (Win9.x and Windows ME) or by typing "cmd" in Windows NT, Windows 2000 or Windows XP. To see a list of all commands, type 'Help' in a DOS window. To capture the information in a file, type Help > doscommands.txt The > symbols directs the output of the DOS command to the fle. ----E ----H ----E ----T - Tutorial 02 - Internal Commands DOS _tutorials 2005-02-17 22:16:45 ----O 0 0 0 ----E ----D ----E ----C ASSOC Displays or modifies file extension associations. AT Schedules commands and programs to run on a computer. ATTRIB Displays or changes file attributes. BREAK Sets or clears extended CTRL+C checking. CACLS Displays or modifies access control lists (ACLs) of files. CALL Calls one batch program from another. CD Displays the name of or changes the current directory. CHCP Displays or sets the active code page number. CHDIR Displays the name of or changes the current directory. CHKDSK Checks a disk and displays a status report. CHKNTFS Displays or modifies the checking of disk at boot time. CLS Clears the screen. CMD Starts a new instance of the Windows command interpreter. COLOR Sets the default console foreground and background colors. COMP Compares the contents of two files or sets of files. COMPACT Displays or alters the compression of files on NTFS partitions. CONVERT Converts FAT volumes to NTFS. COPY Copies one or more files to another location. DATE Displays or sets the date. DEL Deletes one or more files. DIR Displays a list of files and subdirectories in a directory. DISKCOMP Compares the contents of two floppy disks. DISKCOPY Copies the contents of one floppy disk to another. DOSKEY Edits command lines, recalls Windows commands, and creates macros. ECHO Displays messages, or turns command echoing on or off. ENDLOCAL Ends localization of environment changes in a batch file. ERASE Deletes one or more files. EXIT Quits the CMD.EXE program (command interpreter). FC Compares two files or sets of files, and displays the differences between them. FIND Searches for a text string in a file or files. FINDSTR Searches for strings in files. FOR Runs a specified command for each file in a set of files. FORMAT Formats a disk for use with Windows. FTYPE Displays or modifies file types used in file extension associations. GOTO Directs the Windows command interpreter to a labeled line in a batch program. GRAFTABL Enables Windows to display an extended character set in graphics mode. HELP Provides Help information for Windows commands. IF Performs conditional processing in batch programs. LABEL Creates, changes, or deletes the volume label of a disk. MD Creates a directory. MKDIR Creates a directory. MODE Configures a system device. MORE Displays output one screen at a time. MOVE Moves one or more files from one directory to another directory. PATH Displays or sets a search path for executable files. PAUSE Suspends processing of a batch file and displays a message. POPD Restores the previous value of the current directory saved by PUSHD. PRINT Prints a text file. PROMPT Changes the Windows command prompt. PUSHD Saves the current directory then changes it. RD Removes a directory. RECOVER Recovers readable information from a bad or defective disk. REM Records comments (remarks) in batch files or CONFIG.SYS. REN Renames a file or files. RENAME Renames a file or files. REPLACE Replaces files. RMDIR Removes a directory. SET Displays, sets, or removes Windows environment variables. SETLOCAL Begins localization of environment changes in a batch file. SHIFT Shifts the position of replaceable parameters in batch files. SORT Sorts input. START Starts a separate window to run a specified program or command. SUBST Associates a path with a drive letter. TIME Displays or sets the system time. TITLE Sets the window title for a CMD.EXE session. TREE Graphically displays the directory structure of a drive or path. TYPE Displays the contents of a text file. VER Displays the Windows version. VERIFY Tells Windows whether to verify that your files are written correctly to a disk. VOL Displays a disk volume label and serial number. XCOPY Copies files and directory trees. ----E ----H ----E ----T - Tutorial 03 - External Commands DOS _tutorials 2005-02-17 22:16:45 ----O 0 0 0 ----E ----D ----E ----C bootcfg (XP only) This utility allows you to set up your boot options, such as your default OS and other loading options. cacls (XP, 2000, & NT4.0) Changes the ACLs (security Settings) of files and folders. Very similar to chmod in Linux. comp (XP & 2000) This utility is very similar to diff in Linux. Use the /? switch to get examples of command usage. Contig (NT4.0 and newer) A great defrag utility for NTFS partitions. defrag (XP only - NT4.0 and Win2k use contig) Yes, XP comes with a command line disk defrag utility. If you are running Win2k or NT4.0 there is still hope. Contig is a free defrag program that I describe on the defrag page. diskpart (XP only) Use this command to manage your disk partitions. This is the text version for the GUI Disk Manager. driverquery (XP only) Produces a list of drivers, their properties, and their versions. Great for computer documentation. fsutil (XP only) This is a utility with a lot of capability. Come back soon for great examples. getmac (XP & 2000) This command gets the Media Access Control (MAC) address of your network cards. gpresult (XP & 2000) This generates a summary of the user settings and computer group policy settings. ipconfig (XP, 2000 & NT4.0) This handy tool displays IP settings of the current computer and much more. netsh (XP & 2000) A network configuration tool console. At the 'netsh>' prompt, use the '?' to list the available commands and type "exit" to get back to a command prompt. openfiles (XP Only) Allows an administrator to display or disconnect open files in XP professional. Type "openfiles /?" for a list of possible parameters. Pathping (XP & 2000) A cross between the ping and traceroute utilities. Who needs Neotrace when you can use this? Type "pathping " and watch it go. recover (XP & 2000) This command can recover readable information from a damaged disk and is very easy to use. reg (XP & 2000) A console registry tool, great for scripting Registry edits. schtasks (XP only) A newer version of the AT command. This allows an administrator to schedule and manage scheduled tasks on a local and remote machines. secedit (XP & 2000) Use this utility to manually apply computer and user policy from your windows 2000 (or newer) domain. Example to update the machine policy: secedit /refreshpolicy machine_policy /enforce To view help on this, just type secedit. sfc (XP & 2000) The system file checker scans important system files and replaces the ones you (or your applications) hacked beyond repair with the real, official Microsoft versions. shutdown (XP & 2000) With this tool, You can shut down or restart your own computer, or an administrator can shut down or restart a remote computer. systeminfo (XP only) Basic system configuration information, such as the system type, the processor type, time zone, virtual memory settings, system uptime, and much more. This program is great for creating an inventory of computers on your network. tasklist (XP only) Tasklist is the command console equivalent to the task manager in windows. taskkill (XP only) Taskkill contains the rest of the task manager functionality. It allows you to kill those unneeded or locked up applications. ----E ----H ----E ----T - Tutorial 04 - Batch Files DOS _tutorials 2005-02-17 22:16:45 ----O 0 0 0 ----E ----D ----E ----C ----E ----H ----E ----T - Tutorial 05 - Utilities DOS _tutorials 2005-02-17 22:16:45 ----O 0 0 0 ----E ----D ----E ----C bat2exe converts batch files to EXE files ----E ----H ----E ----T - Tutorial 06 - XP Changes to DOS DOS _tutorials 2005-02-17 22:16:45 ----O 0 0 0 ----E ----D ----E ----C MS-DOS commands were changed in XP - some changes, some deletions. Functionality of these commands were changed. Changes code pages for all Command Prompt windows. Command-line options /1 and /8 are not supported. diskperf No longer needed to act upon a server computer. You can still use diskperf for remote administration. Command-line option /1 is not supported. Available for all character-based programs that accept buffered input. Doskey has been improved by a series of enhancements. Supports 1.44 MB floppy drive only. 20.8 MB floptical (magneto-optical) drive is no longer supported. Command-line options /b, /s, /u, /1, /4, and /8 are no longer supported. The caret (^) and ampersand (&) symbols can be used in a volume label. The mode lptn[:][cols=c][lines=n] and mode lptn[:][c][,[n]] syntaxes are not supported. Command-line options /b, /c, /m, /p, /q, /s, /t, and /u are not supported. New character combinations enable you to add ampersands ($a), parentheses ($c and $f), and spaces ($s) to your prompt. Recovers files only. New /s command-line option deletes directories that contain files and subdirectories. Does not require TEMP environment variable. File size is unlimited. New /g command-line option creates decrypted destination files. Unavailable MS-DOS Commands assign Not currently supported. backup Not currently supported. choice Not currently supported. ctty Not currently supported. dblspace Not currently supported. deltree The rmdir /s command deletes directories containing files and subdirectories. For more information about the rmdir command, see Rmdir dosshell Function is now inherent. drvspace Not currently supported. emm386 Function is now inherent. fasthelp Not currently supported. Use the help command at the command prompt. For more information about the help command, see Help For a complete list of command-line tools, see Command-line reference A-Z fdisk Not currently supported. Use the diskpart command, which enables you to manage disks, partitions, or volumes. For more information about the diskpart command, see Diskpart include Multiple configurations of the MS-DOS subsystem are not supported. interlnk Not currently supported. intersrv Not currently supported. join Increased partition size and an improved file system eliminate the need to join drives. memmaker MS-DOS subsystem memory usage is automatically optimized. menucolor Multiple configurations of the MS-DOS subsystem are not supported. menudefault Multiple configurations of the MS-DOS subsystem are not supported. menuitem Multiple configurations of the MS-DOS subsystem are not supported. mirror Not currently supported. msav Not currently supported. msbackup Use the ntbackup command for computers with tape drives, or the xcopy command for computers without tape drives. For more information about the ntbackup command, see Ntbackup For more information about the xcopy command, see Xcopy mscdex It is unnecessary to configure the MS-DOS subsystem to use CD-ROM drives. Windows XP provides access to CD-ROM drives for the MS-DOS subsystem. msd Use the System Information snap-in. To start System Information, click Start, click Run, and then type msinfo32. numlock Not currently supported. power Not currently supported. restore Not currently supported. scandisk Not currently supported. Use the chkdsk command, which enables you to create and display a status report for a disk based on the file system. Chkdsk also lists and corrects errors on the disk. For more information about the chkdsk command, see Chkdsk smartdrv Caching for the MS-DOS subsystem is automatic. submenu Multiple configurations of the MS-DOS subsystem are not supported. sys Windows XP does not fit on a standard 1.2 MB or 1.44 MB floppy disk. undelete Not currently supported. unformat Not currently supported. vsafe Not currently supported. ----E ----H ----E ----T Delete all files in a directory without requiring confirmation DOS files-folders 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C echo y | del *.* ----E ----H ----E ----T Delete backup files DOS files-folders 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C del *.bak ----E ----H ----E ----T List all *.bat files in a folder DOS files-folders 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C @echo off for %%F in (c:\bat\*.bat) do call listall2 %%F ----E ----H ----E ----T List directories DOS files-folders 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C dir /ad ----E ----H ----E ----T List directory of drive a: (on screen) DOS files-folders 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C dir a:\ ----E ----H ----E ----T Go to root directory DOS navigation 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C cd \ ----E ----H ----E ----T Go up one directory DOS navigation 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C cd .. ----E ----H ----E ----T Make sub-directory and change to that directory DOS navigation 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C md %1 cd %1 ----E ----H ----E ----T Open current directory in Window DOS navigation 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C start .\ ----E ----H ----E ----T Print current directory DOS navigation 2005-01-09 00:27:13 ----O 0 0 0 ----E ----D ----E ----C dir > prn ----E ----H ----E ----T - Tutorial 01 - Overview Excel _tutorials 2005-02-17 22:16:50 ----O 0 0 0 ----E ----D ----E ----C Excel is an application, not a language, but it contains the Microsoft Visual Basic for Applications langauge. Please use the online code update (using the File > Import menu option) to check for new code releases. ----E ----H ----E ----T - Tutorial 01 - Overview HTML _tutorials 2005-02-17 22:16:58 ----O 0 0 0 ----E ----D ----E ----C HTML files are text files. HTML files contain information to be displayed, along with special instructions on how to display the information. An HTML file is read by a browser such as Microsoft Explorer which displays the content according to the instructions it finds. The instructions are called "tags", which usually come in pairs. An example of a tag pair is: Hello The is the starting tag and the is the ending tag. This particular pair of tags tells the browser to display the word 'Hello' in bold. Usually, an HTML file is saved with an extension of .html or .htm. Doing so in Windows enables you to double-click on the file name and have it opened in the web brower. Many people edit the files with the simplest of all text editors - Notepad - which is supplied with Windows. Specialty applications exists which provide HTML-specific features, including FTP of the completed files to the server. ----E ----H ----E ----T - Tutorial 02 - Basic HTML code HTML _tutorials 2005-02-17 22:16:58 ----O 0 0 0 ----E ----D ----E ----C HTML files typically consist of several basic sections, described by the following tags: HTML files may contain comments, which are bordered at the start and end as follows: HTML is not case sensitive. HTML ignores white space. ----E ----H ----E ----T - Tutorial 03 - Special Codes HTML _tutorials 2005-02-17 22:16:58 ----O 0 0 0 ----E ----D ----E ----C HTML uses codes to allow entry of special symbols, where direct entry of the special symbol may not provide desired the display result or which may not be be available on the keyboard. Some of the codes include: & < & ampersand < < < less-than sign > < > greater-than sign @ @ at sign     nonbreaking space ¢ ¢ ¢ cent sign © © © copyright ® ® ® registered trademark ° ° ° degree sign µ µ µ micro sign ¶ ¶ ¶ paragraph sign ¼ ¼ ¼ one-fourth ½ ½ ½ one-half ¾ ¾ ¾ three-fourths ----E ----H ----E ----T - Tutorial 04 - Tag overview HTML _tutorials 2005-02-17 22:16:58 ----O 0 0 0 ----E ----D ----E ----C Various tags associated with the HTML document structure include: Basic Tags Creates an HTML document Sets off the title and other information that isn't displayed on the Web page itself Sets off the visible portion of the document Header Tags Puts the name of the document in the title bar Body Attributes Sets the background color, using name or hex value Sets the text color, using name or hex value Sets the color of links, using name or hex value Sets the color of followed links, using name or hex value Sets the color of links on click Text Tags
 Creates preformatted text		
 Creates the largest headline		
Creates the smallest headline Creates bold text Creates italic text Creates teletype, or typewriter-style text Creates a citation, usually italic Emphasizes a word (with italic or bold) Emphasizes a word (with italic or bold) Sets size of font, from 1 to 7) Sets font color, using name or hex value Links Creates a hyperlink Creates a mailto link Creates a target location within a document Links to that target location from elsewhere in the document Formatting

Creates a new paragraph

Aligns a paragraph to the left, right, or center
Inserts a line break

Indents text from both sides
Creates a definition list
Precedes each definition term
Precedes each definition
    Creates a numbered list
  1. Precedes each list item, and adds a number
      Creates a bulleted list
      A generic tag used to format large blocks of HTML, also used for stylesheets Graphical Elements Adds an image Aligns an image: left, right, center; bottom, top, middle Sets size of border around an image
      Inserts a horizontal rule
      Sets size (height) of rule
      Sets width of rule, in percentage or absolute value
      Creates a rule without a shadow Creates a table Sets off each row in a table Sets off each cell in a row Sets off the table header (a normal cell with bold, centered text) Table Attributes Sets width of border around table cells
      Sets amount of space between table cells
      Sets amount of space between a cell's border and its contents
      Sets width of table - in pixels or as a percentage of document width or or
      Sets alignment for cell(s) (left, center, or right)
      Sets vertical alignment for cell(s) (top, middle, or bottom) Sets number of columns a cell should span Sets number of rows a cell should span (default=1) Prevents the lines within a cell from being broken to fit Frames Replaces the tag in a frames document; can also be nested in other framesets Defines the rows within a frameset, using number in pixels, or percentage of w idth Defines the columns within a frameset, using number in pixels, or percentage of width Defines a single frame - or region - within a frameset Defines what will appear on browsers that don't support frames Frames Attributes Specifies which HTML document should be displayed Names the frame, or region, so it may be targeted by other frames Defines the left and right margins for the frame; must be equal to or greater than 1 Defines the top and bottom margins for the frame; must be equal to or greater than 1 Sets whether the frame has a scrollbar; value may equal "yes," "no," or "auto." The default, as in ordinary documents, is auto. Prevents the user from resizing a frame Forms
      Creates all forms Creates a scrolling menu. Size sets the number of menu items visible before you need to scroll.