Saturday 4 February 2012

Some useful web design tools


1) Buttons - http://code.google.com/p/sexybuttons/

2) Css Print Framework - http://code.google.com/p/hartija/

3) Show large photo using jquery -  http://code.google.com/p/jquery-largephotobox/

4) slideshow using jquery -  http://code.google.com/p/a-slideshow/

Change the precision of all decimal columns in every table in the database

Found a script on the net to change decimal column precision for MSSQL database. Can be modified to change other data type.

Change the precision of all decimal columns in every table in the database
Get the columns from information_schema based on type and scale, then alter them to have the desired scale.
declare @col sysname
declare @tbl sysname
declare @sql nvarchar(256)
declare crsFix cursor for
select table_name, Column_name from information_schema.columns
where data_type = 'decimal' and Numeric_Scale = 3
open crsFix
fetch next from crsFix into @tbl, @col
while(@@Fetch_Status = 0)
Begin
    set @sql = 'Alter table [' + @tbl + '] alter column [' + @col + '] decimal(38,2) ' 
    print @sql
    exec sp_executesql @sql
    fetch next from crsFix into @tbl, @col
End
close crsFix
deallocate crsFix

Malaysian Passport Renewal

Gone to renew my passport the other day. Processing was fast albeit some queueing and waiting.

Steps and requirements:
1) download and print the application form. Use laser printer. Fill in the form details
2) 2 copies of passport size photo(3.5 x 5 cm).
3) MyKad identification card.
4) RM300.00 for 32 pages 5 years passport.

Go to immigration office. Get a queue number. Wait for your turn. Submit your application form. After checking your application form and MyKad, they will request you to come back in 2 hours to get your new passport.