Tuesday, July 27, 2010

C# Classes and objects

For Class and Objects Refer the following websites links:

1. devarticle website
2.  C# station
3. Aspfree
4.  Kirupa
5. Video 1
6. Video 2
7. Informit

Learn and Shine....!

C# program for Structure and Enumeration


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

namespace structenumexample
{
class Program
{
enum Sem
{
Nil=0, First = 1, Second= 2,Third = 3, Fourth = 4, Fifth = 5, Sixth = 6
}
struct stud
{
int regno, m1, m2, m3, m4, m5, tot;
string name, result, perf;
float avg;
Sem sem;

public stud(int regno, int m1, int m2, int m3, int m4, int m5,string name,int sem)
{
this.regno = regno;
this.m1 = m1;
this.m2 = m2;
this.m3 = m3;
this.m4 = m4;
this.m5 = m5;
this.name = name;
this.avg = 0;
this.tot = 0;
this.result = "";
this.perf = "";
this.sem = (Sem) sem;
}

public void proce()
{
tot = m1 + m2 + m3 + m4+m5;
avg = tot / 5;
if ((m1 >= 40) && (m2 >= 40) && (m3 >= 40) && (m4 >= 40) && (m5 >= 40))
{
result = "PASS";
if (avg > 75)
perf = "Distinction";
else if (avg > 60)
perf = "First";
else if (avg > 50)
perf = "Second";
else
perf = "Third";
}
else
{
result = "FAIL";
perf = "Nil";
}

}
public void showres()
{
System.Console.WriteLine(" {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11}", regno, name, sem,m1, m2, m3, m4, m5, tot, avg, result, perf);
}
}
public static void Main(string[] args)
{
int regno, m1, m2, m3, m4, m5;
string name;
int sem;
stud[] st = new stud[10];
int i;
for (i = 0; i < 10; i++)
{
Console.WriteLine("Enter the Regno of the student");
regno = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the Name of the student");
name = Console.ReadLine();
Console.WriteLine("Enter the Semester of the student (1/2/3/4/5/6)");
sem = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the m1 of the student");
m1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the m2 of the student");
m2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the m3 of the student");
m3 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the m4 of the student");
m4 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the m5 of the student");
m5 = Convert.ToInt32(Console.ReadLine());
st[i] = new stud(regno,m1,m2,m3,m4,m5,name,sem);
}
for (i = 0; i < 10; i++)
{
st[i].proce();
st[i].showres();
}
Console.ReadLine();
}
}
}

The above program is the example for the Structure and Enumeration usage in C#.

Thursday, July 8, 2010

Check your self in Electroal List 2010

Go to the WebSite by clicking the Election Voters List 2010

(If needed install  all the tamil fonts by selecting download tamil fonts in the same page, and then refresh)
1. Go through the above link and select your district (Namakal)
2. Select the constituency like Kumarapalayam, Pallipalayam, Tiruchengode etc.
3. Then click submit
4. Polling stations of the selected constituency will be displayed
5. Then click the needed Polling Station
6. You will get the voters list in pdf format

View the List and Identify the Whether your name is there or not.

Wednesday, July 7, 2010

Tips for speeding up Windows XP performance

Five tips for speeding up Windows XP performance

1: Access the Performance options
2: Change Visual Effects settings
3: Change Processor Scheduling settings
4: Change Memory Usage settings
5: Change Virtual Memory settings

For More details visit : Click here

Tuesday, July 6, 2010

C# - Iterative Statements

Iterative statements repeat a particular statement block until a condition has been satisfied.

Following types of iterative statements are there in C#.

  • While
  • Do While
  • For
  • Foreach

From the above the while, for, foreach are the statements under the category of entry controlled looping. and the statement do while statement falls under the exit controlled looping.

The major difference between entry and exit controlled looping is the position where the condition is evaluated. Also in entry controlled looping, initially the condition is false the iterative block will not be executed even once, but in exit controlled looping, even if the condition is false, the iterative block is executed once and then only the condition is evaluated.

While Statement
The statement block of while statement is executed while the boolean expression is true. It may execute zero or more times. If the boolean expression is false initially, the statement block is not executed.

The while statement is used to iterate while the condition evaluates to true.

Do While Statement

Do While is almost similar to While statement except it validate its boolean expression after the statement block. It guranttees that the statement block shall run atleast once for sure. Further iterations of the statement block continues while the boolean expression is true.

For Statement
The For statement iterate a code block until a specified condition is reached similar to while statement. The only difference of for statement has over while statement is that for statement has its own built-in syntax for intiliazing, testing, and incrementing/decrementing (3 clauses) the value of a counter.
The first clause is the initialize clause in which the loop iterators are declared.
The second clause is the boolean expression that must evaluate to a boolean type and the statement block is repeated until this expression is false.
The third clause is to increment/decrement the value that is executed after each iteration.
All three clauses must be separated by a semicolon (;) and are optional. For statement block is repeated zero or more times based on the boolean expression validation (second clause).

ForEach Statement
ForEach statement is desiged to loop through a similar type of items in a collection. As each element is enumerated, the identifier is assigned the new element, and the statement block is repeated. The scope of the identifier is within the foreach statement block. The identifier must be of the same type extracted from the collection and is read-only.

for more details refer : Help 1 Help 2 Help 3 Help 4

RIA - Rich Internet Applications

Rich Internet applications (RIAs) offer a rich, engaging experience that improves user satisfaction and increases productivity. Using the broad reach of the Internet, RIAs can be deployed across browsers and desktops.

Benefits of RIAs
RIAs offer organizations a proven, cost-effective way to deliver modern applications with real business benefits:
  • Offer users a richer, more engaging experience.
  • Keep pace with users' rising expectations.
  • Increase customer loyalty and generate higher profits.
  • Leverage existing personnel, processes, and infrastructure.
Visit the for the collection RIA related materials : RIA Material

C# interview Questions and Answers

C# interview Questions and Answers

  1. What’s the advantage of using System.Text.StringBuilder over System.String?
  2. Can you store multiple data types in System.Array?
  3. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
  4. How can you sort the elements of the array in descending order?
  5. What’s the .NET datatype that allows the retrieval of data by a unique key?
For more questions with answers visit : http://www.techinterviews.com/c-sharp-interview-questions-and-answers

Monday, July 5, 2010

Teaching Computers To Recognize Objects

http://www.sciencedaily.com/releases/2009/06/090601090029.htm

Recognising objects and groups of objects is something we humans take for granted. For computers, this is far from straightforward. A European project has come up with novel solutions to this conundrum.

Nearest Neighbor

http://www.codeproject.com/KB/recipes/K_nearest_neighbor.aspx

http://www.codeproject.com/KB/recipes/Quantitative_Distances.aspx

C# - An Introduction

C# (pronounced C Sharp). C# is designed to be a simple, modern, general-purpose, object-oriented programming language, borrowing key concepts from several other languages, most notably Java.

C# could theoretically be compiled to machine code, but in real life, it's always used in combination with the .NET framework. Therefore, applications written in C#, requires the .NET framework to be installed on the computer running the application. While the .NET framework makes it possible to use a wide range of languages, C# is sometimes referred to as THE .NET language, perhaps because it was designed together with the framework.

C# is an Object Oriented language and does not offer global variables or functions. Everything is wrapped in classes, even simple types like int and string, which inherits from the System.Object class.
C# can be written with any text editor, like Windows Notepad, and then compiled with the C# Command line compiler, csc.exe, which comes with the .NET framework.
simple C# program looks likes as follows
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.ReadLine();
}
}
for more details refer : http://csharp.net-tutorials.com/