Friday, January 18, 2013

Open PDF files in Firefox on Mac

Hi,
I have been facing problems while opening a pdf document in firefox (on Mac OS).
Even though i had the Adobe Reader plugin installed but the pdf documents just did not open.
The workaround was to download the documents and open in Adobe reader.

Now i have found the solution. Please follow the steps below.

1. Install the pdfjs addon from https://addons.mozilla.org/en-us/firefox/addon/pdfjs/

2. Disable all the pdf reader plugins
  [Source : http://support.mozilla.org/en-US/kb/view-pdf-files-firefox-without-downloading-them#w_pdf-files-open-with-the-pdf-reader-plugin-instead-of-the-extension]

  • On the menu bar, click on the Tools menu, and then click Add-ons. The Add-ons Manager tab will open.
  • In the Add-ons Manager tab, select the Plugins panel.
  • Select each PDF reader plugin and click Disable close to it.

Reference: http://support.mozilla.org/en-US/kb/view-pdf-files-firefox-without-downloading-them#w_pdf-files-open-with-the-pdf-reader-plugin-instead-of-the-extension

Friday, November 25, 2011

Find largest subset sum for a given array

Problem: Given an array of N integers (both positive and negative), find the sub-sequence with largest sum.

For ex: Let A = {1 2 -5 4 5 -1 2 -11} then largest sum is 10 (start index = 4, end index = 7)