Saturday 9 January 2016

Saturday 11 May 2013

Youtube Video Download

YouTube videos are viewed by a million of users everyday. However, at times we may want to view the video offline.There are a few ways of downloading videos from youtube. I am going to mention the one I find the most simplest & which requires minimal effort.


The following are the steps:

1. Type the URL "youtu.be" in the Address bar of the web browser.


                
             

2. Select the video you want to watch (I have selected "Introducing Samsung GALAXY S4 ").

                       
                        
3. Right click on the video and select "Pop out".




4. A pop up box with same video will open.
                         
                           

5. Wait for the video to load a little bit & select "Save Video As".

                       



6. Save the video with the name you want & click 'Save'.

                            





7. Video will start downloading.
                             

8. View your downloaded file with your desired media player.



Hope this was helpful!!

Sunday 28 April 2013

Nested For Loop Simplified

For Loop is used in programming languages almost in every code snippet. Moreover, if a program involves a multidimensional array , then the use of nested loop(inner loop)  is inevitable. The most simplest form of code of assigning a value to the multidimensional array using a For Loop is as follows:


PHP snippet                                                                            
                                                                              
$a = array();

for($l=0;$l<3;$l++){
    for($m=0;$m<3;$m++){
        $a[$l][$m] = 1;
        echo "Array:[".($l)."] [".($m)."]"." ";
         echo "Value: ".$a[$l][$m];
        echo "<br>";
       
    }
}

PHP Result

Array:[0] [0] Value: 1
Array:[0] [1] Value: 1
Array:[0] [2] Value: 1
Array:[1] [0] Value: 1
Array:[1] [1] Value: 1
Array:[1] [2] Value: 1
Array:[2] [0] Value: 1
Array:[2] [1] Value: 1
Array:[2] [2] Value: 1

However, if the same result is to be achieved with one loop rather than using nested loop, then the following code can prove to be useful:

PHP snippet

$l=3;     //Inner Loop
$m =3;   // Outer Loop
$a = array();
  
 for($i=$l;$i<(($m*$l)+$l); $i++){

    $j = $i % $l;
    $k = intval($i/$l);
    $a[$k-1][$j] = 1;
    echo "Array:[".($k-1)."] [".($j)."]"." ";
    echo "Value: ".$a[$k-1][$j];
    echo "<br>";
 }

PHP Result:

Array:[0] [0] Value: 1
Array:[0] [1] Value: 1
Array:[0] [2] Value: 1
Array:[1] [0] Value: 1
Array:[1] [1] Value: 1
Array:[1] [2] Value: 1
Array:[2] [0] Value: 1
Array:[2] [1] Value: 1
Array:[2] [2] Value: 1


This program is also used to reduce the Time Complexity to a certain extent.

Saturday 10 November 2012

Transfer data from windows XP harddrive to windows 7 hardrive


I had taken a backup of my data from windows XP harddrive using the Windows NT backup restore utility as my harddrive was not going to last for long. I successfully managed to get the backup done. However, I could not restore the backup on windows 7 on my new harddrive as I realised they had come up with a new backup restore utility which was windows easy transfer. I tried several ways, but found the following one to be the easiest

1. Copy "ntbackup.exe", "ntmsapi.dll", "vssapi.dll" from C:\WINDOWS\system 32 (Windows XP Harddrive) to your device(external) where you have taken the backup.
2. Connect the external device where you want the backup to be restored (Windows 7 Harddrive).
3. Double click on "ntbackup.exe". The Windows NT backup restore utility will open up and you will be able to transfer your data.

Note: This is only for cases where hardrive needs to be replaced and you want to install windows 7 on your new hardrive, else you just need to format your C Drive and install windows 7 from installation CD.


Bye for now!!

Getting started

Hi, I am Aaron. This is my first post on tektrikz and i am really excited