Archive for the ‘Code’ Category
Thursday, June 2nd, 2011
Scenario: you have a List<string> collection where the contents could be alpha, numeric, or alphanumeric. If you just sort the collection using the built-in Sort() method, it will use string.CompareTo(), treating each item in the collection as a string. Thus a collection with the following values ["1", "44", "22", 4", ...
Posted in c#, Code | No Comments »
Thursday, January 14th, 2010
If you are trying to query a MS Excel (.xls, .xlsx, .xlsb) or MS Access (.mdb, .accdb) file on a 64-bit server and are getting one of the following error messages:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
Then it ...
Posted in c#, Code | 9 Comments »
Thursday, December 3rd, 2009
If you get the "circular file references are not allowed" error in an ASP.net Website Project and you do not have any controls that have any obvious circular references, what does the error mean and how do you fix it?
See this blog post from Siderite Zackwehdex as well as this ...
Posted in asp.net, Code | 12 Comments »
Sunday, November 1st, 2009
My favorite Javascript-based WYSIWYG editor is TinyMCE. I find it the most visually appealing, and the most well constructed from all of the offerings available on the Internet.
When posting code for others to see, I prefer using SyntaxHighlighter. This javascript-based formatting tool by Alex Gorbatchev allows you to put the ...
Posted in WebDev | No Comments »
Thursday, December 11th, 2008
I recently saw a piece of code in a project that was throwing an exception that I did not understand:
string boolString = (string)DataBinder.Eval(DataItem, "IsNew");
One would expect that boolString would be assigned the value "True" or "False" depending on the value of the IsNew property of the DataItem object. However, this ...
Posted in c# | No Comments »
Thursday, August 28th, 2008
I have a Windows Forms application that is ready for distribution. One of the last steps is getting code-signing working. We purchased a Code Signing certificate from Thawte. This resulted in a PVK (private key) and an SPC (certificate) file being delivered. Then the question arose of how to go ...
Posted in Code | 2 Comments »