Greg Does IT

Do it to get it

About

The blog of Gergely Orosz on IT related topics: web, software design, .NET, PHP and the rest. Follow me @gergelyorosz on Twitter.

Archive for the 'Tips & tricks' Category

I’ve recently ran into an issue: I wanted to draw an element with a dashed stroke using a Style I’ve created on the fly. To my surprise I couldn’t. The Problem The type of the StrokeDashArray (that is defined on Shape) is a DoubleCollection. So naturally I tried setting a DoubleCollection instance as the Value [...]

Read the rest of this entry »

Ten Cool Visual Studio 2010 Features

Thursday, April 8th, 2010

I’ve attended an event late March in Glasgow where Scott Guthrie, Microsoft vice president showed off some of the new fewatures of Visual Studio 2010. Based on this talk and my experience using Visual Studio 2010 Beta 2 and the Release Candidate I’ve collected the ten most useful new features of this edition. These are: [...]

Read the rest of this entry »

I’ve ran into a querying scenario with NHibernate that was much less obvious to solve with the NHibernate query API than it would have been with SQL – for me at least. In my model I’ve had a simple many-to-many relation: Entries that had multiple Categories each and Categories that belonged to multiple Entries as [...]

Read the rest of this entry »

When working with images I sooner or later usually run into the problem of creating thumbnails. Resampling images is not really difficult in the major programming languages however I have not found built-in support for caclulating thumbnail dimensions neither in .NET nor in PHP. And it seems that this made me re-invent the wheel over [...]

Read the rest of this entry »

ASP.NET server side element names changed?

Wednesday, March 4th, 2009

As far as I’ve known if the ClientID of a server control looked someting like this: ctl00_WebPartManager1_184c801b_7c67_4967_be37_3ab10406f967_ctl00_linkVote1 . Then the name sent on postback (which identified the control on the server side) was: ctl00$WebPartManager1$184c801b$7c67$4967$be37$3ab10406f967$ctl00$linkVote1 . But since some time the _ to $ conversion is not true any more. Instead the _ signs are randomly [...]

Read the rest of this entry »

I have had some trouble deleting the child in a one-to-many relationship in NHibernate. My schema described a simple parent-child relationship: a parent can have multiple children and every child has exactly one parent. In the database schema I had two tables parentTable and childTable. ParentTable had an ID column and some other columns. The [...]

Read the rest of this entry »

TFS – deleting old workspaces

Monday, January 12th, 2009

I use Visual Studio 2008 on a daily basis however for some older projects I have to work with VS 2005. Recently our company has set a new Team Foundation Server in use and all active projects have been migrated there. In VS 2008 everything worked just fine. However when trying to re-map a project [...]

Read the rest of this entry »