Internet Sellout

Demand Unearned Rewards

Dynamic SQL Pivot

This SQL is to demonstrate a dynamic pivot query. It is dynamic because the number of columns is not known in advance. Or because it is known but the number of columns is large but incremental. In this sample the pivot column is week of year.   SELECT * INTO #DATA FROM (SELECT CAST('Women... [More]

ASP.NET Write to Windows Event Logs

I like applications to write to the Windows Event Logs unless they are going to be verbose. Windows Event Logs can be collected and forwarded with a variety of tools for continuous monitoring. Sometimes logging errors is going to be way to noisy and an alternative is needed. But it is a go... [More]

Learn Ham

I am starting a post on my struggles convincing spamassassin's Bayes classification system to learn ham. When I su into the user account I can run this command: sa-learn --dump magic and it tells me how many ham and spam it thinks it has seen. when I train spam it goes up, but not when I train ham... [More]

Turning Off IPv6 On Rackspace Cloud Server Blows

I was trying to diagnose some issues with ASP.NET Web Forms post backs so I turned off IPv6 even though none of my websites were bound to IPv6 addresses. I unchecked it on the adapter property page. I had no logical reason for doing this. Then Windows Update stopped working. This was ... [More]

whats my preferred IP anyway

What is my preferred IP anyway? Not this: Set-NetIPAddress -IPAddress -SkipAsSource 1 You can do that in Power Shell on all the IP addresses you don't want to be chosen as your preferred IP address for your windows 2012 machine. This will tell you what is set: Netsh int ipv4 sho... [More]

.NET 4.5.1, IE 11, IIS 8 - oh my

This is not going well... The page size of had increased when comparing to 2008 R2 IIS 7.5 ASP.NET 4.0 C:\Windows\System32\Inetsrv\Appcmd.exe set config -section:httpCompression -[name='gzip'].staticCompressionLevel:9 -[name='gzip'].dynamicCompressionLevel:4  All of a sudden... [More]

Moving MSSQL Databases to Different Partition

I just moved from one Rackspace cloud server to another. The main purpose was to get IIS 8 so I could do TLS/SNI. I got a skimpy partition for the system and the preinstalled SQL Server Web Edition databases were taking up precious space so I moved them with help from this article: http://technet.m... [More]

Tally Ho

CREATE FUNCTION [dbo].[ufn_TallyHo] (@quantity int) RETURNS TABLE AS RETURN( with cte(tally)as(select 1 union all select tally + 1 from cte where tally < @quantity)SELECT tally FROM cte ) I found a table at work called Tally that was a list of numbers. I thought it was sad until I needed ... [More]