General Tips & Tricks


Tips & Tricks

Disclaimer: I (the author of this blog) wants to let you know that you'll use any or all of the instructions on this page at your own risk and I am not responsible for any kind of damage caused (indirectly or directly or in any other way) by following the instructions below or by reading the article and/or my blog.

Here is a list of tips and tricks that I found useul. This list is my on-going work so expect it to change very often and keep visiting.

  • How to create a one-to-one relationship in MS Sql Server 2000 Enterprise Manager Diagram Editor:
    Make the column unique in the table where the key is acting as foreign key.
  • Cloak / Uncloak SCM (subversion) directories in Dreamweaver
    Its very easy to do that. You just have to go to "
    Adobe Exchange" and search for the string "svn cloak uncloak". It'll show you only one result. Go to the result page and download the dreamweaver extension. Now, fire up your Dreamweaver (I tried version 8), click on Command->Manage Extensions. This will open up a tiny window on your screen. Click on the toolbar button "Install Extension" and select the file you downloaded from Adobe Exchange. This will install the extension. After installation is complete you'll see two new menu items under Command Menu item (i) Clock SCM Directories (ii) Uncloak SCM directories. Names are self-explanatory, so wont tell you what to do next.
  • Go to Top of the Page Using Javascript
    Use the code below
  • Javascript: Execute a function every second
    Use the Code below to do that
    var timer = null;
    timer = setInterval('function()', 1000); // time = 1000 ms
  • MS SQL SERVER 2000: Comparing DATETIME Value and Date String:
    In order to compare a DateTime column with a Date string you have to use the string below in SQL's Where clause.
    WHERE CONVERT(VARCHAR, [birth_date], 1) = '12/27/81'
    where birth_date is a DateTime column in the table.
  • Javascript: Sleep for 2 Seconds
    Use the function below to do that. Pass 2000 to this function to sleep for 2 seconds.
    function js_sleep(milliseconds){
    var date = new Date();
    var curDate = null;
    do{ curDate = new Date(); }while(curDate - date < milliseconds);
  • PHP: Finding name of caller
    function called_function()
    $backtrace = debug_backtrace();
    print "Caller is:".$backtrace[1]['function'];

Please let me know if you have some tips and tricks that I can add here.

NOTE: See readers' comments after the advertisement.

Labels: , , , , ,


At December 10, 2006 at 5:31:00 PM PST , Blogger Shahryar said...

This one is a good concept


Post a Comment

Subscribe to Post Comments [Atom]

<< Home