Tuesday, 19 April 2016

Delete auto complete server names from sql management studio


// step by step

Please close sql management studio before doing this.---

1-  Go to C:/
2- User
3- User Name
4- AppData
5- Roaming
6- Microsoft
7- Microsoft SQL Server
8- 100
9- Tools
10- Shell
11- SqlStudio.bin

C:\Users\UserName\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin

12- Open with text format and delete all data

Wednesday, 13 April 2016

Get Modal and Serial No. of your system


// GET Modal No.

Type SYSTEM INFORMATION and get modal no.

// Get Serial No.

1. Command prompt and type- cd /  press Enter Key
2. Type WMIC BIOS GET SERIALNUMBER press Enter Key

THUS- C:/WMIC BIOS GET SERIALNUMBER

Monday, 11 April 2016

Custom style of browse file using css


//css

.lbl
        {
            position: relative;
            border: 1px solid #adadad;
            text-align: center;
            cursor: pointer;
            color: #333;
            background-color: #e6e6e6;
            border-radius: 4px;
        }
        .lbl input
        {
            position: absolute;
            z-index: 2;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            /*margin-top: -22px;*/
        }      
.lbl:hover {
    background: #CCCCCC;
}
.lbl:active {
    background: #CCFFCC;

}

// Html

<div class="lbl">
    <input type="file"/>
    <span>Browse..</span>
</div>

//Result

Browse..

Checking if a word in a Word document Paragraphs text is bold Asp.net c#



Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.OpenNoRepairDialog(FileName: Filepath, ConfirmConversions: false, ReadOnly: true, AddToRecentFiles: false, NoEncodingDialog: true);
          

Microsoft.Office.Interop.Word.Range r = doc.Paragraphs[par].Range; 

     if (r.Bold == -1)
        {
            string ptext=r.Text.Trim();

        }


/// Result

This is bold

Sunday, 10 April 2016

Removing multiple white-space or from string using c#




// Function
System.Text.RegularExpressions.Regex.Replace('string', 'regular exp', 'white-space');

// Exp
string Str="sdf  asd    asdf sdfas  asdf      asdf   asdf sdf    asdf        asdf    asdf";

string cleanedString = System.Text.RegularExpressions.Regex.Replace(Str, @"\s+", " ");

// Result

cleanedString ="sdf asd asdf sdfas asdf asdf asdf sdf asdf asdf asdf";

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...