Geeks With Blogs


Agha Usman Ahmed JILAWATAN October 2008 Entries
How to remove HTML Tags from a string in Javascript
Some days back, one of my team members came to me saying he need a function which is capable of remove the html tags using javascript. I mean if we pass “<span style=’mystyle’> this is demo </span>” this string to the function. It supposes to return only “This is demo” and the main thing is with having no formatting at all, Just the simple text between tags. So, Initially I make it happen using regular expression but the strategy fails when some think like &nbsp; comes in. after snatching ......

Posted On Thursday, October 30, 2008 2:53 PM

Search Text Inside Stored Procedures
Another requirement of the day, we need to search text in the sql server procedures. To be more specific I want to find which procedure is using my table named as “table_name”. So here is the quick query for that. select distinct from sys.objects so inner join syscomments sc on so.object_id = where so.type = 'p' and sc.text like '%table_name%'. This will list all the procedures which are using “table_name”. Note: The query was originally created by Adil Aleem of Ln Technologies ......

Posted On Monday, October 27, 2008 5:28 PM

Exact Server URL
I heard couple of requirement like this especially after VS 2005, in which you have development server with the dynamic port which change most of the time when you start Visual Studio. The problem is how to get the SERVER URL with port number. Here is the code in Public Shared Function GetServerUrl(ByVal req As System.Web.HttpRequest) As String Dim port As String = req.ServerVariables("SERVER... Dim AppPath As String = req.ApplicationPath Dim reurnUrl As String = "http://" + req.Url.Host ......

Posted On Monday, October 27, 2008 5:17 PM

Happy Eid-ul-Fitar 2008
After having 29 days of fasting Muslims all over the world are now celebrating EID. Well, the joy of EID is for everyone who had sacrifices their wished in the holy month of Ramadan. Like other Muslims, I too kept fast and tell prayers as much as I can but still long way to go to be a good Muslim. After some very difficult time in the recent build of LIVINGMEMORY now I am looking forward to enjoy long weekend. Anyway ….. Happy EID to All of you ......

Posted On Wednesday, October 1, 2008 12:03 AM

Copyright © Agha Usman Ahmed | Powered by: