State Of The Bicycle – February 8, 2010

February 8th, 2010 joelhainley No comments

Busy week at work and I didn’t get to ride much this week. However I was able to get out for a good long ride on Sunday.

Weekly Recap:
starting weight: 219
ending weight: 214.5
total mileage for the week: 107.6
total calories burned this week on the bicycle: 7365

Categories: bicycle Tags:

State of the Bicycle – February 1, 2010

February 1st, 2010 joelhainley No comments

The riding week have a few rain days in it this past week, and I was out of town this weekend so I didn’t hit my mileage goal for the week. I’m pretty happy with what I was able to get done during this week and I think overall things are looking pretty good. This posting also marks the first month of being back on the bike regularly as well as the first full month making a focused effort at dropping some weight, the weight loss as been somewhat successful and hope that it will continue over the next few months.

Weekly Recap:
starting weight: 225
ending weight: 219
total mileage for the week: 74.6
total ride time for the week : 05:08:51
total calories burned this week on the bicycle: 5588

Monthly Recap:
starting weight: 242
ending weight: 219
total mileage for the month: 494.3
total ride time for the month: 13:20:05
total calories burned this month on the bicycle: 37,757

Overall it was a pretty good month, the total mileage on the Cannondale is up to 5,324 miles, and it is still trucking along just fine. I need to spend some time adjusting the front brakes, and tuning the shifting a bit but that’s normal stuff. Colin has been giving me a hard time about having a rack and a rack bag on my bike but that rack has been following me around for the last 5324 miles and it’s never complained once so I’m inclined to leave it right where it is.

Categories: bicycle Tags:

State of the Bicycle – January 25, 2010

January 25th, 2010 joelhainley No comments

A lot of rain came in this last week. So for most of the week I spent time riding on the indoor trainer, listening to books on tape. Good workouts for sure, but nothing beats getting out and putting some pavement under your wheels. On Saturday I got out for a ride with Colin and ended up with 75 miles for the day. Colin introduced me to the beauty of espresso and I don’t think I’ll ever be the same. Good Stuff!

starting weight : 229.5
ending weight : 225
total mileage for the week : 75.7
total ride time for the week : 06:29:05
total calories burned this week on the bicycle : 7987

Hopefully the weather will cooperate a little more this week and I can get out and put some miles on, if not, I’m right in the middle of Spook Country by William Gibson and it’s starting to get good! Well that’s it for the week, go ride your bike.

Categories: bicycle Tags:

SQL Server Notes #3 – Except and Intersect

January 24th, 2010 joelhainley No comments

I’m sure you’ve all heard about the Union operator, it joins result sets together into a single record set. I haven’t used UNION very often but it’s definitely one of those operations that you are happy for when you need it. The thought of having to write a bunch of temporary table, select/insert queries to get the same data is not an appealing one.

Along with UNION there are two other similar operations that perform logic upon those result sets instead of just pushing them together and returning them. These operations are EXCEPT and INTERSECT. Some of you will probably be laughing at me when I tell you that I wasn’t aware of the EXCEPT and INTERSECT operators. Well you don’t have to laugh any more because now I know! Simply put these operators do much the same thing as UNION except that they perform comparisons between the results of two queries and produce a result set based on the existence of the records in both tables. Good stuff.

ASP.NET AJAX AutoCompleteExtender not working

January 19th, 2010 joelhainley 2 comments

I was working on some new features for a client recently and they had a need for an AutoCompleteExtender on one of their forms. I hadn’t used the AutoCompleteExtender yet so I read through the documentation, coded up a webservice, and added  the appropriate items to the page and ran the app. When I tried typing into the TextBox that the AutoCompleteExtender was pointed at, nothing happened. In this posting I will detail the things that I looked at, and try to put together an accurate guide to making sure you’re AutoComplete works. I tried some of the “tips” that are out there after I had things working and they don’t help. So hopefully this will be a bit more definitive and useful than what I came across.

The first thing that I looked at was the method signature of the webservice. The documentation indicates that you need to use one of the following method signatures :

public string[] GetCompletionList(string prefixText, int count) { … }

..OR..

public string[] GetCompletionList( string prefixText, int count, string contextKey) { … }

What the documentation doesn’t tell you is that the name/spelling/capitalization of the method signature must match EXACTLY. If you decide that you don’t like the camelcase on the prefixText and want to use prefixtext instead….IT WON’T WORK. So make sure you have those signature matching correctly. I have seen some indications on the internet that you should use a static method such as :

public static string[] GetCompletionList(string prefixText, int count) { … } // !!! DON”T DO THIS !!!

DON’T DO THIS. It doesn’t work. Only the exact methods defined in the documentation and shown above will work.

Back to my project, I get these methods defined properly, compile the project, go to my textbox start to type and still I get NOTHING. So I look over the documentation and see some information about the class/method attributes that must be added. The documentation shows the following :

[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] GetCompletionList(
string prefixText, int count) { … }

What they don’t show in the documentation is that you need to also add the following to the class definition

[System.Web.Script.Services.ScriptService]

So I make these changes and run the application again, and STILL it doesn’t work. I’m stumped. I put a break at the webservice method and run again and it’s not even hitting the webservice. After a little bit of digging I come across Adding ASP.NET AJAX Configuration Elements to an Existing Web Site and a lightbulb goes on. This project was not setup as an AJAX.NET site, in fact it predates ASP.NET AJAX by a couple of years. Sure enough as I start to dig through the documentation I notice mappings to handlers for the webservice calls. So I follow the changes specified and run the site and it worked!

It took me a while to get this figured out, and I suspect there might be a few others out there that might have some problems getting this working. Below is a complete class that you can use as a reference. I haven’t included any of the code defining the AutoCompleteExtender because the documentation seems sufficient and I didn’t have any problems. There is also a video on the ASP.NET AJAX site that walks you through configuring your first AutoCompleteExtender and does a good job, as long as your site is configured properly!

Good luck!

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using DALInterface;
using CGWeb.framework;

namespace CGWeb.webservices {
///


/// Summary description for NewDXCompletion
///

///

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class NewDXCompletion : System.Web.Services.WebService {

[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] GetCompletionList(string prefixText, int count) { … }
}
}