Delete all the temporary files from Internet Explorer’s cache folder using basic methods available in the System.IO namespace.
Pronounceable Random Password Generator
This piece of code generates a random password of the specified length, but mixes the two sets of letters so that a pronouncable password is being generated.
Validate String For Positive Integer Values
A very simple way to validate a string for positive integer values using C# and regular expressions.
What is the difference between Windows Authentication and SQL Authentication?
If you are new to the Microsoft SQL Server environment, you probably encountered the possibility to choose between Windows Authentication and SQL Authentication. SQL Authentication SQL Authentication is the typical authentication used for various database systems, composed of a username and a password. Obviously, an instance of SQL Server can have multiple such user accounts […]
How do I get the visitor’s IP address?
There are two possible ways, either using: or using Furthermore there is information that the below line retrieves the actual IP address and not the Proxy: However this hasn’t been tested yet.
Display Time That Passed Since a Date
Calculate the time that has passed since a specified Unix formatted date and time, and show it in a human readable format, all in a PHP function.
How to get a list of SQL Server databases
There are multiple ways of getting a list of the SQL Server databases, the easiest one is to execute the sp_databases stored procedure, like in the example below: Don’t forget to change the connection string to match your server details (IP, userid and password).
How to pop up the Print dialog from a web page
You can very easily pop up the Print dialog using a JavaScript call to a function. The following code works in all major browsers, including Internet Explorer and Firefox:
How to improve the performance of your for loops
Instead of the typical: Use: Because instead of checking the length of the array each loop and comparing it to i, it stores it in a variable arrLen, which is then compared at each loop with i. This saves a few milliseconds, since checking the array length requires slightly more processing power.
How to have PHP show the errors within the current script
Before the PHP code starts, add the following lines: These two lines set script-wide variables that will allow the errors in your current script to output to screen.