Tuesday, October 26, 2010

validating Phone number

Title : Indian Mobile No

Expression : ^((\+){0,1}91(\s){0,1}(\-){0,1}(\s){0,1}){0,1}9[0-9](\s){0,1}(\-){0,1}(\s){0,1}[1-9]{1}[0-9]{7}$
Description  : This expression is to validate indian mobile nos
Matches : 9836193498, +919836193498 ,9745622222
Non-Matches : +9197456222222 ,8745622222 ,9836193481
__________________________________________________________________________________
Title :Chennai Phone Numbers

Expression
: ^(0)44[\s]{0,1}[\-]{0,1}[\s]{0,1}2[\s]{0,1}[1-9]{1}[0-9]{6}$
Description :This expression will help you to match chennai telephone numbers. chennai bsnl telephone numbers will start from 2.
Matches : 044-26320244 | 04426320244
Non-Matches :044-12345678 | 123-12345678
 ------------------------------------------------------------------------------------------------------------
Refer for more Expressions:
http://regexlib.com/REDetails.aspx?regexp_id=2500
http://www.aspnetquest.com/feed-items/search.aspx?k=expression&p=9
http://www.dotnetspider.com/sites/1050/-Solutions-Tips.aspx

Tuesday, October 5, 2010

Elminatinig duplicate values in databse table

 emp1 --->temporary empty table
dept----> original table with columns and rows
we use distinct key word to eliminate duplicate values
1.move the records from dept to a temporary table emp1 
     select distinct * into emp1  from dept

2 delete the original table dept
     drop table dept

3. move emp1 records to dept table
     select * into dept from emp1

4.check the original table
    select * from dept


Browser asking username & password

problem of asking to type username and passoword for http://localhost. try this solution as mentioned below :
1. Open firefox and type in the address bar about:config
2. type ntlm in the textbox.
3. Double click on network.automatic-ntlm-auth.trusted-uris and type localhost there.
4. Click on OK.

You are done.
for Internet Explorer follow these steps:

The Log in Pop up is due to a setting in your IE Browser.
In your IE Browser:
1. Go to the Top menu "Tools" -> "Internet Options".
2. Then choose the "Advanced" Tab.
3. Then Scroll all the way down and "Uncheck" the Checkbox corresponding to "Enable Integrated Windows Authentication".
4. Then Click the button that says "Apply" and then "OK".
5. Close the browser and in a new browser try http://localhost.

for IIS SERVER  follow these steps:

1.start->run-> type inetmgr 
2 click on .internet nformation services-->Local Computer-->web sites-->default websites->right click and goto properties
3. select Directory Security Tab-->under anonymous access and authentication control --> click on edit button.
4.Check The Anonymous Access->ok
or
4. uncheck the Integrated Windows Authentication--.> ok-->ok

thats it ! u r done