Thursday, May 29, 2008
JavaBat
Interesting introduction or refreshment on Java. Provides little programming problems and runs test cases against your function to make sure its doing what it is supposed to. These are nice little teasers especially towards the complicated side that you don't normally have to face but give you some good insight.
Wednesday, May 28, 2008
Great duplicate removal query...
delete Table_1 A
where exists
(select * from Table_1 B where A.field_1 = B.field_1 and A.field_2 = B.field_2 and A.field_3 = B.field_3 and A.field_4 = B.field_4 and A.id > B.id)
Thursday, May 22, 2008
Error - GetTypeHashCode() : no suitable method found to override
I found it very useful so I want to propagate it. I found a need for it while transferring my site from vb.net to C#.
After creating an ASP.NET web form using Microsoft Visual Studio 2005 Team Suite, I renamed the form from it's default name "Default.aspx" to a more user-friendly name "Order.aspx" within MS VS. After adding more code to the C# code-behind page, I discovered the following line: "public partial class _Default"
Being new to the ASP.NET programming language, I changed the "_Default" to "Order" thinking MS VS had failed to rename items within the code it generates. This caused the following error to display at debug/run time: "GetTypeHashCode() : no suitable method found to override"
There were several other errors displayed as well.
The class names must match between the .aspx and .aspx.cs web pages. Here is what the lines in each file should look like:
In the ASPX source file: %@ Page Language="C#" codefile="FormName.aspx.cs" Inherits="FormName_aspx" %
In the ASPX.CS source file: public partial class FormName_aspx : Page
Once I changed the .ASPX file to match the class name in the .ASPX.CS file, the errors were resolved.