test blog
Blog for various testing purposes.
Blog for various testing purposes.
Nov 26th
using System;
using System.Collections;
namespace ConsoleApplication1 {
class Program {
static ArrayList generateShiftTable(string needle) {
ArrayList shiftTable = new ArrayList();
for (int i = 0; i < 27; i++) {
shiftTable.Add(needle.Length);
}
// KINGMICKEY
// E = 1 K = 2 C = 3 I = 4 dst
// E= needle[needle.length - 2] , 3 , 4 , dst
// convert E to ascii - 65 = 4
// array ke 4 = 1.
// array ke 10 = 2
// array ke 2 = 3 dst
for (int i = 1; i < needle.Length; i++) {
Int32 temp = More > Sep 23rd
UPDATE : versi 0.2
// sote.c
// deteksi spasi ganda
// by Erius, 2009
// ver 0.2
// functionality:
// - input sebanyak jumlah karakter yang ditentukan sebelumnya.
// - menghitung jumlah jeda dan banyak karakter spasi per jeda.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#define FALLBACK 254
int deteksi_spasi (char *string) {
int i = 0;
int j = 0;
while (string[i] != '\0' && i < FALLBACK) {
i++;
}
int num_char = i; // jumlah karakter yang actually diinput
int spasi = 0; // penghitungan spasi per jeda
// jeda kan ada banyak dalam sebuah kalimat. More > Mar 10th
This post is password protected. To view it please enter your password below:
Feb 14th
Feb 13th
Opensuse.org is owned by Batman
Now we know that IRL Batman works at Novell Corporation instead of Wayne Corporation.And he works at Provo, UT, not Gotham City.
Jan 28th
#include <iostream>
using namespace std;
class motor {
public:
motor () {
cout<<"Motor"<<endl;
}
void namaku () {
cout<<"Motor"<<endl;
}
};
class yamaha : public motor {
public:
yamaha () {
cout<<"Yamaha"<<endl;
}
void namaku () {
cout<<"yamaha"<<endl;
}
};
class suzuki : public motor {
public:
suzuki () {
cout<<"suzuki"<<endl;
}
void namaku () {
cout<<"suzuki"<<endl;
}
};
class jupiter : public yamaha {
public:
jupiter () {
cout<<"jupiter"<<endl;
}
void namaku () {
cout<<"jupiter"<<endl;
}
};
class shogun : public suzuki {
public:
shogun () {
cout<<"shogun"<<endl;
}
void namaku () {
cout<<"shogun"<<endl;
}
};
int main () More > Jan 27th
Cpp code for various file operations, including deleting file contents
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <string>
using namespace std;
ifstream infile;
ofstream errorlog;
int tulis (int mode) {
infile.close();
ofstream outfile;
if (mode == 1) {
outfile.open("into.dat",ios::app);
} else {
outfile.open("into.dat",ios::out);
}
cout<<"Silakan masukkan nim, nama, jurusan, ipk"<<endl;
cout<<"Tekan ctrl z utk selesai" << endl;
char nim[20];
char nama[30];
char jurusan[30];
double ipk;
while (cin>>nim>>nama>>jurusan>>ipk) {
outfile<<nim<<' '<<nama<<' '<<jurusan<<' '<<ipk<<endl;
cout<<"> ";
}
cin.clear();
infile.open("into.dat",ios::in);
return 1;
}
int search () {
infile.seekg(0,ios::beg);
char nim[20];
char nama[30];
char jurusan[30];
double ipk;
int match;
cout<<"Search berdasarkan:";
cout<<"1. nim"<<endl<<"2.nama"<<endl<<"3.jurusan"<<endl<<"4.ipk"<<endl; More > Jan 17th
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!