How to resample images – a simple algorithm

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 and over again creating codes with various lengths just for this simple task.

In Sense/Net 6.0, the open source ECMS I am working on I came across the exact same problem: I wanted to resize images, this time on the fly. This time however I decided to do it a bit less complicated as in previous cases and create a clean and simple solution. After a good deal of googling, tutorial reading and planning I came up with a fairly simple and good code snipplet.

Read More…

ASP.NET server side element names changed?

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 replaced by dollar signs. Recently the name sent back on postback is:

ctl00$WebPartManager1$184c801b_7c67_4967_be37_3ab10406f967$ctl00$linkVote1
.

This change screwed up quite a lot of client side manual __doPostback() codes I’ve written – most of the making these invokes due to JQuery addons.
Read More…

A great disk storage usage monitoring tool

It’s quite a common problem that disk space shrinks dramatically and something has to be deleted. But what are those big files taking up the free space? With Windows you simply need some kind of tool to get a picture of disk usage. And the best tool I’ve found to do the job so far is Scanner2. It!s freeware, it’s simple and – beleive it or not – it was written 10 years ago.

Read More…

Deleting a one-to-many relationship in NHibernate

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 childTable had an ID primary key column, some other columns and a parentId NOT NULL column which had a foreign key constraint against the ID column in the parentTable.

Parent-Child Database Relationship (One-to-many)

Read More…

Monitoring website load

Over the weekend I’ve been in charge of monitoring one of our bigger portals which consists a database server (running SQL Server 2005) and multiple web servers (running IIS 6.0 and ASP.NET) connecting to it. The architecture of the system is the following:

System architecture diagram

I’ve chosen a really simple – and at first glance efficient – way of monitoring the system with the Windows Performance Monitor (also known as PerfMon): Read More…

Building an AJAX Tree control

Recently I’ve been in need to create use a tree control that is capable of doing the following:
– Displays tree items
– Branches can be opened to see children
– The tree is dynamically built to minimize server load

I was sure that there are plenty of solutions out there that I could use. After doing some search I found that the Ext framework offers a control that would be easy to integrate and use. So if you’re interested in how to integrate the Ext tree control with an ASP.NET or PHP backend to have it work like the Ext tree sample, read on.
Read More…

TFS – deleting old workspaces

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 to the same localtion as before (only from the new TFS server) I got the following error message: “The path [yourpath] is already mapped in workspace [yourworkspace]”. It took me a while to figure out what the resolution of the problem was.
Read More…

Qualified for ITech Challenge National Finals!

With two of my friends at the Budapest University of Technology we’ve entered the ITech Challenge management competiton (our chosen team name is Drunk Puppies :) ). This competiton is about managing an IT firm and making most profits possible; this year each team had to manage a telecommunications company. I would actually say that the competiton is actually 90% management and 10% IT (some basic knowledge was required on how the phone/cable/internet infrastructure works and depends on each other).

Every year there are about 200 teams competing in the country, 20 of which can make it to the finals. We’ve taken part one of the qualifiers yesterday where the top 3 teams of the participating 32 were to advance. We came in at 2nd place meaning we’ve qualified ourselves to the national finals! Woo!

Read More…

Imagine Cup Worldwide 3rd Place and Innovation Accelerator Award!!

I still can’t believe it but it’s true: with team Digitalmania, Hungary we’ve won 3rd place on the Microsoft Imagine Cup world finals in Paris and were one of the 6 teams to receive the Innovation Accelerator prize in the main category, Software Design!! It’s amazing… we are also the first Hungarian team to make it to the top 6 teams on the world finals as well!

7_finalsPresenting at the finals, in the Louvre

The whole competition started a few months ago when we’ve decided to enter the Imagine Cup competiton. We’ve managed to win the Hungarian national round which made us qualify for the world finals among with 60 other teams across the globe. The world finals took place for 6 days. The firs few days there were qualifiers from where 12 teams advanced to the semi-finals. After another round 6 of the 12 teams were selected for the grand final. The qualifiers and semi-finals were closed to the audience, whereas the grand final was in front of about 2,000 people in the Louvre! I never expected to be presenting in front of this many people!

Read More…

Special Prize on 24 Hours Coding Competition

The Win The Web 24 hours coding competition was held last Saturday. The competition was organized by Microsoft Hungary and during the 24 hours teams of 3 had to complete a larger and three smaller web projects using any technology they preferred. I entered with two of my colleagues from work.

The main task was to create a website that tracks movements of truck drivers throughout Europe. We were given sample GPS coordinates of about 30 drivers with reports every 5 minutes in a months interval and had to visualize this information, make it searchable and implement the most we could of a list of about 30 requirements.

We decided to use ASP.NET, WCF, Silverlight and Bing maps with the Javascript API to solve the task. The competiton started at 10am on Saturday and the hours seemed to fly by too fast. I was developing route visualization with Bing maps and tried to work around limitiations of the Javascript API (e.g. that only paths of about 25 steps can be plotted on it) as well as building website functionality and a bit of Silverlight.

Unfortunately we only implemented about 60% of the functionality required. Because of this we weren’t hoping of any prize – however to our delight we were awarded IT Secure’s special prize for the most innovative user interface! And after the award ceremony I went home and slept a good 15 hours :)

1 5 6 7 8  Scroll to top