Importing blog posts using MetaBlog API

Friday, January 16, 2009

As you might have known by yesterday, I moved my blog from WindowsClient.net over here at Microsoft.co.il. I consulted with Guy Burstein regarding how to I could import the posts to the new blog, he referred me to the following post - Manipulate Your Blog with MetaBlog API for C# This was a great post – thanks Guy! I followed the steps there in order to get the API and the connection ready. Afterwards, I connected to the source, pulled out the posts and saving them to a file. At...
tags: ,
no comments

Some Hotfixes

Thursday, January 15, 2009

I have been in vacation for the last 2.5 weeks. Myself and my Fiance in a vehicle driving around the united states.We've done the popular route - San Francisco --> Los Angeles (Through Highway 1, Amazing!) --> Las Vegas A lot of ruckus in that time (tech-wise), good vacation time :) I came back and noticed I have got like 150 unread blog posts to which I'm subscribed to - crazy! It will take some time until I get a grasp upon everything. Anyway - Some new Hotfixes!! 1) Flase C# compilation errors for ASP.NET code-behind files in VS2008 SP1 (KB957259) Read about it here.Get...
no comments

C# Lambda and Extensions to help around Casting

One of the common scenarios of casting in daily use of code is the need to check if an instance is of a given type, if so - perform actions on it. Some developers tend to do as following: if (foo is Bar){    Bar b1 = (Bar)foo;    //Do Stuff..} A word about it - this approach is condered wasteful in this case.This is because the result of whether the instance is of a 'Bar' type is not the only thing that matters in this case, meaning I still need to cast it and perform actions on it as 'Bar' type. This is better...
tags: ,
no comments

What is new in .NET 4.0?

There's a whole buzz about the .NET Framework 4.0, sweet stuff is coming. Read Damir's post for more information. Obviously, this isn't everything..- There will be new modeling and architecture tools for working against the code- The Team Developer and Database suites will be combined together - Love that!And much more of course  
tags: ,
no comments

Dynamite: High Performace Dynamic Sorting Using Expressions

Visit the CodeProject article for futher details. Download Dynamite library (including demo) - 35.7KB The library proides easy way for sorting arrays, enumerables, queryables and dataset as well.The sweet gem about it is the ability to integrate it into actual runtime needs since it works with string manipulations.
tags: ,
no comments

Execute code within timeout using threads

Via this post.  Following is a quick way to execute code and limiting it within a certain timeout. Note that the code spawns a new thread.A better safer code would be using the ThreadPool and wait on the WaitHandle. Thread t = new Thread(   () =>   {      //Do Stuff Here   });    t.Start();    bool success = t.Join(TimeSpan.FromSeconds(10));   if (success)   {      //Thread completed successfully   }   else   {      throw new TimeoutException();   }
tags: ,
no comments

Text manipulation – Title Case

A nice way to convert text to title-case using the .NET framework. Title Case - First Letter Of Every Word Is Upper CultureInfo.CurrentCulture.TextInfo.ToTitleCase("some text"); //Returns "Some Text" Note that you should ensure the input passed to the method is all in lower case, otherwise you will encounter scenarios where this would not work.  
tags: ,
no comments

Mimetypes required for VSTO and ClickOnce

Via this post. Following mime types should be registered in ISS, when using VSTO and ClickOnce: .applicationapplication/x-ms-application .manifestapplication/x-ms-manifest.deployapplication/octet-stream.deployapplication/x-ms-vsto
tags: ,
no comments

Get executing assembly file path location

Very simple piece of code to get the path where the executing assembly is located. private static string GetApplicationPath(){   return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);}
tags: ,
no comments

Velocity Cache Project

The CTP version of Velocity had been released a while back. It certainly has great benefits. Here's a link to Bart's post going over this release, worths the check. From Bart's post: Introduction But first... what's in a name? Multi-tiered distributed applications are common-sense nowadays and with cloud computing within reach the need to build scalable distributed services has never been bigger. One of the core aspects in enabling those scenarios is to have intelligent caching of objects, not only to reduce the number of accesses to the underlying data source but also to boost availability by employing scale out techniques. Obviously, developers want...
tags: ,
no comments