This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################### | |
# Seafile server backup script (cold sqlite backup) | |
# Author: Nils Kuhnert | |
# Last change: 2014-07-27 | |
# Website: 3c7.me | |
############################### | |
# Variables | |
DATE=`date +%F` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 08.04.2015. | |
*/ | |
public class Frau extends Person { | |
public String chromosomen = "XX"; | |
public static int anzahl = 0; | |
public Frau(String n, int a, int g, int kg) { | |
super(n, a, g, kg); | |
anzahl++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 13.04.2015. | |
*/ | |
public abstract class Koerper implements Skalierbar { | |
// Bezugspunkt | |
public Punkt p; | |
public void verschiebe(double dx, double dy, double dz) { | |
this.p = new Punkt(p.x + dx, p.y + dy, p.z + dz); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 14.04.2015. | |
*/ | |
public class Abs implements Funktion { | |
public boolean istDefiniertFuer(double x) { | |
return true; | |
} | |
public double wert(double x) { | |
if (this.istDefiniertFuer(x)) return Math.abs(x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 13.04.2015. | |
*/ | |
public abstract class Koerper implements Skalierbar { | |
// Bezugspunkt | |
public Punkt p; | |
public void verschiebe(double dx, double dy, double dz) { | |
this.p = new Punkt(p.x + dx, p.y + dy, p.z + dz); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 21.04.2015. | |
*/ | |
public class AbgeschlosseneAuswertung { | |
public static Double auswertung(Funktion f, double x) { | |
Double result; | |
try { | |
result = new Double(f.wert(x)); | |
} catch (ValueOutOfRangeException e){ | |
return null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public class FileCopy { | |
public static void main(String[] args) throws IOException { | |
try { | |
FileInputStream fis = new FileInputStream(args[0]); | |
FileOutputStream fos = new FileOutputStream(args[1]); | |
int c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 13.04.2015. | |
*/ | |
public abstract class Koerper implements Skalierbar { | |
// Bezugspunkt, geschachtelte Klasse | |
public Koerper.Punkt p; | |
public void verschiebe(double dx, double dy, double dz) { | |
this.p = new Punkt(p.x + dx, p.y + dy, p.z + dz); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nils on 28.04.2015. | |
*/ | |
public class Feld<T> { | |
private T[] feld; | |
public Feld(int anzahl) { | |
@SuppressWarnings("unchecked") | |
T[] f = (T[])new Object[anzahl]; | |
feld = f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.NoSuchElementException; | |
/** | |
* Created by Nils on 28.04.2015. | |
*/ | |
public class Feld<T> implements Iterable<T> { | |
private T[] feld; | |
@SuppressWarnings("unchecked") | |
public Feld(int anzahl) { |
OlderNewer