Thursday, December 30, 2004

Style Sheet Tweak Favelet

Style Sheet Tweak Favelet (JavaScript bookmark/favourite) is very useful for tweaking CSS on a page. The Favelet Suite is also very good (has list of favelets that can be run from host web site)

Saturday, December 25, 2004

Mozilla Update update

Mozilla Update has been updated. It looks a lot better than before and has new functionality. You can search and subscribe to an RSS feed to alert you of new/updated extensions.

Thursday, December 23, 2004

Bookmarklets for Firefox

Jesse Ruderman bookmarklets (SquareFree site author, does the Burning Edge the Firefox nightly build blog, user styles, JavaScript shell and JavaScript Environment)

Wednesday, December 22, 2004

Spread Firefox eCard Gallery

Send a Firefox/Thunderbird eCard using the Spread Firefox eCard Gallery.

Saving Session Variables

ASPAlliance Article: Session Variables - Saving with XML

Abstract
When developing web sites there are many times that session state has to be saved between pages. Here is a way to store all of your session variables in a single string and give access to all variables across all pages.

Cross Browser Modal Dialog Box

EggHeadCafe article: Cross Browser Modal Dialog Box. A model dialog box is one that maintains focus when you click on the window that opens it - i.e. you have to choose an option before you can continue using the site.

Tuesday, December 21, 2004

Image Manipulation: The GIMP 2.2 / Paint.NET 2.0

The GIMP 2.2 is now out. Download for Windows: http://gimp-win.sf.net/. The GIMP is a tool for working with and manipulating images and is open source. Not the most intuitive tool but very powerful, and is extended via plugins. Since the GIF patent expired you can generate GIF images (not available in version 2.0 and earlier). The file open/save dialog is a lot better in this version than the last version (2.0) and contains an image preview. Works on many platforms.

A good free tool for working with graphics. If you already have Photoshop or another professional package, then this may not offer any more over it. Help is a community project - not the same quality as what you may get with a commercial product, but covers the basics.

Total download size (with all optional components - help and animation): 20775kb (20.3MB) - GTK+ 2.4 runtime (3292kb), GIMP (7165kb), GIMP Help (9569kb), GIMP Animation Package (749kb)

Paint.NET 2.0 (developed by Washington State University with Microsoft mentorship) is also out. A Paintbrush replacement tool, requires .NET Framework and Windows XP. 7.71mb download (28.7mb with Framework).

Use Paint.NET for basic manipulation of bitmap images and GIMP for more complex work.

ASP.NET Smart Navigation

Smart Navigation (i.e. maintaining scroll position) only works in Internet Explorer. Luckily there is a way to get it to work in other browsers as well. Coding Horror: The Antidote to ASP.NET Smart Navigation, Part Deux

Web Developer Extension 0.9.1

The web developer extension for Firefox has been updated to version 0.9.1. It has a few bug fixes over 0.9.

Friday, December 17, 2004

Mastering ASP.NET Databinding

CodeProject Article: Mastering ASP.NET DataBinding

The goal of this tutorial is to shed light on some of the more common and frequently asked questions about the capabilities of databinding.

NVU Extension - htmlHeader Toolbar

First extension I have seen for NVU: htmlHeader Toolbar for N|Vu 0.6.

Thursday, December 16, 2004

SUM on bit columns (SQL)

When using SUM on a field ('bitcolumn') with the data type 'bit', you may not get the expected result - i.e. you would expect it to return the count of all the rows that have this field set to true (1).

SELECT SUM(bitcolumn)

However, it returns an error: The sum or average aggregate operation cannot take a bit data type as an argument.

You can however, use CAST to convert 'bit' to 'int', and perform SUM on the result.

SELECT SUM(CAST(bitcolumn As int))

This can however result in NULL returned as a value, when you want 0 instead. To always get a number as the result, you can also use COUNT combined with CAST and NULLIF. The key is that COUNT does not include any rows with NULL set on the field you are querying. CAST converts to 'int' and NULLIF converts the 0's to NULL's. COUNT therefor only includes the row count you want (where the field value is 1).

SELECT COUNT(CAST(NULLIF (bitcolumn, 0) AS int))

DataBinding Expressions in ASP.NET

OdeToCode article: Digging Into Data Binding Expressions. 'This article will demonstrate some techniques beyond simple DataBinder.Eval calls in ASP.NET data binding expressions.'. Includes usage of a method written in your code-behind, or casting (converting from one type to another, C# only).

Generic Url Creator

Generic Url Creator (GUC) is a Firefox extension that creates a URL from the text you select (i.e. use to lookup definitions, or perform a search). You can edit the list via the use of regular expressions.

Wednesday, December 15, 2004

Firefox Extension: Scrapbook

A useful Firefox extension that allows you to save web pages (or snippets from a web page). You can also search the snippets as well. ScrapBook Homepage. Good for when you find some code on a web site and want to quickly save it.

Firefox Theme Design

How to make a theme for Firefox. cheeaunblog - First steps in theme design. The author of this post created the Phoenity Theme.

Firefox v Internet Explorer

CNET has a feature where you can vote for which is the best browser: Sunday Smackdown: Mozilla Firefox 1.0 vs. Internet Explorer 6. Obviously you vote for Firefox (it already has 90% of the votes)

Tuesday, December 14, 2004

Tweaking Firefox

A guide to tweaking the various features in Firefox: Firefox Tweak Guide. Written before Firefox 1.0 came out, but still relevant.

Edit: Another way of speeding up Firefox would be to try one of Moox's custom builds. There is also a list of freeware on that site as well.

Future of CSS

Daniel Glazman (NVU developer) has written a post on what he thinks of the current state of CSS and what should happen in the future: Calling for a new CSS revolution. An interesting read.

What would the web be like now if Microsoft continued to work on Internet Explorer? I'm sure it would have been a lot better (less hacks for CSS in IE, better looking sites). Instead, Longhorn/Smart Clients is part of their future strategy and could go any way (new hardware and OS would be required, but you would be tied to Windows and would therefor be more expensive). Richer applications, but to the detriment of competition (i.e. Novell/IBM/Sun - who are investing in Linux and thin-clients) and the environment (old PC's going into landfills).

Monday, December 13, 2004

Dynamic Creation of Validation Controls (ASP.NET)

MSDN Article on creating validation controls dynamically via an XML file.

Useful Utilities - Zeraha.org

A few useful utilities from zeraha.org:

  • nPad - source viewer/editor with syntax highlighting
  • NetGraph - real-time network monitor
  • CodeBank - code snippet database with syntax highlighting
  • ImageScaler - quality image scaling/rotation
  • XMLPad - XML Editor
  • IconInjector - replace icon in exe/dll file (via command line)
  • MovieBank - movie database
  • MemBoost - defrag memory in Win 95/98
  • nSMS - send SMS via email (requires email-to-SMS gateway)

Friday, December 10, 2004

Google Suggest

Google has a beta feature that offers suggestions as you type: http://www.google.com/webhp?complete=1. Works the same way as typing a name into the To box when composing an email in GMail. What is good about it is that it does it so quickly (considering the amount of data they hold) and lists how many matches to each suggestion.

The good thing with Google is that new features they add are browser friendly (i.e. work in Firefox, Safari, Mozilla and Opera - so don't just test against Internet Explorer). It looks like they probably use web services extensively via JavaScript and XMLHttpRequest (Mozilla/Firefox/Opera/Safari) or Microsoft.XMLHTTP/Msxml2.XMLHTTP (Internet Explorer).

Thursday, December 09, 2004

Reusable Page Class Library (ASP.NET)

Code Project has a 4-part series on creating a web page class library that can be implemented in your web application:

Free eBook on SharpDevelop (.NET)

There is a free eBook (i.e. PDF document) available on SharpDevelop. While SharpDevelop does not do ASP.NET, it has a decent code editor with syntax highlighting and code-completion. So useful for building libraries (i.e. a data access layer or common function library) for use within a web application. It also does not have version control (had CVS support in the past, but that was dropped).

With enough demand (and hopefully more developers), SharpDevelop may get ASP.NET and source control in the future - which are essential if it really wants to compete with Visual Studio. At the moment the only decent tool for ASP.NET development is Visual Studio (which is sometimes out of people's budget, especially if they work for non-profit or budget sensitive organisations) - and that likes to reformat your code. Dreamweaver does ASP.NET - but no support for code-behind or code-completion (except for tags - even then, only the ones part of ASP.NET, not custom ones).

More information/download: Dissecting a C# Application: Inside SharpDevelop

Reporting websites that do not work in Firefox/Mozilla

There is a tool available for reporting sites that have issues with Firefox (and other Mozilla based browsers) - telling user to use Internet Explorer, blocking access, or with rendering/dhtml problems. There is a web-based form and an extension available to do this.

More information/screenshots: gemal.dk - New Reporter Tool.

Wednesday, December 08, 2004

Programmer's Fonts

A collection of fonts, that are useful when programming (i.e. readable, with l/I/1 and 0/O distinguishable). Sheldon and ProFont are good choices.

Edit (17 Dec 2004): ProgrammerFonts Wiki

Free .NET Charting Control (ASP.NET)

ASP.NET.4GuysFromRolla.com: A Look at WebCharts, a Free .NET Charting Control. Useful for generating web charts dynamically.

Monday, December 06, 2004

Tips and Tricks (SQL)

A few tips and tricks for SQL Server - via bersileus@SQLJunkies - Tips & Tricks.

  • Rounding by halves
  • Comma seperated list in WHERE clause
  • Simple paging
  • Case-sensitive comparison
  • Call stored procedure on other server

Sunday, December 05, 2004

Developing Validator Controls (ASP.NET)

MSDN Article - Developing a Validator Control. There are also alternatives to ASP.NET's built in validation controls that function the same but work in other browsers - DOM-Compliant Validator Controls (also available on Glavs Homepage at ASPAlliance.com) The site seems to have a CSS bug that makes it display incorrectly in Firefox/Mozilla. There is a feedback form for contacting the WebMaster (fix is to remove the height: 33px; line in the div.abstract class in the stylesheet aspalliance.css).

The validation controls in the next version of ASP.NET should work in browsers other than IE.

Friday, December 03, 2004

Multiple search terms (SQL)

When searching for data in a column, you may want to perform an OR AND or exact term on a user supplied string. When you use LIKE, the column needs to contain the whole text string, which is not always what you want. One way round this is to use a stored procedure as outline by Jeff Smith (Dr. Cross Join) a member of SQLTeam.com - Search Logic For Multiple Search Terms

NVU 0.6 (WYSIWYG html editor)

NVU 0.6, the free WYSIWYG html editor is now available for download. Still a long way to go before it is near Dreamweaver in terms of functionality. Has a few bugs as well (reformats code, does not work well with server side (ASP,PHP) code, adds DOCTYPE declaration (which you can't change) even when you don't want one (i.e. when editing an include file, or a template file used within a CMS), no XHTML support). Hopefully 1.0 will be a lot better (but will probably be a lot better by 2.0)

Site manager has improved, but could be better (i.e. context-menu, handling of other file types - cannot open ASP/ASP.NET files with it, no ability to add association (or use built in Windows associations). Perhaps it could be better if there were more working on the project (Daniel Glazman seems to be the only one (that I know of) actively working on it)?

XML Form Generator (ASP.NET)

This sample application creates an XML form that can create an XML file that contains data users entered into the form. It also has an example of how to display that data (via XSL)

Thursday, December 02, 2004

Web File Manager (ASP.NET)

The Code Project - Web File Manager - ASP.NET. By the same author who wrote User Friendly ASP.NET Exception Handling

A basic web based file manager that performs common functions on files/folders:

  • Copy/Move
  • Delete
  • Rename
  • Upload

Wednesday, December 01, 2004

Convert ArrayList to String (C#, VB.NET)

A function (with overloads, for char or string deliminator) for converting an ArrayList to a string (with defined deliminator). When calling with ArrayListToString(MyArrayList), default deliminator is ,.

C#

public string ArrayListToString(System.Collections.ArrayList ar)
{
 return ArrayListToString(ar, ',');
}
public string ArrayListToString(System.Collections.ArrayList ar, char delim)
{
 return ArrayListToString(ar, delim.ToString());
}
public string ArrayListToString(System.Collections.ArrayList ar, string delim)
{
 return string.Join(delim, (string []) ar.ToArray(typeof(string)));
}

VB.NET

Public Overloads Function ArrayListToString(ByVal ar As System.Collections.ArrayList) As String
 Return ArrayListToString(ar, ","C)
End Function

Public Overloads Function ArrayListToString(ByVal ar As System.Collections.ArrayList, ByVal delim As Char) As String
 Return ArrayListToString(ar, delim.ToString)
End Function

Public Overloads Function ArrayListToString(ByVal ar As System.Collections.ArrayList, ByVal delim As String) As String
 Return String.Join(delim, CType(ar.ToArray(GetType(String)), String()))
End Function

DetailsView control for ASP.NET 1.x, NAnt

The DetailsView control is a new control that will be in the next version of ASP.NET (Whidbey). This has been backported to ASP.NET 1.x as a custom control. NAnt is a tool for building .NET applications (get source, configure, compile, test, create documention and package for deployment). Building Web Applications with NAnt (ASP.NET)