Business/Work02 Mar 2011 03:34 pm

I won’t go into the details, but I have a recurring source of data (already in a mysql table), and I need to move the month column from a CHAR(3) format to an integer format (i.e. JAN=1, FEB=2, etc.).

And, because I don’t have much control over the incoming data, it’s unlikely I’ll get to change how it’s coming, so I need to convert the month abbreviation into an integer.  I wrote the following mysql stored function that is working well for me.

Note, I had to make a temporary memory table because MySQL doesn’t use arrays, and I didn’t want to make a bunch of IF-ELSE statements.

DROP TABLE IF EXISTS `tmpmonth`;
CREATE TABLE IF NOT EXISTS `tmpmonth` (
`mNum` int(11) NOT NULL,
`mName` char(3) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;

INSERT INTO `tmpmonth` VALUES (1, 'JAN'),(2, 'FEB'),
(3, 'MAR'),(4, 'APR'),(5, 'MAY'),(6, 'JUN'), (7, 'JUL'),
(8, 'AUG'),(9, 'SEP'),(10, 'OCT'),(11, 'NOV'), (12, 'DEC');

DELIMITER //
CREATE FUNCTION MonthToNumber (strMonth CHAR(3))
  RETURNS INTEGER
  DETERMINISTIC
BEGIN
   DECLARE m INTEGER;
   SELECT mNum INTO m FROM tmpmonth WHERE mName LIKE strMonth;
   RETURN m;
END//

Then, it’s easy to call the function inline with my updates.  For example:

UPDATE  OrigTable SET MonthCol=MonthToNumber(MonthCol);

(Yes, it puts the integer value in the char column, but it’s easy to convert from there.)

General15 Sep 2010 06:28 pm

The best cheat codes are available at cheatcodes.com.  Cheatcodes is updated daily with the best cheats from the most popular games, like:

  • Grand Theft Auto 4
  • Halo: Reach
  • Grand Theft Auto San Andreas
  • Red Dead Redemption
  • and all PS3 and XBox 360 games!

Cheat Codes.com has the best cheat codes!

Business/Work14 Sep 2010 05:53 pm

I’ve got an IronKey drive that I use on a few machines – some of which crash – causing the flash drive to not be “unmounted” correctly.  When that happens, the next time I plug it in, it complains about the drive needing to be scanned and fixed.

When I would try to scan and fix, it would always reply with “Drive is in use”.  So, I couldn’t scan it.

The solution:

chkdsk H: /f

(where H: is the mounted directory for the files on the drive).

Then it will ask you if you want to unmount the drive.  Hit “Y” and let it finish.  Then unplug the IronKey, wait a few seconds, and plug it back in.  It shouldn’t complain anymore.

Business/Work18 Aug 2010 04:02 pm

I follow a few blogs, including lifehacker and unclutterer, and both have frequent articles about featured workspaces and cool workspaces – basically neat offices.  Since I also work in a neat office, I always find those occasional articles interesting.  I googled around for a dedicated blog for amazing workspaces and couldn’t find one… so I started CoolWorkspaces.com.

I’m going to post links to any and all of the cool offices I find.

Business/Work and Exercise25 Jul 2010 03:21 pm

Believe it or not, my sports team web hosting service is finally in beta!   TeamSites.com makes creating and updating team websites easy!

This is probably the tenth version I’ve worked on and it actually took less time than all the others.  In all the previous versions, after adding more and more features, the design and user interface got extremely unwieldy. So, for this latest release, I used the same philosophy I used when creating BidNip: simplicity.

That’s right – I cut out most every cool feature. They were neat, but they added nothing (or very little) to the actual helpfulness of the service.  So, I kept with only the things that _I_ would personally use when making a site for one of my kids.  Homepage for news, schedule, and roster.  I also added alerts for when practices or games are cancelled.  I also added a media (photo/video) section – I originally had it cut too, since there are already SOOO many places to post pictures.  To keep it simple, I made TeamSites only let you put URLs for your media – so you don’t have to upload them to the site! Simple!

I also originally went with _only_ HTML 5, but after testing in a few browsers, I let a little HTML 4 styling slip in.  Maybe after IE 7 is phased out…

General05 Apr 2010 01:57 pm

I have to admit that despite all the fanboys and haters alike, I really like the iPad. I think it will replace my netbook shortly…. And definitely if I travel and don’t need to do any real heavy duty programming.

The parts I like are the usual: the interface, the speed, the multimedia, the form factor, and the stuff that everybody else loves too… And even the landscape keyboard is exceptional too!

Despite loving it, there are a few things that bother me:
1: No flash support. Seriously, Steve Jobs must be some sort of sadochist to take pleasure in torturing people by not allowing the most common plugin on the ‘net. Really Mr. Jobs??!?… Really?!?…

2: Wireless synching with iTunes. It’s a mobile device… Let me sync wirelessly too please…

3: No camera/webcam

4: Multitasking..?

5: HDMI support would be nice for watching the HD movies I bought…

6: I should put this as the second complaint, because it’s the easiest to fix and a big omission… Why can’t I print wirelessly?

Audio/Video02 Apr 2010 11:30 am

The first thing most people want to do to customize their iPad is to change the background, lockscreen, or wallpaper.

Luckily, it isn’t hard!

The first thing you’ll need to do is find an image that is 1024×1024 (width x height). You can probably find a lot more images sized as 1024×768 (since that’s a traditional screen size), and then you can rotate it 90 degrees. I found many images that rotated well, but it will depend on what you want in your image. You can also find an image that is at least 1024 high, and then crop the sides using just about any image editing program.

Once you have your image, transfer it to your iPad by putting it in your Photos (using iTunes). You can also try mailing it to yourself and saving it to your camera roll.

Once the image is in your photos, you can select the image and make it your wallpaper. You can also set it using the Settings app, and choosing wallpaper, and then selecting the image. You can choose if you want it for your “lock screen” and/or you wallpaper. That’s it!

General07 Nov 2009 01:18 pm

A few weeks ago I was looking around Amazon.com at various books and went into a “classics” list and saw “Walden” by Henry David Thoreau.  After thinking about it for a few minutes, I decided I should buy it and read it – for two reasons. First, I’ve never read it, and second, I thought I probably should.

After reading the first chapter it occurred to me that this is one of the first “blogs” (forgetting the fact that the “b” is short for “web”) – it’s written just like today’s blogs – if not longer and descriptive.  It’s basically HDT’s public journal of a couple years spent on a pond outside Concord.

And like a blog, it’s got some really interesting chapters (aka posts) as well as some really uninteresting chapters.  I must confess that I’ve skipped some parts that were long winded and boring (IMHO), but found other sections extremely interesting and so read them a few times repeatedly to get all the nuances.

So, if you’re thinking it might be interesting to read a 150 year old blog, pick up Walden.  I enjoyed (most of) it.

General25 Oct 2009 04:44 pm

Janet and I just returned from a new few days in Las Vegas. Janet was there (along with her sister, Diane) to see U2 at the Sam Boyd Stadium, while I was there to enjoy Vegas (you know, poker and more stuff from the Ferrari Store in the Wynn).  You may ask why I didn’t go see U2, and the answer is that I’d rather not give $250 to commie socialists (e.g. Hey Bono – shut up and sing, monkey boy!)

Anyway, it turns out that Sam Boyd Stadium is a good 10 miles off the strip, through city streets. The net result of that is that during rush hour it takes a good hour to get there from the strip. It also means taxis do NOT want to go out there – no fare for half the trip!  Because of some rules (laws?) they have to take you where you ask – but that doesn’t mean they’ll come back to pick you up… 

So, as you can imagine, a LOT (as in THOUSANDS) of people took taxis out to the concert. As you can also imagine, after the concert there were very few cabs waiting.  Janet and Diane got out of the concert and said the taxi line was LITERALLY a mile long – and by “literally”, I mean that it actually was at least a mile long.  Janet said taxis were coming up about one every 5 or 10 minutes.  Which leads to a LOT of angry and anxious people really wanting to get back to the strip, and no one to take them.

Since I didn’t go to the concert, they called me and said they started walking toward the strip (which you could see way in the distance) with a few thousand of their closest new concert friends.  They got to a gas station and then said to come pick them up.  The plan was for me to get a taxi on the strip, then drive out and get them and come back.  Not a huge deal (just a $60 cab ride since it was round trip). I found a taxi willing (and happy since it was a round trip) to go out there and was on my way.

Janet mentioned that we should be careful – people in the “U2 Concert Refugee Mob” were attacking cabs trying desperately to get back to the strip.  She said they were like zombies and taxis were brains.  I laughed.  I told the cab driver and he laughed.

As we approached the gas station, we saw more and more refugees/zombies. They yelled as we passed, and when we went by, they cursed at us (seriously!). As we slowed to turn into the parking lot, the crowds around the street started toward us so the cabbie locked the doors, turned on the inside dome light, and I lowered my window a little bit so they could see the cab was occupied.  None of this mattered to the zombies – they rushed the cab like it was brain matter. 

We spotted Janet and Diane near the middle of the parking lot and slowed to let them in.  As they were trying to get in, a zombie asked Janet, “Is this your cab? (i.e. living human brains)”.  She said yes as they jumped in as quickly as possible.  At the same time, a woman on my side of the taxi was screaming into the window “Are you going to the strip!? Are you going to the strip!?!? ARE YOU GOING TO THE SRTIP!!!”  (* note, there is no question mark on her last sentence, because I’m pretty sure she didn’t want an answer – she just wanted me to unlock the door so she could eat my brains.)  We unlocked the doors and Janet and Diane were able to jump in and lock the doors behind them. Immediately after we locked the doors, on Janet’s side, another guy/zombie was trying to open Janet’s door, and then the driver’s door.  The driver was yelling “Sorry! This cab is full!”.

We locked the doors when the girls were in, and we headed for the exit. As we stopped to merge with traffic, even more zombies approached the cab yelling “Send More Brains!”  (or maybe it was “Taxis”, but it could have been either).  We took off and headed for the strip – feeling a little sorry for all those hungry zombies stumbling through the night looking for brains the strip.

The lesson I take away from this adventure is two-fold. First, never see U2. Second, when there are hundreds of people wanting your cab, you should be well armed and ready - because they come at you fast and non-stop!  They’re willing to kill for your brains cab.

General17 Oct 2009 10:04 am

Who:  Steve Jenkins, Harlyn Jenkins, Me
When: summer 2001
Where: Seattle, Washington. SteveJ’s home office. Locked in.
What:  CheatCodes.com re-opening development and redesign HACK session for 5 days straight.

You know, your garden variety pre-release testing and final touches for your major website; entailing 10-15 hours at a time of working to make the site live.

When we all arrived, we set up our computers and made a “supply run” to the local supermarket. All of us being 20-something’s, our cart was filled with a LOT of the following:

  • Energy drinks
  • Mountain Dew (a LOT of it)
  • Chips (sweet maui onion, Cheetos, Tostitos, sea salt & vinegar, etc.)
  • Beef Jerky
  • More Mountain Dew
  • Cookies (sugar coated animal crackers, nutter butter, oreos, etc.)
  • More Mountain Dew
  • More chips (esp. Sweet Maui Onion.. Mmmmm)
  • More Mountain Dew
  • Chocolate candy bars (many assorted)
  • More Cookies
  • Misc. stuff I don’t remember, but we filled a full grocery cart with sugar and trans-fat.
  • Oh, and did I say Mountain Dew?

And over the course of the week, we went through all of it – just the three of us. And if I remember right, we went back to get more Dew and sugar-coated-animal-crackers (man, those things are good).  We finished the site, opened, and the rest is history.  We had no problems working until 5 in the morning, getting up at 9 and continuing right where we left off.  I fell asleep a couple times on the floor of the office and got up and continued working. We all did.

Day 2 - CheatCodes 2001 Redesign.

Day 2 - CheatCodes 2001 Redesign.

Fast forward 8 years.  October 2009.

SteveJ and I plan 4 days of solid work (I bought Harlyn out of his shares last year). We set everything up in his office and head to the grocery store.  Our cart consisted of:

  • 2 cans of sugar free Red Bull. (yeah, two).
  • 1 can of Whoop Ass (energy drink)
  • A variety of low calorie drinks and flavored water (SJ proclaimed that the Smart Water “Fuji Apple” was “AWESOME”)
  • A small bag (single serving) of Sweet Maui Onion chips
  • Medium bag of baked organic crackers (low fat)

We looked down at the cart and realized how sad things have become…. we were content with our purchase… yikes…

We did work a lot. And we even stayed up until 4am one evening, but the next day we were really tired and had to take a mid-day break (we watched “Old School” in SJ’s theater room).  We decided that, for productivity’s sake, we stop working at midnight or 1 next time.

What a couple of wimps we’ve become.

Although, Janet said I should title this post, “What happens when geeks get old, and their loving/caring wives don’t want them to blimp-out or get high-cholesterol.”

General25 Sep 2009 11:24 am

Don't Trust Anyone

General23 Sep 2009 09:59 pm

In the magazines/school-supplies/cleaning-supplies aisle of Albertson’s down the block, they have a rack of paper-back books.  Over the past couple years, they consistently have a David Sedaris book.  I know this because I remember seeing “Me Talk Pretty One Day” for months – and laughing every time I saw it.  But I never bought it.  I also saw “Naked” and “When Engulfed in Flames” – and I never bought those either.

When Uncle Alan would visit us here in Albuquerque, he’d occasionally ask (okay I think twice in 5 visits, but  he did ask) if I read any David Sedaris.  My response was the same both times he asked: “Oh yeah – I’ve seen those books – but no, I haven’t read any.”

A few weeks ago I was at a Barnes and Noble and they had a sale (buy 1 get on at half price) and I picked up a book that I wanted, and searched for one that I’d get for half price.  BOOM – When Engulfed In Flames.  I started reading it the next day, and laughed my (large) butt off.  He’s really funny – in a sometimes subtle, sometimes blunt way.  He uses words to give a very funny picture of situations and events.

I finally picked up “Me Talk Pretty One Day” and read it quickly as well – and I laughed more than I did reading WEIF.

The next time I see a David Sedaris book at the grocery store – I’ll pick it up :)

General23 Sep 2009 09:40 pm

Over the past couple weeks I was recommended a couple of shows, and I finally decided to check them out.  I had actually never heard of either one (or more likely, I’d seen their ads multiple times, but was reading or working or just not paying attention), so I never even thought of watching/tivo-ing them.  Thanks to NetFlix (and a couple other online “methods”), I was able to see the first couple seasons of each, and they were very entertaining.

The first show, Leverage, with Timothy Hutton, is a “Con-Artists go Good” show (ala A-Team), that is a LOT like the U.K. show “Hustle”. I enjoyed Hustle, but I think the back story for the characters in Leverage is better, and the shows stick together a bit more.  I enjoyed both seasons.

The second show is Sons of Anarchy.  How in the WORLD did I miss the first season of this show?!  It’s like a Sopranos meets Hell’s Angels.  It’s an amazing show – very well written and very well acted – on par with Breakin’ Bad – I don’t know why they don’t have any Emmy nominations.    If you liked The Sopranos, you’ll really enjoy Sons of Anarchy as well.  The second season started a few weeks ago, and it’s getting very intense.

On a side note, my half-day on the set of Breaking Bad went swimmingly. As an “Extra w/ car”, my job was pretty simple – walk down the street a bunch of times – sometimes talking (without making any noise), and sometimes alone.  And definitely not taking notice of the two DEA agents discussing something in a Jeep.  So, on episode 3 of season 3, keep an eye out for a dude in khakis and a light blue shirt walking with a back-pack and talking (but not).  You may even be able to see the back of the 355 in the distance.

The crew of Breaking Bad – totally awesome.  The set I was on only had a couple of the famous actors (Just Hank and Gomez pretty much) and the rest of the crew, but it was very well organized.  The AD (that’s movie speak for an assistant director) in charge of “herding the extras” was really nice and helped us a lot. She mentioned that I’d be surprised at how many people can’t walk and NOT look at the camera and actors. She also answered a lot of questions and was really nice throughout the morning.  If the casting company calls for more extras – I’m there.  Janet was a bit sad that she didn’t get called, but they’ve got more episodes to shoot, so hopefully she’ll get the chance.   Oh, and I made a whopping $89 bucks!  BOOYAH! PURE PROFIT!

Audio/Video17 Aug 2009 09:42 am

This came up on my iTunes shuffle this morning while working, and brought a nice little tear to my eye – so many memories :)   Buckaroo Banzai fans will recognize it as the song Buckaroo played on the piano during his concert.  The original is by the Skyliners, but I have suprisingly come to like the Motley Crue version better…

There’s a version on youtube at: http://www.youtube.com/watch?v=NJ84O6FhepI  It has some Final Fantasy video attached to it – I’m not a FF player, so it made no sense to me, but it is visually interesting none-the-less…

The Buckaroo Version (Who knew Peter Weller could sing!?)

The Skyliner Version

Audio/Video and Family & Friends29 Jul 2009 11:44 am

Last year, during one of my trips taking my grandfather to one of his appointments, the topic of music came up. (I know – I ended a sentence with a preposition, sue me…). He always appreciated classical music, while I like it, but only in spurts, depending on my general auditory-mood. I mostly just like Mozart, Chopin, and a few others, while his favorite was Chopin.

He mentioned that he clearly remembered the first album he ever bought, when he was 10 or 12 (This must have been mid-1930′s then I suppose). It was a performance of Poet and Peasant. His brother let him play it on his record player. He remembered playing it over and over, but having been so long since he listened to it, he couldn’t remember much of the score.

Later that evening I found a copy on iTunes and made him a CD that included Poet and Peasant, as well as several of his favorite Chopin pieces.  I listened to it several times and really enjoyed it – I even put it on my phone and nano for when I worked out.

So, a couple days later, on my next trip over, I suprised him with the CD and said it had Poet and Peasant on it. I put it in his CD player and pressed play. We both sat and listened to it.  I was quite proud of myself for bringing him this reminder of his early days, as well as enjoying it myself. After a few minutes he said “AH! I remember this song clearly now!  But, I don’t remember why I liked it so much…”

He enjoyed the Chopin more than the Poet and Peasant.  There’s a very nice version of P&P on YouTube here.

Next Page »