Posts

Showing posts from June, 2005

Google Maps API

Add the power of Google Maps to your website with the Google Maps API . Announced on the Google Blog: The world is your JavaScript-enabled oyster . I wonder how many sites will start using this? Tags: Web Developer Blog , Google , Google Maps

Firefox Search Plugins

I have been following the progress of bug 123315 for Firefox/Mozilla. This bug is a request for search plugins to be installed in the user profile directory. They have finally made a patch for this bug so in future versions of Firefox (hopefully 1.1 too) plugins should be installed to the users directory. Why is this important? Well, if you run under a limited user you cannot add search engines to Firefox without write access to the Firefox folder. Users who try to are not given an error message when they try to add one, it simply is not added. Also at the moment, search engines are added for all users, which may not be desirable (some users may want different search engines to others). If you want to know how to do a basic search plugin, here is a mini tutorial: Search plugins are actually very easy to do. If you look in the <Firefox Install>\searchplugins\ folder (by default C:\Program Files\Mozilla Firefox\searchplugins\ ) you will see all the search plugins used by Firef...

Updated Text Clips for Programmers Notepad 2

Updated text clips for Programmers Notepad 2 . ASP.NET Text Clips XHTML Text Clips Tags: Notepad Alternative , Programmers Notepad , PN2 , ASP.NET , XHTML

FixWordAutoFormat (C#)

Text pasted from Word into an ASP.NET Web Form can cause issues when posting to a database (the characters are replaced with '?' when the page content-type is not windows-1252). This function helps to fix the issue, by replacing those characters with ISO-8859-1 / UTF-8 friendly alternatives. /// <summary> /// Fixes text auto formatted by Word (em/en dashes, smart quotes, bullet, ellipses) /// </summary> /// <param name="input">String containing auto formatted text</param> /// <returns>String without auto formatting</returns> public static string FixWordAutoFormat(string input) { // replace en-dash input = input.Replace("&#8211;", "-"); // replace em-dash input = input.Replace("&#8212;", "-"); // replace open single quote input = input.Replace("&#8216;", "'"); // replace close single quote input = input.Replace("&#8217;", "'...

Date conversion examples (SQL Server)

Some examples of converting dates within SQL Server: Fun with Dates (Date Conversion examples) . Includes, but is not limited to - finding month when you only have week and year, last day of month, get date portion of datetime value, counting days between two dates (while excluding holidays and weekends) and get first and last day of week.

MyGeneration Templates

MyGeneration is a quality freeware tool that can reduce coding time by generating code against your database. It comes with dOOdads , which is a high quality .NET framework for accessing your database tables and adding/updaiting deleting records via code. Very lightweight and written in both C# and VB.NET. I use the C# version, but it doesn't really matter which one you use as they are almost identical and when you compile to an assembly, you can use it with any language for .NET. There is also a forum at the site (registration required to post). The authors of MyGeneration (Mike Griffin and Justin Greenwood) regularly participate there. It has a templating system, which allows you to output into any language (as it outputs to plain text files, so C#, VB.NET, SQL, PHP, Perl, Python - i.e. anything is possible). Templates are very powerful and simple to do, and you can write it with the following languages - C#, VB.NET, VBScript and JScript. With C# and VB.NET, you can embed Wind...

Google Sitemaps

Google Blog : Webmaster-friendly Google Sitemaps is an experiment by Google to improve the web for webmasters and users. First of all you create a sitemap - either manually ( Sitemap Protocol ), or via a tool you install on your server ( Sitemap Generator ). Sitemap Generator requires Python 2.2 or higher installed on the server. If you cannot get Python installed on the server (i.e. using hosting solution with Windows and/or host unwilling to install extra software), you could always install/run it on you local development machine, then upload the generated sitemap. Since Sitemap Generator is open source, anyone can improve it - SourceForge Project: Sitemap Generator . This is also open to other search engine developer as it is under the Attribution/Share Alike Creative Commons license (i.e. can be used commercially, but must give author credit and share any changes you make). Sitemap Generator uses the BSD license (the Creative Commons license refers to the protocol, not the too...

CSS Cheat Sheet

CSS Cheat Sheet is a useful reference sheet of CSS 2.1 selectors and properties, media types and unit references. Also includes an illustration on how the box model works (in standards compliant browsers, and IE6 when it is in standards mode). No specifics about browsers and how they implement the standards - but it wouldn't be a cheat sheet then, rather a 'cheat book'. Tags: Web Developer Blog , CSS