Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.
November 30, 2003
This find sent to me by William Steiner (ECICFUG Manager). The official NFL shop at http://www.nflshop.com/ is powered by ColdFusion MX (on Linux or Win2K, or both, Netcraft is inconclusive on this one).
November 28, 2003
Need to match zip codes or postal codes? Of course, no two countries use the same format. But here are solutions for USA, Canada, and the United Kingdom. The USA format is simple, five digits as 99999 or zip+4 as 99999-9999. A simple RegEx could be: \d{5}(-\d{4})?
If you want to omit zips with a trailing hyphen (as in 99999-) then you could use a lookahead condition: \d{5}(?(?=-)-\d{4})
Canada is a little trickier, the format looks like A1A 1A1 which can be easily matched with: [A-Z]\d[A-Z] \d[A-Z]\d
However, there is one rule that may be employed to improve validation, the opening character of the set of characters (technically called the "forward sortation area" or FSA) identifies the province, territory, or region (there are 18 characters that are valid in this position, A for Newfoundland and Labrador, B for Nova Scotia, K, L, N and P for Ontario excluding Toronto which uses M, and so on.), and so validation should ideally check to ensure that the first character is a valid one. And so, here is a better Canadian postal code regular expression: [ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d
Good old UK is the trickiest of the three. United Kingdom postcodes, as defined by the Royal Mail, are five, six, or seven characters and digits (that includes a single space). Postcodes are made up of two parts, the "outward postcode" (or outcode), and the "inward postcode" (or incode). The outcode is one or two alphabetical characters followed by one or two digits, or one or two characters followed by digit and a character. The incode is always a single digit followed by 2 characters (any characters excluding C, I, K, M, O, and V). The incode and outcode are separated by a space. Here's the regular expression: [A-Z]{1,2}\d[A-Z\d]? \d[ABD-HJLNP-UW-Z]{2}
If you have any other countries or formats to share, please do so.
November 27, 2003
Bad hair day? Cold Fusion, "the latest in Extensions trends and technology", saves the day (and apparently, Dreamweaver is involved too). Details at http://hairextension.com/ultra_sonic_cold_fus.htm.
Visit http://www.republicjewelry.com/cfusion.htm for the Cold Fusion Theme Deck Pokemon Trading Card Game (featuring "Neo"?!?!?!).
November 26, 2003
I'll be presenting to the SCCFUG (in Orange County, CA) on December 9th. This event is listed on my home page. Hope to see you there!
November 25, 2003
Earlier today I needed URL input validation (my form prompted for a URL, I needed to validate that what was provided was a syntactically valid URL). URL validation is actually rather complicated, but the following regular expression worked for me:
https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?
This one allows both http and https, supports an optional port, and allows paths and query strings too. Oh, it also works with both JavaScript (and can thus be used with ) and CFML.
Posted At : 3:03 PM
Related Categories:
Stuff :
My site was down since early this morning. The culprit? Network recabling, and a cable not plugged back in. Sorry about that. :-(
November 23, 2003
Posted At : 3:52 PM
Related Categories:
MAX :
Stuff :
Guess where I am ... anyone? ... Houston, and once again I am waiting for a flight because I missed my connection. Ok, in all fairness it is not Houston's fault this time, well, not entirely. My flight leaving Salt Lake City this morning left an hour late (some sensor had frozen, you'd think they'd have checked this earlier, the plane had been sitting there since last night). So we landed in Houston at 1:05 pm, and my connection was at 1:17pm. I could have made it, but nope, there was "equipment" in the way at the gate (hey, they had no idea we were arriving, right?), so we sat for 10 minutes, and then I ran to the next gate only to be greeted by the sight of my plane pulling away. So, I am back in Houston, waiting for a plane, and wishing that this airport had high-speed Internet access available. Ugh!
November 21, 2003
We hosted a "sneak peak" session yesterday afternoon here at MAX, engineers from all the product teams (in bee costumes, don't ask) used the opportunity to showcase cool stuff they were working on (stuff that may, or may not) make it into future products. Mike Nimer presented for the ColdFusion team, and without question, his sneaks got the greatest applause. Mike showed two different works-in-progress: 1) He showed a tag, the old (and rather despised) grid applet, and then changed an attribute so that the grid rendered in Flash. He also showed form fields associated with the grid, creating groups, tab dialogs, and more. His entire demo was actually using Flex internally, and served to demonstrate the potential afforded by ColdFusion+Flex. 2) He also showed an HTML page, complete with styles used for formatting. He then changed the document type to "PDF" and, yep, generated a PDF on-the-fly (complete with headers and footers and column headers and more). And the crowed loved it. Of course, as Paul and Norm both reminded us several times, the sneaks are prototypes and works-in-progress, and are not commitments to specific features or implementations. Still, fun stuff!
November 20, 2003
Posted At : 6:17 PM
Related Categories:
MAX :
I am collecting pictures and video of the MAX 2003 Day 1 Keynote (the first morning when I presented), stuff taking by attendees in the audience. If you have anything you can share please comment, thanks.
Lots of the impromptu chats I have been having here at MAX have been focused on Flex, and specifically how it relates to ColdFusion. So, no, Flex is not a ColdFusion killer, it is not even a ColdFusion competitor. The truth is that I don't think we've done an adequate job yet of articulating the ColdFusion / Flex relationship, this should be addressed shortly though (and in all fairness, Flex is not even in beta yet). But ... at it's simplest, Flex relies on back-end server technologies for transactions and business logic and processes, and ColdFusion is a great option there. Think of it this way, CFCs for your business layer, CFM files use those CFCs to generate HTML, Flex uses those CFCs to generate SWF. It's that simple.
Finally, a few minutes of blogging time ... MAX 2003 has been a blast thus far - there is incredible excitement, attendees seem excited and enthusiastic, the facilities are great, and everyone seems to be having fun. That's a good thing. The Day 2 keynote was hilarious, our very own Tim Buntel and Eileen Stanley hosted another TV Show and presented a mix of fun and features that was both entertaining and informative. Breeze's new extensibility layer is thought provoking, Central has generated lots of chatter, and "my favorite molecule is water" (hey, you had to be there). I moderated a "Meet the ColdFusion Engineers" BOF last night, an intense hour of great discussion about what ColdFusion should become, and what features Blackstone should deliver. No big surprises, lots of validation of current thinking, and lots of useful direction. Standing room only, and I had to close the floor eventually as we ran over time. Good stuff. The "Sneak Peak" session is in an hour, I'll post more then.
November 19, 2003
During this morning's MAX 2003 keynote I announced that the next major version of ColdFusion is in the works, the product is codenamed "Blackstone". I also listed the high level themes for this future product, and just so things are clear, this is the text from the slide I showed: Key themes for Blackstone are: * Reporting & printed output. * Making RAD even more rapid. - Simpler ways to create compelling and sophisticated user interfaces. * Radical new productivity gains. - Productivity gains for both existing users and new developer. * New ways to deploy your apps. - Including source code protection.
November 18, 2003
Posted At : 1:44 PM
Related Categories:
MAX :
Stuff :
What an adventure (and I use that term somewhat loosely). There are no non-stop flights from Detroit to Salk lake City, and so my flight Monday was on Continental via Houston. I arrived in Houston as did a major storm system (complete with torrential rain, lightning storms, tornado warnings, and ... you get the picture). Here's roughly how things played out ... 5:00 pm: we arrive (late) in Houston, with minutes to make my connection at Gate C33. 5:05 pm: arrive at Gate C33 to be told that the inbound plane had not yet left San Antonio, and it will be at least an hour before we leave. 5:07 pm: bump into several folks (from Paris, Bogotá, Michigan, and later Florida) also heading to MAX in Salt Lake City, our own mini pre-conference. 5:40 pm: announcement, gate change, we head over to gate C38. 5:55 pm: oops, another gate change, this time gate C44. 6:45 pm: and yet another gate change, now it's gate C37. 7:30 pm: lots of flights are being cancelled, planes can't get in, and those planes that are in have no crew. 7:45 pm: our flight to Salt Lake City is cancelled. 7:50 pm: a Continental rep tells us we've all been rebooked on a flight the next morning, well, all but one of us who was booked on the last flight out Monday night scheduled to leave at 8:30 pm, she tells us to all run over there, we may get on standby, we debate just getting a hotel for the night, but decide to try and make the flight. 8:20 pm: yep, I have a seat, and we even have a plane, now all we need is a crew. 8:45 pm: lots more flights cancelled, there are only three flights left in this terminal, and hotels are filling up (thousands of passengers need rooms, but most can't get to the hotels though because of street flooding). 9:30 pm: a flight to Pittsburgh leaves, things are momentarily looking up. 10:00 pm: still no crew, they are stuck in San Antonio, and every flight but ours has now been canceled 11:00 pm: announcement, the crew is about to leave San Antonio, we'll leave in about an hour, loud cheering. 11:30 pm: announcement, crew should be leaving shortly, but Houston spoke to them, and they are fine to fly on to Salt Lake City. 12:00 pm: announcement, crew has left San Antonio, we'll be leaving at 1:00 am (2:00 am my time). 12:25 pm: flight from San Antonio arrives, loud cheers from all. 12:45 pm: the Continental rep is looking very agitated, something is wrong. 1:00 am: announcement, the crew is fatigued, after being strung along for hours we'll not be flying now after all, and there is no way to get a room anywhere now. 1:15 am: we're rebooked on a Delta flight at 8:05 am, pillows (if they can be called that) and blankets (think slightly oversized thin towel) are handed out. 1:30 am: we stake our claim to a piece of rug on the terminal floor and try to get some sleep, emphasis on "try". 5:00 am: we give up, and head over to Terminal A for the Delta flight. 7:15 am: we're at the gate, looks like we’ll be heading to Salt Lake City shortly. And that's where the story should end. Right? Wrong ... 7:30 am: my laptop batteries are drained, I need to recharge them before I board so I can get a few hours work in, I plug the charger in to the outlet and in to the computer, and ... a flame shoots out of the PCMCIA slot (right next to the CPU and power source), smoke billows out of several openings (generally not a good sign), smoke detectors in the terminal go off, the smell of burnt plastic and an electrical fire turns all the heads, I yank the power cord at of the outlet, and blow out the fire, fun stuff, I guess I'll not be working on this flight, and I am getting all sorts of funny looks from people because of the pungent odor. 8:00 am: we board the Delta flight, we're on our way. 10:30 am: (11:30 am Houston time) we arrive in Salt Lake City, it's taken over 20 hours to get from Detroit, and I can't nap, I need to find a computer fast. But, we made it. Here's hoping that the rest of MAX goes a little smoother!
November 17, 2003
Posted At : 9:14 AM
Related Categories:
Stuff :
Flex :
Christophe, welcome back to Macromedia, and welcome to the blogsphere! Christophe Coenraets is the new Technical Evangelist for Macromedia Flex, his new blog is at: http://www.markme.com/cc/.
It's official, the product formerly known by the codename "Royale" will be named "Macromedia Flex". Flex is a standards based server product that allows developers to build rich user experiences all in code (in an XML based language). Flex is designed to leverage existing and standards based back-ends, and ColdFusion developers will find that they can use Flex to build sophisticated n-tier applications (with ColdFusion providing the back-end processing, and Flex generating the client-side code). More details to be announced at MAX later this week. For now, to sign up for the Flex beta, go to http://www.macromedia.com/go/flexbeta.
November 14, 2003
Posted At : 11:48 AM
Related Categories:
Stuff :
If you love Looney Tunes (who doesn't?) then you absolutely *need* (yes, need) the new Looney Tunes Golden Collection, a 4 DVD set (Disk 1 is Bugs, Disk 2 is Daffy and Porky, Disks 3 & 4 feature Tweety, Speedy, Leghorn, Taz, and more). In all, 56 of the best animated shorts of all time that, quite literally, bring tears to the eyes. :-) Amazon.com has the collection at http://www.amazon.com/exec/obidos/tg/detail/-/B0000AYJXS/benfortascoldfusA/, this one is highly recommended.
November 13, 2003
Posted At : 11:31 AM
Related Categories:
ColdFusion :
The ACLU (American Civil Liberties Union) describes itself as the "nation's guardian of liberty, working daily in courts, legislatures and communities to defend and preserve the individual rights and liberties guaranteed to all people in this country by the Constitution and laws of the United States." Founded in 1920, the ACLU now boasts nearly 400,000 card carrying members, and http://www.aclu.org/ is their home online. Thousands of pages of content on all sorts of issues, forums, an online store, membership and contribution pages, events calendars, press releases, and more - and all powered by ColdFusion.
Posted At : 11:30 AM
Related Categories:
ColdFusion :
Award-winning Fodors.com (http://www.fodors.com/) is the online authority, a one-stop, multi-platform source of travel content for users of the Web. A three-time Forbes magazine favorite, Fodors.com provides real-time guidance and customized Miniguides containing hotel, restaurant and sightseeing recommendations worldwide. And Fordors.com is powered by ColdFusion!
Posted At : 10:55 AM
Related Categories:
ColdFusion :
My latest find (this one courtesy of Paul Madar, General Manager of the Macromedia Developer Solutions Group) Marriott Hotels is using ColdFusion on their Mid Atlantic Marriott site at http://www.midatlanticmarriott.com/.
November 12, 2003
Posted At : 11:25 PM
Related Categories:
MAX :
Stuff :
Attending MAX next week? Share the experience with the rest of the world by becoming a MaxBlogger. Session notes, tips, gossip, pics, announcements, whatever it is, blog it and let MaxBlogger aggregate it for all to enjoy. The aggregator, and the signup form, are at http://www.maxbloggers.com/.
Posted At : 10:17 PM
Related Categories:
MAX :
Testing a new category, this one is for the MAX 2003 feed.
Posted At : 12:06 PM
Related Categories:
ColdFusion :
If you use Web Services (either publishing or consuming them) then this one will be of interest to you, a CFMX hot fix which provides SOAP header support is now available. This hot fix adds three new functions that may be used from within CFC methods: GetRequestHeader() is used to get a SOAP header, AddResponseHeader() to add a header to returned SOAP, and IsViaSOAP() to determine if a CFC method is being invoked via SOAP. There are also two new functions for use when invoking Web Services (via or CreateObject()): AddRequestHeader() adds a header before method invocation, and GetResponseHeader() can access a returned SOAP header after invocation. Details are at http://www.macromedia.com/support/coldfusion/ts/documents/webservices_header.htm.
Posted At : 9:57 AM
Related Categories:
Stuff :
I am working on a new venture. I have been contacted by senior government officials (and the widow and former lieutenant of important officials) in Nigeria with an intriguing business opportunity. It seems that because of political and military turmoil, large amounts of money are stranded in offshore bank accounts, money that my contacts need help procuring. I am excited to publicly announce that I have been chosen to help obtain these funds, and will be paid a percentage of the proceeds for my efforts. I have already provided these contacts with all my personal information, and will likely be making a trip to Nigeria in the near future ... Ok, so I lied, I am not losing it, but apparently many have (lost it, as in their money, or even their lives). We all regularly receive numerous variants of the "business opportunity" message, and we all hit delete as quickly as we can. But according to the FTC this is now one of the most prevalent and successful scams; people are actually falling for it. I am not sure what I find more disturbing, the fact that 10% of recipients seek more information (http://www.archives.gov/about_us/office_of_the_inspector_general/email_fraud_awareness.html), the fact that the US Secret Service gets reports of 100 victims a day (http://www.justiceonline.org/consum/nigerian.html), the fact that people have actually flown to Nigeria and have been killed, the fact that there is actually a coalition to fight this scam (http://home.rica.net/alphae/419coal/), or the fact that this is so problematic that the FTC (http://www.ftc.gov/bcp/conline/pubs/alerts/nigeralrt.htm), the FBI (http://www.fbi.gov/majcases/fraud/fraudschemes.htm#nigerian), the Secret Service (http://www.secretservice.gov/alert419.shtml), the Justice Department, and more, have all needed to warn the public about this. Oh, and before I forget, I have a bridge to sell you ... Sad, so sad.
November 11, 2003
So, any bloggers planning on attending MAX? We're working on a centralized blog aggregator for all MAX related blogs (product stuff, session comments, thoughts, photos, gossip, you name it). The intent is to both to record the MAX experience, and to share MAX with those who might not be attending. I'll post the details and sign-up URL as soon as I have it; for now, let's get the word out.
|