Skip to content

Instantly share code, notes, and snippets.

View dulimarta's full-sized avatar

Hans Dulimarta dulimarta

  • School of Computing and Information Systems, Grand Valley State University
  • Grand Rapids, Michigan
View GitHub Profile
@dulimarta
dulimarta / ScramblerTester.java
Last active January 29, 2016 15:25
ScramblerTester.java
package cis163.text_scrambler.test;
import cis163.text_scrambler.GVList;
import cis163.text_scrambler.Scrambler;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import java.util.Random;
@dulimarta
dulimarta / STGUI.java
Created November 13, 2015 07:11
GUI files for ScrambledText Part B
package cis163.text_scrambler.ui;
import cis163.text_scrambler.GVList;
import cis163.text_scrambler.Scrambler;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
@dulimarta
dulimarta / icpc2345-nc.cpp
Created November 17, 2015 18:09
CS263 HW07 Sample Files
//
// Created by Hans Dulimarta
//
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
@dulimarta
dulimarta / lab01_a.c
Last active January 29, 2016 15:35
CS452 Lab01 - Sample 1
#include <stdio.h>
#include <math.h>
int main() {
double num = 0.0;
printf ("Hello, world.\n");
num = pow (2, 28);
printf ("You are the %f person to write this program!\n", num);
return 0;
}
@dulimarta
dulimarta / lab01_b.c
Last active January 19, 2023 03:37
CS452 Lab01 - Sample 2
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 16
int main()
{
char *data1, *data2;
int k;
@dulimarta
dulimarta / lab01_c.c
Last active January 29, 2016 15:34
CS452 Lab01 - Sample 3
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 16
int main () {
char *data1, *data2, *tmp;
int k;
data1 = malloc (SIZE);
@dulimarta
dulimarta / lab01_d.c
Last active January 29, 2016 15:33
CS452 Lab01 - Sample 4
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 16
int main () {
char *data1;
data1 = malloc (SIZE);
@dulimarta
dulimarta / lab02_a.c
Last active January 29, 2016 15:33
CS452 Lab02 - Sample 1
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
puts("Before fork");
fork();
puts("After fork");
return 0;
@dulimarta
dulimarta / lab02_b.c
Last active January 15, 2020 04:47
CS452 Lab02 - Sample 2
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int i, limit;
if (argc < 2) {
@dulimarta
dulimarta / lab02_c.c
Last active January 18, 2018 14:28
CS452 Lab02 - Sample 3
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
int main()
{
// use these variables