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 / TextPredictor.cpp
Last active January 29, 2016 15:28
TextPredictor.cpp
//
// Created by Hans Dulimarta
//
#include <iostream>
#include "TextPredictor.h"
using namespace std;
TextPredictor::TextPredictor() {
@dulimarta
dulimarta / DelayedProgressDialog.java
Last active January 29, 2016 15:30
DelayedProgressDialog.java
/**
*
*/
package com.appiarium.example;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Handler;
/**
@dulimarta
dulimarta / lab02_d.c
Last active January 29, 2016 15:32
CS452 Lab02 - Sample 4
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
if (argc < 2) {
fputs("Usage: must supply a command\n", stderr);
exit(1);
@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 / 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 / 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_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 / lab04_c.c
Created February 3, 2016 16:15
CS452 Lab04 - Sample 3
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
void *do_greeting3(void *arg);
//arguments:arg is an untyped pointer pointing to a character
// returns:a pointer to NULL
@dulimarta
dulimarta / arith_tester.cpp
Last active February 4, 2016 03:11
CS452 Program02 Files
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "gvpm.h"
#include "gv_eval.h"
/* In unit testing evaluate() must be invoked in immediate mode */
TEST_CASE ("SingleOperator", "alloperators") {
float res;
@dulimarta
dulimarta / RandomNameApi.java
Created February 9, 2016 19:13
CS163 Lab - RandomNameApi
package edu.gvsu.cis.dulimarh.recyclerdemo;
import com.squareup.okhttp.OkHttpClient;
import retrofit.RestAdapter;
import retrofit.client.OkClient;
/**
* Created by Hans Dulimarta
*/