What is Apache Tika? Apache Tika is a library that is used for document type detection and content extraction from various file formats. Internally, Tika uses existing various document parsers and document type detection techniques to detect and extract data. Using Tika, one can develop a universal type detector and content extractor to extract…
What is MapReduce?
MapReduce is a framework using which we can write applications to process huge amounts of data, in parallel, on large clusters of commodity hardware in a reliable manner. MapReduce is a processing technique and a program model for distributed computing based on java. The MapReduce algorithm contains two important tasks, namely Map and Reduce. Map…
Install wordpress alongside another application with Nginx
Things may come to those who wait, but only the things left by those who hustle.
9 Linux Commands & Codes To Be Wary Of
Linux shell/terminal commands are very powerful and just a simple command could lead to one deleting a folder, files or root folder, etc.
In some cases, Linux won’t even ask you for confirmation rather it will execute the command right away causing you to lose valuable data and information stored in these files and folders.
Take a look at the 9 commands and codes you should avoid executing.
jQuery – Extract class name that ‘starts with’ prefix
If you are wondering about :
- Grab only all classes with my
-class-
prefix. - Have their names (not corresponding DOM elements) in a variable?
<div class="my-class-one"></div>
<div class="my-class-two"></div>
<div class="my-class-three"></div>
Introduction with CasperJS
CasperJS is an open source navigation scripting & testing utility written in Javascript for the PhantomJS WebKit headless browser and SlimerJS (Gecko). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as:
- defining & ordering browsing navigation steps
- filling & submitting forms
- clicking & following links
- capturing screenshots of a page (or part of it)
- testing remote DOM
- logging events
- downloading resources, including binary ones
writing functional test suites, saving results as JUnit XML - scraping Web contents
Disable Back functionality using history.forward
This is another technique to disable the back functionality in any webpage. We can disable the back navigation by adding following code in the webpage. Now the catch here is that you have to add this code in all the pages where you want to avoid user to get back from previous page. For example user follows the navigation page1 -> page2. And you want to stop user from page2 to go back to page1. In this case all following code in page1.
Online Demo : http://viralpatel.net/blogs/demo/javascript-disable-browser-back-button/
Continue reading
Detect browser close tab event and reload event in javascript.
The code below overrides form submit event , click event , key press event , before unload event , close browser tab and close browser window event and reload event . The code below give alert popup when window is refresh or webpage is refresh.
Manage Multiple GRAILS version in Ubuntu.
I had installed 7 GRAILS version in my ubuntu system . To install grails in ubuntu see this link https://pkashyap28.wordpress.com/2014/09/11/configure-grails-groovy-java-intellij-idea-in-ubuntu/#more-112 . After installing GRAILS, put the code below at the bottom of .bashrc file.
Continue reading