Author Archives: dragthor

.NET mySql PerformanceMonitor Class

The 6.x mySql Connector for .NET comes with two performance counters that seem to be working rather well. If I call the same stored procedure 1,000 times… the metadata is only retrieved from the server the first time. All subsequent … Continue reading

Posted in .net, mysql | Leave a comment

Concrete Example – Mocking .NET Objects w/NUnit

Geoff Lane does a very good job of explaining .NET Mock objects. People were requesting a “concrete” example so I implemented an example C# console application (although this can easily be made into an ASP.NET web application). Geoff hints to … Continue reading

Posted in .net, testing | 3 Comments

Side by Side – IE8, IE6, IE5.5, IE5, IE4.01, & IE3

Running IE8 on your computer? The included developer tools are great. Need to switch to IE7 mode? No problem using IE8. But what about IE6, IE5.5, IE5, IE4.01, and IE3? Here is a free multiple installer you can use. And … Continue reading

Posted in css, ie, jquery, testing | Leave a comment

Example mySql IsDate Function

Here is an example mySql IsDate function using a regular expression: CREATE DEFINER=`root`@`localhost` FUNCTION `IsDate`(var varchar(25)) RETURNS tinyint(4)DETERMINISTICBEGIN/* 05/17/2009, 5/01/2009, 5/1/2009 */declare result tinyint;select trim(var)REGEXP ‘^([1-9]|0[1-9]|1[012])/([1-9]|0[1-9]|[12][0-9]|3[01])/(19|20)[0-9][0-9]’into @result;return @result;END

Posted in mysql | Leave a comment

MySql Connector .NET MySqlBulkLoader Example

Here is a MySqlBulkLoader example I quickly wrote to import 65,000 records into a mySql 5.1 database using the mySql Connector 5.2.5. And yes, its fast as snot (the lead programmer at my first programming job out of college invented … Continue reading

Posted in .net, mysql | 8 Comments

Unit Testing ASP.NET App_Code

I learn something new every day. Today, its the ability to Unit Test code in the App_Code folder using Visual Studio 2008 Professional. Most of the ASP.NET projects that I work on have their business logic contained in a separate … Continue reading

Posted in .net, visual studio | Leave a comment

Disable the Shutdown Event Manager in Windows Server

Want to get rid of this screen (Shutdown Event Manager) in Windows Server 2003 and Windows Server 2008? Do this: Start -> Run -> gpedit.msc Computer Configuration -> Administrative Templates -> System Disable “Display Shutdown Event Tracker”

Posted in windows server | Leave a comment