| If you’re not running Vista, you can stop reading here .
One of the cool new features in Windows Vista is the Sidebar, Windows’ technology for creating gadget/widgets/whatever you wanna call em. Basically, it’s a bar that runs along the side of your window which contains useful mini-applications.
Well, today I posted my first Sidebar gadget, Pickabar BPM. Pickabar BPM is a simple little gadget with exactly one button that calculates BPM based on a tapped tempo. If you don’t record music, DJ, or make mashups you probably won’t find it useful. If you do any of those activities, you probably have a tap tempo feature in your DAW or what have you anyway. In that case, the only real advantage is that this little sucker is always there waiting for you, just a click away, w/o having to launch the full recording app.
A co-worker was looking to find urls in a bunch of text files, and had limited success with the examples at the Regular Expression Library. Here’s a quick little expression that I whipped up for him. I’ve also added it to the library for the 6 billion or so people in the world who aren’t subscribed to my feed.
It doesn’t include every possible pattern, but it works flawlessly for the following sample text:
this is my url http://test/test.jpg?test=1&foo=bar EndProject ftp://products/ and how about http://someserver or http://www.msn.com/default.aspx#test ok? ok http://www.nothere.com/index_file.html ha ha ha <a href=”http://dev1″>Dev1</a>
I’ve only tested it using .Net, but it will probably work with any regular expression engine.
Here’s a snip from the included readme file:
The TraceLoggerSoapExtension is a modification of the MSDN sample SoapExtension. Instead of logging the incoming and outgoing messages to a file, the messages are written to either the System.Web trace log, or whatever TraceListener objects are registered (depending on your configuration choices).Web.Config or App.Config example usage:
<webServices> <soapExtensionTypes> <add type="GLindsay.Web.Services.SoapExtensions.TraceLoggerSoapExtension,GLindsay.Web.Services.SoapExtensions" priority="1" group="0" /> </soapExtensionTypes> </webServices>
Server Declaritive usage:
When using the declaritive syntax, it’s possible to specify “TraceType.WebTrace” for System.Web tracing, or “TraceType.DiagnosticsTrace” to use the System.Diagnostics TraceListeners. While in client context, the SoapExtension automatically switches to TraceType.DiagnosticsTrace. That means you’ll see the
logged messages in VS.NET’s output window.
Don’t forget to send me mail if you find this useful!
I only wish the GotDotNet site exposed RSS feeds for individual user downloads. I’d love to be able to track the number of downloads for my samples from my hand dandy news aggregator.
I’m a little bummed. My MTIfBlogId Movable Type plugin is basically useless. The alternate templates feature of MT, along with the MTCgi plugin means that you can create alternate search templates w/o using my baby. Oh well, back to the drawing board.
Search from my blog should now be in my style rather than KnitWit’s.
I just found out that a custom Sharepoint web service I created working with Groove was demoed at this year’s Tech-Ed. I heard this from a Groove contact well after the fact, obviously, so I’m not sure if it was what was described in their press release as “Groove Document Librarian“. The code itself was nothing special, just a a simple web service that used the Sharepoint object model to expose Sharepoint’s document management and search functionality using an abstraction based on our potential customer’s business. It was difficult to write though, as I had to work under a tight time frame with Beta 1 bits and very little documentation.
The one fun little bit was getting an opportunity to use the Web Service Enhancements to send SOAP with attachments.
Considering I’m still miles away from my goal of being published, I’m pretty psyched.
Last night I had a little trouble getting to sleep, so I created the MTIfBlogId plugin (right click and choose “save target as” to download). If you’re not aware, there’s only one search template for each Movable Type installation. Inspired by Brad Choate, I decided to create a custom Movable Type plugin to allow us to customize our search pages so that each of my serverneighbors can have their own look and feel.
Here’s a sample usage:
You can see it in action by searching from my blog as there should be three stars at the bottom of the page. You won’t see those stars when searching from any of the other blogs on knitwitology.net. If I have time tonight, I’ll fool around with making some more meaningful changes to the search template.
The plugin works by comparing the blogid attribute’s value as set in the tag with the IncludeBlogs query string parameter passed to the mt-search.cgi. In hindsight, I probably should have just created a plugin that would work for any querystring parameter, but hey I have to sleep some time.
My first experience with extending MT was great. I’m a total PERL newbie, but I was able to add the necessary functionality without any trouble. It took only ten or so lines of code, and I didn’t have to fiddle with configuration files or registering DLLs. Sweet!