Using firePHP in firefox to debug PHP

Debugging PHP pages for a web application may be challenging. However, firePHP, a firefox extension can make debugging PHP pages very simple. Here are the steps to start debugging using firePHP. 1. Install firebug from https://getfirebug.com/downloads. 2. Install the firePHP extension from https://addons.mozilla.org/en-US/firefox/addon/firephp/. The browser is now ready to receive the PHP logs that are sent from … Read more

Tabbed window for Cygwin and Windows command prompt

Opening up multiple cygwin windows or windows command prompt has annoyed almost every developer who had to do it. This post presents a way to open tabbed cygwin and windows command prompt using Console (http://sourceforge.net/projects/console/) . Here are the steps: Download console2 from http://sourceforge.net/projects/console/. Unzip it and launch console.exe. This should open up a window that … Read more

static imports in java

Many a times we use static methods or constants in our class. For example if you are writing a math library, there are chances that you would need to use lot of math functions from java.lang.Math. for example to calculate the nth power of x you would do y = Math.pow(x,3); pow is a static … Read more

Redirecting java Standard output and standard error to file

It is useful to redirect standard java output to a file. However, if you are wondering why your stacktrace from e.printStackTrace() is not being redirected to a file then read on… Say you have a program called RedirectExample.java. To redirect the output to a text file do java RedirectExample > output.txt However, if your code in … Read more

Install Climate Data Operator (CDO) with NetCDF, GRIB2 and HDF5 support

Building CDO with Netcdf, HDF5 and GRIB2  support. Download CDO from https://code.zmaw.de/projects/cdo/files. On a unix box download using wget-  “wget https://code.zmaw.de/attachments/download/11392/cdo-1.7.0.tar.gz.”  Use the latest verion of cdo. Download NetCDF from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp. Use the C version. On Unix – “wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.1.tar.gz”. Download Grib API from https://software.ecmwf.int/wiki/display/GRIB/Releases. On unix – “wget https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.14.4-Source.tar.gz?api=v2” Download Jasper from http://www.ece.uvic.ca/~frodo/jasper/#download. On … Read more

Call Javascript from Java – 1

yes, It is possible to call javascript from java, and the functionality is built right into the JVM!. Here’s a simple way to do it . Lets say you have a javascript called file.js, which has a method called sum(a,b). To call this method from java, do the following: The imports: import javax.script.Invocable; import javax.script.ScriptEngine; … Read more

R – Turorial II

  NOTE : This tutorial has been superseded by the exhaustive tutorials Here Lists Collection of Objects of same or mixed type.List may also contain vector or other lists. Create a list using the funtion list(). The following example shows operations that can be performed on a list. > alphabets=list(a=”apple”,b=”ball”,c=”cat”) > alphabets $a [1] “apple” $b … Read more

R – Tutorial I

NOTE : This tutorial has been superseded by the exhaustive R tutorials Here Basics Start R in Windows using the program menu. To quit :  q(). to call help for a function. help([function]) or ?[function]. use double quotes to escape special characters and tokens. e.g. ?”for”. objects() or ls() to obtain list of objects stored. rm([object]) … Read more