Thursday, 15 December 2011

URL encoded query string from key value pair

To generate a URL encoded query string from an associative array in PHP, use the function http_build_query.
Reference: http://php.net/manual/en/function.http-build-query.php


screenshot of a whole web page

Have trouble in taking a screenshot of the whole content of  a web page when there is scrollbars , then you should check these addons.
ieSnapshotter - http://www.filedudes.com/ieSnapshotter-download-45699.html
screengrab - https://addons.mozilla.org/en-US/firefox/addon/screengrab/ - After installing , go to the site and right click and select screengrab then save as complete page.

database name as numeric mysql

Have you ever wondered why the numbers or number-text combination  with spaces is not allowed in naming a database in mysql, then you check the below links. The solution is to give them inside a backtick operator.

http://stackoverflow.com/questions/5986497/can-a-database-name-start-with-a-number
http://stackoverflow.com/questions/2121596/mysql-numeric-database-limitation

Wednesday, 14 December 2011

Monday, 12 December 2011

Friday, 11 November 2011

Passing parameters to PDF

Once I had a weird requirement from the client that the pdf should open with the zoom percentage of 100. When I googled , got this interesting links http://floatboxjs.com/content/parameters.pdf, http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf.

Examples:

http://example.org/doc.pdf#Chapter6
http://example.org/doc.pdf#page=3
http://example.org/doc.pdf#page=3&zoom=200,250,100
http://example.org/doc.pdf#zoom=50
http://example.org/doc.pdf#page=72&view=fitH,100
http://example.org/doc.pdf#pagemode=none