Pages

Informasi Iklan

Selasa, 29 Mei 2012

Tutorial Searching / Pencarian Data dengan PHP dan Mysql

Studi Kasus : Membuat script untuk pencarian data dalam database
Kebutuhan : Webserver Packages, already installed.
Searching, merupakan fasilitas yang hampir selalu ada dalam setiap aplikasi, baik aplikasi berbasis web ataupun desktop. Setiap halaman web/ blog juga akan ditemukan fasilitas ini. Tutorial berikut akan memberikan konsep dasar dari searching, dengan melakukan pencarian pada data terstruktu (database).
Ok, langsung praktik saja.
Step 1 : Persiapkan Database
  1. Buat database dengan nama db_tutorial
  2. Siapkan tabel dengan nama tb_student, dengan struktur tabel seperti gambar dibawah ini.
  3. Insert-kan beberapa sample data, misal seperti gambar dibawah,
  4. Done with the database!
Step 2 : Persiapkan Folder Kerja



Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer

Program Sederhana Menghitung IP Semester

Nggak kerasa ujian semester telah berakhir dan saatnya untuk mengetahui nilai IP Semester yang kita peroleh. Nah aku iseng-iseng buat program sederhana untuk menghitung IP Semester yang diperoleh disemster ini, ini bermula ketika nilai praktikum X ku udah keluar dipapan pengumuman tapi belum di masukkan ke Unisys (situs khusus mahasiswa), dan aku pun penasaran untuk mengetahui IP Semester ku karena semua nilai udah masuk di Unisys ku kecuali nilai matkul praktikum X, jadi iseng-iseng aja aku membuat program sederhana ini untuk mengetahui hasil akhir dari IP Semester ku. dengan menggunakan bahasa C++ yang ku pakai di Program CodeBlocks aku pun langsung membuatnya.
Caranya sederhana, yaitu hanya menggunakan tipe data bentukan dengan struct, perulangan dan array, tidak lupa dengan menggunakan input dan output.
Rumus untuk mencari IP Semester adalah total (sks x harkat) / total (sks).


Kira-kira begini flowchart dari program yang ku buat.

Flowchart Aplikasi Sederhana Menghitung IP Semester
dan ini source code dari program tersebut yang ku buat dengan menggunakan bahasa c++ di codeblocks.
 
#include <iostream>
using namespace std;
typedef struct
{
    int nim;
    char matkul[50];
    float ip, harkat, sks;
} data;
typedef data ip[101];
int main()
{
    ip daftar;
    int banyak;
    char lagi;
    cout<<"copyright 2011 | Hasimhendraharahap"<<endl<<endl;
    do {
    cout<<"=APLIKASI IPS/IPK="<<endl<<endl;
    cout<<"+---------------+"<<endl;
    cout<<"|     HARKAT    |"<<endl;
    cout<<"+---------------+"<<endl;
    cout<<"|    A  : 4     |"<<endl;
    cout<<"|    A- : 3.75  |"<<endl;
    cout<<"|    A/B: 3.5   |"<<endl;
    cout<<"|    B+ : 3.25  |"<<endl;
    cout<<"|    B  : 3     |"<<endl;
    cout<<"|    B- : 2.75  |"<<endl;
    cout<<"|    B/C: 2.5   |"<<endl;
    cout<<"|    C+ : 2.25  |"<<endl;
    cout<<"|    C  : 2     |"<<endl;
    cout<<"|    C- : 1.75  |"<<endl;
    cout<<"|    C/D: 1.5   |"<<endl;
    cout<<"|    D+ : 1.25  |"<<endl;
    cout<<"|    D  : 1     |"<<endl;
    cout<<"|    D- : 0.75  |"<<endl;
    cout<<"|    D/E: 0.5   |"<<endl;
    cout<<"|    E+ : 0.25  |"<<endl;
    cout<<"|    E  : 0     |"<<endl;
    cout<<"+---------------+"<<endl;
    cout<<endl<<"Banyak Matakuliah : ";
    cin>>banyak;
    cout<<endl;
    float total, sksharkat, totalsks, ips;
    total=0;
    totalsks=0;
    for (int i=1;i<=banyak;i++)
    {
        cout<<"Matakuliah ke "<<i<<endl;
        cout<<"SKS      : ";
        cin>>daftar[i].sks;
        cout<<"Harkat   : ";
        cin>>daftar[i].harkat;
        sksharkat=daftar[i].sks*daftar[i].harkat;
        total=total+sksharkat;
        totalsks=totalsks+daftar[i].sks;
        cout<<endl;
    }
    ips=total/totalsks;
    cout<<endl<<"Total SKS    : "<<totalsks<<endl;
    cout<<"IP Semester  : "<<ips<<endl;
    cout<<"Lagi ? [y/n] : ";
    cin>>lagi;
    }while (lagi!='n');
    return 0;
}

Contoh hasil perhitungan IP Semester

Contoh Perhitungan IP Semester
Jika ingin mendownload aplikasi sederhana menghitung IP Semester, klik disini
Ok semoga membantu.



Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer

Kamis, 10 Mei 2012

Cara Pasang Template Matrix Style

Oke...postingan artikel kali ini cara pasang background The Matrix yang unik dan atraktif. Background The Matrix ini tersedia dalam berbagai image yang sudah saya persiapkan. Sobat blogger tinggal pilih imagenya kemudian tinggal pasang kode CSS-nya di blog sobat. Caranya gampang ga perlu ribet n pusing...


Sebelum sobat blogger mencoba trik kali ini ada baiknya membuat backup template blog sobat terlebih dahulu untuk menghindari hal-hal yang tidak diinginkan.


Cara Pemasangan 
  • Login ke blog sobat.
  • Klik "Design" kemudian klik "Edit HTML".


Cari kode </Head> kemudian copy-paste kode CSS di bawah ini diatas </Head>.

-----------------------------------------------------------------------------------------------------------------------------------------------------<style type="text/css">
body{
background:url(https://lh5.googleusercontent.com/-F5UfAsRs24I/Ts0uwOoH7QI/AAAAAAAAAf4/UQXNleByOcE/s800/monozcore_blogspot_com_redmatrix.gif) repeat center center fixed black;
}
</style>
-----------------------------------------------------------------------------------------------------------------------------------------------------










  • Ganti kode yang berwarna merah pada baris kode atas dengan URL gambar animasi matrix yang sobat inginkan.















  • Klik "Save" dan lihat hasilnya...













    • 0-1-1 Matrix

      https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSWOCOjWOPC0djg_n2ioUMcoSilR8EF01I3BB-9Tc1nYllQz7jK0cfV7BfsmXnwJFe-4j0lMu0Qx1fwuSPCvrR0oiAMfsaGQ-UrqjY12Jd-bMbA8Ob8XLyt4ueAaiBil7-CxFBWMFu534/s1600/0_1_1.gif
    • Black Red Matrix


    • https://lh6.googleusercontent.com/-oIKDL5K_Jus/Ts32BmE64MI/AAAAAAAAAgI/QncRScTidN8/s800/black_red_matrix.gif
    • Blue Matrix 1


    • https://lh3.googleusercontent.com/-bf_x-yTTHjQ/Ts32HIlpUJI/AAAAAAAAAgQ/WctrlVSdVXI/s800/bluematrix.gif
    • Blue Matrix 2


    • https://lh6.googleusercontent.com/-wnxb6Bv75j8/Ts32HR4rlOI/AAAAAAAAAgU/ubCAT0zE3hA/s800/bluematrix2.gif
    • Green Matrix


    • https://lh4.googleusercontent.com/-yEVdif3Bi_U/Ts32PtuIGBI/AAAAAAAAAgo/Ce1ujGXZ6RE/s800/matrix.gif
    • Port Listener


    • https://lh3.googleusercontent.com/-CYobas4WGXo/Ts32QusPKsI/AAAAAAAAAgw/xQQMNbgAa0M/s800/port_listener.gif
    • Red Matrix


    • https://lh5.googleusercontent.com/-F5UfAsRs24I/Ts0uwOoH7QI/AAAAAAAAAf4/UQXNleByOcE/s800/monozcore_blogspot_com_redmatrix.gif
    • Blue Matrix
       Blue Matrix
       
    • https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBmsMcO1Soj6DRqXLcCY8xhXJJ3WCkGzl1rcOaQEYoYrr8TVqWUDfr6chCVLOjshiiwdqjtZyXUVs6D8UUEwHYQZwfr1W1VJQhzXOVDsz2UTNK9nQcdrUNB9L-vtSIUGw84iJku_ZRcdk/s800/matrix.gif

    Wuiiihhh...cape juga ngetiknya...oke selamat mencoba aja dech... Salam Vampnest blog trik.



    Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer

    Merubah Baground blogspot /red matrix



    Duh, Dekan-Maru nih ngomong apa sih, orang background Blog nya juga gak muncul apa-apa tuh, tekan Refresh kalo belom muncul ato F5, Ato klik disini ajah.
    1. Pertama Masuk Dulu ke Blog kalian,

    2. Langsung Menuju ke Rancangan
    3. Masuk ke Edit THTML
    4. Nah, kalo udah, masukkan kode dibawah ini diatas kode </head>



    <script type='text/javascript' src='http://dekanmaru.googlecode.com/files/DEKAN-RedMatrix.txt'></script>
    5. Kalo udah, tinggal simpan template kamu.. Jadi deh,,

    Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer

    Cara Membuat Backround Blog Berubah-ubah Dalam Satu Templates


    Mungkin anda ingin tampilan blog anda indah/keren/lainnya tapi harus merubah template atau lainnya. Berikut cara untuk membuat backround blog anda berubah - ubah dalam satu template. Script-nya ini:

    <div class="widget-content">
        <center><blink style="color: rgb(0, 102, 0);"><span style="font-weight: bold; color: rgb(0, 153, 0);">Change Background of This Blog!</span></blink><br /><br />
        <center><select onchange="document.body.style.background = this.value;this.style.background = this.value;" name="DADcbgc" title="Change Background Image" width="185" height="30">
        <option value="url() repeat center center fixed" />None
        <option value="url(http://cdn.indowebster.com/www42.indowebster.com/7dd2ae51f4b0cb792d3a435dc953f5cc_thumbnail.gif) repeat center center fixed" />Red Matrix
        <option value="url(http://yahyarezpectors.files.wordpress.com/2011/01/sharingan_wheel_by_neronin2.gif) repeat center center fixed" />Sharingan
        <option value="url(http://data0.eklablog.fr/hinata/mod_article214242.gif) repeat center center fixed" />Sharingan 2
        <option value="url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPFDBO9LiRRWVjmtd_z1umGN1C_y35MR4P_TvYzMpDKkeOkO0U270pb-SZ6x2hvejJVXYins2ri8i3M_u8MXRLxtXpCxnDMXr55d3v4aPIc8SFlyy9ENznOMSim8D07Iis5z_MY7zUkdmN/s1600/death-note%25284%2529.jpg) repeat center center fixed" />Death Note 1
        <option value="url(http://i469.photobucket.com/albums/rr57/dragonknight0000039/ae/death20note20L.jpg) repeat center center fixed" />L Lawliet 1
        <option value="url(http://lh5.googleusercontent.com/_GaKwmMcf4N4/TZF_GOqPR_I/AAAAAAAAEsY/iGS-uTIVDs8/DADbg.JPG) repeat center center fixed" />Hidden Leaf
        <option value="url(http://lh4.googleusercontent.com/_GaKwmMcf4N4/TZGC4NlmmMI/AAAAAAAAEvk/cma5mtW-beU/DADbg2.JPG) repeat center center fixed" />Rikimaru
        <option value="url(http://lh6.googleusercontent.com/_GaKwmMcf4N4/TZGC24bJuCI/AAAAAAAAEvg/O1mDH3LU91w/DADbg0.jpg) repeat center center fixed" />Yu-Gi-Oh!
        <option value="url(http://lh5.googleusercontent.com/_GaKwmMcf4N4/TZGDGbOqsnI/AAAAAAAAEwI/FWAbOOZu2go/DAD1.jpg) repeat center center fixed" />Deidara
        <option value="url(http://lh4.googleusercontent.com/_GaKwmMcf4N4/TZGC7eK9TtI/AAAAAAAAEvw/Ly5L0UA3D4s/DADcloud.gif) repeat center center fixed" />Akatsuki Cloud
        <option value="url(http://lh5.googleusercontent.com/_GaKwmMcf4N4/TZGC7UA67RI/AAAAAAAAEv0/ehJ-oez_akU/DADbluematrix.gif) repeat center center fixed" />Blue Matrix
        <option value="url(http://lh3.googleusercontent.com/_GaKwmMcf4N4/TZGC9O9ZNUI/AAAAAAAAEv8/Idjb8xIrw60/DADgreenmatrix.gif) repeat center center fixed" />Green Matrix
        <option value="url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVD94lDSPsm41dbY_ju2UXQB1AO88pjtsTRZxWwpvnSVbylPjG-cwiIkQ8Zf2yd73VFJhqQ5qF3M3e0EPZsrC9IS6KOZYLDKPtBuf0nEmuBo9ljXLu6lnTt5WmmrTzETA3jSujwq1Xe6o/s320/Henge_Kyubi.jpg) repeat center center fixed" />kyubi
        <option value="url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHCTCAi20da2-rtd3GdUO8d3VtgGTKWYaws7jzrYHsE5fSdmZ2AQZ5Jd1FtbZSNMmGbHP9uwt4jhBUzcJ4lJhA8VdvqAUQGD8UpJ85w05OmuPP0a9c-LYa7MNdJ8lu7uRGjFBRTyzFwMY/s1600/th_gif-sasuke-naruto.gif) repeat center center fixed" />Naruto VS Sasuke
        <option value="url(http://i354.photobucket.com/albums/r409/zulqi/animasi/sharingan.gif) repeat center center fixed" />Sharinggan 3
        <option value="url(http://i354.photobucket.com/albums/r409/zulqi/animasi/2748793811a3546012338b327107314l.gif) repeat center center fixed" />Sasuke Chidori
        <option value="url(http://i354.photobucket.com/albums/r409/zulqi/animasi/thsharingan.gif) repeat center center fixed" />sharinggan 4
        <option value="url(http://i1187.photobucket.com/albums/z387/amandayassin/GenerasiRasengan.jpg) repeat center center fixed" />Rasenggan
        <option value="url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQLEcr1aKM6zFsBZvM2b24oIMJzKHI6E4vPI8TJ9qxRn-cpD9A4O8EirS4JzVPUKi8OzBHydzLtQsP1nWF_hIDarlIwYduYTn5GagiO7fFAbr7FJlIsi2gp5l5Skuk_m528N0wDfeqTw/s1600/avenged-sevenfold.gif) repeat center center fixed" />A7X
        <option value="url(http://gifsoup.com/webroot/animatedgifs1/1591575_o.gif) repeat center center fixed" />afterlife
        <option value="url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1OsADXPeJRVvGIf4pDLKyMq-lRQDUz-i1VQq2md7HmQRROP1F4OkE7rX8NpqPOAdYyjtzX_TswFWm-44ly_yU6NMqNqAhOu4yKlUX2LMlSPGRh4zhT-1_77HCwy7YwW2e2jkJD1UzPt1n/s1600/deathbat1.gif) repeat center center fixed" />avenged 7fold
        <option value="url(http://29.media.tumblr.com/tumblr_lqvacoNquH1qay46jo1_400.gif) repeat center center fixed" />avenged
        </select></center></center>
        </div><br/><center><a href="http://blog.cyber4rt.com/" target="_blank">Cyber4rt Blog</a></center>

    Semoga bermanfaat!!!

    Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer