Based on the following guides:
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
/* | |
* Small Snippet to read input from stdin as a sequence to process input in a functional way. | |
*/ | |
fun main() { | |
val lines = generateSequence(::readLine) { | |
readLine() | |
} | |
val avg = lines.takeWhile { it.trim() != "." }.map { it.toInt() }.average() | |
println(avg) | |
} |
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
-- ------------------------------------ | |
-- ALTER TABLE ADD CONSTRAINT | |
-- ------------------------------------ | |
-- ALTER TABLE <table> | |
-- ADD CONSTRAINT <constraintName> <constraint> | |
-- ------------------------------------ | |
CREATE TABLE table_alter_constraint( | |
id INT | |
); |
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
-- ------------------------------------ | |
-- DELETE | |
-- ------------------------------------ | |
DELETE FROM dml_test_table WHERE id = 1; |
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
-- EDB 1 | |
-- Schreiben Sie eine PL/SQL-Funktion mit dem Namen "schaltjahr_check", die, wenn ein übergebenes Jahr ein Schaltjahr ist, den booleschen Wert TRUE zurückgibt und wenn nicht, den Wert FALSE. Schaltjahre mit 366 Tagen sind solche, die durch 400 teilbar sind und außerdem solche, die durch 4, aber nicht durch 100 teilbar sind. Alle anderen Jahre haben 365 Tage. Hinweis: Benutzen Sie die Modulo-Funktion MOD(n,m), die den Rest beim Teilen von n durch m liefert. | |
CREATE OR REPLACE FUNCTION schaltjahr_check( | |
jahr IN NUMBER | |
) RETURN BOOLEAN | |
IS | |
BEGIN | |
IF MOD(JAHR, 400) = 0 OR (MOD(JAHR, 4) = 0 AND MOD(JAHR, 100) != 0) THEN | |
RETURN TRUE; | |
end if; |
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
-- Typ für Maßeinheiten erstellen | |
CREATE OR REPLACE TYPE measurement_unit AS OBJECT ( | |
name VARCHAR2(45), | |
short VARCHAR2(5)) | |
NOT FINAL; | |
-- Subtyp für flüssige Maßeinheiten, Umrechnung in Liter | |
CREATE OR REPLACE TYPE fluid_measurement_unit UNDER measurement_unit( | |
conversion_factor_to_liter NUMBER(20,10) | |
) |
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 { NgModule } from '@angular/core'; | |
import { MAT_AUTOCOMPLETE_SCROLL_STRATEGY } from '@angular/material'; | |
import { Overlay, ScrollStrategy } from '@angular/cdk/overlay'; | |
@NgModule({ | |
declarations: [ | |
[..] | |
], |
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
const parseCell = (cell) => Number(cell.textContent.trim().replace(",", ".")); | |
const grades = Array.from(document.querySelectorAll(".content > table")[1].querySelectorAll("tr")) | |
.filter((tr) => tr.querySelector(".tabelle1_aligncenter")) // No "Groups" | |
.filter((tr) => parseCell(tr.children[5]) > 0) // Only rows where a grade is available | |
.filter((tr) => tr.children[6].textContent.trim() === "BE") // Only passed exams | |
.reduce((acc, curr) => { | |
acc.grades.push(parseCell(curr.children[5])); | |
acc.ects.push(parseCell(curr.children[7])); | |
return acc; | |
}, { grades: [], ects: [] }); |