Using The Android Sensors PRO

The android device has sensors we can use in our code. We can get data coming from these resources using the SensorManager object. The following code sample shows how to do it. package com.abelski.samples; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import […]

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

Simple Zend Framework Jump Start PRO

I have recently created a simple demo for using the PHP Zend Framework. The simple demo was prepared in order to assist my students doing their first steps using this framework. The demo includes few controllers and it basically shows a list of books and a list of reviews for each one of them. In […]

Android Resources Names PRO

Each resource has an ID number held in a static variable that belongs to one of the static inner classes in R. The name of that static variable is the very same name we specify as the name of the resource. It can be name of the string (string resource), the name of the image […]

The Difference Between include and require in PHP PRO

Basically, the require and the include commands in PHP do the same thing. Both of them allows our code to use code written in another file by including it into the file we code as if it was part of it. The only difference takes place when encountering a problem. When using require the problem […]

The __PHP_Incomplete_Class Object in PHP PRO

When storing an object in $_SESSION trying to retrieve it in another page we will get an error if the class itself is not available when the session_start() function builds the $_SESSION array. Debugging the $_SESSION we will find that our object is available and is stored as a __PHP_Incomplete_Class object. In order to avoid […]

Facebook PHP SDK Jump Start INFO

The Facebook PHP SDK is composed of two files: facebook.php and base_facebook.php. The first includes the definition for the Facebook class. The second includes the definition for the BaseFacebook class, which is a parent class for Facebook together with few more classes. You can easily download the Facebook PHP SDK at https://github.com/facebook/facebook-php-sdk. The following video […]

Nexus Q Introduction INFO

The Android 4.1 new feature that turns NFC connectivity into bluetooth makes device connectivity into a much simpler process and sets the foundation for new creative products. Nexus Q is one of them.

Skip to content Update cookies preferences