Adsense

Saturday, March 08, 2008

How To Fix Dead/Stuck Pixels on a Playstation Portable (PSP)

So, I broke down and bought a Playstation Portable (PSP) this weekend. Lo and behold, it has a single stuck pixel. I didn't even notice it until I fired up a game for the first time, but there it is... A little, constantly red, annoying little bastard!

I really hate confronting retailers with returns, especially when its a single pixel that I'm complaining about. This wouldn't be the first time that I've done it though. But before I packed the PSP back up and headed for Best Buy, I figured I'd check online to see if this was a common problem. Unfortunately, it is a very common problem with PSPs and many people that have exchanged a PSP due to dead pixels, reports that their new unit has even more. So I count myself somewhat lucky to only have a single stuck pixel.

Luckily, I happened upon a post that talked about a little movie that that was originally distributed to help fix dead/stuck pixels on LCD TVs and monitors. The video is a series of screen that flash repeatedly in each of the colors that a pixel supports (Red, Greed, Blue.) The idea being that you can coax a stubbornly stuck pixel into working (or raise a dead pixel from the grave) by constantly forcing all of the pixels of the display to cycle through all of their possible states. (great idea!)

(Note: A stuck pixel is a pixel that only displays a single color (red in my case) and doesn't cycle to any other color. A dead pixel is a pixel that is black and never displays a color. The success rate seems to be higher with stuck pixels over dead ones.)

I downloaded the PSP version and have it currently running on my PSP, but some people have reported success in minutes, while other have had to let the video run for several hours. The consensus seems to be, that if the video doesn't fix your stuck/dead pixel in 24 hours, you might just be stuck with it.

I post this here, because I know of a lot of people that have stuck/dead pixels on their LCD monitors or laptop screen, and I figure that this might be worth a try on those as well. I'll post a follow up and let everyone know how it worked on my PSP. =)

You can download the movie file here, and read about it here.

Good luck and let me know if it works for you (especially when not used on a PSP.)

UPDATE

Well, I ran the video for probably 7 hours on my new PSP with no luck. The red little bastard pixel remained. Luckily, Best Buy was great at letting me return my unit for a new one. And I haven't been able to find any other stuck/dead pixels.

Hope you have better luck.


Thursday, March 06, 2008

'Logon failure: unknown user name or bad password.' message in Windows Vista on a Dell D830 with a Fingerprint Scanner and Embassy Security Center. Bl

I received a new laptop for work (a Dell D830) and had a fairly easy time getting it setup for development. To my dismay, I notice periodic Blue Screens of Death (BSOD) while booting into Windows Vista. I looked up the error codes and was unable to find a cause and since my system always seemed to boot normally the next time.

Talking with a co-worker of mine that got a new laptop when I did, we both experienced seemingly random BSODs and were always a bit suspect of the Fingerprint scanner. I didn't really worry about it too much. That is, until this morning.

While booting this morning, I got another BSOD. When my system booted again, I was unable to logon to Windows Vista. Every time I would put in my username and password I would get the following error message.

"Logon failure: unknown user name or bad password."

I also noticed that I wasn't given the option to use my D830's Fingerprint scanner to logon either. I tried logging onto domain accounts and local account with no luck. I rebooted multiple times. I used Vistas startup repair tool with no luck. It was looking like I might have to hit a restore point or restore an image of my laptop.

Luckily for me, my boss had experienced a similar issue. The fix is a mixture of disabling your Fingerprint scanner and Dell's Embassy Security Center. The first step is to boot into Safe Mode by pressing F8 before windows boots and selecting it from the boot menu. You should be able to logon to windows in safe mode (if not, you might have a different issue.) Once you are logged on, perform the following.

Disable the Fingerprint scanner

(this step might be optional, since the second step might do it automatically.)
  1. Press your Windows Key and type "Device Manager" and hit Enter to bring up the device manager.
  2. Under Biometrics, right click on your fingerprint scanner and select Disable
  3. Close the device manager

Turn off Secure Windows Login in Embassy Security Center

  1. Press your Windows Key and type "Embassy Security Center" and press Enter (if you don't have this application, you probably have a different issue going on.)
  2. Click on Windows Logon
  3. Uncheck Enable Secure Windows Logon
  4. Click Apply and close Embassy Security Center

After performing these steps, reboot your machine normally and try to login again. Worked great for us on our Dell D830 and was a bit of a pain to track down. I might post an update and let you know if this also clears up my random BSODs.

Hope this helps someone. =)

Wednesday, February 27, 2008

How To safely shutdown and restart Windows Explorer (Explorer.exe) in Windows Vista

There are few things more frustrating than having Windows Explorer (Explorer.exe) FUBAR while you're working or playing in windows (not to mention when it crashes completely and unexpectedly.) If you ever find yourself in a situation where you want to restart the explorer process, you can follow these steps to restart it in a safe manner.

Step 1. Shutdown Windows Explorer

  • Click on the start button
  • Press and hold Ctrl+Shift then Right-Click on a blank spot on the start menu

right-click

  • You should see the following dialog. Click on Exit Explorer

dialog

Step 2. Restart Windows Explorer

  • Open the task manager by pressing the ctrl+shift+esc keys
  • Click on File > New Task(Run)
  • Enter Explorer next to Open: and press Enter

This process will safely shutdown and then restart the Windows Explorer process.

Wednesday, January 30, 2008

Samsung Blackjack - Windows Mobile 6 - FINALLY!

I clearly remember the salesman telling me that I should be able to download and install Windows Mobile 6 "AS SOON AS ITS RELEASED" onto my sleek new Blackjack last fall when I purchased it. After many months, a million false alarms, several leaked versions of WM6, I finally have an official version installed on my Blackjack.

Get the OFFICIAL release from Samsung below, and Enjoy!

Get Windows Mobile 6 for your Black Jack!

Detailed Update Information

  • Microsoft Windows Mobile 6.0
  • Microsoft Office Mobile (allows you to view & edit XLS and DOC files on the fly)
  • Video Share Calling Technology (allows you with supported plan and devices, to transmit live or recorded video to a recipient)
  • TeleNav & MobiTV capable
  • Modified UI with updated text & icons in several areas
  • Enhancements to improve call quality
  • Fixed, Contact lookup doesn’t work when saving embedded SMS phone number
  • Fixed, Several Bluetooth issues
  • Fixed, VCML count not displayed properly
  • Fixed, Media player issue
  • Fixed, Embedded URL in MMS could not be saved
  • Fixed, CV does not play in full screen mode
  • Fixed, Converter for currency now supports Canada
  • Fixed, Handset would sound tone when charger was inserted in Silent Mode
  • Integrated Daylight Savings Time Patch
  • Enhanced international roaming support (originally included in GB4 S/W)

Monday, January 21, 2008

"Error: SQL Server does not exist or access denied" - SQL Server 2005 - .Net 1.1 - Specifying ip,port

I recently picked up a project that was written using Visual Studio 2003 and .Net 1.1. The application connects to a SQL Server 2005 database, and I didn't have the connection string that was used previously and had to create my own. I added a ConnectionString key to the appSettings section of my App.config, and fired her up. The connection string pointed to a freshly generated copy of the database needed for the application. After a few seconds, I was presented with the following error "Error: SQL Server does not exist or access denied". Joy.

Because this error is so generic, there is a lot of information returned by Googling the message. Unfortunately there are a million things that might be the cause. I couldn't find a solution online, but ended up finding a fix for my specific situation.

If you are working with a project created using .Net Framework version 1.1, against a SQL Server 2005 DB, and trying to connect without specifying the ip and port of your db engined, you might get this error. What you might want to try is to replace your "data source" with the "ip,port" of your db engine and see if it fixes your issue.

OLD/Broken: <add key="ConnectionString" value="data source=.; initial catalog=YourDB; user id=YourUsr; password=YourPwd;" />

NEW/Working: <add key="ConnectionString" value="data source=127.0.0.1,1433; initial catalog=YourDB; user id=YourUsr; password=YourPwd;" />

Just one more thing to try when dealing with this very generic Error Message.

Wednesday, November 14, 2007

DNN Forums Upgrade - The type initializer for DotNetNuke.Modules.Forum.DataProvider

I was getting this error after trying to upgrade my DotNetNuke Forums module from a 3.* version to a 04.04.03. The error refers to a dll that is no longer valid from the old version. After spending some time trying to figure the error out, I ended up having to uninstall the old version and then install a fresh copy of the new version.

(WARNING - Unless you do some backing up and restoring of your Forums data, you will probably lose your existing posts. Keep this in mind.)

Anyone know of an easier way of getting the new version installed without having to uninstall the old one?

Monday, November 05, 2007

SQL Server 2005 Error - An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

You may receive this error when trying to remotely connect to your SQL Server 2005 (or Express) database. (Even when connection remotely from a service running locally, such as an ASP.NET website.) The first thing to check is the most common cause of this error. You must enable Remote Connection manually to SQL Server 2005 installations because they are disabled by default. To do this, check the following.

Enable remote connections for SQL Server 2005

  1. Open the SQL Server Surface Area Configuration tool. (You can find this in your start menu under SQL Server 2005.)
  2. Expand "Database Engine"
  3. Click on "Remote Connections"
  4. Enable Remote Connections (TCP/IP, Named Pipes, or Both)
  5. Click on Service under "Database Engine" and Stop then Start your database for the changes to take affect.

Test your connection now. For most people this will be sufficient to correct the problem. In my case, my company is using a connection string that did not specify the port when connecting to the database. I had just reinstalled Microsoft SQL Server and received this error and didn't want to have to change anything in the project to get it working again. I found that I had to statically set it for the server to SQL Server's default value of 1433. To do this, perform the following.

Set the port to be used with TCP/IP connections

  1. Open the SQL Server Configuration Manager
  2. 2xpand SQL Server 2005 Network Configuration and select "Protocols for YOURDBSERVERNAME"
  3. Right click on "TCP/IP" on the right and choose properties
  4. Click on the "IP Addresses" tab
  5. Set the TCP Port property for the entry with IP Address "127.0.0.1" or any other that you need and click "Apply".

In our case, this fixed the problem and allowed us to use our connection string unmodified.

Saturday, October 06, 2007

"Windows Live Messenger" or "Windows Media Player" has stopped working - APPCRASH / StackHash Error - Fix

If you are getting either of the following two error messages when staring Windows Live Messenger or Windows Media Player, I might know of a couple of things that could be causing the problems. This may only affect people who are getting the error in conjunction with errors in Fault Module Name StackHash_XXXX.
----- ERROR MESSAGES -----
Windows Live Messenger has stopped working
Problem signature:
Problem Event Name: APPCRASH
Application Name: msnmsgr.exe
Application Version: 8.1.178.0
Application Timestamp: 45b12d6a
Fault Module Name: StackHash_ed38
ETC...
Windows Media Player has stopped working
Problem signature:
Problem Event Name: APPCRASH
Application Name: wmplayer.exe
Application Version: 11.0.6000.6336
Application Timestamp: 46a16548
Fault Module Name: StackHash_5255
ETC...
----- /ERRORS MESSAGES -----
Possible Fix 1: nVidia nForce driver components
I have an EVGA i650 Ultra motherboard in my system with the nForce drivers installed. Either of the two following nForce driver components / features might cause this problem in Vista.
  1. nVidia MediaShield
  2. nVidia - ForceWare Network Access Manager
Uninstall them to see if it clears up the issue. I uninstalled both of them and it was fixed, so it could be either.
Possible Cause 2: Vista's DEP Protection
To fix this issue, you might need to disable DEP in Vista. To disable DEP, perform the following (found these steps HERE.)
1. Click Start
2. Click All Programs
3. Click Accessories
4. Right Click on Command Prompt
5. Left click on Run as Administrator
6. Click the Allow button if it asks you for permission
7. Type or copy and paste this into the command prompt window:
bcdedit.exe /set {current} nx AlwaysOff
8. You should see the message "Operation Completed Successfully"
9. Reboot and DEP should be off.
For more information regarding DEP, what it is and how it affects your web-based applications. Checkout this link.
Possible Cause 3: Administrator Mode
You may also want to try running the application as an administrator. You can do this by right clicking on the short-cut, selecting properties and checking the "Run as administrator" box.

Tuesday, September 18, 2007

Visual Studio - Item Template Editing (Class, WPF, Forms, ETC...)

I've been working in Visual Studio for a few years now, and have created hundreds of classes, user controls, windows, forms, pages... You get the picture. I'm also the type of developer that likes to keep my code organized and generally start off with a couple of standard code regions (Fields, Properties, Events, etc...) in my classes and code-behind files.

I always imagined that there would be a simple way to override the default templates for these files to make my job easier, and today I finally spent the time to track it down...

Visual Studio Item Templates are located in the following directories...

Item Template Files

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates

Item Template Cache Files

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache

Within each of these directories you'll have folders for CSharp, VisualBasic, etc. These folders hold all of the Item Templates for the named language. To edit the base implementation of the Class.cs file, you would browse to "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\1033\Class.zip" and load up the Class.cs file. This file would look something like this by default.

using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ == 3.5)using System.Linq;
$endif$using System.Text;

namespace $rootnamespace$
{
    class $safeitemrootname$
    {
        public $safeitemrootname$()
        {
        }
    }
}

You might end up modifying this file like so to add a few regions by default...

using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ == 3.5)using System.Linq;
$endif$using System.Text;

namespace $rootnamespace$
{
    class $safeitemrootname$
    {
        #region Fields & Properties
        #endregion

        #region Constructors
        public $safeitemrootname$()
        {
        }
        #endregion

        #region Private Methods
        #endregion

        #region Public Methods
        #endregion
    }
}

The next time you add a Class.cs file to one of your projects, it will come complete with the regions that you added to the template. You can also customize these templates further using other template parameters (i.e. '$clrversion$' for the Current version of the common language runtime (CLR).)

You can find a list of template parameters HERE....

Friday, September 07, 2007

Windows Vista - Window Focus - Alt + Tab Feature Tweaks

One of my favorite Vista features is their implementation of the Alt + Tab hotkey for switching window focus. Unlike Windows XP which would allow you to press Alt + Tab to cycle through your open windows. Windows Vista allows you to hold in Alt + Tab and then click on one of the displayed thumbnails to change focus.

Such a simple change, but with how often I use the hotkey to switch window focus. I find it much easier to hit the hotkey and quickly click on the window I want rather than cycling. My only problem with the feature is how small the icons are, especially on high resolution monitors. I found this great post which explains how to tweak this feature with a registry entry to make the displayed thumbnails any size you wish.

Save the following snippet to a text file with a .reg extension. Double-click the file you created to update your registry. This is optimized for my laptop's resolution of 1440X900, but feel free to tweak the settings for your resolution. You can tweak the size of each thumbnail, and the spacing between them...

(TIP:  Use a Hexadecimal Converter to get your values right. Like This One)

#### Snippet ####

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AltTab]
"OverlayIconPx"=dword:00000023
"OverlayIconDXPx"=dword:00000000
"OverlayIconDYPx"=dword:00000000
"ThumbSpacingXPx"=dword:00000004
"ThumbSpacingYPx"=dword:00000004
"SideMarginPx"=dword:00000004
"BottomMarginPx"=dword:0000000a
"MinThumbSizePcent"=dword:00000064
"MinWidthPx"=dword:0000012c
"TopMarginPx"=dword:00000020
"MaxThumbSizePx"=dword:000000c8
"MaxIconSizePx"=dword:000000fa
"TextBottomPx"=dword:000001f4
####/Snippet####

To revert back to the original settings, remove the added key. "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AltTab"


I also use a Logitech mouse that has 6 buttons. The mouse comes with it's own Document Switch feature, but I hate how they implemented it. A comment on the post I mention above recommended assigning this hotkey to a mouse button to make changing window focus even easier. On my Logitech mouse, I replaced their document switch button with the Ctrl + Alt + Tab hotkey (as recommended) which keeps the Alt+Tab selection window open indefinitely, so that you can click a thumbnail at your leisure... Very handy!


I am now using both of these tweaks and switching windows focus has never been easier, faster, or more intuitive. You should try it out.

Thursday, September 06, 2007

WPF - Error 3 API restriction: The assembly 'file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStu

I was getting any annoying error (see below) in Visual Studio 2008 (Team System) Beta II after doing an SVN update. Every time I would try to compile our solution, I would get an error in our UnitTest project. The error was complaining that the UnitTestFramework.dll was being loaded from two different locations within the same appdomain.

"Error 3 API restriction: The assembly 'file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain."

The problem was that two of the projects in our solution were referencing UnitTesting DLLs. For some reason someone added references to the following two libraries in our DAL project, and the compiler was throwing a fit that the UnitTestFramework dll was getting loaded from two different locations within the appdomain.

  • Microsoft.VisualStudio.QualityTools.UnitTestFramework
  • Microsoft.VisualStudio.TeamSystem.Data.UnitTesting

Removing these two (unneeded) references from our DAL project fixed the issue, but the error seemed a bit vague.

(NOTE: You may need to close and then reopen Visual Studio since the library might still be loaded...) =( Took me 10 minutes to figure this out...)

Thursday, August 16, 2007

xkcd.com Excuse for legitimately slacking off Comic

A coworker passed this around the office the other day. I thought it was great, so I figured I'd share.


Check it and others out at xkcd.com!

Wednesday, August 01, 2007

Microsoft Messenger Scam/Hoax/Virus - www.messengerstatus.biz

If you get an instant message with the following message, don't click on it. If you MUST click on it, don't enter your username and password.

"Did someone delete you from their MSN? Check http://www.messengerstatus.biz it's really good and it works!!!"

The site asks for your Microsoft Messenger username and password, then I believe that it promptly logs onto your messenger account and sends the same message to all of your contacts.

If you HAVE registered. Change the password of your Messenger E-mail account ASAP, and be more careful!

I've gotten a lot of these IM's today from people on my contact list, and figured I'd post a warning...

Sunday, July 29, 2007

Impressive HTML Skills...

In this video, some kid creates a picture by hand coding HTML. Impressive if you've got any experience with HTML. I wonder how long this must have taken him?

Check it out here...

Friday, July 27, 2007

Visual Studio 2008 Beta 2 Released!

The Beta 2 release of Visual Studio 2008 has been released and is available for download from the HERE. This release sport the following new features.

  • VS 2008 Multi-Targeting Support
  • VS 2008 Web Designer and CSS Support
  • ASP.Net Ajax and JavaScript Support
  • Language Improvements and LINQ
  • Data Access Improvements with LINQ to SQL
  • And much much more...

Check out Scott's post here for more details...

Tuesday, June 26, 2007

Vista, IIS7 & DotNetNuke - NullReferenceException at GetEnabledLocales()

Upgraded to Vista with IIS7 and started getting an error when trying to run an existing DotNetNuke ASP.Net project I've been working on.

Here's a snippet from the stack trace...

DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Services.Localization.Localization.GetEnabledLocales()

Was able to figure this one out after playing with the IIS7 settings for a while. You need to update your IIS application to use a different application pool than the default. Right click on your application in IIS and select Advanced Settings. Under Behavior change the Application Pool from DefaultAppPool to Classic .NET AppPool.

That should clear up this issue for you.

Monday, June 25, 2007

Pandora's Box - Play Pandora minimized or in your system tray...

If you have read my post about iTunes vs Pandora, you'd know that I dig the new online service for streaming tunes at work. The only problem with the service, in my opinion, is that you need to leave a browser window open while listening...

I started to look for a solution to allow you to either minimize your Pandora or play it in your System Tray. I found a cool little app that lets you do just this. You even get a nice context menu from the system tray icon that allows you to issue commands to Pandora without having opening it.

Makes Pandora even better IMO! Check it out.

Installing Infragistics on Vista Ultimate with IIS 7.0

I just upgraded to Windows Vista this weekend and am trying to get my development box up and running. We us Infragistics in a couple of our ASP.Net projects and I'm finding that it's not quite as straight forward to install it on Vista.

I found a great site with a walk-through of how to setup your Vista and IIS to allows Infragistics to install correctly.

Basically you need to do the following...

  • Disable User Account Control (UAC)
  • Restart your machine
  • Edit the path of your IIS WWWRoot folder in the registry
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot
    • Change "%SystemDrive%\inetpub\wwwroot" to "C:\inetpub\wwwroot"
  • Enable IIS 6.0 Compatibility in the "Turn Windows features on or off" section of the Programs menu (make sure to check all the child boxes)

That should allow you to get your infragistics installed on Windows Vista Ultimate and IIS 7.0.

Developing on Windows Vista

I recently took the plunge and installed Vista Ultimate on my Dev box. I'm sure this will have it's ups and downs, but on the bright side... It will most definitely spawn lots of blog posts.

I will be installing Orcas soon and playing around too. I will also be focusing as much as I can on WPF, WCF, and WWF, so I'm sure I will have a lot of fun stuff to blog about for the next few months (after I get back from my Honeymoon that is. Yay for Hawaii...!)

Wednesday, June 20, 2007

Oracle - Returning newly inserted row's primary key using "returning" keyword. Using a select statement instead of values and getting &q

This goes along with my last post. We were trying to use the returning statement to return the value of a newly inserted row when using an OracleDataAdapter and Parameter.Direction = ParameterDirection.ReturnValue. The difference is, we were using a select statement instead of values() as our input parameters.

Here is a simple example...

OracleDataAdapter oda = new OracleDataAdapter();
oda.InsertCommand = RemedyMD.CreateCommand();
oda.InsertCommand.CommandType = CommandType.Text;
oda.InsertCommand.CommandText =
"INSERT INTO users (name, email) (select name, email where firstName = :firstName) returning userID into :out";
oda.InsertCommand.Parameters.Add("firstName", OracleType.VarChar);
oda.InsertCommand.Parameters["firstName"].Value = firstName;

oda.InsertCommand.Parameters.Add("out", OracleType.Number);
oda.InsertCommand.Parameters["out"].Direction = ParameterDirection.ReturnValue;

oda.InsertCommand.ExecuteNonQuery();

When you try to execute this query, you will get an oracle error. ORA-00933: SQL command not properly ended. After researching this for a couple of hours trying to figure out how to get it to work, I found out that there is NO way to get it to work. Either you have to use Values() instead of your select statement, or perform a second statement to retrieve the newly created primary key value.

Oracle - Getting the primary key value of a newly inserted row using the "returning" keyword and an OracleDataAdapter

I learned how to use an OracleDataAdapter Parameter as an "out parameter" by setting it's direction = ParameterDirection.ReturnValue. Using this with an insert statement is a great way to return the primary key value of the newly inserted row.

Here is a simple example...

OracleDataAdapter oda = new OracleDataAdapter();
oda.InsertCommand = RemedyMD.CreateCommand();
oda.InsertCommand.CommandType = CommandType.Text;
oda.InsertCommand.CommandText =
"INSERT INTO users (name, email) VALUES (:name, :email) " +
"returning userID into :out";

oda.InsertCommand.Parameters.Add("name", OracleType.VarChar);
oda.InsertCommand.Parameters["name"].Value = userName;
oda.InsertCommand.Parameters.Add("email", OracleType.VarChar);
oda.InsertCommand.Parameters["email"].Value = userEmail;

oda.InsertCommand.Parameters.Add("out", OracleType.Number);
oda.InsertCommand.Parameters["out"].Direction = ParameterDirection.ReturnValue;

oda.InsertCommand.ExecuteNonQuery();

After executing the query, you can then pull the returned value out like this...
int  newUserId = -1;

if(int.TryParse(oda .InsertCommand.Parameters["out"].Value.ToString(), out newUserId)){

// Perform additional query that required the newly inserted row's primary key

}

It was fairly hard for me to find (google) this information, so I figured I'd post it in hopes that it would help someone else.

World of Warcraft /Played Total - Can you beat this...?

I quit playing World of Warcraft (WoW) a while back after playing off-and-on since release. I was determined to quit for good, so I actually canceled my account, logged onto my character and sold everything of value, sent it to a good friend who played and deleted all of my characters (mainly a decently equipped 70 rogue.) This astonished many of the people I work with who play WoW, and I thought the reactions I got were truly amazing (and hilarious.) At the time of my rogue's deletion, I think he had a /played in the high 40's (days.) That's a lot of time to have played a video game, even if it was over 2.5ish years... (p.s. I know that I could have sold my account for some decent $$, but I didn't really want someone else playing my toon. Call me crazy. =) )
Back to the point of this post... I have a friend (we'll call him Bob) that I went to school with, and now work with. Bob has played WoW since it was released on November 23, 2004, and continues to play to this day. Most people I know who have played WoW at one point or another got a single character to 60 (now 70) and then mainly played that character with a few sporadic alts here and there. Not Bob...
Bob has 11 character over the level of 60. That's fairly impressive and got me thinking. Just how much time has Bob spent playing WoW since releases. I asked him to get the /played totals on each of his characters so that we could add them all up. I asked a few people around the office to venture a guess at just how much time he's played WoW. I started it off with a guess of 250 Days played.
The rest of the guesses looked something like this...
250, 215, 190, 285, 280, 260, 260, 330, 150, 331, 332 DAYS played!
By this time, the rest of the office had gathered around in awe at our guesses. How could someone play a game "that" much...?
Here is what his characters and /played values look like...
Character # Level Days Hours
1 62 8 18
2 61 8 22
3 65 8 10
4 63 14 19
5 66 17 17
6 70 24 7
7 65 30 7
8 70 24 19
9 70 38 17
10 69 19 5
11 70 62 10
Totals 252 151
Interesting Information Based on these numbers!
Total Days Played: 258.29
Total Hours Played: 6199
WoW Release Date: November, 23, 2004
Date We Did This: June, 19, 2007
Total Days/Hours in between: 938 / 22512
% of time that Bob played WoW during this time: 27.54%
That means... In a span of about 2 years and 7 months, Bob was playing WoW about %27 of the time!
All I can say is... wow. Can anyone out there post more impressive numbers...? I know you guys are out there. The uber gamers!!! Hell, you might be reading this while raiding RIGHT NOW.... We want your numbers! =) Add a comment below...!

Thursday, June 14, 2007

iTunes radio streaming vs Pandora...!

I've been a long-time iTunes user (ever since I stopped using winAmp religiously a few years ago...) I have a ton of MP3s, an iPod, and have been a huge fan of streaming radio feeds while at work or home and not into anything I have in my playlist. There are a ton of stations to choose from, almost any genre, style, country of origin... You name it an you can probably find it on iTunes'...

I heard about Pandora a few months ago and just barely got around to trying it out. I must say, from the second I entered my first artist into Pandora, I've loved it. It started playing one of my favorite songs by that artist immediately and the sound quality was amazing. As I started to fiddle with the site, the power of the idea hit me. Not only play the songs and artists that I suggest to you, but infer what else I might like by my choices... Why didn't they have this years ago...?

If you really like or dislike a new song that comes up, click on the up or down thumb icon and it will update your preferences and modify what comes next... Pandora starts to learn what you like by your interactions with the site. Wether you're adding new songs or artists, or just rating the new stuff they throw at you, you are helping Pandora send you just the types of music you want to hear!

I've only been using the site for one full day now, but I'm already a fan... I've only loaded up iTunes once and that was to update my iPod for a workout. =) We'll have to see if Pandora takes over my streaming audio needs, and even pulls me away from my MP3s. What better way to be introduced to new artists and songs that you might love as much as your preferred artists...

You can even create new Pandora "Stations" which you can customize to a certain type or style of music. I have one for Hard & Fast, Soft & Chill, and Techno so far and can imagine quite a few more that I would want to listen to based on my mood...

If you haven't yet, check it out. =)

Virtual Stock Trading anyone...?

I've been participating in a company game of Virtual Stock Exchange (VSE) that we have running at my current employer. We have about 12 people in the game and it's pretty fun to see how everyone invests, and how well it pans out. If nothing else, it's good to get a better understanding of the markets.

The game is somewhat realistic because it's based off the market and only lags a bit behind. Josh and I setup an Open Game of VSE that anyone can join and participate in. If you're interested, come and create an account and invite your friends and family!

Use the information and directions below to join the game.

Game ID: ezcomeezgo
Game Password: ezcomeezgo

  1. Open this link and read the competition summary:
    http://vse.marketwatch.com/Game/StartViewGame.aspx?id=ezcomeezgo
  2. Click on the 'Join Game' link.
  3. If you are an existing Virtual Stock Exchange member, enter your Email address and Password in the login panel and get set to trade. If you are a new user, follow the link to register - it's easy!
  4. Follow the instructions and start trading!

Join now, and see if you can win my Open Game competition! The more participants the higher the level of competition.

Web Services, IDictionaries and Serialization... Oh My!

I have been building some .Net web services lately and created one that was trying to return a generic IDictionary. (IDictionary<int, int>) To my surprise and ultimate disappointment, I was presented with the following Server Error when trying to access my webservice...

"The type System.Collections.Generic.Dictionary ..<removed babble>.. is not supported because it implements IDictionary."

It looks like the XmlSerializer is unable to serialize objects that implement IDictionary. How annoying! I use a lot of generic dictionaries and it's a bit of a pain work around this XmlSerializer limitation. I was able to find a solution from this Aaron Skonnard post on the msdn site.

The solution shows you how to write a class that actually wraps your dictionary object. The values of your dictionary are copied to an array of serializable objects which are allowed to be passed through your web service and then deserialized on the other end. Pretty handy and worked really well in our solution.

Aaron warns that the IXmlSerializable interface is undocumented/unsupported feature of the .Net Framework and is subject to change at any time.

Tuesday, June 05, 2007

Apple announces new and improved MacBook Pro...!

The MacBook Pro gets a Face-Life (not that it needed one.) Apple announced that it's MacBook Pro line will be getting a boost with bigger processors, beefier graphics and more space for memory!

The new stats for the three models are...

  • A 15.4-inch version for $1,999
    • 2.2 GHz Intel Core 2 Duo
  • A 15.4-inch version for $2,499
    • 2.4 GHz Intel Core 2 Duo
  • A 17-incher for $2799
    • 2.4 GHz Intel Core 2 Duo

All versions of the new MacBook Pro can support 4GB of RAM instead of just 2GB like the last generation. The newly available video card is Nvidia's GeForce 8600M GT card. The upgraded processors are Intel's latest version of the Centrino, code-named the "Santa Rosa".

I find that I'm having a really hard time NOT being able to justify buying a MacBook Pro, and this new announcement makes that decision even harder! They are sexy, powerful, and have the ability to run both Windows and Mac operating systems. What's not to love...!?!

Friday, June 01, 2007

Firefox 2 - Saved Password Security

Do you use the "Remember passwords for sites" feature in Firefox 2...? It sure is nice to not have to enter your password into those pesky "secure" sites out there like your Banking, E-mail, or other such sites...
It's also great that I don't even have to enable this feature, it just prompts me to start storing passwords after I start using Firefox for the first time! Firefox is great! So lets just assume that the 2nd most popular web browser is appropriately handling this extremely sensitive data.
Or should we...?
How simple could it be for someone to get access to these stored passwords...? As it turns out, using Firefox's default settings (Which I'm sure MOST people are), it's EXTREMELY easy.
All a person needs to do to gain access to your stored passwords in Firefox, assuming that they have a moment's access to your workstation is to perform the following steps...
  1. Click on Tools
  2. Select Options
  3. Click the Security Tab
  4. Click Saved Passwords
  5. Click Show Passwords
This handy-dandy feature supplies the user with a list of web site addresses, user names, and Password (in PLAIN TEXT no less!) This gives a potentially malicious user direct access to everything that they need to find and log into any sites that you have setup to "Remember my Password"! The worst part about all of this is that this is the DEFAULT behavior in Firefox!
This, in my humble opinion, is a huge security flaw in Firefox and I'm blown away by how easy it is for people to unknowingly expose their user names and password to anyone with a few seconds access to their browser...
Posting this information is a double edged sword. On one hand, it alerts potentially "malicious users" to a way to gain access to your passwords. That is not my intentions. On the other hand, getting this information out to as many people as I can (and please help me ein this effort) should allow you to protect yourself from this vulnerability.
So, how can I protect myself?
In Firefox
  • Disable the "Remember password for sites" feature or Setup the "Use a master password" feature in Firefox! These can both be setup in the same place as the "Show Passwords" option listed above!
In General
  • Always lock your workstation when you walk away from it. I never assume that I can trust anyone with free access to my workstation, and I recommend that you do the same!

How to sort a generic IList<T>

Sorting a generic IList
I was trying to sort a generic IList<> and found a fairly simple way of doing it.
Step 1
You need to implement IComparable for the type contained in your IList. For this example I am going to use a simple Language Dto class.
public class LanguageDto : IComparable {
private String name;
public string Name { get { return name; } set { name = value; } }

public LanguageDto(string name) {
this.name = name;
}

#region IComparable Members
public int CompareTo(object obj) {
if (obj is LanguageDto) {
LanguageDto language = (LanguageDto)obj;
return this.name.CompareTo(language.name);
}
throw new ArgumentException(string.Format("Cannot compare a LanguageDto to an {0}", obj.GetType().ToString()));
}
#endregion
}

STEP 2

Sort your IList. To do this you will use the ArrayList.Adapter() method passing in your IList, and then calling the Sort method. Like so...

ArrayList.Adapter((IList)languages).Sort();
Note: languages is of type "IList<LanguageDto>"
Languages should then be a sorted list of your type!

Thursday, May 31, 2007

Windows Live Writer Beta 2 Now Available

And what better way to test it than to post a new blog announcing it! If you're reading this, then it works FINE!

Get your copy HERE!

Tuesday, May 29, 2007

Web Service Security (Invalid URI: The format of the URI could not be determined)

Ran into an issue today while trying to connect to a Java Web Service from a .Net environment. It looks like this happens when Web Service Security is enabled in the application server of the web service and uses the ActorURI attribute. .Net's Web Services Enhancements feature does not support relative URI's for this attribute and basically FUBAR's on you. Therefore, you must us an absolute URI.

An example of an absolute URI is "http://LoginWebService" while an example of a relative URI would be "LoginWebService"... You must configure your Application Server to using either the Rational Application Developer or the Application Server Toolkit.

  1. Open the Web Service Editor, click the Extensions tab and expand Server Service Configuration.
  2. Enter the full absolute URI in the Actor field.
  3. Expand Response Generator Service Configuration Details > Details.
  4. Enter the full absolute URI in the Actor field.

Source