Azure Cosmos DB–Setting Up New Database using Azure CLI–Sample

Purpose of this article is to help you with few steps of commands to provision a new Azure Cosmos DB database instance through Azure CLI or Azure Cloud Shell. Here is the snippet: <# This Bash script should help you create a Azure Cosmos DB instance using Azure CLI with bare minimal configuration #> export…

Read More

Back to Basics : Singleton Design Pattern using System.Lazy type

This article takes you to a simpler/alternative approach in making a Singleton Design Pattern implementation using System.Lazy class rather that using our traditional approach. Singleton Design Pattern implementation without lazy initialization: This code is thread safe enabled [code language=”csharp” padlinenumbers=”true”] /// <summary> /// Singleton class /// </summary> public class AppConfig { private AppConfig() { }…

Read More

Disable Client Side validation on a button click – ASP.NET MVC

ASP.NET MVC we use client side validation using jQuery.validate plugin, which will be based on Model – Data Annotation validation attributes. In some cases we might want to disable such validation on a button click wherever it is not needed. For example: The below code block will register validation block for Title property in the…

Read More

WP8Dev– How to identify the sensors supported on your Windows Phone

This post will give you an  overview on how to identify the sensors supported on your Windows Phone. As a developer when you are developing for Windows Phone – and your application would need to interact with certain sensors in windows phone to achieve a certain functionality, you would need to verify whether the sensors…

Read More

HTML5 – Introduction to HTML5Shiv for Internet Explorer 6/7/8

HTML5Shiv is a JavaScript workaround, discovered by Sjoerd Visscher, to enable support styling of HTML5 elements in versions of Internet Explorer prior to version 9.0, which do not allow unknown elements to be styled without JavaScript. Means your CSS classes and attributes will not be applied to the particular HTML5 specific display element, until and…

Read More

Zip(Archive) API’s in .NET Framework 4.5 – Part 2 – ZipFile Class

In my previous post I shared some information on API’s/Classes included as part of System.IO.Compression namespace in .NET Framework 4.5, and given on overview of ZipArchive class. Once such class I would be sharing some insight with post today would be ‘ZipFile‘ class. The ZipFile class provides convenient static methods for working with zip archives:…

Read More