RelativeLayout is one of android container or ViewGroup. Like it’s name, the main feature of Relativelayout is to place one View relative to other View or with it’s parent it’s self. Place a view relative to other view In order to make a relative position of one view to another view, an id is must be defined in referred view. Says you have two TextView in layout, you want second   Read More ...

Android

Give an ID to your view object is very useful if you want to refer to that view later in source code. For example you want to set text of a TextView in source code. To do that, put android:id attibute to your view. In above code, you can see I have put an android:id="@+id/textView1". This line defines an id of our TextView to textView1. Refers view from activity After   Read More ...

Android

This tutorial will guide you to create a simple hello word application in android. Through this tutorial you will learn about the basic understanding of android activity and layout. Most common tool to create android application is Eclipse ADT plugin. You can follow step by step how to install eclipse ADT Plugin in the official developer site here. After your eclipse ADT plugin was installed, now you’re ready to create   Read More ...

Android

Droping a table in oracle is very simple task. With just one row of sql statement you can drop a table. For example you want to drop school table in database. Use this simple sql statement, the table will be dropped. Dropping multiple tables If you have multiple tables to drop, trivial way is adding the above row as much as total of tables. How if you have hunderds table   Read More ...

Oracle

String concatenation is joining one or more string to build a new string. Oracle use || to join two string. Above statement will result string semurjengkol. Note, you must use single quote ' to represent a string in oracle or error will be shown. Adding prefix to column result String concatenation can be used to giving a prefix (or suffix) to column result. For example you have person table contains   Read More ...

Oracle

Getting domain name from javascript is simple. You can get domain name from window.location.hostname variable. Click following button to test above code. Get full domain name Domain name you got this way is simply domain name in browser address bar. Sometimes address bar you got not include http:// or www prefix. To make sure you get the full domain name, you must check it first. Click button belo to try   Read More ...

Javascript

PHP has so many built in function to work with array. In this tutorial I would present to you how to filter an associative array based on array keys. For example, you have an associative array $groups: And array of keys: Now, how to get sub array of $groups which key contained in $keys? Our goal is to create new associative array like this: Every keys in array $news contained   Read More ...

PHP

Gammu has feature to send long text message longer than 160 characters. A single sms is maximum 160 characters, so if you send a message more than 160 chars, it will be splitted up into messages. There are two ways to sending long text message in gammu: Using command gammu-smsd-inject You can find this command under gammu folder. Here is the syntax to send long text message using this command:   Read More ...

Gammu

PHP and Javascript work on different sides. PHP work on server side while Javascript work at client side. If your javascript file is separate from html file, you cannot refers to PHP variables. But there is a tricky way how to passing PHP variable into javascript file. Write you Javascript file as PHP In the above code, you have read PHP variable in javascript file. Save above code as js.php   Read More ...

Javascript PHP

Unlike MySQL, Oracle has not auto_increament attribute when you create a table. In MySQL, we can create table with auto increament column in simple way like this: To insert a row into test table, simply leave blank for id column, MySQL will automatically increse the value on every insert statement. Above statement will resulting: How about auto increament in Oracle. Auto increament in oracle not as simple as in MySQL.   Read More ...

Oracle