Enhance Social Logins in web application

We can implement the social Login Integration to the Websites or web application in order to widen the reach of your web applications.

To start with, to integrate Facebook with your web application, we need to register our web application or website with Facebook, and get an application ID(appId), along with a secret key . you can create and retrieve the appId on the App Dashboard ( https://www.facebook.com/developers/)

Here we try to  implement login in a web application using the JavaScript SDK.

This code will load and initialize the JavaScript SDK in your HTML page. Use your appId where indicated.

<!DOCTYPE html>
<title>Facebook Login JavaScript Example</title>
<meta charset="UTF-8">
  // This is called with the results from from FB.getLoginStatus().
  function statusChangeCallback(response)...

Bash Scripting

Bash is a popular command-line interpreter for Linux computers including Mac OS X. Bash can execute a vast majority of Bourne shell scripts, mainly benefitting the administration and programming tasks. Many of the features were copied from sh, csh and ksh. Bash is also like a programming language so you can write programs using bash usually to automate tasks. You can start writing scripts right away, wrap up multiline operations in one file, implement flow control and interact with users to get input.

Here I would like to explain how bash scripting helps in mailing an attached file using smtp.

a) Mailing particular file in a directory

/usr/local/bin/sendEmail -v -f “$emailsend” -s smtp.gmail.com -xu “$name” -xp “$password”...

Type Annotations: An added feature to annotations in JAVA 8

Earlier we could only use annotations in Java on declarations. With Java 8, annotations can be written on any use of a type in declarations, generics, and casts. Type annotations are not one of the highlighted features of Java 8. Annotations add more behavior to the piece of code we have written. So type annotation is just an add-on to that, in the sense, it boosts the productivity and ensures higher-quality for our code.

For example, if you want to ensure that a particular variable is never assigned to null. You would then modify your code to annotate that particular variable, indicating that it is never assigned to null. The declaration can be like this:

@NonNull String str;

When you compile the code the compiler prints a warning if it detects a defect, which allows you to modify the code if an error is found. After you correct the code to remove all warnings, this particular error will not occur when the program runs.

When we look for tools that make our...

Java 8: What’s new in it ?

Oracle launched a new version of java Jdk1.8 with a lot of features. Some of the important features are provided below.

1) Lambda

 JDK 1.8 allows you to create Lambda functions. Lambda functions will become a powerful concept once integrated with JAVA. Lambda refers to anonymous function in a programming language. Lambda function, generally known as Lambda expression, is a function but without a name. It is very much used in languages like Python and Ruby (which is borrowed from LISP) etc.  An anonymous function (lambda function) does not carry name, access specifier, access modifier, parameters etc. It is just to simplify the code. Lambda function is very convenient to use in the same place where we write a function. If you would like to use the function only once, lambda function is the more convenient way. It reduces typing a lot of code, because the function code is written directly where we use the function and the...

Object list sorting using BeanComparator

We can sort List<Objects> using BeanComparater instead of writing comparator. The beanutils.jar has to be imported. Default sort order is in ascending order.

For eg.
Collections.sort(postings, new BeanComparator(“resumeCount”));
BeanComparator bc = new BeanComparator(“resumeCount”);
Collections.sort(postings, bc);

Pros:- Concise, Minimal code

Cons:- Low performace, Uses reflection(Now if a field is renamed, the compiler won’t even report a problem)

Always override hashcode() if overriding equals()

In Java, equals() is implemented in Object class by default. This method is used to compare two objects. The default implementation just simply compares the memory addresses of the objects. You can override the default implementation of the equals() method defined in java.lang.Object. If you override the equals(), you MUST also override hashCode(). Otherwise, a violation of the general contract for Object.hashCode() will occur, which results unexpected behavior when your class is in conjunction with all hash-based collections.

This is a general contract in java programming that “whenever you override equals(), override hashcode() also”.

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information...

Wowza Adaptive Streaming Engine

Wowza is an adaptive stream engine which is used for streaming high-quality video and audio to any device. It provides live and on-demand streaming of media player technologies. It can deliver content to many popular media players such as Flash Player, Apple iPhone, iPad, iPod touch, JWPlayer etc. Wowza Streaming Engine includes support for many streaming protocols including Adobe HTTP Dynamic Streaming (Adobe HDS), Apple HTTP Live Streaming (Apple HLS) MPEG-DASH streaming, MPEG-2 Transport Streams (MPEG-TS), Real Time Messaging Protocol (RTMP), Real Time Streaming Protocol (RTSP) and Real-time Transport Protocol (RTP).

1. Server installation

Wowza Media Server is a Java 6 (aka 1.6) and Java 7 (aka 1.7) application and requires the installation of a Java Runtime Environment (JRE) that supports deploying Java in server environments. The JRE has everything needed to run Wowza Media Server on your system.

The following Java packages...

Elastic Search

Elastic search is a real-time search and analytics engine. It is based on Apache Lucene an open source.

It is designed to be scalable which means it is distributed and has Node Discovery in it. So it can automatically recognize other elastic search nodes and connect to them, if required. It does automatic sharding, in a very simple way, it has its own identifier and just uses identifier modulo number of shards to determine what shard everything goes in. As a result of this, it can do a lot of smart things like where to rout some queries and if an update comes where to put that update to make sure things are local as well. It does query distribution, so on querying one node it goes to all the nodes as well. All of those things one requires in this cloud type of world is available for free in elastic search.

It has a RESTful, HTTP API with a wrapper for any language one can think off. Almost every day a new language wrapper comes out. One of the things about elastic search...

Elixir – The Smart Programming Language

Lately, a lot of attention has been gathering over Elixir, one of the latest programming language.

So what is Elixir? Elixir, a functional, concurrent language built on the Erlang VM with syntax close to the Ruby programming language. Apart from Ruby, Elixir is a language that is inspired by the syntax and concepts of various other languages such as Clojure, Haskell, Python and even Lisp.

So what’s the game changer that makes Elixir smarter? Elixir’s flexible syntax and macro support for metaprogramming allows one to devise elegant and concise constructs that seems as if they’re integral part of the language. Metaprogramming helps one remove structural duplication, a situation where two pieces of code share the same abstract pattern, but differ in various details. Elixir works directly with the source code to do smart things. Tests rarely require more than the built-in assert, to display meaningful errors.

Single-line functions and multi-line blocks are...

The Usability Factor – WordPress vs. Drupal

WordPress and Drupal are popular platforms used by individuals and businesses to create websites. Majority of the bloggers and webmasters will choose WordPress as it is simple and easy to use. WordPress has thousands of great features which is easily customized and user friendly. Drupal provides plenty of features but one needs to create the custom features which is confusing.

WordPress encompasses a rich library of Plugins nearly 15000, whereas Drupal provides just over 8000 which is definitely a grade separator. WordPress plugins facilitates easy modification, customization and enhancement to a WordPress website. WordPress is constantly releasing new plugins (like Google Publisher, Skype Mobile Switcher, and Gallery Overview) thus adding on to the huge repository of plugins. Considering the advantages WordPress offers, InApp is currently developing a Business Consulting website for a Middle East client using WordPress. Main reason being a Classifieds plugin was readily available...

Java Native Interface (JNI)

JNI is a programming framework that enables the java code running in a java virtual machine to call native applications specific to operating system and hardware.  JNI enables one to write native methods to handle situations when an application cannot be written entirely in the Java programming language.

Here I am describing how to do programming with JNI with an example. JNI is difficult, as it involves two languages and runtimes. I shall assume that you are familiar with:

  1. Java
  2. C/C++ and the GCC Compiler
  3. (For Windows) Gygwin or MinGW.
  4. (For IDE) Eclipse C/C++ Development Tool (CDT)

Here, I am giving an example with C programming language.

Step 1: Write a Java class that uses native methods

public class HelloJNI {
   static {
      System.loadLibrary("hello"); /* hello.dll (Windows) or libhello.so (Unixes)*/
   /* A native method that receives nothing...

Exposure in Image and Video Processing

Video and image processing enables us to acquire, process, and analyze images and video data for  data visualization and manipulation.

We have explored the following open source API’s for video and image manipulation:

  • OpenCV   : OpenCV (Open Source Computer Vision Library) is mainly focused on real-time image processing applications. It supports  Windows, Linux, Mac OS, iOS and Android and  has been written in optimized C/C++ .

  • FFMPEG : ffmpeg is a command line tool to convert multimedia files between formats. This is mainly used to decode, encode, transcode,  stream, filter and play the media file. It runs on the following platforms: Windows, Linux, Mac OS, iOS and Android .

  • Xuggler   : Xuggler is a Java library that allows decoding and encoding a variety...

Again Java is the world’s No.1 Programming Language

Java has reclaimed the No.1 spot of the TIOBE Index, ending C’s four month stay at the top of the programming rankings.

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Apache Airavata


Airavata is a mythological white elephant who carries the Hindu god Indra. It is also called ‘abhra-Matanga’, meaning “Elephant of the Clouds”  [http://en.wikipedia.org/wiki/Airavata].

Apache Airavata is a software framework for executing and managing computational jobs and workflows on distributed computing resources including local clusters, supercomputers, national grids, academic and commercial clouds.

Airavata has the capability of composing, managing, executing and monitoring variety of distributed applications and work-flows that runs on computational resources. Concepts of service oriented computing, distributed messaging, work-flow...

jQuery – use the “on()” method instead of “live()”

As of jQuery 1.7,the .live() method is deprecated.Use .on() to attach event handlers.

Description: Attach an event handler function for one or more events to the selected elements.
The .on() method attaches event handlers to the currently selected set of elements in the jQuery object.

.on(eventType, selector, function)

$(“body”).on(“click”, “#element”, function(){

$(“body”).on(“click” , “p” ,function(){

Migration from .live() to .on()
$(‘#mainmenu a’).live(‘click’, function)
after, you move the child element (a) to the .on() selector: