Skip to content

Instantly share code, notes, and snippets.

View chandermani's full-sized avatar

Chandermani chandermani

  • London
View GitHub Profile
@chandermani
chandermani / DefaultServiceVersion.cs
Created June 19, 2012 12:37
Set the DefaultServiceVersion property of Azure blob storage.
var account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
var blobs = account.CreateCloudBlobClient();
var existingprops = blobs.GetServiceProperties();
blobs.SetServiceProperties(new Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties()
{
DefaultServiceVersion = "2011-08-18",
Logging=existingprops.Logging,
Metrics=existingprops.Metrics,
});
@chandermani
chandermani / LongestIncreasingSequence.cs
Created May 23, 2012 15:20
Determining largest increasing sequence in an interger array using Patience Sort.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Algorithms
{
/// <summary>
/// Calculating longest sequence using Patience Sort. See here http://wordaligned.org/articles/patience-sort
/// </summary>
@chandermani
chandermani / CacheImageFileConverter.cs
Created May 13, 2012 12:58
Windows Phone Image Caching Converter
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;