This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Monday, April 14, 2014

tugas

Perusahaaan barang tembikar colonial memproduksi 2 produk setiap hari, yaitu cangkir dan mangkok. Perusahaan itu mempunyai2 sumber daya terbatas jumlahnya untuk memproduksi produk-produk tersebut yaitu tanahliat (120 kg/hari), tenaga kerja (40 jam/hari). Dengan keterbatasan sumberdaya perusahaan ingin mengetahui berapa banyak mangkosk dan cangkir yang akan diproduksi tiap hari dalam proses memaksimumkan laba. Kedua produk mempunyai kebutuhan sumberdaya produksi sertalaba per jam seperti yang ditunjukkan table.
Produk
TenagaKerja
(jam/unit)
Tanah Liat
(kg/unit)
Laba
(Rp/unit)
Mangkok
1
3
4000
Cangkir
2
2
5000
Jumlah
40
120


Fungsikendala :
       I.            X+2y<=40
    II.            3x=2y<=120
Fungsitujuan
Z = 4000x+5000y

Untukpersamaan I
Jika x=0 ; x+2y = 40                                               Jika y=0 ; x+2y = 40
                 0+2y=40                                                                  x+2(0) = 40
                 Y=20                                                                              x = 40

Untukpersamaan II
Jikax=0 : 3x+2y = 120                                            Jika y = 0 ; 3x + 2y =120
                 3(0) + 2y =120                                                           3x + 2(0) = 120
                 2y = 120                                                                                3x = 120
                 Y = 60                                                                                   x = 40




UntukPerpotongangaris
  x + 2y = 40
3x + 2y =120
-2x       = -80
     x     = 40

    x + 2y =40
40x + 2y = 40
            2y = 40 – 40
            2y = 0
              y = 0

·         (0,20)
Z = 4000x + 5000y
   = 4000(0) + 5000(20)
   = 0 + 100000
   = 100000
·         (40,0)
Z = 4000x + 5000y
   = 4000(40) + 5000(0)\
   = 160000 + 0
   = 160000





























Monday, July 1, 2013

KRIPTOGRAFI




1. CHESAR CHIPER
CODINGNYA:
Public Class Menu_Utama
    Private Sub CaesarChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaesarChiperToolStripMenuItem.Click
        Caeser_Chiper.MdiParent = Me
        Caeser_Chiper.Show()
    End Sub

    Private Sub GronsfeldChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GronsfeldChiperToolStripMenuItem.Click
        Grondfeld_Chiper.MdiParent = Me
        Grondfeld_Chiper.Show()
    End Sub

    Private Sub VernamChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VernamChiperToolStripMenuItem.Click
        Vernam_Chiper.MdiParent = Me
        Vernam_Chiper.Show()
    End Sub

    Private Sub VigenereChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VigenereChiperToolStripMenuItem.Click
        Vegenere_Chiper.MdiParent = Me
        Vegenere_Chiper.Show()
    End Sub

    Private Sub DesChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DesChiperToolStripMenuItem.Click
        Des_Chiper.MdiParent = Me
        Des_Chiper.Show()
    End Sub

    Private Sub RC4ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RC4ToolStripMenuItem.Click
        RC4.MdiParent = Me
        RC4.Show()
    End Sub

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

    Private Sub MenuStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles MenuStrip1.ItemClicked

    End Sub

    Private Sub KeluarToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem1.Click
        End
    End Sub
End Class


Public Class Caeser_Chiper

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim jumlah As Double = Len(Plainteks.Text)
        Dim x As String
        Dim xkalimat As String = ""
        Dim i As Double
        Dim bil As Integer
        For i = 1 To jumlah
            x = Mid(Plainteks.Text, i, 1)
            bil = Asc(x) + 3
            x = Chr(bil)
            xkalimat = xkalimat + x
        Next i
        Chiperteks.Text = xkalimat
    End Sub

    Private Sub Deskripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Deskripsi.Click
        Dim jumlah As Double = Len(Chiperteks.Text)
        Dim x As String
        Dim xkalimat As String = ""
        Dim i As Double
        Dim bil As Integer
        For i = 1 To jumlah
            x = Mid(Chiperteks.Text, i, 1)
            bil = Asc(x) - 3
            x = Chr(bil)
            xkalimat = xkalimat + x
        Next i
        Plainteks.Text = xkalimat
    End Sub

End Class

HASILNYA :

2. GRONSFIELD

  CODINGNYA : 

Public Class Menu_Utama

    Private Sub CaesarChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaesarChiperToolStripMenuItem.Click
        Caeser_Chiper.MdiParent = Me
        Caeser_Chiper.Show()
    End Sub

    Private Sub GronsfeldChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GronsfeldChiperToolStripMenuItem.Click
        Grondfeld_Chiper.MdiParent = Me
        Grondfeld_Chiper.Show()
    End Sub

    Private Sub VernamChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VernamChiperToolStripMenuItem.Click
        Vernam_Chiper.MdiParent = Me
        Vernam_Chiper.Show()
    End Sub

    Private Sub VigenereChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VigenereChiperToolStripMenuItem.Click
        Vegenere_Chiper.MdiParent = Me
        Vegenere_Chiper.Show()
    End Sub

    Private Sub DesChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DesChiperToolStripMenuItem.Click
        Des_Chiper.MdiParent = Me
        Des_Chiper.Show()
    End Sub

    Private Sub RC4ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RC4ToolStripMenuItem.Click
        RC4.MdiParent = Me
        RC4.Show()
    End Sub

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

    Private Sub MenuStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles MenuStrip1.ItemClicked

    End Sub

    Private Sub KeluarToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem1.Click
        End
    End Sub
End Class

HASILNYA :


3.  VERNAM CHIPER
     CODINGNYA :

Public Class Vernam_Chiper 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.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 = Plainteks.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
        Chiperteks.Text = sPlain
    End Sub

    Private Sub Vernam_Chiper_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plainteks.Text = ""
        Kunci.Text = ""
        Chiperteks.Text = ""
    End Sub


    Private Sub Plainteks_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Plainteks.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

End Class

HASILNYA :


4. VEGENERE CHIPER
     CODINGNYA

Public Class Vegenere_Chiper

    Private Sub Vegenere_Chiper_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plaintext.Text = ""
        Chipertext.Text = ""
        Kunci.Text = ""
    End Sub

    Private Sub Enkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enkripsi.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)) + 0
            nKunci = Asc(Mid(sKey, J, 1)) + 0
            nEnc = ((nKata + nKunci) Mod 256)
            sPlain = sPlain & Chr((nEnc))
        Next i
        Chipertext.Text = sPlain
    End Sub

End Class

HASILNYA



5. DES CHIPER

CODINGNYA

Public Class Des_Chiper

    Private Sub Enkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enkripsi.Click
        'Dim key As String, kunciChar As String, katabaru As String
        Dim Pos As Long
        Dim i As Long, Side1 As String, Side2 As String
        Dim nEnc As Long
        Dim j As Integer
        Pos = 1
        For i = 1 To Len(Plaintext.Text)
            Plaintext.Text = Mid(Plaintext.Text, i, 1)
            kunci.Text = Mid(kunci.Text, Pos, 1)
            Chipertext.Text = Chipertext.Text & Chr(Asc(Plaintext.Text)) Or Asc(Kunci.Text)
            If Pos = Len(kunci) Then Pos = 0
            Pos = Pos + 1
        Next i
        j = Len(Chipertext.Text) Mod 2 = 0
        If j Then
            Side1 = Strings.Left(Chipertext.Text, (Len(Chipertext.Text) / 2))
            Side2 = Strings.Right(Chipertext.Text, (Len(Chipertext.Text) / 2))
            Chipertext.Text = Side1 & Side2
        End If
        nEnc = Chipertext.Text
    End Sub

    Private Sub Des_Chiper_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plaintext.Text = ""
        Chipertext.Text = ""
    End Sub
End Class

HASILNYA




6. RC4

CODINGNYA

Public Class RC4

    Private Sub RC4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Plaintext.Text = ""
        Chipertext.Text = ""
        Kunci.Text = ""
    End Sub

    Private Function Rc4(ByVal message As String, ByVal password As String) As String
        Dim s = Enumerable.Range(0, 256).ToArray
        Dim i, j As Integer
        For i = 0 To s.Length - 1
            j = (j + Asc(password(i Mod password.Length)) + s(i)) And 255
            Dim temp = s(i)
            s(i) = s(j)
            s(j) = temp
        Next
        i = 0
        j = 0
        Dim sb As New System.Text.StringBuilder(message.Length)
        For Each c As Char In message
            i = (i + 1) And 255
            j = (j + s(i)) And 255
            Dim temp = s(i)
            s(i) = s(j)
            s(j) = temp
            sb.Append(Chr(s((s(i) + s(j)) And 255) Xor Asc(c)))
        Next
        Return sb.ToString
    End Function

    Private Sub Enkripsi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enkripsi.Click
        Chipertext.Text = Rc4(Plaintext.Text, Kunci.Text)
    End Sub
End Class

HASILNYA

luvne.com resepkuekeringku.com desainrumahnya.com yayasanbabysitterku.com