Hi and welcome to my blog. Im Tasos, a software engineer working in the UK. This is where i share some of my findings related with SQL, c#, asp.net and javascript with you. I hope you find something helpful and Im looking forward to your feedback!

Recent Comments

Popular Posts

Recent Posts

Archives

Post Categories

Blog Stats

  • Posts: 15
  • Comments: 116
  • Trackbacks: 9
  • Articles: 1

C#

Beyond SoundEx - Functions for Fuzzy Searching in MS SQL Server

posted @ Sunday, January 11, 2009 12:08 AM | Feedback (29), Filed Under SQL C# SQLCLR

In this post: SoundEx in Sql Server SimMetrics Adding string Metric functions in MS Sql Server Evaluating metric accuracy and comparing Metrics Conclusion + code Quite often we come across a requirement where we may need to perform some sort of fuzzy string grouping or data correlation. For example, we may want to correlate the customer records of a database by identifying records that are similar but not necessarily exactly the same (due to spelling mistakes for example). Obviously a simple group by, will not successfully group such data. We will need to employ what...

Yield return and Iterators use case: looping through the days between a date span

posted @ Thursday, November 15, 2007 11:54 PM | Feedback (1), Filed Under ASP.Net C#

I recently found myself in the situation where I had to loop through all the days from a StartDate to an EndDate. Sure easy, all you need to do is something like this: DateTime startDate = DateTime.Now; DateTime endDate = DateTime.Now.AddDays(3); DateTime curDate = startDate; while (curDate <= endDate) { //Do Something with curDate ... curDate = curDate.AddDays(1); } Does the job, but it is not very intuitive in my opinion. It is not that easy to read. Wouldn't it be so much nicer if we could do something like this: DayIterator dayIterator =...

How to Determine if a file is a .Net assembly (in Delphi and C#)

posted @ Tuesday, April 17, 2007 1:01 AM | Feedback (0), Filed Under Delphi C#

Given a file, we would like to check if it is a valid .Net assembly file. How would you go about it? 1. A couple of words about the PE file format .Net assemblies are valid PE files.  A PE file consists of:     *   MS-DOS header      *   Stub Program     *   PE file signature     *   PE file header (This is where we position our stream)     *   PE optional header     *   Section headers  (This is where the RVA15 is)     *   Section bodies The PE file header is where we position our file stream at byte offset 60. The 32 bits at this position are the...