Wednesday, December 3, 2014

Convert HTML to Plain Text

 public string HTMLToText(string HTMLCode)
        {
            // Remove new lines since they are not visible in HTML
            HTMLCode = HTMLCode.Replace("\n", " ");

            // Remove tab spaces
            HTMLCode = HTMLCode.Replace("\t", " ");

            // Remove multiple white spaces from HTML
            HTMLCode = Regex.Replace(HTMLCode, "\\s+", " ");

            // Remove HEAD tag
            HTMLCode = Regex.Replace(HTMLCode, "", "" , RegexOptions.IgnoreCase | RegexOptions.Singleline);

            // Remove any JavaScript
            HTMLCode = Regex.Replace(HTMLCode, "

Monday, March 3, 2014

Test Your Love


Test Your Love How much it is pass or acquire marks.

http://lovetest.singlessalad.com/?cid=4581&ax=1&clickid=0053618368096869236&ext_inv_code=103883&dfpid=102103883&oid=7813

Tuesday, February 25, 2014

Kill All Process in database sql while restoring



If there is any problem that database currently in use and you are not able to restore database than you can run this query for block all processes currently running.

Use Master
Go

Declare @dbname sysname

Set @dbname = 'CDM_HVMS'

Declare @spid int
Select @spid = min(spid) from master.dbo.sysprocesses
where dbid = db_id(@dbname)
While @spid Is Not Null
Begin
        Execute ('Kill ' + @spid)
        Select @spid = min(spid) from master.dbo.sysprocesses
        where dbid = db_id(@dbname) and spid > @spid
End
print 'done'