The PhoneGap deviceready Event PRO

When using the PhoneGap JavaScript library we must make sure the device is ready before we start calling the various PhoneGap functions. In order to verify the device is ready we should hook up with the ‘deviceready’ event. The following code sample shows how simple it is to hook up with this event. If you […]

Java 8 Lambda Expressions PRO

When dealing with an interface that includes one method only and the sole purpose of that interface is to allow us passing over functionality to another part of our program we can use the lambda expression as an alternative for the anonymous inner class. The lambda expression includes a comma separated list of formal parameters enclosed […]

PHP 5.5 New Features PRO

PHP 5.5 adds many new improvements. Most of them don’t have any impact on code that was written in according with PHP 5.4. We can now get the fully qualifies name of a class by appending its name with the ::class keyword. This new feature is especially relevant when using namespaces. <?php namespace com\lifemichael\samples; class […]

The zxcvbn.js JavaScript Library PRO

The zxcvbn.js JavaScript open source library provides us with a simple easy to use function for evaluating the strength of a password the user enters. Using this library we can provide our user with an immediate feedback. The following code sample shows how simple it is to use this JavaScript open source library. You can […]

Google WebFonts Jump Start PRO

Google WebFonts API provides us with hundreds of open source fonts we can use in our web page. We can easily search through the web fonts collection and select the ones we want to use. The following code sample shows how simple it is to use these fonts in our web page by adding a […]

JSON2HTML Jump Start PRO

The JSON2HTML JavaScript open source library provides us with a powerful templating system we can use to convert JSON objects into HTML. The following code sample shows how simple it is to use this library for the purpose of converting data we hold in JSON objects into HTML. <!DOCTYPE html> <html> <head> <title>json2html demo</title> <script […]

Datejs Jump Start PRO

Datejs is an open source JavaScript library that assists us writing code that handles dates. You can find it ready for download together with detailed documentation at http://datejs.com. The following code sample shows a simple demo for using this JavaScript open source library by showing how simple it is to add/remove days to/from a date […]

Sugar.js Jump Start PRO

Just as it sounds. Using Sugar.js is kind of adding some sugar to our code. Sugar.js isn’t a framework for creating magnificent user interface, one page web application or manipulating the DOM. Sugar.js is a simple libray that provides us with lots of useful functions we can use in order to write shorter code. The […]

WebSockets API using Apache Tomcat Jump Start PRO

Java EE supports the HTML5 WebSockets API. We can easily get a WebSockets server up and running by developing a servlet that extends WebSocketServlet class. The following code sample includes two files. The following is the HTML file that includes code in JavaScript for using HTML5 Web Sockets API. <!DOCTYPE html> <html> <head> <title>Simple WebSockets […]

Lo-Dash Jump Start PRO

The Lo-Dash JavaScript library provides us with a huge range of utility functions we can use in our code. Most functions will look familiar if you already have experience using functional programming languages. If you are already familiar with Underscore.js you will find this library very easy to learn. The following code sample shows how […]

Skip to content Update cookies preferences