Remove Unwanted Projects from the Visual Studio Recent Projects List

How to remove unwanted projects from Visual Studio recent project lists.

The Visual Studio development team doesn’t seem to realize that people sometimes open a project with the same name as another. I say this because they don’t provide a way for users to remove projects from the recently opened project list. This can be particularly irksome if, for example, you normally only work on the development version of a project but you open the production version once and from that point on you have two identical project names in the list.

Until they incldue this function in visual studio, if you’re using VS.Net 2003 you can download Laudeci Oliveira’s
VS Recent Project List Cleaner
, which removes recent project list entries from your registry. For the beta versions of VS 2005 (Whidbey), it’s even easier to get rid of unwanted projects – just delete them from the “My Documents\Visual Studio 2005\Projects” folder.

Reverse DNS Lookup from ASP.Net

My client needs to be able to restrict page content based on the client machine name on their intranet site. I knew that you could get the IP address from the REMOTE_HOST HTTP header, and some exploration of the System.Net namespace revealed that you can use the System.Net.Dns.GetHostByAddress method to perform a reverse DNS look up to get the machine name. Here’s a VB.Net example:

Dim strIp As String
Dim he As System.Net.IPHostEntry
Dim strHostName As String
strIp = Me.Request.ServerVariables("REMOTE_HOST")
he = System.Net.Dns.GetHostByAddress(strIp)
strHostName = he.HostName

Geocoding without GIS Software

I can’t believe this blog has been up for 5 months, and I haven’t posted anything about GIS – since I come from a GIS programming background. It is even more telling that this post is about how to get around using GIS software by using ASP.Net, SQL Server, and the Google API to geocode addresses!

Check out this post about Geocoding with SQL Server on John Sample’s (is that his real name?) blog.

Listmania

I’ve been looking for a reliable CSS horizontal list to replace single row tables for layout of things like navigation menus. So far, though, I haven’t trusted a lot of the ones I’ve seen on the web to work in most browsers. That is, until I found Listmaniac’s browser support chart, which identifies browser compliance for plenty of horizontal and vertical list styles. Best of all, it includes the suorce code for each list!

Automate FTP with Command Line Switches and Parameters

I have been assisiting my client in troubleshooting an application problem that occurs daily. Technical support has required us to send them an updated log file each day. I wanted to set up a batch program that I could schedule to run daily that would execute the necessary FTP commands to send the file to them automatically.

I found the solution in this article onMS-DOS FTP command line arguments and commands. FTP has a -s switch which can be used like the > redirect to specify a command file to automate a series of FTP tasks. You can then use Windows Scheduler to execute FTP with the command line switch to read the series of commands from your command file.

  1. Save the series of FTP commands (one on each line) as a text file:
    open [hostname]
    [username]
    [password]
    ascii
    put [filename]
    disconnect
    bye
    
  2. Create a batch file that executes FTP from the command line with the -s switch:
    ftp -s:commands.txt
  3. Use Windows Task Scheduler to execute the above batch file at whatever interval is necesary

Write Application Errors to the Oracle Alert Log

My relational database experience is primarily in SQL Server, and when developing applications using PL/SQL stored procedures in Oracle I keep wanting to be able to write errors to the equivalent of the Application Log of the Windows Event Log. Until recently, I have just been publishing errors to a table I set up in Oracle. However, this article shows how you can write to Oracle’s alert log from a stored procedure in Oracle.

Copy a Schema in Oracle

I don’t know why I found it so hard to find a straight answer to the following question:

How do you copy all the objects of a given schema to a new schema in the same Oracle database? Or, more simply, how do you make a copy of a schema in an Oracle database?

The short answer is that you use the export/import command line utilities EXP and IMP. Most examples show how to copy a schema from one database to another, but in my case, I wanted to make a copy of the schema within the same database. I ended up discovering that the IMP command can take FROMUSER and TOUSER arguments that allow you to specify which schema objects should be copied from, and which schema to copy those objects to. Here’s the procedure I used:

  1. Create the user/schema that you want to copy the objects to
  2. Use the EXP command to export all the objects from your source schema
  3. Use the IMP command with the FROMUSER/TOUSER arguments

One thing to keep in mind is on what tablespace the copied database objects will be created on. In my case, I wanted them created on the new user’s default tablespace as opposed to the tablespace that the source objects were created on. To do this, simply set the import user’s quota on both the original tablespace(s) and the system tablespaces is 0:

alter user [import_user] quota 0 on system;
alter user [import_user] quota 0 on [orig_tablespace];

For more on using the export/import commands, see the Oracle documentation.