The firefox update can be downloaded as *.tar.gz from the official website.

We can directly move to the downloaded directory and untar it . It will give us a folder named firefox .Inside that , we will be having an executable named firefox. Once you trigger the executable , the new version of firefox will launch.

But, we have a problem here. The existing version still exists in home folder as .firefox . And if you take an attempt by clicking on the firefox icon, it will launch the older version of your firefox.

We need to find out the directory where the firefox is installed. In my case, it was in /usr/lib . Sometimes, it may get installed in /opt or /etc. we need to replace the /usr/lib/firefox directory with our downloaded latest firefox.

cd /usr/lib
sudo cp -r /home/user/download/firefox .

Enter the password to proceed with the action.

After the copy, when you click on the firefox icon , new version of the firefox will open.

One of the best rubik Timer with lot of inbuilt options. I took an attempt of using Prisma Puzzle Timer in Ubuntu 14.04.

We can download the jar from this website
Prisma Puzzle Timer

After downloading we can run the timer from terminal using the following command

Move to the downloaded jar file location

cd /home/user/Downloads

and run the jar file by

java -jar PrismaPuzzleTimer0.6.jar

which will invoke the timer .

But everytime , we need to type this command in the terminal to invoke it .

Instead we can create a laucher file which will invoke this timer. For that we need a simple software .

Alacarte.

We can download the software using the command

sudo apt-get install alacarte

Once downloaded invoke alacarte from the terminal by typing its name

alacarte

and click on new item button to create a new launcher.

In the command type java -jar PathToTheJarFile

in my case its java -jar /home/user/Software/PrismaPuzzleTimer.jar

Save and close . With the given Name (in my case its “RubikTimer”) it will be added to the main menu.

You can search for the work RubikTimer in the menu search tab and launch the software by clicking on the file .

Please refer to the images below .

Installing Alacarte

Setting Up The Launcher Icon

Searching for the Launcer

Prisma Puzzle Timer

I had Ubuntu 12.04 and Windows 7 running in my system and Ubuntu 12.04 got Crashed .I tried debugging it but couldnt succeed.

I decided to do a fresh install of latest version of Ubuntu and that was Ubuntu 14.04. I created a live USB and installed it in my system .

Installation was quick and easy. But , since i created a new Ubuntu install rather than overridding the existing one , Only 9 GB of space was left with me in the system Where ubuntu 14.04 got installed.

I had access to Ubuntu 12.04 Files as a separate drive, which i doesnt needed. I was looking for some application like Disk Management in windows which would help me to resize my partitions and i edned up with Gparted.

It looked pretty complex stuff for me to delete the partition and free up the space . Luckily , dual boot helped me to do it via Disk Management utitility in windows. I had free space ready with me .

Follow the steps below

1. Open Gparted and authorize it.
2. Right click on the partition which you want to increase
3. Select Resize/Move
4. Enter correct value in New size (It should be less then total unallocated space)
5. Click on start button to complete the action.

I was trying to resize my ubuntu 14.04 partion space using Gparted , where i deleted a partition which had my previous ubuntu install.

Unfortunately, the grub was loading from that partition and after my restart the computer went to the promt with grub rescue menu.

If you face the simillar situation , you can recover your OS grub loader as below.

This link was really helpful for me to boot my ubuntu installation .
http://askubuntu.com/questions/493826/grub-rescue-problem-after-deleting-ubuntu-partitionhttp://askubuntu.com/questions/493826/grub-rescue-problem-after-deleting-ubuntu-partition

Follow the steps given by Amr Amyan.

For me the commands were

set root=(hd0,msdos6)
set prefix=(hd0,msdos6)/boot/grub
insmod normal
normal

where msmod6 is the partition where ubuntu resides. That can be found by ls command .
Try ls(hd0,msdosX) and hit enter. you should be a valid partition . (ext2 partition)

But its not the end. You have just booted up the OS. When you restart you will be back to your grub rescue menu.

So here we have 2 options.

1. Using Live CD or Live USB
2. Using Existing Ubuntu

Since my Ubuntu 14.04 got booted up , i installed boot-repair from terminal by following these commands

sudo add-apt-repository ppa:kranich/cubuntu
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Once its done , open boot repair and select “Recommended Repair” Menu . System will recover Grub and give you a link as well.
NOte down the link and restart your computer.

Bingo !!!!

Even after boot repair you are not getting the boot menu, paste the link to the corresponding email id. Ubuntu support team will help you out !!!.

For developing applications in Django, i needed a good IDE for writing code in python and Pycharm is the IDE that works like a charm.

I downloaded the pycharm tar ball package from here.

Download Pycharm from here

and extract the package as

tar xvf Pycharm*.tar.gz

You got the package untarred but, we gotta check one more stuff.

Pycharm will look for JAVA HOME . Check if java is installed .

java -version

if not , install it with

sudo apt-get install default-jre

And run the pycharm.sh script from bin folder.

Am completely new to python and Django . Today i made an attempt of installing Django in my ubuntu 14.04 system.

The OS is fresh installed, just did 4 days back . Django is going to be my first package installation.

I went with the Official Documentation given below

Official Documentation for Django Installation

As given in the link , there are 3 major steps.

1. Check if python is already installed in your computer.

I did by typing

python –version in my terminal and i got answer as Python 2.7.6.

Hence, i proceeded to step 2 .

2. Remove any previous versions of Django if installed.

sudo rm -rf /usr/lib/python2.7/dist-packages/django

You have to run this command to remove the previous version. Change the python version accordingly in the command

If you skip this step you might be getting an error as given below

OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/django'

I tried installing Django Directly using pip which gave me this error . And i visited the following URL for the solution.

Solution for OS Error

3. Install Django.

In ubuntu 14.04 LTS i didnt have pip installed in prior. Hence i had to install that first. That can be done by

sudo apt-get install python-pip

and then you can install Django by typing this command

sudo pip install Django==1.8.1

Django installed successfully.

To verify open the python prompt by typing python in the terminal and use the following commands to see Django version

>>> import django
>>> print(django.get_version())

insertionSortCard

Best example of insertion sort is sorting deck of cards. .. As you see in the figure, say we have 2,4,5 10 and 7 clubs in our hand and we have to sort it .
As we know, we will take 7 clubs and place it between 5 and 10 clubs. Hence, for each card we need to swap the cards before it and place the key card in place .

 

Before the analysis , lets have a look at pseudo code of insertion sort. For input array A

 


INSERTION-SORT(A)

for j <-- 2 to length [A]

do key <-- A[j]

i <-- j - 1

while i > 0 and A[i] > key

do A[i + i] <-- A[i]

i <-- i - 1

A[i + 1] <-- key

&nbsp;

 

I tried implementing the same in C++. Here is the code

 

 

#include <iostream>

using namespace std;

int main()
{
int arr[] = {5,2,4,6,1,3};
int arrSize =  sizeof(arr)/sizeof(arr[0]);
int key;
int i;
for(int j=1; j<arrSize; j++)
{
        key = arr[j];
        i = j - 1;
        while(i >= 0 && arr[i] > key)
        {
                arr[i+1] = arr[i];
                i = i - 1;
        }   

        arr[i+1] = key;

}

for(int i=0; i<arrSize; i++)
cout << arr[i] << " " << endl;
return 0;
}

Output is :

insertionSortOutput

Before we start our analysis of the insertion sort, we will see how many times each statement runs.

 


INSERTION-SORT(A)

for j <-- 2 to length [A] ----------------------------  runs n times

do key <-- A[j] --------------------------------------  runs n-1 times

i <-- j - 1     --------------------------------------  runs n-1 times
                                                       n
while i > 0 and A[i] > key --------------------------- ∑ tj
                                                       j=2
                                                       n
do A[i + i] <-- A[i]  -------------------------------- ∑ tj - 1
                                                       j=2

                                                       n
i <-- i - 1 ------------------------------------------ ∑ tj - 1
                                                       j=2
A[i + 1] <-- key ------------------------------------- n-1

&nbsp;

Now, lets get into the analysis part.
Okay, In each statement , we do some operations as well i.e – increment, decrement, counter — all those are considered to be constants. Hence we name constants from c1 to c7
And also, tj is the function which does while loop operation .
If the input is already sorted, there would be no in-swapping takes place. i.e. While loop will never be executed. Since while loop is inside FOR loop which runs from 2 to n , we enclose it with sigma j = 2 to n.
Hence the equation would be
What could be the Best case ?? — A sorted input
and what could be the worst case input . — Input sequence in reverse order.

 

These 3 screenshots will explain how insertion sort is O(n) in best case and O(n square) in worst case. 

 

 

BestCase

insertion_sort

worst case

 

This you tube video will be helpful to understand the same

https://www.youtube.com/watch?v=yXwFrc5GS6A — click the view the video