Popup-under hack

Popup-under hack If you are working on a mobile site, you have a constraint of screen size. What if you are loading a URL from a page using window.open(targetURL,’_blank’);. For your information browser will only focus to the window which is currently opened. So, in this case your window loading targetURL will get focus. And, suppose your boss says to ... Read More »

Java Mail API- Reading OUTLOOK mails

Java

Java Mail API- Reading OUTLOOK mails Using JAVA Mail API for reading mails has been common these days. It’s pretty easy to use. Over the internet you can get boilerplate codes for reading mails from GMAIL or YAHOO, however I find a bit tricky when it comes to reading mails from OUTLOOK. GMAIL and YAHOO provides settings feature where you ... Read More »

Integrating Facebook Login

Jkoder.com

Integrating Facebook Login Facebook login is considered as one of the most preferable way for authenticating users. This approach is also very convenient for the users as Facebook has very deep reach among users. This post will illustrate as to how to integrate Facebook login as a way of authenticating users. We will be using Javascript SDK provided by Facebook. ... Read More »

Maven- Creating a Jar together with its dependency Jars into a single executable Jar file

Apache Maven

Maven- Creating a Jar together with its dependency Jars into a single executable Jar file Suppose your boss comes and ask you to create a standalone JAVA application. Assuming you being a MAVEN lover, you created a JAVA application using MAVEN dependency management tool. Now suppose you have some MAVEN dependencies that are needed by your JAVA application. Since, it’s ... Read More »

Javascript Constructors- Why it should be used- Object Oriented Programming in Javascript

Javascript Constructors- Why it should be used- Object Oriented Programming in Javascript Mark my words! Javascript is an object oriented programming language, i.e you can create objects to solve your programming problems. In object oriented approach, you create objects that represent things in the system and you add logic for objects to behave, and then objects interact with one another ... Read More »

Closures: A concept of callback function – Functional programming in Javascript Part 4

Closures: A concept of callback function – Functional programming in Javascript Part 4 Closures in Javascript are perceived to be fairly complicated and advanced, this discourages people to learn Javscript. I will try to make it simple. To be frank closures are now used in many languages, people use it in day-to-day coding, whether they know it or not. Because ... Read More »

Avoid polluting global namespace in Javascript- IIFE (Immediately Invoked Function Expression)

Avoid polluting global namespace in Javascript- IIFE (Immediately Invoked Function Expression) Everybody says Global variables are bad, they are evil, it produces abnormal behavior. In the browser environment everything you load is in a single space. An HTML page may be linked to 1, 2, or 10 JS files. Each JS file may contain code that is written by completely ... Read More »

Understanding scopes in Javascript- Function Scoping

Understanding scopes in Javascript- Function Scoping The concept of scopes are in every language. A scope dictates a portion of program where a particular variable is accessible. Not all variables are accessible in every places of program. if variables are allowed access everywhere then there will be chaos. There are controlled portions in program where variables are active. In C++ ... Read More »