Learn About Doug!
View Doug Boude's online resume

View Doug Boude's profile on LinkedIn
Follow Doug Boude on Twitter
Contact Doug!
OO Lexicon
Chat with Doug!
Recent Entries
You may also be interested in...
Florida web site design

hotels boeken in 7 sec
Engagement Rings
Online Dating Australia


Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 6,828
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< January, 2009 >>
SMTWTFS
123
45678910
11121314151617
18192021222324
25262728293031
Search Blog

Recent Comments
Re: Using Google as your CF Mail Server (by wesdom at 12/26 2:00 PM)
Re: Refreshing Cached ColdFusion Webservices Through the Back Door (by Michael at 12/19 12:36 PM)
Re: Getting a Complete List of Timezones from Java (by PaulH at 12/17 9:32 AM)
Re: A Look at Male Enhancement (by ike at 12/16 4:44 AM)
Re: Very Useful Snippet (by Dan Vega at 12/13 11:00 AM)
Re: Very Useful Snippet (by Jason Fisher at 12/13 8:56 AM)
Re: Viewing Option Text (in IE7) that's Wider than the Select List (by nfurs dfksdjalk at 12/12 5:28 PM)
Re: SQL Forward Engineering with Visio 2003 Professional (by Peter J. Smith at 12/11 5:30 PM)
Re: Element.show/hide anomoly in Prototype (by Michael Sharman at 12/11 3:10 PM)
Re: Basic Security in Coldbox using Transfer and Coldspring - Part II (of II) (by orc at 12/08 11:44 PM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

17 December 2008
Getting a Complete List of Timezones from Java

I've been doing some research on i18n, locales, timezones, and all that jazz lately. Today I wanted to build a dropdown list of possible timezones, and came across a bit of Java code that I converted to CFSCRIPT. Thought I'd share it in case anybody else finds it useful. I will say that there are a LOT more timezones than I would have ever guessed (592 to be exact), and the results of my snippet probably aren't useful as-is to populate a dropdown; but, at least you do have a way to access what your CF server's JVM knows about, and you can filter it as you like.

Oh, I ran this code under CF8; not sure what it does under earlier versions.

The Code:

<!--- create list of valid time zones using java... --->

<cfscript>

tz = createobject("java","java.util.TimeZone");

aTZID = tz.getAvailableIDs();

today = now();

aTZs = arraynew(1);

for(i=1;i<=arraylen(aTZID);i=i+1){

tmptz = tz.getTimeZone(aTZID[i]);

stThisTZ = structnew();

stThisTZ.id = aTZID[i];

// Get the display name

stThisTZ.shortName = tmptz.getDisplayName(tmptz.inDaylightTime(today), tz.SHORT);

stThisTZ.longName = tmptz.getDisplayName(tmptz.inDaylightTime(today), tz.LONG);

stThisTZ.readableName = tmptz.getDisplayName();

 

// Get the number of hours from GMT

rawOffset = tmptz.getRawOffset();

stThisTZ.offset = rawOffset / (60*60*1000);

stThisTZ.offsetMinutes = abs(rawOffset / (60*1000)) % 60;

 

// Does the time zone have a daylight savings time period?

stThisTZ.hasDST = tmptz.useDaylightTime();

 

// Is the time zone currently in a daylight savings time?

stThisTZ.inDST = tmptz.inDaylightTime(today);

arrayAppend(aTZs,structcopy(stThisTZ));

}

</cfscript>

<cfdump var="#aTZs#">


screenshot of the output:
screenshot of output of timezones retrieved via java timezone object

Posted by dougboude at 7:16 AM | PRINT THIS POST! | Link | 1 comment



16 December 2008
A Look at Male Enhancement
or, The Mythical Man Inch

Allow me to preface by saying that I am well aware that NO MALE reading this post has ever considered, imagined, entertained the remotest thought of, or especially TRIED any of the seemingly popular and wildly successful (according to Ron Jeremy) male enhancement nutraceuticals. I know this is the case...we're all fantastically pleased with our packages just the way they are; no room for improvement there. Lend me your imaginations for a moment though, and let's pretend a few things. Let's pretend that first of all, Ron Jeremy does not speak with cunning lingus, and "Johnson-gro" actually does what it says. Let's pretend also that you actually say to yourself one day while studying your genitalia in a fogged up mirror, "hmmm, I guess I COULD stand to have a LITTLE more penile fortitude", and drop the bucks to acquire the product. And, to top off our imaginative adventure, let's say that after rubbing on a handful of "Cavernous Balm" and rinsing it away, there in all its glorious beauty shone a serpent fit to be enshrined, a full ONE INCH longer! You know, the size of half of your pinky finger; the distance between the 2 and the 5 button on your telephone; the breadth of three lines on your notebook paper.

Now, here's the question, the answer to which I believe dispells every empty, egotistical, low self-esteem driven motivation that moves us and fuels the "phallic express" bosses who thrive on mankind's misinterpretation of his schnitzel:

Would your woman even NOTICE?

Your lovely spousal unit of one, three, five, ten, even TWENTY years: Would she really take note the night you crawl into bed with what you believe to be a brand new weiner? Even in the bright white light of the noon day sun, do you honestly believe that, had you never said a word to her about anything to do with attempting to lengthen your dachsund, that her eyes would fly wide open at what you perceive to be a huge difference in Ol' Stiffy? I'm betting a gabillion dollars that the absolute unquestionable answer is...NO. She wouldn't notice without you pointing it out to her, and even then she'd have to stretch her imagination to try and find concord with you.

Through the eyes of our companions (contrary to our own perceptions sometimes), WE do NOT equal our Wally. Our woman sees us when she looks at us, not solely one small part of us (pun intended). I know, I know, this is a hard concept to conceive; after all, WE see ourselves as our penis, why wouldn't they? Especially when that's the part of us with which we pleasure and become one with her. The fact of the matter is, though, as I'm sure you have all heard continuously, US GUYS are the only ones who really care THAT much about how much our Ballpark Frank plumps when you cook it, not them. The proof being that were you truly able to tack on another whopping INCH, she wouldn't even know that you had. Knowing how very challenging this is for a male to wrap his head around, allow me to toss out an equal analogy from our companion's perspective that I believe will help drive the concept home....

A woman's pride is very much attached to her appearance; not even a topic fit for debate. The skyrocketing sales of bigger boobs, liposuction, rhinoplasty, vulvarian sculpture, etc. solidifies that fact hands down. One aspect with which she identifies herself as beautiful is her hair. Now for us guys, we know that our lady HAS hair, and we like that fact; but I would venture to say that, although we can see the aesthetic complement a neatly coiffed head provides, it is way down on our list of reasons why we are attracted so strongly to her.

Case in point: your lady goes out for the day with a girlfriend to do some shopping, grab some lunch, have some girl time. When she gets home, you're super happy to see her and plant a wet one on her to let her know it. But unless she points it out to you or is gentle enough to drop a few hints here and there, chances are you are NOT going to notice the WHOPPING INCH that she spent seventy five bucks to get chopped off the end of her hair. To her, her hair is her pride and joy, one of the devices by which she measures her own beauty, and the fact that she gave it some attention and paid someone to take off those BLATANT split ends and make it just a wee bit shorter has added to her self-esteem greatly. But for us, though we do see her hair, like to touch her hair, smell her hair... it isn't her hair alone that makes her beautiful to us! In fact, it's rare that we even notice her "girl's hair cut" unless she TELLS us. Why? It isn't because we're blind, or we're not looking at her. It's precisely because we ARE looking at her, and not just her hair, that we do not take special note most times.

You getting it yet? Your woman doesn't care about the dimensions of your outer space, YOU DO; you don't care if your lady dyes, cuts, curls, perms, or straightens her hair: SHE does. I concur that it will take a LOT of mental training and practice for the average male to teach himself to think differently, but guys, it's time we all stop judging ourselves (I say this very generically) by what we perceive ourselves to be or not be packing, and realize that going up one ring size is NOT the ultimate gift. If we spent half as much mental energy on thinking of ways to be better husbands and boyfriends as we do thinking about "what if I were as big as a pop can", we'd have happier partners than we ever thought possible. Investing time in the things she DOES care about...now THAT is "male enhancement".

Just food for thought. :)

Posted by dougboude at 4:03 AM | PRINT THIS POST! | Link | 1 comment