Splash screen for Android

<pre>public class MyClass extends Activity {
	String TAG ="on Splash Screen";
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
		setContentView(R.layout.splash_screen);
		/** set time to splash out */
		final int welcomeScreenDisplay = 
Read more

No Comments

Firewall in Linux (IPTABLES)

cat > /etc/rc.firewall

#!/bin/sh

# Variables
FW="/sbin/iptables"
IF1="eth0"
IF1_IP=`/sbin/ifconfig ${IF1}|grep -w inet|awk -F: '{print $2}'|awk '{print $1}'`
IF1_MASK=`/sbin/ifconfig ${IF1}|grep -w inet|awk '{print $4}'|awk -F: '{print $2}'`
IF1_NET="${IF1_IP}/${IF1_MASK}"

# Temporarily Change the Default Policy to Accept
${FW} -P INPUT ACCEPT
Read more

, ,

No Comments

JIAXClient using IAXclient Java version of IAXclient

About
JIAXClient is a library for IAX (Inter Asterisk eXchange) clients written in Java by Mikael Magnusson. It is based on IAXClient, and uses a JNI library for interfacing with Java.

License
Most of the sources are GPL licensed, … Read more

, , , , ,

No Comments

Persistence with Java SE an example

1. Create a Entity Class {Employee.java}

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity // Make Employee Class into an entity by annotate the class with @Entity.
public class Employee {
@Id private int id; //property that holds the persistent identity of 
Read more

, , ,

No Comments