dans.blog


The miscellaneous ramblings and thoughts of Dan G. Switzer, II

Wow! 4GBs of DDR2 RAM for $92.99 (US)...

I can't believe how cheap RAM is right now. I was online shopping for a gift for my Dad and came across 4GBs of PQI DDR2 PC2 5400 RAM for $92.99. That's a pretty good way to cheaply upgrade a Development Workstation or Server.

Just 5 months ago I paid $120 for 1GB of DDR 500 (PC 4000) RAM to upgrade my Desktop box to 2GBs. I know I paid more for that RAM because I had to match the older, high performance RAM I already had in my system, but I just can't believe you can get 4GBs of RAM for under a $100.

I remember paying almost $400 dollar to get 16MBs of RAM in my old 486 PC (it was four, 4MB SIMM sticks.) That was at a time when 16MBs of RAM was a huge amount of RAM and DOS and Windows for Workgroups still ruled the PC world. I eventually jammed all that RAM into a Promise EIDE Caching Controller card as RAM got cheaper and I needed more RAM for Windows 95.

If you're looking for a cheap way to upgrade the performance on your computer, you might think about buying some RAM now. If you use VMs or have a Development Server where you have lots of services running (like SQL Server and multiple versions of ColdFusion,) adding RAM can really help your performance.


Searching for an Eclipse Color Picker...

I was trying to find an Eclipse-based color picker that worked as a view this afternoon. I can't believe nobody has created one, but from the looks of my Google searches no one has. It would really be great to have a color wheel with the features of Adobe's Kuler available right from Eclipse.

If anyone knows of a really good color swatch/picker for Eclipse, please let me know.

However, I did come across ColorCop in my search—which I'm going to try out and see how it works for me. There's no installer and it's free, with an option to donate via PayPal if you find the program useful.

more…


WinMerge is a great Open Source Diff tool

In the past I've blogged about some free Windows-based Diff tools—like ExamDiff. However I recently came across WinMerge—an "Open Source visual text file differencing and merging tool for Win32 platforms."

I've only been playing around with it for a couple of days, but I'm very impressed so far. It does a very good job visualizing the differences in files and has a lot of configuration options (such as how to interpret whitespace.) You create patch files, merge the changes together and even compare folder contents.

The feature I really like is Windows Explorer Context Menu integration. The context menu allows you to select two files in Windows Explorer and right-click and select the "Compare" option and instantly get a diff from those two files. There's also an option called "Compare To" which allows you to select a single file and then you can explore to another folder highlight a second file and select the "Compare" option to compare those two files. I really like this option. For me this is generally much more convienent than open the program and using an "Open" dialog to compare two files. I just find when I need to compare two files and I'm not already in Eclipse, then I'm probably looking at the files in Explorer—so the context menu integration is extremely convienent.

more…


Invoking Components (CFCs) with a relative path

Back in March of 2003 I posted a UDF which allows you to initiate a CFC from a relative path. Anyway, since it's been over 4 years at 2 major releases of ColdFusion, I just wanted to let everyone know that this UDF does indeed still work in ColdFusion 8.

While it is a hack and I can't guarentee it won't cause server problems, I can say I've been using this in production code since I wrote the UDF and have never found a problem.


Configuring Windows Authentication with Apache 2.2.x and Subversion

I've been working on our development server at work to try to help streamline some process. This included upgrade Subversion and Apache to the latest versions and installing Trac (so we can better track software issues.)

In order to really simplify being able to give developers and contractors access to the appropriate areas, I wanted to try and simplify the process by configuring Apache to use Windows Authentication. This allows us to control who has access to what, just by making them members of the appropriate groups.

Since I'm new to Apache, this whole process has taken longer than what I wanted—but I certainly learned a lot in the process.

more…


Running IIS and Apache on the same Windows 2003 server

Today I was working on server and need to run Apache v2.2 and IIS6 on the same Windows 2003 server. Whenever I would try to start the Apache service with any Virtual Host and listener configured to port 80, it would give me an error like the following in the Windows Event Viewer:

The Apache service named reported the following error:
>>> (OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 127.0.0.1:80 .

It was then followed up with another error message:

more…


Using CFMAIL to send attachments stored in memory

Awhile back I was looking for a way to send e-mail attachments in CFMX without writing data to disk. That solution uses the Javamail API to directly send a e-mail with attachments to an SMTP server. This method also completely bypasses the CF mail spool.

Charlie Arehart linked to the article from an article he wrote about storing CFDOCUMENT and CFREPORT contents in a variable. In the comments on his post, Jon Wolski posted a solution that uses the built-in ColdFusion tags CFMAIL and CFMAILPART. So, I thought I'd re-do my original example using Jon's technique in this post—just so you can see an example of both methods.

Below is some source code that will show you how to use the CFMAIL tag to send a multipart message that contains:

more…


Generate PDFs from within Flex

I came across a post today on Ryan Stewart's blog about a Flex project called AlivePDF created by Thibault Imbert.

In a nutshell, AlivePDF is a Flex library for creating PDFs completely within Flex. Thibault has blogged an example of how easy to save PDFs using the library.

Pretty cool stuff...


Google's JSON library...

As part of Google's Caja project, they have released a JSON library (for JavaScript) that looks like it's very solid. For more information on the Caja project, check out this Ajaxian article.


IE6/Flash Field Focus Problem

A user reported to me a strange behavior with IE6 and Flash that I've never noticed. If you're using IE6 and there's a SWF on the page when you go to another Application Window and came back to IE6, if the cursor was placed in any text box, the focus will be lost.

The quickest way to verify this bug is to go to the Adobe website and place your cursor in the "Search" box at the top of the page. Now ALT+TAB to another Window. Now ALT+TAB back to IE6. You'll notice the cursor is no longer in the search box.

Now, if you do the same test on the Google website you'll notice this behavior doesn't exist.

more…


Expiring Session via AJAX using HTTP Response Headers

Raymond Camden recently asked on his blog How can you timeout a session in an Ajax-based application?. Most of the comments on the entry relate to doing some kind of server-ping, but my suggestion would be to just let your application tell your Ajax code when the session actually expires.

The concept is to use HTTP response headers to inform your Ajax request when the session has actually expired. This allows you to do everything in one single call, without having to worry writing other code. Besides you should be adding some failure code to your Ajax calls anyway, so this fits right in with good Ajax practices.

There are two basic approaches you can take. Using a "custom" response header or sending back HTTP status code to indicate the user is no longer authorized to view content.

more…


ColdFusion 8 Released!!!

I really was convinced they'd wait until 8/8 to release it, but Adobe released ColdFusion 8 today. There are lots of new features in ColdFusion 8—a few of which everyone has been waiting years for (image manipulation, programmatic threading, per Application settings—such as mappings!) Adobe's also worked hard to make creating AJAX applications faster and easier by providing lots of built-in tags that make use of the Yahoo! User Interface (YUI) library (as well as many other DHTML/AJAX libraries.)

If you haven't played with the betas, you should definitely download ColdFusion 8 Trial or Developer Edition and fire up your favorite virtual machine and give it a test drive. Lots and lots of new functionality to explore—and oh yeah, it's much, much faster.

Download ColdFusion 8


ySlow? Well find out with Yahoo!'s new Firebug plug-in...

Yahoo! has just released a new Firebug plug-in called ySlow. I just finished installing it and playing around with it for a few minutes and it definitely looks like it could be one of those must have web developer tools. It provides the following:

  • Performance report card
  • HTTP/HTML summary
  • List of components in the page
  • Tools including JSLint

The Performance Report card is pretty slick. It provides lots of tips on improving performance—such as ways to minimize HTTP requests, removing duplicate tags, adding expiration headers, etc.

more…


MSSQL: Recompiling views and stored procedures

Occassionally you come across something in a language you never knew existed, but always needed. Today I discovered a stored procedures included in MS SQL that I didn't know existed, but in the past have just used work around for.

Today I discovered the sp_refreshview stored procedure which updates "metadata for the specified non-schemabound view." In plane english that means if you've made changes to your tables that invalidates the view, it should refresh the view (this is problem if your view uses a select * from table—which should be avoid at all costs.) In the past I've always just done an ALTER VIEW to refresh the view—not very elegant, but it worked when I needed the view to pick up changes in the schema. This stored procedure provides to do the same thing.

For a simple explanation of the sp_refreshview see Vadivel's post on "Sp_refreshView explained..."

more…


Apple releases Safari for Windows v3 Beta 3 Today...

Apple has released a beta version of Safari 3 today. The biggest news is that it includes a Windows version of Safari. Hopefully they're aren't substancial differences between the Mac & Windows versions. I'll be glad to finally be able to test sites in Safari, without having to get to a Mac.

Go get Safari v3 for Windows (Beta) now.