Type Bounds in Scala PRO

When we define a function or a class and we choose to use generics we can set limits on the unknown type: S <: T – means that S is a sub type of T S >: T – means that S is a super type of T It is also possible to mix between […]

Accessing The Query String in Node.js PRO

In order to access the query string we should first require the url module. Doing so we will be able to invoke the method parse on the url module passing over req.url and true. The method parse returns an object that its properties are the parameters the query string includes. var http = require(‘http’); var […]

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

Update cookies preferences