Kamis, 11 November 2010

Membuat Ticker dengan Java ME

package ticker;

import javax.microedition.lcdui.*;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;


/**
 * The Ticker Demo simply sets a rather long ticker to the screen.
 *
 * @version 2.0
 */
public class TickerDemo extends MIDlet implements CommandListener {
    /**
     * This is the text displayed in the ticker.
     */
    private static final String TICKER_TEXT =
        "Ini adalah Tugas dari kelompok kami " + "scroll along the way... On and on it goes without " +
        "stopping even for a second!";
    private boolean firstTime;
    private Form mainForm;
    private Command exitCommand = new Command("Exit", Command.EXIT, 1);
    private Display myDisplay;
    private Ticker t;

    public TickerDemo() {
        myDisplay = Display.getDisplay(this);
        firstTime = true;
        mainForm = new Form("Tugas Pak Andika");
        mainForm.setCommandListener(this);
        mainForm.setCommandListener(this);
    }

    protected void startApp() {
        if (firstTime) {
            t = new Ticker(TICKER_TEXT);
            mainForm.setTicker(t);
            firstTime = false;
        }

        mainForm.addCommand(exitCommand);
        myDisplay.setCurrent(mainForm);
    }

    protected void destroyApp(boolean unconditional) {
        myDisplay.setCurrent((Displayable)null);
        notifyDestroyed();
    }

    protected void pauseApp() {
    }

    public void commandAction(Command c, Displayable s) {
        if (c == exitCommand) {
            destroyApp(true);
        }
    }
}

Membuat Date Field dengan Java ME

package datefield;

import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;


/**
 * The date field demo simply shows a date component on the screen with 3
 * settings (Date, Time, Date & Time).
 *
 * @version 2.0
 */
public class DateFieldDemo extends MIDlet implements CommandListener {
    private static final Command CMD_EXIT = new Command("Exit", Command.EXIT, 1);
    private boolean firstTime;
    private Form mainForm;

    public DateFieldDemo() {
        firstTime = true;
        mainForm = new Form("Alert Options");
    }

    protected void startApp() {
        if (firstTime) {
            mainForm.append(new DateField("Date", DateField.DATE));
            mainForm.append(new DateField("Time", DateField.TIME));
            mainForm.append(new DateField("Date & Time", DateField.DATE_TIME));
            mainForm.addCommand(CMD_EXIT);
            mainForm.setCommandListener(this);
            firstTime = false;
        }

        Display.getDisplay(this).setCurrent(mainForm);
    }

    protected void destroyApp(boolean unconditional) {
    }

    protected void pauseApp() {
    }

    public void commandAction(Command c, Displayable d) {
        if (c == CMD_EXIT) {
            destroyApp(false);
            notifyDestroyed();
        }
    }
}

Membuat Data Diri Dengan Java ME

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package datadiri;

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;


/**
 * @author sophie
 */
public class DataDiriDemo extends MIDlet implements CommandListener{
    private static final Command CMD_EXIT = new Command ("Exit",Command.EXIT, 1);
    private static final Command CMD_OK = new Command ("Exit",Command.OK, 2);
    public static final String[] gender = {"Laki-Laki","Perempuan"};
    private boolean firstTime;
    private Form mainForm;

    private Display display;

    public DataDiriDemo() {
        firstTime = true;
        mainForm = new Form ("Data Diri");
    }

    public void startApp() {
        display = Display.getDisplay (this);
        if(firstTime){
            mainForm.append(new TextField("Nama","",15,TextField.ANY));
            mainForm.append(new TextField("Telepon","",15,TextField.PHONENUMBER));
            ChoiceGroup jenis =new ChoiceGroup ("Jenis Kelamin", ChoiceGroup.EXCLUSIVE,gender,null);
            mainForm.append(jenis);

            mainForm.append(new DateField("Tanggal Lahir", DateField.DATE));

            mainForm.addCommand(CMD_EXIT);
            mainForm.setCommandListener(this);
            firstTime = false;
        }
        Display.getDisplay(this).setCurrent(mainForm);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command c, Displayable d) {
        if (c == CMD_EXIT) {
            destroyApp(false);
            notifyDestroyed();
        }
       
    }
}

Love Dari Monte



Harga Rp 4.000(Belum termasuk Ongkir)
Pesan 100 lebih dapat diskon
Gantungan HP, Gantungan Kunci

Kelinci dari Monte



Harga Rp 5.000 (belum termasuk Ongkir)
Pesan 100 lebih dapat diskon
Gantungan Kunci, Gantungan HP

Lolipop dari Flanel

Lambang Cewe Cowo



Harga Rp 4.000 (belum termasuk ongkir)

Boneka Wajah dari Flanel


Harga Rp 3.000 (belum termasuk ongkir)
Bisa pesen untuk gantungan kunci, gantungan HP, magnet kulkas,dll














Donat dari kain Flanel


Harga Rp 5.000(belum termasuk ongkir)
Bisa pesen warna, gantungan Hp, gantungan kunci, magnet kulkas,dll
Minat????
Hubungi sophiecranberries@gmail.com









Dolpin dari Kain Flanel


Ayo.......order Dolpin dari kain flanel
Harga Rp 5.000 (belum termasuk ongkos pengiriman)
Bisa pesan sesuai keinginan....
bisa dibuat gantungan kunci, gantungan hp,magnet,dll.

yuk.............
dapat diskon jika order lebih dari 100 buah
Minat kirim email ke sophiecranberries@gmail.com





Kamis, 05 Agustus 2010

Mengubah logo Google sesuai keinginanmu

  • Bosan lihat logo Google???? Kamu bisa mngubah sesuai keinginan kamu sendiri
  • kmu bisa merubahnya dengan nama kamu. mau tahu???
  • ikuti langkah2 nya
  • Buka browsermu(mozila firefox)
  • mendownload add-ons Greasemonkey https://addons.mozilla.org/en-US/firefox/addon/748
  • Klik Download

Rabu, 04 Agustus 2010

Praktikum PL/SQL

function sederhana

    CREATE OR REPLACE FUNCTION FLATIHAN1 (nama varchar)
    return varchar
    is
    begin
    return substr(nama,1,1);
    end; 

cara memanggil function diatas

                        select ename,flatihan1(ename) from dual;;
 

Function


Function
Function adalah jenis PL/SQL block yang menghasilkan satu nilai. Secara umum, function digunakan melakukan perhitungan, mengecek eksistensi dan kevalidan suatu data. Function bisa dilibatkan dalam expresi. Function bisa disimpan dalam database sebagai object schema, sehingga suatu function bisa digunakan berulangkali tanpa harus melakukan parsing dan compile ulang.
CREATE [OR REPLACE] FUNCTION function_name
[(parameter1 [mode1] datatype1,
RETURN datatype
IS | AS
PL/SQL block;

Parameter yang berlaku pada function hanya parameter IN.
Privilege yang dibutuhkan CREATE PROCEDURE atau CREATE ANY PROCEDURE
Untuk demo tentang function connect sebagai user SCOTT.
Gunakan tabel EMP, buat function yang mengembalikan SAL dari EMPNO yang dikirim.
-- periksa struktur tabel EMP
SQL> DESC emp;
 Name                    Null?    Type
 ----------------------- -------- -------------
 EMPNO                   NOT NULL NUMBER(4)
 ENAME                            VARCHAR2(10)
 JOB                              VARCHAR2(9)
 MGR                              NUMBER(4)
 HIREDATE                         DATE
 SAL                              NUMBER(7,2)
 COMM                             NUMBER(7,2)
 DEPTNO                           NUMBER(2)
CREATE OR REPLACE FUNCTION GET_SAL  (P_EMPNO   NUMBER)
RETURN NUMBER
AS
   V_SAL    NUMBER(10);
BEGIN
  SELECT SAL INTO V_SAL
  FROM EMP  WHERE EMPNO=P_EMPNO;
  -- Nilai yang dikeluarkan
  RETURN V_SAL;
END;
/
Berbagai cara menjalankan Function.
– Menjalankan function sebagai parameter dari suatu procedure
SQL> SET SERVEROUTPUT ON
SQL> EXECUTE DBMS_OUTPUT.PUT_LINE(GET_GAJI(7369));
800
– Menjalankan funtion sebagai bagian dari ekspresi
SQL> SET AUTOPRINT ON
SQL> VARIABLE G_HASIL NUMBER;
SQL> EXECUTE :G_HASIL := GET_GAJI(7788);
PL/SQL procedure successfully completed.
G_HASIL
----------
3000
– Menjalankan function pada perintah SELECT
SQL> SELECT EMPNO,ENAME,GET_SAL(EMPNO) FROM EMP;
       NIP NAMA       GET_SAL(EMPNO)
---------- ---------- -------------
      7369 SMITH                800   
      7499 ALLEN               1600
      7521 WARD                1250
      7566 JONES               2975
      7654 MARTIN              1250
Contoh lain function
CREATE OR REPLACE FUNCTION PAJAK(P_SAL NUMBER, PCT NUMBER)
RETURN NUMBER
AS
BEGIN
   RETURN (P_SAL * (PCT/100));
END;
/
SQL> SELECT EMPNO,ENAME,SAL,PAJAK(SAL,10)
2  FROM EMP;
     EMPNO ENAME             SAL PAJAK(SAL,10)
---------- ---------- ---------- -------------
      7369 SMITH             800            80
      7499 ALLEN            1600           160
      7521 WARD             1250           125
      7566 JONES            2975         297.5
      7654 MARTIN           1250           125
      7698 BLAKE            2850           285
      7782 CLARK            2450           245
      7788 SCOTT            3000           300
      7839 KING             5000           500

Triger After Insert

Triger After Insert
-------------------
SQL> CREATE TABLE major_stats (
  2    major          VARCHAR2(30),
  3    total_credits  NUMBER,
  4    total_students NUMBER);

Table created.

Triger After Delete

Triger untuk mengetahui siapa yang menghapus record Table
----------------------------

SQL> create table Employee(
  2    ID                 VARCHAR2(4 BYTE)         NOT NULL,
  3    First_Name         VARCHAR2(10 BYTE),
  4    Last_Name          VARCHAR2(10 BYTE),
  5    Start_Date         DATE,
  6    End_Date           DATE,
  7    Salary             Number(8,2),
  8    City               VARCHAR2(10 BYTE),
  9    Description        VARCHAR2(15 BYTE)
 10  )
-----------------------------

Fungsi yang didefinisikan oleh user

-----
DDL untuk tabel lecturer
-----
SQL>   CREATE TABLE lecturer (
  2    id               NUMBER(5) PRIMARY KEY,
  3    first_name       VARCHAR2(20),
  4    last_name        VARCHAR2(20),
  5    major            VARCHAR2(30),
  6    current_credits  NUMBER(3)
  7    );
---------------------------------

Fungsi dengan Insert Statement

---------
DDL untuk tabel Lecture
--------
CREATE TABLE lecturer (
      id               NUMBER(5) PRIMARY KEY,
      first_name       VARCHAR2(20),
      last_name        VARCHAR2(20),
      major            VARCHAR2(30),
      current_credits  NUMBER(3)
      );
---------
untuk isi tabel lecturer
---------

Pendaftaran Mahasiswa Baru Politeknik Kediri tahun 2010/2011













Ini adalah foto waktu pendaftaran mahasiswa Politeknik Kediri Tahun 2010/2011....tapi disayangkan ada 3 penyusup(mahasiswa lama) yang ikut mampang buat difoto. Katanya sih mau mendaftar jadi mahasiswa baru....

Selasa, 20 Juli 2010

How To Create a Good Article

How to Create a Good Article
By [http://ezinearticles.com/?expert=Andrew_Stark]Andrew Stark

Here's some simple advice that will help you write better articles...

A Good Intro

Be up front and tell people what they are going to learn in the first paragraph. Time is short on the internet and people want the information now rather than having to wade through pages of filler.

Don't Keyword stuff

If you're doing your research and using Google alerts for your keywords you will soon find that most of the articles you find are total rubbish. Hint - cheap article writers are cheap for a reason!

The same is also true for many article spinners, the only part of this business that should be automated is the submission, it really is dull and really is just copy & paste. :-)

Be Positive

I know that bad news travels faster than good, but when did bad news ever make you take out your wallet?

The whole point of writing articles is to drive traffic to your website and get people to join your list, buy your product, or take some sort of positive action. If your article gives actionable advice that helps people they will want to find out more about you and click the resource link at the bottom as a very warm prospect.

Good Formatting

Long pages of text with no breaks in the formatting make for dull reading and can turn the reader off faster than a page of flashing banner adverts. Make use of sub headings and write in short paragraphs and keep sentences short and snappy to drive the reader to the end of the article.

The Strong Call To Action

As you get towards the end of the article be sure that you have written everything that you set out to achieve in the title and that all important first paragraph.

Then lastly it's the all important resource box...

My advice here is to create a swipe file based on the best article writers in your niche and use that to drive hyper targeted traffic back to your website.

Andrew Stark is a successful E-Mail Marketer and has built a list of thousands using free traffic. Andrew has been marketing online since 2002 and he knows what it takes to make money and succeed online. Stop by his Web site and subscribe to his newsletter for E-Mail Marketing tips that can help YOU! Go to http://www.ListBuildingExpert.com

Article Source: [http://EzineArticles.com/?How-to-Create-a-Good-Article&id=4422636] How to Create a Good Article