The Numeral.js JavaScript Library PRO

The Numeral.js JavaScript library assists us with getting the required formats for the numbers our program uses. The following code sample shows how simple it is to use this library in order to manipulate the format of the numeric values we use in our code. <!DOCTYPE html> <html> <head> <title>numeral.js demo</title> <script src=”http://cdnjs.cloudflare.com/ajax/libs/numeral.js/1.4.5/numeral.min.js”> </script> </head> […]

The Pixastic.js JavaScript Library PRO

The Pixastic JavaScript library allows us to perform various operations on images we use in our code. The following code sample shows how simple it is to use this JavaScript library in our code. <!DOCTYPE html> <html> <head> <title>pixastic.js demo</title> <script src=”pixastic.core.js”></script> <script src=”glow.js”></script> <script type=”text/javascript”> function changepix(img) { var newpix = Pixastic.process(img, “glow”, {amount:0.2}); newpix.onmouseout […]

Debugging in Slim Framework PRO

The Slim framework allows us to enable a debugging mode. Once doing it, each time an exception is thrown the Slim framework will generate a detailed debugging message. The following code sample shows how to do it. <?php namespace Com\LifeMichael\Samples; require ‘Slim/Slim.php’; \Slim\Slim::registerAutoloader(); $application = new \Slim\Slim(array(‘debug’ => false)); $application->get( ‘/dbg’, function () { $temp […]

Logging Messages in Slim Framework PRO

The Slim Framework provides us with the Log object. Writing logging messages involves with calling various functions on that object. <?php namespace Com\LifeMichael\Samples; require ‘Slim/Slim.php’; \Slim\Slim::registerAutoloader(); $application = new \Slim\Slim(); $logger = $application->log; $logger->setEnabled(true); $logger->setLevel(\Slim\Log::DEBUG); $environment = \Slim\Environment::getInstance(); $application->get( ‘/simplelogs’, function () { GLOBAL $logger; $logger->info(“i m now starting the get handling function”); echo “<data>response</data>”; […]

Creating Filters in AngularJS PRO

The AngularJS allows us to create new filters and use them in our code for filtering data we hold in arrays. The following code sample shows how to create a simple filter. The sample includes three files. The following is the HTML file that includes a SCRIPT element for using the AngularJS library, a LINK […]

The Slim Framework PRO

Slim Framework is a tiny framework that assists us with the development of REStful web services in PHP. The growing popularity of web applications that include multiple clients implementations (hybrid and native applications for touch screen devices, hybrid and native applications for desktops and one page websites) require us to implement our server side as […]

The node.js Public Modules Repository PRO

The node.js NPM (Node Package Manager) allows us to manage the packages installed on our computer. NPM provides us with an online public registry service that contains all of the packages developed by programmers who chose to publish them using NPM. NPM provides us with a tool we can use for downloading, installing the managing those […]

Using node.js with MySQL PRO

Developing a web application using the node.js framework we can easily write code that connects with a MySQL database. The mysql module provides us with everything we need. The following code sample shows how simple it is to use this module. var mysql = require(‘mysql’); var connection = mysql.createConnection({ host: ‘server.zindell.com’, user: ‘nodejsdemo’, password: ‘lifemichael’, […]

Iterators in JavaScript PRO

JavaScript allows us to use iterators for going over the properties of a specific object or for going over the elements of a specific array. The following code sample shows how simple it is to use iterators in JavaScript. <!DOCTYPE html> <html> <head> <title>The Iterator Function</title> </head> <body> <script type=”text/javascript”> var student = { name: […]

Math.js Jump Start PRO

Math.js is a lightweight open source JavaScript library that provides us with an extensive collection of mathematical useful functions. You can easily download the Math.js library code browsing in GitHub at https://github.com/josdejong/mathjs. The following code sample shows how simple it is to use this library. <!DOCTYPE html> <html> <head> <title>math.js demo</title> <script type=”text/javascript” src=”math.min.js”></script> </head> […]

Skip to content Update cookies preferences