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];

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

private void Form1_Load(object sender, EventArgs e) {

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

LAMPIRAN A LISTING PROGRAM

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

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

LAMPIRAN A : LISTING PROGRAM

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

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

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

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

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

Listing Progam. Universitas Sumatera Utara

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

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

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

LAMPIRAN A : LISTING PROGRAM

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

Lampiran 2 MASTER TABEL

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

LAMPIRAN LISTING PROGRAM

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

Computer measurement and control

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

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

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

Photoshop Mac Tutorial Cs5 Pdf Bahasa Indonesia Lengkap

Skinning Manual v1.0. Skinning Example

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];

CALCULATOR APPLICATION

INFORMATION SYSTEM OF LIBRARY AT PONDOK PESANTREN DARUL IHSAN MUHAMMADIYAH SRAGEN

Object oriented lab /second year / review/lecturer: yasmin maki

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

CS 61B Discussion Quiz 1. Questions

Recursive definition: A definition that is defined in terms of itself. Recursive method: a method that calls itself (directly or indirectly).

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

Answer on Question# Programming, C#

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

1 de :02

Analysis of System Requirements of Go-Edu Indonesia Application as a Media to Order Teaching Services and Education in Indonesia

C = E(p) = (p + k) mod (n) p = D(C) = (C k) mod (n)

Tutorial Macromedia Dreamweaver 8 Pdf Bahasa Indonesia

Discovering Computers Living in a Digital World

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

Ebook Tutorial Powerpoint 2010 Bahasa Indonesia

LAMPIRAN A LISTINGPROGRAM

CS 455 Midterm Exam 1 Spring 2013 [Bono] Feb. 21, 2013

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Visual C#.net examples

CS115 INTRODUCTION TO COMPUTER SCIENCE 1. Additional Notes Module 5

CSCE 110 Dr. Amr Goneid Exercise Sheet (7): Exercises on Recursion

PDF / BASIC FOR PHOTOSHOP CS3 USERS MANUAL DOCUMENT

Chapter 13: Handling Events

Unit 10: Sorting/Searching/Recursion

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

Ms Word 2003 For Dummies Trial 2007 Converter

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.

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

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

Manual Tutorial De Corel Draw X5 Pdf Portugues

Team project 2017 Dony Pratidana S. Hum Bima Agus Setyawan S. IIP

Instructions for writing Web Services using Microsoft.NET:

Recursion. Tracing Method Calls via a Stack. Beyond this lecture...

LAPTOP MOTHERBOARD SERVICE MANUAL PDF

Recursion: Factorial (1) Recursion. Recursion: Principle. Recursion: Factorial (2) Recall the formal definition of calculating the n factorial:

There are some situations in which recursion can be massively inefficient. For example, the standard Fibonacci recursion Fib(n) = Fib(n-1) + Fib(n-2)

The Observation of Bahasa Indonesia Official Computer Terms Implementation in Scientific Publication

C# Continued. Learning Objectives:

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

Recap: Hash Tables. Recap : Open hash. Recap: Illustration of ChainedHash. Key features. Key components. Probing strategies.

CS 31 Discussion 1A, Week 4. Zengwen Yuan (zyuan [at] cs.ucla.edu) Humanities A65, Friday 10:00 11:50 a.m.

9/16/14. Overview references to sections in text RECURSION. What does generic mean? A little about generics used in A3

CS 163/164 Exam 2 Review

Industrial Programming

Recursion. EECS2030: Advanced Object Oriented Programming Fall 2017 CHEN-WEI WANG

Lecture 6 CS2110 Spring 2013 RECURSION

Lecture 7 CS2110 Fall 2014 RECURSION

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

Data Structures And Algorithms

Lecture 13. Call Stacks & Debugging

Déclaration du module

Fall 2005 CS 11 Final exam Answers

CS 101 Exam 1 Spring 200 Id Name

Access 2007 For Dummies Full Version With Key Cnet

privateint m, n, smithitemcount, raitaitemcount;

CS 163/164 Exam 2 Review

Kemudahan makmal. Bilangan ruang. 9 Studio Audio Video Animasi Makmal Grafik dan Animasi Makmal Teknologi Web 1 31

Practice test for midterm 1

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

C# winforms gridview

Computers, Variables and Types. Engineering 1D04, Teaching Session 2

belajar html5 158E7F2D743EA866244C3EE391F064DC Belajar Html5 1 / 6

Dynamic Programming. See p of the text

A-1 LISTING PROGRAM. Halaman Koneksi. Universitas Sumatera Utara

LISTING PROGRAM. com.example.jessicatamara.myapplication4;

INSTRUCTION: This section consists of FOUR (4) questions. Answer ALL questions. ARAHAN: Bahagian ini mengandungi EMPAT (4) soalan. Jawab SEMUA soalan.

Notes: 1. The module is not protected against ESD, avoid potential difference between yourself and the module before use.

Multimedia. If the user is working on a spreadsheet, he or she may start typing numbers and performing calculations.

Dictionary of Prabumulih Language-Based Android Murdianto, Leon Andretti Abdillah, Febriyanti Panjaitan

Transcription:

A-1 A LISTING PROGRAM 1. Fibonacci Code //membuat fungsi Fibonacci Code public static String GetFibonacciCode(int n) { StringBuilder fib = new StringBuilder("1"); int a, b, c; List<int> fibs = new List<int>(); if (n >= 1) { a = 1; b = 1; c = a + b; fibs.add(b); while (n >= c) { fibs.add(c); 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]; fib.insert(0, "1"); else fib.insert(0, "0"); return fib.tostring(); //memanggil fungsi Fibonacci Code void Button1Click(object sender, EventArgs e) { String kalimat = richtextbox1.text; Stopwatch watch = new Stopwatch(); // running time watch.start(); ClassFibonacci.Fibonacci(kalimat); String stb = ClassFibonacci.StringToStb(kalimat,ClassFibonacci.cs,ClassFibon acci.fc); String code = ClassFibonacci.Encode(stb); watch.stop();

A-2 B SaveFileDialog simpan = new SaveFileDialog(); simpan.filter = "Compressed Files( *.fib) *.fib"; simpan.filename = "*.fib"; if (simpan.showdialog() == DialogResult.OK) { FileStream fstream=new FileStream(simpan.FileName,FileMode.OpenOrCreate); StreamWriter sw = new StreamWriter(fstream); SeekOrigin seekorigin = new SeekOrigin(); sw.basestream.seek(0, seekorigin); sw.write(code); sw.flush(); sw.close(); string filenamee=simpan.filename.substring(0,si mpan.filename.length- 4) + "f.dat"; FileStream fstreamm=new FileStream(filenamee,FileMode.OpenOrCreate); StreamWriter sww = new StreamWriter(fstreamm); SeekOrigin seekoriginn = new SeekOrigin(); sww.basestream.seek(0, seekoriginn); sww.write(classfibonacci.cs+"~"); for (int n = 0; n < ClassFibonacci.cs.Length; n++) sww.write(classfibonacci.fc[n]+"~"); sww.flush(); sww.close(); MessageBox.Show("file berhasil dikompresi"); double RC = (kalimat.length* 8 * 1.0) / stb.length; textbox5.text = Math.Round(RC,2).ToString(); double CR = (stb.length/(kalimat.length* 8 * 1.0))*100; textbox4.text =Math.Round(CR,2).ToString()+" %"; double redu = 100-CR; textbox8.text = Math.Round(redu,2).ToString()+" %"; textbox6.text = Math.Round(Convert.ToDecimal(watch.ElapsedMilliseconds)/1000,4).ToString()+" ms";

C A-3 2. Elias Gamma Code //membuat fungsi Elias Gamma Code public static void InvertedEliasGammaCodes(String st) { int[] freq = CountFreq(st); String charset = GetCharSet(st); int t = charset.length; InsertionSort(freq, charset); freq = fr; charset = cs; egc = new String[t]; iegc = new String[t]; int c = 0; int ic = 0; for (int n = 1; n < t + 1; n++) { String b = DecToBin(n); int M = b.length; StringBuilder u = new StringBuilder(); for (int k = 0; k < M - 1; k++) u.append("0"); u.append("1"); StringBuilder s1 = new StringBuilder(); for (int j = 0; j < M; j++) { s1.append(b[j]); s1.append(u[j]); String s2 = s1.tostring(); String s = s2.substring(1, s2.length - 1); egc[c++] = s; StringBuilder s3 = new StringBuilder(); for (int j = 0; j < s.length; j++) { if (s[j] == '0') s3.append("1"); else s3.append("0"); iegc[ic++] = s3.tostring(); //memanggil fungsi Elias Gamma Code void Btn_dekomClick(object sender, EventArgs e) { Stopwatch watch = new Stopwatch(); watch.start(); String dc = ClassEliasGamma.Decode(code); String ds = ClassEliasGamma.Decompress(dc, cs, iegc); richtextbox1.text = ds;

D A-4 watch.stop(); textbox6.text = Math.Round(Convert.ToDecimal(watch.ElapsedMilliseconds)/1000,4).ToString()+"ms";

B B-1 CURRICULUM VITAE 1. Biodata Nama : Sari Rahmadani Siregar Alamat Sekarang : Jln. Dr. Mansyur Gg. Saudara No. 14 Medan Alamat Orang Tua : Jln. Cendana III No. 01 Padang Sidempuan Telp/ Hp : 085275451323 Email : sarirahmadanisiregar@gmail.com 2. Riwayat Pendidikan 2012 2016 : S1 Ilmu Komputer, Medan 2009 2012 : SMA Negeri 3 Padang Sidempuan 2006 2009 : SMP Negeri 5 Padang Sidempuan 2000 2006 : SD Negeri 200515 Padang Sidempuan 3. Keahlian Bahasa Pemrograman Database Design Perkantoran : Indonesia, Inggris : C#, MATLAB : MySql : Photoshop, Corel Draw : Microsoft Office 4. Kursus yang diikuti 2007-2009 : Les Bahasa Inggris di Sentika English Course 5. Pengalaman Organisasi [2008 2009] : Sekretaris OSIS SMP Negeri 5 Padang Sidempuan [20010 2011] : Skeretaris OSIS SMA Negerei 3 Padang Sidempuan [2012 2016] : Anggota IMAKOPASID

3 B-2 6. Seminar [2013] : Seminar Internasional Forum Bisnis ( MIBEX 2013) [2014] : Seminar Nasional Literasi Informasi SENARAI [2015] : Seminar Sosialisasi Toward ASEAN Community 2015: ASEAN Goes to Campus