Saturday, October 11, 2008

visual Studio Tweaks

 

Put conditions on breakpoints:

There is a possibility to tell the debugger not to stop on a breakpoint every time. You can add a condition to the breakpoint and the debugger will stop there only when this condition is met. This is very useful when debugging a code that is continuously called (by a timer, …). All you need to do is right click on a specific breakpoint, choose Condition and the following window appears:

image

As you can see there are two radio button options:

  • Is true: You can write any code that would compile inside an If statement and the debugger will stop only when this code returns true.
  • Has changed: The debugger will stop only when the specified variable has changed.

A very Useful tip :

My computer slows down during visual studio startup.

Should u encounter similar kind of problem , here is the solution

Technorati Tags: ,

.

As Visual Studio  turns out, there is a file called ExpansionsXML.xml in your "local settings" folder, which gets written by VS a lot, thus slowing down the application - marking it as "read only" by changing the properties solves the problem.

Abosulute path – C:\Documents and Settings\A.P.Vijay\Local Settings\Application Data\Microsoft\VisualStudio\8.0\1033.

Wednesday, October 8, 2008

Some Interview Questions

What is meant by deadlock in database?

Transaction is unit of work done. So a database management system will have number of transactions. There may be situations when two or more transactions are put into wait state simultaneously .In this position each would be waiting for the other transaction to get released. Suppose we have two transactions one and two both executing simultaneously. In transaction numbered one we update student table and then update course table. We have transaction two in which we update course table and then update student table. We know that when a table is updated it is locked and prevented from access from other transactions from updating. So in transaction one student table is updated it is locked and in transaction two course table is updated and it is locked. We have given already that both transactions gets executed simultaneously. So both student table and course table gets locked so each one waits for the other to get released. This is the concept of deadlock in DBMS.

Monday, October 6, 2008

Wanna look at sample projects and download them..?

Elance.com –> here u can post ur projects and begin bidding them..

sourceforge.net –> to find high end projects like bittorrent ,azureus etc..

Sunday, October 5, 2008

Some useful websites

 

looking for stuff to decorate web pages go for-- htmlgoodies.com

a very good site for examples and code snippets - http://programming.top54u.com 

meshplex - like wikipedia for article reference

for java :

serverside.com

javabeginner.com

javaworld.com

javaranch.com

Knowledge exchange :

experts-exchange.com

edugeek.net just like experts exchange

Wanna Download high quality songs :

mixx.com

smashits.com

tamilmp3world.com

tamilbeat.com

Sites for mere programming mortals :

topcoder.com

codeproject.com

happycodings.com

planetsourcecode.com

WebTemplates and UI decoration :

pro webtemplates.com
oswd
opendesigns.org
extjs

Evaluation of prefix using stack

 most of us know how to evaluate a postfix using stack.now let us see for the prefix version.

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace prefix_eval_using_stack
{
    class Program
    {
        public static void Main(string[] args)
        {
            Stack s = new Stack();
            Console.WriteLine("Enter the prefix expression");
            string str = Console.ReadLine();
            int temp, x, y;
            char[] c = new char[26];
            int[] val = new int[26];
            int top = 0, index = -1;
            for (int i = str.Length-1; i >=0; i--)
            {

                switch (str[i])
                {
                    case '+':
                        x = Convert.ToInt32(s.Pop());
                        y = Convert.ToInt32(s.Pop());
                        s.Push(y + x);
                        break;
                    case '-':
                        x = Convert.ToInt32(s.Pop());
                        y = Convert.ToInt32(s.Pop());
                        s.Push(y - x);
                        break;
                    case '*':
                        x = Convert.ToInt32(s.Pop());
                        y = Convert.ToInt32(s.Pop());
                        s.Push(x * y);
                        break;
                    case '/':
                        x = Convert.ToInt32(s.Pop());
                        y = Convert.ToInt32(s.Pop());
                        s.Push(y / x);
                        break;
                    default:
                        index = -1;
                        for (int j = 0; j < top; j++)
                        {
                            if (str[i] == c[j])
                                index = j;
                        }
                        if (index == -1)
                        {
                            Console.WriteLine("Enter the value of {0}", str[i]);
                            temp = int.Parse(Console.ReadLine());
                            c[top] = str[i];
                            val[top] = temp;
                            top++;
                            s.Push(temp);
                        }
                        else
                            s.Push(val[index]);
                        break;
                }
            }
            Console.WriteLine("Result {0}", s.Peek());
            Console.ReadLine();

        }
    }
}

My Team mates

 

my team

Me .. along with the other captains of the college..

 

all captains