This file contains hidden or 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
| 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 |
This file contains hidden or 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
| Algorithmus SetCoverGreedy(S): | |
| ergebnis <- {} | |
| for i in S do | |
| if i \ ergebnis != {} then | |
| ergebnis <- ergebnis u i | |
| return ergebnis |
This file contains hidden or 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
| 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 |
This file contains hidden or 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 statistics | |
| def avg(): | |
| daten = [] | |
| ergebnis = 0 | |
| while True: | |
| if daten: | |
| ergebnis = statistics.mean(daten) | |
| temp = yield ergebnis | |
| daten.append(temp) |
This file contains hidden or 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
| 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: |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| def next_tuple(): | |
| pass | |
| def is_prime(i): | |
| pass | |
| def summenliste(): | |
| ergebnis = [] | |
| moegliche_primzahl = 0 | |
| while not is_prime(moegliche_primzahl): |