Change Useragent in Firefox

Firefox LogoThere are some websites which require you to visit them using Internet Explorer only, I don’t know why but there are some. My friend had to download an important document from a site which insisted on using Internet Explorer. We both are in Linux, Fedora. Is there a way? Yes there is. The browser version and certain system details are stored in the browser configuration, and this sting is called the useragent string. The information in this string is used to detect what browser you are using. Therefore if we can modify this string such that it looks like we are using Internet Explorer instead of Firefox, then we can fool the other end. After doing this the server side will believe that you are using an InternetExplorer browser or any other browser (also a different OS), depending on what the useragent string you are using to override the original.

Instagram does not allow you to upload pictures from desktop/laptop. Using this method you can set the useragent string of your desktop/laptop browser to an andriod or iOS browser and upload pictures to Instagram from your desktop.

What we need to do is simple. Just create a new entry in firefox browser configuration and set the value to appropriate useragent string. So let’s get started with this short and quick guide.
Continue reading “Change Useragent in Firefox”

Find Sum (i … j) in a list

The problem is to sum the ith to jth element of a given list. The easiest solution runs in \mathcal{O}(n) time, which starts are the ith index and adds up the numbers in the list until it reaches the jth index. In this post i will show the process of calculating the sum of elements i through j both inclusive (where i \le j), which takes \mathcal{O}(1) time for finding the sum, and \mathcal{O}(n) time and space for preprocessing the given list of length n.
Continue reading “Find Sum (i … j) in a list”

Find a String in an Alphabet Grid

Everybody of us has definitely played the word search game in which a grid of characters are given, and a list of words are given which are to be found in the grid horizontally, vertically or diagonally. In this post i will show a simple solution to a more generalized version of the search which finds the strings in the grid with backtracking.
Continue reading “Find a String in an Alphabet Grid”

Towers of Hanoi Iterative process: simulating recursion

The last post Recursive Solution to Towers of Hanoi described the well-known recursive definition and implementation of the Towers of Hanoi problem. This post is an extension presenting the same problem iteratively by simulating the recursion stack. This implementation will simply to simulate the recursion presented on the previous post by using an explicit manual stack.

Continue reading “Towers of Hanoi Iterative process: simulating recursion”

Recursive Solution to Towers of Hanoi

Towers of Hanoi is a mathematical game or a puzzle in which there are three pegs, and some disks (originally 8) of different radius placed on top of one another such that no larger disk is placed on a smaller disk. The task is to transfer such a column of disks from a source peg to another destination peg. The constraints are we can move only one disk at a time, and we may use the third peg as a temporary storage for the disks, and a larger disk cannot be placed on top of a smaller disk.

The puzzle was invented by the French mathematician Édouard Lucas in 1883. There is a legend about an Indian temple which contains a large room with three time-worn posts in it surrounded by 64 golden disks. Brahmin priests, acting out the command of an ancient prophecy, have been moving these disks, in accordance with the rules of the puzzle, since that time. The puzzle is therefore also known as the Tower of Brahma puzzle. According to the legend, when the last move of the puzzle is completed, the world will end.[2] It is not clear whether Lucas invented this legend or was inspired by it.

Wikipedia

In this post I will describe the basic recursive solution to the Towers of Hanoi
Continue reading “Recursive Solution to Towers of Hanoi”

Fix dark video in Skype for Linux

fedora_logoI was very much disappointed when i installed Skype in Fedora, three causes which are as follows in the order. First, Skype for Linux is very old version (2.2 beta) than the Windows Skype, second, the video was too dark or black, and third cause surfaced after i installed Fedora 16 x86_64, no 64 bit binary for Fedora was available. The third one was solved as described in this post: Running Skype for Fedora x86 in Fedora x86_64. For the first one i can’t do anything, but there should be some solution for the second problem: dark video. Cheese (a video capture application) works fine and video is good. Searching in the skype forums got a lot of mumbo jumbo solutions of which none worked. After a lot of search i got a very simple solution.

Edit (16.06.2012): The first problem seems to solve atleast upto some extent as Skype 4.0 is now out and can be downloaded here.

Continue reading “Fix dark video in Skype for Linux”