Sunday, October 5, 2008

Nasty experience with Zen Player

My wife recently purchased herself a zen player; I had heard good things about them over the brand name IPod.

After she spent an hour trying to make the computer software work with it she asked me to help. I verified that our computer and software met all the specs it wanted and that she had done the install correctly, but it still wouldn't work. Turns out their software doesn't do all that good of a job installing itself. Fortunately someone was nice enough to make a patch kit for the thing which I found and ran fixing the issue.

For those looking for the patch kit it can be found here:

Just download the zip file, extract it and run the cmd file. The thread that lead me to the download is linked to in the header of this post.

Tuesday, September 30, 2008

DBCC commands to clear SQL server cache for speed tests

[quote name="Andrew Holliday"]
When tuning SQL Server applications, a certain degree of hands-on experimenting must occur. Index options, table design, and locking options are items that can be modified to increase performance. When running a test, be sure to have SQL Server start from the same state each time. The cache (sometimes referred to as the buffer) needs to be cleared out. This prevents the data and/or execution plans from being cached, thus corrupting the next test. To clear SQL Server’s cache, run DBCC DROPCLEANBUFFERS, which clears all data from the cache. Then run DBCC FREEPROCCACHE, which clears the stored procedure cache.
[quote]

Thursday, September 18, 2008

How to alternate colors in a Matrix even when RowNumber doesn't work

Most of the time you can easily alternate colors using:
Table: =iif(RowNumber(Nothing) Mod 2,"Green","White")
Matrix: =iif(RowNumber("Matrix_RowGroup") Mod 2,"Green","White")

The above is by far the most popular method of accomplishing the task, it is widely known and very simple.  However it has one major downfall, when the matrix doesn't receive any data for a specific cell it must generate a blank cell, when that happens the RowNumber count does not get auto incremented which can really throw the coloring off.

Chris Hays came up with a great workaround hack to this issue.  You can create a static grouping at the lowest level and use RunningValue to calculate an alternating value for the group header cell, then hide the cell and point the data cells BackgroundColor to the value of the group header cell.
=iif(RunningValue(Fields!Country.Value,CountDistinct,Nothing) Mod 2, "AliceBlue", "White")

I would highly recommend visiting Chris's blog where he gives step by step instructions on how to accomplish the task.

Friday, September 5, 2008

Google Down?

I just rebooted my computer and one of the first apps I started back up was Google's Chrome browser.  And this is the screen I saw:


After getting over the initial shock of google's website being down I refreshed the page and life was good again.  I didn't believe their site would actually go down so easily so I tried to recreate the problem.  I found I got the error if I disabled my network connection so apparently the network drivers just hadn't loaded yet or were over loaded when Chrome tried to connect.

I do think it would be nice if Chrome were smart enough to know if it were actually connected to the net or not before suggesting to me that a site is down.  Or at least change the message so it says it couldn't connect to it rather than alude that the site itself is having issues.

Wednesday, August 27, 2008

T-SQL Performance of the DatePart function

I recently have had some trouble with speed on one of my queries. Suspecting it might be a DatePart function I was applying to every row of retrieved data I wrote a little performance test and was pleasantly surprised at how efficient DatePart was:

[code]

declare @loop int, @temp varchar(10), @datestamp datetime
set @loop=1
print convert(varchar(100),getdate(),113)
set @datestamp = getdate()
while @loop < 1000000
begin
set @loop = @loop + 1
set @temp = DatePart(q, '08/27/2008')
end

print convert(varchar(100),getdate(),113)
print datediff(ms, @datestamp,getdate())

set @datestamp = getdate()
set @loop=1
while @loop < 1000000
begin
set @loop = @loop + 1
set @temp = ''
end
print convert(varchar(100),getdate(),113)
print datediff(ms, @datestamp,getdate())

[/code]

[results]

27 Aug 2008 15:23:12:293
27 Aug 2008 15:23:14:200
1906
27 Aug 2008 15:23:15:983
1783

[/results]

so the DatePart function only added a little more than 100 milliseconds to the processing time.

Thursday, August 14, 2008

Windows updates failing to install

I recently had an issue where my windows updates simply failed to install. They would download just fine but never installed.

I found a fix here:
[quote]
Go here and see if it works

http://www.microsoft.com/genuine/

fix any issues, then validate it.

If it still doesn't work try this

Re-register the Windows Update DLL with the commands below
Click Start, click Run, type cmd, and then click OK.
Type the following commands. Press ENTER after each command.
regsvr32 wuapi.dll
regsvr32 wuaueng.dll
regsvr32 wuaueng1.dll
regsvr32 wucltui.dll
regsvr32 wups.dll
regsvr32 wups2.dll
regsvr32 wuweb.dll

Attempt to run Windows Update

Now what do you get?
[/quote]

The problem in the thread had a different source than mine, he had cloned his OS onto a new HD. In my case I had a fresh install of WinXP that was barely a month old.

Thursday, July 24, 2008

FireFox Extension For New Gmail

Gmail is an absolutely awesome product and I personally believe it revolutionized the world of free web based email clients.

However every now and then there is some little feature or functionality you just which you had. The GMail team is doing a great job of adding features but they can't do everything right away. Fortunately a bunch of FireFox extension hackers got together and made tweaks for things they found annoying; they then bundled them together and offered the package to the world.

Hopefully all the ideas in this extension will eventually made it into the native GMail interface, but until then it is one extention that makes the GMail experience much cooler. Check it out here:
GMail FireFox Extension