Results for "Volume: 6_2008-2009"
Want to send SMTP email from your ASP app? CDONTS is a free e-mail component that comes with IIS4, that (despite its weird name) is very easy to use and has good performance. The setup actually takes longer than the trivial scripting. To set it up, first, make sure you have installed the SMTP service. It is installed with IIS by default, but if you've messed with your settings, you may ahve to reinstall it. Check that the SMTP service shows up in the services part of the control panel and that the file CDONTS.DLL shows up in your System32 directory. Then using the following code. Don't forget to substitute the email address you want to send to for someaddress@someplace.com, which appears twice in the code).
Looking for faster performance? If you have an older database driven ASP app, it probably uses an ODBC DSN in its connection string to reach the database. It probably looks alot like this: "DSN=myDSNName;". If you see this you should immediately upgrade the code to ADO/OLEDB--Microsoft's new standard. Not only will this help you keep the code current, but it will run faster and take up less memory. Below are the connection strings for OLEDB/ADO for both Access and SQL Server--the two most common databases for IIS platforms. If you are using another database, you'll need to consult your db's ADO Provider's documentation for the proper connection string.
PART 1/2: GAME ENGINE *********************************************** I've just added a few more features to yesterdays submission and compacted it a bit so I can post it here. The man now can face eight directions with ten frames in each direction and looks a lot nicer. Sorry to those ppl who want DX, but this is (at the moment) a purely BitBlt run engine. Does anyone else get slow framrates (ie less that 50?) if so could you post a message. ********************************************** This demo shows a few new features in my Envision2d Graphics Engine (BETA 3) The man (animated) walks around the screen which scrolls behind him. It uses the Bitmapped Font(for the text), TileSet(grass) and ZOrder(trees and man) classes of the engine. I have had this running at 160FPS on a 1GHz! (It has been limited to about 80 to prevent lockup). This is without ANY buffering. each tile and tree is drawn 80 times a second. Each element (trees/man) is sorted every loop, so they will always be drawn in the correct order. This demo is simply to show how eaay (and fast) the engine is to use. The movement is based entirely on the KeyPress event (very evil) and this does detract from the smothness a bit. If you like it give us a vote and any suggestions/complaints/comments would be appreciated.
Program inputs a string & prints it out backwards to a file. Found at http://users.neca.com/jboxall/ja05002.htm
If you have a large amount of data to give to the user as HTML and this data needs to change once a day then this will speed up the process for the user. The following code will create a file the first time a page is hit for each day. The upside of doing it this way is you have a record of what the use saw on any given day. The downside is the first person takes the performance hit to write the page and you need to check to make sure the user came to this page first. In other words, if they save yesterdays page as a fovorite then they will see old data unless you redirect. I used the month and day to handle this problem. I did not use the year. There are many other ways to handle this problem. http://www.truegeeks.com/asp/mam/osdoc/osframe.asp
Validates whether a given hard/floppy/network drive is valid
Determines if a file exists Improved version--detects hidden files too!
2D Array Implemented as a Queue. http://users.neca.com/jboxall/ja05007.htm
Sort ListView on ColumnClick (Implements IComparer). Handles different data types (Text/Numeric/Date) and CultureInfo settings.
You can cause a page to automatically refresh every n seconds using the HTML Meta Refresh. This is great for chat sites, real time monitoring sites or any other site where you must have up to date real-time information. This example will reload itself every 5 seconds and display the current time. Note: Replace the name test3.asp with whatever name you call this script.
Uses the new file FileSystemObject in the scripting library to list all the files in the c:\inetpub\scripts\ directory with a link to them. You can modify this code to list all the files in any directory.
If you have the need to filter out certain users from your site (hackers, unauthorized personel, etc.) and you know their IP address, you can use this code to do so. It detects the IP address of the current user and based on what that address is, takes action. Of course, you need to replace the IP address and the action in the code with whatever you would like to do...
This program takes the input of a Postcript file, converts the codes in it to plain text which is displayed and re-directable. http://www.cs.latrobe.edu.au/~yuand/ansi_c/index.html
Simple Example on How to Setup a Data Reader for SQLOLEDB in VBNET.
Create a form that will submit a URL to the search engines. Submision to 24 search engines is supported. The code includes both a form and a response file. Both may be customized. This first form should be placed in any .asp file. The 2nd file must be save as "submit.asp" in the cgi-bin directory. http://www.submitside.com/script/submit/aspsubmit.html
Slowpipe allows the restriction of bandwidth on a modem network connection where a Unix pipe may be used. It was written to address a problem for users of a small network connected to a larger network with a low bandwidth connection. If you use such a connection for both interactive work, and transfer of large files it is possible that using programs such as ftp will consume all available bandwith, making the use of terminal emulators, X-windows etc., near impossible until the transfer is complete. Slowpipe is a simple pipe filter intended to pass all characters through unchanged, but to limit the transfer rate. It does not however have any special knowledge of TCP/IP or other protocols. You may wish to change the packet sizes to multiples of the MTU to your host network for optimal performance if you are able to establish this. The default values though have been found to work satisfactorily on more than one network. The ideal solution is to reconfigure the router to your host network to restrict bandwidth on specific ranges of TCP/IP port numbers though this was not possible in my case. Slowpipe has been tested under Linux and AIX and appears to perform as expected - though I offer no guarantees as this is free software. The user of the software must test their build. No liabilty shall be accepted for failure to perform as expected or consequential damages. I emphasise that this is a simple solution and better solutions may exist - but it solved our problem. http://www.birdsoft.demon.co.uk/proglib/slowpipe.htm
The global object Mouse, which is of type TMouse, contains information about the mouse. The object Mouse has several properties and one method I'll discuss here. For more properties and methods look in the Delphi help file, I will only discuss one method that is only present in TMouse, and not the methods that are derived from TObject.
This Example will Demonstrate how to use the OLEDBConnection, OLEDBDataAdapter, OLEDBCommand and DataSet Objects -Querying/Adding/Updating a Access 2000 Database. Uses System.Data.OLEDB Namespace and the Listview Control. Any Suggestions drop me a Line
Here is an example showing how to use the Component Template. You will find it under 'Component' on the Delphi menu. Component Templates are very handy, yet very simple to use.
This simple code will write to the windows Event Logger, which can be read by going into Control Panel > Admin Tools > Event Logger. Useful for diagnostics after compile time, when you have no debug window. YOU NEED TO ADD THE 'EVENT LOG' CONTROL FROM THE 'COMPONENTS' MENU TO YOUR FORM!