I'm an RIA Developer who owns a motorcycle custom paint shop, who loves to race anything with wheels. I also enjoy woodworking, cooking, fine wines, liqueurs and dark beers. So if nothing else my blog should be eclectic.  

Recent Posts

Aug 12 2008

Read text files one line at a time with ColdFusion

This is a pretty basic use of the how to capitalize on ColdFusion / Java, but I recently had to show someone else how to do this as well as use it myself today to parse a very large CSV file.

<cfscript>
    var f = "";
    var endOfFile = false;

    f = createObject("java","java.io.FileReader").init(arguments.csvFileLocation);
    f = createObject("java","java.io.BufferedReader").init(f);

    while (NOT endOfFile) {
        line = f.readLine();

        if (NOT isDefined("line")) {
            endOfFile = true;
            break;
        } else if (len(line)) {
            // {LINE PARSING CODE HERE}
        }
    }

    f.close();
</cfscript>

5 comments - Posted by Russell Brown at 11:38 AM : ColdFusion | Java | Development

Aug 2 2008

Thrice Baked Wedding Invitations

Some of you who know me, know that I'm getting married soon... Yesterday I ran into an issue that I felt was worthy of a short story. My girlfriend and I are trying to do a modest wedding and are keeping costs down where we can; one of the places we cut back was on wedding invitations and rsvp cards. We stopped into Michaels and picked up 3 DIY packs that should suffice our 100+ crowd of adults plus children and created them in MS Word. I have an small-office laser printer in my home office that prints faster than I thought was possible and it was WAY easier than I ever expected and we only spent $100ish dollars.

So 2 days after we printed them all and put them aside I get a call during the day: "Honey what are we going to do? All of the wedding invitations are still wet, and they smudge at the smallest touch!". When I got home that night and surveyed that they were in fact not drying that she wasn't nuts, I came to the most obvious conclusion that any sain purson could: "Lets put em in the oven".

Click Read More for Directions and Pictures!

Read more...

2 comments - Posted by Russell Brown at 1:19 PM : DIY | General News | Friends / Family

Jul 27 2008

Import MySQL into MSSQL (free/easy)

I needed to move several medium size MySQL backend apps to SQL server 2005 and did not have a cool tool for doing it. I found a way that was suprisingly easy... To do this you will need to install the ODBC drivers for your version of MySQL; I'm using MySQL 5.

Then in your SQL Management Studio, modify and run the following code.

EXEC master.dbo.sp_addlinkedserver
    @server = N'MYSQL',
    @srvproduct=N'MySQL',
    @provider=N'MSDASQL',
    @provstr=N'DRIVER={MySQL ODBC 5.1 Driver}; SERVER=127.0.0.1; DATABASE=db_name; USER=user; PASSWORD=pass; OPTION=3'

Then write seperate scripts that contain an instance of the following pieces of code per table in your MySQL db. In my case I had about 40 tables, so I wrote a ColdFusion job to do it smartly and added SQL to drop the target table if it existed.

SELECT * INTO [target_mssql_db].dbo.[target_mssql_table]
FROM openquery(MySQL, 'select * from mysql_db_name.mysql_tablename')

One of my apps had some tables with LOTS of rows, so I also set my script up to only run 5 conversions at a time to avoid timing out MSSQL locks. This should also work on MSSQL 2000 and I'm sure at least a few versions back of MySQL.

2 comments - Posted by Russell Brown at 2:24 PM : ColdFusion | SQL | MS-SQL | Development

Jul 21 2008

One of the best MotoGP races in years

I know many of my readers are more technical and I haven't blogged on anything non-motorcycles in a while but I had to post about the Red Bull U.S. Grand Prix MotoGP race on Sunday. After some marked improvements to Casey Stoner's Desmosedici GP9's electronics the 2007 world champion has been completely unstoppable in the last 3 races. Seven time world champion Valentino Rossi even joked before the Laguna Seca round began that he would have to shoot Stoner in order to stop him.

In an amazing show of talent and aggressiveness from both riders, Rossi was able to finally stop the train that is Stoner. Knowing full well that if he let Stoner stay in front for long that he was pull away, Valentino made multiple daring and aggressive passes in order to maintain his lead providing for some of the most exciting and breath taking racing the sport has seen in many years.

The wheel to wheel race was brought to an end though when Casey Stoner ran wide in lap 24 of 32 and dropping his bike in the gravel. However the duo had been racing so hard that they had already obtained more than a 25 second lead on third place. So while Stoner was unable to re-challenge Rossi, he was still able to retain second place.

If you've ever wanted to check out a MotoGP race, I would highly recommend looking into this round and if you follow the "Read More" link you can view some video from YouTube.

Read more...

2 comments - Posted by Russell Brown at 7:01 AM : Motorcycles | Racing | Reviews

Jul 18 2008

Batman: The Dark Night Review (no spoilers)

In short: The Dark Night continues what I think Batman should have always been: Dark, gritty, sadistic and ugly. Heath Ledger steals the movie with an amazing representation that makes Jack Nicolson's version look like a cotton candy parody.

Soon after Ledger's passing and reading early reviews of "The Dark Night" I was sure that his acting was being exaggerated as some sort of tribute to him. After all, the acting and storyline in Brokeback mountain won tons of awards and accolades; but in truth it sucked and if wasn't for the premise and social mind job would have been straight to video...

At first I was not in favor of Heath's voice, but after several short dialogues I was convinced it was just what was needed... Ledger’s physical acting was immense; his ever so slight facial adjustments, the way he walked and even held a knife was phenomenal. He even pulled off some full theater audiance laugh grabs while never leaving his dark character. The storyline behind the Joker was also perfect. No BS story no cause to fight for... nope he just enjoys to fuck with humanity and test people and their limits!

So while Christian Bale plays to a T the tortured hero and Aaron Eckhart plays a nailed Harvey Dent / Two-Face and Michael Caine plays my favorite butler; the movie is definetly stolen by the lead villain The Joker!


My only bad comments pick out two things that matter not to the story or movie that much…

  • Christian Bale’s voice when he is in Batman persona is too gruff and altered. Next to the Joker he sounds overplayed in a number of dialogue exchanges.
  • Maggie Gyllenhaal has stepped in to replace Katie Holmes as Rachel Dawes… To be honest I don’t think she pulled it off. She didn’t have the elegance that Katie did and somehow she managed to look horribly aged (she's only 30) and kind of ugly in a number of scenes.

 

 

Read more...

2 comments - Posted by Russell Brown at 3:58 AM : Reviews

Jul 11 2008

Review: SixSixOne Core Saver (Crash Tested)

In May 2008 my desire to get chest protection was heightened after a fatality at the race track involving a bike Vs rider collision. I did lots of looking and finally settled on a couple of products by a company called SixSixOne that seemed to meet most of my criteria

My initial reactions to the Core Saver were positive. Professional construction and good seems, It felt comfortable to wear and didn't seem to affect my riding position or any body movements. The shorts feel a bit odd at first; you wear them high to protect your hips. While they look a little funny, I have found them comfortable to wear and they do instantly appear to give me protection in places where I feel the thin hard armor in my Alpinestar suite lacks.

Crash Testing
This past weekend (7/4/08) I crashed during practice at Summit Point T4 in the rain/wet. Speeds were estimated between 90-100mph in the downhill slightly off-camber right hand sweeper. I downshifted a hair to late and after several tank slapper Esq wiggles/save attempts I was fairly violently thrown to the pavement about 10' short of the apex.

I took the full weight of the crash with my right shoulder and top right portion of my chest. After looking at my MRI images I feel fairly confident in saying that my new SixSixOne Core Save is what kept me from breaking both my collar bone and my shoulder blade. Instead I walked away with a fractured shoulder blade and some minor fluid build ups... I'm also pretty sure I would have a bruised keester and hips since I ended up hitting both pretty hard. I ended up leaving the track backwards in an upright position. Due to track conditions there was a drop off and my tail bone hit the ground pretty damn hard. Aside from a swollen thumb and my shoulder I have no other injuries.

A feature not highlighted on the spec sheet very highly is the padding on top of the shoulder. It’s a very think and firm padding that I know worked with the shoulder armor in my suit to help dampen my fall. Between this padding and the chest protection that I had no intention of testing out so soon, I definitely feel much safer at the track and on those weekend mountain runs. This armor will definitely be seen on me every weekend going forward.

The Bad / Areas of improvement

  • The Core Saver's back protection is not as full length as I think it should be. That is why I believe I would only recommend this to racers who also plan on wearing the Pro Bomber Shorts in junction with the Core Saver. The Pro Bomber shorts have a continuation of the back protector that meet up fairly closely. It Provides fantastic tail bone protection. That said, I still think SixSixOne should increase the back protector length
  • While there is a kidney belt, some improvements could be made in this area. For road racing I don't think it's much of an issue, but for cross use, such as off-road, snowmobiles and motocross, it would be a nice addition.
  • Venting: I don't get it, there are these nice vents on the front of the Core Saver, but you just cover them up with the strap for the kidney belt? This doesn't seem to have any ill effect, just a "duh" kind of comment...

 

 

Review Low Down

  • Highly recommend the Core Save to any street rider and the Core Saver + Pro Bomber Shorts to any racer.
  • Won't win you sexiest racer if you get caught wearing just the shorts.

Read more...

1 comments - Posted by Russell Brown at 2:32 PM : Motorcycles | Racing | Reviews

Jul 8 2008

Remote Desktop Key Binds/Shortcuts

Maybe everyone just knows all these, but for some reason I forget from time to time.

Shortcut Description
ALT+HOME Displays the Start menu.
CTRL+ALT+END Brings up the Windows Security dialog box.
ALT+PAGE UP Switches between programs from left to right.
ALT+PAGE DOWN Switches between programs from right to left.
ALT+INSERT Cycles through the programs in the order started (same as ALT+PAGE Up I think)
CTRL+ALT+BREAK Switches the client between a window and full screen.
ALT+DELETE Displays the Windows menu.
CTRL+ALT+Minus (-) Snapshot of the active window; same functionality as pressing PrintScrn on local computer.
CTRL+ALT+Plus (+) Snapshot of the entire client window area; same functionality as pressing ALT+PrintScrnon local computer.

 

1 comments - Posted by Russell Brown at 11:54 AM : Debugging | Windows XP | Development

Jun 20 2008

FireFox 3 has Infinet Loop Protection

I had to write a conversion utility to move an old database contained a few hundred thousand records from MySQL to MSSQL, making the structure more normalized and running some calculations, bla bla bla. In my need to bang this out quickly and since it was a one time throw it away app I wrote a quick ColdFusion script to do the transformation for me and save some time.

I decided to run in blocks and do a CFLOCATION at the bottom of the page, essentially creating on the fly pagination of my work.

Well as an FWI for developers, if FireFox redirects too many times you get a nice phat error... Not really a huge deal and nothing we ever have to worry about with a normal application; but this is something I had never run into before having always been an IE guy before FF3 beta...

1 comments - Posted by Russell Brown at 3:16 PM : ColdFusion | Debugging | Development

Jun 20 2008

Weather API? I need history...

I'm working on a side project that is racing related and I need to retrieve weather data for upwards of the last two years or at least all of 2007.

I don't want weather forcasts, thats easy to find. I'm looking for a weather report for what happened on dayX at zip code or lat/lon X/X. Even better would be if I could give more specific time information...

Does anyone have experience with a product that will allow me access to this information?

TIA

6 comments - Posted by Russell Brown at 2:24 PM : Development

Jun 18 2008

Al Gore is a Windbag

I dislike Al Gore for a number of reasons; his exploitation of environmental concerns to the tune of 10's of millions of dollars is just the tip of the iceberg, but last night I was cruising the dozens of world news RSS feeds in my beloved Google Reader when I ran across an article that joins the ever growing list of articles to again point a shadowing finger at Al Gore for his complete absurdness and do as I say don't do what I do persona.

The Tennessee Center for Policy Research is just one of the more recent publishers to point out Al Gore’s Hypocritical life style. Whether it's personal jets or using electricity at more than 20x the averge American Household rate, All Gore continues to give us reasons to call him a fraud!

"In the past year, Gore’s home burned through 213,210 kilowatt-hours (kWh) of electricity, enough to power 232 average American households for a month." -CTPR

Now you could tell me that the evil empire (G Bush) was using 30 times the power and I could care less. Mr. Gore has decided to preach to me that I should decrease my footprint by ME changing MY life. He has told 10's of thousands of people here and abroad that we should drive a smaller cars and make personal concessions so we don't hurt the environment as much, bla bla bla. Yet it appears he hasn't made a single personal consession aside about $16k in window upgrades after getting 'caught'.

When will people see this man for the scam artist he is and stop fueling his retirement?

6 comments - Posted by Russell Brown at 6:22 AM : Politics

Jun 17 2008

FireFox Record Not Looking Good: Service Unavailable

Not even 40 minutes into their "record breaking" download period of 24 hours and FireFox.com and mozilla.com are down with a "Http/1.1 Service Unavailable" and as of this blog post, FireFox Version 2 is the only available final version.

I just know someone is going to ask for a chad recount after this!

3 comments - Posted by Russell Brown at 1:51 PM :

Jun 17 2008

Be a lemming; download FireFox 3 Today

If you want to join in on the heard of sheep downloading FireFox3 final today, the downloading will commence at 1pm East Coast time. Which if you ask me is an odd time to make something available; and yes I will be one of the sheep downloading.

Hopefully plugin makers will be updating semi-quickly to the new stable release.

0 comments - Posted by Russell Brown at 8:11 AM : Development | General News

Jun 16 2008

Transfer: <property> and <manytoone> don't play well together

Last week I started a new project and I decided to use Transfer-ORM. So far I've been happy with it's offerings aside from one severe headach my limited knowledge on the product has created. In my database I have multiple depths of linking, I would like to leverage the <manytoone> ability of Transfer, howevere I also need to use these same fields in a readByPropertyMap call.

My goal is to be able to use eventId as a property while being able to "getEvent()" and get back a transfer object. The Issue: You can't have the same a column in your config as is the link column in a <manytoone>. Transfer is nice enough to create the supporting methods for your linked tables/objects, but fails to give you a convenient way to "filter" by them. I feel this is an utmost basic use of object based design but I could be wrong.

The "Solution":
<object name="ObjectName" table="tblName">
    <id name="sessionId" type="numeric" generate="false" />
    <property name="eventIdLink" column="eventId" type="numeric" ignore-insert="true" />

    <manytoone name="Event">
        <link to="events.Event" column="eventId"/>
    </manytoone>
</object>

  1. I appended "Link" to my property name. This is how it needs to be referenced in the readByPropertyMap()
  2. Added ignore-insert="true" to my properties
  3. renamed my nodes to the Object of what is returned.

I really think that if I should be ably to have a <property> named eventId and a <manytoone> named event on column eventId and have the app just know not to try and build 2 setEventId methods. Hopefully this will save someone else a few minutes time in their playing with Transfer...

 

2 comments - Posted by Russell Brown at 11:31 PM : ColdFusion | Development | Transfer

May 29 2008

FireFox in Search of Guinness World Record

Thats right. When FireFox 3 goes live sometime in June they are hoping to declare a "download day" and set the record for most software downloads in 24 hours. You can check out their FireFox Download Day Headquarters where you can pledge your allegence to the rebel forces, I mean FF.

I have to say, I've been using FF3 since beta 2 and I think it is a huge improvment over FF2 and for the first time a huge improvement over IE7. I have to admit I couldn't get on the FireFox bandwagon until this release came out. Now I can't wait for it to go live so the rest of these small bugs can go away and more plugin developers update to the new version campatability.

0 comments - Posted by Russell Brown at 7:35 AM : Development

May 28 2008

Motorcycle Road Racing Update

This past weekend brough fantasic weather to the Summit Point Motorsports Park in West Virginia. The holiday weekend race was 4 days long with 2 days of track practice and 2 days of racing. Unfortunently for team EmpireGP we showed up a bit too late for the absolutly jammed packed weekend and ended up getting a less than ideal pit spot in the paddock. On the plus side though, our area was much more relaxed.

Testing on Saturday went well but resulted in some so-so lap times maxing out in the upper 1:21's. However the bike was performing well and I wasn't feeling the need to destroy the machine before the weekend really kicked off. With a sold out event I was entered into 5 races: the GTU ,GTO, Unlimted GP (trophy dash), Middeweight GP and middleweight Superbike.

more details and pictures after the jump

Read more...

0 comments - Posted by Russell Brown at 7:39 PM : Motorcycles | Racing | General News

Previous Posts

May 22
May 19
May 13
May 13
May 13
May 12
May 12
May 9
Apr 30
Apr 29

Categories

Monthly Archives

Tech Blogs I Read

Motorcycle Links