Archive for June, 2007
Simple Scraping with SubSonic.Sugar
Friday, June 29th, 2007SubSonic.Sugar has some handy utilities. Highly recommended. The source is worth browsing too.
static void Main() { foreach (string link in SubSonic.Sugar.Web.ScrapeLinks("http://mhinze.com/", false)) { Console.WriteLine(link); } }
links for 2007-06-28
Thursday, June 28th, 2007-
fabulous…
links for 2007-06-27
Wednesday, June 27th, 2007links for 2007-06-26
Tuesday, June 26th, 2007-
I HAVE to find this wdu.exe, or else i'll be forced to write it
-
i can heartily recommend this tool
-
SQL Server has everything you need already in place to accept large, complicated sets of data as parameters in a stored procedure!
links for 2007-06-25
Monday, June 25th, 2007links for 2007-06-23
Saturday, June 23rd, 2007-
profile
links for 2007-06-22
Friday, June 22nd, 2007-
wow
Search Query Term Highlighter - HttpModule for ASP.NET
Thursday, June 21st, 2007Sometimes I find it useful when, as I'm searching, result documents are presented with my search terms highlighted. Like they do in Google's cache.
So I decided to write an HttpModule to handle the highlighting. I also thought it would be useful to log these terms. This module can serve that purpose quite nicely with a little modification.
I found an open source solution so I adapted it. I ported most of the regular expressions and some of the logic from SEHL, the search engine query terms highlighter for PHP.
Download: Search Term Highlighter HttpModule for ASP.NET
To use this HttpModule in any ASP.NET web site, place the class file in your App_Code folder and add this to web.config in the system.web section:
<httpModules> <add type="SearchTermHighlighterModule" name="SearchTermHighlighterModule"/> </httpModules>
The HTML source it produces looks like this:
<span class="highlight-search-query">Ishmael</span>
So you'll need to include the style definition in your stylesheet:
.highlight-search-query { background-color:Lime; }
to get this( searching for [ishmael "some years ago" the] ):
One item left on my TODO list is to use multiple CSS classes, so that each term can have it's own color.
links for 2007-06-21
Thursday, June 21st, 2007-
i like the sales section