Compare commits

...

38 Commits

Author SHA1 Message Date
Jan Meyer
ac0d7ee068 vault backup: 2026-08-04 13:31:58 2026-08-04 13:31:58 +02:00
Jan Meyer
16e1078562 vault backup: 2026-08-04 13:28:26 2026-08-04 13:28:26 +02:00
Jan Meyer
4cb2c7897e vault backup: 2026-08-04 13:12:55 2026-08-04 13:12:55 +02:00
Jan Meyer
a4a23f2ed3 vault backup: 2026-08-04 13:00:19 2026-08-04 13:00:19 +02:00
Jan Meyer
7432f09be9 chore: add maths6 2026-06-05 16:56:37 +02:00
Jan Meyer
d91ccb84b9 vault backup: 2026-05-31 17:54:10 2026-06-05 16:56:37 +02:00
Jan Meyer
676f7689e0 vault backup: 2026-05-31 17:51:59 2026-06-05 16:56:37 +02:00
Jan Meyer
e94aff9ca5 vault backup: 2026-05-31 17:48:53 2026-06-05 16:56:37 +02:00
Jan Meyer
fd7ddd83ec vault backup: 2026-05-19 13:14:00 2026-05-26 11:30:08 +02:00
Jan Meyer
e1051991a2 vault backup: 2026-04-23 22:39:23 2026-05-26 11:29:48 +02:00
Jan Meyer
a9dc077e73 chore: update OOP 2026-05-18 22:11:28 +02:00
Jan Meyer
35d545c527 vault backup: 2026-04-28 14:27:40 2026-04-28 14:27:40 +02:00
Jan Meyer
4bee68e6c4 vault backup: 2026-04-28 13:50:38 2026-04-28 13:50:38 +02:00
Jan Meyer
02fb38fdda vault backup: 2026-04-28 10:14:29 2026-04-28 10:14:29 +02:00
Jan Meyer
88a52d6bfc vault backup: 2026-04-28 10:06:25 2026-04-28 10:06:26 +02:00
Jan Meyer
0e99eb925b vault backup: 2026-04-28 10:01:01 2026-04-28 10:01:01 +02:00
Jan Meyer
9e152bc038 vault backup: 2026-04-25 21:26:09 2026-04-25 21:26:09 +02:00
Jan Meyer
83c21f6f49 vault backup: 2026-04-25 20:57:51 2026-04-25 20:57:51 +02:00
Jan Meyer
651843dbef vault backup: 2026-04-25 20:57:48 2026-04-25 20:57:48 +02:00
Jan Meyer
9f253ce482 chore: add oop submodule 2026-04-25 20:57:27 +02:00
Jan Meyer
8be8525c02 chore: remove oop lecture on windows 2026-04-25 20:57:01 +02:00
Jan Meyer
707ab68523 Merge remote-tracking branch 'origin/master' 2026-04-25 18:04:42 +02:00
Jan Meyer
8609ff2517 vault backup: 2026-04-25 18:04:39 2026-04-25 18:04:39 +02:00
Jan Meyer
89253c8488 vault backup: 2026-04-21 13:31:23 2026-04-21 13:31:23 +02:00
Jan Meyer
fc216494d4 vault backup: 2026-04-21 13:21:48 2026-04-21 13:29:16 +02:00
Jan Meyer
ba1fe02294 vault backup: 2026-04-21 13:19:44 2026-04-21 13:29:16 +02:00
Jan Meyer
207e858bce vault backup: 2026-04-21 12:51:47 2026-04-21 13:29:16 +02:00
Jan Meyer
00a1be0c96 vault backup: 2026-04-17 15:44:53 2026-04-21 13:29:16 +02:00
Jan Meyer
537d5a1b52 vault backup: 2026-04-17 14:48:01 2026-04-21 13:29:16 +02:00
Jan Meyer
ef3f56ecf6 vault backup: 2026-04-17 14:41:07 2026-04-21 13:29:16 +02:00
Jan Meyer
d393a1d8f3 vault backup: 2026-04-17 14:39:23 2026-04-21 13:29:16 +02:00
Jan Meyer
be522c693a vault backup: 2026-04-17 14:37:30 2026-04-21 13:29:16 +02:00
Jan Meyer
e9ce177940 vault backup: 2026-04-17 14:35:37 2026-04-21 13:29:16 +02:00
Jan Meyer
1646724403 vault backup: 2026-04-17 12:34:18 2026-04-21 13:28:47 +02:00
Jan Meyer
3421d8160d vault backup: 2026-04-19 23:08:40 2026-04-19 23:08:40 +02:00
Jan Meyer
c1b7ba4561 vault backup: 2026-04-19 23:04:59 2026-04-19 23:04:59 +02:00
Jan Meyer
436b9099a6 vault backup: 2026-04-19 23:02:46 2026-04-19 23:02:46 +02:00
Jan Meyer
f7bb320dd2 vault backup: 2026-04-19 22:58:25 2026-04-19 22:58:25 +02:00
56 changed files with 15689 additions and 22 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "40 Extras/OOP/die_einen_da"]
path = 40 Extras/OOP/die_einen_da
url = git@collaborating.tuhh.de:e-24/courses/oop/exo/2026/g08/die_einen_da.git

2
.obsidian/app.json vendored
View File

@@ -9,7 +9,5 @@
"downscalePercent": 100
},
"promptDelete": false,
"newFileLocation": "folder",
"newFileFolderPath": "00 Inbox",
"showUnsupportedFiles": true
}

View File

@@ -0,0 +1,27 @@
---
created: 2026-04-21 13:18
course: "[[29592673 - Elektrotechnik II]]"
topic:
related:
type: lecture
status: 🔴
tags:
- university
---
## 📌 Summary
> [!abstract]
>
---
## 📝 Content
## Komplexer Momentanwert
$i(t) = hat(i) e^(j(omega t + phi)) = hat(i) cos(omega t + phi) + j hat(i) sin(omega t + phi)$
=> $i(t) = "Im"{i(t)}$
## Komplexe Kontenregel
$sum_"Knoten" "Im"{underline(i)(t)} = 0$
=> $"Im" { sum_"Knoten" underline(i)(t) } = 0$

View File

@@ -0,0 +1,45 @@
---
created: 2026-04-28 14:25
course:
topic:
related:
type: lecture
status: 🔴
tags:
- university
---
## 📌 Summary
> [!abstract]
>
---
## 📝 Content
A containment hierarchy of classes of formal grammars. Grammars are classified into four types with different limitations.
### Type 0
no restrictions
### Type 1
Each rule $sans(w)_1 -> sans(w_2)$ satisfies $sans(abs(w_1) <= abs(w_2))$ with the exception that $sans(S) -> epsilon$ is allowed if $sans(S)$ does not occur on any right hand side of rules.
$sans(abs(w_1) <= abs(w_2))$ implies that no shortening rules are allowed.
### Type 2 (context free)
Same restriction as [[#Type 1|type 1]] and additionally for each rule $sans(w_1 -> w_2)$ the string $sans(w_1)$ contains only a single variable (i.e. $sans(w_1 in V)$)
### Type 3 (regular)
Same restriction as [[#Type 2|type 2]] and additionally $sans(w_2 in Sigma union Sigma V)$), i.e. the right hand side is either a single terminal symbol or a terminal symbol followed by a variable.
> [!REMARK]
> The order of the variable and the terminal symbol is chosen arbitrarily.
> Important is just that within a regular grammar only a single order occurs. If for all rules $sans(w_2 in Sigma union V Sigma)$ it would also be a regular grammar.
## Definition
A language $sans(L subset Sigma^*)$ is said to be of type 0 (1,2,3) if there exist a type 0 (1,2,3) grammar $sans(G)$ for which $sans(L(G) = L)$.
> [!REMARK]
> In order to show that a language is op type 0 (1,2,3) one thus just has to find a corresponding grammar.
> In order to show that a grammar is not of type 0 (1,2,3) one has to prove that no type 0 (1,2,3) grammar can exist generating the corresponding language.

3
00 Inbox/Untitled 1.base Normal file
View File

@@ -0,0 +1,3 @@
views:
- type: table
name: Table

View File

@@ -0,0 +1,18 @@
---
created: 2026-04-28 10:02
course:
topic:
related:
type: lecture
status: 🔴
tags:
- university
---
## 📌 Summary
> [!abstract]
>
---
## 📝 Content

View File

@@ -0,0 +1,18 @@
---
created: 2026-04-28 10:02
course:
topic:
related:
type: lecture
status: 🔴
tags:
- university
---
## 📌 Summary
> [!abstract]
>
---
## 📝 Content

View File

@@ -1,6 +1,6 @@
## Asymptotic Equivalence Classes (Big-O)
The equivalence relation definition given in the task is asking you to find functions that grow at the exact same rate (also known as Big-Theta $\Theta$):
The equivalence relation definition given in the task is asking you to find functions that grow at the exact same rate (also known as Big-Theta $Theta$):
$f asymp g <==> f in O(g) and g in O(f)$
@@ -29,8 +29,7 @@ Result is the last $"Remainder"$ that is not $0$.
**Goal:** find a $x$ and $y$ so that $"Divident" * x + "Divisor" * y = gcd("Dividend", "Divisor")$
1. **Rewrite Euclid (above) equations** to solve for remainder ($"Remainder" = "Old Remainder" - "Dividend" * "Divisor"$)
2. **Substitute remainders** -> $$
2. **Substitute remainders** ->
## Inclusion-Exclusion Principle
Principle that dictates that when combining / overlapping sets, you have to make sure to not include elements that occur in multiple sets multiple times.
@@ -54,6 +53,7 @@ $$
& 4^10 = 1,048,576 \
& => 3 "numbers that are both" x^2 "and" x^5 "exist"
$$
#### Final calculation:
Formula: $"Elements that are" x^2 + "Elements that are" x^5 - "Elements that are both"$
$==> 1,000 + 15 - 3 = 1,012$

View File

@@ -23,7 +23,7 @@ A word (or _string_) is a finite sequence $w = a_1 a_2 ... a_n$ if characters fr
> We will use small letters to describe strings that are part of a language.
> [!EXAMPLE]
> $"aa", "ab", "bba"$ and $"baab"$ are strings over $Sigma = {a, b}.
> $"aa", "ab", "bba"$ and $"baab"$ are strings over $Sigma = {a, b}$.
#### Length of a string
The _length_ $abs(x)$ of a string $x = a_1 ... a_n$ is its number $abs(x) = n$ of characters.

View File

@@ -0,0 +1,45 @@
---
created: 2026-04-28 14:25
course:
topic:
related:
type: lecture
status: 🔴
tags:
- university
---
## 📌 Summary
> [!abstract]
>
---
## 📝 Content
A containment hierarchy of classes of formal grammars. Grammars are classified into four types with different limitations.
### Type 0
no restrictions
### Type 1
Each rule $sans(w)_1 -> sans(w_2)$ satisfies $sans(abs(w_1) <= abs(w_2))$ with the exception that $sans(S) -> epsilon$ is allowed if $sans(S)$ does not occur on any right hand side of rules.
$sans(abs(w_1) <= abs(w_2))$ implies that no shortening rules are allowed.
### Type 2 (context free)
Same restriction as [[#Type 1|type 1]] and additionally for each rule $sans(w_1 -> w_2)$ the string $sans(w_1)$ contains only a single variable (i.e. $sans(w_1 in V)$)
### Type 3 (regular)
Same restriction as [[#Type 2|type 2]] and additionally $sans(w_2 in Sigma union Sigma V)$), i.e. the right hand side is either a single terminal symbol or a terminal symbol followed by a variable.
> [!REMARK]
> The order of the variable and the terminal symbol is chosen arbitrarily.
> Important is just that within a regular grammar only a single order occurs. If for all rules $sans(w_2 in Sigma union V Sigma)$ it would also be a regular grammar.
## Definition
A language $sans(L subset Sigma^*)$ is said to be of type 0 (1,2,3) if there exist a type 0 (1,2,3) grammar $sans(G)$ for which $sans(L(G) = L)$.
> [!REMARK]
> In order to show that a language is op type 0 (1,2,3) one thus just has to find a corresponding grammar.
> In order to show that a grammar is not of type 0 (1,2,3) one has to prove that no type 0 (1,2,3) grammar can exist generating the corresponding language.

View File

@@ -0,0 +1,40 @@
---
created: 2026-04-09 11:34
course: "[[29595454 - Mathematik II]]"
topic: komplexe Zahlen, Eigenwert
related:
type: lecture
status: 🔴
tags:
- university
---
## 📌 Summary
> [!abstract]
>
---
## 📝 Content
## Imaginäre Einheit
Die imaginäre Einheit $i$ ist definiert über $i^2 = -1$.
## Menge der komplexen Zahlen
Die Elemente der menge $CC := {x + i y : x, y in RR}$ nennt man _komplexe Zahlen_.
## Komplexe Zahlen
Zu einer komplexen Zahl $z = x + i y in CC$ mit $x, y in RR$ heißt
- $"Re" z := x$ _Realteil_ von $z$
- $"Im" z := y$ _Imaginärteil_ von $z$
- $overline(z) := x - i y$ die _konjugiert komplexe Zahl_ zu $z$
- $abs(z) := sqrt(x^2 + y^2)$ der _Betrag_ von $z$
- $phi in [0, 2pi]$ _Argument_ oder _Phase_ von $z$
### Operationen
#### Addition
Die Addition wird (komponentenweise) wie für Vektoren definiert:
$a = vec(x, y), b = vec(x_2, y_2)$
#### Multiplikation

Binary file not shown.

View File

@@ -1,15 +1,33 @@
#let assignment_header(course, index) = {
set page(
#set page(
header: align(right, [
#set text(size: 9pt)
#set par(leading: .3em)
#pad(y: -.5cm, [
#course \
Hausaufgabe #index \
Mathe II \
Hausaufgabe 01 \
Jan Meyer \
664237
])
])
)
}
#assignment_header("Mathe II", 1)
== Problem 1 _Stammfunktionen_
a) $ &integral x^2 exp(x^3) d x = 1/3 exp(x^3) + C $
b)
$ &integral ln(x^2)/x^2 d x = -(2 ln(x) + 2)/x + C $
c)
$ &integral 1/2 (sin(2x) + 1) d x = 1/4 (-cos(2x) + 2x) + C $
== Problem 2 _Integrale und Stammfuntionen_
a)
$ &integral (2x^2 - 3x + 4) / x d x = x^2 - 3x + 4 ln abs(x) + C $
b)
$ &integral (2 cos(x)) / (1 + sin(x)) d x = 2 ln abs(1 + sin(x)) + C $
c)
$ &integral exp(2x) sqrt(1 + exp(2x)) d x = 1/3(1 + exp(2x))^(3/2) + C $

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,74 @@
#set page(
header: align(right, [
#set text(size: 9pt)
#set par(leading: .3em)
#pad(y: -.5cm, [
Mathe II \
Hausaufgabe 02 \
Jan Meyer \
664237
])
])
)
== Problem 1: Integration rationaler Funktionen
=== (a) $f(x) = (x + 2) / (x^3 - 3x^2 - x + 3)$
Faktorisierung des Nenners:
$ x^3 - 3x^2 - x + 3 = (x - 1)(x + 1)(x - 3) $
Partialbruchzerlegung:
$ (x + 2) / ((x - 1)(x + 1)(x - 3)) = A / (x - 1) + B / (x + 1) + C / (x - 3) $
$ A = -3/4, B = 1/8, C = 5/8 $
Stammfunktion:
$ F(x) = -3/4 ln|x - 1| + 1/8 ln|x + 1| + 5/8 ln|x - 3| + C $
---
=== (b) $f(x) = x^6 / (x^4 + 3x^2 + 2)$
Polynomdivision:
$ x^6 / (x^4 + 3x^2 + 2) = x^2 - 3 + (7x^2 + 6) / ((x^2 + 1)(x^2 + 2)) $
Partialbruchzerlegung des Restes:
$ (7x^2 + 6) / ((x^2 + 1)(x^2 + 2)) = 8 / (x^2 + 2) - 1 / (x^2 + 1) $
Stammfunktion:
$ F(x) = 1/3 x^3 - 3x - arctan(x) + 4 sqrt(2) arctan(x / sqrt(2)) + C $
#pagebreak()
== Problem 3: Eigenwerte
=== (a) Berechnung der Eigenwerte
#let id = "I"
#let det = "det"
==== (i) $A_1 = mat(3, -1, 0; 3, -1, 0; 4, -1, -2)$
Charakteristisches Polynom (Entwicklung nach der 3. Spalte):
$ p(lambda) = (-2-lambda) det mat(3-lambda, -1; 3, -1-lambda) $
$ p(lambda) = (-2-lambda) (lambda^2 - 2lambda) = -lambda(lambda - 2)(lambda + 2) $
*Eigenwerte:* $lambda_1 = 0, lambda_2 = 2, lambda_3 = -2$
==== (ii) $A_2 = mat(1, 0, -1; 1, 0, 2; 1, 0, 1)$
Charakteristisches Polynom (Entwicklung nach der 2. Spalte):
$ p(lambda) = (-lambda) det mat(1-lambda, -1; 1, 1-lambda) $
$ p(lambda) = -lambda (lambda^2 - 2lambda + 2) $
Nullstellen via $p q$-Formel: $lambda = 1 plus.minus sqrt(-1)$
*Eigenwerte:* $lambda_1 = 0, lambda_2 = 1 + i, lambda_3 = 1 - i$
---
=== (b) Beweis: Eigenwerte von $A B$ und $B A$
Sei $lambda != 0$ ein Eigenwert von $A B$. Dann existiert ein Eigenvektor $v != 0$, sodass:
$ (A B) v = lambda v $
Multiplikation von links mit $B$:
$ B(A B v) = B(lambda v) $
$ (B A)(B v) = lambda (B v) $
Da $lambda != 0$ und $v != 0$, ist $B v != 0$.
Somit ist $B v$ ein Eigenvektor von $B A$ zum Eigenwert $lambda$. $square$

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
#set page(
header: align(right, [
#set text(size: 9pt)
#set par(leading: .3em)
#pad(y: -.5cm, [
Mathe II \
Hausaufgabe 02 \
Jan Meyer \
664237
])
])
)
= Problem 2
== (a)
$f_n (x) = (sin(n x) + n) / (3n + 1) = (sin(n x) / n + 1) / (3 + 1/n)$
Da $lim_(n -> oo) sin(n x) / n = 0$, ist der punktweise Grenzwert:
$f(x) = lim_(n -> oo) f_n (x) = (0 + 1) / (3 + 0) = 1/3$
== (b)
Zu zeigen: $f_n (x) = (n x) / (n x^2 + 1)$ konvergiert auf $[r, 1)$ mit $r > 0$ gleichmäßig gegen $f(x) = 1/x$.
$|f_n (x) - f(x)| = |(n x) / (n x^2 + 1) - 1/x| = |(n x^2 - (n x^2 + 1)) / (x(n x^2 + 1))| = 1 / (n x^3 + x)$
Da $x >= r > 0$, gilt $n x^3 + x > n r^3$. Daraus folgt für das Supremum:
$sup_(x in [r, 1)) |f_n (x) - f(x)| <= 1 / (n r^3)$
Wegen $lim_(n -> oo) 1 / (n r^3) = 0$ konvergiert die Funktionenfolge gleichmäßig.
= Problem 3
Sei $cal(E) = (bold(m)_0, bold(m)_1)$ die Standardbasis. Die Basiswechselmatrizen von $cal(B)$ und $cal(C)$ in $cal(E)$ sind:
$M_cal(B) = mat(3, 2; 3, 1), quad M_cal(C) = mat(4, 1; 0, 1)$
Der Koordinatenvektor von $bold(p) = bold(m)_0 + bold(m)_1$ in $cal(E)$ ist $bold(p)^cal(E) = vec(1, 1)$.
== (a)
$bold(p)^cal(B) = M_cal(B)^(-1) bold(p)^cal(E) = 1/(3-6) mat(1, -2; -3, 3) vec(1, 1) = mat(-1/3, 2/3; 1, -1) vec(1, 1) = vec(1/3, 0)$
== (b)
$T_(cal(C) <- cal(B)) = M_cal(C)^(-1) M_cal(B) = 1/4 mat(1, -1; 0, 4) mat(3, 2; 3, 1) = mat(1/4, -1/4; 0, 1) mat(3, 2; 3, 1) = mat(0, 1/4; 3, 1)$
$T_(cal(B) <- cal(C)) = (T_(cal(C) <- cal(B)))^(-1) = 1/(0 - 3/4) mat(1, -1/4; -3, 0) = -4/3 mat(1, -1/4; -3, 0) = mat(-4/3, 1/3; 4, 0)$
== (c)
$bold(p)^cal(C) = T_(cal(C) <- cal(B)) bold(p)^cal(B) = mat(0, 1/4; 3, 1) vec(1/3, 0) = vec(0, 1)$

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
#set page(header: align(right, [
#set text(size: 9pt)
#set par(leading: .3em)
#pad(y: -.5cm, [
Mathe II \
Hausaufgabe 07 \
Jan Meyer \
664237
])
]))
= Problem 1
== (a)
Punktweiser Grenzwert für $x in (0, oo)$:
$ f(x) = lim_(n -> oo) n / (1 + n x) = lim_(n -> oo) 1 / (1/n + x) = 1/x $
== (b)
Zu prüfen ist, ob $lim_(n -> oo) sup_(x in RR) |f_n (x) - f(x)| = 0$ gilt.
Die Differenz lautet:
$ |f_n (x) - f(x)| = |(x^2 + n^2 x)/n^2 - x| = x^2/n^2 $
Das Supremum auf ganz $RR$ ist für jedes $n$ unendlich:
$ sup_(x in RR) x^2/n^2 = oo $
Die Konvergenz ist somit nicht gleichmäßig.
= Problem 4
== (a)
$A$ ist symmetrisch ($A^T = A$). Für die positive Definitheit prüfen wir die Hauptminoren nach Sylvester:
- $D_1 = 1 > 0$
- $D_2 = det mat(1, 0; 0, 1) = 1 > 0$
- $D_3 = 1 dot (5 - 4) = 1 > 0$
- $D_4 = 3 dot D_3 = 3 > 0$
Da alle Hauptminoren positiv sind, ist $A$ positiv definit und definiert ein Skalarprodukt.
== (b)
Ansatz für die Projektion $p$: $p = X c$ mit $X = (u_1, u_2)$ und $c = vec(c_1, c_2)$.
Normalengleichung: $X^T A X c = X^T A v$.
Berechnung der Gramschen Matrix $X^T A X$:
$ X^T A X = mat(u_1^T A u_1, u_1^T A u_2; u_2^T A u_1, u_2^T A u_2) = mat(4, 1; 1, 2) $
Berechnung der rechten Seite $X^T A v$:
$ A v = mat(1, 0, 0, 0; 0, 1, -2, 0; 0, -2, 5, 0; 0, 0, 0, 3) mat(2; 2; 2; 2) = mat(2; -2; 6; 6) $
$ X^T A v = mat(u_1^T A v; u_2^T A v) = mat(8; 0) $
Lösen des LGS:
$ mat(4, 1; 1, 2) mat(c_1; c_2) = mat(8; 0) $
Aus der 2. Zeile folgt $c_1 = -2 c_2$. Eingesetzt in die 1. Zeile ergibt $4(-2 c_2) + c_2 = 8 <=> -7 c_2 = 8 <=> c_2 = -8/7$. Damit ist $c_1 = 16/7$.
Einsetzen in $p$:
$ p = c_1 u_1 + c_2 u_2 = 16/7 mat(1; 0; 0; 1) - 8/7 mat(1; 1; 0; 0) = mat(8/7; -8/7; 0; 16/7) $

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,6 +1,5 @@
#!/bin/bash
# Check if a filename was provided
if [ -z "$1" ]; then
echo "Usage: $0 <filename>"
exit 1
@@ -8,29 +7,28 @@ fi
TARGET="$1"
# Check if the file actually exists
if [ ! -f "$TARGET" ]; then
echo "Error: File '$TARGET' not found."
exit 1
fi
# Get creation time (%W).
# Note: Returns 0 or '-' if the filesystem doesn't support birth time.
# Extract just the filename (e.g., "Lecture_1.pdf")
# and the directory path (e.g., ".")
FILENAME=$(basename "$TARGET")
DIRNAME=$(dirname "$TARGET")
BTIME=$(stat -c %W "$TARGET")
# Fallback to last modification time (%Y) if birth time is unavailable
if [ "$BTIME" -eq 0 ] || [ "$BTIME" == "-" ]; then
BTIME=$(stat -c %Y "$TARGET")
fi
# Calculate the minute-based timestamp (equivalent to Math.floor(ms / 60000))
# Since stat returns seconds, we divide by 60.
FORMATTED_DATE=$(( BTIME / 60 ))
# Define the new name
NEW_NAME="${FORMATTED_DATE} - ${TARGET}"
# Construct the new name using ONLY the filename,
# then prepend the original directory path
NEW_NAME="${DIRNAME}/${FORMATTED_DATE} - ${FILENAME}"
# Perform the rename
mv "$TARGET" "$NEW_NAME"
echo "Renamed: '$TARGET' -> '$NEW_NAME'"

3
Untitled 1.base Normal file
View File

@@ -0,0 +1,3 @@
views:
- type: table
name: Table

3
Untitled.base Normal file
View File

@@ -0,0 +1,3 @@
views:
- type: table
name: Table