Tip Bank

DevX - Software Development Resource

Use the CASE Statement in a SQL SELECT Clause

SQL Server provides a mechanism for returning different values in a SELECT clause based on Boolean conditions: the CASE statement. This statement resembles Visual Basics Select Case statement. The SQL

DevX - Software Development Resource

Store XML in C++ Source Code

XMLwhen it is in ASCIIcan be stored as any other literal in one line, but it’s not very readable. Use the following macros to store XML (or any other string

DevX - Software Development Resource

A Better Way to Stop an IP Address From Accessing Your Site

A more elegant approach: use an associative array. If you have more addresses to block, put them together (in this example, using CGI and Perl): #!perlmy %block_ip=(‘172.56.260.71’=>’bad.org’,’172.56.260.72’=>’evil.org’,);my $remote = $ENV{REMOTE_ADDR}

DevX - Software Development Resource

ClearRunHistory – Clearing the Run history

‘ Clear the Run History’ The MRU list is kept available until Explorer is restartedSub ClearRunHistory() Dim keyName As String = “SoftwareMicrosoftWindowsCurrentVersionExplorer” _ & “RunMRU” ‘ delete the key that