LAMPIRAN A LISTING PROGRAM

Similar documents
LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i];

LAMPIRAN A : LISTING PROGRAM

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr.

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); }

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara

Lampiran 2 MASTER TABEL

A-1 LAMPIRAN A LISTING PROGRAM. Kode Program Form Main: Universitas Sumatera Utara

LAMPIRAN A : LISTING PROGRAM

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this.

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia;

Listing Progam. Universitas Sumatera Utara

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. //

The Implementation of Alert System for LAN Network Monitoring Using the Dude Based

LISTING PROGRAM. com.example.jessicatamara.myapplication4;

LAMPIRAN A LISTINGPROGRAM

INFORMATION SYSTEM OF LIBRARY AT PONDOK PESANTREN DARUL IHSAN MUHAMMADIYAH SRAGEN

An Implementation of RC4 + Algorithm and Zig-zag Algorithm in a Super Encryption Scheme for Text Security

SEBARAN MATAKULIAH PROGRAM STUDI SARJANA TEKNIK SIPIL (S1) DI JURUSAN TEKNIK SIPIL UNIVERSITAS LAMPUNG

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

LAMPIRAN. Universitas Sumatera Utara

Cosine Similarity Measurement for Indonesian Publication Recommender System

Determination of the Winner of Project Tender Using Analytical Hierarchy Process

Australian Journal of Basic and Applied Sciences. Generalized Models for Internet Pricing Scheme under Multi Class QoS Networks

LAMPIRAN. Private Sub FrmSkinDetect_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load IndikatorHandle(False) End Sub

Functions. Arash Rafiey. September 26, 2017

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

Comparative Analysis of Sequitur Algorithm with Adaptive Huffman Coding Algorithm on Text File Compression with Exponential Method

CS16 Exam #1 7/17/ Minutes 100 Points total

LAMPIRAN LISTING PROGRAM

LISTING PROGRAM. 1. Tampilan Awal. 2. Menu Login. Public Class Awal

Nearby Search Indekos Based Android Using A Star (A*) Algorithm

C++ Programming: From Problem Analysis to Program Design, Third Edition

CURRICULUM VITAE. Address : Kp. Jeprah Rt 01/11 No. 72 Jonggol Bogor Jawa Barat, Indonesia

5. What is a block statement? A block statement is a segment of code between {}.

CSC 1351 The Twelve Hour Exam From Hell

Listing Program. private void exittoolstripmenuitem_click(object sender, EventArgs e) { Application.Exit(); }

Jurnal Ilmiah Komputer dan Informatika (KOMPUTA) 1 Edisi...Volume..., Bulan 20..ISSN :

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

Le L c e t c ur u e e 3 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Control Statements

Constant-time programming in C

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

A comparative study of Message Digest 5(MD5) and SHA256 algorithm

Pengenalan Sistem Maklumat Dalam Pendidikan

I. True/False: (2 points each)

Question 1: public class BlankKarel extends SuperKarel { public void run() { while (frontisclear()) { walkarow(); move(); } walkarow(); // fencepost }

DAFTAR ISI. ABSTRAK... Error! Bookmark not defined. ABSTRACT... Error! Bookmark not defined. KATA PENGANTAR... Error! Bookmark not defined.

LAMPIRAN 1 PENGARUH KETERSEDIAAN KOLEKSI PERPUSTAKAAN TERHADAP MINAT BACA SISWA SMP NEGERI 30 MEDAN

Lampiran A. SOURCE CODE PROGRAM

C Sc 127A Practice Test 2 SL Name 150pts

DUKE UNIVERSITY Department of Computer Science. Test 1: CompSci 100

It is a constructor and is called using the new statement, for example, MyStuff m = new MyStuff();

LAMPIRAN. Lampiran 1. Identitas Petani Cabai Merah di Desa Wukirsari Tahun 2017

PROGRAMMING FUNDAMENTALS

Decision Making and Loops

Lexical Structure (Chapter 3, JLS)

Tasks for fmri-setting (Tasks of first and second pilot study at the end)

LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a.

CSC Java Programming, Fall Java Data Types and Control Constructs

Implementation of Dynamic Time Warping Method for the Vehicle Number License Recognition

3. Java - Language Constructs I

Unit 1: Binary and Java Input and Output. Sample Test (Inquiry) Name : Totals: /70 (!c), /9 (c), /79 (!c&&c)

Language Reference Manual

Visit us at

WEBSITE DESIGN RESEARCH AND COMMUNITY SERVICE INSTITUTE IN BINA DARMA UNIVERSITY

Instructor: SIR MUHAMMAD NAVEED Created by: ARSLAN AHMED SHAAD ( ) MUHAMMAD BILAL ( ) ISIT:

FORM 1 (Please put your name and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each):

5. Assuming gooddata is a Boolean variable, the following two tests are logically equivalent. if (gooddata == false) if (!

Computer Science II Fall 2009

robotics/ openel.h File Reference Macros Macro Definition Documentation Typedefs Functions

PLDI 2016 Tutorial Automata-Based String Analysis

Chapter 6 Single-dimensional Arrays

LAMPIRAN. public class PengajuanDana extends javax.swing.jinternalframe { Connection conn = null; ResultSet rs = null; PreparedStatement ps = null;

Objectives. Chapter 4: Control Structures I (Selection) Objectives (cont d.) Control Structures. Control Structures (cont d.) Relational Operators

CS 163/164 Exam 2 Review

Exam Appendix --- Java Quick Reference Accessible methods from the Java library that may be included on the exam

Improving the accuracy of k-nearest neighbor using local mean based and distance weight

#include <iostream> #include <algorithm> #include <cmath> using namespace std; int f1(int x, int y) { return (double)(x/y); }

Chapter 4 Expression & Operators

Sequence structure. The computer executes java statements one after the other in the order in which they are written. Total = total +grade;

Application Marketing Strategy Search Engine Optimization (SEO)

KARTU BIMBINGAN TUGAS AKHIR MAHASISWA PEMBAHASAN PADA ASISTENSI MENGENAI, PADA BAB

Chapter 4: Control Structures I (Selection) Objectives. Objectives (cont d.) Control Structures. Control Structures (cont d.

CS111: PROGRAMMING LANGUAGE II

SPRING 13 CS 0007 FINAL EXAM V2 (Roberts) Your Name: A pt each. B pt each. C pt each. D or 2 pts each

Lecture 02 C FUNDAMENTALS

Development of Sistem Informasi Pendataan Warga (Sitawar) for the Realization of Integrated Population Data at RT Level With RW

Week 4 Selection Structures. UniMAP Sem II-11/12 DKT121 Basic Computer Programming 1

Following is the general form of a typical decision making structure found in most of the programming languages:

1. Code Trace: 2. Program Logic (0.5 each) X <= y y > z x == 1 A S N S N S A A N S S S S A S POINT A POINT B POINT C POINT D POINT E

Journal of Physics: Conference Series PAPER OPEN ACCESS. To cite this article: B E Zaiwani et al 2018 J. Phys.: Conf. Ser.

SCJ2013 Data Structure & Algorithms. Bubble Sort. Nor Bahiah Hj Ahmad & Dayang Norhayati A. Jawawi

RTL Reference 1. JVM. 2. Lexical Conventions

DAFTAR LAMPIRAN. Source Code Java Aplikasi Keyword to Image Renamer Split

Tutorial 11. Exercise 1: CSC111 Computer Programming I. A. Write a code snippet to define the following arrays:

Flow of Control. Flow of control The order in which statements are executed. Transfer of control

Transcription:

A-1 LAMPIRAN A LISTING PROGRAM FUNGSI public void StopWatchStart() stopwatch.reset(); stopwatch.start(); Cursor.Current = Cursors.WaitCursor; txtlog.text = ""; public void StopWatchStop(string Title) stopwatch.stop(); lblwaktu.text = Title; txtwaktu.text = stopwatch.elapsed.tostring(); Cursor.Current = Cursors.Arrow; public string tobiner(int desimal, int digit) string biner = ""; string buf = ""; int hasilbagi = desimal; int p, sisa; while (hasilbagi > 1) if (hasilbagi % 2 == 1) hasilbagi -= 1; hasilbagi = hasilbagi / 2; biner = "1" + biner; else hasilbagi = hasilbagi / 2; biner = "0" + biner; biner = hasilbagi + biner; p = biner.length / 8; sisa = biner.length % 8; if (sisa!= 0) p += 1; if (biner.length < (p * 8)) for (int i = 1; i <= (p * 8) - biner.length; i++) buf += "0"; if (digit > 0) //biner = buf + biner;

A-2 int len = biner.count(); if (digit > len) for (int i = 0; i < digit - len; i++) biner = "0" + biner; return biner; public int todecimal(string biner) int result = 0; int num = 0; for (int i = 1; i <= biner.length; i++) num = biner[i - 1] - 48; result += Convert.ToInt16(Math.Pow(2, biner.length - i)) * num; return result; KARAKTER SET public string BuatKarakterSet(String Teks) String R = ""; Boolean Yes; for (int i = 0; i < Teks.Length; i++) Yes = false; for (int j = 0; j < R.Length; j++) if (Teks[i] == R[j]) Yes = true; break; if (Yes == false) R += Teks[i]; return R; // Hitung Frekuensi Karakter public List<clsUnary> HitungFreqKarakter(String PT, String KS) List<clsUnary> R = new List<clsUnary>(); int Freq; for (int j = 0; j < KS.Length; j++) Freq = 0; for (int i = 0; i < PT.Length; i++)

A-3 if (KS[j] == PT[i]) Freq += 1; R.Add(new clsunary(ks[j], Freq)); return R; public List<clsUnary> UrutkanKS(List<clsUnary> L, char Arah) char Kar; int Freq; if (Arah == 'A') for (int j = 0; j < L.Count - 1; j++) for (int i = j + 1; i < L.Count; i++) if (L[j].Freq > L[i].Freq) Kar = L[j].Kar; Freq = L[j].Freq; L[j].Kar = L[i].Kar; L[j].Freq = L[i].Freq; L[i].Kar = Kar; L[i].Freq = Freq; else if (Arah == 'Z') for (int j = 0; j < L.Count - 1; j++) for (int i = j + 1; i < L.Count; i++) if (L[j].Freq < L[i].Freq) Kar = L[j].Kar; Freq = L[j].Freq; L[j].Kar = L[i].Kar; L[j].Freq = L[i].Freq; L[i].Kar = Kar; L[i].Freq = Freq; return L; public List<clsUnary> BuatKode(List<clsUnary> L) string temp; for (int j = 0; j < L.Count; j++) temp = ""; for (int i = 0; i < j; i++) temp += "1"; temp += "0"; L[j].Kode = temp;

A-4 return L; public List<clsUnary> BuatKodeDelta(List<clsUnary> L) string temp; int N, S; for (int j = 0; j < L.Count; j++) temp = ""; temp += tobiner(j + 1, 0); L[j].Kode = temp.remove(0, 1); N = temp.length; L[j].Kode = tobiner(n, 0) + L[j].Kode; S = tobiner(n, 0).Length - 1; for (int i = 0; i < S; i++) L[j].Kode = "0" + L[j].Kode; return L; KOMPRESI public void Kompres() int Pad; Log = ""; CB = new List<string>(); CT = ""; CTB = ""; JlhBit_CT = 0; UN = HitungFreqKarakter(PT, KS); UN = UrutkanKS(UN, 'Z'); if (rdbelias.checked) UN = BuatKodeDelta(UN); else if (rdbunary.checked) UN = BuatKode(UN); for (int j = 0; j < PT.Count(); j++) for (int i = 0; i < UN.Count(); i++) if (PT[j] == UN[i].Kar) CB.Add(UN[i].Kode); break;

A-5 // Buat Compressed Binary for (int i = 0; i < CB.Count(); i++) CTB += CB[i]; JlhBit_CT += CB[i].Count(); JlhKarCB = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(JlhBit_CT) / 8)); // Buat Compressed Text string b = ""; b = CTB.Substring((JlhKarCB - 1) * 8, JlhBit_CT - ((JlhKarCB - 1) * 8)); int x = b.length; Pad = 8 - x; for (int i = 0; i < Pad; i++) CTB += '1'; CBytes = new byte[jlhkarcb + 1]; for (int i = 0; i < JlhKarCB; i++) b = CTB.Substring(i * 8, 8); CT += Convert.ToChar(toDecimal(b)); CBytes[i] = Convert.ToByte(toDecimal(b)); CT += Convert.ToChar(Pad + 48); CTB += tobiner(pad + 48, 8); // Simpan ke Array Byt for (int i = 0; i < CT.Count(); i++) CBytes[i] = Convert.ToByte(CT[i]); // Cetak Hasil for (int i = 0; i < UN.Count; i++) Log += UN[i].Kar + "\t" + UN[i].Freq + "\t" + UN[i].Kode + "\n"; RC = Convert.ToDouble(CTB.Count() / 8) / Convert.ToDouble(PjgTeks); RC = Convert.ToDouble(String.Format("0:0.0000", RC)); CR = Convert.ToDouble(CTB.Count() / 8) / Convert.ToDouble(PjgTeks) * 100; CR = Convert.ToDouble(String.Format("0:0.00", CR)); Red = Convert.ToDouble(PjgTeks - (CTB.Count() / 8)) / Convert.ToDouble(PjgTeks) * 100; Red = Convert.ToDouble(String.Format("0:0.00", Red)); txtpad.text = Pad.ToString(); txtctb.text = CTB; txtct.text = CT; txtjlhbit_ct.text = CTB.Count().ToString(); txtjlhkar_ct.text = (CTB.Count() / 8).ToString(); txtrc.text = RC.ToString(); txtcr.text = CR.ToString() + " %"; txtred.text = Red.ToString() + " %"; txtlog.text = Log;

A-6 DEKOMPRESI public string CT_ke_CTB() CT = txtct.text.trim(); // Substring(0, txtct.text.length); CTB = ""; TambahBit = Convert.ToInt16(CT[CT.Count() - 1]) - 48 ; for (int i = 0; i < CT.Count() - 1; i++) CTB += tobiner(convert.toint16(ct[i]), 8); if (TambahBit > 0) CTB = CTB.Remove(CTB.Length - TambahBit, TambahBit); return CTB; public void Dekompres(List<clsUnary> Tabel, string CTB) String Hasil = ""; Log = ""; if (rdbelias.checked) //CTB = txtctb.text; string S = ""; string KT; char Kar = 'A'; int TC = 0; int Index = 0; Boolean Ketemu; for (int i = 0; i < CTB.Count(); i++) S += CTB[i]; TC++; Ketemu = false; for (int j = 0; j < Tabel.Count(); j++) try if (S == Tabel[j].Kode.Substring(0, TC)) KT = S; Kar = Tabel[j].Kar; Log += "Bit " + Index + " ke " + (Index + TC - 1) + " = " + KT + "\n"; Ketemu = true; break; catch

A-7 if (Ketemu == false) Hasil += Kar; S = ""; TC = 0; Index = i; i--; Log += "========================= Karakter : " + Kar + "\n\n"; Log += "======================= Karakter : " + Kar + "\n"; Hasil += Kar; else if (rdbunary.checked) //CTB = txtctb.text; string S = ""; char Kar = 'A'; int TC = 0; for (int i = 0; i < CTB.Count(); i++) S += CTB[i]; if (CTB[i] == '0') for (int j = 0 ; j < Tabel.Count(); j++) if (S == Tabel[j].Kode) Kar = Tabel[j].Kar; Hasil += Kar; break; TC++; Log += "Deretan Bit ke " + i + "\t: " + S + "\n" + "===================== Karakter : " + Kar + "\n"; S = ""; JlhBit_PT = (Hasil.Count() * 8); JlhBit_CT = Convert.ToInt16(txtJlhBit_CT.Text); PjgTeks = Hasil.Count(); CR = Convert.ToDouble(JlhBit_CT / 8) / Convert.ToDouble(PjgTeks) * 100; CR = Convert.ToDouble(String.Format("0:0.00", CR)); Red = Convert.ToDouble(PjgTeks - (JlhBit_CT / 8)) / Convert.ToDouble(PjgTeks) * 100; Red = Convert.ToDouble(String.Format("0:0.00", Red)); txtcr.text = CR.ToString() + " %"; txtred.text = Red.ToString() + " %"; txtpad.text = TambahBit.ToString(); txtpt.text = Hasil; txtjlhkar_pt.text = PjgTeks.ToString(); txtjlhbit_pt.text = JlhBit_PT.ToString(); txtctb.text = CTB; txtlog.text = Log;

B-1 CURRICULUM VITAE Data Pribadi Nama : Julita Sinaga Tempat/Tanggal Lahir : Lumban Sinaga / 17 Juli 1992 Tinggi/Berat Badan : 154 cm / 48 kg Agama : Kristen Kewarganegaraan : Indonesia Alamat Sekarang : Jl. Kepodang 1 No.183 Perumnas Mandala Telp/ Hp : 0812 6455 2304 Email : sinagajulita17@gmail.com -------------------------------------------------------------------------------------------------------- ---- Riwayat Pendidikan 2013 2017 : S1 Extensi Ilmu Komputer 2010 2013 : D3 Teknik Informatika 2007 2010 : SMA Katolik Budi Murni 1 Medan 2004 2007 : SMP Negeri 2 Pangaribuan, Tapanuli Utara 1998 2004 : SD Negeri 173194 Pangaribuan, Tapanuli Utara -------------------------------------------------------------------------------------------------------- ---- Pengalaman Organisasi 2011 :Panitia Natal Jurusan D3-Teknik Informatika dan S-1 Teknologi Informasi USU. 2013 :Panitia Konser Tahunan Paduan Suara Consolatio USU ke-24 sebagai Anggota seksi dana 2017 :Panitia Kompetisi Consolatio Goes To Marktoberdorf, Jerman sebagai Ketua seksi dana -------------------------------------------------------------------------------------------------------- ---- Seminar dan Pelatihan 2014 : Seminar Nasional Literasi Informasi SENARAI 2012 : Training Webmater di Webmedia Training Center