An Idea can change your life.....

Sunday, September 28, 2008

Watch online movies tv channels

Great website

Watch online Movies

Listen songs

Live Tv Channels

Telugu,Hindi,Tamil,Kannada,Panjabi,Bengali,Marathi

Bindaasbharat

Tuesday, September 16, 2008

SQL Server programming Group by day,Month ,Year

--group by day

SELECT COUNT(* ),

Dateadd(DAY,Datediff(DAY,0,HireDate),0) 'day'

FROM Employees

GROUP BY Dateadd(DAY,Datediff(DAY,0,HireDate),0)

ORDER BY Dateadd(DAY,Datediff(DAY,0,HireDate),0) DESC



--group by Month

SELECT COUNT(* ),

Dateadd(MONTH,Datediff(MONTH,0,HireDate),0) 'Month'

FROM Employees

GROUP BY Dateadd(MONTH,Datediff(MONTH,0,HireDate),0)

ORDER BY Dateadd(MONTH,Datediff(MONTH,0,HireDate),0) DESC



Friday, September 05, 2008

Wednesday, September 03, 2008

A new web browser from google Chrome


Google Chrome is a browser that combines a minimal design with sophisticated technology to
make the web faster, safer, and easier

One box for everythingType in the address bar and get suggestions for both search and web pages.

Thumbnails of your top sitesAccess your favorite pages instantly with lightning speed from any new tab.

Shortcuts for your appsGet desktop shortcuts to launch your favorite web applications.

Download

Wednesday, August 06, 2008

Internet Explorer 8

Try the new Developer friendly

Internet Explorer

clickhere

Regular Expressions in Dotnet

Quantifiers provide a simple way to specify within a pattern how many times a particular character or set of characters is allowed to repeat itself. There are three non-explicit quantifiers:

  1. *, which describes "0 or more occurrences",
  2. +, which describes "1 or more occurrences", and
  3. ?, which describes "0 or 1 occurrence".

Quantifiers always refer to the pattern immediately preceding (to the left of) the quantifier, which is normally a single character unless parentheses are used to create a pattern group. Below are some sample patterns and inputs they would match.

Pattern

Inputs (Matches)



fo*

foo, foe, food, fooot, "forget it", funny, puffy


fo+

foo, foe, food, foot, "forget it"


fo?

foo, foe, food, foot, "forget it", funny, puffy






In addition to specifying that a given pattern may occur exactly 0 or 1 time, the ? character also forces a pattern or subpattern to match the minimal number of characters when it might match several in an input string.

Explicit quantifiers are positioned following the pattern they apply to, just like regular quantifiers. Explicit quantifiers use curly braces {} and number values for upper and lower occurrence limits within the braces. For example, x{5} would match exactly five x characters (xxxxx). When only one number is specified, it is used as the upper bound unless it is followed by a comma, such as x{5,}, which would match any number of x characters greater than 4. Below are some sample patterns and inputs they would match.

Pattern

Inputs (Matches)

ab{2}c

abbc, aaabbccc

ab{,2}c

ac, abc, abbc, aabbcc

ab{2,3}c

abbc, abbbc, aabbcc, aabbbcc

Metacharacters

The constructs within regular expressions that have special meaning are referred to as metacharacters. You've already learned about several metacharacters, such as the *, ?, +, and { } characters. Several other characters have special meaning within the language of regular expressions. These include the following: $ ^ . [ ( | ) ] and \.

. It matches any single character

^ used to designate the beginning of a string (or line)

$ is used to designate the end of a string

\ is used to "escape" characters from their special meaning

| (pipe) is used for alternation, essentially to specify 'this OR that' within a pattern.

( ) used to group patterns.

Some examples of metacharacter usage are listed below.

Pattern

Inputs (Matches)

.

a, b, c, 1, 2, 3

.*

Abc, 123, any string, even no characters would match

^c:\\

c:\windows, c:\\\\\, c:\foo.txt, c:\ followed by anything else

abc$

abc, 123abc, any string ending with abc

(abc){2,3}

abcabc, abcabcabc

In order to include a literal version of a metacharacter in a regular expression, it must be "escaped" with a backslash.

For instance if you wanted to match strings that begin with "c:\" you might use this: ^c:\\

So something like a|b would match anything with an 'a' or a 'b' in it, and would be very similar to the character class [ab].

Character classes are a mini-language within regular expressions, defined by the enclosing hard braces [ ]. The simplest character class is simply a list of characters within these braces, such as [aeiou].

To specify any numeric digit, the character class [0123456789] could be used. However, since this would quickly get cumbersome, ranges of characters can be defined within the braces by using the hyphen character, -.

Eg: [a-z],[A-Z],[0-9]

If you need a hyphen to be included in your range, specify it as the first character. For example, [-.? ]

You can also match any character except a member of a character class by negating the class using the carat ^ as the first character in the character class. Thus, to match any non-vowel character, you could use a character class of [^aAeEiIoOuU].

Pattern

Inputs (Matches)

^b[aeiou]t$

Bat, bet, bit, bot, but

^[0-9]{5}$

11111, 12345, 99999

^c:\\

c:\windows, c:\\\\\, c:\foo.txt, c:\ followed by anything else

abc$

abc, 123abc, any string ending with abc

(abc){2,3}

abcabc, abcabcabc

^[^-][0-9]$

0, 1, 2, … (will not match -0, -1, -2, etc.)

Metacharacter

Equivalent Character Class

\a

Matches a bell (alarm); \u0007

\b

Matches a word boundary except in a character class, where it matches a backspace character, \u0008

\t

Matches a tab; \u0009

\r

Matches a carriage return; \u000D

\w

Matches a vertical tab; \u000B

\f

Matches a form feed; \u000C

\n

Matches a new line; \u000A

\e

Matches an escape; \u001B

\040

Matches an ASCII character with a three-digit octal. \040 represents a space (Decimal 32).

\x20

Matches an ASCII character using 2-digit hexadecimal. In this case, \x2- represents a space.

\cC

Matches an ASCII control character, in this case ctrl-C.

\u0020

Matches a Unicode character using exactly four hexadecimal digits. In this case \u0020 is a space.

\*

Any character that does not represent a predefined character class is simply treated as that character. Thus \* is the same as \x2A (a literal *, not the * metacharacter).

\p{name}

Matches any character in the named character class 'name'. Supported names are Unicode groups and block ranges. For example Ll, Nd, Z, IsGreek, IsBoxDrawing, and Sc (currency).

\P{name}

Matches text not included in the named character class 'name'.

\w

Matches any word character. For non-Unicode and ECMAScript implementations, this is the same as [a-zA-Z_0-9]. In Unicode categories, this is the same as [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}].

\W

The negation of \w, this equals the ECMAScript compliant set [^a-zA-Z_0-9] or the Unicode character categories [^\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}].

\s

Matches any white-space character. Equivalent to the Unicode character classes [\f\n\r\t\v\x85\p{Z}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \s is equivalent to [ \f\n\r\t\v] (note leading space).

\S

Matches any non-white-space character. Equivalent to the Unicode character categories [^\f\n\r\t\v\x85\p{Z}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \S is equivalent to [^ \f\n\r\t\v] (note space after ^).

\d

Matches any decimal digit. Equivalent to [\p{Nd}] for Unicode and [0-9] for non-Unicode, ECMAScript behavior.

\D

Matches any non-decimal digit. Equivalent to [\P{Nd}] for Unicode and [^0-9] for non-Unicode, ECMAScript behavior.

Sample Expressions

Most people learn best by example, so here are a very few sample expressions.

Pattern

Description

^\d{5}$

5 numeric digits, such as a US ZIP code.

^(\d{5})|(\d{5}-\d{4}$

5 numeric digits, or 5 digits-dash-4 digits. This matches a US ZIP or US ZIP+4 format.

^(\d{5})(-\d{4})?$

Same as previous, but more efficient. Uses ? to make the -4 digits portion of the pattern optional, rather than requiring two separate patterns to be compared individually (via alternation).

^[+-]?\d+(\.\d+)?$

Matches any real number with optional sign.

^[+-]?\d*\.?\d*$

Same as above, but also matches empty string.

^(20|21|22|23|[01]\d)[0-5]\d$

Matches any 24-hour time value.

/\*.*\*/

Matches the contents of a C-style comment /* … */

Regex test;

test = new Regex("testing");

Match m = test.Match("here is a string for testing");

if (m.Success) {

// do whatever you want

}

Wednesday, July 30, 2008

Saturday, July 12, 2008

Web Page/Server Control Life Cycle Methods and Events

Method (Event) / Description
1. OnInit (Init)

Initializes each child control of the current
control.

2.LoadControlState

Loads the ControlState of the control. To use this method, the control must call the Page.RegisterRequiresControlState method in the OnInit method of the control.

3.LoadViewState

Loads the ViewState of the control.

4.LoadPostData

Is defined on interface IPostBackDataHandler. Controls that implement this interface use this method to retrieve the incoming form data and update the control’s properties accordingly.

5.Load (OnLoad)

Allows actions that are common to every request to be placed here. Note that the control
is stable at this time; it has been initialized and its state has been reconstructed.

6.RaisePostDataChangedEvent

Is defined on the interface IPostBackData-Handler. Controls that implement this interface
use this event to raise change events in response to the Postback data changing between the current Postback and the previous
Postback. For example, if a TextBox has a TextChanged event and AutoPostback is turned off, clicking a button causes the Text-Changed event to execute in this stage before handling the click event of the button, which is raised in the next stage.

7.RaisePostbackEvent

Handles the client-side event that caused the Postback to occur.

8.PreRender (OnPreRender)

Allows last-minute changes to the control. This event takes place after all regular Post-back events have taken place. This event takes place before saving ViewState, so any changes made here are saved.

9.SaveControlState

Saves the current control state to ViewState. After this stage, any changes to the control state are lost. To use this method, the control must call the Page.RegisterRequiresControlState method in the OnInit method of the control.

10.SaveViewState

Saves the current data state of the control to ViewState. After this stage, any changes to the control data are lost.

11.Render

Generates the client-side HTML, Dynamic Hypertext Markup Language (DHTML), and script that are necessary to properly display this control at the browser. In this stage, any changes to the control are not persisted into ViewState.

12.Dispose

Accepts cleanup code. Releases any unman-aged resources in this stage. Unmanaged resources are resources that are not handled by the .NET common language runtime, such as file handles and database connections.

13.UnLoad

Accepts cleanup code. Releases any managed resources in this stage. Managed resources are resources that are handled by the runtime, such as instances of classes created by the .NET common language runtime.

Heaven or Hell

Once an old man was sitting in the park reading book "learn Oracle in 21days".

A passer by saw him and asked "U are such an old guy, why do you bother to learn Oracle?

"I have heard that communication language at heaven is Oracle so after my death when I will be in heaven, I don't want to face communication
problem."old man replied.

"But how come u are so sure that U will be in heaven? It could be a hell also." he asked.

"Ya, doesn't matter .... I already know J2EE"

Fate and the Heart

Kindergarten teacher has decided to let her class play a game. The teacher told each child in the class to bring along a plastic bag containing a few potatoes. Each potato will be given a name of a person that the child hates, so the number of potatoes that a child will put in his/her plastic bag will depend on the number of people he/she hates. So when the day came, every child brought some potatoes with the name of the people he/she hated. Some had 2 potatoes; some 3 while some up to 5 potatoes.


The teacher then told the children to carry with them the potatoes in the plastic bag wherever they go for 1 week.

Days after days passed by, and the children started to complain due to the unpleasant smell let out by the rotten potatoes. Besides, those having 5 potatoes also had to carry heavier bags. After 1 week, the children were relieved because the game had finally ended.

The teacher asked: 'How did you feel while carrying the potatoes with you for 1 week?' The children let out their frustrations and started complaining of the trouble that they had to go through having to carry the heavy and smelly potatoes wherever they go. Then the teacher told them the hidden meaning behind the game.


The teacher said: 'This is exactly the situation when you carry your hatred for somebody inside your heart. The stench of hatred will contaminate your heart and you will carry it with you wherever you go. If you cannot tolerate the smell of rotten potatoes for just 1 week, can you imagine what is it like to have the stench of hatred in your heart for your lifetime???'


Moral of the story:


Throw away any hatred for anyone from your heart so that you will not carry sins for a life time.
Forgiving others is the best attitude to take! Life is to be fortified by many friendships. To love & to be loved is the greatest happiness.

Fate determines who comes into our lives. The heart determines who stays.

Friday, June 27, 2008

Convert a comma separed values in to table

CREATE FUNCTION [dbo].[ufn_CSVToTable] ( @StringInput VARCHAR(8000) )
RETURNS @OutputTable TABLE ( [String] VARCHAR(10) )
AS
BEGIN

DECLARE @String VARCHAR(10)

WHILE LEN(@StringInput) > 0
BEGIN
SET @String = LEFT(@StringInput,
ISNULL(NULLIF(CHARINDEX(',', @StringInput) - 1, -1),
LEN(@StringInput)))
SET @StringInput = SUBSTRING(@StringInput,
ISNULL(NULLIF(CHARINDEX(',', @StringInput), 0),
LEN(@StringInput)) + 1, LEN(@StringInput))

INSERT INTO @OutputTable ( [String] )
VALUES ( @String )
END

RETURN
END
GO

Thursday, June 26, 2008

Online Pratice Exams

For Online Pratice Quiz in .NET Technologies you can check at
geekinterview
googlepages
4Test
Numer2
You can evaluate your .NET Knowledge and get assessed for FREE.
Questions are generated randomly.

Please leave a comment of any other such websites you know.

Tuesday, June 24, 2008

Todo

Manage tasks quickly and easily.

If you go to View -> Task List and select “Comments” from the dropdown, you’ll see that “TODO” comment in the list.

Friday, June 20, 2008

heart touching

An 80 year old man was sitting on the sofa in his house along with his 45 years old highly educated son.

Suddenly a crow perched on their window.
The Father asked his Son, "What is this?" The Son replied "It is a crow".
After a few minutes, the Father asked his Son the 2nd time, "What is this?" The Son said "Father, I have just now told you "It's a crow".

After a little while, the old Father again asked his Son the 3rd time, What is this?"At this time some ex-pression of irritation was felt in the Son's tone when he said to his Father with a rebuff. "It's a crow, a crow".

A little after, the Father again asked his Son t he 4th time, "What is this?"This time the Son shouted at his Father, "Why do you keep asking me the same question again and again, although I have told you so many times 'IT IS A CROW'. Are you not able to understand this?"

A little later the Father went to his room and came back with an oldtattered diary, which he had maintained since his Son was born. On opening a page, he asked his Son to read that page.

When the son read it, the following words were written in the diary :- "Today my little son aged three was sitting with me on the sofa, when a crow was sitting on the window.

My Son asked me 23 times what it was, and I replied to him all 23 times that it was a Crow. I hugged him lovingly each time he asked me the same question again and again for 23 times.

I did not at all feel irritated I rather felt affection for my innocent child". While the little child asked him 23 times "What is this", the Father had felt no irritation in replying to the same question all 23 times and when today the Father asked his Son the same question just 4 times, the Son felt irritated and annoyed.So..If your parents attain old age, do not repulse them or look at them as a burden, but speak to them a gracious word, be cool, obedient, humble and kind to them.
Be considerate to your parents.From today say this aloud, "I want to see my parents happy forever.

They have cared for me ever since I was a little child. They have always showered their selfless love on me.

They crossed all mountains and valleys without seeing the storm and heat to make me a person presentable in the society today". Say a prayer to God, "I will serve my old parents in the BEST way. I will say all good and kind words to my dear parents, no matter how they behave.

After all result Matter!

Priest dies & is awaiting his turn in line at the Heaven's Gates. Ahead of him is a guy, nattily dressed, in dark sun glasses, a loud shirt, leather jacket & jeans.

Lord Dharamraj asks him : Please tell me who are you , so that I may know whether to admit you into the kingdom of Heaven or not ?

The guy replies : I am Banta Singh, taxi driver from New Delhi !

Lord Dharamraj consults his ledger ( Bahi khaata ), smiles & says to Banta Singh : Please take this silken robe & golden staff & enter the Kingdom of Heaven.

Now it is the priest's turn. He stands erect and speaks out in a booming voice : I am Sant Shiromani Baba so & so ,Head Priest of the so & so Temple for the last 40 years.

Lord Dharamraj consults his ledger & says to the Priest : Please take this cotton robe & wooden staff & enter the Kingdom of Heaven.

"Just a minute," says the agonised Priest. How is that a foul mouthed,
rash driving Taxi Driver is given a Silken robe & a Golden staff, and me, a Priest , who's spent his whole life preaching your Name & goodness has to make do with a Cotton robe & a Wooden staff ?

" Results my friend, results," shrugs Lord Dharamraj.

While you preached, people SLEPT ; but when he drove his taxi, people PRAYED.
Moral of the story: It’s the RESULT that matters…

Email Etiquettes

Hi All!


This is good list of email etiquettes. Please go through it and make sure to use it in your day to day work.


Why are you writing to me?
State the purpose of your e-mail -- it is a good practice to have a subject line that explains what follows and how high on the priority list it should be. This information has to be in two places:


i. The subject box, which is part of the compose e-mail form. Here, state the reason for your mail. If you are writing it to apply for leave, you could say 'Leave application'.


ii. Subject line in the main e-mail body; just as you would in any formal business letter. Here, you could say: Sub: Leave application, April 1-April 15 2006
Greet me right


Address people you don't know as Mr, Mrs, Ms or Dr. Address someone by first name only if you are on a first name basis with each other; it is okay, under these circumstances, to use first names on a formal business missive.


If you do not know the name of the person, or whether it is a man or a woman, it is best to address the person concerned as: Dear Sir / Madam, Whomsoever it may concern, The Manager; etc.

And your point is?Get to the point.
Verbosity and extreme terseness are two ends of a spectrum, you should try for the middle -- state your point without sounding rudely brief or chatty.


Remember to state your point and what you expect from the reader of your mail in clear terms. There should also be a clear structure -- an introduction, body and conclusion.

2 use or not 2 use...Never use 'sms-ese' or informal abbreviations in your email. U instead of you, 2 instead of to or too, plz instead of please, thanx instead of thanks and 4 instead of for are a strict no-no.


While are all right for personal e-mail, they show a level of informality not encouraged in formal business communication. Frequently used abbreviations you may use include FYI (for your information), Pvt., Ltd., Co., etc., OK.


The magic of spellsThough using a spell check is a must, don't rely on it completely. The most common areas of errors and confusion are -- two, too and to.


For eg: Wrong: I would like two order too other books two.
Correct: I would like to order two other books, too.
A hit or miss effort with spellings does not help -- use a dictionary.
Write rightGood grammar is very important. A correctly framed sentence, with proper punctuation in place, is what you should aim at. Be very careful with commas, especially, as they change the meaning of a sentence.


A good example would be:
Wrong: All foreign tea, tree, oils are free from duty.
Correct: All foreign tea tree oils are free from duty.
Use action words and 'I' statements -- they evoke a sense of reassurance in the reader. For eg:
On receipt of your earlier mail, I/ we have already set things in motion and I/ we assure you that you will receive your order on time.


I was responsible for the day-to-day working and administration of the office; planning, scheduling, and achieving targets were my areas of contribution.


Mind your P's and Q's Though a friendly tone is encouraged, basic corporate etiquette rules do apply. So, maintain a well-mannered, friendly polite stance.


Gender-neutral language is politically correct -- couch your e-mail accordingly. This essentially means you should not assume a person's gender on the basis of the designation. Keep the e-mail neutral.Attachment breeds detachmentWith worms, viruses, and spam, nobody wants to open attachments anymore, not even if the e-mail is from one's own mother. If you do need to send an attachment, confirm this with the recipient first.


Like an arrow shot from a bowAn e-mail is like the spoken word -- once sent, you can't recall it. By the time you press the recall button, chances are it has already reached and, with it, your recall message. This compounds the embarrassment. So, think before you dash off something.


The KISS rulesKeep It Short and Simple. Use simple sentences, words that don't need a dictionary. Use universal formats -- not all systems support HTML rich style, or tables and tabs. You could lose much by way of appearances if your recipient's system can't support all that fancy formatting you spent hours working on.


Smile pleaseSmileys and other emoticons are a way to add 'body language' to e-mail. When used appropriately and sparingly, smileys do bring a touch of personalisation to otherwise impersonal mail. Of course, due care with regards to the appropriateness of the communication must be taken.


You would not use emoticons in job application covering letters, while delivering bad news (delay in order, loss of job, etc). Use discretion.


Emoticons are generally used to add comfort to the communication or soften the blow. The most common smiley faces are probably these:


:-) OR :) Just a smile / can be used for greeting or making a point gently. :-( OR :( To show mild displeasure or that something is not going the way you want it to. ;-) Equivalent to a wink -- used to convey that a particular comment is a joke and not to be taken too seriously. ;-> To be used sparingly, and with people you know well, as this signifies a provocative comment.


Humour doesn't travelWhat seems funny to you may be offensive to someone else. Remember, humour doesn't travel well. Jokes about religion, sports, political figures, and women may come across as tasteless and should be avoided at all costs.


Swift and promptBe prompt in replying. That is why we have the Internet. If a prompt response were not expected, one would use the postal service.


CAPITAL, MY DEAR FELLOWIF YOU WRITE IN CAPITALS, IT SEEMS AS IF YOU ARE SHOUTING. You could get really angry responses to your e-mail if you do so, and trigger a flame war.
Fw. Fw. Fw. Do not forward chain letters -- simply delete them. Also avoid forwarding them to professional contacts.


Shh... It's a secretIf it is a secret, don't send it via e-mail -- you never know where it will end up.


ConnectionsKeep the thread of the message as part of your mail; this will help keep the context handy. The thread is the previous message/s in context to which this e-mail is being written. Last but not least, please, please read the e-mail before you click the 'Send' button. It will save you a lot of embarrassment and misunderstanding.

Thursday, May 08, 2008

Install multiple versions of IE on your PC

Ever wanted to test your website in various versions of Internet Explorer?

However, it’s not quite so straightforward when it comes to testing your work in both Internet Explorer 6 and 7. By default, Windows will only run one version of IE, and while this obviously isn’t much of an issue for the average web user, it’s more problematic for web designers and developers who need to ensure that their work displays correctly in both versions.

In my experience, installing Multiple IE is a far more foolproof way of testing web pages across multiple versions of Internet Explorer on PC


It is possible to run Internet Explorer in standalone mode without having to over-write previous versions.

Download



NetRenderer.

Here you simply enter the URL of the page to be tested, select which version of IE you want to test it in, and NetRenderer renders a screenshot for you.

Sunday, April 27, 2008

Listen to Hyderabad Radio on web

RadioCity 91.1 FM - Live from Hyderabad
RadioMirchi 98.3 FM - Live from Hyderabad
Rainbow 101.9 FM - Live from Hyderabad
S FM 93.5 - Live from Hyderabad

Check out here Radio

Saturday, April 26, 2008

differences between EXECUTE() and SP_EXECUTESQL()

EXECUTE sp_executesql
N'SELECT * FROM AdventureWorks.HumanResources.Employee
WHERE ManagerID = @level',
N'@level tinyint',
@level = 109,@MessageIn Output;


1. EXECUTE() :: If we write a query which takes a parameter lets say "EmpID". When we run the query with "EmpID" as 1 and 2 it would be creating two different cache entry (one each for value 1 and 2 respectively).

It means for Unparameterised queries the cached plan is reused only if we ask for the same id again. So the cached plan is not of any major use.

2. SP_EXECUTESQL() :: In the similar situation for "Parameterised" queries the cached plan would be created only once and would be reused 'n' number of times. Similar to that of a stored procedure. So this would have better performance.

A Simple usage of Replace Function

REPLACE ( string_expression1 , string_expression2 , string_expression3 )


SELECT Replace('OurTeam.com Rocks!', 'Rocks', 'Rolls')

Saturday, April 19, 2008

Tree view of hierarchy using the cte

One of the uses of Common type expression

WITH
Hierarchy(EmployeeId,Employeename,Parentid,Hlevel)

AS (SELECT EmployeeId,

Employeename,

Parentid,

0 AS Hlevel

FROM OrgEntitiesMaster

WHERE Parentid = 0

UNION ALL

SELECT H.EmployeeId,

H.Employeename,

H.Parentid,

Hlevel + 1

FROM OrgEntitiesMaster H

INNER JOIN HIERARCHY P

ON H.Parentid = P.EmployeeId

)

SELECT *

FROM HIERARCHY