Developing Android Broadcast Receiver PRO

In order to develop an android broadcast receiver we should define a class that extends BroadcastReceiver, implement our onReceive method and update the android platform about the new broadcast receiver, either via the manifest xml file or by calling the registerReceiver method. The following code sample includes the definition of a BroadcastReceiver that will get […]

Developing Android Remote Services PRO

The first step is coding the aidl file that includes our definition for the interface that lists the methods we want to enable their invocation from another process. package com.abelski.currencyservice; interface ICurrencyService { double getCurrency(String country); } The aidl compiler will go over that file and auto generate the interface we defined in the aidl […]

Learning Android Java Applications Development PRO

Using HTML5 and other web technologies when developing an application for the android platform simplifies the development process and helps us cooping with the well known android platform fragmentation problem. I chose to write this post in order to point at those cases in which we cannot avoid using Java in our application development for […]

By Name Parameters in Scala PRO

When calling a function and passing over an argument which is an expression that needs to be evaluated, the expression will be evaluated before the function is invoked and its value will be passed over. This is the default behavior. By adding => in between the parameter name and its type we will defer the […]

Blocks in Scala PRO

The definitions within a block are visible from within the block only. The definitions within a block shadow definitions with the same names that belong to the block’s outer scope. The block has a value just as any other expression. Its value is the value of the last expression it includes. object Program { def […]

Scala Expressions Evaluation PRO

When creating a variable using val or var and assigning the value of an expression into it the expression is evaluated when the variable is created. When creating a function using def and assigning the value of an expression to it the expression is evaluated when calling the function. object Program { def main(args: Array[String]):Unit […]

Node.js on Cloud9 Jump Start PRO

Node.js is a platform built on top of JavaScript v.8, Google’s JavaScript runtime engine. Node.js enables us to develop web applications that excellent in their performance. The following code sample is a simple HTTP web server developed using node.js that returns the hello greeting back to the client from which the HTTP request arrives. var […]

Android Logcat & PhoneGap PRO

When developing an hybrid application we encounter difficulties when tried to track (debug) code we wrote in Java Script that is executed inside the WebView object. The problem becomes even more complex when using PhoneGap. The following code sample shows how we can use the android logcat for getting log messages from the code we […]

Zend_Db_Table Simple Demo PRO

Using the Zend_Db_Table class, which is part of the Zend Framework, we can easily access a specific table in our database. The following code sample shows how simple it is to add a new row using this class. The following code includes our definition for the users controller. <?php require_once ROOT_DIR.’/models/Users.php’; class UsersController extends Zend_Controller_Action […]

Simple Zend_Form Demo PRO

I have recently created a simple demo for using the Zend_Form. In order to keep it simple I chose to avoid using decorators. You can download the files and place them on your own server. The demo provides us with a simple BMI calculator. The user get to see a simple form where he should enter […]

Update cookies preferences