Computing First and Last Day of the Month
I stumbled across this the other day and I thought it was so slick I would share.This example computes the DateTime for both the first and last day of the current month.var monthStartDate = new...
View ArticleMy TortoiseSVN Global ignore pattern
Some files shouldn’t be committed into version control. Usually things generated by the computer (i.e. exe’s, dlls, etc.) and user specific files (i.e. *.suo, *.user, etc.)Here is the global ignore...
View ArticleTracking a browser’s Time zone Offset in ASP.NET
Just the other day I was required to display a website’s dates in a user’s local time.The solution I came up with was based on getting the time zone offset from the user’s browser using JavaScript,...
View ArticleInstalling and Uninstalling a Windows Service from the Command Line
I develop a windows service every now and then. I always have to dig up the install and uninstall commands. I figured I would post it for...
View ArticlejQuery Boxy content will not display / show
Every so often I’ve used the jQuery plugin called “Boxy”Today I ran into an issue: The content I gave boxy would not display / show on the page.Here was my incorrect code: 1:new Boxy("Justin Kohnen is...
View ArticleGrok talk on NuGet 6/22/2011 1800 EST
I will be giving a grok talk about “NuGet” (the Visual Studio 2010 extension) to the Dayton .NET Developers Group. If you’re in area, I invite you to come down. (Don’t forget to point and laugh )Here...
View ArticleMaking the selected time of a RadTimePicker scroll to top.
I rely heavily on Telerik’s ASP.NET AJAX tools. Recently I had an issue with the RadTimePicker when we attempted to put it in a scrolling container. Once in the container could scroll we wanted the...
View ArticleDeveloping for a specific version of Silverlight
I recently ran into an issue where the version of Silverlight I had installed on my development environment didn’t match my end clients’ version of Silverlight. I was running Silverlight v4.0.60831.0,...
View ArticleHow To: Disable “Attach Security Warning” of Visual Studio
When you attach to a process, you sometimes get the message confirming whether you want to attach the process. This happens for each process you are attaching. ANNOYING! This is how to disable...
View ArticleHow To: Stop IIS7 from timing out while you’re debugging
Have you ever seen this before while you’re debugging an IIS7 application? When you’re debugging code such as webpages, services, SharePoint event receivers, and SharePoint workflow handlers. You only...
View ArticleUsing an ObjectDataSource in Sharepoint
A Co-worker was trying to use an ObjectDataSource within a UserControl within SharePoint.After a bit of research. We learned one must use the fully qualified name of the class and assembly when...
View ArticleA quote from modernizr
I read this in the modernizr documentation on polyfills and I thought I would repeat it: And remember, none of your users view your site in more than one browser; It’s okay if it looks and acts...
View ArticleGood practice when naming a Boolean variable/Property
<soapbox>When defining a Boolean (true/false) variable or property Prefix the name with "Is" or "Has" Do not negate in your variable name. Bad Boolean variables names: Allowed (No prefix)...
View ArticleHow to dynamically load a JavaScript file.
How do you dynamically load a JavaScript file? With JavaScript of course! 1:function loadjsFile(filepath) { 2:try { 3:var h = document.getElementsByTagName('head').item(0); 4:var t =...
View ArticleUsing a delimited list for SQL ‘IN’ statement
Sometimes I want to pass a list of items from my C# code to my stored procedures so they can be used as part of an ‘IN’ clause. In my greener years I would do something like:Unsafe Way<WARNING>Do...
View Articleredgate SQL Source Control Revision Numbers
Anyone that’s developed with me in the last 7 years knows that I’m a HUGE fan of redgate. Honestly, now that I use their tools, I don’t know how I would work on MS SQL databases without them. Recently,...
View ArticleError 17 Unknown build error, 'An item with the same key has already been...
I recently got this error after doing a code merge. No source file, no line number, just the project name and nothing else to point me in the proper direction to rectify my issue.After much searching I...
View ArticleError 21 CA0055 : Could not unify the platforms
After a recent upgrade from Silverlight 4.0 to Silverlight 5.0, I started getting this error from Visual Studio 2010Error 21 CA0055 : Could not unify the platforms (mscorlib, Version=2.0.5.0,...
View ArticlePreparing a SQL database for CLR assembly loading
A few times, I’ve had to install CLR assemblies into a Microsoft SQL database.In order to do so, the deploying user must be granted certain permissions.Here is the script I use....
View ArticleHow to use Window 8 on a PC
So you’re thinking about installing Windows 8 (or you’ve already installed it) and you’re wondering “It’s changed so much, How the heck do I use it?”I wanted to share an instructional video with you...
View ArticleWhat is the “Mythical Man Month”
Well, there is a book out there explaining it. The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition)Though a great source, it’s one dry read. I actually recommend...
View ArticleHTTP Request Headers Testing
This is a trick I’ve been using for a while, but I wanted to share.Sometimes third party software requests your Web Pages/Services and pass data via the HTTP Request Headers. If you want to simulate...
View ArticleC# code to force the debugger to launch
There are times where you just can’t manually attach the Visual Studio debugger to your code. Like when you’re trying to debug Sharepoint feature events (FeatureActivated, FeatureDeactivating, etc.)...
View ArticleA must have SharePoint Management Tool
I know I’m late to the game on this, but I thought I would share for others that are unaware.If you manage or develop against SharePoint you should look into SharePoint Manager 2010It’s a great tool...
View ArticleDeveloper Tip: Avoid random numerical constants
There always comes a time when we just need to use a single number or set of numbers in our code…. but please avoid typing something like: if (permissionID == 3){// do something}Instantly I thinking...
View Article