NHibernate: count(…) will return a long, even if it is 0

by Oliver 17. May 2012 12:48

Today, I was doing some HQL with NHibernate trying to retrieve some object count from the database. Running the following piece of code, unfortunately, would throw an exception: System.ArgumentException : The value "0" is not of type "System.Int32" and cannot be used in this g... [More]

enjoyed the post?


A jQuery based tooltip solution for a large web application

by Oliver 13. March 2012 01:37

Finally, with an update we rolled out last week, (almost) all tooltips on Camping.Info look and behave similar, differing mostly in positioning and size, but not in the general look and feel. We chose the jQuery Tools Tooltip as the base for our own solution and it got us pretty far, but there were ... [More]

Updating the Sass gem to a new alpha version from the GitHub source

by Oliver 18. February 2012 23:52

We use SASS for more productive CSS and the Ruby gem Sass to automatically convert our development .scss files into valid .css files. Recently, an important bug fix appeared in the project’s master branch on GitHub and we wanted to update our local environments to use that new version for the trans... [More]

enjoyed the post?


Learning how to program and teaching someone else how to program

by Oliver 29. December 2011 03:02

I will be taking on teaching my brother-in-law how to program soon and while thinking about how to go about it I thought of putting together some essential information in one place for him and myself to check while we move along. My first suggestions are: Get to know your keyboard – really wel... [More]

enjoyed the post?


Customize and debug your Google+ button

by Oliver 3. December 2011 19:17

This week we added a Google +1 button to Camping.Info – well, actually several of them. Adding a button with a static URL is quite straight-forward and well described on Google’s pages (refer here for documentation and the Google+ button configuration tool). As Google recommends (at the bottom of t... [More]

enjoyed the post?


Frustrating development – non-deterministic behavior

by Oliver 24. November 2011 00:39

Generally, when I execute Action A and get result B, then change Action A to A2 receiving a different result R2 and then change Action A2 back to A, I would expect to get result R once again. Well, today this logic twice failed me during development. Trying to use the PreApplicationStartMethodAttr... [More]

enjoyed the post?


Showing the version number of the currently deployed application

by Oliver 7. October 2011 22:27

Yesterday I just quickly wanted to add the version number of our new Todo management application to the footer of every page. I could have just checked our own blog history or went off to Google or Stackoverflow but I just wanted to do it myself. Simple enough, isn’t it? To get the assembly of the ... [More]

enjoyed the post?


ToDebugString() – give me some debug info about my object, e.g. Request.Url

by Oliver 16. September 2011 20:06

Lately, I was having trouble debugging certain parts of my code in Visual Studio, and all I wanted to know was the value of some variable at some point in time. Well, I’d use some logging if I could just get at that value easily. But for some objects I don’t really know what I’m looking for or where... [More]

Unexpected EOF encountered in BCP data-file

by Oliver 15. September 2011 17:05

Today, I tried importing a CSV file like the following into one of our MS SQL Server databases: Id;Latitude;Longitude 4610;43.7119;-1.0737 5502;49.4297;-1.806 11360;46.9343;-1.8875 I tried it using the following command line: 1: bcp GeoDataImport in geodata... [More]

Orchard and Lucene: getting started with custom search – problems with booleans

by Oliver 12. September 2011 01:46

Update: I filed a bug in the Orchard issue tracker and it’s already been fixed. Nice work! We’ve just started to build our own customized search module. The goal is to have checkboxes for all searchable boolean properties of a given ContentPart and search by checking or unchecking them. In Orcha... [More]

About Oliver

shades-of-orange.com code blog logo I build web applications using ASP.NET and have a passion for jQuery. Enjoy MVC 4 and Orchard CMS, and I do TDD whenever I can. I like clean code. Love to spend time with my wife and our daughter. My profile on Stack Exchange, a network of free, community-driven Q&A sites

About Anton

shades-of-orange.com code blog logo I'm a software developer at teamaton. I code in C# and work with MVC, Orchard, SpecFlow, Coypu and NHibernate. I enjoy beach volleyball, board games and Coke.