Windows Media Center Digital Advisor Product Key

By hagrin - Posted on 24 January 2012

Now that I am basically married, the TV in our living room is more often playing movies like Waiting for Forever than sports like I used to when I was single. Sigh, those were the days. But, happy days are here again! I purchased a Hauppauge WinTV-DCR-2650 TV Tuner to use with my cable provider's CableCard so that I could not only watch TV on my computer, but also easily record games. The installation is easy and the TV Tuner uses Windows Media Center to display your TV content.

However, even following the supplied installation steps, I was prompted for a Product Key (not a Windows OS Product Key) to activate digital content in the Windows Media Center setup.

Huh?

To keep a long story short, at some point Windows 7 required a separate key to activate this content. At some point, Microsoft reversed their position and made it readily available to all users and the product key gets automatically filled in. However, some "older" motherboards run a BIOS version (ASUS for me) where this functionality wasn't included and you need a product key. Therefore, since it is no longer a product key protected application, I feel comfortable providing it here to help users get through the Windows Media Center setup. The product key is -

263DJ-2Y9YT-6X9G6-W28DB-697TF

If anyone has issue with me freely providing this key, please let me know ASAP; however, my research shows that this general PID has been made widely available.

Good luck and update your motherboard BIOS!

The KenPom Wisconsin Problem

By hagrin - Posted on 09 January 2012

Update 1/12/2011: Here's yet another explanation as to why KenPom is dealing with the Wisconsin issue and possibly how to fix it by Dan Honner.

It's early in the 2011-12 college basketball season and we already have a huge controversy on our hands! No, it's not the Xavier-Cincinnati brawl or even anything that is directly happening on the basketball court. Instead, the controversy is over Ken Pomeroy's ranking of Wisconsin #1 and #2 throughout the year even though they have already lost 5 of their first 17 games. It's been such a hot topic that KenPom has released a FAQ explaining why the system is rating Wisconsin so favorably.

I love KenPom's work. I am a paid subscriber to his site and it's the best $20 that a college hoops stat head can spend. I loved KenPom's work so much that I have built an in-house rankings system using scraped data from all over the Internet so I know exactly how hard his task is, how unforgiving the data is and how hard it is to "correct" outliers and, even more simply, "should" they be corrected. Being a computer scientist, building a ranking/predictive system really is one of the hardest things to do because you will be wrong and wrong often in a field like predicting sports outcomes and trying to objectively rank teams based solely on statistics.

All that said, the non-computer scientist in me (also known as the @GoodmanCBS side), can't seem to rationalize the current Wisconsin ranking even after the KenPom FAQ. Let's try and talk out why I have problem with my "idol's" rankings.

1. Problems at the top are significantly more magnified than problems near the bottom

I love college basketball more than 99.99999% of the humans on this planet. I'm the guy who watches every single minute of ESPN's 24/25 hours of basketball ... live. That said, even I am more interested with the Wisconsins of the world as opposed to the Towsons of the world. Let's take Towson. Towson hasn't even won a game in their last 35 games. Ouch. That said, Towson still isn't ranked at the bottom of the KenPom rankings almost definitely due to the fact that they play in the relatively strong CAA. If Towson doesn't win their next game at home vs William & Mary, they will have almost a 50/50 shot at going winless in conference play this year (currently a predicted 35.1%). Since December 30th, Towson has lost 3 games ... and moved up 3 spots in the KenPom rankings! There are actually 4 teams ranked worse than a team that has lost 35 in a row and who has a 35.1% chance of going winless in their conference.

Does anyone care? Not really. In fact, Towson's ranking could in fact be correct although part of me doesn't think it is (it's either too low or too high, but it shouldn't be 340). However, this emphasizes the point - Outliers at the top of the rankings are magnified by factors of ten.

College basketball is a sport where really the majority of people only follow the top 40 teams and maybe the hardcore fan follows the top 100-150. With only 68 teams making the tournament, fans subconsciously draw a line at those top teams and pretty much ignore the other teams. Therefore, when there is such a glaring outlier at the very top of your rankings, there is a natural reaction to invalidate everything else underneath which is why this seems to have generated so much interest.

2. The ability to win is being undervalued

KenPom is 100% right when he states "The point is, for predictive purposes, simply looking at who a team has beaten or lost to is short-sighted". However, I don't think it's as simple as winning or losing. Some teams, despite their talent, have an innate ability to win and lose games that I do think is measurable by the amount of wins and losses you have.

They say that "winning on the road in college basketball is one of the hardest things to do". Therefore, the reverse must also be true - that winning at home should be one of the easiest things to do. Wisconsin, in the past, has always played beyond their talent level at home. Bo Ryan, the Wisconsin coach, had a record of 152-11 (93.3%) at home compared to an overall record of 242-91 (72.7%). That means, doing some quick math, Wisconsin is 90-80 on the road which is basically a few games within a margin of error of being a .500 team.

With all that said, if a team already has THREE home losses and one to a vastly inferior opponent in Iowa (Wisconsin was a KenPom 98% predicted to win for that game), the ratings must adjust accordingly. Where KenPom and I diverge is that I do think that a loss at home to Iowa and three home losses already, when this is a program that has only lost 11 in 11 seasons, is in fact a predictor of future outcomes since this team has proven more often than not that it doesn't have the same ability to win.

3. KenPom is (one of) the Google of the Hoops Prediction World

Google does everything through cold, unbiased algorithm data crunching. Therefore, when you search for something on Google, you don't always get the best result first. Does this make Google worthless as a search engine? Obviously, no. The same goes for KenPom - don't invalidate all the work just because of one team. In fact, all KenPom really gives its users is just another "tool" and college hoops fans need to make sure they use the full toolset when evaluating teams. Algorithms are an ever evolving thing and I am sure KenPom, in all his brilliance, will try and tinker with his algorithm, see how those changes affect past data and we'll see an ever more complex formula.

One other note - just like the Internet and search results, college basketball is a "moving target". The sport of men's college basketball constantly evolves. The players change, the strategies change, the arenas change and sometimes even the rules change. There is no Golden Forumla to rule us all, but it can provide us a tool to help us sort through the massive amounts of data.

Bonus Note - Gamblers Rejoice

Look, if we all know KenPom is overvaluing Wisconsin, yet Vegas continues to set lines very close to KenPom's simulated predictions, there's value there so stop complaining. Use the "mistake"/outlier to your advantage and fade Wisconsin when the lines don't make sense. KenPom already stated that Wisconsin is going to stay in the top few spots all year long so handicappers will have a great opportunity to fade a disappointing Wisconsin team.

Conclusion - DON'T PANIC

With all the above being said, who is to say that Wisconsin doesn't rip off 15 wins in a row now? It's January 8th, relax. One outlier in 345 data points is pretty good and I think most of us would say that KenPom's rankings are a very useful tool. Use the information given to you to draw your own conclusions, not piggy back the conclusions of other based on very good, but incomplete information.

Visual Studio 2010 Conditional Breakpoints with Strings

By hagrin - Posted on 24 December 2011

Here's a really simple tip that isn't exactly readily obvious to novice .Net programmers. You can check out my post on conditional breakpoints in Visual Studio 2005 for a more in-depth explanation as to what a conditional breakpoint is and why you would want to set one.

However, something I didn't cover was "what if I want to have a conditional breakpoint when a string variable is a certain value?". Seems simple enough but if you try something like strVariable = "something" or strVariable == "something", neither will work. So exactly how do you evaluate a string in a conditional breakpoint?

Simply do strVariable.Equals("something"). Intellisense even works!

Happy debugging!

Fixing the HTTP 500.21 Error - "Handler "PHP53_via_FastCGI" has a bad module "FastCgiModule" in its module list"

By hagrin - Posted on 10 November 2011

Recently, I have been working on several projects that I had only brainstormed for a few months and now it was time to actually start developing. One of those projects called for me to setup a new Windows 7 desktop to use PHP on IIS. After installing PHP through the "newish" Web Platform Installer from Microsoft, I tried browsing my PHP site and received a HTTP 500.21 error in my browser - "Handler "PHP53_via_FastCGI" has a bad module "FastCgiModule" in its module list".

Luckily for me, this is a very easy fix. Just follow these steps -

  1. Open up your Control Panel and go to the Programs section and choose "Turn Windows features on or off".
  2. Under Internet Information Services, select World Wide Web Services, then Application Development Features and check the box for CGI.
  3. Click OK and install.
  4. Load up your PHP webpage!

It's that easy! Good luck to everyone with their Windows based PHP development.

Fixing the Windows Update 0x80070005 Error

By hagrin - Posted on 15 August 2011

With our server administrator recently moving to a new position, I took the responsibility to make sure that all of our servers were up-to-date with patching. Little did I know that we had one server that had not been patched in a full year. Yikes! I went to patch the machine and received the 0x80070005 error code which doesn't tell you much.

Environment:
Operating System - Windows 2003 Server

Searching Google yields so many different answers - many of which don't work. The fix, however, is so incredibly simple.

Just stop the Indexing Service.

It really is that easy. Stop the Indexing Service and then go to Windows Update and you will be able to download and install patches with no problems on your Windows 2003 Server machine. Hope this helps!

Fixing Event ID 64 CertificateServicesClient-AutoEnrollment Warnings

By hagrin - Posted on 24 July 2011

While working on one of the older SQL 2005 servers that I manage, I notice a lot of warnings in the Windows Application Event log for Event ID 64 with the CertificateServicesClient-AutoEnrollment Source. Reading the General and Details tab of the message doesn't provide many specifics about the error so I decided to write-up how you would fix this issue -

  1. On the computer generating the errors, open up the MMC by clicking the Start button and then either using the search box or Run command and typing "mmc".
  2. Click on File -> Add/Remove Snap-in, choose Certificates, click Add, choose Computer account, hit Next, leave Local Computer selected, click Finish and Click Ok.
  3. Expand Certificates and select Personal.
  4. On the Personal list of certificates, look for certificates that have just expired or that are about to expire and either renew them or delete them if you don't need them anymore.

This should stop the warning messages from generating and hopefully this will fix your issue as well. In addition, I would suggest going through all the levels of your certificates and just doing a cleanup because certificate maintenance is something that many admins forget to do on a regular basis.

SharePoint 2007 / WSS 3.0 - Fixing the "Unable to Add Selected Web Part" ... "The File is Currently Checked Out" Error

By hagrin - Posted on 17 June 2011

Yesterday, I had to post a YouTube video to our SharePoint WSS 3.0 intranet site. If you're not familiar with embedding a YouTube post into a SharePoint page, your best bet is to use the Content Editor Web Part. However, when I went to add the CEWP today, I was receiving the following error -

Unable to add selected web part(s). Content Editor Web Part: The file is currently checked out or locked for editing by another user.

Huh? Before that, I also noticed that when I was trying to add the CEWP web part to our home page, I was able to see the content, yet no other user was able to see the same content.

If you're struggling with this error, you'r in luck because the fix is simple. Just open up SharePoint Designer, navigate to the page that is giving you the error, right click on the page and select "Undo Check Out". That's it - once you do that, try to add the CEWP and it should work. Hope this helps!

C#.Net - Get Remote Computer Uptime

By hagrin - Posted on 15 June 2011

Recently, at one of my jobs, the company's virtual servers were experiencing random, unnoticed reboots that would occur so quickly that their monitoring software, ManageEngine's OpManager (which does an extremely pitiful job at reporting correct uptimes by the way), wouldn't even send out a down alert. Admins were only being notified when they logged onto the box and actually saw a reboot reason message box.

Therefore, to supplement OpManager, we wanted a script/page that gave an overview of all the servers and their uptimes/last reboot. I came up with the following code which will query on a single machine -

using System.Management;

...

ManagementScope scope = new ManagementScope("\\\\COMPUTERNAME\\root\\cimv2");
scope.Connect();
ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection queryCollection = searcher.Get();
foreach (ManagementObject m in queryCollection)
{
// Display the remote computer information
// http://msdn.microsoft.com/en-us/library/aa394239(v=vs.85).aspx - list of available attributes
Console.WriteLine("Uptime : {0}", m["LastBootUpTime"]);
Console.WriteLine("Computer Name : {0}", m["csname"]);
}
queryCollection.Dispose();
this.Close();

You can easily put the machines you want to query in a database or an array and run this code through a loop to query the uptimes of all your machines in an organization. You can also clean up the formatting of the LastBootUptime to be more readable, but that's up to the developer.

Hope this code snippet helps someone manage their networks.

SQL Reporting Services: Fixing the "No Letter Spacing" When Printing Problem

By hagrin - Posted on 07 June 2011

Seemingly out of nowhere, my users were complaining that while their SQL Reporting Services (SSRS) reports were displaying fine on screen once they printed them the font was all screwed up and possibly stretched horizontally. The font looked stretched and there was no spacing between the letters of a word. It happened on all machines using all printers to all users. It broke in a 3 hour window where no patching, reboots or changes were really made.

Our environment consists of -

  • SQL Server 2008 Standard Edition with SP2 64-bit
  • Windows Server 2008 64-bit
  • SQL Server Reporting Services
  • Virtualized using VMWare

After looking at program settings, print queues, etc., a very random internet search provided me with the starting blocks to how to fix this problem. It seems that the problem occurs when after the SQL Server is rebooted, the first person who logs in (usually via Remote Desktop) logs in with a session in 16:9 aspect ratio (widescreen). Weird right?

To fix this problem, you must do the following in this order -

  • Reboot the SQL Server
  • After the SQL Server has finished rebooting, Remote Desktop into the server using the following command - mstsc /v:SERVERNAME /admin /w:1024 /h:768 (this forces the needed 4:3 aspect ratio)
  • Now, try running your reports.

As a side note, just restarting the services did not fix this problem - a reboot was required. Hopefully, this helps some people and people are able to find this post (it was difficult to title this post to make it as helpful as possible). Good luck!

INNER JOIN on the Same Table

By hagrin - Posted on 04 January 2011

Here's something that always bugged me that I finally was able to figure out today (that in retrospect is so simple I don't understand why I struggled so much with it before).

If you've ever looked at the data stored in a SharePoint 2007 / WSS v3 database, you know that the AllUserData table stores an immense amount of list data. Say you had two lists - a list of Employees and a list of Tasks and in the Tasks list you had a Lookup field using the Employees list. You would have a setup like this to ensure data validation, manage a list of employees in a single location and other data structure reasons. So, how would you write a single, direct SQL query against the AllUserTable to return data in two different lists?

Look at the following query -

SELECT a.tp_ID, a.nvarchar1, a.nvarchar3, a.nvarchar4, a.nvarchar5, a.datetime1, b.nvarchar1, a.ntext3, a.tp_Modified
FROM AllUserData a
INNER JOIN AllUserData b ON a.int2 = b.tp_ID AND b.tp_ListID = '{a234a2a6-dbf2-4abf-b1d4-1544305b9cde}'
WHERE a.tp_ListId = '{4BE243EE-E100-4060-9921-840DEB0F54B0}' and a.tp_IsCurrent = '1' and a.nvarchar4 <> 'Completed'
and a.tp_Modified < '12/1/2010' and a.tp_ContentType = 'Item' and a.tp_DeleteTransactionID = 0x
ORDER BY b.nvarchar1, a.tp_Modified

There's two important aspects in the above query that you need to apply in your own queries. First, notice that there is an INNER JOIN statement that joins AllUserData a and AllUserData b. You effectively name the same table twice and designate it with an alias to differentiate the two lists you are trying to join. Second, notice in the INNER JOIN statement that there is an AND operator that allows you to focus your INNER JOIN on only relevant data inside that table.

Hopefully, this little code snippet helps you in your SharePoint development and SQL query writing.

Recent comments