Archived entries for Development

Regular Expressions

I have been getting better and better at using regular expressions in my C#, PHP, and JavaScript work.

I love the AIR version of this tool which helps you easily test your expressions.

I recently created this expression for a phone number search.

[0-9]{10}|[^0-9]{1}[0-9]{3}[^0-9]{1,3}?[0-9]{3}[^0-9]{1,3}?[0-9]{4}

It first looks for a string of 10 numbers or it looks for groups of numbers separated by non-numbers totaling 10 numbers.

jQuery / Google API Plugins

I needed to use Google maps for a job a few months ago.

I found gMap, a great jQuery plugin created by a Cedric Kastner, a german jQuery master.

Shortly after that job I need to do some work with the Google Search API and was so inspired by gMap that I decided to make a jQuery plugin for the Google Search API.

It is called gSearch and it is a lightweight jQuery plugin that helps you embed Google web search results into your website.

I am now doing more intensive work with the Google Maps API and am probably either going to write my own version of gMap implementing more features using the API’s 3rd version now launched.

Disable Chrome in C# Sharepoint 2007 Webparts

I create a lot of custom webparts for SharePoint 2007. One slightly annoying thing is remembering to turn of the Chrome when adding webparts to pages. It can also be a problem when your advanced clients who are adding webparts forget to to disable the Chrome.

In your c# webpart class slap in the following code to automatically disable Chrome. You can’t even select anything other than Chrome so be careful.

public override PartChromeType ChromeType
{
get {
return base.ChromeType;
}
set {
base.ChromeType = PartChromeType.None;
}
}

A Truly Blank Sharepoint 2007 Master Page

Download – A truly blank master page ready for custom code.

I like to completely kill the SharePoint bloat and add my own custom html/css/js.



Copyright © 2004–2009. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.