Android Studio Layout Relative Example

Here is an example of android studio simple relative layout

Design View


Text View

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">
    <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Ini Relative Layout" 
       android:textSize="25dp" 
       android:layout_marginLeft="80dp" 
       android:id="@+id/tvTitle"/>

    <Button 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn1" 
       android:layout_marginTop="21dp" 
       android:layout_below="@+id/tvTitle"/>

    <Button 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn2" 
       android:layout_marginTop="21dp" 
       android:layout_below="@+id/tvTitle" 
       android:layout_alignParentRight="true"/>

    <Button 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn3" 
       android:layout_centerHorizontal="true" 
       android:layout_centerVertical="true"/>

    <Button 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn4" 
       android:layout_alignParentBottom="true"        />

    <Button 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn5" 
       android:layout_alignParentBottom="true" 
       android:layout_alignParentRight="true"        />

</RelativeLayout>

Onesinus Tamba Rabu, 21 Maret 2018
Android Studio Layout Linear Horizontal Example

Here is an example of android studio linear horizontal layout

Design View


Text View

<?xml version="1.0" encoding="utf-8"?><LinearLayout    xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical">

    <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:hint="@string/title_horizontal" 
       android:textColor="@color/colorPrimary" 
       android:textSize="26sp" 
       android:layout_marginLeft="30dp"/>

    <LinearLayout 
       android:layout_width="match_parent" 
       android:layout_height="match_parent"
       android:orientation="horizontal">
        <Button 
           android:layout_width="wrap_content" 
           android:layout_height="match_parent" 
           android:text="@string/str_btn1"/>

        <Button 
           android:layout_width="wrap_content" 
           android:layout_height="match_parent" 
           android:text="@string/str_btn2"/>

        <Button 
           android:layout_width="wrap_content" 
           android:layout_height="match_parent" 
           android:text="@string/str_btn3"/>

        <Button 
           android:layout_width="wrap_content" 
           android:layout_height="match_parent" 
           android:text="@string/str_btn4"/>

        <Button 
           android:layout_width="wrap_content" 
           android:layout_height="match_parent" 
           android:text="@string/str_btn5"/>

    </LinearLayout>
</LinearLayout>

Onesinus Tamba
Android Studio Layout Linear Vertical Example

Here is an example of android studio simple layout (Linear)

Design View


Text View

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    tools:context="one.com.example.onesi.onesinus.MainActivity"    android:orientation="vertical">

    <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/title_linear" 
       android:textSize="25sp" 
       android:layout_marginLeft="50dp"        />
    
    <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="TextBox"/>

    <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="TextBox"/>

    <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="TextBox"/>

    <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn"/>

    <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn"/>

    <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn"/>

</LinearLayout>

Onesinus Tamba
PHP Operator

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
            // Operator assignment
echo "============================================Operator Assignment=============================================";
echo "<br/><br/>";
           
echo '$var1 = 2;' . "<br/>";
echo '$var2 = 3;' . "<br/>";
echo '$var3 = 4;' . "<br/><br/>";
echo '$var3 += $var2;' . "<br/>";

$var1 = 2;
            $var2 = 3;
$var3 = 4;

echo "$var3" . " += " . " $var2 " . " = " . $var3 += $var2;
$var3 += $var2;

echo "<br/>";


       
            // Operator aritmatika           
echo "============================================Operator Artimatika=============================================";
echo "<br/><br/>";

echo '$var_tambah = $var1 + $var2;' . "<br/>";
            echo "$var1 " . " + " . " $var2 " . " = " . $var_tambah = $var1 + $var2 . "<br/><br/>";

echo '$var_kurang = $var1 - $var2;' . "<br/>";
            echo "$var1 " . " - " . " $var2 " . " = " . $var_tambah = $var1 - $var2 . "<br/><br/>";

echo '$var_kali = $var1 * $var2;' . "<br/>";
            echo "$var1 " . " * " . " $var2 " . " = " . $var_tambah = $var1 * $var2 . "<br/><br/>";

echo '$var1 / $var2;' . "<br/>";
            echo "$var1 " . " / " . " $var2 " . " = " . $var_tambah = $var1 / $var2 . "<br/><br/>";

echo '$var1 % $var2;' . "<br/>";
            echo "$var1 " . " % " . " $var2 " . " = " . $var_tambah = $var1 % $var2 . "<br/><br/>";

            $var_tambah = $var1 + $var2;
$var_kurang = $var1 - $var2;
            $var_kali = $var1 * $var2;
            $var_bagi = $var1 / $var2;
            $var_sisa_bagi = $var1 % $var2;
           
/*            echo $var_tambah . "<br/>";
            echo $var_kurang . "<br/>";
            echo $var_kali . "<br/>";
            echo $var_bagi . "<br/>";
            echo $var_sisa_bagi . "<br/>";
  */         
echo "==========================================Operator Relational / Comparation====================================";
echo "<br/><br/>";

            // Operator relational / comparation
            if ($var1 == $var2){
                echo $var1 . " == " . $var2 . " =  TRUE <br/>  ";
            }else{
                echo $var1 . " == " . $var2 . " =  FALSE <br/>  ";               
            }

echo "$var1 != $var2 = "; var_dump($var1 != $var2); echo "<br/>";
echo "$var1 < $var2 = "; var_dump($var1 < $var2); echo "<br/>";
echo "$var1 > $var2 = "; var_dump($var1 > $var2); echo "<br/>";
echo "$var1 <= $var2 = "; var_dump($var1 <= $var2); echo "<br/>";
echo "$var1 >= $var2 = "; var_dump($var1 >= $var2); echo "<br/><br/>"; 
           
echo "==========================================Operator Logical ================================================";
echo "<br/><br/>";
           
// logical operator
echo '($var1 == 2 AND $var2 == 3) '; echo var_dump($var1 == 2 AND $var2 == 3) . "<br/>";
echo '($var1 == 2 AND $var2 == 4) '; echo var_dump($var1 == 2 AND $var2 == 4) . "<br/>";
echo "<br/>";
echo '($var1 == 2 && $var2 == 3) '; echo var_dump($var1 == 2 && $var2 == 3) . "<br/>";
echo '($var1 == 2 && $var2 == 4) '; echo var_dump($var1 == 2 && $var2 == 4) . "<br/>";
echo "<br/>";
echo '($var1 == 2 OR $var2 == 3) '; echo var_dump($var1 == 2 Or $var2 == 3) . "<br/>";
echo '($var1 == 2 OR $var2 == 4) '; echo var_dump($var1 == 2 Or $var2 == 4) . "<br/>";
echo "<br/>";
echo '($var1 == 2 || $var2 == 3) '; echo var_dump($var1 == 2 || $var2 == 3) . "<br/>";
echo '($var1 == 2 || $var2 == 4) '; echo var_dump($var1 == 2 || $var2 == 4) . "<br/>";
echo "<br/>";
echo '($var1 == 2 XOR $var2 == 3) '; echo var_dump($var1 == 2 XOR $var2 == 3) . "<br/>";
echo '($var1 == 2 XOR $var2 == 4) '; echo var_dump($var1 == 2 XOR $var2 == 4) . "<br/>";
echo "<br/>";
echo '(!$var1 == 2 XOR $var2 == 3) '; echo var_dump(!$var1 == 2 XOR $var2 == 3) . "<br/>";
echo '($var1 == 2 XOR $var2 == 4) '; echo var_dump($var1 == 2 XOR $var2 == 4) . "<br/>";
           

        ?>
    </body>
</html>

Onesinus Tamba
[DASAR PHP] Operator Aritmatika

Berikut adalah contoh penggunaan operator aritmatika didalam bahasa pemrograman PHP

<?php
            $var1 = 2; // deklarasi variable dengan nama var1 dengan nilai 2
            $var2 = 3; // deklarasi variable dengan nama var2 dengan nilai 3
           
            $var_tambah = $var1 + $var2; // membuat variable untuk menjumlahkan $var1 dan $var2
            $var_kurang = $var1 - $var2;// membuat variable untuk mengurangi $var1 dan $var2
            $var_kali = $var1 * $var2; // // membuat variable untuk mengkalikan $var1 dan $var2
            $var_bagi = $var1 / $var2; // membuat variable untuk membagi $var1 dan $var2
            $var_sisa_bagi = $var1 % $var2; // membuat variable untuk mendapat sisa dari pembagian $var1 dan $var2

            // menampilkan hasil
            echo $var_tambah . "<br/>";
            echo $var_kurang . "<br/>";
            echo $var_kali . "<br/>";
            echo $var_bagi . "<br/>";
            echo $var_sisa_bagi;
        ?>

Onesinus Tamba Selasa, 20 Maret 2018
Power Point Sistem Operasi [Sistem Operasi Proprietary & Sistem Operasi Open Source]

Download PPT : https://drive.google.com/open?id=18anITkhP8rUwUdbX8Yolne55aqcn-iwg


Sistem Operasi Proprietary 





Sistem Operasi Open Source



Definisi Open Source dan Definisi Proprietary


Contoh  Open Source dan Proprietary







Kelemahan dan kelebihan Sistem Operasi Open Source dan Proprietary




Statistik & Analisa Penggunaan Sistem Operasi Open Source dan Proprietary



Kesimpulan


Onesinus Tamba Sabtu, 17 Maret 2018