Skip to content

Instantly share code, notes, and snippets.

View KingKevin23's full-sized avatar
💭
being the King

KingKevin23

💭
being the King
View GitHub Profile
@KingKevin23
KingKevin23 / openjdk-12-pi-3-guide.txt
Created March 29, 2021 14:37 — forked from NotAlexNoyle/openjdk-12-pi-3-guide.txt
A step-by-step tutorial on installing OpenJDK 12 on a Raspberry Pi 3 running Raspbian
Do you use your Raspberry Pi 3 to develop Java applications using OpenJDK? You may have noticed that the latest version available on the default apt repositories is OpenJDK 9. This is because the armhf architecture is underserved by the Oracle open source community. Luckilly, you can build and run the latest version (OpenJDK 12.x) on your device. It will just take some time, given the minimal power of the Pi 3's CPU.
The first step is to boot into raspbian and launch the shell.
Next, we are going to create 1GB of swap space for the build.
Get the 'pv' package:
> sudo apt-get install pv
@KingKevin23
KingKevin23 / aufgabe6_1.txt
Last active July 31, 2020 20:55
u steht für die Vereinigung, n für den Schnitt
Algorithmus SetCoverGreedy(S):
ergebnis <- {}
for i in S do
if i \ ergebnis != {} then
ergebnis <- ergebnis u i
return ergebnis
def t(n):
if n == 1:
return 1
else:
return 8 * t(n/2) + n**2
def f(n, k):
summe = 8**k
for j in range(k):
summe += 8**j * (n / (2**j))**2
import statistics
def avg():
daten = []
ergebnis = 0
while True:
if daten:
ergebnis = statistics.mean(daten)
temp = yield ergebnis
daten.append(temp)
class BinaryTree:
def __init__(self, key, value):
self.key = key
self.value = value
self.left = None
self.right = None
def add(self, key, value):
if self.key > key:
def interpolate(f):
def _interpolate(x):
try:
ergebnis = f(x)
except TypeError:
ergebnis = f(int(x)) + (x - int(x)) * f(int(x) + 1)
return ergebnis
return _interpolate
def next_tuple():
pass
def is_prime(i):
pass
def summenliste():
ergebnis = []
moegliche_primzahl = 0
while not is_prime(moegliche_primzahl):