Monday 30 June 2008

Utility Programs, Tools, Add-Ins plus other stuff.


If your looking for a tool/utility list, this is a good place to start - Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows.




This is my list,




Utility Programs
  • Unlocker Assistant - When you try and delete something and you get the file locked message, the Unlocker Assistant will pop up, giving you the option to unlock the files and perform your delete. Download from here
  • DiffMerge -is an application to visually compare and merge files for Windows, Mac OS X and Unix. Download from here
    • If using DiffMerge with Subversion, the following settings can be used to 'Diff' and 'Merge'

      Diff Viewer
      C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe /t1=%bname /t2=%yname %base %mine

      Merge
      C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe /m /r=%merged /t1=%yname /t2=%bname /t3=%tname /c=%mname %mine %base %theirs
  • AutoRuns - This utility shows you what programs are configured to run during system bootup or login. Download from here.

  • BgInfo - is a little tool that displays a load of your system information as a bmp on your desktop. More information from here

  • Daemon Tools

  • Regular Expression Workbench
  • SqlScripter

  • pdf reader

  • Paint.Net



FireFox Add-Ins

  • Adblock Plus
  • ColorZilla
  • del.icio.us Bookmarks
  • Firebug
  • Snap Links
  • YSlow
Visual Studio Add-Ins/Registry Settings
  • GhostDoc
  • ReSharper
  • Consolas Font Pack for Visual Studio. Download from here. More information from here.
  • Line Character Length Indicator - More information from here.
    • Run one of these registry files,

      VS2005 .reg file

      Windows Registry Editor Version 5.00
      [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor]
      "Guides"="RGB(128,0,0) 80, 120"


      VS2008 .reg file

      Windows Registry Editor Version 5.00

      [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor]
      "Guides"="RGB(128,0,0) 80, 120"

Other Stuff
  • Add "Delete SVN Folders" to Windows Explorer Context Menu. More Information here.

    • Create a registry file with the following.

      Windows Registry Editor Version 5.00

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]

      @="Delete SVN Folders"

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
      @="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (_svn) DO RD /s /q \"%%f\" \""





Monday 23 June 2008

Ajax Control Toolkit Popupcontrol and fieldsets

If you have


<fieldset> some content... including ajax popup </fieldset>



<fieldset> some more content </fieldset>





then the ajax popup pops up underneath the second fieldset,

to fix set the z-index on the first fieldset to be higher than the one on the second, ie as below.






<fieldset style="z-index: 2;"> some content... including ajax popup </fieldset>



<fieldset style="z-index: 1;"> some more content </fieldset>

Thursday 19 June 2008

Deleting takes a long time

Deleting files was taking a long time. Windows Explorer was freezing for 30 seconds plus. Checked out my recycle bin and it was full of big files.

Solution - empty your recycle bin more often

Wednesday 18 June 2008

AgilePoint Snippet - Stored Procedure and Custom Attributes



To get data out of your database and into a custom attribute, you can use the Query Database shape, set the SqlType property to StoredProcedure. the above shape would set the $ProjectName custom attribute.

Below is the start of the create script for the stored procedure,

CREATE PROCEDURE [dbo].[spGetProject]
@ProjectId int
, @ProjectName varchar(50) output

AS
BEGIN


Below is the sql to call the stored procedure for testing,

declare @pn varchar(50)
exec spgetproject @projectid=320, @projectname=@pn out
select @pn

Tuesday 17 June 2008

AgilePoint Snippet - Get/Set Custom Attributes

In a C# snippet shape, or in aspx code you can use the following to Get and/or Set a Custom Attribute.

if (api.GetCustomAttr(pi.WorkObjectID,"MyAttrName") == null)

{
api.SetCustomAttr(pi.WorkObjectID,"MyAttrName","My Custom Attr Value");
}

Tuesday 3 June 2008

SQL Snippet - Common Table Expressions

A Common Table Expression can be used to:-
  • Create a recursive query.
  • Substitute for a view when the general use of a view is not required; that is, you do not have to store the definition in metadata.
  • Enable grouping by a column that is derived from a scalar subselect, or a function that is either not deterministic or has external access.
  • Reference the resulting table multiple times in the same statement.
see Using Common Table Expressions and Recursive Queries Using Common Table Expressions

SQL Snippet - Using Cross Apply

Use Cross Apply with a user defined table-valued function.

read about it here..
Using CROSS APPLY in SQL Server 2005

SQL Snippet - Returning Ranked Results with Microsoft SQL Server 2005

TSQL in SQL 2005 provides the following options for ranking your result set.
  • ROW_NUMBER()
  • Ntile(int)
  • Rank
  • Dense_Rank

The above can optionally be used with "Partition By"

see this article. Returning Ranked Results with Microsoft SQL Server 2005 from 4guysfromrolla.