Skip to main content

Posts

Virtualization

I’ve been interested lately in using virtualization to setup a “computer” to do local web development on. I’m looking to configure it it closely as possible to my paid hosting, so that it will be as easy as possible when I take a project and migrate it over to to the host. If you haven’t had any experience with virtualization, it’s basically a way of running an operating system inside whatever operating system you are currently using. The nice thing about it these days is that more recent processors have hardware extension to improve performance to the level where it’s quite usable. The software mimics all aspects of a basic computer with standard hardware. So you take your operating system install disk and go through the process as you normally would. I am currently using Windows Vista Ultimate x64. So looking at the easiest option, I downloaded and installed Microsoft’s free “Virtual PC 2007” program. I’ve used it...

PHP, IIS, and NetBeans

It’s been while since I have used the language, so I thought it would be fun to try making a few new ideas with it. I did a quick search to see what PHP IDEs were available.  I’ve used Eclipse quite a lot, but I’m not particularly fond of it, so I wanted to try something else. I plan on giving NetBeans a chance to see how it fairs. http://www.netbeans.org/features/php/ Seeing as I am currently using Vista Ultimate 64-bit, I decided to just use IIS. I had a few quips getting it working. I had modified IIS beforehand when I was doing some old VbScript coding, so needless to say when I tried installing PHP it didn’t work out of the box. In the IIS configuration program (use the start button search in vista on “InetMgr”): Install PHP as a ISAPI filter. In your selected application pool advances settings, make sure that “Managed Pipeline Mode” is set to “Classic” mode. In the list of global settings: Add a default document “index.php” In ISAPI Filters, add a new filter that points to (...

Getting ASP With JET Access Working On 64-bit vista

There are quite a few issues in getting classic asp scripts working on vista. I want to quickly go over what I did, so that when I need this information available in the future I have an easy place to find it. So to save time I am just trying to get this written as fast as possible and continue on with my work. Sorry for any typos. Install IIS through control panel -> programs and features -> (left panel) “turn windows features on or off” Once the feature listing window populates: expand the “internet information services” item check web management tools and world wide web services …really I went through the options and selected the majority of them. Key ASP related items to make sure you have selected: “world wide web services” -> “application development features” -> ASP I needed windows authentication, so I needed: “world wide web services” -> “sercurity” -> “windows authentication” After tha...

Visual Studio 2005 and Bad Tabulation

I have a dual screen setup with two 20″ Dell LCD screens. I recently changed my primary screen to be vertically orientated. The benefit here is that I can see a more “global” view of the source file I am currently editing. The irritating thing I stumbled upon was tabulation in Visual Studio. I changed my tabs to be 2 spaces instead of two (to make up for my primary screen having less horizontal space). The issue that I had was all old source files were stuck with 4 space tabbing. Here is what I did to fix the issue: Tools>>options (make sure “Show all settings” is checked) Navigate to Text Editor>>All Languages>>Tabs In the Tab box, change the tab size to 2 and indent size to 2 select “ Keep tabs ” (this tells visual studio to not change tabs to spaces) Okay, so now the editor now uses two tabs and I can manually fix code I made before using shift-tab . This doesn’t solve my issue of having old source files stuck with 4 spaces as one tab. What I just figured out ...

Getting .NET COM Interop DLLs Working

I recently finished working on a macro program where the software’s interface is COM.  Everything worked great until I wanted to transfer the macro over to a test client computer.  The program I was writing the macro for requires some registry entries, so I assumed that was all I needed to do.  After about 2 hours of having issues I figured out how to get the macro working on computers other than the one I developed the macro on. What happens automatically when developing COM innerop projects in Visual Studio is that the IDE automatically registers the DLL file behind the scenes, so when the program that is going to use the macro starts up, it can find the DLL file (assuming the “register for COM Interop” is checked in project properties). When transferring over the macro DLL(s), the client computer does not have the correct registry entries, so when the program attempts to load the macro, it will fail because it can’t find the macro DLL(s). Things I learned: regsrv does ...

Working with Regular Expressions in C#

I’ve been working on a program that needs to parse a html file for form data.  So when I was deciding what method to use, a few popped right into my mind. The first being a character by character search through the string.  Parsing through the data and flagging sections that fit the signature of what was being searched for. The second would be automating that by using the built-in string functions to split up the string and drill down until the needed data was extracted. The third, and one I chose to use, was with regular expressions.  This in my mind is the most “poetic” method of the three, which would allow me to make the a robust and reliable function. While I’ve used regular expressions a lot throughout the years. I never seem to remember enough to construct a decent statement. I had recently bought a pocket reference (link below), so I used that to get a statement constructed. It had a total of about 6 pages for C#, but I pretty much got what I needed from it. An...

Esprit Macro With .NET

Edit: I’m having some issues with a second tutorial, so at this point I don’t think this process below is correct.  2nd Edit:  This code should work fine, the issue was when I started using COM objects from Esprit.  There are a few gotchas that need to be taken care of.  I think the primary reason I had issues was due to writing the macro in C# instead of VB (the language the Esprit tutorials have).  I may be writing about it in the future.  If you are interested right now, send a message, or post in the forums. This post will be a little more special interest them most of my posts. I recently started learning how to create macros for a program called Esprit (D.P. Technology). It’s a “CAD/CAM” program. They still use COM/VBA as their plug-in interface, so to write a plug-in in .NET there are a few things that need to be taken care of. Their tutorial that comes with the program goes over setting everything up, but It misses a few steps. Well more likely...

Working With the XML DOM

I’ve been working with server side scripts that rely on xml files to define the structure of the site.  It seems quite fast compared to using a database and also makes direct changes to the structure easy.  My post here is about how to use the DOM in VBSCRIPT/ASP.  Some aspects of how the DOM works are a bit “wiggy” in my opinion, but I’ve figured out a lot of it so far. Here is a quick example on how to parse a file (VBSCRIPT/ASP): function parseXmlFile(filename, byRef emptyVarToFillWithXmlObj)     dim completeFilePath, functionSuccess, filePointer          completeFilePath = getFullPath() & filename          ' Convert the xml file into an xmldoc object     ' First check to see that the file exists     set filePointer = server.createObject("Scripting.FileSystemObject")     if filePointer.fileExists(completeFilePath) then         ' Initialize the xml object ...

Site Revamp Details

Here is a screen shot of the old site.  It served me well for the two years or so that I had it running on blogger.com.  The great thing about blogging is that I can save bits of important information in one place that I can later come back and utilize. The secondary benefit is that other people can also gain something from my writings as well. Now that I’ve taken the plunge to into the world of incorporation, I have had a strong desire to improve my web presence.  My first project being this website revamp. Here is a list of the steps necessary to get from blogger to a custom wordpress blog: – Install wordpress on my computer’s local server ( WAMP ).  This is quite easy if you have messed around with developing websites before.  The major steps to that are 1. create a database (wamp has phpMyAdmin preinstalled, so doing SQL stuff is easy) 2. create a new SQL user that has permissions on the new database.  Once the database is setup, extract the wordpress ...

Silverlight 2.0

I was at a monthly .NET usergroup meeting yesterday. Larry Clarkin ( http://larryclarkin.com/ ) was there, and he was kind enough to give out quite a few copies of Visual Studio 2008. I was one of the ones who needed a copy. Never had the justification to buy it personally. Actually I am using 2005 at work too, but anyways… He talked about Silverlight 2. It has quite a few unique features that make it interesting enough to start “playing” around with. The most interesting aspect to me is the subset of the .NET framework embedded into the Silverlight runtime, which in turn means you can write Silverlight programs in C#/VB.NET (as well as a few other languages). Another plus is that it has built-in form controls. Put those two together and it could be interesting to make some rich web applications with not much difficulty. All this time I though it was just a Flash clone. Check out silverlight.net for more of the specifics.