Posts

Showing posts from 2011

Jquery: Get Focus on First Field of Form

Put this in jQuery Document Ready event and you will get focus on Forms first field. $("form:not(.filter) :input:visible:enabled:first").focus(); This is very useful when there are many forms.

Bulk Resize of Images. - Linux

Want to do easy and quick Resize of bulk Images.  below command is the best solution. To run below command, ImageMagick needs to be installed. find ./ -name "*.jpg" -exec mogrify -resize 50% {} \; Above command will navigate to the all the Folder and Subfolder and shrink all jpg(s) to 50%.

Reseed or Reindex Primary Key - SQL Server

Dealing with database sometimes requires to Reindex the Identity Column or Primary Key to Reindex. Below is the command or Query to be run on SQL Server to Reseed / Reindex Identity column for SQL Server. DBCC CHECKIDENT (tablename, reseed, 10) Above statement will return current max value and reseed the identity from the value given as last parameter. Here 10 is value to start from.