Proximity sensor in android example

Published on

Proximity sensor: Proximity sensor measures the distance that some object is from the device. It is often used to detect the presence of a person’s face next to the device. MainActivity.Java import android.app.Activity; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity { … Continue reading Proximity sensor in android example

How to call database function from java

Published on

Remember database  function can return values but stored procedure can’t . The following code snippet will clearly guide how to call mysql function which has three params with return type . Aim – The java code retrives voterId from Voterlist function with given voterName ,voterAge and Address params,                  CallableStatement cStmt = connection.prepareCall(“{? = … Continue reading How to call database function from java

What are the deprecated functions in PHP 5.3.0

Published on

The list of functions that are deprecated in PHP 5.3.0: call_user_method() (alternative: call_user_func() ) call_user_method_array() (alternative: call_user_func_array() ) define_syslog_variables() dl() ereg() (alternative: preg_match() ) ereg_replace() (alternative: preg_replace() ) eregi() (alternative: preg_match() with the ‘i’ modifier ) eregi_replace() (alternative: preg_replace() with the ‘i’ modifier ) set_magic_quotes_runtime() and its alias, magic_quotes_runtime() session_register() (alternative: the $_SESSION superglobal ) … Continue reading What are the deprecated functions in PHP 5.3.0