Great site to help pick colour scheme for sites

Here is a great site for helping to choose colour schemes for websites.


iPhone Development starter book

If you want to get into iPhone development this is a great book to start from Beginning iPhone Development by apress


Creating Event Handler Signatures

In Visual Studio 2008 you’ve lost the abillity to click on the drop down in the code behind and see all the event signatures that are available but haven’t handled yet. To get the signature you are after without using the properites in the desinger you can type…


this.

As you hit the . all methods and events should appear, pick the event you after e.g. Load

Then add type += after the event name and press TAB TAB, the event is automatically generated. ASP.Net auto wires the events with the correct name and signature so you should be able to delete the line of code that binds the event.

Check out this article for more info.


Windows shutdown command line

The following article gives a detail list of command line statements that can be used with the Shutdown command. The following snippet shows how to restart a remote computer

Shutdown /m \\computername /r


HTML Codes

The following article lists all of the HTML codes that can be used in a web page to represent special characters.


C# 3.5 – Code Snippets

In the intellisense list certain options will appear that state they are code snippets, e.g. foreach. To get the snippet to actually insert press TAB twice.

See MSDN for more details


VB.Net – ControlChars

If you need special characters in your VB.Net use the ControlChars class, it has definitions for Lf, Crlf, etc.

See MSDN for more details


Forcing Data Types on literal constants

The following type characters can be used to force a literal value to be a certain data type


"a"c 'Char
#1/1/1900# 'Date
0D 'Decimal
0@ 'Decimal
0.0R 'Double
0.0# 'Double
0I 'Integer
0% 'Integer
0L 'Long
0& 'Long
0S 'Short
0.0F 'Single
0.0! 'Single

See MSDN for more details


SQL Grant Execute

Found an article that had a nice SQL script to assign execute permissions to a user in SQL2000

Here is the script

DECLARE @sql nvarchar(4000)

DECLARE @db  sysname ;
SET @db = DB_NAME()

DECLARE @u   sysname ;
SET @u = QUOTENAME('')

SET @sql ='select ''grant exec on ''
        + QUOTENAME(ROUTINE_SCHEMA) + ''.''
        + QUOTENAME(ROUTINE_NAME) + '' TO ' + @u
        + ''' FROM INFORMATION_SCHEMA.ROUTINES ' +
        'WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_NAME),''IsMSShipped'') = 0'

EXEC master.dbo.xp_execresultset @sql,@db


TryCast – better than DirectCast?

In VB.Net Framework V2.0 a new command was introduced called TryCast It works the same as DirectCast but if the cast fails instead of throwing an exception the object is set to Nothing

Take a look at MSDN for more details.


Next Entries