LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Why is Equals considered advanced?

In VS2010 when you type the dot and then an E you will not get Equals in intellisense as an option. You have to either type the q too or go to the All tab. I also noticed I can’t change the Hide advanced members anymore. It seems to be unchecked by default. I still think the equals method is something every OO-developer should use and know how and why to use it.

Read More...

Things I can’t seem to do with Linq to NHibernate

I’m using NHibernate version 2.1.2 GA and the 2.1.2 Linq version that goes with it. And I like to state that I’m not complaining, but perhaps I can save some people from losing too much time while trying this. You still have plenty of other options if Linq does not work in your situation. So let’s say I have this Person Object Public Class Person Private _name as String Private _addresses as Ilist(Of Address) .

Read More...

Converting a VMWare 7 VM to run on ESXi

So today I wanted to transfer one of my VM’s from my local machine running under VMWare Workstation 7 to a brandnew ESXi 4 server we have laying around. First I thought I would just copy the data to the datastore and open the VM from there but that gives you this error. “Failed to open disk scsi0:0: Unsupported and/or invalid disk type 7. Did you forget to import the disk first?

Read More...

Do you use Column=@Param OR @Param IS NULL in your WHERE clause? Don't, it doesn't perform

You see this kind of question all the time in newsgroups/forums, someone wants to return all the rows if nothing is passed in or just the rows that match the variable when something is passed in. Usually someone will reply with a suggestion to do something like this WHERE (SomeColumn=@col OR @col IS NULL) The problem with that approach is that it doesn’t perform well, let’s take a look, first create this table

Read More...

LessThanDot Sponsors SQL Saturday in Chicago

The work and wait is almost over SQL Saturday in Chicago is only days away now and the excitement is building. I feel an explanation is in order for my lack of contributions to the SQL community the last few weeks. SQL Saturday has taken a lot time to work on coupled with the normal daily work schedule. Last minute preparations are going well and I think all of the attendees, speakers and sponsors will be very happy with how the event will come together.

Read More...

Look, I made VS2010 crash.

Today I opened up my solution in VS2010 and did the upgrade, which according to the upgrade wizard was a minor thing. All projects are still compiled against the 3.5 framework. So there should not be any difference. And Still… it crashed. Well it wasn’t really me, but Something in the resx from a third party. And the error is very descriptive too. Error 2 The type initializer for ‘Atalasoft.

Read More...

linq to nhibernate and subqueries.

Ok, time to try the linq to nhibernate subquery possibilities. Let’s say I have a object called TexCase that has a collection of Tags Of Type Tag. And the Class Tag has a property called Tag of type string. So I have this HQL query. vbnet _Session = SessionFactory.OpenSession _Query = _Session.CreateQuery("select i from TexCase as i join i.Tags t where t.Tag like :Tag") _Query.SetString("Tag", ToFind) _ReturnList = _Query.List(Of TexCase)() Where ToFind is a String (obviously).

Read More...

Linq to nHibernate

Today I thought it would be good to try some Linq to nHibernate while I was waiting for VS2010 to finish downloading. First thing I had to do was download NHibernate 2.1.2 GA and the Linq provider that goes with it. I was using 2.0.1 up until now. So I had to add a Bytecode provider to my configuration routine. That wasn’t too difficult (I thought). This was the line I used.

Read More...

Visual Studio 2010 and Microsoft .NET Framework 4 Available for download today

Visual Studio 2010 and Microsoft .NET Framework 4 will be available for download later today on MSDN. Right now it looks like the time that it will be available is 10 AM PDT. Now when it is available on MSDN don’t just download it from the first place you see it, check Top Downloads first ( http://msdn.microsoft.com/en-us/subscriptions/bb608344.aspx ) The top downloads page uses Akamai and the downloads are much faster than the regular MSDN downloads.

Read More...

Solving Sudoku in Silverlight

Long ago I came across OldSchoolDotNet’s Silverlight Sudoku client. It’s a great interface to a classic brain game. I especially enjoy the “Hard” difficulty level as it is pretty consistently solvable with out reverting to guessing. The “Expert” level though requires you to guess. And as a logic guy, I hate guessing. Not quite so long ago, in the Programmer’s Puzzles forum, we had a “Follow the Clues” challenge. I approached this problem just as I do Sudoku.

Read More...