March 30, 2006

Maintain Better Coding Standards with Ease Using Checkstyle

riting consistently clear, high quality, maintainable code is an art that requires a certain amount of discipline at the best of times. Coding standards lay out rules and recommendations about the way code should be written and also enshrine good coding habits. Recently, coding standards have enjoyed renewed importance and

Retrieve All Columns from Each Table in Every Database

This stored procedure retrieves all the columns of each table in every database. create procedure SP_GetAllColumnsFromAllDB/*———————————————————————- Procedure to retrieve columns of all the databases– Usage : exec SP_GetAllColumnsFromAllDB– Logic is: First get all the DB into a master cursor excluding system databases– (1 Master, 2 tempdb, 3 model, 4 msdb,

Build a Reusable AJAX Class

Building a reusable AJAX class can help you eliminate some of the headaches when you’re starting out: Open a new file called connection.js and type the following lines in to start building your class: function AjaxConnection() { this.setOptions=setOptions; this.getOptions=getOptions; this.connect=connect; this.uri=”ajax_service.php”;} function setOptions(opt){ for(i=0;i

Convert Numbers to Excel Column Names

This algorithm converts column numbers (1-x) to Excel column names. It works for any number and does not have a limit. ‘————————————————–‘ Columns can be any number from 1 to x’ ASCII A = 65 so since we’re starting with 1′ chr(intCol + 64 ) = A’————————————————–Function ExcelCol(ByVal intCol As