Jumat, 17 Januari 2014

Definisi dan Sejarah Pertanian


Definisi
Pertanian adalah suatu jenis produksi yang berlandaskan pada pertumbuhan tanaman, hewn, dan ikan. Dalam arti luas pertanian adalah pengelolaan tanaman, hewan dan ikan serta lingkungannya agar memberikan suatu produk. Sedangkan dalam arti sempit pertanian adalah pengelolaan tanaman dan lingkungannya agar memberikan suatu produk.
Ilmu pertanian adalah ilmu yang mempelajari bagtaimana mengelola tanaman, hewan, dan ikan serta lingkungannya agar memberikan hasil secara maksimal. Berdasrkan spesifikasinya ilmu pertanian dapat dikelompokkan menjadi tiga kelompok besar yaitu ilmu tanaman yang mempelajari khusus tanaman, ilmu peternakan yang mempelajari khusus ternak, dan ilmu perikanan yang mempelajari khusus iakan dan hewan air.
Sejarah Pertanian
Pertanian dimulai pada saat manusia mulai mengamati perilaku tanaman, hewan, dan ikan serta faktor-faktor yang mempengaruhi pertumbuhan dan perkembangannya.
Berdasarkan sejarah perkembangannya pertanian dapat diklasifikasikan menjadi 4 golongan yaitu :
  1. Pemburu dan pengumpul
  2. Pertanian primitif
  3. Pertanian tradisional
  4. Pertanian progresif (moderrn)

Kamis, 16 Januari 2014

Perograman Kriptograpi Menggunakan 5 form

Berikut Hasil Dan Cara Kerjanya !


Gambar Form 1 :






Public Class Form1

    Private Sub CaesarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaesarToolStripMenuItem.Click
        Form2.Show()
    End Sub

    Private Sub ViernamToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ViernamToolStripMenuItem.Click
        Form3.Show()
    End Sub

    Private Sub GronsfeldToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GronsfeldToolStripMenuItem.Click
        form4.Show()
    End Sub

    Private Sub VigenoreToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VigenoreToolStripMenuItem.Click
        form5.Show()
    End Sub

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        End
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

Gambar Form 2 :

Public Class Form2

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        PLAIN.Text = ""
        CHIPER.Text = ""
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Close()
    End Sub

 
    Private Sub Btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnenkripsi.Click
        Dim x As String = ""
        Dim xkalimat As String = ""
        For i = 1 To Len(PLAIN.Text)
            x = Mid(PLAIN.Text, i, i)
            x = Chr(Asc(x) + 3)
            xkalimat = xkalimat + x
        Next
        CHIPER.Text = xkalimat
    End Sub

    Private Sub Btndeskripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btndeskripsi.Click
        Dim x As String = ""
        Dim xenkripsi As String = ""
        For i = 1 To Len(CHIPER.Text)
            x = Mid(CHIPER.Text, i, i)
            x = Chr(Asc(x) - 3)
            xenkripsi = xenkripsi + x
        Next
        CHIPER.Text = xenkripsi
    End Sub
End Class
Gambar Form 3 :


    Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PLAINTEXT.Text = ""
        KUNCI.Text = ""
        CHIPPERTEXT.Text = ""
    End Sub

    Private Sub Btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnenkripsi.Click
        Dim j As Integer
        Dim jum As Integer
        Dim skey As String
        Dim nkata As Integer
        Dim nkunci As Integer
        Dim skata As String
        Dim splain As String = ""
        Dim nenc As Integer
        j = 0
        skata = PLAINTEXT.Text
        jum = Len(skata)
        skey = KUNCI.Text
        For i = 1 To jum
            If j = Len(skey) Then
                j = 1
            Else
                j = j + 1
            End If
            nkata = Asc(Mid(skata, i, 1)) - 65
            nkunci = Asc(Mid(skey, j, 1)) - 65
            nenc = ((nkata + nkunci) Mod 26)
            splain = splain & Chr((nenc) + 65)
        Next i
        CHIPPERTEXT.Text = splain
    End Sub

    Private Sub PLAINTEXT_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles PLAINTEXT.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub KUNCI_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles KUNCI.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Close()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        PLAINTEXT.Text = ""
        KUNCI.Text = ""
        CHIPPERTEXT.Text = ""
    End Sub

End Class

Gambar Form 4 :

Public Class form4

    Private Sub Btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnenkripsi.Click
        Dim j As Integer
        Dim jum As Integer
        Dim skey As String
        Dim nkata As Integer
        Dim nkunci As Integer
        Dim skata As String
        Dim splain As String = ""
        Dim nenc As Integer
        j = 0
        skata = PLAINTEXT.Text
        jum = Len(skata)
        skey = KUNCI.Text
        For i = 1 To jum
            If j = Len(skey) Then
                j = 1
            Else
                j = j + 1
            End If
            nkata = Asc(Mid(skata, i, 1)) - 65
            nkunci = Asc(Mid(skey, j, 1)) - 65
            nenc = ((nkata + nkunci) Mod 26)
            splain = splain & Chr((nenc) + 65)
        Next i
        CHIPPERTEXT.Text = splain
    End Sub

    Private Sub PLAINTEXT_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles PLAINTEXT.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not ((tombol >= 65) And (tombol <= 90)) Or (tombol = 8) Then
            e.Handled = True
        End If
    End Sub

    Private Sub KUNCI_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles KUNCI.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 48) And (tombol <= 57)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub
 
    Private Sub form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PLAINTEXT.Text = ""
        KUNCI.Text = ""
        CHIPPERTEXT.Text = ""
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        PLAINTEXT.Text = ""
        KUNCI.Text = ""
        CHIPPERTEXT.Text = ""
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Close()
    End Sub

 
End Class

Gambar Form 5 :


Public Class form5

    Private Sub form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PLAINTEXT.Text = ""
        KUNCI.Text = ""
        CHIPPERTEXT.Text = ""
    End Sub

    Private Sub Btnenkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnenkripsi.Click
        Dim j As Integer
        Dim jum As Integer
        Dim skey As String
        Dim nkata As Integer
        Dim nkunci As Integer
        Dim skata As String
        Dim splain As String = ""
        Dim nenc As Integer
        j = 0
        skata = PLAINTEXT.Text
        jum = Len(skata)
        skey = KUNCI.Text
        For i = 1 To jum
            If j = Len(skey) Then
                j = 1
            Else
                j = j + 1
            End If
            nkata = Asc(Mid(skata, i, 1)) - 65
            nkunci = Asc(Mid(skey, j, 1)) - 65
            nenc = ((nkata + nkunci) Mod 26)
            splain = splain & Chr((nenc) + 65)
        Next i
        CHIPPERTEXT.Text = splain
    End Sub

    Private Sub PLAINTEXT_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles PLAINTEXT.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 65) And (tombol <= 90)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

    Private Sub KUNCI_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles KUNCI.KeyPress
        e.KeyChar = UCase(e.KeyChar)
        Dim tombol As Integer = Asc(e.KeyChar)
        If Not (((tombol >= 32) And (tombol <= 47)) Or (tombol = 8)) Then
            e.Handled = True
        End If
    End Sub

 

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        PLAINTEXT.Text = ""
        KUNCI.Text = ""
        CHIPPERTEXT.Text = ""
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Close()
    End Sub

  
    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub
End Class

Thanks Udah MEmbaca dan Menjalankannya ...