CMXtraneous

Right on the edge of useful

THINGS ACTION ADVENTURE MOVIES HAVE TAUGHT ME:

Posted Wednesday, November 30, 2005 11:23:42 PM by Chris Flick

Chris Flick

Hello everybody. Today, I thought I'd write another movie-related blog since I've seen so many over the years. But I thought I'd do something a little bit different. I thought I would list all of the wonderful knowledge I have accumulated over the years thanks to Hollywood. Consider this a "Guideline to life according to Hollywood (and Chris Flick)".

THINGS ACTION ADVENTURE MOVIES HAVE TAUGHT ME:

1) If you're going to be a bad guy, you must have a British accent.
Preferably, to be REALLY bad, you should also be German but have a British accent.

2) When approaching your car, you should always drop your keys to the ground.
I mean, seriously, how else are you going to notice the blinking red light of the bomb that's been planted underneath your car?

3) Bad guy uniforms always come in a "one-size-fits-all"...
After all, that's why it's so easy to penetrate the evil bad guy's lair.

4) Pistols or hand guns are better weapons then automatic rifles.
Everyone knows when bad guys shoot automatic weapons, they don't hit diddly-doo-doo, but our hero always hits his target with his trusty hand gun.

5) Always make sure you have a full arsenal of bullets.
Bwwwwhahahahahahahahahahahaha! Seriously??? Bullets? I'm sorry. I didn't mean to say that out loud. Everyone knows there's no such thing as handguns needing reloading in an action/adventure film.

6) Run - don't walk carefully - through a booby trapped Aztec temple.
If you run, none of the booby traps will affect you - especially after you have replaced a statue with a bag full of sand. But if you carefully try to crawl through the booby traps, that's when you get hit by the poisoned darts.

7) Macs rule!
In the Hollywood-world, Macs are the dominant computer/operating system - especially when it comes time to infect an unstoppable alien race by infecting their mother ship with a virus. But... if Macs don't get viruses, how can they transmit one... never mind., You heard NOTHING!!! NOTHING, I say!

8) Worst bad guy mode of transport? A helicopter.
If you're in the city, your helicopter will always touch electrical wires. If you're in the desert, your pilot will always crash into the side of a mountain. As a bad guy, you should avoid helicopters at all cost.

9) Need a car? Just flash a badge.
Everyone knows you're suppose to stop and surrender your car to anyone who flashes a badge in front of you.

10) Heck, it's only my pension. What do I need that for?
If you're a cop about to retire, you will always be talked into risking your career, your retirement, your reputation, your children's college tuition by breaking every rule and regulation you ever believed in because that's the only way to "get the bad guys".

:-)

-Chris

Category tags: Blogs and Blogging, CMX Suite, Midnite Madness, On the Personal Side, This and That

Deciding on what geek toy to get myself

Posted Tuesday, November 29, 2005 10:26:45 AM by Zoe Gillenwater

Zoe Gillenwater

It's time for me to get a new computer at home.  My trusty Gateway computer has served me well for the last five years, incredibly.  I've had to upgrade the OS from Windows ME (a horrible, horrible beast of an OS) to Windows XP (very nice), as well as add an additional hard drive and memory, but other than that it's been fine.  But, it's just too slow now. The problem is, I can't decide if I should replace it with another PC or with a Mac.

I need to buy a Mac either way for web page testing.  So I was thinking of just getting a MacMini for testing purposes, and upgrading the PC to a new laptop, with both sharing a monitor.

The thing is, I used to use Macs, and I love their operating system.  So I am tempted to switch to the Mac (a laptop) for all my design and development work, and just use the old PC for testing.  But, this would require me to get all new software for the Mac.  And, it seems as though Macs have more hardware problems than PCs, at least based on this blog post I stumbled upon today that scared me to death. Is this true?  I've never had any hardware problems with any of my PCs (one IBM and a couple Gateways), so this is a big turn-off for me.

As you can see, I'm pretty indecisive.  Any words of wisdom anyone wants to share? 

Category tags: On the Personal Side

Another New Toy

Posted Friday, November 25, 2005 9:10:22 AM by Jim Babbage

Jim Babbage

Well not exactly *new*, but I just finally had the opportunity to set up the inkjet printer I bought from Costco two months ago. It's an Epson Stylus CX7800. One of those "all-in-one" type printers. That in itself isn't anything special, but one of its features is very cool.

It has a film scanner built into it.

This is one of those things I have been wanting, yet humming and hawwing about for years. Film scanners used to be incredibly expensive. Some still are. Having shot film for so long, a film scanner has been on the wish list for quite some time. This particular model will scan up to 4 slides at a time or one strip of 5 negatives. It seems to have a maximum scanning resolution of 1200 dpi for film and slides, which is fine for my purposes.

You may be wondering why I waited so long. Well admittedly, cost was part of it. I had no burning desire to spend $2,000 on a film scanner when I could get images scanned from an outside source at reasonable prices. I also have limited space on my desk. It already supports two monitors, a fax/phone, general office supplies etc. SO I didn't really have the room for a scanner AND a printer. The Epson fit the bill in terms of footprint.

When I saw this Epson in Costco, it was listed at $199.00 (cdn). This in itself was a good price, but when I saw it scanned film, it became a VERY good price. Then I discovered that there was an immediate $60 rebate at the cash desk for it (now $139.00), AND if I bought a second set of ink cartridges, they'd knock another $15 off the printer cost.

I was sold, and it was bought.

I can scan reflective art, 35mm negs and slides, print (obviously) and it also features four media slots and a USB input for my digital cameras. The printer is designed to work without a computer connection for printing photos (even has a little LCD preview screen) and for copying.

One other thing I found very cool - although I've yet to use it; the printer can make an index print of all the images on your media card. You then review the index card, shade in a circle under the images you like, scan the index card and it will print out all the images that have the shaded circle! Kinda like having your own mini photo lab!

So far, I have printed a few images from my new(ish) Fuji S9000 digi-cam, and I've been quite impressed with the quality of the prints, even though I have done minimal (or no) post processing.

I also experimented with the film scanner yesterday. It has a couple quirks (do NOT rotate the images within the scanner software - bad things happen), but overall, the quality is pretty good. 

So essentially, I'm all set to make greeting cards, or frame-able 8x10 prints for Christmas presents. Look out, holidays - here I come!

Category tags: This and That

New extension for file comparison

Posted Wednesday, November 23, 2005 7:01:14 AM by Tom Muck

Tom Muck

In my last post I talked about Beyond Compare and using it to replace the Dreamweaver synchronization feature. It got me thinking about a missing feature in DW. I've been using file comparison programs for quite a while, but only recently discovered Beyond Compare. I used to use Windiff and had my own extension for Dreamweaver MX that allowed me to use Windiff to compare two files. Now that Dreamweaver 8 has the feature, the extension is no longer needed. . .or is it? Dreamweaver 8 has many cool file compare features, but lacks one I like to use: compare a file in your site with a file somewhere else on the system. I reworked the extension to address this. As an added bonus, it works back to Dreamweaver MX and DW MX 2004 (and maybe earlier.)

Find it in my list of extensions at http://www.tom-muck.com/extensions/. It's a free download. I have not tested on the Mac. If anyone runs into issues, please let me know.

Category tags: ColdFusion, Dreamweaver

Dreamweaver file synchronization

Posted Tuesday, November 22, 2005 9:10:57 PM by Tom Muck

Tom Muck

There was a discussion on a Dreamweaver list the other day about local/remote file synchronization in Dreamweaver 8. This is a touchy issue with Dreamweaver, because Dreamweaver has had an incredibly inconsistent history with the Synchronization feature. At one point, it simply did not work. For those who have not used it, you can find it in the semi-hidden Files menu when you click on the icon in the right corner of the Files panel under Site > Synchronize. For this to work semi-properly, you need to check the box in the site setup under the Remote Info tab that says "Maintain Synchronization Information".  There are some problems with this feature and other site management features in DW:

  1. Checking this box also causes little files to be scattered all over your local site -- dwsync.xml. They are contained within the _notes folders that DW scatters all over your site. This causes problems when using source control software -- the software reports changes in these files. Dreamweaver is like a bad dog leaving little piles of poop all over your site.
  2. The extra DW-droppings also cause problems using the synchronization feature when you have "Show Hidden Files" checked in the Files menu -- you see many of the droppings showing up as files that are different between local and remote.
  3. When you change your clock settings, files will show as different. I made the mistake of leaving DW open the evening that the clock rolled back for Daylight Savings Time and when I did a synchronization the next day, Dreamweaver reported over 1000 files had changed. That made it quite difficult to find the 3 files that actually had changed.
  4. When using other programs to modify content, DW does not always seem to know about the change.
  5. DW's GET and PUT does not always work right, leaving you thinking that a file had been updated when in fact it has not.

There is a technote about the "Dreamweaver droppings" here, and one way to avoid them: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=91b33859, however it also renders synchronization useless.

I have always been one to use DW for as much of my work as possible, because I hate to have too many programs open for simple day-to-day operations, but I have come to the realization that DW simply cannot be trusted to handle this seemingly simple operation. I now use Beyond Compare on Windows for this (there is probably a similar program for Mac). Beyond Compare is a file comparison program that will do a comparison of files or folders locally or over an FTP connection. The comparisons can be simple (using the file date) or more detailed (using a binary compare).

I did a simple synchronization preview in Dreamweaver this morning to test it out once more and DW reported 128 files had changed in my site. I knew this was not accurate, so I revved up Beyond Compare and did the same comparison -- it turns out only 14 files were different, and I also got the report that 3 files were newer on the remote server, 4 files newer on local server, 4 files were orphans on the local, and 3 files orphans on the remote. Much better than trying to wade through Dreamweaver's erroneous report that 128 files had changed.

As an added bonus, Dreamweaver 8 now contains file comparison, so Beyond Compare can be used directly from the files panel in Dreamweaver for quick local/remote comparisons. Beyond Compare is also great from the Desktop or file system because you can right-click a file, choose it for compare, and then right-click another file to compare to.

Maybe Dreamweaver 9 will address the problems with synchronization. If a $30 program called Beyond Compare can do it, Macromedia should be able to do it.

Category tags: ColdFusion, Dreamweaver

MAX Advanced CSS Session Files Posted -- Finally

Posted Tuesday, November 22, 2005 9:25:22 AM by Stephanie

Stephanie

I finally got a moment to breathe since the move and I've posted my files from my MAX session on Advanced CSS. For those of you that attended my sessions, this particular PDF was created from the actual Power Point Presentation used at MAX. It is more accurate than the one you can download from the Macromedia attendee support area (mainly due to the fact that I couldn't cover everything I wanted to in an hour and I had to remove a few things). I did leave in an extra example (shown after the final Thank You slide) even though I didn't have time in the session to cover it. It's a negative margins "Real World Example" and you may at least enjoy deconstructing the code.

Since the files used were actual client sites, I simply link to them and don't provide them as a download. The files are located at my W3Conversions site. One day, it will actually be completed with tasty treats. It will have a style switcher (represented now by the different designs you'll see when you refresh the pages). I feel certain that one day I'll have time to work on my own sites. Really. Until then, all I can offer there are the MAX files.

Category tags: CSS, Dreamweaver

Holiday articles and tutorials at CMX

Posted Monday, November 21, 2005 11:10:23 AM by Jim Babbage

Jim Babbage

With Thanksgiving fast approaching for my American friends, I thought I post a little list of CMX things to keep you busy for that NEXT big holiday (well, for me, anyway); Christmas

Several of the CMX partners, have - over the past couple years - put together some suitably festive offerings for the holiday season. I'm sure there will be more coming for 2005, but let's take a look back at the various wintry content to date:

CMX Jumpstarts

We have two - one of which is even free to all:

North Pole (free)

Aspen

Freehand

'Tis the Season for Christmas Cards

Creating Gift Tags Using Freehand

Fireworks

Let it Snow, Man! - Part 1

Create an Animated Snowglobe in Fireworks and Flash

Making Snowflakes in Fireworks

Creating a Christmas Tree with Fireworks

CMX Black Line Masters Graphics 3

Dreamweaver

Let it Snow, Man! - Part 2

Flash

Create an Animated Snowglobe in Fireworks and Flash

Just for Fun

The 12 Geeks of Christmas

CMXSuite - Holiday Edition 

http://www.communitymx.com/flicks/12142004.cfm 

http://www.communitymx.com/flicks/12212004.cfm

http://www.communitymx.com/flicks/05252004.cfm

http://www.communitymx.com/flicks/06012004.cfm 

So have a laugh, have some fun, impress your friends and family with your creative holiday skills. And keep checking back to see what we're cooking up for this holiday.

I tried to make this list as complete as possible, but if you find some other tidbit, let me know and I'll add it. 

Category tags: Community MX, On the Personal Side

It has no balls but feels really nice in my hand...

Posted Monday, November 21, 2005 9:45:59 AM by jojo

jojo

I treated myself to the all singing all dancing Logitech MX 1000 cordless laser mouse, 20x more proficient than the optical mouse so they say.

I have to say after the best part of two weeks use I am impressed, the laser tracking is superb; I would imagine a must for fiddling with graphics and the like. I kid you not; the laser is that good I can use my head as a mouse mat - probably the best use for it anyway - and navigate around anywhere I choose as if I was on a perfect "mousing" surface.

I also treated myself to a Logitech web cam this means that I now have the ability to frighten anyone in the world that happens to unwittingly catch a glimpse of me coding at the machine...

Category tags: On the Personal Side

Track browser resizing in your database using AJAX -- part 2

Posted Thursday, November 17, 2005 9:11:56 PM by Tom Muck

Tom Muck

Part 1 of this post showed the server-side code for a browser resize tracker. This part will show the client-side script. This can go on any type of page -- php, coldfusion, html, etc. The scripts consist of several functions:

  • getBrowserSize() -- called in the onload and onresize event to capture the browser size and pass to the server-side page
  • getSize() -- gets the size of the browser window
  • passFields() -- takes an array of fields (fieldname, value, fieldname, value, etc) and a URL and passes the fields to the URL as querystring variables
  • resetSizeTimer() -- creates a timer so that when the browser is resized, only one event is recorded (browser resizing typically fires the onResize event numerous times in succession.)

In addition, we set a global variable to act as a flag for the resize timer. The code is pretty straightforward, and can be placed in the head of any file:

<script>
var size_timer = false;

// Subroutine to get the size of the window
function getSize() {
 var myWidth = 0, myHeight = 0;
 if(typeof(window.innerWidth) == 'number') {
  //Non-IE
  myWidth = window.innerWidth;
  myHeight = window.innerHeight;
 }else if(document.documentElement &&
  (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
  //IE 6+ in 'standards compliant mode'
  myWidth = document.documentElement.clientWidth;
  myHeight = document.documentElement.clientHeight;
 } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
  //IE 4 compatible
  myWidth = document.body.clientWidth;
  myHeight = document.body.clientHeight;
 }
 return [myWidth, myHeight];
}

// Pass fields to server given a URL and fields in name/value pairs
function passFields(url,args) {
 url += "?";
 for(var i=0; i<args.length; i=i+2) {
  url += args[i] + "=" + args[i+1] + "&";
 }
 //Set up the AJAX communication
 if (window.XMLHttpRequest) {
  req = new XMLHttpRequest();
 } else if (window.ActiveXObject) {
  req = new ActiveXObject("Microsoft.XMLHTTP");
 }
 try {
  // Pass the URL to the server
  req.open("GET", url, true);
  req.send(null);
 }catch(e) {
 //nothing;
 }
}
function resetSizeTimer() {
 size_timer = false;
}

// Get the size and pass to the server
function getBrowserSize() {
 if(size_timer)return;
 size_timer = true;
 self.setTimeout('resetSizeTimer()',1000);
 var theArray = getSize();
 var url = "getBrowserSize.php";
 var args = new Array();
 args.push("width");
 args.push(theArray[0]);
 args.push("height");
 args.push(theArray[1]);
 args.push("screenwidth");
 args.push(screen.width);
 args.push("screenheight");
 args.push(screen.height);
 args.push("pagename");
 args.push(window.location);
 passFields(url, args);
}

</script>

All you need to do is to add the getBrowserSize() function to the onload and onresize events of the <body> tag:

<body onload="getBrowserSize();" onresize="getBrowserSize();">

Now, when you browse the page, the server records the browser size upon load and upon resize. Typical information would look like this:

Width Height Screen
width
Screen
height
IP Page name
85678812801024192.168.1.2http://mysite.com/index.cfm
76662512801024 192.168.1.2http://mysite.com/index.cfm
94875112801024 192.168.1.2http://mysite.com/index.cfm
102575712801024192.168.1.2http://mysite.com/index.cfm

The technique is handy and can be used for any other situation where you need to pass client-side information to the server.

Cross posted at Tom-Muck.com

Category tags: ColdFusion, Dreamweaver, JavaScript, SQL Server

Track browser resizing in your database using AJAX -- part 1

Posted Thursday, November 17, 2005 9:10:15 PM by Tom Muck

Tom Muck

It's always interesting to find out about viewing habits of web visitors. One of the things that is hard to determine when building a web page is how big to make your pages. Do you assume the user has 1280x1024? Do you assume 800x600? Do you assume that the user will have a fully maximized browser? One way to find out this information is to read the properties via JavaScript and store them. AJAX gives a web developer a valuble tool that allows the server to communicate with the browser in real time based on client-side events (such as resizing). I wrote a little script that I can insert on a page to track the resizing made by a user in relation to his screen resolution. After getting this information from a variety of users, I can run queries on the data and get some insight into browsing habits and adjust my page designs accordingly (or have them adjusted by a designer, in my case.) The code will be presented for ColdFusion and PHP.

First, I create a table in my database to store the information. The following is for SQL Server:

CREATE TABLE BrowserSize (
 browsersize_id int IDENTITY (1, 1) NOT NULL ,
 browsersize_width int NULL ,
 browsersize_height int NULL ,
 browsersize_screenwidth int NULL ,
 browsersize_screenheight int NULL ,
 IP varchar (50) NULL ,
 pagename varchar (255) NULL
)

The following is the equivalent for MySQL:


CREATE TABLE BrowserSize (
 browsersize_id int AUTO_INCREMENT PRIMARY KEY NOT NULL ,
 browsersize_width int NULL ,
 browsersize_height int NULL ,
 browsersize_screenwidth int NULL ,
 browsersize_screenheight int NULL ,
 IP varchar (50) NULL ,
 pagename varchar (255) NULL
);

You could also add a timestamp field, if you want to track times.

Next, I create a server-side page to grab the information and pass it to the database. The information will be passed in the URL. The code is self-explanatory. Basically, we pass width, height, screenwidth, screenheight, and page location in the URL, and insert it into our database table, along with the IP address of the user. The following is for ColdFusion:

<cfparam name="url.width" default=0>
<cfparam name="url.height" default=0>
<cfparam name="url.screenwidth" default=0>
<cfparam name="url.screenheight" default=0>
<cfparam name="url.pagename" default="">
<cfset url.width = val(url.width)>
<cfset url.height = val(url.height)>
<cfset url.screenwidth = val(url.screenwidth)>
<cfset url.screenheight = val(url.screenheight)>
<cfset ip = cgi.REMOTE_ADDR>

<cftry>
<cfquery datasource="yourdsn">
INSERT INTO browserSize
(browsersize_width
, browsersize_height
, browsersize_screenwidth
, browsersize_screenheight
, IP
, pagename)
VALUES
(#url.width#
,#url.height#
,#url.screenwidth#
,#url.screenheight#
,'#ip#'
,'#url.pagename#')
</cfquery>
<cfcatch>
<!--- do nothing --->
</cfcatch>
</cftry>

The following is for PHP:

<?php
$_GET["width"] = isset($_GET["width"]) ? intval($_GET["width"]) : 0;
$_GET["height"] = isset($_GET["height"]) ? intval($_GET["height"]) : 0;
$_GET["screenwidth"] = isset($_GET["screenwidth"]) ? intval($_GET["screenwidth"]) : 0;
$_GET["screenheight"] = isset($_GET["screenheight"]) ? intval($_GET["screenheight"]) : 0;
$pagename = isset($_GET['pagename']) ? $_GET['pagename'] : "";
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";

$conn = mysql_connect("localhost", "username", "password");
$query_rs = sprintf("INSERT INTO browserSize
(browsersize_width
, browsersize_height
, browsersize_screenwidth
, browsersize_screenheight
, IP
, pagename)
VALUES (%s, %s, %s, %s, '%s', '%s')"
,$_GET["width"]
,$_GET["height"]
,$_GET["screenwidth"]
,$_GET["screenheight"]
,$ip
,$pagename);
mysql_select_db("cwtest");
$rs = mysql_query($query_rs);
?>

Both of the pages can be run in the browser to test (saved as getBrowserSize.cfm and getBrowserSize.php respectively). If the values of 0 are inserted in the database, everything is working. I'll post the client-side AJAX code in Part 2.

Category tags: ColdFusion, Dreamweaver, JavaScript, SQL Server

Open Source and ColdFusion

Posted Thursday, November 03, 2005 9:25:13 AM by Stephanie

Stephanie

I've been slammed due to MAX (first getting ready for my sessions and then recovering from the lack of sleep and catching up on work after it). I have several things I'd like to post, but all in good time.

One thing I did want to make sure to help spread the news about is open source ColdFusion applications. I don't write CF code. But I find it very easy to understand and style around. I really love working with it. There are some great apps out there right now -- and they're open source. The first time I encountered these was through a project some of my co-workers at CMX started working on, CFOpen.org. This site lets CF developers post their code and work on their apps with other developers. Pretty cool.

Now, Brian Rinaldi has created a list of Open Source CF Applications. Instead of starting from scratch, you may want to check out what's already been created and add to that instead. There's a great variety of cool apps, including -- blogs, wikis, AJAX implementation and more. Long live ColdFusion!

Category tags: ColdFusion, Dreamweaver