Monthly Archives: February 2008

Measuring Execution Time in C#

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics; namespace StopWatch{    class Program    {        static void Main(string[] args)        {            Stopwatch watch = new Stopwatch();            watch.Start();            for (int i = 1; i < 1000000; i++) { }   // Execute the task to be timed            … Continue reading

Posted in Information Technology | Leave a comment

C# code to solve N Queen problem using backtracking

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NQueen { class Program { const int N = 8; static void Main(string[] args) { int count = 0; int[,] board = new int[N, N]; //Initialize the board array to 0 … Continue reading

Posted in Information Technology | 11 Comments

Microsoft Commercial

Posted in Organizations | Leave a comment

Microsoft Ad (We See)

Posted in Organizations | Leave a comment

How to check request failure in a coded web test?

  request5.Body = request5Body;if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.High)){ ValidationRuleFindText validationRule6 = new ValidationRuleFindText(); validationRule6.FindText = "Meeting Details"; validationRule6.IgnoreCase = false; validationRule6.UseRegularExpression = false; validationRule6.PassIfTextFound = true; request5.ValidateResponse += new EventHandler<ValidationEventArgs>(validationRule6.Validate);}yield return request5;if (request5.Outcome == Outcome.Fail){ StreamWriter sw = new StreamWriter("C:\\result.txt", true, Encoding.ASCII); sw.WriteLine("Meeting Creation Failed for the time zone … Continue reading

Posted in Information Technology | Leave a comment

File Handling using C#

  using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Collections; namespace MySpace{    class FileHandling    {        static void Main(string[] args)        {            //string str = "\"Pacific/Tongatapu\">(GMT+13:00) Nuku’alofa";            //Console.WriteLine(str.ToString());            //Console.WriteLine(str.Substring(0, str.IndexOf(‘>’)));            StreamReader objReader = new StreamReader("c:\\timeZone.txt");            string sLine = "";            ArrayList arrText = new ArrayList();            while … Continue reading

Posted in Information Technology | Leave a comment

Happy Vasant Panchami (Tradition says don’t study today :-)

Saraswati Puja—the puja of the Goddess of Learning, is celebrated with domestic pujas and familial gatherings in Kolkata. The typical fare (bhog) which accompanies the puja depends dramatically on whether the family is initially from West Bengal (ghoti) or from … Continue reading

Posted in Festival | Leave a comment