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! ;)