Oct 27, 2009

My new obsession? The Droid!

Okay, it's finally time for me to carry on about my newest obsession, the Google Android based group of phones scheduled to hit Verizon soon™. What was initially thought to be campaign aimed at the Motorola Droid (a.k.a. Tao/Sholes). However, it’s been recently discovered that it’s actually a full “marketing blitz” for a range of Android OS phones on “Big Red”.

Known so far:
Motorola Droid
HTC Droid Eris (re-brand of HTC Hero)

Motorola Calgary (Running Moto BLUR UI)
HTC Passion (Possibly the Dragon & running a Snapdragon 1GHz processor)

But that’s not of concern to me, I’ve got my eyes on the Moto Droid, it’s a wonderful bit of tech & may be enough to make me learn Java, just to be able to write apps for it!


It’s also supposed to come with this sexy dock, that turns it into an alarm clock! Woot!!!


The kicker for all of this is that it’s supposed to NOT be locked down by Verizon like all of their non-smartphone offerings.

So, needless to say, I’m really “geeking out” about this & can’t wait until tomorrow morning, when all will be revealed!

Aug 28, 2009

ASP.Net Custom Paging Control

I've been playing with GridViews for quite some time & have always wondered if there's a better way of displaying the pager at the bottom, instead of the "1 2 3 ..." that you get by default.

As it worked out, I had the reason today to look more into this for a customer request. I happened to find an article that gave code to do this. It was a decent starting point, but I didn’t like how the records displayed were numbered from 0-(count-1), but it got me going.

Here’s what two options I’m considering using:

This one uses media player type links (i.e. |< << >> >|)
<asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server" Style="color: white">|&lt;</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="LinkButton2" runat="server" Style="color: white">&lt;&lt;</asp:LinkButton>
[Records <%= (Grid.PageIndex * Grid.PageSize)+1 %> - <%= Grid.PageIndex * Grid.PageSize + Grid.Rows.Count %> (<%= iTotalRecordCount %>)]
<asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server" Style="color: white">&gt;&gt;</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Last" ID="LinkButton4" runat="server" Style="color: white">&gt;|</asp:LinkButton>
And this one has words for First/Last as well:
<asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server" Style="color: white">&lt;&lt; First</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="LinkButton2" runat="server" Style="color: white">&lt; Prev</asp:LinkButton>
[Records <%= (Grid.PageIndex * Grid.PageSize)+1 %> - <%= Grid.PageIndex * Grid.PageSize + Grid.Rows.Count %> (<%= iTotalRecordCount %>)]
<asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server" Style="color: white">Next &gt;</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Last" ID="LinkButton4" runat="server" Style="color: white">Last &gt;&gt;</asp:LinkButton>
One caveat, I use a variable iTotalRecordCount that is defined on the code behind:
public int iTotalRecordCount = 0;
And defined in a BindGrid() method I call on button click:
iTotalRecordCount = dataTable.Rows.Count;
Lastly, you need to implement the "OnPageIndexChanging" event:
    protected void Grid_PageIndexChanging( object sender, GridViewPageEventArgs e ) {
Grid.PageIndex = e.NewPageIndex;
BindGrid( );
Anyway, I hope someone out there finds this useful. :)

Aug 27, 2009

BlizzCon & the state of Warcraft

Well another BlizzCon has come & gone, but alas, this time I was left watching the con from my living room. They sold 20,000 tickets in less than 1 minute...that's insane!

One real benefit of buying the Internet Stream (not DirecTV in my house) is that I was able to watch the opening ceremony live, and then got to watch the rest of the segments "On Demand" from the website. If I had been there, it would have been "What did he say? Did I hear that correctly?" and then wait until I get to the hotel to see what the blogs/fansites were saying!

That being said, I'm writing these thoughts since Silvermoon-US is currently down, along with a BUNCH of other servers as Blizzards Battle.Net authentication network has a massive stroke. :S

Jul 9, 2009

New Mechwarrior Game Announced!!!

Woohoo, I'm sooo excited! I just read the linked article and am ecstatic to learn there's a "reboot" to the Mechwarrior series! From watching the trailer it looks AWESOME & fairly far along! Woot!

Jun 4, 2009

Warrior Caps!

Okay, so I'm trying to make sure that I've got all of my bases covered & after scouring over a TON of different posts on several sites, I believe I've compiled a concise list of the "soft caps" for a warrior. I've posted them here, so I can quit emailing myself this info & possibly help someone else out. Please feel free to comment below if my numbers are completely out of whack.

Hit Rating: 163
Expertise (Rating): 24 (189)
Defense: 540

Hit Rating: 165 (w/Precision)
Expertise (Rating):
- 18 (149) with Weapon Mastery
- 26 (214) without Weapon Mastery

Hit Rating: 263
Expertise (Rating):
- 18 (149) with Weapon Mastery
- 26 (214) without Weapon Mastery

Apr 20, 2009

More Boxee Love - My BoxeeBox

Okay, so to alleviate the issues from my previous post, I'm building a "new" BoxeeBox for use as my primary Media Center. Here are the parts I'm getting:
Several GREAT features of this motherboard:
  • Integrated 780G chipset (which includes the Radeon HD3200) and is discussed in-depth at Tom's Hardware Guide.
  • HD3200 features an embedded Universal Video Decoder (UVD) providing hardware decoding support for MPEG-2, H.264 and VC-1!!! Given this sort of hardware support, Tom's said that you could even use an AMD Sempron 3500+ to play back Full-HD.
  • HDMI Output direct to HDTV
  • eSATA connection for fast access to external storage
Also, on a whim, I saw a great deal on a refurb Sony Blu-Ray drive at Buy.com ($69.99)and so I picked one up. The Blu-Ray drive got here late last week, but the rest of the parts aren't scheduled to appear until Tuesday/Wednesday. I'll fill you guys in with a more detailed report, once I get the Case/MB/CPU in-hand & start the build!

Feeling the Boxee Love - Part 2

Okay, so I've been playing with Boxee for awhile now (almost 2 months). I started out with Boxee on Ubuntu Linux and I was really excited to get to use Linux again (and avoid the hardware heavy MS operating systems). Unfortunately, I was plagued with Samba/smb issues & couldn't consistently get the sources to work. Luckily, I was invited to participate in the closed Alpha for Boxee for Windows.

So, I reformatted the hard drive, installed XP & got to work with Boxee! So, a couple things of note here:
  • Don't use UNC names (i.e. \\MyComputer\MyMovies) as a source, map it to a drive instead.
  • Don't map drives to "internal" boxee drive letters (H:, Q:, T:, U: and Z:).
I hijacked my wife's wireless keyboard/mouse to use & it makes life MUCH easier to manage/play. I was extremely impressed with how well the new nVidia software handles connection to a HDTV via DVI=> DHMI adapter. It allows you to "tweak" the settings & nailed the resolution the first time out.

All that being said, a couple other "hardware issues" I had include:
  • An old Athlon XP CPU was not "up to snuff" for playing back DVD or HD content.
  • Wireless (802.11g) introduced additional latency that caused some streaming content to be "jumpy" (especially http://trailers.apple.com).
  • Having a loud computer next to your TV sucks. :(

Apr 3, 2009

Nesting a Repeater inside of a GridView that is bound to an Array of Custom Objects

Wow, isn't that title a mouthful! But that's exactly the situation that presented itself to me at work this week. Since it too me way longer than I thought it should to figure out, I figured I'd put my effort in here, just in case it might be able to help someone else out someday (possibly even me).

Here's the results:
#NameEmail Addresses
1Ian CazabatIanCazabat@Example.com
2Malcolm ReynoldsCptnMal@Example.com
3Jonas BlaneSnakeDr@Example.com

So, without any further delay here's the code:
<%@ Page Language="c-sharp" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Nested Sample</title>
<form id="form1" runat="server">
<asp:GridView ID="gvNestingSample" AutoGenerateColumns="False" runat="server" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical">
<RowStyle VerticalAlign="Top" BackColor="#EEEEEE" ForeColor="Black" />
<asp:BoundField DataField="EmployeeId" HeaderText="#" />
<asp:BoundField DataField="EmployeeName" HeaderText="Name" />
<asp:TemplateField HeaderText="Email Addresses">
<asp:Repeater runat="server" ID="rptEmailAddrs" DataSource='<%# DataBinder.Eval( Container.DataItem, "EmailAddresses" ) %>'>
<a href="mailto:<%# Container.DataItem %>"><%# Container.DataItem %></a><br />
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page {
protected void Page_Load( object sender, EventArgs e ) {
UserAccount[ ] aryUserAccounts = new UserAccount[ ] {
new UserAccount( 1, "Ian Cazabat", new string[] {"IanCazabat@Example.com", "Ian.B.Cazabat@Example.com", "IanCaz@Example.com"}),
new UserAccount( 2, "Malcolm Reynolds", new string[] {"CptnMal@Example.com", "Serenity1@Example.com"}),
new UserAccount( 3, "Jonas Blane", new string[] {"SnakeDr@Example.com", "303rdLSG@Example.com"})

gvNestingSample.DataSource = aryUserAccounts;
gvNestingSample.DataBind( );

public class UserAccount {
private long employeeid;
private string employeename;
private string[ ] emailaddresses;

public long EmployeeId {
get { return employeeid; }
set { employeeid = value; }
public string EmployeeName {
get { return employeename; }
set { employeename = value; }
public string[ ] EmailAddresses {
get { return emailaddresses; }
set { emailaddresses = value; }

public UserAccount( ) {

public UserAccount( long lEmployeeId, string strEmployeeName, string[] aryEmails ) {
this.employeeid = lEmployeeId;
this.employeename = strEmployeeName;
this.emailaddresses = aryEmails;

Okay, so there you have a working sample of how to create a GridView with a nested Repeater, that gets it's data from an Array of Custom Objects. Here's a couple points of interest:
  1. In order to bind on the data in the object, they must be created as "fields" using get/set.
  2. To access the array that's part of the object use:
    DataSource='<%# DataBinder.Eval( Container.DataItem, "{Array Property Name}" ) %>'
  3. To display the "data elements" from the array, you use:
    <%# Container.DataItem %>
  4. If the "data elements" in the array are custom objects, then you need to use the following:
    <%# DataBinder.Eval( Container.DataItem, "{Property of Custom Object from Array}" )%>
Okay, so that's about got it, hopefully I've helped someone out & I've likely kept myself from losing too much sleep over this issue again! So, go forth & create! ;)

Mar 9, 2009

So much for MythTV, I'm loving Boxee!!!

Okay, I wrote quite some time ago about my experimentation with MythTV & my pursuit of a HTPC (Home Theater PC). So, the initial requirement was to be able to play my DVD's, CD's & look at pictures on my 56" TV in the living room. MythTV met this goal, but also added quite a bit of complexity when you factor in the PVR functionality that it provides.

So, after weeks of playing with MythTV, I've been turned on to Boxee! Boxee is quite simply, a digital media player, that allows me to do the following:
  • Play existing Movies - DVD, ISO, mpeg
  • Play existing Music - CD, mp3
  • Browse Photo slide-show
  • Watch on-demand streaming media from CBS, MTV, YouTube & Hulu (right now via a hack)
  • Listen to streaming audio via the internet
  • Browse photos from Flickr & Picasa
All of the media options are available using a local Optical Drive (CD/DVD), local hard drive, or across your local network via SAMBA!

A great Blog post with a fairly detailed write-up on installing Boxee on Ubuntu 8.10 can be found at the OpenSourcePenguin.net. This is a nicely detailed piece, that doesn't waste time on a lot of unnecessary fluff.

I'll be following up with another post regarding using a remote & how the rest comes along!

Feb 26, 2009


Just had to take a second & link this great comic I saw referenced on Coding Horror that explains how to recognize good code during a code review:

Jan 9, 2009


Man, it's been a bit since I posted anything here...what a slacker.

Well, here's my newest time waster, MythTv. Several years ago, I bought a Sony 400 disc DVD changer, to keep little fingers from destroying my DVD collection (problem #1). Alas, the navigation in the unit was crummy & digging through the "library" to find a movie never really worked. I wound up putting labels in the DVD cases telling what spot the DVD was in, but this left problem #2, all the cases were still cluttering up the living room.

So, after 6+ years, I think I'm at the point where we need to move away from the beast, to a more useful solution, enter MythTv!!!

MythTv is a Digital Video Recorder (DVR) & multimedia server of sorts. It will let you watch all of your "stand alone" movies, view your pictures & listen to your music. In addition to all of this, it'll also allow you to record/pause/rewind live TV with the use of a TV Tuner Card.

Right now, I'm still infatuated with AT&T's U-Verse, so I don't really care about the DVR aspects, since U-Verse comes with a 4-tuner DRV (2-HD & 2-SD).

What I DO care about, is it's built-in ability to RIP & Playback DVD's, in addition to all of your other Media Files.

I've cobbled together a PC out of old parts, to play around with. My first cut is using MythDora which is a complete Linux distribution, based on the Fedora Core distro. Another great benefit of MythTv is that it lets you break off the server/storage part & run a dedicated "front end" for MythTv. Assuming I'm happy with how this performs, I'll be looking for a small front-end to put by my TV, while keeping the monster hidden away downstairs, or in a closet.

Ideally, there would be some way to access MythTv from my Wii, that's already taking up space. Wiire.org has some promising info based on streaming video from MythTv (Using MythWeb) to the Wii, using the Internet Channel.

Okay, enough for now...I'll post again, once I make more progress on this.