Skip to content

Instantly share code, notes, and snippets.

@d630
d630 / Webseite.java
Created April 23, 2018 17:49
Playing with HashMaps
// good read: http://www.novixys.com/blog/java-hashmap-examples/
//package webseite;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
package article;
public class Article {
private int artikelID;
private int artikelPreis;
private int verkaufsmenge;
public Article(int[] a) {
this.artikelID = a[0];
@d630
d630 / Angestellter.java
Last active April 26, 2018 17:39
personalverwaltung
package personalverwaltung;
public class Angestellter extends Mitarbeiter {
private float gehalt;
//
// -- constructors --
//
@d630
d630 / cluster.md
Last active May 19, 2018 05:41
cluster (pandoc markdown)

title: 'Report: Computer cluster implementation in MPI "Alfred Eckstein"' author: various toc: false date: \today lang: en-US otherlangs: de-DE papersize: a4paper fontsize: 12pt documentclass: article

@d630
d630 / 1_1_1.c
Last active May 24, 2018 16:29
Übungen C
#include <stdio.h>
int main(void)
{
int s;
int g = 0;
puts("Anzahl Schrauben? ");
scanf("%d", &s);
g += s*7;
@d630
d630 / automat.c
Last active May 24, 2018 16:31
Getränkeding
#include <stdio.h>
#include <stdlib.h>
#define LEN(arr) ((int) (sizeof(arr) / sizeof(arr)[0]))
#define PREIS_TO_INT(arr, adr, row) ((int) strtol(arr[row][1], adr, 10))
#define NAME 0
#define PREIS 1
static const char *getraenk[][2] = {
{ "Cola", "120" },
@d630
d630 / articles.c
Last active May 29, 2018 14:43
C: struct, w/r into/from file, compare
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define DEBUG 0
#define MAX_ENT 2
#define MAX_LEN 80
#define FILE_ART "articles.txt"
#define DELIM "|"
@d630
d630 / p.c
Last active May 31, 2018 04:20
Some pointer stuff
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct person {
char nname[20];
char vname[20];
};
int main()
@d630
d630 / bubble.c
Last active May 29, 2018 17:53
Bubble sort
#include <stdio.h>
#include <stdlib.h>
void
bubble_sort (int *arr, int len)
{
int tmp;
for (int i = len - 1; i >= 0; i--)
for (int j = 0; j < i; j++)