Microtext.js Jump Start PRO

The Microtext.js open source JavaScript library provides us with useful functions for working with texts. Using this library is fairly simple. It doesn’t require any other library. The following code sample shows how simple it is to use the functions this library provides us with. <!DOCTYPE html> <html> <head> <title>microtext.js demo</title> <script type=”text/javascript” src=”microtext.min.js”></script> </head> […]

Parsing JSON in JavaScript PRO

There are many cases in which we need to parse JSON data our code receives. When writing our code in JavaScript parsing the JSON data is fairly simple. We just need to invoke the parse() function on the JSON object, as in the following code sample. The JSON object is available in most modern web […]

Hammer.js Jump Start PRO

The Hammer.js JavaScript library allows us to handle gesture touch events that take place when running our code on a touch screen device. The following code sample shows how simple it is to use this library. You just need to pass over the name of the gesture touch event you want to handle and the […]

The Decorator Design Pattern in JavaScript PRO

The decorator design pattern was created in order to allow us adding new functionality to an already existing class without extending it. The decorator design pattern was created for those cases in which we cannot extend the class. The following code sample shows a simple demo for implementing the decorator design pattern in JavaScript. <!DOCTYPE […]

The Factory Design Pattern in JavaScript PRO

The factory design pattern is a creational pattern. It assists us with creating new objects. Instead of using the new operator in order to create a new object we call the factory method and pass over arguments it uses to create the exact object we need. The following code is a small sample for implementing […]

The PhoneGap window.device Object PRO

The PhoneGap JavaScript library adds new properties to the window global object. One of them is the device property. The device property holds a reference for an object that describes the device. The following code sample shows how simple it is to use this object in order to get detailed information about the device. <!DOCTYPE html> <html> […]

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 […]

Update cookies preferences