House Update: Sheet rock is in place

August 29, 2009 at 11:17 am (Personal)

I have not posted anything lately. Work has been pretty hectic this last couple of weeks. It’s one of those times when several projects have the same deadline …

Well, but we’re really excited about the house progress … The inside sheet rock is in place! This means all the plumbing, electrical, central vac, furnace, etc is already in place! paint, carpet, floor, cabinets are soon to come. Things are looking good. I think we will really be moving on Oct 5th, which reminds me I need to have a talk with my current landlords.

I’m also thinking about how the move will take place. I busted my back the last time we moved. It was moving the washer. It was two of us moving it down some stairs and I must have made some wrong movement. It never hurt too much but I felt something in my lower back for ONE year!! I’m all good now but I now realize the dangers of moving heavy stuff.

So this time I’m getting some movers; they have the equipment and are used to lifting heavy things.

And here are some new pics (click on them for more):




Permalink Leave a Comment

Linq “outer join” on a non-nullable integer column

August 21, 2009 at 11:07 am (Computer Science)

Today I ran into a problem when running the following Linq query with an “outer join”.

from au in dcApp.aspnet_Users
where au.UserId == new Guid("X")
select new

The problem is that the Current Step is a not null column in the database; so it is of type int not int? . But in this query, I’m using Linq to get the ApplicantInfo row associated with the aspnet_Users row. The ApplicantInfo row might or might not exist. When the row does not exist linq is trying to convert that null into an int type so you get the following error:

“The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.”

What is really interesting is that it is only throwing that error with the CurrentStep column in the ApplicantInfo table, not with the FirstName or LastName cols that are also not null in the db. This probably has to do with the fact that the string type is a reference type (and the int type is a value type) and C# treats strings in unique ways.

This is the work-around I came up with:

from au in dcApp.aspnet_Users
where au.UserId == new Guid("X")
select new
   CurrentStep = au.ApplicantInfo == null ? "" : au.ApplicantInfo.CurrentStep.ToString()

Permalink Leave a Comment

Getting an ASP.NET CheckBoxList to work with a RequiredFieldValidator

August 13, 2009 at 6:14 pm (Computer Science)

I ran into a situation where I needed the System.Web.UI.WebControls.CheckBoxList to work with a System.Web.UI.WebControls.RequiredFieldValidator.

I found a clever and really easy way to fix it. I subclassed the CheckBoxList class to add the ValidationProperty that the RequiredFieldValidator is looking for.

Just declare this class:

public class ValidateableCheckBoxList : CheckBoxList
    public string ValidateableProperty
        get { return (this.Items.Cast<ListItem>()
            .Where(i => i.Selected).Count() > 0) ? 
            "something was selected" : ""; }

And instead of using a CheckBoxList in your code, use a ValidateableCheckBoxList.

On the aspx file you can now work with the ValidateableCheckBoxList just like you would with a plain TextBox. I’m not a JavaScript guru so I did not implement or even thought about how to implement the client side validation.

        <ans:ValidateableCheckBoxList runat="server" 
            <asp:ListItem Text="asdf" />
            <asp:ListItem Text="asdf" />
            <asp:ListItem Text="asdf" />
        <asp:RequiredFieldValidator runat="server" ID="rfvTest" 
            ControlToValidate="testCheckBoxList" Text="Failed validation"  />

Permalink 5 Comments

Went to the Alpine jump and slide

August 12, 2009 at 1:16 pm (Personal)

Yesterday we drove to Alpine just to have some fun in the water slide and at the bike jump. Click here for some pictures.

5252_115398244274_601944274_2179432_2382345_n  DSC02908

I did the jump twice. The first time was still pretty scary and the second time I felt on control. I still don’t have the pics and video taken of me doing the jump but I will have them in a couple of days and will share with you.

Permalink Leave a Comment

Did the bike dive into pond!

August 10, 2009 at 9:37 am (Personal)

I went biking with Cody, Shawn, and Bridger to the Alpine area yesterday. We did a 16 mile ride which was very tiring; mostly because it had a lot of uphill that was very steep; and some areas were so rocky and insanely steep that you had to hike-a-bike.

But on our way to alpine we went through the sliding rock (nobody went in the water though) and the insane bike jump that lands into a pond . On the jump, we saw a bike left by other divers, it did not have a seat, the breaks did not work, and it had no pedals. There was also a life jacket nearby.

All the necessary diving elements were there, so Bridger and I decided to go for the jump. We tied up the life jacket to the bike (so the bike would float after the dive), and we went for it. Here’s the video: (currently only on Facebook, will upload it to YouTube once I have it)


Bridger did go first, which I’m glad because I was sure the bike was not going to break down when I did it =)

You fly pretty high and I landed painfully on my butt and lower back. That took off my wind. That and the cold water made me panic a bit when landing but soon after (5 secs that feel like an eternity) I felt ok. So I swam to the bike and then with it to the shore.

Permalink Leave a Comment

Problems with Windows 7 64bit and WMP54G

August 10, 2009 at 8:45 am (Computer Science, Personal)

I like Windows 7 and was really sad it did not work with my Linksys Wireless-G PCI Adapter (WMP54G). Linksys does not have a 64 bit driver for W7 (not even for vista actually).

But on vista 64 bit, the card works automatically after running the windows updates. That is not the case for W7. I even tried the Ralink drivers, which aparently is the brand of the chip on the Linksys card. I tried installing this driver and this driver with no luck.

My problem was that the driver installed successfully but I could not enable the card. So I guess I’ll go back to Vista 64bit on my home computer. I now wonder how well this is going to work on my Lenovo laptop at work; I’ll be trying W7 on it in a couple of weeks.

Permalink 3 Comments

7 miles does not cut it

August 6, 2009 at 8:47 am (Personal)

Yesterday I was going down Jacob’s ladder like maniac. It reminded me of last year. I got so much air on places i had forgotten you could get air. Good times. The dirt was very dry and sandy that it made you skid a bit more on the curves forced you to place your weight more in the rear tire.

But after the ride, we realized we were really not tired enough. We did the good old Clark’s, Jacob’s Ladder, Ghost Falls trail loop on Draper. It is 7 miles total and it used to be a pretty demanding ride. We’re thinking about adding 3-4 more miles next time by doing Ghost Falls twice by either going up the fire road (which sucks) or Clark’s trail.

But we’re so lazy that we did not add the extra miles yesterday =). Hopefully we do it next time, that is the only way to get to the next level of endurance.

Permalink Leave a Comment

Backpacking to Desolation Lake

August 3, 2009 at 4:58 pm (Personal)

Carol and I went backpacking this last weekend. We hit the trail on Friday after work as soon as possible, which ended up being about 6:40pm, then hiked the 3.5 miles 1900 ft of elevation to Desolation Lake. We got there right before dark (at about 9pm).

I did not do a lot of research on the Lake so I was surprised to see that there are about 5 really nice campsites in the lake area. And about another 5 not-so-nice ones, but they are still ok.

Since we got there when it was turning dark, we set up camp on the first site we saw. Luckily it was a really nice one. It was probably the most private of all since people did not have to go next to our site to get to theirs.

The hike was right on Carol’s limit so she did not join me on the exploration hike the next day. I took some secondary trails that had a really nice view of the lake. I also went to the park city side of the mountain to one of the lifts from what I think is “The Canyons” ski resort. The lift operation cabin was open so I went inside to take a look; there’s nothing surprising there, just a control board with some buttons and a key.

After my exploration hike, we had lunch (Mountain House freeze dried of course) on the lake shore, took a nap, and went back down.

We had a great time; it had been a while since we backpacked. The plan is to do it again soon.

Permalink Leave a Comment


Get every new post delivered to your Inbox.