repo
stringlengths 26
115
| file
stringlengths 54
212
| language
stringclasses 2
values | license
stringclasses 16
values | content
stringlengths 19
1.07M
|
---|---|---|---|---|
https://github.com/Arsenii324/matap-p2 | https://raw.githubusercontent.com/Arsenii324/matap-p2/main/t-repo/lecture1.typ | typst | = Лекция
== Ряды
=== Опр. сходимости ряда
$ limits(sum)_(n=1)^infinity$ $ a_n = a$, $a_n in RR$. $A_k = limits(sum)_(n=1)^k a_n $ - частичная сумма ряда. Тогда ряд сходится, если существует конечный предел частичных сумм:
$limits(sum)_(n=1)^infinity = limits(lim)_(k arrow infinity) A_k = a$.
=== Критерий Коши
$limits(sum)_(n=1)^infinity a_n$ - сх $<=> forall " " epsilon > 0 " " exists
N(epsilon) in NN : forall " " k,m in NN >= N(epsilon) => abs(limits(sum)_(n=k)^(k+m) a_n) < epsilon$.
=== Необходимое условие сходимости ряда
$limits(sum)_(n=k)^(k+m) a_n$ - сх $=> limits(lim)_(n arrow infinity) a_n = 0$
== Операции над рядами
Сложение: $limits(sum)_(n=1)^(infinity) a_n + limits(sum)_(n=1)^(infinity) b_n = limits(sum)_(n=1)^(infinity) a_n + b_n$
Умножение на скаляр: $lambda dot limits(sum)_(n=1)^(infinity) a_n = limits(sum)_(n=1)^(infinity) lambda dot a_n$
=== Группировка без перестановки (группировка)
*Пусть:*\
a) $limits(sum)_(n=1)^(infinity) a_n "- числовой ряд"$\
b) ${K_n}^infinity subset.eq NN : cases(k_1 = 1, k_i < k_(i+1))$\
c)
$limits(sum)_(n=1)^(infinity) b_n = underbrace((a_1 + ... + a_(k_2-1)), b_1) + underbrace((a_(k_2) + ... + a_(k_3 - 1)), b_2) + b_3 + ...$
*Тогда:*\
1) $limits(sum)_(n=1)^(infinity) a_n = a => limits(sum)_(n=1)^(infinity) b_n = a$.\
2) Если $limits(lim)_(n arrow infinity) a_n = 0$, $limits(sum)_(n=1)^(infinity) b_n = b$ и $exists " " m : k_(n+1) - k_n < m " " forall n$ (т.е. группировка не более чем по m слагаемых), то $limits(sum)_(n=1)^(infinity) a_n = b$.
*Proof:*
$arrow.r.double:\
B_N = b_1 + ... + b_N = |"раскрываем" b_i| = a_1 + ... + a_(k_(N+1) - 1) = A_(k_(N+1) - 1) => \
=> {B_N} "подпоследовательность" {A_N} => limits(sum)_(n=1)^(infinity) b_n = a$.
$arrow.l.double:$\
$tilde(a_i) = max{abs(a_(k_i)), ..., abs(a_(k_(i+1)-1))}$\
$A_n = a_1 + ... + a_n$
$exists! " " k_i : n in [k_i, k_(i+1)-1]\
A_n = b_1 + ... + b_(i-1) + a_(k_i) + ... + a_n = B_(i-1) + a_(k_i) + ... + a_n <= B_(i-1) + tilde(a_i) dot m$
$B_(i-1) - tilde(a_i) dot m <= A_n$
При $n arrow infinity => i arrow infinity => tilde(a_i) => 0$.
$B_(i-1) - tilde(a_i) dot m <= A_n <= B_(i-1) + tilde(a_i) dot m =>\
b - 0 dot m <= A_n <= b + 0 dot m => \
A_n arrow b$
_#underline[Замечание:]_
$"Если нет доп. условий, то в обратную сторону неверно. Контрпример:"\
limits(sum)_(n=1)^(infinity) a_n : (1 - 1) + (1 - 1) + (1 - 1) + ...\
limits(sum)_(n=1)^(infinity) b_n : 0 + 0 + 0 +...\
"Ряд" b_n "сходится, а" a_n - "расходится."$
$"Если добавить в условие, что" limits(lim)_(n arrow infinity) a_n = 0, "то всё еще неверно."\
limits(sum)_(n=1)^(infinity) a_n : (1-1) + (1/2 + 1/2 - 1/2 - 1/2) + (1/3+1/3+1/3-1/3-1/3-1/3) + ...\
limits(sum)_(n=1)^(infinity) b_n : 0 + 0 + 0 + ...\
"Ряд" a_n "расходится по Коши." $
== Знакопостоянные ряды
=== Опр. знакоположительный ряд
$limits(sum)_(n=1)^(infinity) a_n," " a_n >= 0 " " forall n$ - знакоположительный ряд.
=== Теорема Лобачевского-Коши
*Пусть:*
a) $a_n >= 0$\
b) $a_n >= a_(n+1)$
*Тогда:*
$limits(sum)_(n=1)^(infinity) a_n "~ по сходимости" limits(sum)_(n=0)^(infinity) 2^n a_(2^n) $
*Proof:*
$a_2 <= a_2 <= a_1$\
$2a_4 <= a_3 + a_4 <= 2a_2$\
$4a_8 <= a_5 + a_6 + a_7 + a_8 <= 4a_4$\
...\
$2^n a_(2^(n+1)) <= a_(2^n + 1) + ... + a_(2^(n+1)) <= 2^n a_(2^n)$
$(S_(n+1) - a_1)/2 <= A_(2^(n+1)) - a_1 <= S_n$
Если исходная сходится, то $(S_(n+1) - a_1)/2$ - неубывающая и ограниченная сверху последовательность $=>$ сходится. Аналогично, если сходится конденсированная, то $A_(2^(n+1)) - a_1$ - неубывающая и ограниченная сверху последовательность $=>$ сходится.
=== Сходимость ряда вида $sum 1/(n^p)$
$limits(sum)_(n=1)^(infinity) 1/(n^p)$, $" "p > 0$
По теореме Лобачевского-Коши исходный ряд эквивалентен:
$limits(sum)_(n=0)^(infinity) 2^n 1/(2^n)^p = limits(sum)_(n=0)^(infinity) (2^(1-p))^n$ - геометрическая прогрессия, где $q = 2^(1-p)$
Тогда ряд сходится $<=> abs(q) < 1$
$2^(1-p) < 1 => p > 1$
=== Ряд Бертрана
$limits(sum)_(n=1)^(infinity) 1/(n^alpha (ln(n))^beta)$ - сходится $<=> cases(alpha > 1, alpha = 1", " beta > 1)$
== Признаки сравнения рядов
=== Первый признак сходимости
*Пусть:*
a) $a_n, b_n >= 0$\
b) $a_n <= b_n$ финально
*Тогда:*
1) $limits(sum)_(n=1)^(infinity) b_n - "сходится" => limits(sum)_(n=1)^(infinity) a_n - "сходится"$
2) $limits(sum)_(n=1)^(infinity) a_n - "расходится" => limits(sum)_(n=1)^(infinity) b_n - "расходится".$
=== Второй признак сходимости
*Пусть:*
a) $a_n, b_n > 0$\
b) $exists " "m, M > 0 : m <= a_n/b_n <= M$ финальною
*Тогда:*
$limits(sum)_(n=1)^(infinity) a_n ~ "по сходимости" limits(sum)_(n=1)^(infinity) b_n$
#underline[_Следствие:_]
$limits(lim)_(n arrow infinity) a_n/b_n = c in (0, infinity) => $
$limits(sum)_(n=1)^(infinity) a_n ~ "по сходимости" limits(sum)_(n=1)^(infinity) b_n$
=== Третий признак сходимости
*Пусть:*
a) $a_n, b_n > 0$
b) $a_(n+1)/a_n <= b_(n+1)/b_n$
*Тогда:*
1) $limits(sum)_(n=1)^(infinity) b_n "- сх" => limits(sum)_(n=1)^(infinity) a_n "- сх"$.
2) $limits(sum)_(n=1)^(infinity) a_n "- расх" => limits(sum)_(n=1)^(infinity) b_n "- расх"$. |
|
https://github.com/LDemetrios/Typst4k | https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/model/link.typ | typst | // Test hyperlinking.
--- link-basic ---
// Link syntax.
https://example.com/
// Link with body.
#link("https://typst.org/")[Some text text text]
// With line break.
This link appears #link("https://google.com/")[in the middle of] a paragraph.
// Certain prefixes are trimmed when using the `link` function.
Contact #link("mailto:<EMAIL>") or
call #link("tel:123") for more information.
--- link-trailing-period ---
// Test that the period is trimmed.
#show link: underline
https://a.b.?q=%10#. \
Wahttp://link \
Nohttps:\//link \
Nohttp\://comment
--- link-bracket-balanced ---
// Verify that brackets are included in links.
https://[::1]:8080/ \
https://example.com/(paren) \
https://example.com/#(((nested))) \
--- link-bracket-unbalanced-closing ---
// Check that unbalanced brackets are not included in links.
#[https://example.com/] \
https://example.com/)
--- link-bracket-unbalanced-opening ---
// Verify that opening brackets without closing brackets throw an error.
// Error: 1-22 automatic links cannot contain unbalanced brackets, use the `link` function instead
https://exam(ple.com/
--- link-show ---
// Styled with underline and color.
#show link: it => underline(text(fill: rgb("283663"), it))
You could also make the
#link("https://html5zombo.com/")[link look way more typical.]
--- link-transformed ---
// Transformed link.
#set page(height: 60pt)
#let mylink = link("https://typst.org/")[LINK]
My cool #box(move(dx: 0.7cm, dy: 0.7cm, rotate(10deg, scale(200%, mylink))))
--- link-on-block ---
// Link containing a block.
#link("https://example.com/", block[
My cool rhino
#box(move(dx: 10pt, image("/assets/images/rhino.png", width: 1cm)))
])
--- link-to-page ---
// Link to page one.
#link((page: 1, x: 10pt, y: 20pt))[Back to the start]
--- link-to-label ---
// Test link to label.
Text <hey>
#link(<hey>)[Go to text.]
--- link-to-label-missing ---
// Error: 2-20 label `<hey>` does not exist in the document
#link(<hey>)[Nope.]
--- link-to-label-duplicate ---
Text <hey>
Text <hey>
// Error: 2-20 label `<hey>` occurs multiple times in the document
#link(<hey>)[Nope.]
|
|
https://github.com/LDemetrios/TypstTuringMachine | https://raw.githubusercontent.com/LDemetrios/TypstTuringMachine/main/turing.typ | typst | #import "@preview/cetz:0.2.2"
#let display-tape(datum) = {
let (tapes, carets, state) = datum
let shifts = datum.at("shifts", default: auto)
let shifts = if shifts != auto { shifts } else {
range(0, tapes.len()).map(it => 0)
}
block(
{
heading(level: 2, h(-2.8em) + text(gray, raw("State: ")) + raw(state))
v(1em)
for ind in range(0, tapes.len()) {
let shift = shifts.at(ind)
let symbols = tapes.at(ind)
let caret-pos = carets.at(ind)
show table.cell.where(x: caret-pos + shift): rect.with(stroke: (x: orange + 0.2em), outset: -0.4em, width: 100%, height: 100%)
pad(left: -1cm * shift, table(
columns: (1cm,) * symbols.len(),
rows: 1cm,
align: center + horizon,
stroke: gray,
..symbols.map(s => if s == "_" {} else { s }),
))
v(-1em)
}
v(2.5em)
},
outset: (x: 4em),
)
}
#let parse-code(cd) = {
let cont = if type(cd) == str {
cd
} else {
cd.text
}
let lines = cont.split("\n")
let rules = (:)
for line in lines {
if line.trim() == "" { continue }
let (left, right) = line.split("->").map(it => it.trim())
let fromstate = left.split(" ").at(0)
let fromsymbols = left.split(" ").slice(1).map(it => it.trim()).filter(it => it != "")
let act = right.split(" ").map(it => it.trim()).filter(it => it != "")
let tostate = act.at(0)
let actions = act.slice(1).chunks(2)
let subdict = rules.at(fromstate, default: (:))
assert.eq(
subdict.at(repr(fromsymbols), default: (:)),
(:),
message: fromstate + " " + fromsymbols.join(),
)
subdict.insert(repr(fromsymbols), (tostate: tostate, actions: actions))
rules.insert(fromstate, subdict)
}
return rules
}
#let to-arr(string) = range(0, string.len()).map(it => string.at(it))
#let run(
initial,
rules,
carets: auto,
shifts: auto,
lim-steps: 100,
starting: "Start",
accepting: "Accept",
rejecting: "Reject",
) = {
let tapes = initial
let state = starting
let carets = if carets != auto { carets } else {
range(0, initial.len()).map(it => 0)
}
let shifts = if shifts != auto { shifts } else {
range(0, initial.len()).map(it => 0)
}
assert.eq(shifts.len(), initial.len())
assert.eq(carets.len(), initial.len())
let data = ((tapes: tapes, carets: carets, state: state, shifts: shifts),)
let n = initial.len();
for step in range(0, lim-steps) {
if state == accepting or state == rejecting { break }
let position = range(0, n).map(it => tapes.at(it).at(carets.at(it) + shifts.at(it)))
let act = rules.at(state, default: (:)).at(repr(position), default: (:))
if act == (:) {
state = none
break
}
let tostate = act.tostate
let actions = act.actions
state = tostate
for i in range(0, n) {
tapes.at(i).at(carets.at(i) + shifts.at(i)) = actions.at(i).at(0)
let move = actions.at(i).at(1)
carets.at(i) += if move == "<" { -1 } else if move == ">" { 1 } else { 0 }
}
for i in range(0, n) {
if carets.at(i) + shifts.at(i) < 0 {
shifts.at(i) += 1
tapes.at(i) = ("_", ..tapes.at(i))
}
if carets.at(i) >= tapes.at(i).len() - shifts.at(i) {
tapes.at(i).push("_")
}
}
data.push((tapes: tapes, carets: carets, state: state, shifts: shifts))
}
return (data, state)
}
#let trace(data, endstate, accepting: "Accept", rejecting: "Reject", break-every:20) = {
let maxshift = calc.max(..data.map(it => calc.max(..it.shifts)))
let maxlen = calc.max(
..data.map(
datum => {
let indices = range(0, datum.tapes.len())
let mapped = indices.map(it => datum.tapes.at(it).len() - datum.shifts.at(it))
calc.max(..mapped)
},
),
)
let ind = 0
for datum in data {
line(length: (maxlen + maxshift) * 1cm, stroke:(paint:gray, dash:"dashed"))
pad(left: maxshift * 1cm, display-tape(datum))
ind += 1
if calc.rem(ind, break-every) == 0 {
pagebreak()
}
}
let res = if endstate == accepting [
ACCEPTED
] else if endstate == rejecting [
REJECTED
] else if endstate == none [
BROKEN
] else [
TIME LIMIT EXCEEDED
]
move(dy:-1em,res)
}
|
|
https://github.com/Miunn/Typst-Template | https://raw.githubusercontent.com/Miunn/Typst-Template/master/main.typ | typst | #import "template/template.typ": conf
//#import "@preview/cetz:0.2.2" // Drawing
//#import "@preview/unify:0.5.0" // SI Units
//#import "@preview/codly:0.2.1" // Override code blocks
//#import "@preview/curryst:0.3.0" // Inference rules
//#import "@preview/commute:0.2.0" // Commutative diagrams
//#import "@preview/finite:0.3.0": automaton // Automatons
//#import "@preview/lovelace:0.2.0" // Pseudo-code
//#import "@preview/showybox:2.0.1" // Beautiful rectangles
#let fig(
content,
caption: none,
placement: none,
kind: figure,
supplement: "Figure",
numbering: "1",
gap: 0.65em,
outlined: true,
) = figure(
rect(content),
caption: caption,
placement: placement,
kind: kind,
supplement: supplement,
numbering: numbering,
gap: gap,
outlined: outlined,
)
#show: doc => conf(
title: [
Document title
],
subTitle: [Document subtitle],
authors: (
(
name: "<NAME>",
),
(
name: "<NAME>",
),
),
professor: [Professor],
pageTitle: smallcaps[Page Title],
semester: [X],
doc,
)
= Title <ref>
Content @bib-entry
Reference @ref
Footnote #footnote([Footnote])
#figure(
rect(
[Figure]
),
caption: [Example]
) |
|
https://github.com/RiccardoTonioloDev/TypUrNotes | https://raw.githubusercontent.com/RiccardoTonioloDev/TypUrNotes/main/tun_template/appendix/bibliography.typ | typst | MIT License | #bibliography("bibliography.yml")
|
https://github.com/Wh4rp/OCI-Solutions | https://raw.githubusercontent.com/Wh4rp/OCI-Solutions/main/chapters/2015/main.typ | typst | #import "../../lib/problem.typ": *
== Regional
#problem(
letter: "A",
title: [¿Cuánto pan es _una marraqueta_?], statement:
[
En la casa de Alejandra tendrán un asado familiar y su padre la ha enviado a comprar marraquetas para hacer choripanes. Alejandra no sabe exactamente cuánto pan es _una marraqueta_ pues siempre ha comprado hallullas, así que antes de partir pregunta a su padre cuanto pan es _una marraqueta_. Su padre le responde que según recuerda, en las panaderías se encuentran como 4 rollos de pan pegados y que cada uno de estos rollos es _una marraqueta_. Alejandra queda extrañada, pues si los cuatro rollos vienen pegados deberían en su conjunto ser llamados _una marraqueta_. Para no discutir Alejandra simplemente acepta la definición de marraqueta de su padre y se dirige a la panadería para cumplir con la orden.
Por si no fuera ya el colmo al llegar a la panadería Alejandra queda aún más confundida, pues ve a un cliente comprar 2 marraquetas y salir con el conjunto de 4 rollos pegados. Al parecer en la panadería siguen la definición de la Asociación de Consumo de Marraquetas (ACM) y consideran que _una marraqueta_ son dos rollos de pan pegados. En la panadería solo pueden vender una cantidad entera de marraquetas y Alejandra debe pedirlas según la definición de la ACM. Dada la cantidad de marraquetas que quiere el padre según su definición, ¿podrías ayudar a Alejandra a saber cuántas marraquetas pedirle al panadero? Notar que como solo se puede comprar una cantidad entera de marraquetas no siempre es posible llevar la cantidad exacta de marraquetas según la definición del padre. Si este es el caso Alejandra puede llevar más marraquetas, pero siempre debe comprar la menor cantidad posible.
],
input:
[
La entrada consiste en una línea con un único entero $N$ que representa la cantidad de marraquetas que Alejandra debe comprar según la definición de su padre.
],
output:
[
Debes imprimir una línea con un único entero correspondiente a la menor cantidad de marraquetas según la definición de la ACM que Alejandra debe comprar para llevar a su padre la cantidad de marraquetas que solicitó según su definición.
],
subtasks:
(
(
score: 30,
description: [
Se probarán varios casos donde $0<N≤100$ y siempre es posible comprar la cantidad exacta de marraquetas.
]
),
(
score: 70,
description: [
Se probarán varios casos donde $0<N≤100$ y sin restricciones adicionales.
]
)
),
examples:
(
(
input: [78],
output: [39]
),
(
input: [7],
output: [4]
),
),
solution: [
Primero que todo hagamos la conversión entre las dos definciones de _una marraqueta_. Según la definición del padre, _una marraqueta_ son 4 rollos de pan pegados, mientras que según la definición de la ACM, _una marraqueta_ son 2 rollos de pan pegados. Por lo tanto, para pasar de la definición del padre a la definición de la ACM debemos dividir por 2.
Se puede seguir el siguiente razonamiento:
$ 1 "marraqueta para el papá" -> 1 "rollo" -> 1 / 2 dot (2 "rollos") -> 1 / 2 "marraqueta para la ACM" $
Es claro que si se nos pide una cantidad par de marraquetas entonces basta con pedir la mitad en la panadería; e.g. el papá pide 8 marraquetas (8 rollos) entonces Alejandra pide 4 marraquetas según la ACM ($2 dot 4 "rollos" = 8 "rollos"$).
Si se pide una cantidad impar entonces hay que pedir la función para que así no falte; e.g. el papá pide 7 marraquetas (7 rollos) entonces Alejandra pide 4 marraquetas según la ACM ($2 dot 4 "rollos" = 8 "rollos" > 7 "rollos"$).
Así el código nos queda:
```cpp
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 2 == 0) {
cout << n / 2 << endl;
} else {
cout << (n + 1) / 2 << endl;
}
}
```
También se puede hacer el truco de sumar 1 a $N$ antes de dividirlo por 2, pues así nos aseguramos de que la división siempre redondee hacia arriba. Esto es porque si $N$ es par entonces $N + 1$ es impar y el resultado de la división no cambia.
```cpp
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n + 1) / 2 << endl;
}
```
]
)
== Final nacional
#problem(
letter: "A",
title: [Partido de ping-pong], statement:
[
<NAME> y Nelman son fanáticos del ping-pong. Cada vez que se juntan aprovechan de jugar un partido. Sus partidos no son profesionales y siguen las siguientes reglas que ellos mismos han inventado:
- El partido se juega a N puntos y el primero que llega a los N puntos gana.
- La cantidad de puntos, es decir, el valor de N, puede ser distinto en cada partido.
- En cada partido uno de los dos comienza sacando.
- Cada jugador conserva su saque hasta perder un punto.
Lo que no saben <NAME> y Nelman es que sus partidos son muy predecibles. Resulta que cada vez que a Jota Pe le toca sacar tiene una racha de A puntos, es decir, gana A puntos seguidos y luego pierde el saque. Lo mismo pasa con Nelman, cada vez que a él le toca sacar tiene una racha de B puntos y luego pierde su saque. El largo de las rachas, es decir, el valor de A y B, depende del día en que jueguen. Notar que cuando un jugador pierde el saque el oponente gana un punto.
<NAME> y Nelman quedarían muy sorprendidos si alguien fuera capaz de adivinar quién de los dos va a ganar un partido antes de que lo jueguen. ¿Qué tal si haces un programa para sorprenderlos?
],
input:
[
La entrada está compuesta de dos líneas.
La primera línea contiene dos enteros N y P. N corresponde a la cantidad de puntos a los que se jugará el partido. P es un entero que indica quién comenzará sacando (Jota Pe = 1 y Nelman = 2). La siguiente línea contiene dos enteros A y B, que representan respectivamente el largo de las rachas de Jota Pe y de Nelman.
],
output:
[
Tu programa debe imprimir un 1 si Jota Pe es quien ganará el partido y un 2 si Nelman es quien ganará el partido.
],
subtasks:
(
(
score: 10,
description: [
Se probarán varios casos donde $1≤N≤100$, $P=1$, y $A = B = 0$.
]
),
(
score: 10,
description: [
Se probarán varios casos donde $1≤N≤100$, $P=1$, y $A = B = 1$.
]
),
(
score: 20,
description: [
Se probarán varios casos donde $1≤N≤100$, $A=B$, y $0 ≤ A, B ≤ N$.
]
),
(
score: 60,
description: [
Se probarán varios casos donde $1≤N≤100$, y $1 ≤ A, B ≤ N$.
]
)
),
examples:
(
(
input: [11 1\ 0 0],
output: [2]
),
(
input: [11 1\ 1 1],
output: [1]
),
(
input: [7 2\ 2 2],
output: [2]
),
(
input: [6 1\ 2 3],
output: [2]
),
),
solution: [
Como $N$ es un valor chico (a lo más 100) entonces podemos simular el juego hasta que alguno de los dos obtenga los $N$ puntos.
Una manera fácil de simularlo es teniendo variables que guarden los puntos de cada jugador y hagamos un bucle donde asignemos un punto según cuantos turnos quedan de racha al jugador que saca. Si ya no quedan turnos de racha entonces asignamos un punto al otro y cambiamos quien saca.
```cpp
#include <iostream>
using namespace std;
int main() {
int n, p, a, b;
cin >> n >> p >> a >> b;
int jota = 0, nelman = 0;
int contador_racha;
// Asignamos el contador de racha según quien comienza sacando
if (p == 1) {
contador_racha = a;
} else {
contador_racha = b;
}
while (jota < n && nelman < n) { // Mientras ninguno haya ganado
if(contador_racha != 0){ // Si quedan turnos de racha
if (p == 1) {
jota++;
} else {
nelman++;
}
contador_racha--;
}
else{ // Si no quedan turnos de racha
if(p == 1){ // cambiamos quien saca y
p = 2; // reasignamos el contador de racha
nelman++;
contador_racha = b;
}
else{
p = 1;
jota++;
contador_racha = a;
}
}
}
// Imprimimos el ganador
if (jota == n) {
cout << 1 << endl;
} else {
cout << 2 << endl;
}
}
```
]
) |
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/modern-uit-thesis/0.1.0/README.md | markdown | Apache License 2.0 | # Modern UiT Thesis Template
Port of the [uit-thesis](https://github.com/egraff/uit-thesis)-latex template to Typst.
`thesis.typ` contains a full usage example, see `thesis.pdf` for a rendered pdf.
## Usage
Using the Typst Universe package/template:
```console
typst init @preview/modern-uit-thesis
```
## Roadmap
- [ ] Content and pages
- [x] Complete front page
- [x] Back page
- [x] Supervisors page
- [ ] List of Definitions
- [x] List of Abbreviations
- [ ] Appendix
- [ ] Styling
- [x] Headings (chapter on odd, subsection on even)
- [ ] Font features
- [ ] Figures (captions etc)
- [x] Code blocks (syntax highlights)
- [x] Tables
- [x] Footnotes (?)
- [ ] Style for print (pagebreak to even)
- [ ] Good examples
- [x] Use of figures, tables, code blocks
- [x] Side by side
- [ ] Create table from CSV
- [ ] Codeblocks with External Code
- [x] Citations
- [x] Lists (unordered, ordered)
- [x] Equations
- [x] Utilities
- [x] Abbreviations
- [x] TODOs, feedback, form, etc
- [x] CI/CD
- [x] Formatting
- [x] Build and Release pdf
- [ ] Release as lib (TODO: Add to local index)
- [x] License
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
https://github.com/jneug/schule-typst | https://raw.githubusercontent.com/jneug/schule-typst/main/tests/cu/test.typ | typst | MIT License | #import "@local/schule:1.0.0": cu
#import cu: *
#show: checkup.with(
/* @typstyle:off */
titel: "Base template test",
reihe: "TYPST-TEST",
datum: "15.06.2024",
nummer: "1",
fach: "Typst",
kurs: "101",
autor: (
name: "<NAME>",
kuerzel: "Ngb",
),
version: "2024-06-15",
)
#checkup-table(
ichkann("Lesen")[
- #bu(110, 111)
- #bu((112, 113), (1, 2, 4, 5, 6, 8, 10, 11))
],
trenner("<NAME>"),
ichkann("Lesen")[
- #ab(110, 111)
- #ah((112, 113), (1, 2, 4, 5, 6, 8, 10, 11))
],
)
|
https://github.com/hugoledoux/msc_geomatics_thesis_typst | https://raw.githubusercontent.com/hugoledoux/msc_geomatics_thesis_typst/main/main.typ | typst | MIT License | #import "template.typ": *
#let mysettings = toml("settings.toml")
#show: doc => msc-geomatics-tudelft(
title: mysettings.title,
author: mysettings.author,
graduation-year: mysettings.graduation-year,
graduation-month: mysettings.graduation-month,
supervisor1: mysettings.supervisor1,
supervisor2: mysettings.supervisor2,
coreader : mysettings.coreader,
graduation-group: mysettings.graduation-group,
doc,
)
//-- front-matter
#set page(
numbering: "i",
footer: context {
if calc.even(here().page()) {
align(left, counter(page).display("i"));
} else {
align(right, counter(page).display("i"));
}
}
)
#counter(page).update(1)
#include "front/abstract.typ"
#include "front/acknowledgement.typ"
#[
#show outline.entry.where(
level: 1
): it => {
v(12pt, weak: true)
strong(it)
}
#outline(depth: 2, indent: auto)
]
#outline(
title: [List of figures],
target: figure.where(kind: image),
)
#outline(
title: [List of tables],
target: figure.where(kind: table),
)
#outline(
title: [List of algorithms],
target: figure.where(kind: "algorithm"),
)
// page counter anchor
#metadata(()) <front-matter>
#pagebreak()
//-- main-matter
#set page(
numbering: "1",
header: context {
if calc.odd(here().page()) {
align(right, emph(hydra(1)))
} else {
align(left, emph(hydra(2)))
}
// line(length: 100%)
},
footer: context {
if calc.even(here().page()) {
align(left, counter(page).display("1"));
} else {
align(right, counter(page).display("1"));
}
}
)
#counter(page).update(1)
#set heading(numbering: "1.")
#include "chapters/introduction.typ"
#include "chapters/relatedwork.typ"
//-- back-matter
// must take page breaks into account, may need to be offset by +1 or -1
// #context counter(page).update(counter(page).at(<front-matter>).first())
#set heading(numbering: "A.1")
#counter(heading).update(0)
#include "appendices/reproducibility.typ"
#include "appendices/someumldia.typ"
//-- references
#bibliography("/refs.bib", style: "apa")
|
https://github.com/Error-418-SWE/Documenti | https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/1%20-%20Candidatura/Verbali/Interni/26-10-23/26-10-23.typ | typst | ERROR\_418 \
Verbale 26/10/23
#figure(
align(center)[#table(
columns: 2,
align: (col, row) => (left,left,).at(col),
inset: 6pt,
[Mail:],
[<EMAIL>],
[Redattori:],
[<NAME>, <NAME>],
[Verificatori:],
[<NAME>, <NAME>, <NAME>],
[Amministratori:],
[<NAME>, <NAME>],
[Destinatari:],
[<NAME>, <NAME>],
)]
)
#figure(
align(center)[#table(
columns: 2,
align: (col, row) => (center,center,).at(col),
inset: 6pt,
[Inizio Meeting: 18:20 Fine Meeting: 19:00 Durata:40min],
[],
[Presenze:],
[],
)]
)
#block[
#figure(
align(center)[#table(
columns: 5,
align: (col, row) => (center,center,center,center,center,).at(col),
inset: 6pt,
[Nome], [Durata Presenza], [], [Nome], [Durata Presenza],
[Antonio],
[40min],
[],
[Alessio],
[40min],
[Riccardo],
[40min],
[],
[Giovanni],
[40min],
[Rosario],
[/],
[],
[Silvio],
[40min],
[Mattia],
[40min],
[],
[],
[],
)]
)
]
= Discussione sul meeting con l’azienda
<discussione-sul-meeting-con-lazienda>
Abbiamo discusso su quanto detto nel precedente meeting con l’azienda
SanMarco Informatica, in particolare su:
- tecnologie da utilizzare: abbiamo analizzato alcuni Issue tracking
system e Version control system, considerato l’uso di doker
- gestione dei bin: comportamento in caso di spostamento, gestione
dimensioni
- utilizzo e gestione database con le tecnologie proposte
= Discussione organizzative
<discussione-organizzative>
Alla luce di quanto detto a lezione riguardo al progetto, abbiamo
discusso:
- l’utilizzo delle milestone
- politiche agile da adottare: sprint da una settimana con riunione
finale
- gestione divisioni ruoli
- diari di bordo: loro funzionamento e organizzazione
- creazione e gestione di una pagina google drive condivisa
= Organizzazione incontri
<organizzazione-incontri>
Ci siamo accordati sui futuri incontri, nello specifico:
- venerdì 27-10 ore 14:30 incontro in torre archimede per discussione e
utilizzo di alcune delle tecnologie scelte
- sabato 28-10 incontro per definire un allineamento sull’utilizzo di
github
|
|
https://github.com/noahjutz/AD | https://raw.githubusercontent.com/noahjutz/AD/main/notizen/sortieralgorithmen/insertion_sort/induction_2.typ | typst | #import "/components/num_row.typ": single_num_row, braced, arrowed
#import "/config.typ": theme
#let nums = (4, 5, 5, 2, 1)
#single_num_row(
nums,
hl_success: (0, 2),
labels: (
(0, 1, braced[`:j-1`]),
(1, 2, arrowed[`j-1`]),
(2, 3, braced[`j:j+1`])
),
arrow: (
from: 1,
to: 2,
)
) |
|
https://github.com/csimide/SEU-Typst-Template | https://raw.githubusercontent.com/csimide/SEU-Typst-Template/master/init-files/thesis.typ | typst | MIT License | /*
使用模板前,请先安装 https://github.com/csimide/SEU-Typst-Template/tree/master/fonts 内的所有字体。
如果使用 Web App,请将这些字体上传到 Web App 项目的根目录中。
*/
// 仅当使用 Web App 时,才应该使用此文件,否则都应该直接修改 `bachelor_thesis.typ` 或 `degree_thesis.typ` 文件。
// 由于本模板组包括两个模板: bachelor 和 degree
// 但是只能设置一个 entrypoint
// 因此使用奇怪的方法来切换模板
// 默认渲染 degree
#include "degree_thesis.typ"
// 注释上面一行,并取消注释下面这一行,可以渲染 bachelor
// #include "bachelor_thesis.typ"
// 然后,请修改对应的实际 typ 文件,即 `bachelor_thesis.typ` 或 `degree_thesis.typ` |
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/text/raw_10.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Text show rule
#show raw: set text(font: "Roboto")
`Roboto`
|
https://github.com/michidk/cv | https://raw.githubusercontent.com/michidk/cv/main/src/template/mod.typ | typst | #import "../lib/utils.typ": debugMode, prettifyUrl, get, sortDateRange
#import "../lib/icons.typ": icons
#import "../lib/date.typ": formatDate
#import "section.typ": setupSectionHeading, experience, education, certifications, interests
#import "color.typ": colors
#let header(name, fontSizeAdjustment: 0pt) = {
stack(
dir: ttb,
spacing: 10pt,
text(
weight: "thin",
size: 40pt - fontSizeAdjustment,
name
),
{
h(0.5cm)
text(
size: 12pt - fontSizeAdjustment,
"Curriculum Vitae"
)
v(0.2cm)
},
)
}
#let tagline(content, fontSizeAdjustment) = {
set align(center)
set text(lang: "de", size: 11pt - fontSizeAdjustment) // to get that more stylized quote look
set smartquote(enabled: true, double: true)
block(above: 0.3cm, below: 0.4cm, emph["#content"])
}
#let address(basics, displayMugshot: false, fontSizeAdjustment: 0pt) = {
set align(right)
let head(body) = {
text(
weight: "bold",
body
)
}
let sep() = { v(0.5cm) }
let renderProfile(profile) = {
set text(
size: 10pt - fontSizeAdjustment,
)
let label = get(profile, "username", prettifyUrl(profile.url))
link(profile.url, icons.at(profile.icon) + " " + label)
}
let mugshot = if displayMugshot {
image("../../data/" + basics.image, height: 3.5cm)
} else {
v(1cm)
}
stack(
dir: ttb,
spacing: 5pt,
mugshot,
v(0.3cm),
head("Address"),
text(basics.location.address),
text(basics.location.postalCode + " " + basics.location.city),
text("Germany"),
sep(),
head("Contact"),
link("tel:" + basics.phone)[#icons.phone #basics.phone],
link("mailto:" + basics.email)[#icons.mail #basics.email],
sep(),
head("Web"),
renderProfile((url: basics.url, username: "www.lohr.dev", icon: "globe")),
..basics.profiles.map(renderProfile)
)
}
#let filterHighlights(entries, importanceFilter) = {
if importanceFilter != none {
entries.filter(e => e.keys().contains("importance") and e.importance > importanceFilter)
} else {
entries
}
}
#let template(
data: none,
displayTagline: false,
displaySummary: false,
displayMugshot: false,
displayInterests: true,
displayVolunteering: true,
importanceFilter: none,
maxHighlights: none,
hideDescriptions: false,
markExpiredCertificates: true,
margins: (top: 1cm, bottom: 1cm, left: 1cm, right: 1cm),
fontSizeAdjustment: 0pt,
debug: false,
body
) = {
let name = data.basics.name
set document(
title: name + "'s CV",
author: name,
)
set page(
margin: margins,
footer: {
set align(center)
set text(
size: 8pt - fontSizeAdjustment,
weight: "medium",
fill: rgb("#c0bdbd")
)
smallcaps(name)
h(0.2cm)
sym.dot.c
h(0.2cm)
smallcaps("Curriculum Vitae")
}
)
set text(
font: "Roboto",
size: 10pt - fontSizeAdjustment
)
set list(
indent: 0.15cm,
body-indent: 0.1cm,
)
show link: set text(fill: colors.link)
show columns: set block(above: 0.25cm) // fix for: https://github.com/typst/typst/issues/686
// stylized headings
show heading.where(level: 1): content => setupSectionHeading(content, fontSizeAdjustment)
// debug mode
show: debugMode.with(enabled: debug, margins: margins)
grid(
columns: (16fr, 5fr),
gutter: 1cm,
{
header(name, fontSizeAdjustment: fontSizeAdjustment)
if displayTagline { tagline(data.basics.label, fontSizeAdjustment) }
if displaySummary {
[
= Summary
#data.basics.summary
]
}
[
= Skills
#let keySkills = data.skills.filter(skill => "key" in skill and skill.key)
#let skills = data.skills.filter(skill => not ("key" in skill and skill.key)).map(skill => (get(skill, "title", skill.name), get(skill, "subskills", ()).join(", ")))
*Key Skills*
#box(height: 1cm,
columns(3, gutter: 0.2cm,
list(..keySkills.map(skill => skill.name))
)
)
*Technical Skills*
#for skill in skills {
if skill.at(1) != none {
list(skill.at(0) + ": " + skill.at(1))
} else {
list(skill.at(0))
}
}
]
},
address(data.basics, displayMugshot: displayMugshot, fontSizeAdjustment: fontSizeAdjustment)
)
let workData = filterHighlights(data.work, importanceFilter)
experience(
workData.sorted(key: sortDateRange).rev(),
"Work Experience",
hideDescriptions,
maxHighlights,
fontSizeAdjustment
)
let educationData = filterHighlights(data.education, importanceFilter)
education(
educationData.sorted(key: sortDateRange).rev(),
hideDescriptions,
maxHighlights,
fontSizeAdjustment
)
let certificationsData = filterHighlights(data.certificates, importanceFilter)
certifications(
certificationsData.sorted(key: cert =>
cert.startDate
).rev(),
hideDescriptions,
fontSizeAdjustment,
markExpired: markExpiredCertificates
)
if displayVolunteering {
let volunteerData = filterHighlights(data.volunteer, importanceFilter)
experience(
volunteerData.sorted(key: sortDateRange).rev(),
"Volunteering",
hideDescriptions,
maxHighlights,
fontSizeAdjustment
)
}
if displayInterests { interests(data.interests) }
}
|
|
https://github.com/KnechtTheDots/KnechtTheDots.github.io | https://raw.githubusercontent.com/KnechtTheDots/KnechtTheDots.github.io/main/CV/_extensions/kazuyanagimoto/awesomecv/typst-template.typ | typst | #import "@preview/fontawesome:0.1.0": *
// const color
#let color-darknight = rgb("#131A28")
#let color-darkgray = rgb("#333333")
#let color-middledarkgray = rgb("#414141")
#let color-gray = rgb("#5d5d5d")
#let color-lightgray = rgb("#999999")
// Default style
#let color-accent-default = luma(0)
#let font-header-default = ("Roboto", "Arial", "Helvetica", "Dejavu Sans")
#let font-text-default = ("Source Sans Pro", "Arial", "Helvetica", "Dejavu Sans")
// User defined style
$if(style.color-accent)$
#let color-accent = rgb("$style.color-accent$")
$else$
#let color-accent = color-accent-default
$endif$
$if(style.font-header)$
#let font-header = "$style.font-header$"
$else$
#let font-header = font-header-default
$endif$
$if(style.font-text)$
#let font-text = "$style.font-text$"
$else$
#let font-text = font-text-default
$endif$
/// Helpers
// icon string parser
#let parse_icon_string(icon_string) = {
if icon_string.starts-with("fa ") [
#let parts = icon_string.split(" ")
#if parts.len() == 2 {
fa-icon(parts.at(1), fill: color-darknight)
} else if parts.len() == 3 and parts.at(1) == "brands" {
fa-icon(parts.at(2), fa-set: "Brands", fill: color-darknight)
} else {
assert(false, "Invalid fontawesome icon string")
}
] else if icon_string.ends-with(".svg") [
#box(image(icon_string))
] else {
assert(false, "Invalid icon string")
}
}
// contaxt text parser
#let unescape_text(text) = {
// This is not a perfect solution
text.replace("\\", "").replace(".~", ". ")
}
// layout utility
#let __justify_align(left_body, right_body) = {
block[
#box(width: 4fr)[#left_body]
#box(width: 1fr)[
#align(right)[
#right_body
]
]
]
}
#let __justify_align_3(left_body, mid_body, right_body) = {
block[
#box(width: 1fr)[
#align(left)[
#left_body
]
]
#box(width: 1fr)[
#align(center)[
#mid_body
]
]
#box(width: 1fr)[
#align(right)[
#right_body
]
]
]
}
/// Right section for the justified headers
/// - body (content): The body of the right header
#let secondary-right-header(body) = {
set text(
size: 10pt,
weight: "thin",
style: "italic",
fill: color-accent,
)
body
}
/// Right section of a tertiaty headers.
/// - body (content): The body of the right header
#let tertiary-right-header(body) = {
set text(
weight: "light",
size: 9pt,
style: "italic",
fill: color-gray,
)
body
}
/// Justified header that takes a primary section and a secondary section. The primary section is on the left and the secondary section is on the right.
/// - primary (content): The primary section of the header
/// - secondary (content): The secondary section of the header
#let justified-header(primary, secondary) = {
set block(
above: 0.7em,
below: 0.7em,
)
pad[
#__justify_align[
#set text(
size: 12pt,
weight: "bold",
fill: color-darkgray,
)
#primary
][
#secondary-right-header[#secondary]
]
]
}
/// Justified header that takes a primary section and a secondary section. The primary section is on the left and the secondary section is on the right. This is a smaller header compared to the `justified-header`.
/// - primary (content): The primary section of the header
/// - secondary (content): The secondary section of the header
#let secondary-justified-header(primary, secondary) = {
__justify_align[
#set text(
size: 10pt,
weight: "regular",
fill: color-gray,
)
#primary
][
#tertiary-right-header[#secondary]
]
}
/// --- End of Helpers
#let resume(
title: "CV",
author: (:),
date: datetime.today().display("[month repr:long] [day], [year]"),
body,
) = {
set document(
author: author.firstname + " " + author.lastname,
title: title,
)
set text(
font: (font-text),
size: 11pt,
fill: color-darkgray,
fallback: true,
)
set page(
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: [
#set text(
fill: gray,
size: 8pt,
)
#__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#author.firstname
#author.lastname
#sym.dot.c
CV
]
][
#counter(page).display()
]
],
)
// set paragraph spacing
set heading(
numbering: none,
outlined: false,
)
show heading.where(level: 1): it => [
#set block(
above: 1.5em,
below: 1em,
)
#set text(
size: 16pt,
weight: "regular",
)
#align(left)[
#text[#strong[#text(color-accent)[#it.body.text.slice(0, 3)]#text(color-darkgray)[#it.body.text.slice(3)]]]
#box(width: 1fr, line(length: 100%))
]
]
show heading.where(level: 2): it => {
set text(
color-middledarkgray,
size: 12pt,
weight: "thin"
)
it.body
}
show heading.where(level: 3): it => {
set text(
size: 10pt,
weight: "regular",
fill: color-gray,
)
smallcaps[#it.body]
}
let name = {
align(center)[
#pad(bottom: 5pt)[
#block[
#set text(
size: 32pt,
style: "normal",
font: (font-header),
)
#text(fill: color-gray, weight: "thin")[#author.firstname]
#text(weight: "bold")[#author.lastname]
]
]
]
}
let position = {
set block(
above: 0.75em,
below: 0.75em,
)
set text(
color-accent,
size: 9pt,
weight: "regular",
)
align(center)[
#smallcaps[
#author.position
]
]
}
let address = {
set block(
above: 0.75em,
below: 0.75em,
)
set text(
color-lightgray,
size: 9pt,
style: "italic",
)
align(center)[
#author.address
]
}
let contacts = {
set box(height: 9pt)
let separator = box(width: 5pt, line(start: (0%, 0%), end: (0%, 100%), stroke: color-darkgray))
let contact_last = author.contacts.pop()
align(center)[
#set text(
size: 9pt,
weight: "regular",
style: "normal",
)
#block[
#align(horizon)[
#for contact in author.contacts [
#box[#parse_icon_string(contact.icon)]
#box[#link(contact.url)[#contact.text]]
#separator
]
#box[#parse_icon_string(contact_last.icon)]
#box[#link(contact_last.url)[#contact_last.text]]
]
]
]
}
name
position
address
contacts
body
}
/// The base item for resume entries.
/// This formats the item for the resume entries. Typically your body would be a bullet list of items. Could be your responsibilities at a company or your academic achievements in an educational background section.
/// - body (content): The body of the resume entry
#let resume-item(body) = {
set text(
size: 10pt,
style: "normal",
weight: "light",
fill: color-darknight,
)
set par(leading: 0.65em)
set list(indent: 1em)
body
}
/// The base item for resume entries. This formats the item for the resume entries. Typically your body would be a bullet list of items. Could be your responsibilities at a company or your academic achievements in an educational background section.
/// - title (string): The title of the resume entry
/// - location (string): The location of the resume entry
/// - date (string): The date of the resume entry, this can be a range (e.g. "Jan 2020 - Dec 2020")
/// - description (content): The body of the resume entry
#let resume-entry(
title: none,
location: "",
date: "",
description: ""
) = {
pad[
#justified-header(title, location)
#secondary-justified-header(description, date)
]
}
/// ---- End of Resume Template ----
|
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/041_Kaldheim.typ | typst | #import "@local/mtgset:0.1.0": conf
#show: doc => conf("Kaldheim", doc)
#include "./041 - Kaldheim/001_Episode 1: Travelers.typ"
#include "./041 - Kaldheim/002_Know Which Way the Wind Is Blowing.typ"
#include "./041 - Kaldheim/003_Episode 2: Awaken the Trolls.typ"
#include "./041 - Kaldheim/004_Aim Through the Target.typ"
#include "./041 - Kaldheim/005_Episode 3: The Saga of Tibalt.typ"
#include "./041 - Kaldheim/006_Brokenbrow.typ"
#include "./041 - Kaldheim/007_Episode 4: Into the Demons' Realm.typ"
#include "./041 - Kaldheim/008_Direction. Purpose. Honor. Glory..typ"
#include "./041 - Kaldheim/009_Episode 5: The Battle for Kaldheim.typ"
#include "./041 - Kaldheim/010_The Saga of Lathril.typ"
|
|
https://github.com/LeptusHe/LeptusHe.github.io | https://raw.githubusercontent.com/LeptusHe/LeptusHe.github.io/main/source/_posts/temporal-antialiasing/temporal-antialiasing-02.typ | typst | #import "../typst-inc/blog-inc.typc": *
#show: blog_setting.with(
title: "Temporal Antialiasing - 02",
author: ("<NAME>"),
paper: "a1"
)
#metadata("Temporal Antialiasing") <tags>
#metadata("图形渲染") <categories>
#metadata("2019-03-11") <date>
= History Color失效的情况
当物体运动或者相机运动时,我们需要通过reprojection操作来获得某个pixel在前一帧中的屏幕空间位置,然后从该位置获取history color。然而,并不是在任何情况下,history color都是正确的。
== 相机/物体运动导致的history color失效
如 @fig:occlusion-history-color 所示,当相机在场景中运动时,当前帧中,某个pixel对应的场景采样点为红色点,为了得到该采样点的history color,我们使用上一帧的MVP矩阵来将 该红色采样点投影到屏幕空间中后,然而,history buffer中该屏幕空间位置中存储的history color为绿色采样点的history color,然而我们需要的是红色采样点的history color,从而导致我们获得了一个invalid的history color。
#figure(
image("./images/occlusion-history-color.png", width: 80%),
caption: "被遮挡的fragment"
) <fig:occlusion-history-color>
上述情况产生的根本原因在于某些fragment在当前帧可见,然而在上一帧不可见。导致该情况的原因可能是相机的运动或者物体的运动。例如,当相机运动速度较快时,屏幕边缘处的fragment就会在上一帧中不可见,从而导致history buffer中没有存储这些fragment的history color。
== Shading导致的history color失效
当物体或者相机运动时,可能会导致当前帧中的某个fragment的history color没有被存储在history buffer中,从而导致获得的history color是无效的。
然而,即使我们能够在history buffer中获取到某个fragment对应的history color,该history color依然可能无效。假设在上一帧中某个fragment被一个红色的光源照亮,然而在当前帧中该光源颜色变为绿色,从而会导致该fragment的颜色由于shading的变化而不同。最终导致,上一帧的history color不可用,即history color无效。
导致shading的变化原因有很多,例如:
- 光照环境的改变(光源颜色变化、光源开关等)
- 阴影的变化(是否处于阴影中)
- 半透明物体的影响
任何会对导致pixel的颜色产生变化的因素都可能会导致history color变得无效。
= History Color失效后的处理
当history color失效后,我们需要对这种情况进行相应的处理。一种处理方法是丢弃history color,然后直接使用当前帧的颜色作为最终的颜色。然而,该方法会导致pixel失去反走样效果。
另一种处理方式是使用neighborhood clamping方法来进行处理。该方法的基本思想是通过当前帧pixel的一个邻域范围内的像素,来在颜色空间中构造一个颜色范围,然后将history color的大小限制在该范围之中。该方法的基本的假设是——某个pixel反走样后的颜色基本与该pixel邻域范围内pixel颜色的blending结果相同。如果该假设成立,则将history color限制在邻域pixel构成的颜色范围中是一种正确的做法。然而,当pixel中存在sub-pixel feature时,该假设无法成立。
Neighborhood Clamping方法中首先需要根据pixel的邻域颜色来构建一个颜色空间范围,如果我们使用凸包来构造一个颜色空间范围,则我们可以获得一个最小的颜色空间范围。然而,该方法过于复杂,容易造成效率问题。
另一种构造颜色范围的方法是使用axis-aligned bounding box(AABB)。通过使用pixel的邻域颜色来构建一个AABB,则可以构造出一个较紧的颜色范围。并且,我们可以将pixel的颜色从RGB颜色空间转换到YCoCg空间后,再在YCoCg颜色空间构造一个AABB。这是因为YCoCg颜色空间能够体现颜色的亮度差异。
当history color不在AABB范围中时,一种处理方式是将history color进行clamping,即
```cpp
historyColor = clamp(historyColor, minColor, maxColor);
```
另一种处理方式是使用cliping操作,即计算pixel和history color所连接形成的线段与AABB的交点。相比较于clamping操作而言,cliping得到的颜色是pixel和history color的一个插值,与pixel的颜色更相似。
= Flicking问题
在使用neighborhood clamp方法后,场景中可能会有pixel的闪烁问题。即使当相机与物体静止,pixel的闪烁问题依然可能存在。导致闪烁发生的主要原因在于,场景中存在sub-pixel feature,从而导致neighborhood clamp方法的基本假设无法成立。举一个例子来对该情况进行说明。
#figure(
image("./images/flicking.png", width: 100%),
caption: "flicking例子"
) <fig:flicking>
如@fig:flicking 所示,previous frame的pixel的颜色为红色$(1,0,0)$,并且其邻域颜色构成的AABB中的$"minColor" = (1,0,0)$,$"maxColor"=(1,1,1)$。假设previous frame的历史颜色为红色$(1,0,0)$,则经过neighborhood clamp操作处理后,history color依然为红色,则最终的结果为红色$(1,0,0)$。在current frame时,由于sample的变化,导致当前的pixel颜色变为白色$(1,1,1)$,并且邻域颜色构成的AABB中的$"minColor"=(1,1,1)$,$"maxColor"=(1,1,1)$,经过neighborhood clamp操作处理后history color变为白色$(1,1,1)$,则最终经过blending后的颜色为白色$(1,1,1)$。通过上面简单的例子可以看出,当场景中存在sub-pixel feature时,即使在静态场景下,像素颜色也会存在帧间变化从而导致闪烁问题的发生。
= 模糊问题
Temporal Antialiasing算法存在的另一个问题是模糊问题。当使用了TAA算法后,渲染出来的图片可能会存在一些模糊。导致该问题的原因主要有以下三个:
- 使用了错误的mipmap level
- reprojection diffusion
- 对无效的history color进行blending
由于mipmap level与图片的分辨率有关,且temporal antialiasing算法在每一帧中采样pixel中的一个sample,从而导致在计算mipmap level时使用的分辨率是屏幕的分辨率。然而,由于temporal antialiasing算法与super sampling算法类似,实际上在计算mipmap level时应该使用super sampling的分辨率,从而导致mipmap的level计算错误。Mipmal level的计算错误可以通过对计算得到的mipmap level增加一个bias来解决。
Reprojection diffusion问题的产生是由于对history buffer进行重采样从而导致的。在对history buffer进行重采样时,采样的位置可能并不在history buffer中的像素中心位置,从而导致采样得到的颜色是对history buffer重构的结果,即是插值出来。该插值出来的像素由于不是一个正确的像素颜色,而是插值出来的,则该插值出来的history color则带有一些模糊的效果,从而会导致blending了该history color的pixel具有模糊效果。并且,由于history buffer是不断累积的,会更加剧这个问题。解决该问题的一个方法是使用更好的重构方法来代替线性插值方法,来使得插值出来的pixel更加锐利。例如,使用Catmull-Rom插值方法来进行插值。
与混合了插值出来的history color类似的原因。当history color无效时,最终的pixel由于混合了无效的history color,也会导致blending后的pixel带有模糊的效果。
另外,为了减轻TAA导致的模糊问题,我们可以通过为当前帧得到的颜色纹理增加一个sharepen filter来减轻该问题。
= References
1. #link("http://advances.realtimerendering.com/s2014/")[High-Quality Temporal Super Sampling[Siggraph 2014]]
2. #link("https://bartwronski.com/2014/03/15/temporal-supersampling-and-antialiasing/")[Temporal Super Sampling and Antialiasing[2014]]
3. #link("http://twvideo01.ubm-us.net/o1/vault/gdc2016/Presentations/Pedersen_LasseJonFuglsang_TemporalReprojectionAntiAliasing.pdf")[Temporal Reprojection Anti-Aliasing in INSIDE[GDC][2016]]
4. #link("https://developer.download.nvidia.com/gameworks/events/GDC2016/msalvi_temporal_supersampling.pdf")[An Excursion in Temporal Super Sampling[GDC][2016]]
5. #link("http://hhoppe.com/supersample.pdf")[Amortized Super Sampling[Siggraph Asia 2009]] |
|
https://github.com/gabrielrovesti/WIM-Project | https://raw.githubusercontent.com/gabrielrovesti/WIM-Project/main/WIM%20Project/main.typ | typst | MIT License | #import "unipd-doc.typ": *
#import "@preview/tablex:0.0.6": tablex, rowspanx, colspanx
#show: unipd-doc(
title: [Web Information Management],
subtitle: [Usability Analysis of the University of Padua Website],
author: [Student: <NAME> - ID: 2103389],
date: [Period of Analysis: January 2024 - February 2024],
)
= Introduction and Context <website_intro>
This document contains the usability analysis of the University of Padua website. Given the significant role of this institution, acting as an important hub for education, research, and information dissemination, the site present in this document is itself very large and composed of different sections. This will try to step in the shoes of a normal user, analyzing carefully the good and the bad aspects of the website, evaluating its effectiveness in providing a seamless and user-friendly experience for its diverse stakeholders, including students, faculty, staff, and visitors.
Given this website is visited daily from thousands of people, the homepage itself will be picked and all relevant pages that guide a student towards its course or any kind of information, supporting how much bureaucratic actions/everyday functionalities used by students can be completed efficiently. The document wants to analyze the desktop version of the website in its Italian counterpart, trying to evaluate the overall context and organization in an objective way, then giving a final feedback and score based on the overall experience.
= Website Name and Domain <website_name_domain>
The name of the website itself is simple and effective: the shortened
#show link: underline
#link("https://www.unipd.it/") \
conveys the "Università di Padova" name quite well, enhancing memorability but also conveying immediately the brand recognition of the website representing the academic institution itself. By itself, the name is short and easily rememberable; also, the acronym "UniPD" gives the context of the institution well without losing much context, keeping it simple and sound.
In this site, it's not used the ".com" top-level-domain, instead the "localized" one (here, given the Italian version is analyzed, there is the ".it" version; if one tries to access "unipd.com" there is an for-sale domain and a redirect would be useful)
= Website Structure <website_structure>
The website is quite extended, given it represents a whole university and institution per se.
As soon as you enter a page of the website, there is a series of links redirecting to specific parts dedicated to help the user choose its navigation profile, between:
- future students, orienteering and enrolling in university;
- actual students, with a series of links dedicate to miscellanea of info and pages of many kinds;
- graduated students, to know about masters/PhD programs;
- university staff, handling locations and facilities, competitions, invoicing, technical and administrative issues;
- citizenship and territory, dedicated to many initiatives for students, companies, organizations and businesses.
Given the massive population of students potentially reachable by the website, there are three versions of the site selectable in the following languages: Italian/English/Chinese.
In this document, the Italian version of the site will be analyzed (given it's the one I'm most familiar with), noting the structure remains almost the same between the three versions considered apart from this links' categorization, which does not strictly divide the website into sections, but more into logical categories, according to the specific pages context.
Another thing to note is the fine-grained nature of the information present in this website; as will be described in the following chapters and subsections, the site has hundreds of links, between internal pages and related website of other departments; here only relevant sections and pages will be analyzed, considering for example how a student would move into the website to find relevant information, both practically and bureaucratically.
= Website Content
== Homepage <homepage>
In this sections and in the related subsections, the page structure will be describe thoroughly, analyzing how much information is accessible overall. This content structure for section and subsection will be present equally for internal pages, with the goal of giving coarse-grained analysis for each.
=== Structure <homepage_structure>
The main page of the website is the first element a user sees when landing in the site by typing its address and offers a comprehensive first look of what the site offers and gets the first attention by the user.
At first glance, the main page of the site presents some elements to consider:
- the logo of the university;
- some links referencing external sites, listing other departments, the webmail access and the Uniweb site, useful for both students and teachers;
- the profile section, which is there to give a tabbed categorization of the possible links to click and then redirects the user to new links. This many confuse the user, given it seems a login action, as seen in @homepage_first_glance;
- the possibility to change languages as described above and a search icon;
- a carousel of images, which are all clickable and automatically slide to the right after a few seconds.
#figure(
image("images/homepage.png", width: 70%),
caption: [First presentation of the homepage],
) <homepage_first_glance>
#pagebreak()
Going down with scrolling, there are multiple elements:
- a banner which allows a student to access the Orienteering section of the website, allowing to choose the college course of interest. This has not a conventional structure both in shape and color choice by just looking at it, so it may seem not clickable to users;
- some links and images redirecting to specific section of the website, specifically dedicated to other means of the academic institution, from external projects up to research and other means both during the degrees or after, as seen by the left image in @homepage_second_glance;
- some calendar for future events held by the institution, comprehensive of clickable links and clickable images in all sections, as seen by the right image in @homepage_second_glance.
Here, it might be useful to inser some _blurbs_ for the user in order to immediately get the grasp of the page content.
#figure(
grid(
columns: (auto, auto),
rows: (auto, auto),
gutter: 1em,
[ #image("images/homepage_second.png", width: 80%) ],
[ #image("images/homepage_third.png", width: 100%) ],
),
caption: [Second (left) and third (right) scroll in homepage]
) <homepage_second_glance>
Continuing, we reach the bottom of the page, in which there is a list of clickable images redirecting to other projects or departments of the institution, basically a miscellanea of links put as a display, but providing no particular value to the user landing in.
Finally, the footer is present at bottom of page listing an index of administrative links, both for contacts and selections, a list of contacts and general information. As @homepage_third_glance marks, the font is a bit different from the other one present in the same page and it's also quite smaller, making it more difficult to see from the rest of the navigation made until here.
Here, no circular links were present in the analysis been done, all redirecting to different data. This holds for all pages of course.
#figure(
image("images/homepage_fourth.png", width: 65%),
caption: [Bottom of the homepage and footer],
) <homepage_third_glance>
=== Informative axes <homepage_ia>
Starting from this page and in the following ones, we consider in the design of each webpage, the impact that information has on the website visitor: the "6 Ws", also used in journalism to collect the main information of something as quickly as possible, in an implicit but consistent way. The following are all questions each one of us asks themselves for each piece of information we're projected to and in the related subsections, each one will be precisely answered.
As noted in @homepage_structure, for each page analyzed, this information analysis will be given for each subsequent page analyzed in further subsections with the same section structure present here, from now on.
==== Where <homepage_ia_where>
The question asked is: "Where did I arrive and where can I go next?"
The user recognizes immediately their relative position in the website, getting a quick glimpse of the context of the institution. As noted in @homepage, UniPD has famous role and a reputation, but the layout is disorganized and not helpful general in finding information. Infact, there is a series of links in many parts of the page, leaving a user at the discovery of what can possibly happen (commonly defined as _gambling clicks_, "hoping" to find useful information).
Given the big nature of the website, this is understandable: the ideal logical categorization of links (which isn't a breadcrumb per se, but more a logical division) should be improved to help a user immediately go whenever he wants to clearly without distracting banners or other links. The content of the page is a mishmash of things which mainly advertises events and overloads the user, but apart from references here and there, there is no clear indication of where to go next.
==== Who <homepage_ia_who>
The question asked is: "Who does the site represent and who is behind it?"
The main page of the website clearly represents the institution, without any doubts, given the many callbacks such as the color pattern (red and white) pretty much showed consistently in the website, giving a good coherence and identity to the university. It's also pretty easy to remember the institution name and logo, which are clearly displayed as soon as you get into the page.
A minor critique would be the absence of "Who are we" to explain more precisely the institution itself to a possible curious user (understandable, given it is not the goal of most browsing) or even better, a clearer "Contact Us" button. As shown in @homepage_third_glance, there are only links and information after scrolling all the way down to the bottom, which in itself is not a good approach.
In general, this axis is rendered fairly well, considering it's the first piece of information the user may see.
==== Why <homepage_ia_why>
The question asked is: "Why am I here and why should I stay?"
By itself, even though the main page has many things, actually makes the user curious about the various links. Scrolling down, the user is invited to click just to get to next section or click other pages. This is not well organized: the sections to help user navigation should be on top in place of the carousel, otherwise the main page already misses its main point, at least in my opinion. It takes for granted the user knows exactly the page context and knows where to go next, because the benefits to the user are not immediate from a first glance.
==== What <homepage_ia_what>
The question asked is: "What does the site offer me and what choices do I have?"
While there is the menu offering other links, as analyzed in @website_menu and the search, the main page tries to combine multiple layouts and offers to the user; it first starts with a grid layout after the main banner presenting some sections and links, then goes with a nested grid (as shown in @homepage_second_glance) and a list of banners ready to click to redirect to a miscellanea of things. The user is possibly overloaded with choices, most of the times incoherent.
Again, it would be useful to put relevant sections as first element in page and leveraging no scroll from the user and also giving some more relevant links to the footer, while also giving other relevant elements to the site footer.
==== When <homepage_ia_when>
The question asked is: "When were the last news in the website?"
This information is present when doing at least 3/4 scrolls from the page loading, as shown by right figure of @homepage_second_glance; one can go to the "News" page of the site, which acts as a sort of blog gathering articles, or can look at the next events held by the institution. On this aspect, the site offers multiple options for the user, keeping the news separate from main content unless he wants to read them and also attracts interest to different kinds of initiatives present.
==== How <homepage_ia_how>
The question asked is: "How do I arrive to where I want?"
On this, the page offers two possibilities; the small search icon (used usually in mobile contexts this way,) which activates the contextual search and the main page sections, which are expected to guide a browsing user "top-down" at least in their conception, towards the desired goal, given how many pages the site can possibly contain. The choice is actually given fairly simply to the user; the problem is, again, there is no real coherence already of how to get to information without losing time (from user perspective) to figure out the context and then make a choice.
Generally, there are many elements and links which can make the user curious of where to go next; the only thing, this is a lot of information and everything must be explored first to get a glance of what actually can be reached. Further sections can be reached via links or clickable images
== Internal pages <website_internal_pages>
In this section, some pages will be analyzed, specifically helping a user reach information for a possible enrolling inside the university (say, for instance, Computer Science), also describing what can be the possible pages reached and used, discussing the impact on the overall final user experience.
=== Structure <website_internal_pages_structure>
The internal pages structure is quite different according to the specific page selected into the analysis. The website is intended to be browsed top-down, having some pages which redirect to a list of other links, while other ones being pages definitely reachable via _deep linking_, so using a web search instead of following the whole path starting from the main page. In this website, both choices are comprehensible, given the website nature of information.
Let's consider the first category of page described: ideally, these are all reachable clicking on this links, which as described before should serve as a "logical categorization" to implicitly redirect the user:
#figure(
image("images/logical_path.png", width: 70%),
caption: [Pages which are meant to contain a list of links to redirect the user],
) <logical_category_path>
As you can see by the following figure, this is a page which represents the so-called "list-of-links-page" structure defined before; as shown here, there are multiple links meant to help the user starting all the way from the homepage:
#figure(
grid(
columns: (auto, auto),
rows: (auto, auto),
gutter: 1em,
[ #image("images/redirect_page_1.png", width: 75%) ],
[ #image("images/redirect_page_2.png", width: 100%) ],
),
caption: [Second (left) and third (right) scroll in "list-of-links-page"]
) <list_of_links_pages>
In figure, only the top of page and a list of links present after one scroll is presented; all the links present in @logical_category_path follows the same layout: a grid of images (which are not clickable this time around) and some overlaying articles/links waiting to be clicked by the user.
Each page of this type (all five considered in @logical_category_path) takes multiple scrolls to reach bottom, in the order of 4/5 scrolls; in this case again, the layout is completely wasted in space and the links should be on page top. The idea is there: putting a list of links which should be useful to the user, but actually this logical schema is not clear by the website at any point.
#pagebreak()
Another thing to note is the absence of a clear title tag between this so-called "list-of-links-page", as shown here:
#figure(
image("images/no_title_tags.png", width: 40%),
caption: [No title tags present in "list-of-links-pages"],
) <no_title_tags>
This can confuse the user, given there is no possible explanation given to such pages and there are five of them as noted.
We then consider the structure of a "normal" website page, which normally follows this structure (for the sake of content presentation, only some notable examples are present, given multiple pages follow this layout presented here):
- a breadcrumb present after the overlaying menu and the list of links present in @logical_category_path. This contains multiple links at a time and we can see from the following figure is composed by drop-down structure on categories (meant to help the user probably reaching a specific webpage via _deep linking_);
- the main body of page, which can be either composed of textual content and different links or the so called "details" element in HTML (accordion elements which can be opened containing other information);
- a list of latest news by the institution, which contain clickable images and links redirecting to a specific news.
In the following figures, the second point is explained in further detail:
#figure(
grid(
columns: (auto, auto),
rows: (auto, auto),
gutter: 1em,
[ #image("images/normal_page_1.png", width: 100%) ],
[ #image("images/normal_page_2.png", width: 100%) ],
),
caption: [First (left) and second (right) scroll in normal website page]
) <normal_pages>
The content is kept short in duration and pretty much straightforward according to the user needs, which is quite useful. Again, it depends on the specific page context, giving no coherence on information presentation to the user again.
#pagebreak()
As noted in the third point, after on average three/four scrolls, we get to the news section of the page; usually, there is always a blank space between that section and the footer already described in @homepage_structure, given by the chosen website style:
#figure(
image("images/normal_page_news.png", width: 65%),
caption: [Last section of normal webpage],
) <normal_page_news>
This section is interesting, considering it tries to give additional information to the user; again, this is wasted layout, given, in my opinion, there should be probably a dedicated page easily accessible without wasting this space on each normal webpage of the site. This serves no useful purpose to the specific webpage context. The main content of pages, especially in a website of this nature, is definitely text and should be presented in the easiest way possible.
Considering the vastity of the context, specific pages may require multiple clicks on internal pages to find, possibly overloading the user and tiring him. Moving from the homepage following the "list-of-links-page" considers at least four/five clicks, sometimes even deepening according to the context. A user would definitely prefer using a search engine or the search functionality, analyzed in @website_search
=== Informative axes <website_internal_ia>
Considering the pages analyzed, we will analyze singularly the informative elements, to give a collective idea on how information might be perceived from a user.
==== Where <website_internal_ia_where>
This factor is not properly treated by every page of the site; in some pages, like the ones found in @normal_pages the breadcrumb is present, while in others, like the ones preent in @list_of_links_pages, there is no indication of where to go inside the page or how to come back, apart from the back button.
Usually, the user can get the grasp of the single page context pretty quickly: most internal pages, like the ones analyzed, make the user understand the content pretty quickly: a title is present, the content is pretty easy to navigate and discern. The colorful layout is pretty coherent in most internal pages, so the user does not get tired with particularly fancy effects and can retrieve information pretty quickly understanding with ease where he has landed.
So, the user may actually be confused in trying to "build its mental minimap" of navigation given the lack of general coherence, also shown quite consistently here. In the pages where the breadcrumb lacks, the user may be forced to press the back button to "escape" from the current context.
==== Who <website_internal_ia_who>
This axis is respected consistently in every page analyzed; infact, the overlaying red menu describing on the top left the logo of the institution clearly describes who is behind the site and the overall structure, already described for the homepage, is present here with almost no changes to the discussion present.
==== Why <website_internal_ia_why>
When the user selects a specific page, it should be pretty clear on why to stay inside it; luckily, the so-called "safe zone" (area visible without scrolling), gives already a good enough context for the "normal pages" considered. In these, the text is divided into paragraphs pretty consistently and different kinds of formatting (like bold or italic) is present, giving a page some different elements to look at and overall, encouraging easier readability without increasing computatational effort.
The same can't be told for the so-called list of links pages, which give a comprehensive list of images and banners to click upon, while forcing the user to scroll to reach some useful content. It would be useful to reorganize the layout in a more consistent way, considering the site in itself is not generally bad, but again, lacks general coherence and this is displayed here even more.
==== What <website_internal_ia_what>
The content of pages is presented in a good way, given it is formatted differently and overall elements encourage website browsing and usually vertically displayed, giving the attention towards the content present in centre or inside the pag. The flow of browsing is clearly meant to follow a sequential tradition. Different formatting helps the user digesting the page content fairly well and the only graphical elements present are distinct enough to only help browsing.
A thing to note is that user is basically forced to scroll all the way down most of the times just to correctly section the page and understand in between all links and elements what can be useful for him immediately. The breadcrumb might be helpful, but the website should redesign how to organize categories to correctly reach information in an easy way, possibly reducing the computational effort given on how to categorize and keep in mind what different pages offer and understanding how to reach main things, with no logical categorizations given.
==== When <website_internal_ia_when>
Scrolling after all the main content, usually news are found within a specific page. Generally, though, this is not the main reason on why a user come to this website, so even if appreciated, the click rate on these elements is probably very low.
The layout in itself of how the news is not that different from other elements in site, but provide no additional information content which should be considered useful. A good thing is the presence of a grid of elements: this is not bad, considering it helps these stand out more from the rest of the page. So overall, while present, the approach should be revised, again possibly separating the news entirely from internal pages and present them in a coherent way.
==== How <website_internal_ia_how>
Moving in between pages is generally possible clicking on the breadcrumb present in @logical_category_path or clicking the breadcrumb present for normal pages, allowing to move with ease between elements in a fairly normal way.
Each page has different elements of interest, allowing the user to go ahead in navigation clicking only on related elements and access possible new things, according to the situation. There is also the option to search, which even if irregularly displaced compared to other websites of the same kind, is usable and allows to move on directly with browsing fairly quickly.
It would be better to also suggest the user related pages, to actually increase the chance of giving something useful to the user.
= Website Navigation <website_navigation>
The website shows some evident flaws that need to be discussed:
- there is no way to distinguish visited links from non-visited ones, both in internal pages or homepage. This is a bad choice from a usability perspective, especially in a website as big as this, where the user wants to find the information he wants as soon as possible and this can lead to user forgetting the page he came from and worsen his experience overall;
- a breadcrumb is shown only on some internal pages, while in others only the overlaying menu appears on top of everything, again, creating a discrepancy in experience between different pages, thus possibly overloading the user. Unless the user is already in a specific internal page, there is no possible way of going back other than clicking the browser back button.
However, there are some positives to include:
- the links are always opened in the main tab, without having new tabs open up or popups which can be quite annoying;
- while being incoherent in the choice of content presentation, text is usually the main website content and no videos/audios appear at anytime in internal pages, overall not distracting the user with content that will be avoided easily;
- at no point, there is the need to collect the user personal data; the website can be entirely navigated without being asked data once. This is actually a good point, making the website entirely browsable without collecting any more information from the user;
- apart from the colored link convention, there are no broken conventions in the general web usability ones to consider; navigation is fairly straightforward overall and user does not have to get used to new things to browse this site.
A thing to note is the _Cookie Policy_ window, which overlays most of the context when accessing the first time the site; a good thing should be a small window easily closable from the user in a matter of seconds.
The following figure describes the situation:
#figure(
image("images/cookie_popup.png", width: 50%),
caption: [Cookie window popup],
) <popup_cookie>
#pagebreak()
== Menu <website_menu>
Contrary to possibly the majority of sites and the links present on top of the site, there is a Menu icon present besides the search functionality and the logical breadcrumb, specifically appearing as the following:
#figure(
image("images/menu.png", width: 50%),
caption: [Menu button present on top of the site],
) <menu_button>
This is a pretty strange choice, considering usually websites offer a combination of a menu made by dropdown links, hence opening further section of the site or something in the line of a left-side menu, immediately visible to the user hence usable.
Its structure is also definitely not well made; when clicking, basically the entire page is covered with the links present inside of it and a grey window remains even with scrolling, as shown by the following figure.
#figure(
image("images/menu_open.png", width: 50%),
caption: [Menu when opened on site],
) <menu_opened>
From both a usability choice and a layout structure, this is annoying and should be reconsidered: for example, looking at other academic website of other universities, the approach is usually giving to the user the links clearly on top of the page fixed and then allowing him to move with ease.
So, all the links that are present inside @menu_opened should be moved to an horizontal menu always present on top to be possibly helpful to the user.
From a usability point of view, the links by themselves are pretty descriptive and tell the user where it will go when browsing pages with no problems in particular.
== Scrolling <website_scrolling>
Usually, a website pages need to be fairly easy to navigate, without giving the burden to the user in a spatial and usability sense. Users are used, infact, to scroll up to 1.3 ”screens” of a page and scrolling horizontally is considered a bad thing.
On this aspect, we consider that:
- usually, there are more scrolls needed than the threshold just written, considering many pages require, given the not-so-carefully designed layout discussed up until now, various scrolls to get to the end. Fortunately, the content is usually pretty dense and some pages may not even require this effort;
- on the horizontal scrolling aspect, the website actually does a pretty good job; pretty much never there is the need to scroll horizontally, testing on many pages, may them be internal or the homepage itself. This way, the bidimensional axis is kept usually vertically and, as said, in a good way.
Luckily, no infinite scrolling is present, definitely more suitable for different websites like blog/news related ones: here the effect would be completely counterintuitive and fairly negative.
== Attention Areas and Interface Design <website_attention_areas>
The content organization is important and should be easy to follow, capturing the most important components of the context easily, fast and with will to continue browsing effortlessly. We can divide the span of attention between "hot zones", considering the most important part is the left one (priority 1), then center (priority 2) and rightmost one (priority 3).
Consider also the "F-shape/ice cream cone", a common user-scanning pattern of pages left-to-right (for Western people), then redirecting him towards the goal almost instantaneously if done well, considering the users horizontal and vertical movements.
Potentially, the left area is often misused: the website is focused on giving attention on the center content of present in the main part (logo usually in on the leftmost part of the website, then there is the main content on the site and usually right some other navigation links/news links of sort; this structure is something which may be helpful, according to normal user habits). The menu is not present in a consistent or usable way, as discussed in @website_menu
The website does not try to impress the user with some special fancy things, not introducing something distracting in any case or which can be considered an example of "bloated design" or complex, technically speaking, to understand. On the many pages visited, there are also no examples of 3D Interfaces, given the site is static in its entirety, apart from the carousel present in homepage.
From a visual metaphor point of view, the website is pretty much poor: apart from the icon present in the overlaying red bar menu and some social sharing icons present for example in the homepage, there are no particular clues to note. Overall, the nature of the site is again pretty static and doesn't need any particular thing, other than presenting textual information in an easy way.
Usually, infact, many internal pages offer a "Download" button and some dropdown menus, such as the ones present in the following figure:
#figure(
image("images/visual_metaphor_1.png", width: 50%),
caption: [Symbols helpful for navigation],
) <visual_metaphor>
Talking about the font used, is not coherent both in terms of size and presentation. There are no resizing options present in sight and often, more colors and more variants (bold, italic) of similar fonts are combined with no coherence behind most of the times. Luckily on this aspect, there is no specific mix of uppercase and lowercase, so there is no computational effort added into the mix on this specific thing.
Luckily, though, the text is often composed of itemized lists, different formatting (highlighting keywords) and good enough spacing, not contributing to walls of text and pretty much being followable most of the time. So here, there is no "Lorem Ipsum Curse" involved: text is the content and, when it is, the job is conveyed simply and well.
The usage of blurbs is not present; giving a summary of sort for example in internal pages could work, then considering a good enough textual part rewarding the user with good information for his time on the site.
Images, also, are quite present meant to be clicked to reach further sections of the website, as present in @homepage_second_glance and @list_of_links_pages, not giving a decorative function but rather more part of the layout, again, without being coherent in their usage.
Also, as shown in @normal_pages, there is only a small graphic present in each internal page, which serves no real purpose apart from decoration. The choice is probably done to make the text stand out more in contrast to the background, which is understandable but also distracting.
Overall, finding information might be a tiring activity for the user: deepness requires multiple clicks, in the order of even 5/6 to get some specific information, which definitely overloads the user in his browsing experience. Information should be presented in a redesigned coherent way, displaying easily informative content and organzing its access in an easier way, reducing the number of clicks needed.
Luckily, also, there are no splash pages of any kind, giving the user a fairly linear sense of browsing within the site. The lacking aspect is the visual metaphor one: content is important, but also form is. The site mainly lacks coherence between all of its presentation.
== Page not Found <website_page_not_found>
The situation is handled in a standard and straightforward way. The main drawback is displaying 404 as a number, representing the usual "Page not Found" error code: this is known to people technically savvy but definitely not the majority of other users may not know what a 404 is.
As shown by the following figure, basically all there is to see is a clickable image redirecting entirely to the homepage, giving no other options or help to the user (which probably should be helpful, such as other useful links or giving him more information about his error, comforting him). The button inside the image is purely graphical, given the entire image redirects to the homepage itself.
#figure(
image("images/404.png", width: 50%),
caption: [Page not found],
) <404page>
#pagebreak()
== Search <website_search>
This functionality can be accessed clicking the lens icon present in @logical_category_path and it's a static search, given the user will safely type his query. The results will also be displayed as an internal search, giving the user a long search bar, allowing to input 50 characters then truncating the input (even if there is clearly more space visible to the user, you can't input more).
Usability talking, a good thing is that it stands out fairly simply as color from the background. Anyway, the search button is pretty small and may not be so visible (again, the layout of buttons seems to vary and to be consistent) - when expanded the search acquires the "textual box - search button" structure that users prefer, which is good.
An example of how the search bar appears is given here:
#figure(
image("images/search_bar.png", width: 60%),
caption: [Search bar appearance],
) <search_bar>
Now, let's consider how a search is done then, for example looking for "ISEE", so something a normal student would search trying to find some bureaucratic information.
#figure(
image("images/search.png", width: 60%),
caption: [A simple search result],
) <search_results>
As we can see here, the results are produced in list, responding to a request quite efficiently, considering there is no external query to search engines, keeping the computational cost on site and not redirecting the user towards other pages making him lose the focus. The approach is also useful: the results are displayed across all site and produce good outputs, finding useful pages, news, etc.
There are two main problems however:
- there are no filters on the site of any kind, even though the text clearly says "Advanced Search" in Italian, but betrays user expectations without giving him what he may want;
- there are also mixed languages results, so a native Italian speaker may easily find articles in Chinese, giving no informative/useful content whatsoever, other than mixing articles and results
The absence of filters is a bad thing, considering the user is basically forced, when using the search bar, to slowly go to the next page of the search, losing time with the hope of finding something which may be useful for him. Here, is possible to move to the previous page, to the next one or to the first and last one. A secondary thing to note is the poor layout of this search, inadequate for today's standards and similar to what search engines used to do years ago and not suitable for today website usability habits.
When no results from a search were found, a string comes up simply telling "Sorry, your search returned no results.", handling the situation simply and in a good way.
Another thing to note is the absence of vocal search, but there is a chatbot present inside pages, like the one seen here, clickable on "Do you need help?" ("Hai bisogno di aiuto?" in Italian) button, as shown here:
#figure(
image("images/chatbot_1.png", width: 60%),
caption: [Activating chatbot],
) <chatbot>
This can be a good idea, possibly aiding the user towards finding useful information when browsing inside pages, also giving useful contacts in case of the user getting lost. It works simply and fairly well, as displayed by the following image:
#figure(
image("images/chatbot_2.png", width: 50%),
caption: [Interaction with chatbot],
) <chatbot_interaction>
#pagebreak()
= Final evaluation and Feedback <website_feedback>
In this chapter, a final score will be given considering all the aspects analyzed above. To make this easier to visualize and to comprehend, a table was created to help the read of all valuable parameters for the analysis given in the previous chapters.
A score was assigned from 1 to 10, the average of which will produce the final grade.
#set align(center)
#tablex(
columns: 2,
header-rows: 1,
align: center + horizon,
auto-vlines: true, //put this to false to not have borders on the side
map-cells: cell => {
// color the cells based on the column
if cell.x == 1 {
cell.content = {
set text(black)
strong(cell.content)
}
}
cell
},
/* --- header --- */
[*Aspect considered*], [*Score*],
/* -------------- */
[General Website Structure], [6/10],
[Homepage], [6/10],
[Internal Pages], [5/10],
[Text], [7/10],
[Images], [7/10],
[Layout], [7/10],
[Search], [7/10],
)
#set align(left)
Another table was created to consider the value of each informative axis analyzed, comprehensively created for homepage and internal pages axes values.
#set align(center)
#tablex(
columns: 2,
header-rows: 1,
align: center + horizon,
auto-vlines: true, //put this to false to not have borders on the side
map-cells: cell => {
// color the cells based on the column
if cell.x == 1 {
cell.content = {
set text(black)
strong(cell.content)
}
}
cell
},
/* --- header --- */
[*Axis analyzed*], [*Score*],
/* -------------- */
[Where], [7/10],
[Who], [8/10],
[Why], [7/10],
[What], [7/10],
[When], [7/10],
[How], [7/10],
)
#set align(left)
== Comments on final evaluation
Overall, the University of Padua website has a good foundation but needs improvement in several key areas to provide an optimal user experience.
The homepage is cluttered with too many links and images, lacking a clear visual hierarchy and logical organization. This overwhelms users rather than guiding them efficiently to important content. The internal pages are better structured, but navigation between pages is inconsistent. The absence of visible links to indicate visited pages also hinders usability.
Regarding information architecture, the website does not always clearly communicate the purpose and value proposition of each page. The content itself is reasonably well-presented, with good use of formatting, images and multimedia. However, the layout and information flow needs to be streamlined: accessing deeper pages often requires too many clicks and the overall layout is definitely incoherent and quite disorganized, not helping the overall navigation. Overall visual design is rather generic and could use more distinctive elements related to the university brand.
The search functionality works adequately but needs more advanced options like filters to make it more useful. Breadcrumbs and visited links should be revisited making them more accessible and usable overall, lowering the user computational effort in trying to organize the big quantity of information present, which in its text content is fairly well presented but lacks in general user experience.
In summary, the website has the key content but falls short on information architecture, navigation and optimizing the user experience. A redesign focused on simplifying and better organizing content, navigation and layout would significantly improve usability. With its large user base, the University of Padua should prioritize creating a website that makes accessing information efficient, clear and intuitive for all users.
The overall average score of 6.5/10 indicates the website is reasonably decent but has room for improvement. Addressing the issues raised in this analysis can help the University better serve its students, faculty and broader stakeholders online. |
https://github.com/TypstApp-team/typst | https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/text/raw-syntaxes.typ | typst | Apache License 2.0 | // Test code highlighting with custom syntaxes.
---
#set page(width: 180pt)
#set text(6pt)
#set raw(syntaxes: "/files/SExpressions.sublime-syntax")
```sexp
(defun factorial (x)
(if (zerop x)
; with a comment
1
(* x (factorial (- x 1)))))
```
|
https://github.com/protohaven/printed_materials | https://raw.githubusercontent.com/protohaven/printed_materials/main/common-tools/turning_tools.typ | typst |
#import "../environment/env-protohaven-class_handouts.typ": *
= Turning Tools
There are lots of types and styles of turning tools, many more than are covered in this handout.
Here at Protohaven, the shop is equipped with the following turning tools:
- Parting Tool
- Square tip chisel
- Round tip chisel
- Beading tool
== Parting Tool
== |
|
https://github.com/compsci-adl/Constitution | https://raw.githubusercontent.com/compsci-adl/Constitution/master/src/schedule1.typ | typst | #let adopted-date = datetime(
year: 2024,
month: 10,
day: 20,
)
#set document(
title: "Schedule 1 to the CS Club Constitution",
author: "The University of Adelaide Computer Science Club",
)
#set page(
paper: "a4",
margin: 2cm,
)
#set text(
lang: "en",
region: "AU",
font: "New Computer Modern",
size: 10pt,
)
#set heading(
numbering: "1.1",
)
#show heading: it => {
set block(below: 1em)
if it.numbering == none {
it
} else {
block(counter(heading).display(it.numbering) + h(1em) + it.body)
}
}
#show heading.where(
level: 1,
): it => {
set block(above: 2em)
smallcaps(it)
}
#set enum(
numbering: "(a.i.A)",
indent: 1em,
body-indent: 1em,
)
#let appendix(body) = {
set heading(numbering: "A", supplement: [Appendix])
counter(heading).update(0)
body
}
/* -------------------- start content -------------------- */
#v(1fr)
#align(
center,
image(
"img/csc-logo.svg",
width: 50%,
)
)
#v(1fr)
#align(
center,
[
#set par(leading: 1.15em)
#text(size: 32pt)[*SCHEDULE 1 \ TO THE CONSTITUTION*] \
#text(size: 20pt)[#line(length: 80%)] \
#text(size: 22pt)[*THE UNIVERSITY OF ADELAIDE COMPUTER SCIENCE CLUB*]
#v(3fr)
#text(size: 20pt)[#smallcaps([*Committee Composition*])]
]
)
#pagebreak()
#set page(
margin: 3cm,
numbering: "i"
)
#counter(page).update(1)
#show outline.entry.where(
level: 1,
): it => {
v(16pt, weak: true)
strong(it)
}
#outline(indent: 1.5em)
#pagebreak()
#set page(numbering: "1")
#counter(page).update(1)
= Introduction
== Purpose
The purpose of this Schedule is to establish a register of positions within the Club and detail the composition of the non-Executive Committee and their responsibilities.
== Definitions
Definitions of terms used in this Schedule are as defined in the Constitution.
== Precedence of Positions
Positions are defined @composition, in order of precedence.
== Amendments
+ This Schedule may be amended by the Executive by a simple majority vote. This includes the ability to establish new positions, or to remove existing positions, as well as to amend the responsibilities of existing positions.
+ Any amendments to this Schedule must be consistent with the Constitution and the Clubs Policy of YouX.
= Composition <composition>
+ The Executive Committee consists of:
+ the President;
+ the Vice-President;
+ the Treasurer;
+ the Secretary; and
+ the Partnerships & Sponsorships Manager.
+ The non-Executive Committee consists of:
+ Open Source & Infrastructure Manager;
+ the Events Manager;
+ the Social Media & Marketing Manager;
+ the Design Manager;
+ the Duck Lounge Liaison;
+ up two two Partnerships & Sponsorships Officers;
+ up to two Open Source Officers;
+ up to four Events Officers;
+ up to two Social Media & Marketing Officers;
+ up to two Design Officers;
+ the Human Resources (HR) Officer;
+ the Postgraduate Representative;
+ the First-Year Representative; and
+ optionally, the Advisor to the Executive.
+ The Committee comprises teams that are managed by the managers or the Executive. They are:
+ the Sponsorships Team, led by the Partnerships & Sponsorships Manager;
+ the Open Source Team, led by the Open Source & Infrastructure Manager;
+ the Events Team, led by the Events Manager;
+ the Social Media Team, led by the Social Media & Marketing Manager;
+ the Design Team, led by the Design Manager; and
+ the Human Resources Team, comprising the Duck Lounge Liaison, Human Resources Officer, Postgraduate Representative, and the First-Year Representative, led by the Executive.
+ The number of positions in the Committee may be limited by the Executive at their discretion. The Executive may limit the number of positions in the Committee to a number less than the number of nominations received. The current composition of the Committee as approved by the Executive is listed in @table-positions.
= Executive Positions
Executive positions are defined in the Constitution, including information regarding each role's responsibilities and eligibility criteria.
= Office Bearing Positions
== Sponsorships Team
=== Partnerships & Sponsorships Manager
The responsibilities and eligibility criteria for the Partnerships & Sponsorships Manager are defined in the Constitution.
=== Partnerships & Sponsorships Officer
+ The Partnerships & Sponsorships Officer is responsible for:
+ establishing and maintaining partnerships and sponsorships, which includes, but is not limited to checking and sending emails, and working on the prospectus; and
+ working closely with the Partnerships & Sponsorships Manager to achieve the objectives of the Sponsorships Team and the Club as a whole.
+ To be eligible for the position, the nominee must:
+ undergo an interview with the incumbent Sponsorships Team and at least one member of the Executive;
+ upon passing the interview, attend meetings and learn how the Sponsorships Team operates; and
+ be recommended by a member of the Sponsorships Team as being competent to be a Partnerships & Sponsorships Officer.
== Open Source Team
=== Open Source & Infrastructure Manager
+ The Open Source & Infrastructure Manager is responsible for:
+ managing the Club's infrastructure such as the website and servers;
+ overseeing the Club's open source initiative by managing projects and driving the initiative forward;
+ coordinating and delegating tasks to the Open Source Officers and other contributors; and
+ managing membership data (alongside the Secretary).
+ To be eligible for the position, the nominee must:
+ have previously served on the Committee (unless there are no valid nominations from within the Committee);
+ be a current University of Adelaide student; and
+ be studying a computer science, software engineering, or information technology-related degree.
=== Open Source Officer
+ The Open Source Officer is responsible for:
+ managing the Club's open source projects; and
+ helping with onboarding efforts and education.
+ All members of the Club are eligible to nominate.
== Events Team
=== Events Manager
+ The Events Manager is responsible for:
+ organising events, such as the time and location, bookings, food, and other logistics;
+ managing and delegating tasks to the Events Officers and volunteers;
+ managing bookings and venue hires;
+ overseeing events and maintaining a standard of quality; and
+ at a minimum attending and helping with every 1 out of 3 events.
+ To be eligible for the position, the nominee must:
+ have previously served on the Committee (unless there are no valid nominations from within the Committee); and
+ be a current University of Adelaide student.
=== Events Officer
+ The Events Officer is responsible for:
+ organising events, such as the time and location, bookings, food, and other logistics;
+ assisting with bookings and venue hires; and
+ at a minimum attending and helping with every 1 out of 3 events.
+ All members of the Club are eligible to nominate.
== Social Media Team
=== Social Media & Marketing Manager
+ The Social Media & Marketing Manager is responsible for:
+ overseeing the social media accounts of the Club;
+ managing and delegating tasks to the Social Media & Marketing Officers and volunteers;
+ the promotion of Club activities and events;
+ the promotion of information from our sponsors and partners; and
+ the marketing of the Club, and creating content for brand engagement.
+ To be eligible for the position, the nominee must:
+ have previously served on the Committee (unless there are no valid nominations from within the Committee); and
+ be a current University of Adelaide student.
=== Social Media & Marketing Officer
+ The Social Media & Marketing Officer is responsible for:
+ the promotion of Club activities and events;
+ the promotion of information from our sponsors and partners; and
+ the marketing of the Club, and creating content for brand engagement.
+ All members of the Club are eligible to nominate.
== Design Team
=== Design Manager
+ The Design Manager is responsible for:
+ overseeing the branding and design of the Club, ensuring that the material created for the Club is consistent with the brand identity and goals of the Committee and the Club as a whole;
+ creating graphics for the Club, including but not limited to posters, banners, logos, and other graphics as required by the Committee;
+ working closely with the Sponsorships Team to ensure that sponsor brand guidelines are being met; and
+ managing and delegating tasks to the Design Officers and volunteers.
+ To be eligible for the position, the nominee must:
+ have previously served on the Committee (unless there are no valid nominations from within the Committee); and
+ be a current University of Adelaide student.
=== Design Officer
+ The Design Officer is responsible for:
+ creating graphic designs and illustrations as directed by the Design Manager and in collaboration with the Social Media Team; and
+ working closely with the Sponsorships Team to ensure that sponsor brand guidelines are being met.
+ All members of the Club are eligible to nominate.
== Human Resources Team
=== Duck Lounge Liaison
+ The Duck Lounge Liaison is responsible for:
+ helping with restocking food and drinks;
+ liaising with the University regarding the Duck Lounge;
+ making recommendations to the Committee regarding the facilities in the Duck Lounge, including but not limited to furniture, equipment, and decorations; and
+ maintenance of the Duck Lounge, ensuring the Duck Lounge is kept clean.
+ All members of the Club are eligible to nominate.
=== Human Resources Officer
+ The Human Resources Officer is responsible for:
+ ensuring that the Club is a safe and inclusive environment for all members;
+ being available to hear concerns from members regarding the Club and/or its members and taking responsible action;
+ making recommendations to the Committee regarding diversity and inclusion in the Club;
+ overseeing the volunteering initiative, helping other teams with onboarding; and
+ helping with restocking food and drinks.
+ All members of the Club are eligible to nominate.
=== Postgraduate Representative
+ The Postgraduate Representative is responsible for:
+ representing the interests of postgraduate students in the Club;
+ liaising with postgraduate students, gathering feedback about what more the Club and the relevant departments at the University can do for them;
+ running any postgraduate-specific events, where necessary; and
+ helping with restocking food and drinks.
+ To be eligible for the role, the nominee must:
+ be a postgraduate student studying a computer science, software engineering, or information technology-related degree (coursework or research) at the University of Adelaide.
=== First-Year Representative
+ The First-Year Representative is responsible for:
+ representing the interests of first-year students in the Club;
+ liaising with first-year students, gathering feedback about what more the Club and the relevant departments at the University can do for them;
+ running any first-year-specific events, where necessary (and qualified); and
+ helping with restocking food and drinks.
+ To be eligible for the role, the nominee must:
+ be a first-year student studying a computer science, software engineering, or information technology-related undergraduate degree at the University of Adelaide.
+ The position is elected at the SGM in semester 1 each year, rather than the AGM.
== Advisor to the Executive
+ The Advisor to the Executive is responsible for:
+ assisting the new Executive team during the handover process;
+ participating in Executive meetings and providing advice (but has no decision-making power);
+ To be eligible for the position, the nominee must:
+ must have previously served on the Executive Committee; and
+ cannot simultaneously be on the Executive Committee.
+ The Executive Committee may decide whether an advisor is necessary after the AGM. If they deem an advisor to be unnecessary, this role may be left unfilled.
+ The Advisor to the Executive is chosen by the Executive and is a non-elected role. Therefore, they do not hold the power to cast a vote.
= General Responsibilities
All members of the Committee have a responsibility to:
+ attend all meetings of the Committee and General Meetings;
+ act in the best interests of the Club;
+ act in accordance with the Constitution and this Schedule; and
+ act in accordance with the Clubs Policy of YouX.
#pagebreak()
#show: appendix
= Table of Positions and Their Number of Offices <table-positions>
#set table(
stroke: (x, y) => if (y == 0) {
(bottom: 0.7pt + black)
},
)
#align(
center,
[
#table(
columns: 2,
table.header([*Position*], [*Amount*]),
[President],[1],
[Vice-President],[1],
[Treasurer],[1],
[Secretary],[1],
[Partnerships & Sponsorships Manager],[1],
[Open Source & Infrastructure Manager], [1],
[Events Manager],[1],
[Social Media & Marketing Manager],[1],
[Design Manager],[1],
[Duck Lounge Liaison],[1],
[Open Source Officer],[2],
[Partnerships & Sponsorships Officer],[2],
[Events Officer],[4],
[Social Media & Marketing Officer],[2],
[Design Officer],[2],
[Human Resources Officer],[1],
[Postgraduate Representative],[1],
[First-Year Representative],[1],
[Advisor to the Executive], [1],
table.hline(stroke: 0.7pt),
[*Total*], [*26*],
)
]
)
#pagebreak()
*THIS CONSTITUTION HAS BEEN REVIEWED AND APPROVED BY THE EXECUTIVE.*
#v(0.5cm)
*DATE OF EXECUTIVE APPROVAL:* #adopted-date.display("[day]th of [month repr:long], [year]")
|
|
https://github.com/akrantz01/resume | https://raw.githubusercontent.com/akrantz01/resume/main/template/overrides.typ | typst | MIT License | // Checks if a string looks like an integer
#let integer-regex = regex("^[0-9]+$")
#let is-integer(value) = {
if value.match(integer-regex) != none {
true
} else {
false
}
}
// Converts a key specifier from the layout to a path within the data
#let key-to-path(key) = {
key.split(".").map(segment => {
if is-integer(segment) {
int(segment)
} else {
segment
}
}).rev()
}
// Recursively updates a value in a nested container using the provided path
#let set-value(parent, path, value) = {
let key = path.pop()
let child = parent.at(key)
if (type(child) == dictionary or type(child) == array) and path.len() > 0 {
parent.at(key) = set-value(child, path, value)
} else {
parent.at(key) = value
}
parent
}
// Applies overrides from the layout to the data
#let apply-overrides(data, overrides) = {
for (key, value) in overrides {
data = set-value(data, key-to-path(key), value)
}
data
}
|
https://github.com/huyufeifei/grad | https://raw.githubusercontent.com/huyufeifei/grad/master/docs/paper/src/template/fakebold.typ | typst | #let fakebold(base-weight: none, s, ..params) = {
set text(weight: base-weight) if base-weight != none
set text(..params) if params != ()
context {
set text(stroke: 0.02857em + text.fill)
s
}
}
#let regex-fakebold(reg-exp: ".", base-weight: none, s, ..params) = {
show regex(reg-exp): it => {
fakebold(base-weight: base-weight, it, ..params)
}
s
}
#let show-fakebold(reg-exp: ".", base-weight: none, s, ..params) = {
show text: it => {
regex-fakebold(reg-exp: reg-exp, base-weight: base-weight, it, ..params)
}
s
}
#let cn-fakebold(s, ..params) = {
regex-fakebold(reg-exp: "[\p{script=Han}!-・〇-〰—]", base-weight: "regular", s, ..params)
}
#let show-cn-fakebold(s, ..params) = {
show-fakebold(reg-exp: "[\p{script=Han}!-・〇-〰—]", base-weight: "regular", s, ..params)
}
// https://github.com/typst/typst/issues/2749
#let _skew(angle, vscale: 1, body) = {
let (a, b, c, d)= (1, vscale*calc.tan(angle), 0, vscale)
let E = (a + d)/2
let F = (a - d)/2
let G = (b + c)/2
let H = (c - b)/2
let Q = calc.sqrt(E*E + H*H)
let R = calc.sqrt(F*F + G*G)
let sx = Q + R
let sy = Q - R
let a1 = calc.atan2(F,G)
let a2 = calc.atan2(E,H)
let theta = (a2 - a1) /2
let phi = (a2 + a1)/2
set rotate(origin: bottom+center)
set scale(origin: bottom+center)
rotate(phi, scale(x: sx * 100%, y: sy * 100%, rotate(theta, body)))
}
#let regex-fakeitalic(reg-exp: ".", ang: -0.32175, spacing: none, s) = {
show regex(reg-exp): it => {
box(place(_skew(ang, it)), baseline: -0.7em) + hide(it)
}
s
if spacing != none {h(spacing)}
}
#let fakeitalic(ang: -0.32175, s) = regex-fakeitalic(reg-exp: "[^ ]", ang: ang, s) |
|
https://github.com/csskevin/typst-iaik-bachelor-thesis-template | https://raw.githubusercontent.com/csskevin/typst-iaik-bachelor-thesis-template/master/README.md | markdown | MIT License | # IAIK Bachelor Thesis Template
Install with
```sh
git clone https://github.com/csskevin/typst-iaik-bachelor-thesis-template.git ~/.local/share/typst/packages/local/iaik-bachelor-thesis-template/1.0.0
```
Init project with template
```sh
typst init @local/iaik-bachelor-thesis-template:1.0.0
```
Use template with import statement
```typst
#import "@local/iaik-bachelor-thesis-template:1.0.0": conf
#show: conf.with(
title: "Your Title",
author: "<NAME>",
keywords: ("Side-Channel", "Hardware"),
supervisors: ("Supervisor Name", "Maybe another supervisor"),
institute: "Institute of Applied Information Processing and Communications",
university: "Graz University of Technology",
curriculum: "Curriculum Name",
location_date: "Graz, Month Year",
abstract: [
#lorem(400)
]
)
#outline()
#pagebreak()
= Introduction
#lorem(200)
```
|
https://github.com/jrihon/multi-bibs | https://raw.githubusercontent.com/jrihon/multi-bibs/main/README.md | markdown | MIT License | # Multi-bibs
A typst library to make multiple bibliographies in a single document.
DISCLAIMER : rudimentary, but functional!
## Plugin
```typst
//! rootdirectory/chapters/01_chapter/mod.typ
#import "../../lib/multi-bibs.typ": *
#import "bib_01_chapter.typ": biblio
#include "introduction.typ"
// At the end of the chapter, call the bibliography
#mbibliography(biblio)
```
```typst
//! rootdirectory/chapters/01_chapter/introduction.typ
#import "../../lib/multi-bibs.typ": *
#import "bib_01_chapter.typ": biblio
= Introduction
This is the start of the manuscript.
I am writing a sentence here and here follows a citation #mcitation(("foo2023bar"), biblio).
The second sentence includes another citation #mcitation(("qoo1973qux"), biblio).
```
## Docs
```typst
//! Function signatures :
// manual citation function
#mcitation(references: array<string>, biblio: dict)
// manual bibliography function
#mbibliography(biblio: dict)
```
## Usage
1. Make a new `CHAPTER_X/` directory.
2. Add `mod.typ` and `bibliography_X.yml` to `CHAPTER_X/`.
3. Add `CHAPTER_X/` to the the `convert.sh` script and run it to instance an empty bibliography. This generates a `bib_CHAPTER_X.typ` file in `CHAPTER_X/`.
4. Work on the manuscript, use the `#mcitation()` function to cite your references.
- Run the `convert.sh` to refresh the bibliography when adding new references.
5. Add the `#mbibliography(biblio)` function at the very end of the chapter, preferably in `mod.typ`.
```bash
# Usage of parsetyp.py
$ cd rootdirectory/chapters/
$ python3 parsetyp.py CHAPTER_X/
```
## Restrictions!
There are several rigids parts of the manuscript :
- `CHAPTER_X` directory names are unique!
- `bibliography_X.yml` file names are unique!
Or else, unique links to the correct bibliography can become ambiguous.
</br>
The file structure needs to be respected. Relative imports in typst are still not finetuned and this can make for unrecognised imports of the following structure is not followed :
```
rootdirectory/
- chapters/
- CHAPTER_X/
mod.typ, bibliography_X.yml
- CHAPTER_Y/
mod.typ, bibliography_Y.yml
- lib/
multi-bibs.typ
```
### Filestructure example
```
rootdirectory/
- chapters/
parsetyp.py # parses mod.typ for data !
convert.sh # convert foo.bib to foo.yml; hayagriva dependency !
- 00_title/
- 01_chapter/
mod.typ # mandatory file per chapter!
bib_01_chapter.typ # generated by parsetyp.py
introduction.typ
methods.typ
results.typ
discussion.typ
01_chapter.yml # bibliography.yml !
- 02_chapter/
...
- 03_chapter/
...
- lib/
multi-bibs.typ # source of the lib !
- output/
main_test.pdf
- src/
fonts/
```
## TODO
- Wait until we can implement our own element functions in `Typst` so we can ditch the python script
- Implement citations where consecutive numbering goes `1-4`, not `1,2,3,4`
- Figure out how to make variables more global to avoid pesky import calls in every file?
- Pathing in the generated `biblio.bibyml` is somewhat hardcoded and hopefully I can change this later
- Allow less strict requirements for the structuring of the filesystem in the project
|
https://github.com/MobtgZhang/sues-thesis-typst-bachelor | https://raw.githubusercontent.com/MobtgZhang/sues-thesis-typst-bachelor/main/chapters/cover.typ | typst | MIT License | #import "../thesis.typ": chineseunderline,fontstypedict,fontsizedict
#import "../info.typ": *
#set align(center + horizon)
#box(
grid(
columns: (auto, auto),
gutter: 0.4em,
image("../logo.png", height: 3em, fit: "contain")
)
)
#text("Shanghai University of Engineering Science", font: fontstypedict.宋体, size: fontsizedict.二号, weight: "semibold")
#v(1em)
#text("毕业设计(论文)", font: fontstypedict.黑体, size: fontsizedict.小初, weight: "semibold")
#set text(fontsizedict.二号)
#v(60pt)
#grid(
columns: (80pt, 300pt),
[
#set align(right + top)
题目:
],
[
#set align(center + horizon)
#chineseunderline(bachelor_chinese_title, width: 300pt, bold: true)
]
)
#v(60pt)
#set text(fontsizedict.三号)
#let fieldname(name) = [
#set align(right + top)
#strong(name)
#h(0.25em)
]
#let fieldvalue(value) = [
#set align(center + horizon)
#set text(font: fontstypedict.宋体)
#grid(
rows: (auto, auto),
row-gutter: 0.2em,
value,
line(length: 100%)
)
]
#grid(
columns: (80pt, 280pt),
row-gutter: 1em,
fieldname(text("学") + h(2em) + text("院")),
fieldvalue(bachelor_chinese_faculty_name),
fieldname(text("专") + h(2em) + text("业")),
fieldvalue(bachelor_chinese_major_name),
fieldname(text("姓") + h(2em) + text("名")),
fieldvalue(bachelor_chinese_candidate_name),
fieldname("指导教师"),
fieldvalue(bachelor_chinese_supervisor_name),
fieldname("完成日期"),
fieldvalue(bachelor_chinese_finish_date_time),
)
#pagebreak()
|
https://github.com/gvariable/billryan-typst | https://raw.githubusercontent.com/gvariable/billryan-typst/master/template.typ | typst | #import "@preview/cetz:0.0.1"
#let photo_scale = 5;
#let photo_width = 295pt / photo_scale;
#let photo_height = 413pt / photo_scale;
#let bounding_box_height = 1.1em;
#let box_shift = 1.5pt;
#let image_path = "assets/";
#let font = ("IBM Plex Serif", "Times New Roman");
#let font_size = 10pt;
// Add document specific meta data.
#set document(title: "resume template", author: "gvariable")
// Drawing a progress bar with different colors based on a ratio.
#let progressbar(ratio, width: 120pt, height: 10pt, fg_color: rgb("#9BFF93"), bg_color: rgb("#E2E2E2")) = {
let fg = width * ratio;
let bg = width - fg;
// the leading arc
let arc1 = cetz.canvas({
import cetz.draw: *
arc(
(0,0), start: 90deg, delta: 180deg, radius: height / 2, fill: if ratio == 0 { bg_color } else { fg_color }
)
})
// the ending arc
let arc2 = cetz.canvas({
import cetz.draw: *
arc(
(0,0), start: 270deg, delta: 180deg, radius: height / 2, fill: if ratio == 1 { fg_color } else { bg_color }
)
})
// frontground rectangle
let fg = rect(
width: fg, height: height, fill: rgb("#9BFF93"), stroke: (left: none, right: none, rest: 1pt)
)
// background rectangle
let bg = rect(
width: bg, height: height, fill: bg_color, stroke: (left: none, right: none, rest: 1pt)
)
stack(dir: ltr, arc1, fg, bg, arc2)
}
#let icon(name, shift: 1.5pt, height: bounding_box_height) = {
box(
baseline: shift,
height: height,
image(image_path + name)
)
h(3pt)
}
// Presenting skills and media details.
#let meta(name, services, talents) = {
set text(font_size)
let icon = icon.with(shift: -1pt)
let progressbar = progressbar.with(width: bounding_box_height * 15, height: bounding_box_height)
// skills
let talent(name, rating) = {
align(right)[#name #h(3pt) #box(baseline: 1.5pt, progressbar(rating))]
}
let talents = talents.sorted(key: val => val.at(1))
.rev()
.map(
val => {talent(val.at(0), val.at(1))}
).join([ \ ]);
// medias
let services = services.map(service => {
icon(service.name)
if "display" in service.keys() {
if "link" in service.keys() {
link(service.link)[#service.display]
}else{
box(baseline: -3pt)[#service.display]
}
}else{
link(service.link)
}
}
).join([ \ ])
align(left)[= #name \ ]
grid(
columns: (1fr, 1.5fr, 0.3fr),
gutter: 15pt,
services,
talents
)
}
#let date(period) = {
icon("calendar.svg")
period
}
#let location(loc) = {
icon("location.svg")
loc
}
#let term(period, postion) = {
box(width: 1fr)[
#align(right)[
#date(period)
#h(1em)
#location(postion)]
]
}
#let profile(photo: "", name: "", services:(), talents: ()) = {
set text(font_size + 2pt, weight: "medium")
set block(spacing: 1pt)
grid(
columns: (photo_width, auto),
column-gutter: 10pt,
image(photo, width: photo_width, height: photo_height),
meta(name, services, talents)
)
}
#let conf(photo: "", name : "", medias: (), talents: (), tagline:[], body: []) = {
set text(font: font, size: font_size)
set page(
margin: (x: 5em, y: 4em),
)
set align(left + top)
show "Brief Introduction": it => {
[*#it*]
}
set list(indent: 4pt)
show heading.where(
level: 2
) : it => block[
#set text(font: font, weight: "bold", size: font_size + 2pt)
#set align(left)
#emph(it.body)
#v(-10pt)
#line(length: 100%)
]
show link: it => {
let rect = rect.with(stroke: rgb("#B3FFFF"))
box(
height: bounding_box_height,
rect(inset: (y: 1pt), outset: (y: 2pt))[#underline(it)]
)
}
profile(
photo: photo,
name : name,
services: medias,
talents: talents
)
[
#v(1em)
#tagline
\
#body
]
} |
|
https://github.com/goshakowska/Typstdiff | https://raw.githubusercontent.com/goshakowska/Typstdiff/main/tests/test_complex/para/para.typ | typst | In this report, we will explore the
various factors that influence _fluid
dynamics_ in glaciers ha they
contribute to the formation and
behaviour of these natural structures.
All manuscripts are to be submitted electronically to the ScholarOne Abstracts site created for each conference. The manuscript upload will be enabled several weeks after acceptance notices have been sent. Presenting authors of accepted papers will receive an email with instructions when manuscript submission opens. It is important that presenting authors keep their email addresses up-to-date so they do not miss this notice.
It is the responsibility of the author to obtain any required government or company reviews for their papers in advance of publication. Start early to determine if the reviews are required; this process can take several weeks.
|
|
https://github.com/DashieTM/ost-5semester | https://raw.githubusercontent.com/DashieTM/ost-5semester/main/web3/weeks/week2.typ | typst | #import "../../utils.typ": *
#section("React")
- not a framework, it's a library
- made by meta...
#subsection("UI frameworks provide:")
- structure definition
- event handling
- view update
#subsection("Javascript and XML (JSX)")
#text(red)[*HTML in javascript*]
```tsx
function HenloBirb(props: any) {
return (
<div>
Henlo {props.name}
</div>
)
}
function App() {
return (
<div>
<HenloBirb name="Borb"/>
</div>
)
}
```
#subsubsection("Differentiation of JSX and regular JavaScript")
#text(
teal,
)[JSX or TSX is just a preprocessor declaration that will be replaced with react
library functions]
```tsx
import React from 'react'
function Container(props) {
return <div
className="container">
{props.children}
</div>
}
// will be turned into:
import React from 'react'
function Container(props) {
return React.createElement("div",
{className:"container"},
props.children
)
}
```
#align(center, [#image("../../Screenshots/2023_09_28_02_38_07.png", width: 80%)])
#subsubsubsection("Limitations")
- class is a predefined identifier in Javascript, hence you need to use className
instead for html tags. ```tsx
function Container(props) {
return (
<div className="somehting">{}</div>
)
}
```
- react components are written with an uppercase letter in order to differentiate
between HTML and react tags ```tsx
// note the uppercase name
function Whatever() {
return (
<div>lel</div>
)
}
```
- styles have to be defiend with an object in JS/TS *not* directly as css inside
html:\
CSS files are still preferred! This is just for inline ```tsx
function Container(props) {
const style = {
display: 'flex’,
width: '100%’,
minHeight: 300,
};
return <div style={style}>{props.children}</div>;
}
```
- conditional rendering: ```tsx
// &&
<Container>
{ error &&
<Message>
Error: {error}
</Message>
}
</Container>
// if else with ternary
<Container>
{ error
? <span>
Error: {error}
</span>
: <span>OK!</span>
}
</Container>
```
- parameter deconstruction: ```tsx
const HelloMessage = (props) => <div>Hello {props.name}</div>;
const HelloMessage = ({ name }) => <div>Hello {name}</div>;
```
- class components ```tsx
class HelloMessage extends React.Component {
render() {
return <div>Hello {this.props.name}</div>
}
}
```
- mostly unused, but will still work for a very long time
- #text(
red,
)[In order to show anything at all, you need to mount react components to root
components:]
```tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
```
- you can have multiple root components on a website
#subsubsubsection("Props")
- #text(purple)[Props are always read-only]
#subsubsubsection("State")
This is used to manipulate the properties of the read-only props object. In
other words, we will re-render every time a state has changed! *We can do this
by using the _useState_ function* ```tsx
const [value, setValue] = useState(0);
// value is the variable to be used
// setValue is the setter
// useState(0) defines the initial value, which will be 0
// example:
import { useState } from 'react';
function Counter() {
const [counter, setCounter] = useState(0);
const increment = () => setCounter(counter + 1);
return (
<div>
<p>{counter}</p>
<button onClick={increment}>Increment Counter</button>
</div>
)
}
```
#text(
red,
)[NOTE: *useState* may not be used within if statements! -> it manipulates the
state itself, and therefore has to be the same no matter what.] However this
does not matter that much, as useState only creates a hook to be used when
needed, it has no functionality otherwise.
#subsection("Reconciliation")
- React component are rendered as virtual DOM
- each state change creates a new virtual DOM
- new and old DOM are compared
- only then is the actual DOM in the browser created
#align(center, [#image("../../Screenshots/2023_09_28_04_34_13.png", width: 70%)])
#subsubsection("Explicit state for components")
This allows you to specify what the state should include during creation of the component.
```tsx
class Counter extends React.Component {
constructor() {
this.state = { count: 0 }
}
handleCounted = () => {
this.setState(state => ({count: state.count + 1}))
}
render() {
<div>
<p>You clicked {this.state.count} times</p>
<button onClick={this.handleCounted}>
Click me
</button>
</div>
}
}
```
#subsection("Fomular Example")
```tsx
function LoginForm() {
const [password, setPassword] = useState("");
const [username, setUsername] = useState("");
return (
<form>
<div>
<label>Username</label>
<input value={username} type="text" onChange={e => setUsername(e.target.value)} />
</div>
<div>
<label>Password</label>
<input value={password} type="password" onChange={e => setPassword(e.target.value)}/>
</div>
<div>
<button type="submit" onClick={handleSubmit}>Login</button>
</div>
</form>
)
}
```
#text(red)[Components that are handled onChange are called *Controlled Components*.]
Note the e.target.value that takes the event and puts the value into the state on each input the user makes.
#subsection("Widget Libraries")
- Semantic UI React
- Reactstrap (Bootstrap for React)
- Material-UI
- Atlaskit
|
|
https://github.com/RaphGL/ElectronicsFromBasics | https://raw.githubusercontent.com/RaphGL/ElectronicsFromBasics/main/DC/chap3/5_safe_practices.typ | typst | Other | #import "../../core/core.typ"
=== Safe practices
If at all possible, shut off the power to a circuit before performing
any work on it. You must secure all sources of harmful energy before a
system may be considered safe to work on. In industry, securing a
circuit, device, or system in this condition is commonly known as
placing it in a #emph[Zero Energy State]. The focus of this lesson is,
of course, electrical safety. However, many of these principles apply to
non-electrical systems as well.
Securing something in a Zero Energy State means ridding it of any sort
of potential or stored energy, including but not limited to:
- Dangerous voltage
- Spring pressure
- Hydraulic (liquid) pressure
- Pneumatic (air) pressure
- Suspended weight
- Chemical energy (flammable or otherwise reactive substances)
- Nuclear energy (radioactive or fissile substances)
Voltage by its very nature is a manifestation of potential energy. In
the first chapter I even used elevated liquid as an analogy for the
potential energy of voltage, having the capacity (potential) to produce
current (flow), but not necessarily realizing that potential until a
suitable path for flow has been established, and resistance to flow is
overcome. A pair of wires with high voltage between them do not look or
sound dangerous even though they harbor enough potential energy between
them to push deadly amounts of current through your body. Even though
that voltage isn\'t presently doing anything, it has the potential to,
and that potential must be neutralized before it is safe to physically
contact those wires.
All properly designed circuits have \"disconnect\" switch mechanisms for
securing voltage from a circuit. Sometimes these \"disconnects\" serve a
dual purpose of automatically opening under excessive current
conditions, in which case we call them \"circuit breakers.\" Other
times, the disconnecting switches are strictly manually-operated devices
with no automatic function. In either case, they are there for your
protection and must be used properly. Please note that the disconnect
device should be separate from the regular switch used to turn the
device on and off. It is a safety switch, to be used only for securing
the system in a Zero Energy State:
#image("static/00064.png")
With the disconnect switch in the \"open\" position as shown (no
continuity), the circuit is broken and no current will exist. There will
be zero voltage across the load, and the full voltage of the source will
be dropped across the open contacts of the disconnect switch. Note how
there is no need for a disconnect switch in the lower conductor of the
circuit. Because that side of the circuit is firmly connected to the
earth (ground), it is electrically common with the earth and is best
left that way. For maximum safety of personnel working on the load of
this circuit, a temporary ground connection could be established on the
top side of the load, to ensure that no voltage could ever be dropped
across the load:
#image("static/00065.png")
With the temporary ground connection in place, both sides of the load
wiring are connected to ground, securing a Zero Energy State at the
load.
Since a ground connection made on both sides of the load is electrically
equivalent to short-circuiting across the load with a wire, that is
another way of accomplishing the same goal of maximum safety:
#image("static/00066.png")
Either way, both sides of the load will be electrically common to the
earth, allowing for no voltage (potential energy) between either side of
the load and the ground people stand on. This technique of temporarily
grounding conductors in a de-energized power system is very common in
maintenance work performed on high voltage power distribution systems.
A further benefit of this precaution is protection against the
possibility of the disconnect switch being closed (turned \"on\" so that
circuit continuity is established) while people are still contacting the
load. The temporary wire connected across the load would create a
short-circuit when the disconnect switch was closed, immediately
tripping any overcurrent protection devices (circuit breakers or fuses)
in the circuit, which would shut the power off again. Damage may very
well be sustained by the disconnect switch if this were to happen, but
the workers at the load are kept safe.
It would be good to mention at this point that overcurrent devices are
not intended to provide protection against electric shock. Rather, they
exist solely to protect conductors from overheating due to excessive
currents. The temporary shorting wires just described would indeed cause
any overcurrent devices in the circuit to \"trip\" if the disconnect
switch were to be closed, but realize that electric shock protection is
not the intended function of those devices. Their primary function would
merely be leveraged for the purpose of worker protection with the
shorting wire in place.
Since it is obviously important to be able to secure any disconnecting
devices in the open (off) position and make sure they stay that way
while work is being done on the circuit, there is need for a structured
safety system to be put into place. Such a system is commonly used in
industry and it is called #emph[Lock-out/Tag-out].
A lock-out/tag-out procedure works like this: all individuals working on
a secured circuit have their own personal padlock or combination lock
which they set on the control lever of a disconnect device prior to
working on the system. Additionally, they must fill out and sign a tag
which they hang from their lock describing the nature and duration of
the work they intend to perform on the system. If there are multiple
sources of energy to be \"locked out\" (multiple disconnects, both
electrical and mechanical energy sources to be secured, etc.), the
worker must use as many of his or her locks as necessary to secure power
from the system before work begins. This way, the system is maintained
in a Zero Energy State until every last lock is removed from all the
disconnect and shutoff devices, and that means every last worker gives
consent by removing their own personal locks. If the decision is made to
re-energize the system and one person\'s lock(s) still remain in place
after everyone present removes theirs, the tag(s) will show who that
person is and what it is they\'re doing.
Even with a good lock-out/tag-out safety program in place, there is
still need for diligence and common-sense precaution. This is especially
true in industrial settings where a multitude of people may be working
on a device or system at once. Some of those people might not know about
proper lock-out/tag-out procedure, or might know about it but are too
complacent to follow it. Don\'t assume that everyone has followed the
safety rules!
After an electrical system has been locked out and tagged with your own
personal lock, you must then double-check to see if the voltage really
has been secured in a zero state. One way to check is to see if the
machine (or whatever it is that\'s being worked on) will start up if the
#emph[Start] switch or button is actuated. If it starts, then you know
you haven\'t successfully secured the electrical power from it.
Additionally, you should #emph[always] check for the presence of
dangerous voltage with a measuring device before actually touching any
conductors in the circuit. To be safest, you should follow this
procedure of checking, using, and then checking your meter:
- Check to see that your meter indicates properly on a known source of
voltage.
- Use your meter to test the locked-out circuit for any dangerous
voltage.
- Check your meter once more on a known source of voltage to see that it
still indicates as it should.
While this may seem excessive or even paranoid, it is a proven technique
for preventing electrical shock. I once had a meter fail to indicate
voltage when it should have while checking a circuit to see if it was
\"dead.\" Had I not used other means to check for the presence of
voltage, I might not be alive today to write this. There\'s always the
chance that your voltage meter will be defective just when you need it
to check for a dangerous condition. Following these steps will help
ensure that you\'re never misled into a deadly situation by a broken
meter.
Finally, the electrical worker will arrive at a point in the safety
check procedure where it is deemed safe to actually touch the
conductor(s). Bear in mind that after all of the precautionary steps
have taken, it is still possible (although very unlikely) that a
dangerous voltage may be present. One final precautionary measure to
take at this point is to make momentary contact with the conductor(s)
#emph[with the back of the hand] before grasping it or a metal tool in
contact with it. Why? If, for some reason there is still voltage present
between that conductor and earth ground, finger motion from the shock
reaction (clenching into a fist) will #emph[break] contact with the
conductor. Please note that this is absolutely the #emph[last] step that
any electrical worker should ever take before beginning work on a power
system, and should #emph[never] be used as an alternative method of
checking for dangerous voltage. If you ever have reason to doubt the
trustworthiness of your meter, use another meter to obtain a \"second
opinion.\"
#core.review[
- #emph[Zero Energy State]: When a circuit, device, or system has been
secured so that no potential energy exists to harm someone working on
it.
- Disconnect switch devices must be present in a properly designed
electrical system to allow for convenient readiness of a Zero Energy
State.
- Temporary grounding or shorting wires may be connected to a load being
serviced for extra protection to personnel working on that load.
- #emph[Lock-out/Tag-out] works like this: when working on a system in a
Zero Energy State, the worker places a personal padlock or combination
lock on every energy disconnect device relevant to his or her task on
that system. Also, a tag is hung on every one of those locks
describing the nature and duration of the work to be done, and who is
doing it.
- Always verify that a circuit has been secured in a Zero Energy State
with test equipment after \"locking it out.\" Be sure to test your
meter before and after checking the circuit to verify that it is
working properly.
- When the time comes to actually make contact with the conductor(s) of
a supposedly dead power system, do so first with the back of one hand,
so that if a shock should occur, the muscle reaction will pull the
fingers away from the conductor.
]
|
https://github.com/matthew-e-brown/assignmatts | https://raw.githubusercontent.com/matthew-e-brown/assignmatts/main/src/lib.typ | typst | MIT License | #import "./helpers.typ"
#import "./palettes.typ"
#import "./templates.typ": assignment
|
https://github.com/ClazyChen/Table-Tennis-Rankings | https://raw.githubusercontent.com/ClazyChen/Table-Tennis-Rankings/main/history_CN/2018/WS-04.typ | typst |
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (1 - 32)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[1], [丁宁], [CHN], [3470],
[2], [刘诗雯], [CHN], [3387],
[3], [朱雨玲], [MAC], [3324],
[4], [陈梦], [CHN], [3317],
[5], [王曼昱], [CHN], [3243],
[6], [石川佳纯], [JPN], [3195],
[7], [孙颖莎], [CHN], [3161],
[8], [陈幸同], [CHN], [3156],
[9], [木子], [CHN], [3147],
[10], [武杨], [CHN], [3094],
[11], [冯亚兰], [CHN], [3056],
[12], [顾玉婷], [CHN], [3046],
[13], [金宋依], [PRK], [2990],
[14], [伊藤美诚], [JPN], [2987],
[15], [文佳], [CHN], [2958],
[16], [胡丽梅], [CHN], [2945],
[17], [陈可], [CHN], [2920],
[18], [平野美宇], [JPN], [2915],
[19], [#text(gray, "李晓丹")], [CHN], [2903],
[20], [冯天薇], [SGP], [2899],
[21], [徐孝元], [KOR], [2898],
[22], [田志希], [KOR], [2896],
[23], [加藤美优], [JPN], [2866],
[24], [郑怡静], [TPE], [2858],
[25], [张蔷], [CHN], [2854],
[26], [李洁], [NED], [2850],
[27], [杨晓欣], [MON], [2849],
[28], [GU Ruochen], [CHN], [2849],
[29], [车晓曦], [CHN], [2845],
[30], [韩莹], [GER], [2844],
[31], [索菲亚 波尔卡诺娃], [AUT], [2839],
[32], [梁夏银], [KOR], [2839],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (33 - 64)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[33], [王艺迪], [CHN], [2835],
[34], [李皓晴], [HKG], [2831],
[35], [石洵瑶], [CHN], [2822],
[36], [侯美玲], [TUR], [2817],
[37], [伯纳黛特 斯佐科斯], [ROU], [2816],
[38], [桥本帆乃香], [JPN], [2814],
[39], [单晓娜], [GER], [2814],
[40], [佐藤瞳], [JPN], [2813],
[41], [早田希娜], [JPN], [2810],
[42], [芝田沙季], [JPN], [2804],
[43], [李倩], [POL], [2801],
[44], [<NAME>], [GER], [2795],
[45], [#text(gray, "金景娥")], [KOR], [2794],
[46], [何卓佳], [CHN], [2791],
[47], [杜凯琹], [HKG], [2789],
[48], [傅玉], [POR], [2786],
[49], [刘佳], [AUT], [2776],
[50], [曾尖], [SGP], [2769],
[51], [张瑞], [CHN], [2768],
[52], [孙铭阳], [CHN], [2765],
[53], [#text(gray, "帖雅娜")], [HKG], [2764],
[54], [安藤南], [JPN], [2763],
[55], [陈思羽], [TPE], [2762],
[56], [崔孝珠], [KOR], [2762],
[57], [李佼], [NED], [2762],
[58], [<NAME>], [ROU], [2760],
[59], [伊丽莎白 萨玛拉], [ROU], [2760],
[60], [EKHOLM Matilda], [SWE], [2756],
[61], [#text(gray, "<NAME>")], [CHN], [2754],
[62], [浜本由惟], [JPN], [2753],
[63], [LIU Xi], [CHN], [2753],
[64], [倪夏莲], [LUX], [2752],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (65 - 96)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[65], [SOO W<NAME>], [HKG], [2745],
[66], [李佳燚], [CHN], [2727],
[67], [长崎美柚], [JPN], [2726],
[68], [于梦雨], [SGP], [2724],
[69], [森樱], [JPN], [2719],
[70], [POTA Georgina], [HUN], [2715],
[71], [#text(gray, "姜华珺")], [HKG], [2714],
[72], [CHA Hyo Sim], [PRK], [2713],
[73], [刘高阳], [CHN], [2712],
[74], [李芬], [SWE], [2702],
[75], [森田美咲], [JPN], [2693],
[76], [张墨], [CAN], [2691],
[77], [李时温], [KOR], [2688],
[78], [MATSUZAWA Marina], [JPN], [2687],
[79], [MIKHAILOVA Polina], [RUS], [2685],
[80], [佩特丽莎 索尔佳], [GER], [2683],
[81], [GRZYBOWSKA-FRANC Katarzyna], [POL], [2682],
[82], [MORIZONO Mizuki], [JPN], [2677],
[83], [NG Wing Nam], [HKG], [2672],
[84], [MAEDA Miyu], [JPN], [2667],
[85], [刘斐], [CHN], [2659],
[86], [SHIOMI Maki], [JPN], [2655],
[87], [CHENG Hsien-Tzu], [TPE], [2654],
[88], [PESOTSKA Margaryta], [UKR], [2653],
[89], [ZHOU Yihan], [SGP], [2643],
[90], [玛妮卡 巴特拉], [IND], [2640],
[91], [HUANG Yi-Hua], [TPE], [2640],
[92], [SAWETTABUT Suthasini], [THA], [2638],
[93], [阿德里安娜 迪亚兹], [PUR], [2637],
[94], [#text(gray, "<NAME>")], [PRK], [2630],
[95], [#text(gray, "<NAME>")], [KOR], [2622],
[96], [HAPONOVA Hanna], [UKR], [2621],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (97 - 128)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[97], [布里特 伊尔兰德], [NED], [2621],
[98], [PARTYKA Natalia], [POL], [2621],
[99], [维多利亚 帕芙洛维奇], [BLR], [2616],
[100], [WINTER Sabine], [GER], [2616],
[101], [木原美悠], [JPN], [2613],
[102], [#text(gray, "VACENOVSKA Iveta")], [CZE], [2610],
[103], [VOROBEVA Olga], [RUS], [2607],
[104], [#text(gray, "CHOI Moonyoung")], [KOR], [2607],
[105], [LIN Ye], [SGP], [2598],
[106], [KATO Kyoka], [JPN], [2598],
[107], [妮娜 米特兰姆], [GER], [2595],
[108], [<NAME>], [KOR], [2594],
[109], [<NAME>], [PRK], [2587],
[110], [笹尾明日香], [JPN], [2581],
[111], [PASKAUSKIENE Ruta], [LTU], [2579],
[112], [LIN Chia-Hui], [TPE], [2578],
[113], [蒂娜 梅谢芙], [EGY], [2573],
[114], [NOSKOVA Yana], [RUS], [2572],
[115], [SABITOVA Valentina], [RUS], [2566],
[116], [SO Eka], [JPN], [2565],
[117], [李恩惠], [KOR], [2564],
[118], [TIAN Yuan], [CRO], [2561],
[119], [大藤沙月], [JPN], [2558],
[120], [邵杰妮], [POR], [2551],
[121], [<NAME>], [RUS], [2550],
[122], [<NAME>], [CZE], [2547],
[123], [范思琦], [CHN], [2546],
[124], [<NAME>], [THA], [2545],
[125], [<NAME>], [CZE], [2543],
[126], [LE<NAME>], [KOR], [2543],
[127], [<NAME>], [FRA], [2542],
[128], [<NAME>], [ROU], [2542],
)
) |
|
https://github.com/cwreed/cv | https://raw.githubusercontent.com/cwreed/cv/main/src/modules/publications.typ | typst | #import "../template.typ": cvPublication
#let ref = cvPublication(
bibPath: "publications/publications.bib",
keyList: ("reed2022"),
refStyle: "ieee",
) |
|
https://github.com/matchy233/typst-chi-cv-template | https://raw.githubusercontent.com/matchy233/typst-chi-cv-template/main/README.md | markdown | MIT License | # Chi CV template, but Typst
Rip-off of [rip-off of skyzh's CV](https://github.com/matchy233/chi-cv-template), using [Typst](https://github.com/typst/typst).
PRs and suggestions are welcome.
~~⚠️ The implementation of `fontawesome.typ` is far from perfect and **may** conflict with existing `typst` built-in commands! Please report any issues you find.~~
**[🔮New! (2024/10/09)]** I switched to use [`typst-fontawesome`](https://github.com/duskmoon314/typst-fontawesome)
~~`fonts/FontAwesome6.otf` is generated by merging `Font Awesome 6 Free-Solid-900.otf` and `Font Awesome 6 Brands-Regular-400.otf` using [fontforge](https://fontforge.org/en-US/). Original Font Awesome fonts were downloaded from [here (Desktop version)](https://fontawesome.com/download) (6.0.4 as of 2023/04/01).~~
**[🔮New! (2024/10/09)]** As the template is now dependent on `typst-fontawesome`, I decided to provide the original Font Awesome fonts instead of the merged one.
## Sample Output
<p align="center">
<img src="resume-0.png" width="45%" alt="Page 1 of Chi's CV">
<img src="resume-1.png" width="45%" alt="Page 2 of Chi's CV">
</p>
[PDF file](resume.pdf)
## Getting Started
### Using Typst web app
**[🚧 WIP (2024/10/09)]** There is plan for releasing the template to [Typst universe](https://typst.app/universe/). Stay tuned!
Upload `chicv.typ`, `resume.typ` and `fonts/*` to [Typst](https://typst.app/), and then you can edit the CV.
### Locally
Assume that you have installed `typst` cli already and it's in your `$PATH`.
```bash
git clone https://github.com/matchy233/typst-chi-cv-template.git
cd typst-chi-cv-template
typst compile --font-path ./fonts ./template/resume.typ resume.pdf
```
## Usage
```typst
#import "@preview/chicv-ripoff:1.0.1": *
// Customize the page margin and cventry paragraph padding
// It's the same as #set page(...)
#show: chicv.with(
margin: (x: 1cm, top: 1.5cm, bottom: 2cm),
par-padding: (left: 0pt, right: 0pt),
)
// Chi's name
= <NAME>
// Display the input values in one line separated by vertical bars, preceded by a Font Awesome icon
#personal-info(
// email, phone, github, website, linkedin have pre-defined styles
email: "<EMAIL>",
phone: "+1 (145) 141-919",
github: "https://github.com/skyzh",
website: "https://skyzh.dev",
linkedin: "https://www.linkedin.com/in/alex-chi-skyzh/",
// It is also possible to feed customized values using:
// --> Format 1: <icon-name>: <link>
x-twitter: "https://twitter.com/iskyzh",
// --> Format 2: a dictionary like below
(link: "https://typst.app/", text: "Typst", icon: "t", solid: true),
)
== Education
// by default, #cventry will bold top-left text
#cventry(
tl: "Carnegie Mellon University",
// #dates(from: xxx, to: xxx) generates a date range, "to" is optional
tr: dates(from: "2022/08", to: "2023/12"),
bl: "Master of Science in Computer Science, GPA 4.10/4.33",
br: "Pittsburgh, PA, USA"
)[
- Teaching Assistant for 15-445/645 Database Systems (Fall 2022, Spring 2023, Fall 2023)
- Courses: Distributed Systems, Compiler Design, Advanced Database Systems, Deep Learning Systems, etc.
]
// ...
// omitted
// ...
== Work Experience
// but you can override the default bold style by passing content blocks
#cventry(
tl: [#link("https://neon.tech")[*Neon*]],
tr: dates(from: "2024/02"),
bl: [Systems Software Engineer],
br: [Remote / Pittsburgh, PA, USA],
// you can also override the default padding of content blocks
padding: (bottom: -5pt)
)[]
#cventry(
tl: [_... and also_],
tr: dates(from: "2023/05", to: "2023/08"),
bl: [Software Engineer Intern],
br: [Remote / Pittsburgh, PA, USA],
)[
// content omitted
]
// The template also provides #iconlink and #githublink (a shorthand for #iconlink(icon: "github", text: ..., ...))
#iconlink("https://github.com/tikv/tikv/issues/9747", text: "TiKV", icon: "heart")
#githublink("https://github.com/tikv", text: "tikv")
```
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-12F90.typ | typst | Apache License 2.0 | #let data = (
("CYPRO-MINOAN SIGN CM001", "Lo", 0),
("CYPRO-MINOAN SIGN CM002", "Lo", 0),
("CYPRO-MINOAN SIGN CM004", "Lo", 0),
("CYPRO-MINOAN SIGN CM005", "Lo", 0),
("CYPRO-MINOAN SIGN CM006", "Lo", 0),
("CYPRO-MINOAN SIGN CM007", "Lo", 0),
("CYPRO-MINOAN SIGN CM008", "Lo", 0),
("CYPRO-MINOAN SIGN CM009", "Lo", 0),
("CYPRO-MINOAN SIGN CM010", "Lo", 0),
("CYPRO-MINOAN SIGN CM011", "Lo", 0),
("CYPRO-MINOAN SIGN CM012", "Lo", 0),
("CYPRO-MINOAN SIGN CM012B", "Lo", 0),
("CYPRO-MINOAN SIGN CM013", "Lo", 0),
("CYPRO-MINOAN SIGN CM015", "Lo", 0),
("CYPRO-MINOAN SIGN CM017", "Lo", 0),
("CYPRO-MINOAN SIGN CM019", "Lo", 0),
("CYPRO-MINOAN SIGN CM021", "Lo", 0),
("CYPRO-MINOAN SIGN CM023", "Lo", 0),
("CYPRO-MINOAN SIGN CM024", "Lo", 0),
("CYPRO-MINOAN SIGN CM025", "Lo", 0),
("CYPRO-MINOAN SIGN CM026", "Lo", 0),
("CYPRO-MINOAN SIGN CM027", "Lo", 0),
("CYPRO-MINOAN SIGN CM028", "Lo", 0),
("CYPRO-MINOAN SIGN CM029", "Lo", 0),
("CYPRO-MINOAN SIGN CM030", "Lo", 0),
("CYPRO-MINOAN SIGN CM033", "Lo", 0),
("CYPRO-MINOAN SIGN CM034", "Lo", 0),
("CYPRO-MINOAN SIGN CM035", "Lo", 0),
("CYPRO-MINOAN SIGN CM036", "Lo", 0),
("CYPRO-MINOAN SIGN CM037", "Lo", 0),
("CYPRO-MINOAN SIGN CM038", "Lo", 0),
("CYPRO-MINOAN SIGN CM039", "Lo", 0),
("CYPRO-MINOAN SIGN CM040", "Lo", 0),
("CYPRO-MINOAN SIGN CM041", "Lo", 0),
("CYPRO-MINOAN SIGN CM044", "Lo", 0),
("CYPRO-MINOAN SIGN CM046", "Lo", 0),
("CYPRO-MINOAN SIGN CM047", "Lo", 0),
("CYPRO-MINOAN SIGN CM049", "Lo", 0),
("CYPRO-MINOAN SIGN CM050", "Lo", 0),
("CYPRO-MINOAN SIGN CM051", "Lo", 0),
("CYPRO-MINOAN SIGN CM052", "Lo", 0),
("CYPRO-MINOAN SIGN CM053", "Lo", 0),
("CYPRO-MINOAN SIGN CM054", "Lo", 0),
("CYPRO-MINOAN SIGN CM055", "Lo", 0),
("CYPRO-MINOAN SIGN CM056", "Lo", 0),
("CYPRO-MINOAN SIGN CM058", "Lo", 0),
("CYPRO-MINOAN SIGN CM059", "Lo", 0),
("CYPRO-MINOAN SIGN CM060", "Lo", 0),
("CYPRO-MINOAN SIGN CM061", "Lo", 0),
("CYPRO-MINOAN SIGN CM062", "Lo", 0),
("CYPRO-MINOAN SIGN CM063", "Lo", 0),
("CYPRO-MINOAN SIGN CM064", "Lo", 0),
("CYPRO-MINOAN SIGN CM066", "Lo", 0),
("CYPRO-MINOAN SIGN CM067", "Lo", 0),
("CYPRO-MINOAN SIGN CM068", "Lo", 0),
("CYPRO-MINOAN SIGN CM069", "Lo", 0),
("CYPRO-MINOAN SIGN CM070", "Lo", 0),
("CYPRO-MINOAN SIGN CM071", "Lo", 0),
("CYPRO-MINOAN SIGN CM072", "Lo", 0),
("CYPRO-MINOAN SIGN CM073", "Lo", 0),
("CYPRO-MINOAN SIGN CM074", "Lo", 0),
("CYPRO-MINOAN SIGN CM075", "Lo", 0),
("CYPRO-MINOAN SIGN CM075B", "Lo", 0),
("CYPRO-MINOAN SIGN CM076", "Lo", 0),
("CYPRO-MINOAN SIGN CM078", "Lo", 0),
("CYPRO-MINOAN SIGN CM079", "Lo", 0),
("CYPRO-MINOAN SIGN CM080", "Lo", 0),
("CYPRO-MINOAN SIGN CM081", "Lo", 0),
("CYPRO-MINOAN SIGN CM082", "Lo", 0),
("CYPRO-MINOAN SIGN CM083", "Lo", 0),
("CYPRO-MINOAN SIGN CM084", "Lo", 0),
("CYPRO-MINOAN SIGN CM085", "Lo", 0),
("CYPRO-MINOAN SIGN CM086", "Lo", 0),
("CYPRO-MINOAN SIGN CM087", "Lo", 0),
("CYPRO-MINOAN SIGN CM088", "Lo", 0),
("CYPRO-MINOAN SIGN CM089", "Lo", 0),
("CYPRO-MINOAN SIGN CM090", "Lo", 0),
("CYPRO-MINOAN SIGN CM091", "Lo", 0),
("CYPRO-MINOAN SIGN CM092", "Lo", 0),
("CYPRO-MINOAN SIGN CM094", "Lo", 0),
("CYPRO-MINOAN SIGN CM095", "Lo", 0),
("CYPRO-MINOAN SIGN CM096", "Lo", 0),
("CYPRO-MINOAN SIGN CM097", "Lo", 0),
("CYPRO-MINOAN SIGN CM098", "Lo", 0),
("CYPRO-MINOAN SIGN CM099", "Lo", 0),
("CYPRO-MINOAN SIGN CM100", "Lo", 0),
("CYPRO-MINOAN SIGN CM101", "Lo", 0),
("CYPRO-MINOAN SIGN CM102", "Lo", 0),
("CYPRO-MINOAN SIGN CM103", "Lo", 0),
("CYPRO-MINOAN SIGN CM104", "Lo", 0),
("CYPRO-MINOAN SIGN CM105", "Lo", 0),
("CYPRO-MINOAN SIGN CM107", "Lo", 0),
("CYPRO-MINOAN SIGN CM108", "Lo", 0),
("CYPRO-MINOAN SIGN CM109", "Lo", 0),
("CYPRO-MINOAN SIGN CM110", "Lo", 0),
("CYPRO-MINOAN SIGN CM112", "Lo", 0),
("CYPRO-MINOAN SIGN CM114", "Lo", 0),
("CYPRO-MINOAN SIGN CM301", "Po", 0),
("CYPRO-MINOAN SIGN CM302", "Po", 0),
)
|
https://github.com/LucaCiucci/tesi-triennale | https://raw.githubusercontent.com/LucaCiucci/tesi-triennale/main/calcoli/superficie-cono.typ | typst | Creative Commons Zero v1.0 Universal |
#set math.equation(numbering: "(1)")
#set heading(numbering: "1.")
== Dinamica di $e-m$ come particella vincolata su un cono
Considero una particella vincolata su una superficie. Localmente parametrizzo la superficie con $(u, v)$ ortogonali. Nell'intorno dell'origine:
$
z(u, v) = 1/2 mat(u, v) H vec(u, v) + o(sqrt(u^2 + v^2))
$
con $H$ l'essiana:
$
H_(i j) = lr(mat(
diff_(u u), diff_(u v);
diff_(v u), diff_(v v);
) z(u, v) |)_(u = 0, v = 0)
$
Se considero una particella libera che si muove con velocità $(u, v)$, avrò:
$
a_z = diff_t^2 z = diff_t [mat(t u, t v) H vec(u, v)] = mat(u, v) H vec(u, v)
$ <acc-curvature-hessian>
Nel nostro caso, considero che la particella si trovi sull'asse delle $z$, allora scompongo la velocità:
$
arrow(v) = (arrow(v) dot hat(z)) hat(z) + arrow(v) - (arrow(v) dot hat(z)) hat(z) eq.def v_z hat(z) + arrow(v)_T
$
Per cui la forza di lorentz:
$
arrow(F) = e arrow(v) times arrow(B) underbracket(=, arrow(B) = vec(0, 0, B)) e B space arrow(v)_T times hat(z)
$
Se impongo $v_x = 0$:
$
arrow(F)/m = e/m B v_y hat(x)// - e B v_x hat(y) = e B v_y hat(x)
$
Ora utilizzando @acc-curvature-hessian con $u -> y$, $v -> z$, $z -> x$:
$
F/m = cases(
a = mat(v_y, v_z) H vec(v_y, v_z),
e/m B v_y,
)
$
This must hold for every $v_z$ (TODO non mi torna a matematicamente), so:
$
H = mat(
H_(1 1), 0;
0, 0;
)
$
and
$
e/m B v_y = v_y^2 H_(1 1) ==> H_(1 1) = e/m B/(v_y)
$ <sol-for-H11>
Now, on a circle:
$
y &= sqrt(R^2 - x^2) approx R (1 - x^2/(2 R^2))\
&= R - x^2/(2 R)
$
So $H_(1 1) = 1 \/ R$:
$
R = m/e v_y / B
$
as expected. Now, for a monopole, $B = g / z^2$:
$
R = m/(e g) v_y z^2
$
Tornando a @sol-for-H11:
$
H_(1 1) = (e g)/m 1/(v_y) 1 / (z^2)
$ |
https://github.com/7sDream/fonts-and-layout-zhCN | https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/outline.typ | typst | Other | #import "template/consts.typ"
#import "template/theme.typ": theme
#counter(page).update(1)
#heading(level: 1, numbering: none, outlined: false)[目录]
#show outline.entry: it => {
let loc = it.element.location()
let v_space = if it.level == 1 {
v(1.5em, weak: true)
} else {
none
}
let indent = (it.level - 1) * 1.5em
v_space + [
#h(indent)
#link(loc)[#text(fill: theme.link)[#it.element.body]]
#box(width: 1fr, it.fill)
#strong(it.page)
]
}
#outline(title: none)
#pagebreak()
|
https://github.com/r8vnhill/apunte-bibliotecas-de-software | https://raw.githubusercontent.com/r8vnhill/apunte-bibliotecas-de-software/main/Unit2/companion.typ | typst | == Companion Object
Un `companion object` es un objeto que es común a todas las instancias de una clase.
Está vinculado a la clase en sí misma en lugar de a sus instancias.
Los `companion objects` proporcionan un lugar para almacenar propiedades y funciones que son lógicamente parte de una clase, pero que no requieren que se cree una instancia de la clase para ser accedidos.
=== Características del Companion Object
- *Acceso Estático:* Permite acceder a propiedades y métodos sin necesidad de instanciar la clase.
- *Extensión de Interfaces:* Pueden extender interfaces o clases, aunque esto es poco común.
- *No Heredados:* No son heredados por las subclases.
=== Ejemplo de Uso
```kotlin
class Number(val value: Int) {
operator fun plus(other: Number) = Number(value + other.value)
companion object {
fun add(a: Int, b: Int) = Number(a + b)
}
}
```
En este ejemplo, la clase `Number` tiene un `companion object` que contiene una función estática `add`.
Esta función puede ser llamada sin crear una instancia de `Number`.
```kotlin
fun main() {
val a = Number(10)
println("10 + 5 = ${a + Number(5)}")
println("10 + 5 = ${Number.add(10, 5)}")
}
```
En el código anterior, se muestra cómo utilizar tanto la función de operador `plus` como la función estática `add` definida en el `companion object`.
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-10450.typ | typst | Apache License 2.0 | #let data = (
("SHAVIAN LETTER PEEP", "Lo", 0),
("SHAVIAN LETTER TOT", "Lo", 0),
("SHAVIAN LETTER KICK", "Lo", 0),
("SHAVIAN LETTER FEE", "Lo", 0),
("SHAVIAN LETTER THIGH", "Lo", 0),
("SHAVIAN LETTER SO", "Lo", 0),
("SHAVIAN LETTER SURE", "Lo", 0),
("SHAVIAN LETTER CHURCH", "Lo", 0),
("SHAVIAN LETTER YEA", "Lo", 0),
("SHAVIAN LETTER HUNG", "Lo", 0),
("SHAVIAN LETTER BIB", "Lo", 0),
("SHAVIAN LETTER DEAD", "Lo", 0),
("SHAVIAN LETTER GAG", "Lo", 0),
("SHAVIAN LETTER VOW", "Lo", 0),
("SHAVIAN LETTER THEY", "Lo", 0),
("SHAVIAN LETTER ZOO", "Lo", 0),
("SHAVIAN LETTER MEASURE", "Lo", 0),
("SHAVIAN LETTER JUDGE", "Lo", 0),
("SHAVIAN LETTER WOE", "Lo", 0),
("SHAVIAN LETTER HA-HA", "Lo", 0),
("SHAVIAN LETTER LOLL", "Lo", 0),
("SHAVIAN LETTER MIME", "Lo", 0),
("SHAVIAN LETTER IF", "Lo", 0),
("SHAVIAN LETTER EGG", "Lo", 0),
("SHAVIAN LETTER ASH", "Lo", 0),
("SHAVIAN LETTER ADO", "Lo", 0),
("SHAVIAN LETTER ON", "Lo", 0),
("SHAVIAN LETTER WOOL", "Lo", 0),
("SHAVIAN LETTER OUT", "Lo", 0),
("SHAVIAN LETTER AH", "Lo", 0),
("SHAVIAN LETTER ROAR", "Lo", 0),
("SHAVIAN LETTER NUN", "Lo", 0),
("SHAVIAN LETTER EAT", "Lo", 0),
("SHAVIAN LETTER AGE", "Lo", 0),
("SHAVIAN LETTER ICE", "Lo", 0),
("SHAVIAN LETTER UP", "Lo", 0),
("SHAVIAN LETTER OAK", "Lo", 0),
("SHAVIAN LETTER OOZE", "Lo", 0),
("SHAVIAN LETTER OIL", "Lo", 0),
("SHAVIAN LETTER AWE", "Lo", 0),
("SHAVIAN LETTER ARE", "Lo", 0),
("SHAVIAN LETTER OR", "Lo", 0),
("SHAVIAN LETTER AIR", "Lo", 0),
("SHAVIAN LETTER ERR", "Lo", 0),
("SHAVIAN LETTER ARRAY", "Lo", 0),
("SHAVIAN LETTER EAR", "Lo", 0),
("SHAVIAN LETTER IAN", "Lo", 0),
("SHAVIAN LETTER YEW", "Lo", 0),
)
|
https://github.com/Enter-tainer/mino | https://raw.githubusercontent.com/Enter-tainer/mino/master/typst-package/lib.typ | typst | MIT License | #import "mino.typ": decode-fumen
#import "tetris.typ": render-field
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/block-02.typ | typst | Other | // Some things can't be joined.
#{
[A]
// Error: 3-4 cannot join content with integer
1
[B]
}
|
https://github.com/yanwenywan/typst-packages | https://raw.githubusercontent.com/yanwenywan/typst-packages/master/README.md | markdown | Apache License 2.0 | # Typst packages
Packages and templates made by Yan Xin. Please credit Yan Xin or Yanwenyuan if you use these.
|
https://github.com/ymgyt/techbook | https://raw.githubusercontent.com/ymgyt/techbook/master/programmings/js/typescript/specification/variable.md | markdown | # variable
## const
```typescript
const x: number = 1;
```
* 再代入できない
* 基本`const`を使う
## let
```typescript
let x: number = 1;
x = 2;
```
* 再代入できる
## var
* 使わない
* global変数として利用すると、暗黙的に`window`objectのpropertyとして扱われる。
* 巻き上げやscopeが直感的でない
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-0100.typ | typst | Apache License 2.0 | #let data = (
("LATIN CAPITAL LETTER A WITH MACRON", "Lu", 0),
("LATIN SMALL LETTER A WITH MACRON", "Ll", 0),
("LATIN CAPITAL LETTER A WITH BREVE", "Lu", 0),
("LATIN SMALL LETTER A WITH BREVE", "Ll", 0),
("LATIN CAPITAL LETTER A WITH OGONEK", "Lu", 0),
("LATIN SMALL LETTER A WITH OGONEK", "Ll", 0),
("LATIN CAPITAL LETTER C WITH ACUTE", "Lu", 0),
("LATIN SMALL LETTER C WITH ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER C WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER C WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER C WITH DOT ABOVE", "Lu", 0),
("LATIN SMALL LETTER C WITH DOT ABOVE", "Ll", 0),
("LATIN CAPITAL LETTER C WITH CARON", "Lu", 0),
("LATIN SMALL LETTER C WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER D WITH CARON", "Lu", 0),
("LATIN SMALL LETTER D WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER D WITH STROKE", "Lu", 0),
("LATIN SMALL LETTER D WITH STROKE", "Ll", 0),
("LATIN CAPITAL LETTER E WITH MACRON", "Lu", 0),
("LATIN SMALL LETTER E WITH MACRON", "Ll", 0),
("LATIN CAPITAL LETTER E WITH BREVE", "Lu", 0),
("LATIN SMALL LETTER E WITH BREVE", "Ll", 0),
("LATIN CAPITAL LETTER E WITH DOT ABOVE", "Lu", 0),
("LATIN SMALL LETTER E WITH DOT ABOVE", "Ll", 0),
("LATIN CAPITAL LETTER E WITH OGONEK", "Lu", 0),
("LATIN SMALL LETTER E WITH OGONEK", "Ll", 0),
("LATIN CAPITAL LETTER E WITH CARON", "Lu", 0),
("LATIN SMALL LETTER E WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER G WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER G WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER G WITH BREVE", "Lu", 0),
("LATIN SMALL LETTER G WITH BREVE", "Ll", 0),
("LATIN CAPITAL LETTER G WITH DOT ABOVE", "Lu", 0),
("LATIN SMALL LETTER G WITH DOT ABOVE", "Ll", 0),
("LATIN CAPITAL LETTER G WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER G WITH CEDILLA", "Ll", 0),
("LATIN CAPITAL LETTER H WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER H WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER H WITH STROKE", "Lu", 0),
("LATIN SMALL LETTER H WITH STROKE", "Ll", 0),
("LATIN CAPITAL LETTER I WITH TILDE", "Lu", 0),
("LATIN SMALL LETTER I WITH TILDE", "Ll", 0),
("LATIN CAPITAL LETTER I WITH MACRON", "Lu", 0),
("LATIN SMALL LETTER I WITH MACRON", "Ll", 0),
("LATIN CAPITAL LETTER I WITH BREVE", "Lu", 0),
("LATIN SMALL LETTER I WITH BREVE", "Ll", 0),
("LATIN CAPITAL LETTER I WITH OGONEK", "Lu", 0),
("LATIN SMALL LETTER I WITH OGONEK", "Ll", 0),
("LATIN CAPITAL LETTER I WITH DOT ABOVE", "Lu", 0),
("LATIN SMALL LETTER DOTLESS I", "Ll", 0),
("LATIN CAPITAL LIGATURE IJ", "Lu", 0),
("LATIN SMALL LIGATURE IJ", "Ll", 0),
("LATIN CAPITAL LETTER J WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER J WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER K WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER K WITH CEDILLA", "Ll", 0),
("LATIN SMALL LETTER KRA", "Ll", 0),
("LATIN CAPITAL LETTER L WITH ACUTE", "Lu", 0),
("LATIN SMALL LETTER L WITH ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER L WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER L WITH CEDILLA", "Ll", 0),
("LATIN CAPITAL LETTER L WITH CARON", "Lu", 0),
("LATIN SMALL LETTER L WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER L WITH MIDDLE DOT", "Lu", 0),
("LATIN SMALL LETTER L WITH MIDDLE DOT", "Ll", 0),
("LATIN CAPITAL LETTER L WITH STROKE", "Lu", 0),
("LATIN SMALL LETTER L WITH STROKE", "Ll", 0),
("LATIN CAPITAL LETTER N WITH ACUTE", "Lu", 0),
("LATIN SMALL LETTER N WITH ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER N WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER N WITH CEDILLA", "Ll", 0),
("LATIN CAPITAL LETTER N WITH CARON", "Lu", 0),
("LATIN SMALL LETTER N WITH CARON", "Ll", 0),
("LATIN SMALL LETTER N PRECEDED BY APOSTROPHE", "Ll", 0),
("LATIN CAPITAL LETTER ENG", "Lu", 0),
("LATIN SMALL LETTER ENG", "Ll", 0),
("LATIN CAPITAL LETTER O WITH MACRON", "Lu", 0),
("LATIN SMALL LETTER O WITH MACRON", "Ll", 0),
("LATIN CAPITAL LETTER O WITH BREVE", "Lu", 0),
("LATIN SMALL LETTER O WITH BREVE", "Ll", 0),
("LATIN CAPITAL LETTER O WITH DOUBLE ACUTE", "Lu", 0),
("LATIN SMALL LETTER O WITH DOUBLE ACUTE", "Ll", 0),
("LATIN CAPITAL LIGATURE OE", "Lu", 0),
("LATIN SMALL LIGATURE OE", "Ll", 0),
("LATIN CAPITAL LETTER R WITH ACUTE", "Lu", 0),
("LATIN SMALL LETTER R WITH ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER R WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER R WITH CEDILLA", "Ll", 0),
("LATIN CAPITAL LETTER R WITH CARON", "Lu", 0),
("LATIN SMALL LETTER R WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER S WITH ACUTE", "Lu", 0),
("LATIN SMALL LETTER S WITH ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER S WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER S WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER S WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER S WITH CEDILLA", "Ll", 0),
("LATIN CAPITAL LETTER S WITH CARON", "Lu", 0),
("LATIN SMALL LETTER S WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER T WITH CEDILLA", "Lu", 0),
("LATIN SMALL LETTER T WITH CEDILLA", "Ll", 0),
("LATIN CAPITAL LETTER T WITH CARON", "Lu", 0),
("LATIN SMALL LETTER T WITH CARON", "Ll", 0),
("LATIN CAPITAL LETTER T WITH STROKE", "Lu", 0),
("LATIN SMALL LETTER T WITH STROKE", "Ll", 0),
("LATIN CAPITAL LETTER U WITH TILDE", "Lu", 0),
("LATIN SMALL LETTER U WITH TILDE", "Ll", 0),
("LATIN CAPITAL LETTER U WITH MACRON", "Lu", 0),
("LATIN SMALL LETTER U WITH MACRON", "Ll", 0),
("LATIN CAPITAL LETTER U WITH BREVE", "Lu", 0),
("LATIN SMALL LETTER U WITH BREVE", "Ll", 0),
("LATIN CAPITAL LETTER U WITH RING ABOVE", "Lu", 0),
("LATIN SMALL LETTER U WITH RING ABOVE", "Ll", 0),
("LATIN CAPITAL LETTER U WITH DOUBLE ACUTE", "Lu", 0),
("LATIN SMALL LETTER U WITH DOUBLE ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER U WITH OGONEK", "Lu", 0),
("LATIN SMALL LETTER U WITH OGONEK", "Ll", 0),
("LATIN CAPITAL LETTER W WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER W WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER Y WITH CIRCUMFLEX", "Lu", 0),
("LATIN SMALL LETTER Y WITH CIRCUMFLEX", "Ll", 0),
("LATIN CAPITAL LETTER Y WITH DIAERESIS", "Lu", 0),
("LATIN CAPITAL LETTER Z WITH ACUTE", "Lu", 0),
("LATIN SMALL LETTER Z WITH ACUTE", "Ll", 0),
("LATIN CAPITAL LETTER Z WITH DOT ABOVE", "Lu", 0),
("LATIN SMALL LETTER Z WITH DOT ABOVE", "Ll", 0),
("LATIN CAPITAL LETTER Z WITH CARON", "Lu", 0),
("LATIN SMALL LETTER Z WITH CARON", "Ll", 0),
("LATIN SMALL LETTER LONG S", "Ll", 0),
)
|
https://github.com/andreasKroepelin/lovelace | https://raw.githubusercontent.com/andreasKroepelin/lovelace/main/lib.typ | typst | MIT License | #import "lovelace.typ": pseudocode, pseudocode-list, no-number, with-line-label, indent, line-label
|
https://github.com/dadn-dream-home/documents | https://raw.githubusercontent.com/dadn-dream-home/documents/main/contents/05-thiet-ke-database/index.typ | typst | = Thiết kế database
Nhóm thiết kế database với lược đồ ở @fig:database-schema.
#figure(
image("database.drawio.svg", width: 100%),
caption: "Lược đồ schema của database"
) <fig:database-schema>
Lược đồ này gồm có các bảng:
/ `feeds`: lưu các cảm biến và thiết bị được người dùng thêm vào nhà thông
minh. `type` ở đây sẽ là `TEMPERATURE` hoặc `HUMIDITY` tương ứng với cảm biến
nhiệt độ và độ ẩm, hoặc `LIGHT` cho thiết bị đèn.
/ `feed_values`: lưu các giá trị mà cảm biến hoặc thiết bị ghi nhận được thông
qua MQTT.
/ `sensor_configs`: lưu các cấu hình cho cảm biến, bao gồm cấu hình thông báo,
ngưỡng và kích hoạt thiết bị khác.
/ `actuator_configs`: lưu các cấu hình cho thiết bị, bao gồm cấu hình kích hoạt
tự động và lịch trình kích hoạt ở định dạng cron.
/ `notifications`: lưu các thông báo được gửi đến người dùng. |
|
https://github.com/mhspradlin/wilson-2024 | https://raw.githubusercontent.com/mhspradlin/wilson-2024/main/programming/day-4.typ | typst | MIT License | #set page("presentation-16-9")
#set text(size: 30pt)
= Day 4
#pagebreak()
== Dictionaries
Another common data structure is a *dictionary*.
A dictionary associates *keys* with *values*.
#pagebreak()
== Dictionaries
#align(center + horizon)[
#image("python-dict2.png", height: 80%)
]
#pagebreak()
== Creating a Dictionary
```python
animals = {"big": "elephant", "small": "mouse"}
big_animal = animals["big"]
print(big_animal + " is big")
```
#pagebreak()
== Reading From a Dictionary
```python
animals = {"big": "elephant", "small": "mouse"}
list(animals) # ["big", "small"]
"big" in animals # True
"medium" in animals # False
animals["medium"] # KeyError
for key, value in animals.items():
print(key + " is " + value)
```
#pagebreak()
== Adding to a Dictionary
```python
animals = {"big": "elephant", "small": "mouse"}
"medium" in animals # False
animals["medium"] = "gorilla"
"medium" in animals # True
```
#pagebreak()
== Deleting from a Dictionary
```python
animals = {"big": "elephant", "small": "mouse"}
del animals["big"]
"big" in animals # False
animals["big"] # KeyError
```
#pagebreak()
== Dictionaries
#text(size: 26pt)[
```python
sounds = {"bird": "chirp", "cat": "meow", "cow": "moo"}
def get_longest_sound():
longest_sound = ""
for animal, sound in sounds.items():
if len(sound) > len(longest_sound):
longest_sound = sound
return longest_sound
longest_sound(sounds) # ?
```
]
#pagebreak()
== Dictionaries
#text(size: 22pt)[
```python
def get_ok_coffee(ratings):
ok_coffee_places = {}
for place, rating in ratings.items():
if 3 < rating < 8:
ok_coffee_places[place] = rating
return ok_coffee_places
get_ok_coffee({
"Starbucks": 5,
"McDonald's": 1,
"Dunkin' Donuts": 4,
"Bongo Java": 8,
}) # What does this return?
```
]
#pagebreak()
== Dictionaries inside Dictionaries
*Values* of dictionaries can be anything.
For representing complex data, it's helpful to have dictionaries be values.
#pagebreak()
```python
movies = {
"best_comedy": {
"title": "Baywatch",
"rating": 4.9,
},
"best_romance": {
"title": "Love Actually",
"rating": 4.7,
},
}
best_comedy_title = movies["best_comedy"]["title"]
```
#pagebreak()
== Advanced Topic: Trees
The following topic is something that would be introduced in the last half of an introductory college Computer Science course.
#pagebreak()
== Creating Your Own Data Structure: Tree
#grid(columns: (1fr, 1fr),[
A *tree* is a *data structure* that represents a hierarchy using *nodes* where each node has one or more *children*.
], [
#align(center + horizon)[#image("Tree_computer_science.svg")]
])
#pagebreak()
== Binary Search Tree
#grid(columns: (1fr, 1fr), [
A *binary search tree* is a kind of tree where each node has at most two children, named *left* and *right*.
], [
#align(center + horizon)[#image("Binary_tree_v2.svg", height: 80%)]
])
#pagebreak()
== Binary Search Tree
Binary trees can be used to efficiently store numeric data.
It works like this:
- Each node contains a number called `key`
- The `key` of all children to the left is less than the `key` of the node
- The `key` of all children to the right is greater than the key of the node
#pagebreak()
== Binary Search Tree
#align(center + horizon)[#image("Binary_search_tree.svg")]
#pagebreak()
#text(size: 22pt)[
```python
tree = {
"key": 7,
"left": {
"key": 3,
},
"right": {
"key": 12,
"left": {
"key": 9,
},
"right": {
"key": 15
}
}
}
```
]
#pagebreak()
== Search Algorithm
#grid(columns: (1fr, 1fr), [
Given a tree and a number $n$, what is an algorithm to search for that number in the tree?
], [#align(center + horizon)[#image("Binary_search_tree.svg")]
])
#pagebreak()
== Search Algorithm (Iterative)
#grid(columns: (2.5fr, 1fr), [
+ Start at the root and assign it to `node`
+ If `n` equals `key`, return true
+ If `n` is less than `key`:
+ If there is no left child, return false
+ Assign the left child to `node`, go to 2
+ If `n` is greater than `key`:
+ If there is no right child, return false
+ Assign right child to `node`, go to 2
], [
#align(center + top)[#image("Binary_search_tree.svg")]
])
#pagebreak()
#text(size: 20pt)[
```python
def search(root, n):
node = root
while True:
key = node["key"]
if n == key:
return True
if n < key:
if "left" in node:
node = node["left"]
else:
return False
else:
if "right" in node:
node = node["right"]
else:
return False
```
]
#pagebreak()
== Break
#pagebreak()
== Lab 4: Tightrope
#link("https://tinyurl.com/wilson-pi-day-4")
|
https://github.com/j-mueller/typst-vegalite | https://raw.githubusercontent.com/j-mueller/typst-vegalite/main/typst-package/examples/bar-chart.typ | typst | MIT License | #set page(width: 200mm, height: 150mm, margin: 10mm)
#import "@preview/nulite:0.1.0" as vegalite
#vegalite.render(
width: 100%,
height: 100%,
zoom: 1,
json("spec.json")
) |
https://github.com/HernandoR/lz-brilliant-cv | https://raw.githubusercontent.com/HernandoR/lz-brilliant-cv/main/metadata.typ | typst | Apache License 2.0 | /* Personal Information */
// Change this variable to control output language & cited module
// INFO: value must matches folder suffix; i.e "zh" -> "./modules_zh"
#let varVersion = ""
#let varLanguage = "zh"
#let firstName = "Zhen"
#let lastName = "Liu"
#let personalInfo = (
github: "HernandoR",
phone: "+86 15671190677",
email: "<EMAIL>",
linkedin: "liuzhen23",
//gitlab: "mintyfrankie",
//homepage: "jd.me.org",
//orcid: "0000-0000-0000-0000",
//researchgate: "John-Doe",
//extraInfo: "",
)
#let headerQuoteInternational = (
"": [Master student with financial background looking for a full time job starting from now],
"en": [Master student with Machine Learning background looking for a full time job starting from now],
"zh": [寻找全职工作]
)
#let nonLatinOverwriteInfo = (
// "customFont": "FangSong_GB2312",
"customFont": "FiraMonoNerdFont",
"firstName": "刘朕",
"lastName": "",
// submit an issue if you think other variables should be in this array
)
/* Layout Setting */
// Optional: skyblue, red, nephritis, concrete, darknight
#let awesomeColor = "skyblue"
// Leave blank if profil photo is not needed
#let profilePhoto = "../src/avatar.png"
// Decide if you want to put your company in bold or your position in bold
#let varEntrySocietyFirst = false
// Decide if you want to display organisation logo or not
#let varDisplayLogo = true
// for cvFooter and letterFooter arrays, add your own languages while the keys must match the varLanguage variable
#let cvFooterInternational = (
"": "Curriculum vitae",
"en": "Curriculum vitae",
"fr": "Résumé",
"zh": "简历"
)
#let letterFooterInternational = (
"": "Cover Letter",
"en": "Cover Letter",
"fr": "Lettre de motivation",
"zh": "求职信"
)
|
https://github.com/Xiaole-An/personalResume | https://raw.githubusercontent.com/Xiaole-An/personalResume/main/resume.typ | typst | #import "template.typ": *
// 设置图标, 来源: https://fontawesome.com/icons/
// 如果要修改图标颜色, 请手动修改 svg 文件中的 fill="rgb(38, 38, 125)" 属性
#let faAward = icon("icons/fa-award.svg")
#let faBuildingColumns = icon("icons/fa-building-columns.svg")
#let faCode = icon("icons/fa-code.svg")
#let faEnvelope = icon("icons/fa-envelope.svg")
#let faGithub = icon("icons/fa-github.svg")
#let faGraduationCap = icon("icons/fa-graduation-cap.svg")
#let faLinux = icon("icons/fa-linux.svg")
#let faPhone = icon("icons/fa-phone.svg")
#let faWindows = icon("icons/fa-windows.svg")
#let faWrench = icon("icons/fa-wrench.svg")
// 主题颜色
#let themeColor = rgb("#080a23")
// 设置简历选项与头部
#show: resume.with(
// 字体基准大小
size: 10pt,
// 标题颜色
themeColor: themeColor,
// 控制纸张的边距
top: 1.5cm,
bottom: 2cm,
left: 2cm,
right: 2cm,
// 如果不需要头像,则将下面的参数注释或删除
photograph: "images/photo.png",
photographWidth: 6.42em,
gutterWidth: 3em,
)[
#figure(
// placement: auto,
image("images/top_half_eng.png", width: 40%),
)
= 安尘汐
#info(
color: themeColor,
(
// 其实 icon 也可以直接填字符串, 如 "fa-phone.svg"
icon: faPhone,
content: "(+86) 13002460562"
),
(
icon: faBuildingColumns,
content: "东北大学",
),
(
icon: faGraduationCap,
content: "机械工程",
),
(
icon: faEnvelope,
content: "<EMAIL>",
link: "mailto:<EMAIL>"
),
(
content: "出生年月:2000.05",
),
(
content: "政治面貌:共青团员",
),
(
content:"英语水平:CET-6"
),
(
content:"籍贯:辽宁"
),
)
#h(2em) // 手动顶行, 2em 代表两个字的宽度
]
== 教育背景
#sidebar(withLine: true, sideWidth: 5%)[
硕士
本科
][
*东北大学* · 机械工程与自动化学院 · 机械工程专业(推荐免试)机器视觉与机器人实验室 (前15%)
*东北大学* · 机械工程与自动化学院 · 机械工程专业(前20%)
]
== 实习经历
#shixi_item(
[ *沈阳新松机器人自动化股份有限公司* ],
[算法实习生],
date[ 2024 年 07 月 – 至今 ]
)
- *工作内容:*负责特征点提取和匹配算法的训练和改进、调优工作。构建单应性矩阵对图像进行投射投影变换实现数据增强。
- *工作结果:*将匹配鲁棒性从45°提高到60°。
== 项目经历
#item(
[ *基于多任务和高层特征的曝光轮廓不清叶片的边缘检测* ],
[],
date[ 2023 年 04 月 – 2024 年 06 月 ],
)
- *项目内容:* 为了解决强光导致的边缘模糊,本项目提取图像极高层信息作为图像中物体的轮廓表示并添加监督,使用相同的网络依次加权融合来自不同任务的不同层级的特征,根据叶片数据集的正负样本量和自然场景边缘数据集的正负样本量加权BCE损失,实现良好的背景负样本抑制效果。
- *项目结果:* 提出了BedNet-IR网络,利用高层特征和显著性检测、边缘检测多任务学习方法实现叶片由于曝光轮廓被隐去的良好边缘预测,同时也展示出了较好的泛化性能。
#xiangmu_item(
[ *相似航空机加件细粒度分类 * ],
[东北大学 / 沈阳飞机工业集团],
date[ 2023 年 07 月 – 2024 年 05 月 ]
)
- *项目内容:* 设计相机支架、工装,对相机、镜头、光源进行选型,完成图像采集平台的硬件设计与平台搭建,使用C\#调用Mech-Eye Nano相机实现机加件的二维+三维信息采集并利用C\#对海康威视Visionmaster软件进行二次开发,设计二维+三维分类算法。
- *项目结果:* 独立完成课题组与企业的合作项目,自主设计图像采集平台,使用双视角图像输入实现现有机加件100%分类正确率,与企业项目负责人沟通,及时跟进项目需求,汇报项目进展
- *课题内容:*设计孪生网络,在分类头融合logit实现双视角输入的图像分类,改进CE损失,针对机加件极为相似的特点最大化输出向量的分布熵抑制高置信度的错误结果,提高分类准确率。
== 专业技能
熟悉Python编程语言,Pytorch深度学习框架,linux操作系统,了解git常见操作
熟悉常见的边缘检测传统算子和深度学习边缘检测算法,如Sobel, Canny, RCF, PidiNet等。
熟悉深度学习基本理论及经典网络模型,如CNN,ResNet,RepVGG,ViT等。
== 获奖情况
一等学业奖学金两次(硕士期间);二等学业奖学金一次,三等学业奖学金两次(本科期间);辽宁省人工智能大赛三等奖;互联网+大学生创新创业大赛辽宁省三等奖;挑战杯大学生创业计划竞赛辽宁省二等奖
== 发表论文
*<NAME>*, <NAME>, et al. A Novel Edge Detection Method of Blade with Multi-Supervision for Fore-Background Confusion Caused by Extreme Illumination.
(IEEE Sensors Journal Q1)
== 自我评价
本人品行端正、乐于助人;坚持运动,个性积极乐观;具有强烈进取心、责任心,具有较好沟通与合作能力。
|
|
https://github.com/EliasRothfuss/vorlage_typst_doku-master | https://raw.githubusercontent.com/EliasRothfuss/vorlage_typst_doku-master/main/pages/glossar.typ | typst | name=Glossar, description=Als Glossar wird eine Liste von ausgewählten
Begriffen bezeichnet, denen eine jeweilige Erläuterung zugeordnet ist.
Ein Glossar wird, sofern gewünscht, im Anhang des Dokuments hinzugefügt.
|
|
https://github.com/sabitov-kirill/comp-arch-conspect | https://raw.githubusercontent.com/sabitov-kirill/comp-arch-conspect/master/questions/11_storage.typ | typst | #heading[Внешние запоминающие устройства.]
#emph[Внешние запоминающие устройства (Устройство магнитных и оптических накопителей. Что такое дорожка, сектор? Что хранится в секторе? RAID. Флеш накопители и SSD и как они работают, в чем отличия от HDD?).]
#import "/commons.typ": imagebox
== Внешние запоминающие устройства
#emph[Внешнее запоминающее устройство] — устройство, предназначенное для записи и хранения данных. В основе работы запоминающего устройства может лежать любой физический эффект, обеспечивающий приведение системы к двум или более устойчивым состояниям.
== Магнитные накопители
#emph[Магнитный накопитель] — это внешнее запоминающее устройство, использующее какую-то поверхность, которая может быть намагничена, и какое-то утройство, которое может по заданому участку поверхности считать его намагниченность и изменить её. В качестве накопителя могут выступать: лента, алюминиевая поверхность, стеклянная поверхность и так далее.
#columns(3)[
#imagebox("magnet_hdd.jpeg", height: 130pt, label: [Магнитный жёсткий диск])
#colbreak()
#imagebox("tape_drive.jpg", height: 130pt, label: [Ленточный накопитель])
#colbreak()
#imagebox("diskett.png", height: 130pt, label: [Дискета])
]
=== Чтение и запись данных в HDD
В случае с дисками (которые вращаются порядка $7200\/3600"RPM"$), круговые участки намагниченности представляют собой последовательности битов, называемые дорожками, 1 бит информации хранится на участке шиирной порядка $0.1 mu m$. Дорожка делится на сектора фиксированного размера (512 байт, сейчас 4 Кб). Состояние каждого участка считывается и записывается специальной головкой, в зависимости от намагниченности. Такой сектор является минимально адресуемой единицей памяти на диске.
#imagebox("magnet_disk_sector.png", height: 190pt)
Важно понамать, что каждый сектор жесткого диска разбит на 3 части:
- Преамбула, хранящаая данные о новом секторе.
- Данные сектора.
- Исправляющие коды, которые способны улавливать и устранять ошибки (например, коды Рида-Соломона, которые). Коды Рида-Соломона, наподобие кодов Хемминга, но оперируют блоками данных, исправляя в них ошибки.
#imagebox("magnet_hdd_in_details.png", height: 190pt)
В реальности, жёсткий диск состоит даже не из одной пластины, а из нескольких. В наше время на поверхности одного диска может храниться до 1Тб данных.
=== Проблемы HDD
- Перестановка считывающей головки на произвольный сектор занимает в худшем случае 5-10 милисекунд. (долго).
- Из-за того, что угловая скорость вращения постоянна, плотность запиcи информации на диске неравномерна: чем дальше от центра, тем менее плотная запись.
К счастью, второе можно исправить, сделав так, что количество секторов на разных дорожках будет увеличиваться от цетра к краю.
Взаимодействие в жесткими дисками происходит через контроллер, --- микросхему, которая получает команды на чтение/запись/форматирование, управляет перемещением головок, обнаруживает и исправляет ошибки, передает данные наружу и даже следит за здоровьем жесткого диска. Угловая скорость вращения диска *не меняется*.
Для того чтобы увеличить объем хранимых данных и обеспечить их сохранность используются 2 подхода: _RAID (Redurent Array of Independent Disks)_ и _SLED (Single Large Expensive Disk)_.
#pagebreak()
=== RAID (Redurent Array of Independent Disks)
#grid(columns: (50%, 50%), column-gutter: 20pt, row-gutter: 10pt, [
#imagebox("RAID0.png", height: 120pt)
- Разбиваем объем $n$ жестких дисков на $m$ равных блоков, связанных между собой
- Можно читать $n$ блоков параллельно с $n$ дисков
- Скорость увеличивается существенно, если данные разбиты равномерно между дисками
- Шанс потерять данные в $n$ раз выше
], [
#imagebox("RAID1.png", height: 120pt)
- Дублируем данные
- Эффективный объём в 2 раза меньше реального
- Чтение в 2 раза быстрее, запись такая же
], [
#imagebox("RAID2.png", height: 120pt)
- Одна часть жестких дисков для хранения информации, другая для битов исправления хранимых данных
- Оперируем блоками или байтами
- Используем код Хэмминга, можем исправлять ошибки на лету
- Нужно минимум 7 дисков, быстрый износ
], [
#imagebox("RAID3.png", height: 120pt)
- Храним байт чётности
- Хорошо читать
- Плохо писать (перезапись 3 диска)
- Исправление ошибок дольше
], [
#imagebox("RAID4.png", height: 120pt)
- То же самое, что и RAID 3, но вместо байт - блоки
], [
#imagebox("RAID5.png", height: 120pt)
- То же самое, что и RAID 4, но теперь все диски изнашиваются равномерно
], [
#imagebox("RAID6.png", height: 120pt)
- То же самое, что и RAID 5, только мы храним 2 блока чётности
], [
#imagebox("RAID1PLUS0.png", height: 120pt)
- Просто 2 RAID 0, соединённые в RAID 1
])
=== Оптические накопители
#emph[Оптические накопители] похожи на магнитные. Они имеют одну длинную закручивабщуюся спираль на весь диск. Информация хранится с помощью дырок и площадок (переход дырка-площадка или площадка-дырка это единичка, плоская поверхность - нолик). В них всё так же есть преамбула и коды коррекции.
#imagebox("optical_disks.jpg", height: 150pt)
Выгодно исопользовать тогда, когда информация читается непрерывно, полностью (музыка, фильмы).
Для того, чтобы перезаписать информацию приходится срезать слой и нанести новые углубления на диске.
Угловая скорость вращения диска *меняется* от центра к краю, чтобы линейная скорость при считывании оставалась постоянной.
#align(center)[ === Флеш-накопители (SSD и флешки) ]
#columns(2)[
#imagebox("kingston_ssd.jpg", height: 200pt, label: [SSD-диск на 480 Гб])
#colbreak()
\
#imagebox("flashka.jpg", height: 140pt, label: [
\
\
\
флешка])
]
#emph[Флеш-накопители] для хранения информации используют транзисторы с плавающим затвором. В обычном транзисторе данные теряются при
отключении питания, а в транзисторе с плавающим затвором заряд на
затворе сохраняется. Благодаря этому, на них можно хранить и перезаписывать информацию.
Транзисторы с плавающим затвором могут хранить в себе 2 (SLC, Single Level Cell), 4 (MLC, Multi Level Cell), 8 (TLC, Tripple Level Cell), 16 (Quadripple Level Cell) состояний. В жизни вы чаще всего встречается 4 или 8 состояний на транзистор.
С точки зрения внутренней реализации SSD и флешки очень сильно похожи на оперативную память. SSD на самом деле представляет из себя флешку с умным контроллером, который равномерно распредеяет по нему нагрузку.
#columns(2)[
#align(center)[*Плюсы*]
- Нулевое время поиска данных по сравнению с HDD.
- Не страдают от резких перемещений в пространстве.
#colbreak()
#align(center)[*Минусы*]
- Заряд на транзисторе может пропадать со временем.
- Для перезаписи данных сначала необходимо записать 0, а затем данные.
]
|
|
https://github.com/PraneethJain/GSoC | https://raw.githubusercontent.com/PraneethJain/GSoC/main/proposal.typ | typst | #set text(font: "Roboto")
#set heading(numbering: "1.")
#show link: set text(rgb(0, 0, 255))
#align(center, text(size: 1cm, [GSoC 2024]))
#align(center, text(size: 0.8cm, [Project Proposal]))
#line(start: (-10%, 0%), end: (110%, 0%))
#figure(image("julia.svg", width: 50%),)
\
\
#align(center, text(size: 9mm, [Language Interoperability]))
#align(center, text(size: 9mm, [CxxWrap.jl]))
#align(center, text(size: 6mm, [<NAME>]))
#align(center, text(size: 6mm, [Mentor: <NAME>]))
\
#figure(image("gsoc.png", width: 70%),)
#set page(
header: [The Julia Language #h(1fr) Language Interoperability - CxxWrap STL #line(start: (-10%, 0%), end: (110%, 0%))],
footer: [#line(start: (-10%, 0%), end: (110%, 0%))
GSoC 2024
#h(1fr)
<NAME>
#h(1fr)
#counter(page).display(
"1 of 1",
both: true,
)
])
#set par(leading: 3.5mm)
#outline(
title: [Table of Contents #linebreak() #linebreak()],
indent: auto,
)
#set par(leading: 0.65em)
#pagebreak()
= Introduction
== Project Synopsis
The CxxWrap.jl package acts as a bridge between Julia and compiled C++ code, resulting in developers being able to use the best of both languages. While it already exposes a subset of the C++ standard library to Julia, there is a significant opportunity to expand its capabilities and enhance the interoperability further.
The primary objective of this project is to improve the coverage of the C++ Standard Template Library within CxxWrap.jl. The STL is very widely used and provides a rich set of container types, algorithms, and utilities in C++.
== Relevant Work
=== In CxxWrap
I have implemented the interface for the `queue` data structure. I have also come up with and implemented a better testing solution for choosing the right versions of `CxxWrap` and `libcxxwrap`. Here are the relevant pull requests:
- https://github.com/JuliaInterop/CxxWrap.jl/pull/413/
- https://github.com/JuliaInterop/CxxWrap.jl/pull/408/
- https://github.com/JuliaInterop/libcxxwrap-julia/pull/146
=== Outside CxxWrap
I have improved test coverage of some functions in the Julia standard library
- https://github.com/JuliaLang/julia/pull/51835
- https://github.com/JuliaLang/julia/pull/51941
I contribute frequently to `TheAlgorithms/Julia`, which is a collection of algorithms implemented in Julia. Here is a link to all my PRs in this repository.
- https://github.com/TheAlgorithms/Julia/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3APraneethJain+is%3Aclosed
I have built a ray tracer in C++ for my Computer Graphics course
- https://github.com/PraneethJain/simple_renderer
== Technical Skills
=== Languages
Julia $circle.small$ C $circle.small$ C++ $circle.small$ Rust $circle.small$ x86 Assembly $circle.small$ Bash $circle.small$ Python
=== Theory
Data Structures and Algorithms $circle.small$ Algorithm Analysis and Design $circle.small$ Operating Systems $circle.small$ Computer Systems Organization
=== Tools
Linux $circle.small$ Docker $circle.small$ gdb $circle.small$ Latex
== Bio
=== About
I'm a 2nd year undergraduate student pursuing my B.Tech in Computer Science at IIIT-H, and will be joining a research lab for my honors next semester. I am deeply interested in low level programming and am planning to pursue research in this field.
=== Why choose me
- I am well-versed in both Julia and C++. I have contributed to various open-source organisations in Julia, and have built many personal projects using C++.
- I aim to heavily test and document all the functionality that I will be implementing
- I am familiar with the codebase and have made contributions to this project
I chose this project as it is the perfect way to utilize my skill-set, while learning a lot more at the same time.
== Contact Information
#table(
columns: (1fr, 2fr),
inset: 1em,
[Name], [<NAME>],
[College], [International Institute of Information Technology, Hyderabad, India],
[Degree Program], [B.Tech in Computer Science],
[Time Zone], [GMT +5:30],
[Links], [#link("https://github.com/PraneethJain/", [Github]) - #link("https://www.linkedin.com/in/praneeth-jain/", [Linkedin])],
[Emails], [#link("mailto:<EMAIL>") #link("mailto:<EMAIL>")],
[Phone Number], [+91 6264381767],
)
= Benefits to Community
The successful completion of this project will greatly benefit scientific computing researchers, systems programmers, low-level developers and open-source contributors. By integrating high-performance C++ data structures and algorithms with Julia's scientific computing capabilities, these groups will gain access to a larger set of tools for tackling computationally and algorithmically intensive problems.
= Deliverables
== Primary Goals
I aim to implement these goals during the course of GSoC this year.
=== Add STL Container Types
The following containers, along with their commonly used methods, will be added
- #link("https://cplusplus.com/reference/set/set/", [`std::set`])
- #link("https://cplusplus.com/reference/set/multiset/", [`std::multiset`])
- #link("https://cplusplus.com/reference/stack/stack/", [`std::stack`])
- #link("https://cplusplus.com/reference/queue/priority_queue/", [`std::priority_queue`])
- #link("https://cplusplus.com/reference/unordered_set/unordered_set/", [`std::unordered_set`])
- #link("https://cplusplus.com/reference/unordered_set/unordered_multiset/", [`std::unordered_multiset`])
- #link("https://cplusplus.com/reference/bitset/bitset/", [`std::bitset`])
- #link("https://cplusplus.com/reference/list/list/", [`std::list`])
- #link("https://cplusplus.com/reference/forward_list/forward_list/", [`std::forward_list`])
=== Add STL Algorithms
The following algorithms will be added
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/lower_bound", [`std::ranges::lower_bound`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/upper_bound", [`std::ranges::upper_bound`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/binary_search", [`std::ranges::binary_search`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/sort", [`std::ranges::sort`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/stable_sort", [`std::ranges::stable_sort`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/max", [`std::ranges::max`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/max_element", [`std::ranges::max_element`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/min", [`std:;ranges::min`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/min_element", [`std::ranges::min_element`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/minmax", [`std::ranges::minmax`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/minmax_element", [`std::ranges::minmax_element`])
- #link("https://en.cppreference.com/w/cpp/algorithm/ranges/clamp", [`std::ranges::clamp`])
=== Documentation
Currently, `StdVector` and `StdString` are documented. I will document the functionality of the existing containers (`StdValArray`, `StdDeque` and `StdQueue`) and all the new containers that I will be adding.
The algorithms being added will also be documented, along with usage examples for them.
I will also be documenting the implementation steps for exposing more of the standard library to help future contributors.
=== Testing
I will be implementing unit tests for all the containers and algorithms being added.
For integration testing on the #link("https://github.com/JuliaInterop/libcxxwrap-julia", [libcxxwrap.jl]) component, the automated tests currently work for pull requests. I will update the testing solution such that it works outside of pull requests as well.
== Stretch Goals
If time permits, I would like to make general improvements to the core of CxxWrap, and add more STL containers. Otherwise, I will be implementing these after the completion of GSoC.
=== Add Iterator Support
Many STL algorithms depend upon the use of iterators. For this, an iterator type for containers has to be exposed from the C++ side, so that it can be used to call these algorithms from the Julia side.
=== Add support for containers with multiple generics
The current setup to add containers supports only one generic argument. Some containers like #link("https://en.cppreference.com/w/cpp/container/map", [`std::map`]) require multiple generic arguments, and thus require updating the current setup.
=== Add more STL Container Types
These containers have been introduced in C++ 23
- #link("https://en.cppreference.com/w/cpp/container/flat_set", [`std::flat_set`])
- #link("https://en.cppreference.com/w/cpp/container/flat_multiset", [`std::flat_multiset`])
= Project Details
== Codebase
Currently, the standard library interface is implemented in a single file `StdLib.jl`. Since I will be adding many containers and algorithms, my first step will be modularizing the codebase. I will be splitting it into folders for containers and algorithms respectively, with appropriate files for each of them.
== STL Containers
https://en.cppreference.com/w/cpp/container
I will be going over my plan for implementing STL containers using the example of `std::queue`
To implement the containers listed, I will be taking a two-step approach
=== libcxxwrap component
The functionalities to be exposed need to be wrapped in a struct on the C++ side.
For the case of `std::queue`, I have exposed the `front`, `push`, `pop` and `size` functionalities.
```cpp
template<typename T>
struct WrapQueueImpl
{
template<typename TypeWrapperT>
static void wrap(TypeWrapperT&& wrapped)
{
using WrappedT = std::queue<T>;
wrapped.module().set_override_module(StlWrappers::instance().module());
wrapped.method("cppsize", &WrappedT::size);
wrapped.method("push_back!", [] (WrappedT& v, const T& val) { v.push(val); });
wrapped.method("front", [] (WrappedT& v) -> const T { return v.front(); });
wrapped.method("pop_front!", [] (WrappedT& v) { v.pop(); });
wrapped.module().unset_override_module();
}
};
```
=== CxxWrap component
The exposed functions need to mapped to the appropriate methods on the Julia interface.
```jl
Base.size(v::StdQueue) = (Int(cppsize(v)),)
Base.push!(v::StdQueue, x) = push_back!(v, x)
Base.first(v::StdQueue) = front(v)
Base.pop!(v::StdQueue) = pop_front!(v)
```
== STL Algorithms
https://en.cppreference.com/w/cpp/algorithm/ranges
I will implement STL algorithm interfaces as constrained algorithms (introduced in C++ 20) using `std::ranges` on the C++ side. I have chosen to do so because these abstract away iterators, and allow for passing the containers directly. This leads to a much cleaner implementation on the Julia side.
Since it is hard to cover all the STL algorithms, I have chosen the ones that are most frequently used.
= Project Schedule
The proposed schedule has been made keeping in mind the #link("https://developers.google.com/open-source/gsoc/timeline", [GSoC timeline]).
At the end of both the coding periods, I have allocated a buffer week. This will be used in case the project would be behind schedule due to unforeseen circumstances. In case the project is on time, the buffer weeks would be used to implement the stretch goals.
== Community Bonding Period
_May 1 - May 26_: During this period, I aim to
- Decide and set up a weekly status update method with the mentor
- Add more tests for the existing containers
- Update the testing method in `libcxxwrap` to work outside of PRs as well
- Implement a range based algorithm to get an idea of the possible technical challenges
== First Coding Period
In the first phase, I will be working on the STL containers, their interfaces, documentation and testing. I plan on writing the tests and documentation along with the actual implementations, rather than pushing them towards the end.
_May 27 - June 2_: `set` and `multiset`
_June 3 - June 9_: `unordered_set` and `unordered_multiset`
_June 10 - June 16_: `stack` and `priority_queue`
_June 17 - June 23_: `list` and `forward_list`
_June 24 - June 30_: `bitset`
_July 1 - July 7_: Buffer week
== Midterm Evaluation
_July 8 - July 12_: Write the mid report and further polish the documentation and tests. Since at this point I will know how the code structure would be, it will be a good time to refactor the code.
== Second Coding Period
In the second phase, I will be working on STL algorithms, along with their documentation and testing.
_July 15 - July 21_: `max`, `max_element`, `min`, `min_element`
_July 22 - July 28_: `minmax`, `minmax_element`, `clamp`
_July 29 - August 4_: `sort`, `stable_sort`
_August 5 - August 11_: `lower_bound`, `upper_bound`, `binary_search`
_August 12 - August 18_: Buffer week
== Final Submission
_August 19 - August 26_: Write the final report and document the process for future contributors
== Availability
I have my summer vacation from $10^"th"$ May to $1^"st"$ August, and don't have other commitments over this time period. I will be giving $approx$ 30 hours per week to this project in this time period, and plan to get the majority of the project done here.
For the remainder of the time period, ($2^"nd"$ August to $26^"th"$ August), my college will resume and I will be able to give $approx$ 15 hours per week.
If something does come up that clashes with the timeline, it will be informed in a timely manner and I will ensure that the working hours won't be affected. |
|
https://github.com/0xPARC/0xparc-intro-book | https://raw.githubusercontent.com/0xPARC/0xparc-intro-book/main/src/cq.typ | typst | #import "preamble.typ":*
= Lookups and cq <cq>
This is a summary of cq,
a recent paper that tells how to do "lookup arguments"
in a succinct (or ZK) setting.
== What are lookups
Suppose you have two lists of items,
$f_1, dots, f_n$ and $t_1, dots, t_N$.
A "lookup argument" is an interactive proof protocol
that lets Peggy prove the following claim,
with a short proof:
#claim[
Each of the $f_i$'s is equal to (at least) one of the $t_j$'s.
]
=== Wait a second, who cares?
Here are a couple of applications of lookups
which are very very important
as part of practical ZK proof systems.
#example[
Range checks.
Suppose you have some field element $x$,
and you want to prove some claim like $0 lt.eq.slant x < 2^{64}$.
This sort of thing is surprisingly difficult in ZK,
because we're working in a finite field,
and there's no notion of "less than" or "greater than" in a finite field.
Kind of incredibly, one of the most competitive ways to prove this claim
turns out to be a lookup argument:
You simply write out a list of all the numbers $0, 1, dots, 2^{64} - 1$,
and check that $x$ is in this list.
There are lots of variants on this idea.
For example, you could write $x$ in base $2^{16}$ as
$$x = x_0 + 2^{16} x_1 + 2^{32} x_2 + 2^{48} x_3,$$
and run a lookup argument on each $x_i$ to show that $0 lt.eq.slant x_i < 2^{16}$.
]
#example[
Function lookups.
Suppose you have some function $f$ that is hard to compute in a circuit,
and you want to prove that $y = f(x)$,
where $x$ and $y$ are two numbers in your proof.
One way to do it is to precompute a table of all the pairs $(x, f(x))$,
and then look up your specific value $(x, y)$ in the table.
] <function-lookups>
=== Back to lookups
Let's notice a couple of features of these applications of the lookup problem.
First of all, let's call the values $f_i$ the _sought_ values,
and the values $t_j$ the _table_ or the _index_.
So the lookup problem is to prove that all the sought values can be found in the table.
- The values $t_j$ are typically known to the verifier.
- The table $t_1, dots, t_N$ might be very long (i.e. $N$ might be very big).
In practice it's not uncommon to have a value of $N$ in the millions.
- A single, fixed table of values $t_j$ might be used in many, many proofs.
Conversely:
- The values $f_i$ are usually secret, at least if the prover is concerned about zero knowledge.
- There may or may not be many values $f_i$ (i.e. $n$ might be big or small).
If $n$ is small, we'd like the prover runtime to be relatively small (roughly $O(n)$),
even if $N$ is big.
- The values $f_i$ will be different in every proof.
As it turns out, lookups are a huge bottleneck in ZK proof systems,
so an incredible amount of work has been done to optimize them.
We're just going to talk about one system.
#remark[
We will assume that the values $f_i$ and $t_j$ are all elements of some large finite field $FF_q$,
and we will do algebra over this finite field.
In general, you might want to work with other values of other types than field elements.
In the "function lookups" example (@function-lookups),
we want to work with ordered pairs (of, say, field elements).
In other contexts we might want to work with (suitably encoded) strings, or...
You can always solve this by hashing whatever type it is into a field element.
A second option (the "random linear combination" trick, we will see a lot of it)
is to use a verifier challenge.
In place of the pair $(x_i, y_i)$, we will work with the single field element $x_i + r y_i$,
where $r$ is randomness provided by the verifier.
In more detail, imagine you have a list of pairs $(x_i, y_i)$ that you want to run a lookup argument on.
The prover sends two commitments, one to $x_1, dots, x_n$, and one to $y_1, dots, y_n$.
The verifier responds with a challenge $r$, and then you run the lookup argument on the elements
$x_i + r y_i$.
(This is secure because the prover committed to both vectors before $r$ was chosen.)
A similar trick works for tuples of arbitrary length:
just use powers of $r$ as the coefficients of your random linear combination.
In any case, we will only consider looking up field elements from here on out.
]
== cq
The name of the system "cq" stands for "cached quotients."
For extra punniness, the authors of the paper note that "cq" is pronounced like "seek you."
Cq lookup arguments are based on the following bit of algebra:
#theorem[
The lookup condition is satisfied
(every $f_i$ is equal to some $t_j$)
if and only if there are field elements $m_j$ such that
$
sum_(i=1)^n (1)/(X - f_i) = sum_(j=1)^N (m_j)/(X - t_j)
$
(as a formal equality of rational functions of the formal variable $X$).
] <cq-identity>
#proof[
If each $f_i$ is equal to some $t_j$, it's easy.
For each $j$, just take $m_j$ to be the number of times $t_j$
occurs among the $f_i$'s, and the equality is obvious.
Conversely, if the equality of rational functions holds,
then the rational function on the left will have a pole at each $f_i$.
The rational function on the right can only have poles at the values $t_j$
(of course, it may or may not have a pole at any given $t_j$, depending
whether $m_j$ is zero or not),
so every $f_i$ must be equal to some $t_j$.
]
=== Polynomial commitments for cq
Cq is going to rely on polynomial commitments.
For concreteness, we'll work with KZG commitments (@kzg).
Cq will let the prover prove the lookup claim to the verifier...
- The proof (data sent from prover to verifier) will consist of $O(1)$ group elements.
This includes a KZG commitment to the vector of sought values $f_i$.
- Given the index $t_j$, both prover and verifier
will run a "setup" algorithm with $O(N log N)$ runtime.
- Once the setup algorithm has been run, each lookup proof
will require a three-round interactive protocol.
- The verifier work will be $O(1)$ calculations.
- Given the sought values $f_i$ and the output of the setup algorithm,
the prover will require $O(n)$ time to generate a proof.
Let's start with a brief outline of the protocol,
and then we'll flesh it out.
- We're assuming both prover and verifier know the "index" values $t_j$.
So they can both compute the KZG commitment to these values,
and we'll assume this has been done once and for all
before the protocol starts.
- The prover sends $Com(F)$ and $Com(M)$, KZG commitments to
the polynomials $F$ and $M$ such that $F(omega^i) = f_i$ for each $i = 1, dots, n$
and $M(zeta^j) = m_j$ for each $j = 1, dots, N$.
(Here $omega$ is an $n$th root of unity, and $zeta$ an $N$th root of unity.)
- The verifier sends a random challenge $beta$,
which will substitute for $X$ in the equality of rational functions
(@cq-identity).
- The verifier chooses a random challenge $beta$.
- The prover sends two more KZG commitments:
a commitment $Com(L)$ to the polynomial $L$ such that
$
L(omega^i) = 1/(beta - f_i),
$
and another $Com(R)$ to the polynomial $R$ such that
$
R(zeta^j) = m_j/(beta - t_j).
$
- The prover sends the value
$
s = sum_(i=1)^n (1)/(X - f_i) = sum_(j=1)^N (m_j)/(X - t_j).
$
- Now the prover has to prove the following:
- The polynomials $L$ and $R$ are well-formed.
That is,
$
L(omega^i) (beta - F(omega^i)) = 1
$
for all $i = 1, dots, n$, and
$
R(zeta^j) (beta - T(zeta^j)) = M(zeta^j)
$
for all $j = 1, dots, N$.
- The value $s$ is equal to both the sum of the $l_i$'s
and the sum of the $r_j$'s.
The first claim is proven by a standard polynomial division trick:
Asking that two polynomials agree on all powers of $omega$
is the same as asking that they are congruent modulo $Z_n(X) = X^n-1$.
So the prover simply produces a KZG commitment to the quotient polynomial $Q_L$
satisfying
$
L(x) (beta - F(x)) = 1 + Q_L (X) Z_n (X).
$
And similarly for the claim involving $R$:
the prover produces a KZG commitment to the polynomial $Q_R$ such that
$
R(X) (beta - T(X)) = M(X) + Q_R (X) Z_N (X).
$
#remark[
The verifier can check the claim that
$L(x) (beta - F(x)) = 1 + Q_L(X) Z_n(X)$,
and others like it, using the pairing trick.
(This is an example of the method explained in @pair-verify-example.)
The verifier already has access to KZG commitments
$Com(L)$, $Com(F)$, $Com(Q_L)$, and $Com(Z_n)$,
either because he can compute them himself ($Com(Z_n)$),
or because the prover sent them as part of the protocol
($Com(L), Com(F), Com(Q_L)$).
Additionally, the prover will need to send the intermediate value
$Com(Q_L Z_n)$, a KZG commitment to the product.
The verifier then checks the pairings
$
pair(Com(Q_L Z_n), [1]) = pair(Com(Q_L), Com(Z_n))
$
(which verifies that the commitment $Com(Q_L Z_n)$ to the product polynomial
was computed honestly)
and
$
pair(Com(L), [beta] - Com(F)) = pair([1] + Com(Q_L Z_n), [1])
$
(which verifies the claimed equality).
The process of verifying this sort of identity is quite general:
The prover sends intermediate values as needed
so that the verifier can verify the claim using only pairings and linearity.
] <cq-pairing-verify>
The second claim is most easily verified by means of the following trick.
If $L$ is a polynomial of degree less than $n$,
then
$
sum_(i=0)^n L(omega^i) = n L(0).
$
So the prover simply has to open the KZG commitment $Com(L)$ at $0$,
showing that $n L(0) = s$
(and similarly for $R$).
=== Cached quotients: improving the prover complexity
The protocol above works, and it does everything we want it to,
except it's not clear how quickly the prover can generate the proof.
To recall what we want:
- We're assuming $n << N$.
- Prover and verifier can both do a one-time $O(N)$ setup,
depending on the lookup table $T$ but not on the sought values $F$.
- After the one-time setup, the prover runtime (given the sought values $F$)
should be only $O(n log n)$.
The polynomial $L$ has degree less than $n$ --
it is defined by Lagrange interpolation from its values at the $n$th roots of unity.
So $L$ can be computed quickly by a fast Fourier transform,
and none of the identities involving $L$
will give the prover any trouble.
But $R$ is a bigger problem: it has degree $N$.
So any calculation involving the coefficients of $R$ -- or of $M$, or the quotient $Q_R$ --
is a no-go.
So what saves us?
- The prover only ever needs to compute KZG commitments, not actual polynomials --
and KZG commitments are linear.
- $M$, $R$ and $Q_R$ can be written as sums of only $n$ terms
(which can be precomputed once and for all).
Let's take $R$ for example.
$R$ is the polynomial determined by
Lagrange interpolation and the condition
$
R(zeta^j) (beta - T(zeta^j)) = M(zeta^j)
$
Let $R_j$ be the polynomial
(a multiple of a Lagrange basis polynomial)
such that
$
R_j(zeta^j) = 1 / (beta - t_j)
$
but
$
R_j(zeta^k) = 0
$
for $k eq.not j$.
Then
$
R = sum_j m_j R_j,
$
and the sum has at most $n$ nonzero terms,
one for each item on the sought list $t_i$.
So the prover simply computes each commitment $Com(R_j)$
in advance, and then given $t_i$, computes
$
Com(R) = sum_j m_j Com(R_j).
$
A similar trick works for $Q_R$,
which is the origin of the name "cached quotients."
Recall that $Q_R$ is defined by
$
R(X) (beta - T(X)) = M(X) + Q_R (X) Z_N (X).
$
In other words, $Q_R$ is the result of "division with remainder":
$
R(X) (beta - T(X)) / Z_N (X) = Q_R (X) + M(X) / Z_N (X).
$
So the prover simply precomputes quotients $Q_(R_j)$ and remainders $M_j$ such that
$
R_j (X) (beta - T(X)) / Z_N (X) = Q_(R_j) (X) + M_j (X) / Z_N (X),
$
and then computes $Q_R$ and $M$ as linear combinations of them.
So, in summary:
The prover precomputes KZG commitments to $R_j$, $Q_(R_j)$, and $M_j$.
Then prover and verifier run the protocol described above,
and all the prover messages can be computed in $O(n log n)$ time,
using linear combinations of the cached precomputes.
|
|
https://github.com/joshuabeny1999/unisg-thesis-template-typst | https://raw.githubusercontent.com/joshuabeny1999/unisg-thesis-template-typst/main/utils/pageref.typ | typst | Other | #let pageref(labelText) = {
locate(loc => {
let label = label(labelText)
let elems = query(selector(label), loc)
if elems.len() == 1 {
let loc = elems.at(0).location()
let pageNumber = counter(page).at(loc)
link(label, numbering(loc.page-numbering(), ..pageNumber))
} else {
let errorMessage = "Label '" + labelText + "' is not defined"
panic(errorMessage)
}
})
} |
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/033%20-%20Rivals%20of%20Ixalan/006_Who%20Tells%20the%20Stories.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"Who Tells the Stories",
set_name: "Rivals of Ixalan",
story_date: datetime(day: 07, month: 02, year: 2018),
author: "<NAME> & <NAME>",
doc
)
= HUATLI
#figure(image("006_Who Tells the Stories/01.jpg", width: 100%), caption: [Art by Yeong-Hao Han], supplement: none, numbering: none)
The Immortal Sun vanished beneath their feet, and Huatli, Tishana, Vona, and Angrath all tumbled through the floor into the empty room below.
The lot of them landed in a breathless heap on the ground.
Huatli groaned and sat up. She felt bruised and sprained but . . . lighter somehow. She looked at Angrath, who blinked in dumbfounded amazement. The two of them looked upward. Where the Immortal Sun had been was now just a hole in the ceiling.
Angrath laughed heartily. He stood and glared at every person in the room.
"I HATE THIS PLANE, I HATE THIS CITY, AND I WISH YOU ALL A VISCERALLY PAINFUL DEATH!" His body glowed a warm and vivid orange, and he called out, "SEE YOU NEVER, PATHETIC FOOLS!" as he planeswalked away.
Tishana was staring at the place where he had been a moment before. She looked at Huatli, confused and alarmed. "He is gone," she said, stunned.
Huatli nodded limply. "And so is the Sun," she said plainly. Both the Immortal Sun and the barrier. Perhaps they were one and the same after all.
"NO!" Vona yelled at the hole in the ceiling. She was hissing in anger, stomping her feet on the ground. "Where did it go?! Which one of you took it?!"
"What happened?" the hierophant yelled faintly from the room above them. "I can't see anything."
"IT'S GONE, MAVREN!" Vona yelled upward, her voice agonized. "The Immortal Sun is gone!"
A faraway gasp. A very distant "Nooooo." Huatli was too exhausted to laugh at how childish it sounded. Breeches and the siren Malcolm were peering downward through the hole.
"WHERE IS SUN?!" Breeches yelled.
"It is gone, goblin!" Tishana shouted.
"What do we do now?" Malcolm quietly asked Breeches.
"Run away?" he suggested.
Malcolm nodded. "That seems best."
"RUNNING AWAY!" the goblin screeched, clambering up on Malcolm's head. The siren paused for a moment, and his head tilted for a moment as if he were listening for something.
"RUNNING AWAY?" repeated Breeches.
Malcolm shook off whatever had overcome him, extended his wings, and departed. Huatli got to her feet and walked over to help Tishana up. The two of them stood and looked around the room. A rumpled nest of dried leaves and grass was heaped into one corner of the room—a bed for some giant creature. The place had the same musty smell that permeated the rest of Orazca. A massive door was open to the outside, and light spilled in to illuminate a room that had been dark for centuries.
Tishana waved her hand, and Huatli heard a #emph[thud] followed by a pained groan from the room above. Moments later, <NAME> clambered through the hole in the ceiling and moved to Vona's side.
A shadow appeared at the door, silhouetted by the sinking sun.
#figure(image("006_Who Tells the Stories/02.jpg", width: 100%), caption: [Elenda, the Dusk Rose | Art by <NAME>], supplement: none, numbering: none)
"Is it gone, children of night?" said the shadow.
Huatli knew immediately who it was, and sensed the others did as well, for Tishana tightened her fists at the same time that Vona and <NAME> fell to their knees.
Saint Elenda approached silently. Her golden eyes were forlorn, staring at the hole in the ceiling where the Immortal Sun once stood. She looked down at Vona, who was trembling with an emotion Huatli couldn't quite read. Awe? Guilt? Or some amalgam of the two?
"Did the beast take it again?" Elenda asked.
Vona looked up, her expression that of a confused child. "Saint Elenda, I don't know what you are talking about," she sputtered.
"The azure beast," Elenda clipped. "Did he take the Immortal Sun?"
"It vanished from underneath us," Huatli said aloud, suddenly aware of the gaze of all four of the others. "But I saw something large fly away not long ago."
Saint Elenda stood in quiet contemplation for a moment. "So, it is gone for good." She looked up, and nodded. "I understand."
She turned and began walking back toward the door. <NAME> scrambled to his feet. "Saint Elenda, wait! You must go after it! We have to retrieve the Immortal Sun!"
Elenda smiled gently and shook her head. "No, my child. We are free. It is gone forever. Do you not feel the change in the city?"
"The power that was bound here is free," Tishana said. "Orazca's magic was subsumed so long as the Immortal Sun was here. Now it flows as freely as my namesake."
Vona rose from her kneeling position as though the floor had suddenly caught fire. In the blink of an eye, she closed the distance between herself and Elenda and began to shriek. "How long? How long have you been here? How long? HOW LONG?"
Elenda did not so much as blink. "My journey ended centuries ago, when I found this place."
Shaking with rage, Vona gathered herself before asking, "Why? Why have you betrayed our people? Why have you denied us the true immortality?"
"Finding true immortality was never our purpose, my child. You have forgotten what we were. What we are. Why I returned to Torrezon to give the gift so long ago. Our order was meant to #emph[guard] the Immortal Sun, not to use it. This dark power that we took into ourselves, the horrors that we wrought—all of it was meant to give us the strength to find the Immortal Sun and #emph[protect] it from the likes of Pedron the Wicked and those who would use its power for their own selfish ends. Our humility and deference to forces greater than ourselves light the path of our salvation, not the Immortal Sun. When I finally found this place, I knew beyond doubt that I should not disturb it. The Immortal Sun was far safer here than it had ever been in Torrezon. I finally knew the purpose of my sacrifice: to use my power to stand sentinel here. And so I sealed myself away, waiting for others of our order to find this place so that I might show them the way . . . so that I might finally be free."
#figure(image("006_Who Tells the Stories/03.jpg", width: 100%), caption: [Temple of Aclazotz | Art by Daarken], supplement: none, numbering: none)
"That's not true," Vona said. "It can't be true."
<NAME> hung his head in shame and confusion.
Elenda spoke again. "I searched the depths of my devotion and found enlightenment in my sacrifice. What have you found? What has become of my people?"
"We conquered Torrezon," Vona spat. "We created an empire in your honor!"
"Empires are temporary. As an immortal, you should know that, child," Elenda said, staring down her nose at Vona.
"Saint Elenda," Huatli said. "Please, return to Torrezon and leave Ixalan in peace. Your people did not understand what you meant for them to learn, and they mutilated your memory in your absence. #emph[You ] must be the one to tell your story. Not them."
Elenda approached Huatli. Huatli couldn't help but feel small in this ancient one's presence. "You are wise, Huatli, Warrior-Poet, and your future will be one of service to worlds far beyond our own. Blessed is your path."
<NAME> was openly weeping as he finally rose to his feet. "Take me to Queen Miralda," Elenda said tersely.
"Take yourself!" Vona hissed. "You are no saint—"
Vona's objection was interrupted by a quick slice of her cheek from <NAME>. She hissed in pain and glared at him. Mavren readied his weapon. "Do not speak ill of a living saint!" he warned.
Vona rounded on him. "I'll speak ill of whoever I please!"
She glared back at Elenda, who seemed to have finally lost her patience. Elenda snapped her fingers angrily and Vona's knees buckled, her face hitting the ground seemingly of its own volition. She growled as her face was pushed hard against the gold tile of the floor.
"You will take me to Queen Miralda," Saint Elenda commanded in a frightening tone.
Vona slowly got to her feet, her body her own once more, and she wiped at the wound on her cheek. She and <NAME> stood and walked toward the door, dumb with embarrassment, and the three vampires exited into the night.
Huatli let out a long, shaking breath.
The chamber was still, and Tishana's eyes were closed. The merfolk opened them, a smile manifesting on her lips.
"Orazca is found," she said, "and Ixalan is at peace."
Huatli looked up at the ceiling. "What does that mean now that the Immortal Sun is gone?"
"It means the city is unbound. There is old magic in its walls, magic that the Sun Empire built into every stone and tile. It is still a place of power."
Huatli nodded, mind racing. She remembered the stories of the old emperors, of conquest and battle, of how cruel the River Heralds had always been made out to be. She knew Tishana now. She knew, had they been the ones to tell their story, they would not be remembered in such a way.
"Orazca belongs to no one," Huatli said. "The Sun Empire's claim is old, but does not reflect the realities of ownership. It should be shared."
Tishana was looking intently at Huatli. "Do you truly think so?"
". . . Yes. I will return to Pachatupa and advise the emperor. He'll listen if I tell him the River Heralds are open to negotiation." Huatli looked at Tishana knowingly. "Are you?"
Tishana's face was unreadable. After a long breath, she nodded. "Yes. The River Heralds are."
Huatli bowed her head. "Thank you, <NAME>. I know we'll see each other again."
"We will, Warrior-Poet. Help others tell their stories."
"I will. Goodbye, friend."
They touched hands as a farewell, and Huatli turned to leave the tower. As she walked, a thought came to her mind. Huatli walked to one of the walls and placed her hand on its surface, curious, uncertain, #emph[will this work?]
She reached through the lines of power in the city and called out.
The threefold roar of an elder dinosaur filled her ears, and Huatli smiled.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Pachatupa looked incredibly small from Huatli's vantage point.
The journey home had taken a delightfully short time thanks to the length of her new mount's stride, and though she was worried about dismounting from such a great height, Huatli was happy to arrive with proof of Orazca's awakening in the form of the elder dinosaur.
#figure(image("006_Who Tells the Stories/04.jpg", width: 100%), caption: [Zacama, Primal Calamity | Art by Jaime Jones], supplement: none, numbering: none)
Huatli slowed Zacama to a halt, and politely asked the dinosaur to lower her to the ground. Zacama was not intelligent per se, but she was somehow aware that she had a name, and was able to inform Huatli of what it was through their magical connection. Commanding Zacama was different than any mount Huatli had ever directed before. It was more like guiding an entire river than steering a boat, but Huatli got the hang of it after some trial and error.
She was now looking down on her home city, charmed by its relative scale. The entire city looked like a child's toy village rather than the metropolis it was. A crowd had started to gather in the plaza in front of the Temple of the Burning Sun, all staring up in astonishment at the sight of Huatli being lowered to the ground by Zacama's rightmost head.
Huatli's descent was less than graceful, but by the time she got down, Emperor Apatzec was waiting.
He bristled as Huatli allowed Zacama to depart, and the earth shook with every step the elder dinosaur took.
"I take it you found Orazca?" he asked tentatively.
Huatli smiled. "I did. I'll meet you in the temple in one moment, Emperor," she said, finding Inti's face in the crowd.
Emperor Apatzec nodded and began walking back up the stairs of the temple, his nervous eyes still watching Zacama's departure over the tops of the trees in the distance.
Inti was standing with his mother and father, and all of them were looking at Huatli with more elation than she had ever seen on a person's face.
#figure(image("006_Who Tells the Stories/05.jpg", width: 100%), caption: [Forerunner of the Empire | Art by <NAME>], supplement: none, numbering: none)
They all tackled Huatli in an embrace, and Huatli laughed as more and more cousins jostled their way through the crowd to pepper her with congratulatory slaps on the back and earnest hugs.
They were bombarding her with questions and excited compliments, and Huatli couldn't help but blush at the attention. Despite a lifetime of preparing for dealing with the public, her homecoming was still overwhelming. Eventually she found Inti again.
"I need to speak with the emperor," she said.
Her cousin gave her a deadly serious look. "You came back on a three-headed elder dinosaur. He #emph[better ] give you that title! Don't leave until that helm is on your head, Warrior-Poet!"
Huatli's gut dropped. She had forgotten about her title.
Inti turned her shoulders around and pushed her up the steps, fist pumping in the air. "You've got this, cousin! Go tell that emperor what a hero you are!"
Huatli smiled and began to make her way up the Temple of the Burning Sun.
When she reached the top of the steps, a small group of guards was waiting to escort her to the emperor's residence. The formality was unnerving, and Huatli followed closely. She was suddenly uncertain how the emperor would react. What if he did not like what she had to say? Huatli stamped the feeling out. Whether he liked it or not was unimportant. He needed to know the #emph[truth] .
The guards parted on either side of her, and Huatli walked forward into the emperor's meeting hall. The walls were lined with carvings of all the Sun Empire's heroes. Great men and women, warriors and shamans and warrior-poets all, each of them illustrious champions whose stories Huatli knew by heart.
#emph[Truth is decided by who tells the stories] , Huatli thought to herself with a chill.
Emperor Apatzec was standing on the far side of the room. Huatli walked toward him and kneeled in greeting. He motioned for her to rise and sit. Huatli realized the helm of the warrior-poet was resting on a table in front of her.
"You accomplished what I asked," Apatzec said with more than a little pride in his voice. "There will be a ceremony tomorrow to give it to you officially."
Huatli stared at the helm, and an odd sensation crept over her.
The helm was silvery steel and warm golden amber. It was beautiful. And it was hers, at last. All those years of study, all those hoops jumped through, all that pomp and circumstance and preparation. But Huatli had known all the stories when she was a teenager, had defeated dozens of foes by the time she was eighteen. And now, Huatli could walk to another world if she wanted to. What more did she really gain when she earned something as small as a #emph[title] ?
Apatzec sat across from her and placed a cup of xocolātl on the table before her. He gently sipped his own. "Warrior-Poet," he said, "tell me how you discovered Orazca."
Huatli took a deep breath, and began.
She did not try to tell him what he would want to hear. She told him what was #emph[true] .
Huatli told him of Tishana's courage and wisdom, of how they had ventured into the jungle and tracked the vampire for days. She emphasized that the River Heralds did not desire to reclaim their old territory, but instead were seeking to eliminate the outside forces that were infringing on both their lands and those of the Sun Empire. She told Apatzec about Angrath, and the existence of other worlds, and even told him about Saint Elenda and how she found peace through service and sacrifice. She told him that the Immortal Sun was gone, but the power of the city remained. Most of all, she told the emperor that Orazca was not #emph[theirs ] any longer.
"I urge you to make an accord with the River Heralds," Huatli implored. "Let us work together to find a way to make peace."
Emperor Apatzec sat in silence. He was staring at his empty cup, mahogany eyes quickly scanning back and forth as he thought through his answer.
Eventually, he spoke. Slowly. Deliberately. "That is not the story I want you to tell tomorrow."
Huatli swallowed. Nodded. She'd had a feeling that would be his response.
The emperor was shaking his head. "We are weeks away from invading Fort Adanto in the south. I need the message of tomorrow to be one of inspiration and #emph[conquest] . Orazca is #emph[ours] , and if our people see the dinosaur you arrived on and hear a story about working #emph[alongside ] the River Heralds, I won't have the support I need for our military campaign."
#figure(image("006_Who Tells the Stories/06.jpg", width: 100%), caption: [Ashes of the Abhorrent | Art by Daarken], supplement: none, numbering: none)
A little fire of fury lit in Huatli's heart.
"After what I just told you, you #emph[still ] think that is the most important thing?"
"You said yourself that <NAME> and the Butcher of Magan were monsters."
"Monsters who were severely reprimanded by #emph[their own deity] . Fort Adanto will be empty when we arrive. The Church will want Elenda returned immediately!" Huatli gestured broadly.
Apatzec remained steadfast. "Then it will be easier for us to reclaim."
"Even though that land was controlled by the River Heralds before the Legion of Dusk arrived?"
"Yes," asserted the emperor. "Our empire cannot grow if we do not expand."
"Our empire has the opportunity to live in peace!"
Huatli realized her hand was on the helm of the warrior-poet. She looked down in surprise and caught the glare of Apatzec. He stood, and looked down at her impatiently.
"The ceremony will happen as planned, but there will be no oration alongside it. I will relay to the people what happened at Orazca," he said.
Huatli was furious. She did not bother to hide the disgust on her face. "It is the right of the warrior-poet to address the public. I will not be silenced for the sake of your agenda."
"It is for the sake of the Sun Empire's agenda, Huatli." Apatzec turned and made his way toward his personal chambers. "The ceremony will take place at noon tomorrow. Go tell your family the good news." He walked away without another word.
Huatli looked at the helm of the warrior-poet and fumed. She turned and exited down the stairs.
#figure(image("006_Who Tells the Stories/07.jpg", width: 100%), caption: [Ixalli's Diviner | Art by Lucas Graciano], supplement: none, numbering: none)
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Huatli went to her aunt and uncle's house before returning to the barracks.
Her family offered praise, congratulations, and a table piled high with rabbit and frillhorn tamales and four kinds of sauces. They feasted and asked her ten thousand questions, which Huatli answered with gusto. Her aunt, uncle, and dozens of cousins gathered around to listen to her story. They gasped and cheered and occasionally helped the younger cousins to ask a question if they had one, but most of all, they happily listened. Huatli was expecting most of their questions to be about Orazca, but it was the nature of planeswalking that captivated them the most.
At first, they did not believe her, but when she demonstrated by vanishing and reappearing a moment later with a rock from another world in her hand, they were ecstatic.
Huatli explained what she had seen on the other side (a rugged stream in brambled woods) and was answered by her uncle cheering. "You can't just #emph[stay here] and be the emperor's pet! You have to #emph[go] there, Huatli!"
The rest of the family yelled their approval, and her uncle mussed her hair affectionately. The youngest cousin laughed and cooed at all the excitement. Huatli's smile fell.
"But I'm the warrior-poet. I'm meant to stay here."
"You're meant to collect stories and histories!" Inti said, his mouth full of squash. "Why would you want to only tell stories from #emph[here ] when you can go someplace else?"
The family erupted in agreement. Huatli smiled, feeling bashful and a little nervous.
Inti continued, "And if what the emperor says is true, then there is nothing you can do. Your destiny does not lie here."
Huatli trusted her cousin more than anyone. His judgment was sound. She took a deep breath and nodded. "I'll go for a week."
Her aunt leapt to her feet. "I'll pack for you!"
Inti started stuffing tamales into a bag. "You'll need rations!"#sub[-]
Her uncle and a particularly bold cousin clenched their fists in determination. "You're not leaving until we get you the helm of the warrior-poet!"
Huatli sputtered, "But I'm coming right back!" but her addendum was lost in the excited frenzy of her family.
The next few hours were a blur.
Huatli kissed and hugged and was told to stay put while her family snuck into the Temple of the Burning Sun to retrieve the helm of the warrior-poet. They arrived back safe and sound after a tense several hours, with Inti wearing the helm on his head and a foolhardy smile on his face.
At dawn the next morning, Huatli said her farewells. She promised she would only be gone a week, and swore she would deal with the emperor when she returned. Her aunt did not cry, but her uncle did, and she told each of her cousins a different farewell with the same tight hug.
The last to say goodbye was Inti. He adjusted the helm on Huatli's head and smiled. "You are the warrior-poet. It is your duty to gather stories. No one ever said they had to be only ours." Inti stepped back with a smile on his face.
Huatli squeezed the straps of her travelling pack and smiled. "Goodbye, everyone! I'll be back soon!"
Her family waved, and Huatli reached for the spark inside her.
Her vision brightened with the light of the midday sun, and Huatli stepped forward into another world.
|
|
https://github.com/jamesrswift/ionio-illustrate | https://raw.githubusercontent.com/jamesrswift/ionio-illustrate/main/gallery/display-structure.typ | typst | MIT License | #set par(justify: true)
#set page(width: auto, height: auto, margin:1em)
#set text(size: 7pt)
#import "../src/lib.typ": *
#let data = csv("../assets/linalool.csv")
#let massspec = data.slice(1)
#let ms = mass-spectrum(massspec, args: (
range: (0,150),
plot-extras: (this) => {
(this.callout-above)(121)
(this.title)([Linalool, +70eV])
(this.content)(
box(
image("../assets/Linalool_skeletal.svg", height: 3.5em),
inset: 0.5em
),
(2,100),
anchor: "top-left"
)
},
linestyle: (this, mz)=>{
if mz in (93,) { return (stroke: red) }
if mz in (71,) { return (stroke: blue) }
},
))
#(ms.display)() |
https://github.com/zenor0/FZU-report-typst-template | https://raw.githubusercontent.com/zenor0/FZU-report-typst-template/main/fzu-report/parts/outline-report-fn.typ | typst | MIT License | #import "../utils/outline-tools.typ": cn-outline
#let outline-conf(outline-depth: 3, show-self-in-outline: false) = {
set page(
numbering: "I",
number-align: center
)
align(center, box(
heading(
numbering: none,
outlined: show-self-in-outline,
bookmarked: true
)[目录]
))
cn-outline(
outline-depth: outline-depth,
use-raw-heading: false,
)
}
|
https://github.com/Isaac-Fate/booxtyp | https://raw.githubusercontent.com/Isaac-Fate/booxtyp/master/src/equation.typ | typst | Apache License 2.0 | #import "counters.typ": equation-counter
#let equation-rules(body) = {
set math.equation(numbering: "(1.1)")
show math.equation.where(block: true): it => {
locate(loc => {
// Get heading numbers at current location
let heading-numbers = counter(heading).at(loc)
// Increment equation number
equation-counter.step(level: 3)
counter(math.equation).update(equation-counter.at(loc))
})
// Equation content
it
}
// The rest of the document
body
}
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/cetz/0.0.1/collisions.typ | typst | Apache License 2.0 | // NOTE: this file is to be used for finding intersections of paths. It is currently not in use but could be fully implemented at a later date.
#import "vector.typ"
// http://paulbourke.net/geometry/pointlineplane/ Intersection point of two line segments in 2 dimensions
// http://jeffreythompson.org/collision-detection/poly-poly.php
// Returns the (x,y) coordinates of the intersection or none if the lines do not collide
#let line-line(x1, y1, x2, y2, x3, y3, x4, y4) = {
let denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1)
if denominator == 0 {
// lines are parallel or coincident
return none
}
let uA = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator
let uB = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator
return if (uA >= 0 and uA <= 1 and uB >= 0 and uB <= 1) {
(
x1 + uA * (x2 - x1),
y1 + uA * (y2 - y1)
)
}
}
// Returns the (x,y) coordinates of the intersections or none if the polygon and line do not collide
// Assumes the polygon is not closed. If the polygon is closed add the first vertex to the end of the vertex list
#let poly-line(vertices, x1, y1, x2, y2) = {
for current in range(vertices.len() - 1) {
let next = current + 1
let (x3, y3, x4, y4) = (
vertices.at(current).at(0),
vertices.at(current).at(1),
vertices.at(next).at(0),
vertices.at(next).at(1),
)
let collision = line-line(x1, y1, x2, y2, x3, y3, x4, y4)
if collision != none {
collision
}
}
}
#let poly-poly(p1, p2) = {
let intersections = ()
for current in range(p1.len() - 1) {
let next = current + 1
let (x1, y1, x2, y2) = (
p1.at(current).at(0),
p1.at(current).at(1),
p1.at(next).at(0),
p1.at(next).at(1)
)
let collision = poly-line(p2, x1, y1, x2, y2)
if collision != none and not collision in intersections {
intersections.push(collision)
}
}
return intersections
} |
https://github.com/alimitedgroup/alimitedgroup.github.io | https://raw.githubusercontent.com/alimitedgroup/alimitedgroup.github.io/main/verbali/interni/2024-10-23.typ | typst | // VI 23-10-2024
#import "../../lib.typ": *
#set text(lang: "it")
#show: doc => verbale(
regmodifiche: (
("0.0.2", "23-10", "<NAME>", "-", "Redazione documento"),
("0.0.1", "23-10", "<NAME>", "-", "Creazione struttura e template documento"),
),
data: [23-10-2024],
versione: [0.0.2],
stato: [Redatto],
presenze: (
"<NAME>",
"<NAME>",
"<NAME>",
"<NAME>",
"<NAME>",
"<NAME>",
),
odg: [Terza riunione di _ALimitedGroup_: vengono definite alcune istruzioni per realizzare le presentazioni degi eventi denominati _Diario di Bordo_. Si inizia a discutere di sistemi di ticketing e gestione dei compiti. Alcune modifiche al codice typst dei verbali.],
doc,
)
= Informazioni generali
#inizio-verbale-interno([*virtuale*], [*23 Ottobre 2024*], [*17.00*], [*18.15*])
+ Decisioni in merito alle presentazioni _Diario di Bordo_
+ Prime analisi sui sistemi di ticketing e di gestione compiti
+ Utilizzo di Google Calendar per la gestione degli eventi
+ Modifiche minori al codice typst dei verbali
Data l'assenza di un componente eventuali correzioni alle decisioni riportate in questo documento saranno debitamente verbalizzate a seguito di
nuova riunione.
#pagebreak()
= Dettaglio riunione
== Decisioni in merito alle presentazioni _Diario di Bordo_
I componenti del gruppo hanno proposto che la realizzazione delle presentazioni per l'evento _Diario di Bordo_ definite nel calendario di Ingegneria del Software dovranno essere realizzate in typst come la restante parte dei documenti.
Viene definito inoltre che, come richiesto dalle indicazioni fornite, tale presentazione non supererà le *tre* diapositive di contenuto (ivi esclusa l'eventuale pagina iniziale riportante nome e logo del gruppo, non considerata di contenuto ma di presentazione) e dovrà contenere le seguenti informazioni:
- quanto realizzato dal giorno di formazione dei gruppi (in seguito, dall'ultimo _Diario di Bordo_);
- quanto fare nel prossimo periodo;
- difficoltà incontrate dal giorno di formazione dei gruppi (in seguito, dall'ultimo _Diario di Bordo_);
- dubbi su come procedere;
così come stabilito sempre dalle indicazioni fornite.
== Prime analisi sui sistemi di ticketing e di gestione compiti
Durante la riunione è stato proposto di provare ad utilizzare le _issue_ di GitHub come piattaforma di ticketing e di utilizzare le _board_ dello stesso servizio per avere rappresentazione visiva dei compiti da fare e permettere l'auto-assegnazione e l'assegnazione degli stessi.
Seguiranno nei giorni seguenti la modifica del Repository GitHub che ospita la documentazione per la realizzazione delle prime prove (che includeranno, al momento in via provvisoria, anche la realizzazione di alcune label personalizzate e comunque di quanto necessario allo svolgimento delle prove).
== Utilizzo di Google Calendar per la gestione degli eventi
In seguito ad alcune prove di utilizzo, il gruppo propone di utilizzare in pianta stabile l'applicativo Google Calendar per la gestione degli appuntamenti e riunioni.
L'account utilizzato a tale scopo sarà l'account Google utilizzato per le comunicazioni esterne del gruppo.
== Modifiche minori al codice typst dei verbali
Il gruppo propone, con l'ottica di migliorare la gestione di documenti e in particolar modo dei verbali, l'utilizzo della seguente nomenclatura per indicare la tipologia di verbale:
- *VI* per indicare un *Verbale Interno*;
- *VE* per indicare un *Verbale Esterno*;
Dato che l'aggiornamento del sito web avviene automaticamente al caricamento di un nuovo file, per facilitare la denominazione degli stessi verrà apposto, alla riga 1 del file sorgente (.typ) di ogni verbale, la dicitura:
#align(center)[*```//[Tipo Verbale] GG-MM-AAAA_#```*]
Dove per *```[Tipo Verbale]```* si intende la dicitura *VI* o *VE*, per *``` GG-MM-AAAA```*, si intende il giorno in cui l'evento descritto ha avuto luogo in formato *GG-MM-AAAA* e infine per *```#```* si intende l'eventuale numero di riunione, presente solo se nello stesso giorno sono state condotte più riunioni dello stesso tipo e comunque tenendo in considerazione che tale numero (con annesso il carattere _Underscore_) *non* va specificato per la prima riunione cronologicamente avvenuta.
= Esiti della riunione
Il gruppo conclude la riunione con l'obbiettivo di realizzare le prime prove con GitHub Action. Si è inoltre deciso di concordare chi avrà il compito di presentare il primo _Diario di Bordo_ che si terrà il giorno 28 Ottobre 2024. |
|
https://github.com/ngyngcphu/tick3d-docs | https://raw.githubusercontent.com/ngyngcphu/tick3d-docs/main/contents/01_mo_dau/index.typ | typst | Apache License 2.0 | #show raw.where(block: false): box.with(
fill: luma(240),
inset: (x: 3pt, y: 0pt),
outset: (y: 3pt),
radius: 2pt,
)
#show raw.where(block: true): block.with(
fill: luma(240),
inset: 10pt,
radius: 4pt,
)
= Tổng quan dự án
== Bối cảnh dự án
Hệ thống in ấn 3D được sử dụng để đáp ứng nhu cầu cho những ai muốn sở hữu mô hình 3D tùy
theo mục đích. Để làm được điều đó, chúng tôi sử dụng máy in ấn 3D có tên gọi là *FLSUN-V400*.
Vì giới hạn về tài nguyên phần cứng, hệ thống chỉ bao gồm một máy in 3D đặt ở vị trí cố định.
Máy in có những thông số như sau: tên thương hiệu/nhà sản xuất, kiểu máy in, mô tả máy in, firmware, một địa chỉ IP cục bộ trong mạng LAN, dashboard web mặc định của máy in.
Để kích hoạt máy in hoạt động, bạn cần phải truy cập vào địa chỉ IP cục bộ của máy in và tải file định dạng `.gcode` tới dashboard web của máy in. Tuy nhiên, phương pháp này chỉ người quản lý máy in mới có thể làm được bởi vì những lí do sau:
#block(inset: (left: 1cm))[
- Máy in chỉ có thể được sử dụng trong mạng cục bộ (LAN network).
- Dashboard web của máy in tương đối phức tạp và không có sự phân quyền người dùng.
- Chưa có cơ chế ngăn chặn những hành động vô ý của người dùng ảnh hưởng đến máy in như: tải lên định dạng file không đúng, tải lên file `.gcode` không phù hợp với loại máy in,...
]
Vì thế, giải pháp phần mềm chúng tôi đưa ra là xây dựng một dịch vụ in 3D trực tuyến cho nhiều người sử dụng với các tính năng hỗ trợ như sau:
#block(inset: (left:1cm))[
- *Nền tảng bán hàng trên web*: được truy cập thông qua Internet - nơi người dùng có thể đặt mua mô hình 3D theo một trong hai cách sau:
#block(inset: (left:1.2cm))[
\u{2218} Tải lên file `.gcode` phù hợp với loại máy in (FLSUN-V400). Phần mềm không hỗ trợ việc tạo file `.gcode`, vì vậy người dùng phải chuẩn bị trước. Người dùng có thể cài đặt phần mềm #link("https://ultimaker.com/software/ultimaker-cura/")[Ulitimaker Cura] để cắt file `.stl` thành file `.gcode` và tải lên hệ thống.
#linebreak()
\u{2218} Phần mềm sẽ đề xuất các mẫu mô hình 3D đã có sẵn các file `.gcode` cho người dùng lựa chọn.
]
- *Màn hình hiển thị sản phẩm phía người dùng*: bao gồm các thông tin sau: tiến độ in ấn, thời gian hoàn thành in ấn, giá cả,...
- *Màn hình hiển thị điều khiển phía người quản lý*: tương đối giống với dashboard web của máy in và có thêm một số tính năng như: xem được số lượng đơn đặt hàng và tình trạng mỗi đơn hàng, kích hoạt/bất hoạt máy in,...
]
Bởi vì hệ thống chỉ có một máy in, nếu có quá nhiều đơn đặt hàng cùng một thời điểm, chúng sẽ được xếp vào một hàng đợi. Người quản lý sẽ lấy sản phẩm ra khỏi máy in sau khi in xong, nhấn nút `Continue printing` trên hệ thống để đưa sản phẩm đầu tiên trong hàng đợi vào để tiếp tục việc in ấn.
Hệ thống chỉ chấp nhận file với định dạng `.gcode` và phù hợp với máy in *FLSUN-V400*, nếu không hệ thống sẽ tự động hủy quá trình tải file lên của khách hàng.
Hệ thống phải ghi lại lịch sử của mỗi đơn hàng, bao gồm: thời gian đặt hàng, thời gian vận chuyển, thông tin người dùng đặt hàng, chi phí,...
Hệ thống được cung cấp thông qua ứng dụng web-based app, *không hỗ trợ mobile app*.
== Stakeholders của dự án
Dự án này bao gồm 2 stakeholders:
#block(inset: (left: 1cm))[
1. Người quản lý: Là người trực tiếp quản lý máy in, kiểm tra và cập nhật các đơn hàng sang các trạng thái.
2. Khách hàng: Là người đặt các mô hình 3D.
]
== Phạm vi của dự án
Dự án được chia thành 2 mức thực hiện: *Thủ công* và *Tự động*. Nhóm sẽ ưu tiên hiện thực hệ thống ở mức thủ công.
=== Thủ công
Tất cả đơn hàng được gửi tới người quản lý qua hệ thống. Người quản lý sẽ tự mình upload các file `.gcode` trong các đơn đặt hàng lên dashboard web của máy in. Quy trình này yêu cầu hệ thống có các tính năng chính sau:
#block(inset: (left: 1cm))[
1. *Lựa chọn mô hình 3D*: cho phép khách hàng tải lên file `.gcode` phù hợp với loại máy in FLSUN-V400 hoặc bao gồm danh sách các mô hình 3D có sẵn đã tích hợp file `.gcode` (>= 100 mô hình) cho khách hàng lựa chọn. Ngoài ra, hệ thống còn hỗ trợ phân loại mô hình theo danh mục, tìm kiếm theo tên và lọc theo giá tiền.
2. *Quản lý mô hình 3D*: Cho phép người quản lý thao tác với các mô hình 3D mà hệ thống đề xuất cho khách hàng, gồm thêm/xóa/sửa. Yêu cầu này đòi hỏi hệ thống phải phân quyền người dùng, bao gồm 2 vai trò: người quản lý và khách hàng.
3. *Đặt mô hình 3D*: Khách hàng cần phải đăng kí một tài khoản để có thể đặt được mô hình 3D sau khi upload file hoặc lựa chọn sản phẩm mẫu.
4. *Xác nhận và gửi đơn hàng*: Khách hàng sau khi đặt mô hình và xác nhận xong thì có thể gửi đơn hàng đi để được xử lý.
5. *Xử lý đơn hàng*: Người quản lý có thể xem thông tin đơn hàng và chuyển đơn hàng sang các trạng thái tiếp theo như: đã đặt, đang giao, đã giao, đã thanh toán,...
6. *Thanh toán online*: Thực hiện thanh toán qua Momo.
]
=== Tự động
Tất cả đơn hàng được lưu trên hệ thống. Người quản lý chỉ cần nhấn nút `Start printing` thì file `.gcode` tự động được gửi tới máy in mà không cần thông qua dashboard web của máy in. Tuy nhiên, cần có một người trực tại máy in để gỡ sản phẩm ra khỏi bàn in sau khi in xong và nhấn nút `Continue printing` để tiếp tục in sản phẩm tiếp theo trong hàng đợi của hệ thống.
Mức hiện thực này bao gồm tất cả các tính năng của mức hiện thực thủ công, giảm thiểu tác vụ cho người quản lý và hỗ trợ thêm một số tính năng cho cả hai đối tượng, bao gồm:
#block(inset: (left: 1cm))[
- *Màn hình điều khiển máy in phía người quản lý*: Người quản lý có thể xem được tiến độ sản phẩm đang được in, nhiệt độ sản phẩm, khối lượng nhựa in cần sử dụng, thời gian in xong. Ngoài ra, có thể thay đổi tốc độ in, tạm dừng in, kích hoạt/bất hoạt máy in.
- *Màn hình hiển thị sản phẩm phía khách hàng*: Khách hàng cũng có thể xem được tiến độ in và thời gian in xong của sản phẩm mà mình đặt mua.
]
#pagebreak() |
https://github.com/TypstApp-team/typst | https://raw.githubusercontent.com/TypstApp-team/typst/master/docs/reference/welcome.md | markdown | Apache License 2.0 | ---
description: |
The Typst reference is a systematic and comprehensive guide to the Typst
typesetting language.
---
# Reference
This reference documentation is a comprehensive guide to all of Typst's
syntax, concepts, types, and functions. If you are completely new to Typst, we
recommend starting with the [tutorial]($tutorial) and then coming back to
the reference to learn more about Typst's features as you need them.
## Language
The reference starts with a language part that gives an overview over
[Typst's syntax]($syntax) and contains information about concepts involved in
[styling documents,]($styling) using
[Typst's scripting capabilities.]($scripting)
## Functions
The second part includes chapters on all functions used to insert, style, transform,
and layout content in Typst documents. Each function is documented with a
description of its purpose, a list of its parameters, and examples of how to use
it.
The final part of the reference explains all functions that are used within
Typst's code mode to manipulate and transform data. Just as in the previous
part, each function is documented with a description of its purpose, a list of
its parameters, and examples of how to use it.
|
https://github.com/didiercrunch/typst-repo | https://raw.githubusercontent.com/didiercrunch/typst-repo/main/test-remote/foo.typ | typst | #import "./bar.typ": first_name
#let last_name = "amyot"
#let name = first_name + " " + last_name
#let type-writer-image = figure(
image("type-writer.jpg", width: 80%),
caption: [An amazing technology],
)
|
|
https://github.com/J3m3/poolc-fp | https://raw.githubusercontent.com/J3m3/poolc-fp/main/HFPDWE-01.typ | typst | MIT License | #import "@preview/fletcher:0.3.0" as fletcher: node, edge
#import "@preview/pinit:0.1.3": *
#import "@preview/sourcerer:0.2.1": code
#import "@preview/xarrow:0.3.0": xarrow
#import "lib/index.typ": *
#show: conf
// 1
#title-slide(title: "How FP Deals With Effects")[
#line(length: 65%, stroke: 2pt + color_medium)
#poolc_badge #h(.3em) 양제성
#v(.5em)
#set text(size: fontsize_small)
#let date = date.display(
"[year]/[month]/[day] ([weekday repr:short])"
)
Source: #github_hypericon #h(1em) #date
]
// 2
#slide(title: "목차")[
#set enum(number-align: start)
#let left = tbc(title: "1st Session", (
(
"함수형 프로그래밍 Intro",
"Overall Structure", "Historical Review (CS + Math)"
),
(
"함수형 패러다임",
"Core of Functional Thinking", "FP Fact-Checking"
),
(
"FP는 정말 순수한가?",
"Optimizing with Purity", "Effect Handling Basics"
)
))
#let right = {
set text(fill: rgb(0, 0, 0, 50%))
tbc(title: "2nd Session", (
(
"함수 합성을 위한 도구들",
"Partial Application", "Kleisli Composition"
),
(
"...중 하나인 모나드",
"Functor to Monad", "IO Monad"
),
(
"부수 효과의 관리",
"Action / Calculation / Data", "Preventing Action Propagation"
)
))
}
#let centre = [
#set align(horizon)
#set text(
size: fontsize_extrasmall,
weight: "semibold",
font: "MesloLGS NF",
style: "oblique",
fill: haskell_color
)
#vtext("Basic Haskell Knowledge")
]
#v(.6em)
#align(center)[#grid(
columns: (1fr, 1em, 1fr),
left,
centre,
right
)]
]
// 3 ~ 4
#absolute-center-slide(title: "Overall Structure", header: "함수형 프로그래밍 Intro")[
FP is all about _composing pure functions_.#pin(1)
#let fp = ```
f(g(h(..)))
```
#let pp = ```c
int main(void) {
f(); g(); h(); ..
}
```
#v(.5em)
#table(
columns: (1fr, auto, 1fr),
align: center + horizon,
row-gutter: 1em,
stroke: none,
pp, [VS], fp,
text(size: fontsize_small)[\[Procedural Promramming\]],
[],
text(size: fontsize_small)[\[Functional Programming\]]
)
#only(2)[#pinit-point-to(
pin-dx: 0pt,
pin-dy: -25pt,
body-dx: 10pt,
body-dy: -10pt,
offset-dx: 45pt,
offset-dy: -55pt,
1,
thickness: 2pt
)[How?]]
]
// 5
#absolute-center-slide(title: "Overall Structure", header: "함수형 프로그래밍 Intro")[
_Sum all._ [`stdin <- "5\n1 2 3 4 5"`]
#set text(size: fontsize_small)
#let haskell = code(lang: "Haskell (declarative)", ```hs
main =
interact
(show . sum .
map read . drop 1 . words)
```)
#let python = code(lang: "Python3 (declarative)", ```py
from sys import stdin
print(sum(map(
int, stdin.read().split()[1:]
)))
```)
#let fp = table(stroke: none, haskell, python)
#let cpp = code(lang: "C++ (imperative)", ```cpp
int main() {
int n, result;
std::cin >> n;
for (size_t i = 0; i < n; ++i) {
int a;
std::cin >> a;
result += a;
}
std::cout << result << '\n';
return 0;
}
```)
#table(
columns: (1fr, 1fr),
align: center + horizon,
column-gutter: 1em,
row-gutter: 1em,
stroke: none,
cpp, fp,
text(size: fontsize_small)[\[Procedural Promramming\]],
text(size: fontsize_small)[\[Functional Programming\]]
)
]
// 6 ~ 7
#absolute-center-slide(title: "Overall Structure", header: "함수형 프로그래밍 Intro")[
#set enum(number-align: start + top)
#let contents = (
("Purity",
"Side Effect", "Referential Transparency", "Significance of ..."),
("Immutability",
"Recursion (feat. Tail Call Optimization)", "C vs Haskell in File IO"),
("First Class Function",
"Currying", "Linked List"),
)
#grid(
columns: (1fr, 1fr),
tbc(contents),
only(2)[#text(font: "MesloLGS NF", size: 55pt)[_\<Let's\ code!\>_]]
)
]
// 8
#top-left-slide(title: "Historical Review (CS + Math)", header: "함수형 프로그래밍 Intro")[
#set enum(number-align: top + start, indent: 1em)
== Lambda Calculus
+ Very Basics
+ Boolean in Action
== Category Theory
+ Very Basics
+ Functor in Action
]
// 9 ~ 17
#relative-top-center-slide(title: "Lambda Calculus", header: "함수형 프로그래밍 Intro")[
#set enum(number-align: top + start)
#let _left = block(fill: color_light, outset: .5em, radius: .5em)[
#align(center)[*Function Encoding*]
+ Variables (Immutable)
+ Functions (Curried)
+ Application
]
#let _right = text(font: "MesloLGS NF")[Turing Machine]
#only(("1-7", "9"))[#block(width: 750pt)[
#table(
columns: (1fr, 0em, 1fr),
stroke: none,
align(left)[#_left], align(horizon)[<=>], align(horizon)[#_right]
)
]]
#v(.5em)
#let lambda_ex_length = 6
#only((beginning: 2, until: lambda_ex_length))[
#set text(size: 60pt)
$ #pin(1)lambda#pin(2)#pin(3)x#pin(4)". "#pin(5)f x#pin(6) $
]
#only((beginning: 3, until: lambda_ex_length))[
#pinit-line(
stroke: 2pt,
start-dx: -5pt,
end-dx: 5pt,
start-dy: 25pt,
end-dy: 25pt,
1, 6
)
#pinit-place(dx: -7.2em, dy: 1.5em, 1)[
#align(center)[Lambda Abstraction \
#v(-.5em)
#set box(radius: .1em, outset: .1em)
`Py ver. `#alternatives-match((
"3": box[`lambda`],
"4-": box(fill: rgb(255, 0, 0, 50))[`lambda`]
))
#alternatives-match((
"3-4": box[`x`],
"5-": box(fill: rgb(0, 255, 0, 50))[`x`]
))`:`
#alternatives-match((
"3-5": box[`f(x)`],
"6-": box(fill: rgb(0, 0, 255, 50))[`f(x)`]
))
` | `
`JS ver. (`#alternatives-match((
"3-4": box[`x`],
"5-": box(fill: rgb(0, 255, 0, 50))[`x`]
))`)`
#alternatives-match((
"3": box[`=>`],
"4-": box(fill: rgb(255, 0, 0, 50))[`=>`]
))
#alternatives-match((
"3-5": box[`f(x)`],
"6-": box(fill: rgb(0, 0, 255, 50))[`f(x)`]
))]
]
]
#only((beginning: 4, until: lambda_ex_length))[
#pinit-highlight(extended-height: 1.8em, fill: rgb(255, 0, 0, 50), 1, 2)
#pinit-point-to(
pin-dx: -15pt,
offset-dx: -55pt,
body-dx: -205pt,
pin-dy: 0pt,
offset-dy: 0pt,
body-dy: -10pt,
1
)[Function Signifier]
]
#only((beginning: 5, until: lambda_ex_length))[
#pinit-highlight(extended-height: 1.8em, fill: rgb(0, 255, 0, 50), 3, 4)
#pinit-point-to(
pin-dx: -16pt,
offset-dx: -16pt,
body-dx: -96pt,
pin-dy: -30pt,
offset-dy: -60pt,
body-dy: -25pt,
4
)[Parameter Variable]
]
#only((beginning: 6, until: lambda_ex_length))[
#pinit-highlight(extended-height: 1.8em, fill: rgb(0, 0, 255, 50), 5, 6)
#pinit-point-to(
pin-dx: 10pt,
offset-dx: 50pt,
body-dx: 15pt,
pin-dy: 0pt,
offset-dy: 0pt,
body-dy: -10pt,
6
)[Return #underline("Expression")]
]
#only(7)[
#let e = "expression"
#let v = "variable"
$ #e ::&= #v && italic(" identifier") \
&| #e #e && italic(" application") \
&| lambda " " v_1 v_2 dots.h.c " " . #e && italic(" abstraction") \
&| "( " #e" )" && italic(" grouping") $
]
#only(8)[
#set text(size: 35pt)
$beta"-reduction"$
$ &((lambda#pin("1")a#pin("2"). a)#pin(3)lambda b. lambda c. b#pin(4)) (x) lambda e. f \
=& (lambda#pin(5)b#pin(6). lambda c. b) (#pin(7)x#pin(8)) lambda e. f \
=& (lambda#pin(9)c#pin(10). x)#pin(11)lambda e. f#pin(12) \
=& x " "#text(size: fontsize_big)[$(beta"-normal form")$]
$
#pinit-highlight("1", "2", dy: -.6em, extended-height: 1em)
#pinit-highlight(3, 4, dy: -.6em, extended-height: 1em)
#pinit-highlight(5, 6, dy: -.6em, extended-height: 1em, fill: rgb(0, 255, 0, 20))
#pinit-highlight(7, 8, dy: -.6em, extended-height: 1em, fill: rgb(0, 255, 0, 20))
#pinit-highlight(9, 10, dy: -.6em, extended-height: 1em, fill: rgb(0, 0, 255, 20))
#pinit-highlight(11, 12, dy: -.6em, extended-height: 1em, fill: rgb(0, 0, 255, 20))
]
#only(9)[
#set text(size: 35pt, font: "MesloLGS NF")
#v(1.5em)
#text(baseline: -5pt)[ex) Church Encoding: Boolean]
#box(image(width: 1.1em, height: auto, alt: "JS logo", "./assets/js.svg"))
]
]
// 18 ~ 19
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
#uncover(2)[#text(size: fontsize_big)[_Abstraction!_]]
"Mathematics is the art of giving \
the _same name_ to _different things_"
#text(style: "italic", font: "Linux Libertine")[<NAME>]
]
// 20 ~ 21
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
#table(
columns: (1.35fr, 2em, 1fr),
align: center,
gutter: 1.2em,
stroke: none,
uncover(2)[*Abstraction of *_composition_], uncover(2)[->], uncover(2)[*Category Theory*],
[Abstraction of numbers], [->], [Elementry Algebra],
[Abstraction of relationships], [->], [Graph Theory],
[Abstraction of vectors and\ their linear relationships], [->], [Linear Algebra]
)
]
// 22 ~ 23
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
A _category_ is a collection of...
#alternatives-cases((1, 2), case => [
#let _left = [
#table(
columns: 1,
inset: (x: 1em, y: .6em),
align: center + horizon,
[*Components*],
[Objects],
block[Morphisms (a.k.a. Arrows)],
block[Composition of morphisms],
)
]
#let _right = if case == 0 {
set text(size: fontsize_small)
move(dx: 3em, dy: .45em)[#block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dx: .2em,
dy: .2em,
$italic(bold("Category"))$
)
#fletcher.diagram({
let (a, b, c) = ((0, 1), (2, 1), (2, 0))
node(a, $O_1$)
node(b, $O_2$)
node(c, $O_3$)
edge(a, b, text(size: fontsize_small)[$m_1$], "->")
edge(b, c, text(size: fontsize_small)[$m_2$], "->", label-side: left)
edge(a, c, text(size: fontsize_small)[$m_2 compose m_1$], "->", label-side: right)
edge((-0.2, 1), (0, 0.8), "->", bend: -130deg, label-sep: -1.5pt, label: text(size: fontsize_small)[$id_O_1$])
edge((2, 1.2), (2.2, 1), "->", bend: +130deg, label-sep: -1.5pt, label: text(size: fontsize_small)[$id_O_2$])
edge(c, c, "->", bend: +130deg, label: text(size: fontsize_small)[$id_O_3$])
})
]]
} else {
table(
columns: 1,
inset: (x: 1em, y: .6em),
align: center + horizon,
[*For example...*],
[ $QQ," "PP = RR - QQ," "i RR = CC - RR$ ],
[ $f: QQ -> PP," "g: PP -> i RR$ ],
[ $g compose f: QQ -> i RR$ ]
)
}
#grid(
columns: 2,
_left, _right
)
])
]
// 24 ~ 25
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
#h(1.2em)
#let _left = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
$bold(C)$
)
#fletcher.diagram({
let (q, p, iR) = ((0, 1), (2, 1), (2, 0))
node(q, $QQ$)
node(p, $PP$)
node(iR, $i RR$)
edge(q, p, text(size: fontsize_small)[$f(x) = x + pi$], "->")
edge(p, iR, text(size: fontsize_small)[$g(x) = x i$], "->", label-side: left)
edge(q, iR, text(size: fontsize_small)[$g compose f$], "->", label-side: right)
edge((-0.2, 1), (0, 0.8), "->", bend: -130deg, label-sep: -1.5pt, label: text(size: fontsize_small)[$id_QQ$])
edge((2, 1.2), (2.2, 1), "->", bend: +130deg, label-sep: -1.5pt, label: text(size: fontsize_small)[$id_PP$])
edge(iR, iR, "->", bend: +130deg, label: text(size: fontsize_small)[$attach(id, br: #text[$i RR$])$])
})
]
#let _right = block(stroke: 1pt, outset: .1em, radius: .5em, width: 200pt)[
#place(
top + left,
dy: -1.2em,
[$bold(D = F(C))$]
)
#fletcher.diagram({
let (a, b) = ((0, 1), (0, 0))
node(a, $A$)
node(b, $B$)
edge(a, b, text(size: fontsize_small)[$h$], "->", label-side: left)
edge(a, a, "->", bend: -130deg, label: text(size: fontsize_small)[$id_A$])
edge(b, b, "->", bend: +130deg, label: text(size: fontsize_small)[$id_B$])
})
]
#grid(
columns: 3,
column-gutter: .5em,
_left,
uncover(2)[#xarrow(width: 5em)[#text(size: fontsize_medium)[$bold(F)"unctor"$]]],
uncover(2)[#_right]
)
]
// 26
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
#h(1.2em)
#let _left = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
$bold(C)$
)
#fletcher.diagram({
let (q, p, iR) = ((0, 1), (2, 1), (2, 0))
node(q, $QQ$)
node(p, $PP$)
node(iR, $i RR$)
edge(q, p, text(size: fontsize_small)[$f(x) = x + pi$], "->")
edge(p, iR, text(size: fontsize_small)[$g(x) = x i$], "->", label-side: left)
edge(q, iR, text(size: fontsize_small)[$g compose f$], "->", label-side: right)
edge((-0.2, 1), (0, 0.8), "->", bend: -130deg, label-sep: -1.5pt, label: text(size: fontsize_small)[$id_QQ$])
edge((2, 1.2), (2.2, 1), "->", bend: +130deg, label-sep: -1.5pt, label: text(size: fontsize_small)[$id_PP$])
edge(iR, iR, "->", bend: +130deg, label: text(size: fontsize_small)[$attach(id, br: #text[$i RR$])$])
})
]
#let _right = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
$bold(F(C))$
)
#set text(size: fontsize_small)
#fletcher.diagram({
let (q, p, iR) = ((0, 1), (2, 1), (2, 0))
node(q, $F(QQ)$)
node(p, $F(PP)$)
node(iR, $F(i RR)$)
edge(q, p, text(size: fontsize_small)[$F(f)$], "->")
edge(p, iR, text(size: fontsize_small)[$F(g)$], "->", label-side: left)
edge(q, iR, text(size: fontsize_small)[$F(g compose f)$], "->", label-side: right)
edge(q, q, "->", bend: -125deg, label: text(size: fontsize_small)[$F(id_QQ)$])
edge(p, p, "->", bend: -125deg, label: text(size: fontsize_small)[$F(id_PP)$])
edge(iR, iR, "->", bend: +125deg, label: text(size: fontsize_small)[$attach(id, br: #text[$i RR$])$])
})
]
#grid(
columns: 3,
column-gutter: .5em,
_left,
xarrow(width: 5em)[#text(size: fontsize_medium)[$bold(F)"unctor"$]],
_right
)
]
// 27 ~ 28
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
#show "F": name => box[
#set text(fill: color_dark)
#name
]
#show "fmap": name => box[
#set text(fill: color_dark)
f
]
#show math.equation: set text(font: "MesloLGS NF")
#set text(font: "MesloLGS NF")
#h(1.2em)
#let _left = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
"Type"
)
#place(
bottom + center,
dy: .9em,
text(size: fontsize_extrasmall, font: "Pretendard")[... let's ignore undefined situations]
)
#fletcher.diagram({
let (Int, Ints, Bool) = ((0, 1), (2, 1), (2, 0))
node(Int, "Int")
node(Ints, "Int[]")
node(Bool, "Bool")
edge(Int, Ints, text(size: fontsize_small)[length], "<-")
edge(Int, (1.7, 0.1), text(size: fontsize_small)[odd], "->", bend: +10deg, label-side: left)
edge(Int, Bool, text(size: fontsize_small)[even], "->", bend: -10deg, label-side: right)
edge(Int, Int, "->", bend: -130deg, label: text(size: fontsize_small)[sqrt])
edge(Ints, Ints, "->", bend: -125deg, label: text(size: fontsize_small)[tail])
edge(Bool, Bool, "->", bend: +130deg, label: text(size: fontsize_small)[not])
})
]
#let _right = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
"F(Type)"
)
#set text(size: fontsize_small)
#fletcher.diagram({
let (Int, Ints, Bool) = ((0, 1), (2, 1), (2, 0))
node(Int, "F(Int)")
node(Ints, "F(Int[])")
node(Bool, "F(Bool)")
edge(Int, Ints, text(size: fontsize_extrasmall)[fmap(length)], "<-")
edge(Int, (1.58, 0.1), text(size: fontsize_extrasmall)[fmap(odd)], "->", bend: +10deg, label-side: left)
edge(Int, Bool, text(size: fontsize_extrasmall)[fmap(even)], "->", bend: -10deg, label-side: right)
edge(Int, Int, "->", bend: -130deg, label: text(size: fontsize_extrasmall)[fmap(sqrt)])
edge(Ints, Ints, "->", bend: -125deg, label: text(size: fontsize_extrasmall)[fmap(tail)])
edge(Bool, Bool, "->", bend: +130deg, label: text(size: fontsize_extrasmall)[fmap(not)])
})
]
#grid(
columns: 3,
column-gutter: .5em,
_left,
uncover(2)[#xarrow(width: 5em)[#text(size: fontsize_medium)[$"Functor"$]]],
uncover(2)[#_right]
)
]
// 29
#absolute-center-slide(title: "Category Theory", header: "함수형 프로그래밍 Intro")[
#show "[']": name => box[
#set text(fill: color_dark)
[]
]
#show "F": name => box[
#set text(fill: color_dark)
fmap
]
#show math.equation: set text(font: "MesloLGS NF")
#set text(font: "MesloLGS NF")
#h(1.2em)
#let _left = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
"Type"
)
#place(
bottom + center,
dy: .9em,
text(size: fontsize_extrasmall, font: "Pretendard")[... let's ignore undefined situations]
)
#fletcher.diagram({
let (Int, Ints, Bool) = ((0, 1), (2, 1), (2, 0))
node(Int, "Int")
node(Ints, "Int[]")
node(Bool, "Bool")
edge(Int, Ints, text(size: fontsize_small)[length], "<-")
edge(Int, (1.7, 0.1), text(size: fontsize_small)[odd], "->", bend: +10deg, label-side: left)
edge(Int, Bool, text(size: fontsize_small)[even], "->", bend: -10deg, label-side: right)
edge(Int, Int, "->", bend: -130deg, label: text(size: fontsize_small)[sqrt])
edge(Ints, Ints, "->", bend: -125deg, label: text(size: fontsize_small)[tail])
edge(Bool, Bool, "->", bend: +130deg, label: text(size: fontsize_small)[not])
})
]
#let _right = block(stroke: 1pt, outset: .1em, radius: .5em)[
#place(
top + left,
dy: -1.2em,
"Type[']"
)
#set text(size: fontsize_small)
#fletcher.diagram({
let (Int, Ints, Bool) = ((0, 1), (2, 1), (2, 0))
node(Int, "Int[']")
node(Ints, "Int[][']")
node(Bool, "Bool[']")
edge(Int, Ints, text(size: fontsize_extrasmall)[F(length)], "<-")
edge(Int, (1.61, 0.1), text(size: fontsize_extrasmall)[F(odd)], "->", bend: +10deg, label-side: left)
edge(Int, Bool, text(size: fontsize_extrasmall)[F(even)], "->", bend: -10deg, label-side: right)
edge(Int, Int, "->", bend: -130deg, label: text(size: fontsize_extrasmall)[F(sqrt)])
edge(Ints, Ints, "->", bend: -125deg, label: text(size: fontsize_extrasmall)[F(tail)])
edge(Bool, Bool, "->", bend: +130deg, label: text(size: fontsize_extrasmall)[F(not)])
})
]
#grid(
columns: 3,
column-gutter: .5em,
_left,
xarrow(width: 5em)[#text(size: fontsize_medium)[$"[']"$]],
_right
)
]
// 30 ~ 33
#absolute-center-slide(title: "Core of Functional Thinking", header: "함수형 패러다임")[
Why do we make softwares?
#only("2-")[
To _use_ them and gain benefits from the _output_.
]
#only("3-")[
We DO need some _#pin(1)#underline[interactions]_ with the outside world!
#only(4)[
#pinit-place(
dy: 1.8em,
1
)[
#set text(weight: "semibold")
`== Side Effect!`
]
]
]
]
// 34 ~ 35
#relative-top-center-slide(title: "Core of Functional Thinking", header: "함수형 패러다임")[
#v(2.5em)
#show math.equation: set text(font: "MesloLGS NF")
#set text(font: "MesloLGS NF", size: fontsize_big)
Our Program
#v(1em)
input
#box[
#uncover("2-")[
#place(start + horizon)[
#box(width: .5em, height: 2em, fill: rgb(255, 0, 0, 30))[]
]
#place(center + horizon)[
#box(width: 14em, height: 2em, fill: rgb(0, 0, 255, 30))[]
]
#place(end + horizon)[
#box(width: .5em, height: 2em, fill: rgb(255, 0, 0, 30))[]
]
]
#xarrow(width: 15em)[$f_1 compose f_2 compose f_3 compose f_4 compose dots.h.c$]
]
output
#uncover("2-")[
#box(height: 1em, width: 1em, baseline: 0.2em, fill: rgb(0, 0, 255, 30)) pure /
#box(height: 1em, width: 1em, baseline: 0.2em, fill: rgb(255, 0, 0, 30)) impure
]
]
// 36 ~ 45
#absolute-center-slide(title: "FP Fact-Checking", header: "함수형 패러다임")[
#set enum(number-align: start + top)
#set list(marker: [--])
#let checked = (
"Easy Testing",
"Better Predictability",
"Fewer Bugs",
"Fearless Concurrency",
"Being Declarative"
)
#only(1)[
#tbc(checked.slice(0, checked.len() - 1).map(item => (item,)))
Bonus. #checked.last()
]
#only("2-3")[
#text(size: fontsize_big, weight: "medium", checked.at(0))
#only(3)[
- #align(start)[True for _pure functions_.]
- #align(start)[Still need mocking stuffs to test #pin("1")#underline("impure interactions").]
#pinit-place(
dy: 1.9em,
"1"
)[#text(size: fontsize_small, font: "MesloLGS NF", "i.e. Network IO")]
]
]
#only("4-5")[
#text(size: fontsize_big, weight: "medium", checked.at(1))
#only(5)[
- #align(start)[True for _pure functions_.]
- #align(start)[So the overall predictability _may_ increase.]
- #align(start)[Impure interactions could be #pin("2")#underline[non-deterministic].]
#pinit-place(
dy: 1.2em,
"2"
)[#text(size: fontsize_small, font: "MesloLGS NF", "i.e. Concurrent Threads")]
]
]
#only("6-7")[
#text(size: fontsize_big, weight: "medium", checked.at(2))
#only(7)[
- #align(start)[True for _pure functions with tests_.]
- #align(start)[Even pure functions need testing; _trust isn't automatic_.]
]
]
#only("8-9")[
#text(size: fontsize_big, text(weight: "medium", checked.at(3)))
#only(9)[
- #align(start)[True for _pure functions_.]
- #align(start)[Concurrency control mechanisms should definitely\ be utilized when needed!]
]
]
#only("10-11")[
#text(size: fontsize_big, text(weight: "medium", [Additionally... #checked.at(4)]))
- #align(start)[True.]
- #align(start)[However, being declarative is _not always superior_.]
- #align(start)[Testing your declarative APIs is also essential.]
]
]
// 46 ~ 48
#absolute-center-slide(title: "Optimizing with Purity", header: "FP는 정말 순수한가?")[
#text(size: fontsize_big, weight: "medium", "Pure functions...")
+ #align(start)[do not have side effects]
+ #align(start)[exhibit referential transparency]
#uncover(2)[_Let's utilize these properties for optimization!_]
]
#top-left-slide(title: "Optimizing with Purity", header: "FP는 정말 순수한가?")[
#set list(marker: [--])
Let's assume that we are designing a purely functional language.
- How can our compiler optimize this expression?
#v(1.5em)
#align(center)[
$ sinh x = (e^x - e^(-x)) / 2 $
#v(.5em)
```hs
sinh x = ((exp x) - (1 / (exp x))) / 2
```
]
]
// 49
#absolute-center-slide(title: "Optimizing with Purity", header: "FP는 정말 순수한가?")[
#set list(marker: [--], indent: 1em)
$ sinh x = (e^x - e^(-x)) / 2 $
#v(.5em)
```hs
sinh x = ((exp x) - (1 / (exp x))) / 2
```
$ arrow.b $
```hs
sinh x = (t - (1 / t)) / 2 where t = exp x
```
]
// 50
#absolute-center-slide(title: "Optimizing with Purity", header: "FP는 정말 순수한가?")[
#text(size: fontsize_big)[_This is the power of purely functional language!_]
cf. In C, this kind of optimization can't be done offensively. Why?
]
// 51
#absolute-center-slide(title: "Effect Handling Basics", header: "FP는 정말 순수한가?")[
#text(size: fontsize_big, weight: "medium", "...But what about effects?")
#code(lang: "Haskell", width: 35em, line-spacing: 12pt, ```hs
main = do
firstName <- getLine
secondName <- getLine -- called twice with same param
putStrLn ("Hi, " ++ firstName ++ secondName)
putStrLn "--------"
putStrLn "--------" -- called twice with same param
putStrLn "Today's weather: ..."
```)
]
// 52 ~ 53
#absolute-center-slide(title: "Effect Handling Basics", header: "FP는 정말 순수한가?")[
#set list(marker: [--])
#only(2)[#text(font: "MesloLGS NF", size: 55pt)[_\<Let's code!\>_]]
Let's assume that you're doing some simulations.
- #align(start)[...in a purely functional language.]
- #align(start)[You need to manage various #pin("1")#underline[states] of objects.]
#pinit-place(
dy: 0.6em,
"1"
)[#text(size: fontsize_small, font: "MesloLGS NF", "i.e. Position")]
]
// 54
#absolute-center-slide(title: "Effect Handling Basics", header: "FP는 정말 순수한가?")[
#text(size: fontsize_big, weight: "medium", "Interesting example")
#let down = code(lang: "Python3", line-spacing: 12pt, ```py
def main():
return [print("hi"), print("hello"), print("whatever")][0]
main()
```)
#let up = code(lang: "Haskell", line-spacing: 12pt, ```hs
main :: IO ()
main = head [print "hi", print "hello", print "whatever"]
```)
#up #down
]
|
https://github.com/yhtq/Notes | https://raw.githubusercontent.com/yhtq/Notes/main/抽象代数/作业/hw9.typ | typst | #import "../../template.typ": *
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#show: note.with(
title: "作业9",
author: "YHTQ ",
date: none,
logo: none,
withOutlined: false
)
(11.20 日作业)
= P89
== 5
(1). \
$R$ 中元素 $x$ 可逆当且仅当 $gcd(x, p^n) = 1 <=> gcd(x, p) = 1$\
因此 $R$ 中所有不是 $p$ 的倍数的元素都是可逆元。是 $p$ 的倍数的元素 $x$ 均有 $x^n = 0$,因此结论成立
(2). \
设 $I$ 是 $R$ 中某个素理想,注意到:
$
p dot p^(n-1) = 0 in I => p in I or p^(n-1) in I
$
表明 $(p) subset I or (p^(n-1)) subset I$。
- 若 $(p) subset I$,则 $I = (p)$(注意到 $I$ 中没有可逆元,否则成为平凡理想)
- 若 $(p^(n-1)) subset I$,则有:
$
p dot p^(n-2) = p^(n-1) in I => p in I or p^(n-2) in I
$
以此类推,最终有 $p in I$,因此 $I = (p)$
(3). \
容易验证 $I$ 也是极大理想,从而商环当然是域
== 7
由同构定理
$
quotient(im(phi), (Q sect im(phi)) ) tilde.eq quotient(R, Inv(phi)(Q sect im(phi)))
$
由于 $Q$ 是素理想,故 $Q sect im(phi)$ 也是 $im(phi)$ 中素理想,因此上式前者是整环,因而后者也是整环,表明 $Inv(phi)(Q sect im(phi)) = Inv(phi)(Q)$ 也是素理想
对于极大理想,结论不成立。例如考虑 $ZZ_6 -> QQ$ 的嵌入映射,$QQ$ 中的极大理想 ${0}$ 的原像为 ${0}$,但 ${0}$ 不是 $ZZ_6$ 的极大理想
== 8
#lemma[][
设 $P$ 是素理想,$product_(i = 1)^n x_i in P$,则 $exists i: x_i in P$
]
#proof[
用归纳法,$n = 1$ 时显然成立。假设 $n = k$ 时成立,考虑 $n = k + 1$ 的情况:
- 若 $x_1 in P$,则结论成立。
- 若 $x_1 in.not P$,则 $product_(i = 2)^n x_i in P$,由归纳假设,$exists i: x_i in P$,因此结论成立
]
如若不然,对于每个 $i$,可以取得 $x_i != 0$ 使得:
- $x_i in I_i$
- $x_i in.not P$
从而 $product_i x_i in sect.big_i I_i subset P$,由引理,$exists i: x_i in P$,这与 $x_i in.not P$ 矛盾!
== 9
用归纳法,显然 $n = 1$ 时情形成立。假设 $n-1$ 时情形成立,考虑 $n$ 的情形。不妨设 $I sect P_i$ != ${0}$。\
假设对于每个 $i$,都存在 $x_i$ 使得:
- $x_i in I$
- $x_i in P_i$
- $x_i in.not P_j (j != i)$
则考虑:
$
sum_(i= 1)^n product_(j != i) x_j
$
注意到 $product_(j != i) x_j in P_k, forall k != i$。同时,$product_(j != i) x_j in.not P_i$(否则与引理和假设矛盾)。\
这表明 $sum_(i= 1)^n product_(j != i) x_j$ 中有且恰有一项 $in.not P_i$,因此它不在任何一个 $P_i$ 中,但它在 $I$ 中,矛盾!\
从而假设不成立,故存在某个 $i$ 使得:
$
I sect P_i subset P_j
$
从而可以去掉 $P_i$,用归纳假设即知原命题成立。
== 10
#lemma[][
有限整环是域
]
#proof[
设 $R$ 是有限整环,$x in R, x != 0$,考虑映射 $f: R -> R$,$f(y) = x y$。\
由于 $R$ 是有限集,$f$ 是单射,因此 $f$ 是双射,从而存在 $y$ 使得 $x y = 1$,即 $x$ 可逆
]
设 $R$ 是有限环,则:
$
I "是素理想" <=> quotient(R, I) "是整环" <=> quotient(R, I) "是域" <=> I "是极大理想"
$
== 11
$Z_((p))$ 就是 ${n/(k p + r) | n in ZZ, k in ZZ, r in {1, 2, ..., p}}$
== 13
(1)\
易知 $a (I R_p) = (a I) R_p subset I R_p$,结论成立
(2)\
设 $a_1/b_1, a_2/b_2 in R_p, q in Q, a_3/b_3 in R_p$,且:
$
a_1/b_1 a_2/b_2 = q a_3/b_3
$
则:
$
q a_3 b_1 b_2 = a_1 a_2 b_3 in Q
$
由于 $Q$ 是素理想,这表明 $a_1, a_2, b_3$ 中必有一个在 $Q$ 中。
- 若 $b_3$ 在 $Q$ 中,则 $1 = b_3 1/b_3 in Q R_P => Q R_P = (1)$
- 若恒有 $a_1$ 或 $a_2$ 在 $Q$ 中,则是素理想
(3) \
设 $I$ 是 $R_P$ 的非平凡理想,则对任意 $a/b in I$,断言 $a in P$,否则:
$
a in R - P => 1/a in R_P => a/b dot 1/a dot b = 1 in I
$
表明 $I subset P R_P$,进而结论成立。
(4)\
由 $(2)$ 的证明看出若 $Q subset P$ 是 $R$ 的素理想,则 $Q R_P$ 是 $R_P$ 的素理想。\
同时承接 $(3)$ 的证明,若 $I$ 是 $R_P$ 的素理想,断言:
$
I = (I sect P) R_P
$
且 $I sect P$ 是 $R$ 的素理想。\
事实上,$(I sect P) R_P subset I$ 是显然的,而对任意 $a/b in I$,显有 $a in P, b in R - P$,从而 $a = a/b dot b in I sect P$,进而 $(I sect P) R_P = I$。\
同时设 $a_1, a_2 in R$,则::
$
a_1 a_2 in I sect P => a_1 a_2 in in I => a_1 in I or a_2 in I => a_1 in I sect R or a_2 in I sect R \
=> a_1 in I sect P or a_2 in I sect P
$
足以给出题目所设构成一一映射。
= 补充题
==
由对应定理:
$
quotient(R, I) tilde.eq quotient(R', phi(I))\
quotient(R, Inv(phi)(j)) tilde.eq quotient(R', J)
$
结合素(极大)理想与商环性质的等价性,所有结论都成立
==
- 设 $I$ 是素理想,$x^n = 0$,往证 $x in I$:
\
对 $n$ 进行归纳,事实上:
$
x dot x^(n-1) = 0 in I => x in I or x^(n-1) in I
$
- $n = 2$ 时,两者都表明 $x in I$
- $n > 2$ 时,若前者成立则结论成立,若后者成立则归纳可知 $x in I$,结论成立
- 记 $P$ 是所有幂零元构成的集合。上面已经证明了它含于所有素理想。为了证明它是所有素理想的交,只需验证任取 $x in R - P$,$x$ 不在某个素理想中即可。\
显然 $x != 0$。考虑包含 $(x+1)$ 的极大理想,它将成为素理想,且 $x$ 不在其中(否则 $1$ 将在其中,成为平凡理想),这就表明结论成立。
==
#lemma[][
主理想环的商环还是主理想环
]
#proof[
设 $R$ 是主理想环,$I$ 是其一个理想,$J$ 是 $quotient(R, I)$ 的理想,则由对应定理,$Inv(phi)(J)$ 成为 $R$ 的理想,因此可设:
$
Inv(phi)(J) = (a)
$
另一方面,之前习题证明了 $phi((a)) = (phi(a))$,故:
$
J = phi(Inv(phi)(J)) = phi((a)) = (phi(a))
$
因此结论成立。
]
- 之前习题证明了有限环的素理想就是极大理想,这里只考虑素理想即可。同时由引理,所有理想都是主理想。\
显然 $ZZ_n$ 中所有幂零根恰为所有包含所有 $p_i$ 的整数的集合,也就是 $(p_1 p_2 ... p_k)$\
设 $P$ 是 $ZZ_n$ 中素理想,我们有:
$
p_1 p_2 ... p_k in P
$
由素理想的性质,这表明 $exists i: p_i in P$,进而 $(p_i) subset I$。\
事实上,由引理可设 $I = (m)$,从而 $m | p_i => m = p_i$,故 $I = (p_i)$。同时容易验证 $(p_i)$ 确实是素理想,因此它就是所有的素理想。
==
用归纳法,$n = 1$ 时显然。假设 $n - 1$ 时情形成立。\
假设存在 $x_i$ 使得:
$
x_i in I_i\
x_i in.not I_j (j != i)
$
从而对每个 $i$,均有 $x_i in.not P$,故:
$
product_i x_i in.not P
$
但是:
$
product_i x_i in sect.big_i I_i = P
$
矛盾!
从而必有某个 $I_i$ 含于另一个,消去较大的利用归纳法即得。
==
#lemma[][
设 $R$ 是主理想整环,$(a)$ 是素理想,$b in.not (a)$,则 $(a)$ 与 $(b)$ 互素
]
#proof[
由条件,可设:
$
(a) + (b) = (m)
$
而 $(a) subset (a) + (b) = (m)$,表明:
$
a = k m in (a) => k in (a) or m in (a)
$
- $k in (a) => k = a u$,则:
$
a = k m = a u m => a (1 - u m) = 0 => 1 = u m => (m) = (1)
$
进而结论成立
- $m in (a) => (m) = (a)$,则:$(b) subset (a) => b in (a)$,矛盾!
]
设 $R$ 是主理想整环,$P = (a)$ 是一个素理想。取自然同态 $phi: R -> quotient(R, P)$往证 $quotient(R, P)$ 是域。\
事实上,任取 $b in.not (a)$,将有:
$
(b) + (a) = (1) => phi((b)) = phi((1)) => (phi(b)) = (phi(1))
$
换言之,$quotient(R, P)$ 中所有元素可逆,进而是域,从而结论成立。
==
设 $f(x)$ 可逆,由代入同态,$f(0)$ 也可逆,故 $a_0$ 可逆\
不妨设 $a_0 = 1$:
- 假设 $f(x)$ 所有系数都幂零,则:
$
a_i x^i, i =1, 2,3 .., n
$
都幂零,因此它们的和也幂零。设 $A = - sum_(i=1)^n a_i x^i$,将有 $A$ 幂零,且:
$
f = 1 - A
$
由之前习题,$1 - A$ 幂零,因此 $f$ 幂零
- 若 $f(x) g(x) = sum_(i=1)^n a_i x^i sum_(j=1)^m b_j x^j = 1$,比照系数知:
$
a_n b_m =1\
a_n b_(m-1) + a_(n-1) b_m = 0 => (a_n)^2 b_(m-1) = 0 \
a_n b_(m-2) + a_(n-1) b_(m-1) + a_(n-2) b_m = 0 => (a_n)^3 b_(m-2) = 0 \
...
(a_n)^m dot b_0 = 0
$
同时 $b_0$ 是可逆元,因此 $(a_n)^m = 0$,表明 $a_n$ 是幂零元,进而 $a_n x^n$ 幂零。\
由于单位减去幂零元也是单位,故以此类推可得所有系数都幂零。
==
$125 = 5^3$,只需要在 $ZZ_5$ 上寻找三次不可约多项式即可。\
可以验证:
$
x^3 + 2 x^2 + 2 x + 3
$
没有根,因此它是不可约多项式,进而 $x^3 + 2 x^2 + 2 x + 3$ 是 $ZZ_5$ 上的三次不可约多项式,故:
$
quotient(ZZ_5, (x^3 + 2 x^2 + 2 x + 3))
$
就是 $125$ 阶域
|
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/for-03.typ | typst | Other | // Keys and values of strings.
// Error: 6-12 cannot destructure values of string
#for (k, v) in "hi" {
dont-care
}
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/cetz-plot/0.1.0/src/chart.typ | typst | Apache License 2.0 | #import "chart/boxwhisker.typ": boxwhisker, boxwhisker-default-style
#import "chart/barchart.typ": barchart, barchart-default-style
#import "chart/columnchart.typ": columnchart, columnchart-default-style
#import "chart/piechart.typ": piechart, piechart-default-style
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-1B80.typ | typst | Apache License 2.0 | #let data = (
("SUNDANESE SIGN PANYECEK", "Mn", 0),
("SUNDANESE SIGN PANGLAYAR", "Mn", 0),
("SUNDANESE SIGN PANGWISAD", "Mc", 0),
("SUNDANESE LETTER A", "Lo", 0),
("SUNDANESE LETTER I", "Lo", 0),
("SUNDANESE LETTER U", "Lo", 0),
("SUNDANESE LETTER AE", "Lo", 0),
("SUNDANESE LETTER O", "Lo", 0),
("SUNDANESE LETTER E", "Lo", 0),
("SUNDANESE LETTER EU", "Lo", 0),
("SUNDANESE LETTER KA", "Lo", 0),
("SUNDANESE LETTER QA", "Lo", 0),
("SUNDANESE LETTER GA", "Lo", 0),
("SUNDANESE LETTER NGA", "Lo", 0),
("SUNDANESE LETTER CA", "Lo", 0),
("SUNDANESE LETTER JA", "Lo", 0),
("SUNDANESE LETTER ZA", "Lo", 0),
("SUNDANESE LETTER NYA", "Lo", 0),
("SUNDANESE LETTER TA", "Lo", 0),
("SUNDANESE LETTER DA", "Lo", 0),
("SUNDANESE LETTER NA", "Lo", 0),
("SUNDANESE LETTER PA", "Lo", 0),
("SUNDANESE LETTER FA", "Lo", 0),
("SUNDANESE LETTER VA", "Lo", 0),
("SUNDANESE LETTER BA", "Lo", 0),
("SUNDANESE LETTER MA", "Lo", 0),
("SUNDANESE LETTER YA", "Lo", 0),
("SUNDANESE LETTER RA", "Lo", 0),
("SUNDANESE LETTER LA", "Lo", 0),
("SUNDANESE LETTER WA", "Lo", 0),
("SUNDANESE LETTER SA", "Lo", 0),
("SUNDANESE LETTER XA", "Lo", 0),
("SUNDANESE LETTER HA", "Lo", 0),
("SUNDANESE CONSONANT SIGN PAMINGKAL", "Mc", 0),
("SUNDANESE CONSONANT SIGN PANYAKRA", "Mn", 0),
("SUNDANESE CONSONANT SIGN PANYIKU", "Mn", 0),
("SUNDANESE VOWEL SIGN PANGHULU", "Mn", 0),
("SUNDANESE VOWEL SIGN PANYUKU", "Mn", 0),
("SUNDANESE VOWEL SIGN PANAELAENG", "Mc", 0),
("SUNDANESE VOWEL SIGN PANOLONG", "Mc", 0),
("SUNDANESE VOWEL SIGN PAMEPET", "Mn", 0),
("SUNDANESE VOWEL SIGN PANEULEUNG", "Mn", 0),
("SUNDANESE SIGN PAMAAEH", "Mc", 9),
("SUNDANESE SIGN VIRAMA", "Mn", 9),
("SUNDANESE CONSONANT SIGN PASANGAN MA", "Mn", 0),
("SUNDANESE CONSONANT SIGN PASANGAN WA", "Mn", 0),
("SUNDANESE LETTER KHA", "Lo", 0),
("SUNDANESE LETTER SYA", "Lo", 0),
("SUNDANESE DIGIT ZERO", "Nd", 0),
("SUNDANESE DIGIT ONE", "Nd", 0),
("SUNDANESE DIGIT TWO", "Nd", 0),
("SUNDANESE DIGIT THREE", "Nd", 0),
("SUNDANESE DIGIT FOUR", "Nd", 0),
("SUNDANESE DIGIT FIVE", "Nd", 0),
("SUNDANESE DIGIT SIX", "Nd", 0),
("SUNDANESE DIGIT SEVEN", "Nd", 0),
("SUNDANESE DIGIT EIGHT", "Nd", 0),
("SUNDANESE DIGIT NINE", "Nd", 0),
("SUNDANESE AVAGRAHA", "Lo", 0),
("SUNDANESE LETTER REU", "Lo", 0),
("SUNDANESE LETTER LEU", "Lo", 0),
("SUNDANESE LETTER BHA", "Lo", 0),
("SUNDANESE LETTER FINAL K", "Lo", 0),
("SUNDANESE LETTER FINAL M", "Lo", 0),
)
|
https://github.com/LucaCiucci/tesi-triennale | https://raw.githubusercontent.com/LucaCiucci/tesi-triennale/main/img/slide_1/monopolo.typ | typst | Creative Commons Zero v1.0 Universal | #import "@preview/cetz:0.2.2"
#import "@preview/suiji:0.3.0": *
#let fig(step) = cetz.canvas(length: 5mm, {
import cetz: draw
import cetz.draw: *
let rng = gen-rng(42)
// Regolarizzazione del modulo, da fare meglio con epsilon relativo
let R(px, py, pz) = {
let epsilon = 0.05 * 4;
return calc.sqrt(px * px + py * py + pz * pz + epsilon * epsilon);
}
let cross(ax, ay, az, bx, by, bz) = {
return (
ay * bz - az * by,
az * bx - ax * bz,
ax * by - ay * bx
);
}
// Potenziale di Dirac REGOLARIZZATO
let A((px, py, pz)) = {
let nx = 0.0;
let ny = -1.0;
let nz = 0.0;
let (cx, cy, cz) = cross(px, py, pz, nx, ny, nz);
return (
1. / R(px, py, pz) * cx / (R(px, py, pz) - (px * nx + py * ny + pz * nz)),
1. / R(px, py, pz) * cy / (R(px, py, pz) - (px * nx + py * ny + pz * nz)),
1. / R(px, py, pz) * cz / (R(px, py, pz) - (px * nx + py * ny + pz * nz)),
);
}
let sub((ax, ay, az), (bx, by, bz)) = {
return (ax - bx, ay - by, az - bz);
}
let add((ax, ay, az), (bx, by, bz)) = {
return (ax + bx, ay + by, az + bz);
}
let add_2((ax, ay), (bx, by)) = {
return (ax + bx, ay + by);
}
let div((ax, ay, az), b) = {
return (ax / b, ay / b, az / b);
}
let mul_2((ax, ay), b) = {
return (ax * b, ay * b);
}
let normalize_2((x, y)) = {
let r = calc.sqrt(x * x + y * y);
return (x / r, y / r);
}
// Campo magnetico come rotore di A
let B(p) = {
let h = 0.001;
let (dx_Ax, dx_Ay, dx_Az) = div(sub(A(add(p, (h, 0., 0.))), A(sub(p, (h, 0., 0.)))), (2. * h));
let (dy_Ax, dy_Ay, dy_Az) = div(sub(A(add(p, (0., h, 0.))), A(sub(p, (0., h, 0.)))), (2. * h));
let (dz_Ax, dz_Ay, dz_Az) = div(sub(A(add(p, (0., 0., h))), A(sub(p, (0., 0., h)))), (2. * h));
return (
dy_Az - dz_Ay,
dz_Ax - dx_Az
);
}
rect(
(-10, -10),
(10, 10),
stroke: none,
)
for j in range(0, 2000) { // 2000
let x0 = 0;
let y0 = 0;
let w = 15.0;
(rng, (x0,)) = uniform(rng, low: -w, high: w, size: 1)
(rng, (y0,)) = uniform(rng, low: -9.0, high: 9.0, size: 1)
//rect(
// (x0, y0),
// (x0 + 0.2, y0 + 0.2),
// fill: black,
// stroke: none
//);
let color_map(B) = {
let t = calc.max(calc.min(calc.log(calc.sqrt(B.at(0) * B.at(0) + B.at(1) * B.at(1))) + 2.2, 1.0), 0.0);
let c1 = teal;
let c2 = green;
let c2 = purple;
let col = color.mix(
(c1.transparentize(20%), 1 - t),
(c2.transparentize(20%), t),
);
col
};
let positions = {
let N = 5;
let positions = ();
if j == 0 {
continue;
}
let p = (x0, y0);
positions.push((p, color_map(B((x0, y0, 0.0)))));
for i in range(0, N) {
let (px, py) = p;
let B = B((px, py, 0.0));
let col = color_map(B);
let dir = normalize_2(B);
let dp = mul_2(dir, 1.0 / N);
p = add_2(p, dp);
positions.push((p, col));
}
positions
};
for i in range(0, positions.len() - 1) {
line(
positions.at(i).at(0),
positions.at(i + 1).at(0),
stroke: (
thickness: 1.0pt,
cap: "round",
paint: positions.at(i).at(1),
),
);
}
}
let xx = (
0.05,
0.15,
0.25,
0.4,
0.65,
-0.05,
//-0.15,
-0.25,
-0.4,
-0.65,
);
for x in xx {
let N = 100;
let K = 2;
let positions = {
let positions = ();
let p = (x, -10.0);
positions.push(p);
for i in range(0, N) {
let (px, py) = p;
let B = B((px, py, 0.0));
let dir = normalize_2(B);
let dp = mul_2(dir, 20 / N);
p = add_2(p, dp);
let (px, py) = p;
if (calc.rem(i, K) == 0) and px > -10.0 and px < 10.0 and py > -10.0 and py < 10.0 {
positions.push(p);
}
}
positions
};
for i in range(0, positions.len() - 1) {
if i == positions.len() - 2 {
line(
positions.at(i),
positions.at(i + 1),
stroke: (thickness: 1.5pt, cap: "round", paint: black.lighten(0%)),
mark: (end: "stealth"),
);
} else {
line(
positions.at(i),
positions.at(i + 1),
stroke: (thickness: 1.5pt, cap: "round", paint: black.lighten(0%))
);
}
//panic(positions.at(i+1));
}
}
circle(
(0, 0),
radius: 0.75,
fill: blue,
stroke: none
)
line(
(0, 0),
(-8.5, 6.5),
stroke: (thickness: 0.75pt, cap: "round", paint: black.lighten(0%)),
mark: (end: "stealth"),
)
group({
rotate(-2.225);
arc(
(0,0),
start: -90deg,
stop: -55deg,
anchor: "origin",
radius: 2.0,
);
scale(4.0);
circle((0,-2), radius: (1.35, 0.25))
})
line(
(0, 0),
(4, -2.5),
stroke: (thickness: 2pt, cap: "round", paint: green.darken(30%)),
mark: (end: "stealth"),
)
content((-3, -5.0), [
#set text(size: 10mm, green.darken(30%))
#show: it => box(it, fill: black.lighten(100%).transparentize(20%), inset: 0.25em, radius: 0.25em)
$bold(tilde(L))$
])
line(
(0, 0),
(-0.5, -4),
stroke: (thickness: 4pt, cap: "round", paint: green.darken(20%)),
mark: (end: "stealth"),
)
content((3, -4.0), [
#set text(size: 10mm, green.darken(30%))
#show: it => box(it, fill: black.lighten(100%).transparentize(20%), inset: 0.25em, radius: 0.25em)
$bold(L)$
])
circle(
(-8, 0.5),
radius: 0.3,
fill: red,
stroke: none
)
bezier(
(-8, 0.5),
(-3, 2.5),
(-6, 0.5),
stroke: (thickness: 1.0pt, cap: "round", paint: red, dash: "dashed"),
mark: (end: "stealth"),
)
content((-2.5, 0.9), [
#set text(size: 5mm, black)
#show: it => box(it, fill: black.lighten(100%).transparentize(20%), inset: 0.25em, radius: 0.25em)
$theta$
])
content((-8, -1.0), [
#set text(size: 10mm, red)
#show: it => box(it, fill: black.lighten(100%).transparentize(20%), inset: 0.25em, radius: 0.25em)
$bold(e)$
])
content((3, 1.5), [
#set text(size: 15mm, blue)
#show: it => box(it, fill: black.lighten(100%).transparentize(20%), inset: 0.25em, radius: 0.25em)
$bold(g)$
])
content((7,3), [
#set text(size: 15mm)
#show: it => box(it, fill: black.lighten(100%).transparentize(20%), inset: 0.25em, radius: 0.25em)
$arrow(B)$
])
})
//#set page(margin: 0pt, width: 1000pt, height: 1000pt)
//#set page(width: auto, height: auto, margin: 1cm)
//#rect(fig, inset: 0pt, width: 8cm, height: 6cm)
#rect(fig(0))
|
https://github.com/f7ed0/typst-template | https://raw.githubusercontent.com/f7ed0/typst-template/master/test.typ | typst | #import "template.typ" : init
#show: doc => init(
doc,
)
= B |
|
https://github.com/matthew-e-brown/assignmatts | https://raw.githubusercontent.com/matthew-e-brown/assignmatts/main/README.md | markdown | MIT License | # Assignmatts
This is my personal library of templates and helper functions for my various
assignments, labs, and projects at university.
This has been turned into a package so that:
- I can import it from my `@local` namespace even from different course
directories.
- So that my friends, who I'm trying to get to use Typst, can use the same theme
as me. 😄
## Installation
I'm not going to bother putting this on the Typst package repository (at least
not until they add themes as their own thing). Unfortunately, you can't
`#import` from a Git URL yet; to install this package, follow [Typst's guide on
local packages][package-install].
The easiest way to install this package is probably to clone it into your
`{data-dir}` (again, see Typst's guide). More specifically, you can clone a
specific version without any extra history by setting the `--depth` flag to `1`
and using `--branch` to target a tag on this repository.
On Windows, Typst's `{data-dir}` is located in `%LOCALAPPDATA%`.
For convenience (as in, mostly for my own convenience), here's a Bash snippet
that will install the latest version.
```bash
VER="$(curl -s https://api.github.com/repos/matthew-e-brown/assignmatts/releases/latest | jq -r '.tag_name')"
DIR="${LOCALAPPDATA}/typst/packages/local/assignmatts"
mkdir -p "$DIR" # will do nothing if already exists
git clone [email protected]:matthew-e-brown/assignmatts.git --branch "$VER" --depth 1 "$DIR/${VER/v}"
rm -rf "$DIR/${VER/v}/.git" # No need to keep it as a git repo
```
This requires having [`jq`](https://jqlang.github.io/jq/) installed, of course.
Just get it from `winget`. You can safely ignore the detached-HEAD warning from
Git.
[package-install]: https://github.com/typst/packages/?tab=readme-ov-file#local-packages
|
https://github.com/ClazyChen/Table-Tennis-Rankings | https://raw.githubusercontent.com/ClazyChen/Table-Tennis-Rankings/main/history_CN/2024/WS-05.typ | typst |
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (1 - 32)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[1], [孙颖莎], [CHN], [3667],
[2], [王曼昱], [CHN], [3449],
[3], [陈梦], [CHN], [3352],
[4], [陈幸同], [CHN], [3229],
[5], [朱雨玲], [MAC], [3222],
[6], [早田希娜], [JPN], [3215],
[7], [王艺迪], [CHN], [3167],
[8], [张本美和], [JPN], [3155],
[9], [郑怡静], [TPE], [3150],
[10], [平野美宇], [JPN], [3131],
[11], [伊藤美诚], [JPN], [3128],
[12], [钱天一], [CHN], [3123],
[13], [何卓佳], [CHN], [3115],
[14], [张瑞], [CHN], [3098],
[15], [木原美悠], [JPN], [3067],
[16], [田志希], [KOR], [3060],
[17], [蒯曼], [CHN], [3057],
[18], [伯纳黛特 斯佐科斯], [ROU], [3044],
[19], [桥本帆乃香], [JPN], [3037],
[20], [韩莹], [GER], [3031],
[21], [范思琦], [CHN], [3028],
[22], [刘炜珊], [CHN], [2997],
[23], [妮娜 米特兰姆], [GER], [2970],
[24], [石洵瑶], [CHN], [2966],
[25], [陈熠], [CHN], [2965],
[26], [小盐遥菜], [JPN], [2964],
[27], [杨晓欣], [MON], [2947],
[28], [阿德里安娜 迪亚兹], [PUR], [2947],
[29], [大藤沙月], [JPN], [2935],
[30], [长崎美柚], [JPN], [2927],
[31], [芝田沙季], [JPN], [2914],
[32], [申裕斌], [KOR], [2902],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (33 - 64)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[33], [徐孝元], [KOR], [2888],
[34], [佐藤瞳], [JPN], [2886],
[35], [朱芊曦], [KOR], [2879],
[36], [李恩惠], [KOR], [2875],
[37], [索菲亚 波尔卡诺娃], [AUT], [2858],
[38], [森樱], [JPN], [2857],
[39], [普利西卡 帕瓦德], [FRA], [2831],
[40], [边宋京], [PRK], [2830],
[41], [玛妮卡 巴特拉], [IND], [2824],
[42], [杜凯琹], [HKG], [2823],
[43], [高桥 布鲁娜], [BRA], [2810],
[44], [奥拉万 帕拉南], [THA], [2797],
[45], [李雅可], [CHN], [2791],
[46], [吴洋晨], [CHN], [2789],
[47], [安妮特 考夫曼], [GER], [2778],
[48], [布里特 伊尔兰德], [NED], [2772],
[49], [袁嘉楠], [FRA], [2769],
[50], [郭雨涵], [CHN], [2765],
[51], [斯丽贾 阿库拉], [IND], [2765],
[52], [覃予萱], [CHN], [2748],
[53], [徐奕], [CHN], [2746],
[54], [朱成竹], [HKG], [2740],
[55], [王晓彤], [CHN], [2738],
[56], [杨屹韵], [CHN], [2737],
[57], [伊丽莎白 萨玛拉], [ROU], [2733],
[58], [PESOTSKA Margaryta], [UKR], [2724],
[59], [李时温], [KOR], [2722],
[60], [曾尖], [SGP], [2720],
[61], [李皓晴], [HKG], [2718],
[62], [玛利亚 肖], [ESP], [2716],
[63], [倪夏莲], [LUX], [2714],
[64], [张安], [USA], [2713],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (65 - 96)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[65], [韩菲儿], [CHN], [2712],
[66], [齐菲], [CHN], [2704],
[67], [DIACONU Adina], [ROU], [2698],
[68], [DRAGOMAN Andreea], [ROU], [2698],
[69], [李昱谆], [TPE], [2693],
[70], [克里斯蒂娜 卡尔伯格], [SWE], [2691],
[71], [蒂娜 梅谢芙], [EGY], [2689],
[72], [梁夏银], [KOR], [2686],
[73], [金河英], [KOR], [2686],
[74], [傅玉], [POR], [2677],
[75], [LEE Daeun], [KOR], [2675],
[76], [笹尾明日香], [JPN], [2672],
[77], [单晓娜], [GER], [2667],
[78], [范姝涵], [CHN], [2666],
[79], [横井咲樱], [JPN], [2664],
[80], [WAN Yuan], [GER], [2663],
[81], [金娜英], [KOR], [2657],
[82], [崔孝珠], [KOR], [2654],
[83], [陈沂芊], [TPE], [2652],
[84], [张墨], [CAN], [2650],
[85], [ARAPOVIC Hana], [CRO], [2645],
[86], [BAJOR Natalia], [POL], [2636],
[87], [王 艾米], [USA], [2631],
[88], [朱思冰], [CHN], [2622],
[89], [WINTER Sabine], [GER], [2620],
[90], [LIU Hsing-Yin], [TPE], [2618],
[91], [刘杨子], [AUS], [2616],
[92], [吴咏琳], [HKG], [2615],
[93], [KIM Byeolnim], [KOR], [2613],
[94], [SAWETTABUT Jinnipa], [THA], [2612],
[95], [邵杰妮], [POR], [2608],
[96], [HUANG Yi-Hua], [TPE], [2607],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Women's Singles (97 - 128)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[97], [POTA Georgina], [HUN], [2603],
[98], [RAKOVAC Lea], [CRO], [2600],
[99], [SAWETTABUT Suthasini], [THA], [2591],
[100], [MATELOVA Hana], [CZE], [2587],
[101], [GHORPADE Yashaswini], [IND], [2587],
[102], [纵歌曼], [CHN], [2584],
[103], [艾希卡 穆克吉], [IND], [2579],
[104], [HUANG Yu-Chiao], [TPE], [2579],
[105], [陈思羽], [TPE], [2579],
[106], [苏蒂尔塔 穆克吉], [IND], [2578],
[107], [CIOBANU Irina], [ROU], [2577],
[108], [AKAE Kaho], [JPN], [2575],
[109], [NOMURA Moe], [JPN], [2574],
[110], [刘佳], [AUT], [2574],
[111], [<NAME>], [HUN], [2570],
[112], [GODA Hana], [EGY], [2567],
[113], [KAMATH Archana Girish], [IND], [2566],
[114], [LUTZ Charlotte], [FRA], [2565],
[115], [WEGRZYN Katarzyna], [POL], [2560],
[116], [杨蕙菁], [CHN], [2559],
[117], [DE NUTTE Sarah], [LUX], [2558],
[118], [ZHANG Xiangyu], [CHN], [2558],
[119], [MALOBABIC Ivana], [CRO], [2542],
[120], [TOLIOU Aikaterini], [GRE], [2542],
[121], [<NAME>], [SRB], [2541],
[122], [<NAME>], [KOR], [2537],
[123], [<NAME>], [SWE], [2530],
[124], [<NAME>], [TPE], [2528],
[125], [<NAME>], [ROU], [2520],
[126], [<NAME>], [SUI], [2517],
[127], [HO Tin-Tin], [ENG], [2512],
[128], [<NAME>], [ROU], [2505],
)
) |
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/layout/hide-00.typ | typst | Other | AB #h(1fr) CD \
#hide[A]B #h(1fr) C#hide[D]
|
https://github.com/jakobjpeters/Typstry.jl | https://raw.githubusercontent.com/jakobjpeters/Typstry.jl/main/NEWS.md | markdown | MIT License |
# News
## v0.4.0
- Support Typst version 0.12
### Bug Fixes
- If a `TypstString` contains any characters that satisfy `!isprint`,
`show(::IO, ::TypstString)` now prints a format that preserves those characters.
- Account for a [Typst bug with single-letter strings in `math` mode](https://github.com/typst/typst/issues/274#issue-1639854848)
|
https://github.com/jomaway/typst-teacher-templates | https://raw.githubusercontent.com/jomaway/typst-teacher-templates/main/ttt-lists/README.md | markdown | MIT License | # ttt-lists
`ttt-lists` is a *template* to create class lists and belongs to the [typst-teacher-tools-collection](https://github.com/jomaway/typst-teacher-templates).
## Usage
Run this command inside your terminal to init a new list.
```sh
typst init @preview/ttt-lists my-student-list
```
This will scaffold the following folder structure.
```asci
my-student-list/
├─ students.csv
└─ students.typ
```
Edit the `students.csv` file or replace it with your own. Modify the `students.typ` to your liking or leave as is and then run `typst compile students.typ` to create a beautiful list.
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/text/font-04.typ | typst | Other | // Error: 23-27 unexpected argument
#set text(size: 10pt, 12pt)
|
https://github.com/tsar-boomba/resume | https://raw.githubusercontent.com/tsar-boomba/resume/main/template.typ | typst | #let resume(body) = {
set list(indent: 1em)
show list: set text(size: 0.92em)
set page(paper: "us-letter", margin: (x: 0.5in, y: 0.5in))
set text(size: 11pt, font: "New Computer Modern")
body
}
#let name_header(name) = {
set text(size: 2.25em)
[*#name*]
}
#let header(
name: "<NAME>",
phone: "123-456-7890",
email: "<EMAIL>",
linkedin: "linkedin.com/in/you",
site: "github.com/you",
) = {
align(center, block[
#name_header(name) \
#phone |
#link("mailto:" + email)[#email] |
#link("https://" + linkedin)[#linkedin] |
#link("https://" + site)[#site]
])
v(5pt)
}
#let resume_heading(txt) = {
show heading: set text(size: 0.92em, weight: "regular")
block[
= #smallcaps(txt)
#v(-4pt)
#line(length: 100%, stroke: 1pt + black)
]
}
#let edu_item(
name: "<NAME>",
degree: "B.S in Bullshit",
location: "Foo, BA",
date: "Aug. 1600 - May 1750",
..points,
) = {
set block(above: 0.5em, below: 0.75em)
pad(left: 0.5em, right: 0.5em, box[
#grid(columns: (3fr, 1fr), align(left)[
*#name* \
_#degree _
], align(right)[
#location \
_#date _
])
#list(..points)
])
}
#let exp_item(
name: "Sample Workplace",
role: "Worker",
date: "June 1837 - May 1845",
location: "Foo, BA",
..points,
) = {
set block(above: 0.5em, below: 0.75em)
pad(left: 0.5em, right: 0.5em, box[
#grid(columns: (3fr, 1fr), align(left)[
*#name* \
_#role _
], align(right)[
#date \
_#location _
])
#list(..points)
])
}
#let project_item(
name: "<NAME>",
skills: "Programming Language 1, Database3",
date: "May 1234 - June 4321",
..points,
) = {
set block(above: 0.5em, below: 0.75em)
pad(left: 0.5em, right: 0.5em, box[
*#name* | _#skills _ #h(1fr)
#list(..points)
])
}
#let skill_item(category: "Skills", skills: "Balling, Yoga, Valorant") = {
set block(above: 0.5em)
set text(size: 0.91em)
pad(left: 0.5em, right: 0.5em, block[*#category*: #skills])
} |
|
https://github.com/eneoli/kit-thesis-template | https://raw.githubusercontent.com/eneoli/kit-thesis-template/main/thesis.typ | typst | #import "@preview/outrageous:0.1.0"
#import "meta.typ": *
#set document(title: title, author: author, keywords: keywords)
#set page("a4",
background: if isDraft { rotate(24deg, text(150pt, fill: rgb("dedede66"))[*DRAFT*]) },
)
// Title page
#include "common/cover.typ"
#pagebreak()
#set page("a4", margin: 30mm)
#set text(size: 12pt, font: "Computer Modern")
// Address page
#include "address.typ"
#pagebreak()
// Statutory Declaration
#include "common/statutory-declaration.typ"
#pagebreak(to: "odd")
// Begin numbering
#set page(numbering: "i")
#counter(page).update(1)
// Abstract
#include "abstract.typ"
#pagebreak(to: "odd")
// Table of Contents
#show outline.entry: outrageous.show-entry.with(
..outrageous.presets.outrageous-toc,
font: "Computer Modern",
fill: (none, line(length: 100%, stroke: (thickness: 1pt, dash: "loosely-dotted"))),
)
#text(size: 21pt)[*Contents*]
#v(50pt)
#outline(title: none)
#pagebreak(to: "odd")
// Table of Figures
#show outline.entry: outrageous.show-entry.with(
..outrageous.presets.outrageous-figures,
font: "Computer Modern",
)
#text(size: 21pt)[*List of Figures*]
#v(50pt)
#outline(title: "", target: figure.where(kind: image))
#pagebreak(to: "odd")
// Begin Content
#show heading.where(level: 1): it => [
#pagebreak(weak: true)
#it
]
#set heading(numbering: "1.1")
#let ht-first = state("page-first-section", [])
#let ht-last = state("page-last-section", [])
#set page(
numbering: "1",
header: locate(
loc => [
#let text = ""
#let first-heading = query(heading.where(level: 1), loc).find(h => h.location().page() == loc.page())
#let last-heading = query(heading.where(level: 1), loc).rev().find(h => h.location().page() == loc.page())
#{
if not first-heading == none {
ht-first.update([
#counter(heading).at(first-heading.location()).at(0) #first-heading.body
])
ht-last.update([
#counter(heading).at(last-heading.location()).at(0) #last-heading.body
])
// if one or more headings on the page, use first heading
text = ht-last.display()
} else {
text = ht-last.display()
// no headings on the page, use last heading from variable
}
[
#stack(
spacing: 0.5em,
if calc.even(loc.page()) {
align(left)[#text]
} else {
align(right)[#text]
},
line(length: 100%)
)
]
}
]
)
)
#counter(page).update(1)
#include "content.typ"
|
|
https://github.com/Origami404/kaoyan-shuxueyi | https://raw.githubusercontent.com/Origami404/kaoyan-shuxueyi/main/微积分/07-级数.typ | typst | #import "../template.typ": sectionline, gray_table, colored
= 级数
== 常数项级数
#set list(marker: ([⤥], [›]))
主要标杆:
$
a_n = a p^n, quad
cases(
|q| < 1 quad => quad a/(1-q),
|q| >= 1 quad => quad infinity
)
$
$
a_n = 1 / n^p = n^(-p), quad
cases(
p > 1 quad => quad A,
p <= 1 quad => quad infinity
)
$
$
a_n = 1 / (n^p ln^q n), quad
cases(
p > 1 quad => quad A,
p = 1 and q > 1 quad => quad A,
p = 1 and q <= 1 quad => quad infinity,
p < 1 quad => quad infinity
)
$
条件收敛重要标杆:
$
a_n = (-1)^n / n^p, quad
cases(
p > 1 quad => quad "Abs",
0 < p <= 1 quad => quad "Cond",
p <= 0 quad => quad infinity
)
$
标准步骤:
- 通用检查
- 检查是否为简单形式 (主要标杆)
- 检查是否可以通过加括号后发散, 或者 $lim a_n != 0$ 证发散
- 若是正项级数
- 检查 $S_n$ 是否有界
- 检查 $a_n$ 是否可以等价为标杆的同阶无穷小
- 检查 $a_(n+1) / a_n$ 和 $root(n, a_n)$ 是否趋 $0$
- 若是交错级数
- 检查绝对值是否收敛 (绝对收敛)
- 检查 $u_n$ 是否单调减 且 趋于 $0$ (莱布尼茨判别法)
- 最后的最后
- 尝试使用夹逼定理
#pagebreak()
== 函数项级数
只考虑形如下面的函数项级数 (幂级数):
$
sum_(n=0) f_n (x) = sum_(n=0)^infinity a_n (x - c)^n
$
=== 求收敛域
幂级数必在 $|x - c| < R$ 内绝对收敛; 在 $|x - c| = R$ 时可绝对收, 可条件收, 也可不收; 在外边则一定不收敛. $R$ 可通过下面两个公式求出:
$
1/R = lim |(f_(n+1)(x)) / (f_n (x))| = lim root(n, |a_n|)
$
在求出 $R$ 后, 将 $|x - c| = R$ 的两个边界点代回去级数, 用判断常数项级数收敛的方式判断是否条件/绝对收敛, 然后得到区间开闭.
若已知 $x_0$ 使得级数条件收敛, 那 $|x_0 - c|$ 必定为收敛边界 $R$.
=== 求函数的展开式
等价于直接泰勒展开. 如果函数比较复杂, 可以拆开成若干简单函数的和再展开. 值得额外记住的展开式是 (代入 $-x$ 也成立):
$
1/(1 - x) = sum x^n
$
=== 求展开式的和函数
只有一眼是某函数泰勒展开的式子, 或者是 $sum x^n$, 才能得到和函数. 任何函数项级数要求和函数都要尝试把和式通过加减乘除, 微分积分, 拆成 $sum x^n$.
级数微分定理可以从 $a_n$ 里乘走一个 $1/n$:
$
f'(x) = sum (a_n x^n)' = sum (a_n n) x^(n-1)
$
级数积分定理可以从 $a_n$ 里乘走一个 $(n+1)$:
$
integral_0^t f(x) dif x = sum integral_0^t (a_n x^n) dif x = sum (a^n / (n+1)) t^(n+1)
$
用积分微分处理完的级数, 求出和函数后, 再微分积分回去即可得到所求函数. 注意函数是有*定义域*的, 和函数的定义域就是级数的*收敛区间*, 要顺带求出这个.
#pagebreak()
|
|
https://github.com/Mc-Zen/quill | https://raw.githubusercontent.com/Mc-Zen/quill/main/src/verifications.typ | typst | MIT License | #let plural-s(n) = if n == 1 { "" } else { "s" }
#let verify-controlled-gate(gate, x, y, circuit-rows, circuit-cols) = {
let multi = gate.multi
if y + multi.target >= circuit-rows or y + multi.target < 0 {
assert(false, message:
"A controlled gate starting at qubit " + str(y) +
" with relative target " + str(multi.target) +
" exceeds the circuit which has only " + str(circuit-rows) +
" qubit" + plural-s(circuit-rows)
)
}
}
#let verify-mqgate(gate, x, y, circuit-rows, circuit-cols) = {
let nq = gate.multi.num-qubits
if y + nq - 1 >= circuit-rows {
assert(false, message:
"A " + str(nq) + "-qubit gate starting at qubit " +
str(y) + " exceeds the circuit which has only " +
str(circuit-rows) + " qubits"
)
}
}
#let verify-slice(slice, x, y, circuit-rows, circuit-cols) = {
if slice.wires < 0 {
assert(false, message: "`slice`: The number of wires needs to be > 0 (is " + str(slice.wires) + ")")
}
if y + slice.wires > circuit-rows {
assert(false, message:
"A `slice` starting at qubit " + str(y) +
" spanning " + str(slice.wires) +
" qubit" + plural-s(slice.wires) +
" exceeds the circuit which has only " +
str(circuit-rows) + " qubit" + plural-s(circuit-rows)
)
}
}
#let verify-gategroup(gategroup, x, y, circuit-rows, circuit-cols) = {
if gategroup.wires <= 0 {
assert(false, message: "`gategroup`: The number of wires needs to be > 0 (is " + str(gategroup.wires) + ")")
}
if gategroup.steps <= 0 {
assert(false, message: "`gategroup`: The number of steps needs to be > 0 (is " + str(gategroup.steps) + ")")
}
if y + gategroup.wires > circuit-rows {
assert(false, message:
"A `gategroup` at qubit " + str(y) +
" spanning " + str(gategroup.wires) +
" qubit" + plural-s(gategroup.wires) +
" exceeds the circuit which has only " +
str(circuit-rows) + " qubit" + plural-s(circuit-rows)
)
}
if x + gategroup.steps > circuit-cols {
assert(false, message:
"A `gategroup` at column " + str(x) +
" spanning " + str(gategroup.steps) +
" column" + plural-s(gategroup.steps) +
" exceeds the circuit which has only " +
str(circuit-cols) + " column" + plural-s(circuit-cols)
)
}
}
#let verify-annotation-content(annotation-content) = {
let content-type = type(annotation-content)
assert(content-type in (content, str, dictionary), message: "`annotate`: Unsupported callback return type `" + str(content-type) + "` (can be `dictionary` or `content`")
if content-type == dictionary {
assert("content" in annotation-content, message: "`annotate`: Missing field `content` in annotation. If the callback returns a dictionary, it must contain the key `content` and may specify coordinates with `dx` and `dy`.")
if "z" in annotation-content {
let z = annotation-content.z
assert(z in ("below", "above"), message: "`annotate`: The parameter `z` can take the values `\"above\"` and `\"below\"`")
}
}
}
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/cheda-seu-thesis/0.2.0/seu-thesis/utils/set-degree.typ | typst | Apache License 2.0 | #import "numbering-tools.typ": chinese-numbering
#import "packages.typ": show-cn-fakebold
#import "show-heading.typ": show-heading
#import "figure-and-ref.typ": show-figure, show-ref, set-math-numbering, show-math-equation-degree
#import "bilingual-bibliography.typ": show-bibliography
#import "fonts.typ": 字体, 字号
#let set-degree(always-new-page: true, bilingual-bib: true, doc) = {
set page(paper: "a4", margin: (top: 2cm, bottom: 2cm, left:2cm, right: 2cm))
set text(font: 字体.宋体, size: 字号.小四, weight: "regular", lang: "zh")
set par(first-line-indent: 2em, leading: 9.6pt, justify: true)
show par: set block(spacing: 9.6pt)
show: show-cn-fakebold
show: show-bibliography.with(bilingual: bilingual-bib)
show heading: show-heading.with(
always-new-page: always-new-page,
heading-top-margin: (1cm, 0.1cm, 0.05cm),
heading-bottom-margin: (1cm, 0cm, 0cm),
heading-text: (
(font: 字体.黑体, size: 字号.三号, weight: "regular"),
(font: 字体.宋体, size: 字号.四号, weight: "bold"),
(font: 字体.黑体, size: 字号.小四, weight: "regular"),
),
)
show figure: show-figure.with(
main-body-table-numbering: "1.1",
main-body-image-numbering: "1-1", // 其他也会视为 image
appendix-table-numbering: "A-1",
appendix-image-numbering: "A-1", // 其他也会视为 image
)
show ref: show-ref.with(
main-body-table-numbering: "1.1",
main-body-image-numbering: "1-1", // 其他也会视为 image
appendix-table-numbering: "A-1",
appendix-image-numbering: "A-1", // 其他也会视为 image
)
set math.equation(numbering: set-math-numbering.with(
main-body-numbering: "(1.1)",
appendix-numbering: "(A-1)",
))
show math.equation: show-math-equation-degree
set heading(numbering: chinese-numbering)
doc
} |
https://github.com/SillyFreak/typst-packages-old | https://raw.githubusercontent.com/SillyFreak/typst-packages-old/main/tidy-types/src/lib.typ | typst | MIT License | #let lang = "tidy-type"
#let _type = type
/// Wraps the given string, a type name, into a ```typc raw``` element with the language #raw(repr(tt.lang), lang: "typ").
/// By itself, that doesn't do anything, but it allows styling that text using a ```typc show``` rule; see #link(<intro>)[the introduction].
///
/// #example(`tt.type("foo")`)
///
/// - text (string): the type name
/// -> content
#let type(text) = raw(text, lang: "tidy-type")
// Takes either or both of the named parameters `type` or `value`.
// If both are given, this checks that the example value is actually of that type,
// then a tidy type with that type's name (as given by `str(type)`) is returned.
#let _builtin_type(..args) = {
assert(args.pos().len() == 0)
let args = args.named()
let t = if args.len() == 1 and "value" in args {
let (value,) = args
let type = _type(value)
type
} else if args.len() == 1 and "type" in args {
let (type,) = args
type
} else if args.len() == 2 and "value" in args and "type" in args {
let (value, type) = args
let actual-type = _type(value)
assert(actual-type == type, message: str(actual-type + " != " + str(type)))
actual-type
} else {
panic("wrong arguments given")
}
type(str(t))
}
// General types
#let t-none = _builtin_type(type: "none", value: none)
#let bool = _builtin_type(type: bool, value: true)
#let int = _builtin_type(type: int, value: 1)
#let float = _builtin_type(type: float, value: 1.1)
#let str = _builtin_type(type: str, value: "")
#let bytes = _builtin_type(type: bytes, value: bytes(""))
#let array = _builtin_type(type: array, value: ())
#let dictionary = _builtin_type(type: dictionary, value: (:))
#let t-type = _builtin_type(type: _type, value: _type)
#let function = _builtin_type(type: function, value: () => none)
// Misc Typst-specific types
#let t-auto = _builtin_type(type: "auto", value: auto)
#let datetime = _builtin_type(type: datetime, value: datetime(year: 1, month: 1, day: 1))
#let duration = _builtin_type(type: duration, value: duration(hours: 1))
#let regex = _builtin_type(type: regex, value: regex(""))
#let version = _builtin_type(type: version, value: version())
#let content = _builtin_type(type: content, value: [])
#let symbol = _builtin_type(type: symbol, value: sym.arrow)
// Layout & style quantities
#let length = _builtin_type(type: length, value: 1pt)
#let ratio = _builtin_type(type: ratio, value: 1%)
#let relative = _builtin_type(type: relative, value: 1pt + 1%)
#let fraction = _builtin_type(type: fraction, value: 1fr)
#let angle = _builtin_type(type: angle, value: 1deg)
#let color = _builtin_type(type: color, value: red)
#let stroke = _builtin_type(type: stroke, value: 2pt + red)
#let alignment = _builtin_type(type: alignment, value: center)
// Typst-specific meta stuff
#let location = locate(l =>
_builtin_type( type: location, value: l)
)
#let styles = style(s =>
_builtin_type( type: "styles", value: s)
)
#let label = _builtin_type(type: label, value: <a>)
#let selector = _builtin_type(type: selector, value: heading.where())
#let module = _builtin_type(type: module, /* value: import("...") */)
#let plugin = _builtin_type(type: plugin, /* value: plugin("...") */)
#let arguments = _builtin_type(type: arguments, value: ((..args) => args)())
/// This is not a real type, but it can be used as the last parameter in @@func() to indicate that
/// the function uses an argument sink to take additional positional or named parameters:
///
/// #example(```
/// tt.func(tt.int, tt.sink, tt.int)
/// ```)
///
/// -> content
#let sink = [ ...]
/// A function for rendering an array type including element type information:
///
/// #example(`tt.arr(tt.int)`)
///
/// This representation uses the array spread syntax to convey
/// that there may be any number of #tt.int elements in the array.
///
/// The name of this function is `arr` because `tt.array` (#tt.array) exists already.
///
/// - element (content): the element type of the array
/// -> content
#let arr(element) = [`(`#element`,`#sink`)`]
/// A function for rendering a dictionary type including element type information:
///
/// #example(`tt.dict(tt.int)`)
///
/// This representation uses the implicit #tt.str key type to convey that there may be any number of mappings in the dictionary.
///
/// The name of this function is `dict` because `tt.dictionary` (#tt.dictionary) exists already.
///
/// - value (content): the value type of the dictionary
/// -> content
#let dict(value) = [`(`#str`:`#value`,`#sink`)`]
/// A function for rendering an array type containing exactly the given elements:
///
/// #example(`tt.tuple(tt.str, tt.int)`)
///
/// - ..elements (content): the tuple element types given as positional parameters
/// -> content
#let tuple(..elements) = {
if elements.named().len() != 0 {
panic("tidy-types.tuple() takes only positional parameters")
}
let elements = elements.pos()
[`(`#elements.join(`,`)`)`]
}
/// A function for rendering a dictionary type containing exactly the given pairs:
///
/// #example(`tt.object(a: tt.str, b: tt.int)`)
///
/// - ..pairs (content): the object attribute name/type pairs given as named parameters
/// -> content
#let object(..pairs) = {
if pairs.pos().len() != 0 {
panic("tidy-types.object() takes only named parameters")
}
let elements = pairs.named().pairs()
.map(((name, type)) => [#raw(name)`:`#type])
[`(`#elements.join(`,`)`)`]
}
/// A function for rendering a function type taking the given parameters and having the given return type:
///
/// #example(```
/// tt.func(
/// tt.str, opt: tt.bool,
/// tt.int)
/// ```)
///
/// Note that the relative order of positional and named parameters is not preserved; all named parameters come after all positional parameters. It makes sense to, as a convention, put the result type after any named parameters. There is one exception to this rule though: if the last positional parameter is @@sink, it will be put after any named arguments:
///
/// #example(```
/// tt.func(
/// tt.str, opt: tt.bool, tt.sink,
/// tt.int)
/// ```)
///
/// The name of this function is `func` because `tt.function` (#tt.function) exists already.
///
/// - ..args (content): the function parameter types and return type (last positional argument) of the function
/// -> content
#let func(..args) = {
let positional-params = args.pos()
let result = positional-params.pop()
let named-params = args.named()
let with-sink = if positional-params.last() == sink {
let _ = positional-params.pop()
true
} else {
false
}
let params = (
..positional-params,
..named-params.pairs().map(((name, type)) => [#raw(name)`:`#type]),
..if with-sink { (sink,) }
)
[`(`#params.join(`,`)`)`#sym.arrow.r#result]
}
/// A function for rendering a choice between the given types:
///
/// #example(`tt.either(tt.str, tt.int)`)
///
/// - ..options (content): the possible types given as positional parameters
/// -> content
#let either(..options) = {
if options.named().len() != 0 {
panic("tidy-types.either() takes only positional parameters")
}
let options = options.pos()
[#options.join(`|`)]
}
/// A function for rendering a parameter/element that may be omitted
///
/// #example(```
/// tt.optional(tt.str)
/// parbreak()
/// tt.func(tt.optional(tt.str), tt.str)
/// ```)
///
/// - type (content): the tuple element types given as positional parameters
/// -> content
#let optional(type) = {
[#type`?`]
}
/// Surrounds a type with parentheses for grouping
///
/// #example(```
/// tt.group(tt.str)
/// ```)
///
/// - type (content): the type to delimit using parentheses
/// -> content
#let group(type) = {
[`(`#type`)`]
}
|
https://github.com/Robotechnic/iridis | https://raw.githubusercontent.com/Robotechnic/iridis/master/internals.typ | typst | MIT License | #let iridis-palette = (
color.rgb("#7D00E5"),
color.rgb("#FF0000"),
color.rgb("#0094FF"),
color.rgb("#FF6A00"),
color.rgb("#00FF00"),
color.rgb("#0041FF"),
color.rgb("#EDCC14"),
)
#let need-regex-escape = (c) => {
(c == "(") or (c == ")") or (c == "[") or (c == "]") or (c == "{") or (c == "}") or (c == "\\") or (c == ".") or (c == "*") or (c == "+") or (c == "?") or (c == "^") or (c == "$") or (c == "|") or (c == "-")
}
#let build-regex = (chars) => {
chars.fold("", (acc, c) => {
acc + (if need-regex-escape(c) { "\\" } else {""}) + c + "|"
}).slice(0, -1)
}
#let copy-fields(equation, exclude:()) = {
let fields = (:)
for (k,f) in equation.fields() {
if k not in exclude {
fields.insert(k, f)
}
}
fields
}
#let colorize-math(equation, i : 0) = {
if type(equation) != content {
return equation
}
if equation.func() == math.equation {
// this is a hack to mark the equation as colored so that we don't colorize it again
if equation.body.has("children") and equation.body.children.at(0) == [#sym.space.hair] {
equation
} else {
math.equation([#sym.space.hair] + colorize-math(equation.body, i:i), block: equation.block)
}
} else if equation.func() == math.frac {
math.frac(colorize-math(equation.num, i:i), colorize-math(equation.denom, i:i), ..copy-fields(equation, exclude:("num", "denom")))
} else if equation.func() == math.accent {
math.accent(colorize-math(equation.base, i:i), equation.accent, size: equation.size)
} else if equation.func() == math.attach {
math.attach(
colorize-math(equation.base, i:i),
..copy-fields(equation, exclude:("base",))
)
} else if equation.func() == math.cases {
math.cases(..copy-fields(equation, exclude:("children")), ..equation.children.map(child => {
colorize-math(child, i:i)
}))
} else if equation.func() == math.vec {context {
let color = text.fill
show: text.with(fill: iridis-palette.at(calc.rem(i, iridis-palette.len())))
math.vec(
..copy-fields(equation, exclude:("children")),
..equation.children.map(child => {
show: text.with(fill: color)
colorize-math(child, i:i + 1)
}),
)
}} else if equation.func() == math.mat { context {
let color = text.fill
show: text.with(fill: iridis-palette.at(calc.rem(i, iridis-palette.len())))
math.mat(
..copy-fields(equation, exclude:("rows")),
..equation.rows.map(row => row.map(cell => {
show: text.with(fill: color)
colorize-math(cell, i:i + 1)
})),
)
show: text.with(fill: color)
} } else if equation.has("body") {
equation.func()(colorize-math(equation.body, i:i), ..copy-fields(equation, exclude:("body",)))
} else if equation.has("children") {
let colorisation = equation.children.fold((i, ()), ((i, acc), child) => {
if child == [(] {
acc.push([
#show: text.with(fill: iridis-palette.at(calc.rem(i, iridis-palette.len())))
#equation.func()(([(],))])
(i + 1, acc)
} else if child == [)] {
acc.push([
#show: text.with(fill: iridis-palette.at(calc.rem(i - 1, iridis-palette.len())))
#equation.func()(([)],))])
(i - 1, acc)
} else {
acc.push(colorize-math(child, i:i))
(i, acc)
}
})
equation.func()(..copy-fields(equation, exclude:("children")), colorisation.at(1))
} else if equation.has("child") { // styles
equation.func()(colorize-math(equation.child, i:i), equation.styles)
} else {
equation
}
}
#let colorize-code(counter, opening-parenthesis, closing-parenthesis, palette) = (body) => context {
show regex(build-regex(opening-parenthesis)) : body => context {
show: text.with(fill: palette.at(calc.rem(counter.get(), palette.len())))
body
counter.update(n => n + 1)
}
show regex(build-regex(closing-parenthesis)) : body => context {
counter.update(n => n - 1)
text(fill: palette.at(calc.rem(counter.get() - 1, palette.len())), body)
}
body
} |
https://github.com/VisualFP/docs | https://raw.githubusercontent.com/VisualFP/docs/main/SA/design_concept/content/design/design_iteration_2_conclusion.typ | typst | = Conclusion
During the first iteration, three very different approaches were explored.
Valuable feedback was gained on their advantages and shortcomings through a
survey. Prof. Dr. <NAME> proposed a new design concept in the second
iteration based on that feedback and some new ideas.
This new concept has the potential to provide beginners with more guidance
during function composition than the previous concepts, which is why it is implemented in a PoC.
|
|
https://github.com/duskmoon314/THU_AMA | https://raw.githubusercontent.com/duskmoon314/THU_AMA/main/docs/ch2/0-群论.typ | typst | Creative Commons Attribution 4.0 International | #import "/book.typ": book-page, cross-link
#show: book-page.with(title: "群论")
= 群论
- #cross-link("/docs/ch2/1-概念与例子.typ", "概念与例子")
- #cross-link("/docs/ch2/2-内部结构.typ", "内部结构")
- #cross-link("/docs/ch2/3-外部联系.typ", "外部联系")
- #cross-link("/docs/ch2/4-群在集合上的作用.typ", "群在集合上的作用")
- #cross-link("/docs/ch2/5-群的应用.typ", "群的应用") |
https://github.com/yan-aint-nickname/uni | https://raw.githubusercontent.com/yan-aint-nickname/uni/main/oop-matrix-cli/main.typ | typst | MIT License | #import "template.typ": *
#import "@preview/codelst:2.0.1": sourcecode, sourcefile
#import "diagrams/main.typ" as main_algo
#import "diagrams/user_input.typ" as input_algo
#import "diagrams/fill_matrix.typ" as fill_algo
#import "diagrams/count_values.typ" as count_algo
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#show: project.with(
title: "Объектно-ориентированное программирование. КМ-2. Разработка простейших консольных программ с использованием ООП",
authors: (
"<NAME>. <NAME>",
),
)
#show figure: set block(breakable: true)
= Задание
Для каждой строки матрицы $A$ ($5 times 8$) "определить число элементов, больших $D$, а для каждой строки матрицы $B$ ($7 times 5$) "определить число элементов, больших $Q$; $D, Q$ — заданные значения.
== Комментарии
- Полный код программы находится в репозитории https://github.com/yan-aint-nickname/uni
- Для компиляции я использовал https://ziglang.org/
- Библиотека для тестирования https://github.com/sheredom/utest.h/
== Код программы
=== Заголовочный файл
#figure(
caption: "Заголовочный файл tool.hh",
sourcefile(
file: "tool.hh",
read("tool.hh"),
)
)
=== Реализация
#figure(
caption: "Релазиация методов, алгоритма tool.cc",
sourcefile(
file: "tool.cc",
read("tool.cc"),
)
)
#figure(
caption: "Точка входа программы main.cc",
sourcefile(
file: "main.cc",
read("main.cc"),
)
)
#pagebreak()
== Модульное тестирование
#figure(
caption: "Модульное тестирования с использованием библиотеки utest.h",
sourcefile(
file: "tool_test.cc",
read("tool_test.cc"),
)
)
#pagebreak()
== Блок-схемы
#figure(
main_algo.chart_main,
caption: "Схема работы всей программы",
)
#figure(
input_algo.user_input,
caption: "Схема работы программы для получения пользовательского ввода",
)
#figure(
fill_algo.fill_matrix,
caption: "Схема работы программы для заполнения матрицы",
)
#figure(
count_algo.count_values,
caption: "Схема работы программы для подсчета элементов больше заданных значений",
)
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/layout/enum-align_03.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Number align option should not be affected by the context.
#set align(center)
#set enum(number-align: start)
4. c
8. d
16. e\ f
2. f\ g
32. g
64. h
|
https://github.com/frectonz/the-pg-book | https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/161.%20corpdev.html.typ | typst | corpdev.html
Don't Talk to Corp Dev
January 2015Corporate Development, aka corp dev, is the group within companies
that buys other companies. If you're talking to someone from corp
dev, that's why, whether you realize it yet or not.It's usually a mistake to talk to corp dev unless (a) you want to
sell your company right now and (b) you're sufficiently likely to
get an offer at an acceptable price. In practice that means startups
should only talk to corp dev when they're either doing really well
or really badly. If you're doing really badly, meaning the company
is about to die, you may as well talk to them, because you have
nothing to lose. And if you're doing really well, you can safely
talk to them, because you both know the price will have to be high,
and if they show the slightest sign of wasting your time, you'll
be confident enough to tell them to get lost.The danger is to companies in the middle. Particularly to young
companies that are growing fast, but haven't been doing it for long
enough to have grown big yet. It's usually a mistake for a promising
company less than a year old even to talk to corp dev.But it's a mistake founders constantly make. When someone from
corp dev wants to meet, the founders tell themselves they should
at least find out what they want. Besides, they don't want to
offend Big Company by refusing to meet.Well, I'll tell you what they want. They want to talk about buying
you. That's what the title "corp dev" means. So before agreeing
to meet with someone from corp dev, ask yourselves, "Do we want to
sell the company right now?" And if the answer is no, tell them
"Sorry, but we're focusing on growing the company." They won't be
offended. And certainly the founders of Big Company won't be
offended. If anything they'll think more highly of you. You'll
remind them of themselves. They didn't sell either; that's why
they're in a position now to buy other companies.
[1]Most founders who get contacted by corp dev already know what it
means. And yet even when they know what corp dev does and know
they don't want to sell, they take the meeting. Why do they do it?
The same mix of denial and wishful thinking that underlies most
mistakes founders make. It's flattering to talk to someone who wants
to buy you. And who knows, maybe their offer will be surprisingly
high. You should at least see what it is, right?No. If they were going to send you an offer immediately by email,
sure, you might as well open it. But that is not how conversations
with corp dev work. If you get an offer at all, it will be at the
end of a long and unbelievably distracting process. And if the
offer is surprising, it will be surprisingly low.Distractions are the thing you can least afford in a startup. And
conversations with corp dev are the worst sort of distraction,
because as well as consuming your attention they undermine your
morale. One of the tricks to surviving a grueling process is not
to stop and think how tired you are. Instead you get into a sort
of flow.
[2]
Imagine what it would do to you if at mile 20 of a
marathon, someone ran up beside you and said "You must feel really
tired. Would you like to stop and take a rest?" Conversations
with corp dev are like that but worse, because the suggestion of
stopping gets combined in your mind with the imaginary high price
you think they'll offer.And then you're really in trouble. If they can, corp dev people
like to turn the tables on you. They like to get you to the point
where you're trying to convince them to buy instead of them trying
to convince you to sell. And surprisingly often they succeed.This is a very slippery slope, greased with some of the most powerful
forces that can work on founders' minds, and attended by an experienced
professional whose full time job is to push you down it.Their tactics in pushing you down that slope are usually fairly
brutal. Corp dev people's whole job is to buy companies, and they
don't even get to choose which. The only way their performance is
measured is by how cheaply they can buy you, and the more ambitious
ones will stop at nothing to achieve that. For example, they'll
almost always start with a lowball offer, just to see if you'll
take it. Even if you don't, a low initial offer will demoralize you
and make you easier to manipulate.And that is the most innocent of their tactics. Just wait till
you've agreed on a price and think you have a done deal, and then
they come back and say their boss has vetoed the deal and won't do
it for more than half the agreed upon price. Happens all the time.
If you think investors can behave badly, it's nothing compared to
what corp dev people can do. Even corp dev people at companies
that are otherwise benevolent.I remember once complaining to a
friend at Google about some nasty trick their corp dev people had
pulled on a YC startup."What happened to Don't be Evil?" I asked."I don't think corp dev got the memo," he replied.The tactics you encounter in M&A conversations can be like nothing
you've experienced in the otherwise comparatively
upstanding world
of Silicon Valley. It's as if a chunk of genetic material from the
old-fashioned robber baron business world got incorporated into the
startup world.
[3]The simplest way to protect yourself is to use the trick that <NAME>, whose grandfather was an alcoholic, used to protect
himself from becoming one. He once told a Sunday school class
Boys, do you know why I never became a drunkard? Because I never
took the first drink.
Do you want to sell your company right now? Not eventually, right
now. If not, just don't take the first meeting. They won't be
offended. And you in turn will be guaranteed to be spared one of
the worst experiences that can happen to a startup.If you do want to sell, there's another set of
techniques
for doing
that. But the biggest mistake founders make in dealing with corp
dev is not doing a bad job of talking to them when they're ready
to, but talking to them before they are. So if you remember only
the title of this essay, you already know most of what you need to
know about M&A in the first year.Notes[1]
I'm not saying you should never sell. I'm saying you should
be clear in your own mind about whether you want to sell or not,
and not be led by manipulation or wishful thinking into trying to
sell earlier than you otherwise would have.[2]
In a startup, as in most competitive sports, the task at hand
almost does this for you; you're too busy to feel tired. But when
you lose that protection, e.g. at the final whistle, the fatigue
hits you like a wave. To talk to corp dev is to let yourself feel
it mid-game.[3]
To be fair, the apparent misdeeds of corp dev people are magnified
by the fact that they function as the face of a large organization
that often doesn't know its own mind. Acquirers can be surprisingly
indecisive about acquisitions, and their flakiness is indistinguishable
from dishonesty by the time it filters down to you.Thanks to <NAME>, <NAME>, <NAME>, and <NAME> for reading drafts of this.
|
|
https://github.com/MALossov/YunMo_Doc | https://raw.githubusercontent.com/MALossov/YunMo_Doc/main/contents/3FinishPoint.typ | typst | Apache License 2.0 | = 完成情况及性能参数
我们将赛题对于性能指标的基础和扩展要求、结合我们自身对于项目的理解分列的条目进行整合,并且列表见@tb_is_ok:
#figure(
table(columns:(auto,auto,40pt,auto),
align: horizon,
[*项目名称*],[*实现情况*],[*是否完成*],[*指标详情*],
[*使用高云FPGA板卡*],[使用板卡为:_#link("https://wiki.sipeed.com/hardware/zh/tang/tang-primer-20k/primer-20k.html")[Tang Primer 20K]_],[$checkmark$],[*高云FPGA* ( _#link("http://www.gowinsemi.com.cn/prod_view.aspx?TypeId=10&FId=t3:10:3&Id=167#GW2A")[GW2A-LV18PG256C8/I7]_)],
[*实现摄像头视频传输功能*],[使用MIPI接口实现摄像头并能对应不同场景进行寄存器配置],[$checkmark$],[*CMOS芯片* (_OV5640_)],
[*网络传输能力*],[使用底板板载网卡: 实现百兆以太网功能],[$checkmark$],[*百兆网* (使用芯片 _RTL8201F_)],
[*理论视频传输分辨率*],[综合考虑帧率,使用标清等清晰度传输],[$circle$],[图像尺寸为 *$640 times 480$*],
[*视频传输帧率*],[为保证百兆正常观看,使折率设置为较为流畅的帧率],[$checkmark$],[帧率为 *$eq.gt 19 f p s$*],
[*视频编码方式*],[由于加入特殊图像处理后不足,使用标准的5-6-5 _RGB_ 编码方式],[$times$],[*原始编码* 但抗干扰能力强],
[*多路传输*],[可通过完整的UDP在两块板卡上设置不同IP实现],[$checkmark$],[*一主多从实现*],
[*图像增强功能*],[提供二值化、简单目标识别 边缘识别 滤波处理等功能],[$checkmark$],[*提供多种*],
[*可扩展性*],[可定制画幅 空余大量IO 有通用视频处理接口模块],[$circle$],[*资源足够,未做尝试*],
),
caption: "关键性能指标")<tb_is_ok> |
https://github.com/WinstonMDP/math | https://raw.githubusercontent.com/WinstonMDP/math/main/knowledge/equivalences.typ | typst | #import "../cfg.typ": *
#show: cfg
= Equivalences
A relation is an equivalence $:=$ it's a symmetric preorder
An equivalence class of an element $x := {y | y tilde x}$
A quotient set $:=$ a set of the equivalence classes
|
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/text/raw_04.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Lots of backticks inside.
````
```backticks```
````
|
https://github.com/yonatanmgr/university-notes | https://raw.githubusercontent.com/yonatanmgr/university-notes/main/0366-%5BMath%5D/globals/graph.typ | typst | #import "@preview/cetz:0.2.0"
#let graph(style: "school-book", w: 2, h: 2, start: -2, end: 2, functions: (), v-asymptotes: (), h-asymptotes: (), additionals: ()) = {
text(lang: "en", dir: ltr)[
#show math.equation: block.with(fill: white, inset: 1pt)
#cetz.canvas({
import cetz.plot
plot.plot(
axis-style: style, size: (w,h), x-tick-step: 1, y-tick-step: 1, grid: true, {
for f in functions { cetz.plot.add(domain: (start, end), f, samples: 2500) }
if v-asymptotes.len() > 0 {
cetz.plot.add-vline(..v-asymptotes, style: (stroke: (dash: "dashed", paint: rgb("#00000075"))))
}
if h-asymptotes.len() > 0 {
cetz.plot.add-hline(..h-asymptotes, style: (stroke: (dash: "dashed", paint: rgb("#00000075"))))
}
if additionals.len() > 0 {
for f in additionals { cetz.plot.add(domain: (start, end), f, samples: 2500, style: (stroke: (dash: "dashed", paint: rgb("#00000075")))) }
}
}
)
})
]
}
|
|
https://github.com/LDemetrios/Typst4k | https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/scripting/arguments.typ | typst | // Test arguments.
--- arguments-at ---
#let args = arguments(0, 1, a: 2, 3)
#test(args.at(0), 0)
#test(args.at(1), 1)
#test(args.at(2), 3)
#test(args.at("a"), 2)
--- arguments-at-invalid-index ---
#let args = arguments(0, 1, a: 2, 3)
// Error: 2-12 arguments do not contain key 4 and no default value was specified
#args.at(4)
--- arguments-at-invalid-name ---
#let args = arguments(0, 1, a: 2, 3)
// Error: 2-14 arguments do not contain key "b" and no default value was specified
#args.at("b")
|
|
https://github.com/ysthakur/PHYS121-Notes | https://raw.githubusercontent.com/ysthakur/PHYS121-Notes/main/main.typ | typst | MIT License | #import "template.typ": *
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#show: project.with(
title: "PHYS121 Notes",
authors: (
"<NAME>",
),
)
#outline(indent: auto)
#set heading(numbering: "1.1.")
#pagebreak()
#include "Notes/Ch01.typ"
#pagebreak()
#include "Notes/Ch02.typ"
#pagebreak()
#include "Notes/Ch03.typ"
#pagebreak()
#include "Notes/Ch04.typ"
#pagebreak()
#include "Notes/Ch05.typ"
#pagebreak()
#include "Notes/Ch06.typ"
#pagebreak()
#include "Notes/Ch07.typ"
#pagebreak()
#include "Notes/Ch08.typ"
#pagebreak()
#include "Notes/Ch09.typ"
#pagebreak()
#include "Notes/Ch10.typ"
#pagebreak()
#include "Notes/Ch11.typ"
#pagebreak()
#include "Notes/Ch12.typ"
|
https://github.com/felsenhower/kbs-typst | https://raw.githubusercontent.com/felsenhower/kbs-typst/master/hamburg.typ | typst | MIT License | #import "typst-modules/typst-slides/slides.typ": *
#let slides-hamburg-theme() = data => {
let color = rgb("#cc0000")
let title-slide = {
align(center + horizon)[
#show block: set text(white)
#block(
width: 60%,
fill: color,
// stroke: ( y: 1mm + color ),
inset: 1em,
breakable: false,
[
#text(1.5em)[*#data.title*] \
#{
if data.subtitle != none {
parbreak()
text(1.0em)[#data.subtitle]
}
}
]
)
#set text(size: .8em)
#grid(
columns: (1fr,) * calc.min(data.authors.len(), 3),
column-gutter: 1em,
row-gutter: 1em,
..data.authors
)
#v(1em)
#data.date
]
}
let default(slide-info, bodies) = {
if bodies.len() != 1 {
panic("default variant of default theme only supports one body per slide")
}
let body = bodies.first()
let decoration(position, body) = {
let border = 1mm + color
/*
let strokes = (
header: ( bottom: border ),
footer: ( top: border )
)
*/
show block: set text(white)
block(
fill: color,
// stroke: strokes.at(position),
width: 100%,
inset: .3em,
text(.5em, body)
)
}
// header
decoration("header", align(center)[#section.display()])
if "title" in slide-info {
block(
width: 100%, inset: (x: 2em), breakable: false,
outset: 0em,
heading(level: 1, slide-info.title)
)
}
v(1fr)
block(
width: 100%, inset: (x: 2em), breakable: false, outset: 0em,
body
)
v(2fr)
// footer
decoration("footer")[
#grid(
columns: (1fr, auto, 1fr),
align(left)[#data.short-authors],
align(center)[#data.short-title],
align(right)[#logical-slide.display("1") / #locate(loc => {
logical-slide.final(loc).first()
})]
)
]
}
/*let wake-up(slide-info, bodies) = {
if bodies.len() != 1 {
panic("wake up variant of default theme only supports one body per slide")
}
let body = bodies.first()
block(
width: 100%, height: 100%, inset: 2em, breakable: false, outset: 0em,
fill: color,
text(size: 1.5em, fill: white, {v(1fr); body; v(1fr)})
)
}*/
(
title-slide: title-slide,
variants: ( "default": default, /*"wake up": wake-up,*/ ),
)
}
|
https://github.com/Error-418-SWE/Documenti | https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/3%20-%20PB/Documentazione%20interna/Norme%20di%20Progetto/Norme%20di%20Progetto.typ | typst | #import "/template.typ": *
#show: project.with(
title: "Norme di Progetto",
subTitle: "Norme, processi e disciplina",
authors: (
"<NAME>",
"<NAME>",
"<NAME>"
),
showLog: true,
);
= Introduzione
== Scopo del documento
Questo documento contiene le regole del _way of working_ che disciplinano le attività di ogni membro del gruppo #err418. Queste regole mirano a garantire coerenza, uniformità ed efficacia nel processo collaborativo, promuovendo un ambiente di lavoro strutturato ed efficiente.
L'approccio adottato per la redazione di questo documento è di natura incrementale. Ciò significa che il testo è soggetto ad aggiornamenti e revisioni continue al fine di integrare progressivamente le nuove norme, le _best practices_ e i cambiamenti che emergono nel corso dello sviluppo del progetto. Questa flessibilità consente al gruppo di adattarsi prontamente alle dinamiche di lavoro e alle esigenze specifiche del contesto, garantendo un documento sempre allineato alle necessità attuali del gruppo.
== Scopo del progetto
Il capitolato C5, denominato _WMS3: Warehouse Management 3D_ e aggiudicato al gruppo, ha come obiettivo la realizzazione di un sistema di gestione di magazzino in tre dimensioni. L'applicazione sviluppata consentirà all'utente di accedere a un ambiente virtuale tridimensionale, dove potrà navigare all'interno di un magazzino e visualizzare gli oggetti presenti nelle scaffalature.
L'utente avrà la possibilità di cercare specifici prodotti all'interno del magazzino, sfruttando la visualizzazione 3D per individuare rapidamente la posizione degli articoli desiderati, potrà modificare l'assetto del magazzino e inviare una notifica verso l'esterno in caso ci sia il bisogno di prelevare un articolo.
== Glossario
#glo_paragrafo
== Riferimenti <riferimenti>
=== Riferimenti a documentazione interna <riferimenti-interni>
- Documento #glo_v: \
_#link("https://github.com/Error-418-SWE/Documenti/blob/main/3%20-%20PB/Glossario_v" + glo_vo + ".pdf")_
#lastVisitedOn(25,02,2024)
- Documento #pdp_v, Sezione 2 "Analisi dei Rischi": \
_#link("https://github.com/Error-418-SWE/Documenti/blob/main/3%20-%20PB/Documentazione%20esterna/Piano%20di%20Progetto_v" + pdp_vo + ".pdf")_
#lastVisitedOn(21,02,2024)
=== Riferimenti normativi <riferimenti-normativi>
- Capitolato "Warehouse Management 3D" (C5) di #azienda: \
_#link("https://www.math.unipd.it/~tullio/IS-1/2023/Progetto/C5.pdf")_
#lastVisitedOn(13, 02, 2024)
- Regolamento di Progetto: \
_#link("https://www.math.unipd.it/~tullio/IS-1/2023/Dispense/PD2.pdf")_
#lastVisitedOn(13,02,2024)
- Standard ISO/IEC/IEEE 12207:2017: \
_#link("https://www.iso.org/obp/ui/en/#iso:std:iso-iec-ieee:12207:ed-1:v1:en")_
#lastVisitedOn(26,02,2024)
- Standard ISO/IEC/IEEE 29148:2018: \
_#link("https://ieeexplore.ieee.org/servlet/opac?punumber=8559684")_
#lastVisitedOn(13,02,2024)
- SWEBOK Chapter 6: Software Configuration Management: \
_#link("http://swebokwiki.org/Chapter_6:_Software_Configuration_Management")_
#lastVisitedOn(13, 02, 2024)
- Specifica Unified Modeling Language 2: \
_#link("https://www.omg.org/spec/UML/")_
#lastVisitedOn(13,02,2024)
=== Riferimenti informativi <riferimenti-informativi>
- Documentazione Git: \
_#link("https://git-scm.com/docs")_
#lastVisitedOn(13,02,2024)
- Documentazione Jira: \
_#link("https://confluence.atlassian.com/jira")_
#lastVisitedOn(13,02,2024)
- Documentazione Typst: \
_#link("https://typst.app/docs/")_
#lastVisitedOn(13,02,2024)
- Documentazione Three.js: \
_#link("https://threejs.org/docs/")_
#lastVisitedOn(13,02,2024)
= Processi di Accordo
== Processo di Fornitura <processo_fornitura>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.1.2_
=== Scopo e descrizione
Il processo di Fornitura ha come obiettivo l'offerta di un prodotto o servizio che soddisfi i requisiti concordati con Proponente e Committente. Tra quest'ultimi e il fornitore deve essere stabilito un accordo all'interno del quale vengono definiti i requisiti, le tempistiche e i costi da rispettare. Prima di allora, il fornitore avrà effettuato un'attenta analisi del progetto proposto e dei rischi annessi alla sua realizzazione, con relative linee guida per mitigarli.
=== Rapporti con il Proponente <comunicazione_Proponente>
Il dialogo tra il gruppo #err418 e il Proponente dovrà essere attivo e frequente fino al termine del progetto didattico, in modo che si riescano a raccogliere più feedback possibili riguardo la correttezza del lavoro svolto. Questa comunicazione avverrà in due modalità:
+ scritta, asincrona, utilizzata per:
- comunicazioni di breve durata;
- condivisione di verbali e materiali informativi;
- coordinamento.
+ orale, sincrona, durante i quali si affronteranno:
- feedback sul lavoro prodotto;
- chiarimenti sul capitolato;
- chiarimenti riguardo casi d'uso e requisiti.
I meeting avranno cadenza variabile, e saranno fissati al termine di altri incontri oppure via e-mail. Il contenuto di ogni incontro sarà raccolto all'interno del relativo verbale. Ognuno di questi verbali sarà validato dal Proponente tramite l'apposizione di una firma, e sarà liberamente consultabile all'interno del repository GitHub del gruppo dedicato ai documenti (_#link("https://github.com/Error-418-SWE/Documenti/tree/main")_), al percorso `NomeMilestone/Documentazione esterna/Verbali`, dove `NomeMilestone` è uno tra:
- 1 - Candidatura;
- 2 - RTB;
- 3 - PB.
=== Documentazione prodotta
In questa sezione viene descritta la documentazione prodotta dal gruppo nel processo di Fornitura, la quale sarà resa disponibile al Proponente, #azienda, e ai Committenti, ovvero il #vardanega e il #cardin.
==== Valutazione dei capitolati
Documento nel quale il gruppo ha analizzato le diverse proposte di progetto rese disponibili dai vari Proponenti. Per ogni capitolato vengono presentati tre paragrafi:
+ *Descrizione*: vengono indicati i nominativi di Proponente e Committente, e viene presentato l'obiettivo del progetto;
+ *Dominio tecnologico*: vengono elencate le tecnologie consigliate dal Proponente del capitolato;
+ *Considerazioni*: il gruppo dà la propria valutazione sul capitolato.
==== _Analisi dei rischi_
Nel documento #pdp vengono presentati i rischi a cui il gruppo potrebbe essere esposto durante il periodo in cui lavora al progetto. Ogni rischio viene classificato secondo tre parametri:
- *impatto*: esprime l'effetto generato dall'evento;
- *probabilità*: esprime la probabilità del verificarsi del rischio;
- *conseguenze*: effetti collaterali a breve o medio termine che il rischio può comportare.
Ad ogni rischio sono inoltre associate delle buone pratiche da seguire per mitigarlo.
==== _Preventivo dei costi_
Nel Preventivo dei costi viene esposta una tabella che presenta una previsione riguardo il numero di ore di lavoro totali, per membro e per ruolo e viene fornito un calcolo del costo totale del progetto. Prima della tabella vengono spiegate le motivazioni che hanno portato alla suddivisione oraria individuata, effettuando una tripartizione del periodo di lavoro complessivo e analizzando ogni ruolo presente all'interno del gruppo.
==== _Lettera di presentazione_
Breve documento dove il gruppo si presenta e dichiara il suo impegno nello svolgimento del capitolato scelto. Viene fornito un riferimento al repository dove si potranno trovare i documenti necessari alla candidatura e vengono dichiarati il preventivo a finire e la data di consegna prevista.
==== #adr
In questo documento vengono raccolti tutti gli Use Case e requisiti individuati dal gruppo con il supporto del Proponente. Ogni Use Case e requisito è identificato da un codice, così da essere facilmente individuabile e tracciabile. All'inizio del documento sono inoltre descritti i criteri di qualità che il gruppo ha seguito durante la redazione.
==== #pdp
Documento che governa la pianificazione dell'avanzamento del progetto, determinando task e obiettivi da raggiungere e analizzando il lavoro svolto. È articolato in cinque sezioni:
- Rischi e loro mitigazione;
- Divisione temporale di sviluppo;
- Preventivo dei costi di realizzazione;
- Pianificazione del lavoro;
- Consuntivo del progetto.
==== #pdq
Nel #pdq vengono fissati obiettivi di qualità e vengono descritti i processi necessari per conseguirli con relative procedure di controllo.
==== #glo
Nel Glossario vengono elencati e definiti in modo preciso tutti i termini rilevanti utilizzati all'interno del progetto. È un documento estremamente importante per evitare situazioni di ambiguità, e garantire così una corretta comprensione della documentazione da parte di tutte le parti coinvolte.
=== Strumenti utilizzati
In questa sezione sono indicati gli strumenti utilizzati dal gruppo nel processo di Fornitura.
- *Zoom*: applicazione per videoconferenze;
- *Google Slides*: servizio cloud offerto da Google, utilizzato dal gruppo per le presentazioni del diario di bordo, ovvero l'attività in cui il gruppo aggiorna il Committente riguardo l'andamento del lavoro;
- *Jira*: Issue Tracking System utilizzato per la pianificazione del lavoro.
= Processi di Ciclo di Vita
== Processi Organizzativi Abilitanti
I processi Organizzativi Abilitanti hanno la funzione di garantire la capacità dell'organizzazione di acquisire e fornire prodotti o servizi attraverso l'avvio, il supporto e il controllo di progetti. \
Questi processi forniscono l'infrastruttura e le risorse necessarie a supportare i progetti e il conseguimento degli obiettivi dell'organizzazione e degli accordi fra parti. Non sono da intendersi come un insieme esaustivo di processi aziendali atti alla gestione strategica dell'organizzazione.
I processi Organizzativi Abilitanti implementati dal gruppo sono i seguenti:
+ processo di Gestione dei Modelli di Ciclo di Vita;
+ processo di Gestione dell'Infrastruttura.
=== Processo di Gestione dei Modelli di Ciclo di Vita<processo_ciclo_di_vita>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.2.1_
==== Scopo
Lo scopo del processo di Gestione dei Modelli di Ciclo di Vita è definire, mantenere e garantire regole, processi, modelli e procedure di ciclo di vita.\
Questo processo fornisce politiche, processi, modelli e procedure del ciclo di vita coerenti con gli obiettivi dell'organizzazione, che sono definiti, adattati, migliorati e mantenuti per supportare le esigenze individuali dei progetti all'interno del contesto dell'organizzazione, e che sono in grado di essere applicati mediante metodi e strumenti efficaci e comprovati.\
Il gruppo adotta il modello PDCA (Plan-Do-Check-Act) per la gestione del ciclo di vita del software. Questo modello prevede quattro fasi:
+ Pianificazione (Plan): definizione degli obiettivi e dei processi necessari per raggiungerli;
+ Esecuzione (Do): attuazione del piano;
+ Verifica (Check): monitoraggio e misurazione dei processi e dei prodotti rispetto agli obiettivi e ai requisiti, e reportistica dei risultati;
+ Attuazione (Act): azioni per migliorare le prestazioni, se necessario, in base ai risultati della verifica.
==== Organizzazione del processo
===== Pianificazione
La pianificazione del processo è compito del Responsabile, il quale al termine dello Sprint precedente, in base alle attività svolte e ai risultati ottenuti, pianifica le attività da svolgere nello Sprint successivo. \
La pianificazione è un'attività iterativa, che viene svolta all'inizio dello Sprint. Il Responsabile, in relazione al progresso svolto, può decidere di modificare la pianificazione iniziale, aggiungendo o rimuovendo attività. \
Questo processo permette di individuare le attività da svolgere, le risorse necessarie e le tempistiche di svolgimento, mediante il sistema di ticketing offerto da Jira.\
Il risultato di questo processo è visibile all'interno del documento #pdp.\
\
===== Esecuzione
Identifica il processo di sviluppo del prodotto, dove quanto pianificato viene concretamente svolto.
Il processo di Esecuzione è composto da due attività principali:
+ sviluppo del prodotto;
+ sviluppo della documentazione.
Durante questo processo, ogni ruolo svolge le attività assegnate seguendo quanto stabilito nella pianificazione. Sarà compito del Responsabile verificare che le attività siano svolte correttamente e nei tempi previsti. Ogni membro avrà la possibilità di segnalare eventuali criticità, avendo a disposizione una board apposita sulla piattaforma Miro, che permette di avere un resoconto pronto a fine Sprint in merito al processo di avanzamento.
La progressione del lavoro è visibile mediante:
- retrospettiva;
- grafici di burndown (Jira);
- board di avanzamento (Miro).
I prodotti di questo processo, permettono dunque di procedere con la verifica e lo stabilimento delle contromisure e dei miglioramenti necessari.
\ \
===== Verifica
Al termine di ogni Sprint, il gruppo procederà con il meeting di retrospettiva, durante il quale verranno analizzati i risultati ottenuti e le attività svolte, basandosi sui prodotti dell'attività di esecuzione:
+ *grafici di burndown*: permettono di avere una visione rapida di quanto del lavoro pianificato è stato portato a termine: si tratta di una metrica puramente quantitativa, che tiene conto del numero di story point completati e del numero di story point ancora in lavorazione;
+ *board di avanzamento*: permette di avere una panoramica sulla situazione dello Sprint, in modo da valutarne gli aspetti positivi e negativi.
Questa analisi individua i miglioramenti da apportare al processo di sviluppo, stabilendo le contromisure necessarie per migliorare il processo stesso.
\ \
===== Attuazione
L'attuazione è l'ultima fase del processo di gestione del ciclo di vita, e consiste nella messa in pratica delle contromisure stabilite durante la fase di verifica. \
L'obiettivo è sopperire alle mancanze e alle inefficienze del processo di sviluppo, in modo da migliorare la qualità del prodotto e la produttività del gruppo. \
Diventa compito del Responsabile stabilire le attività necessarie per attuare le contromisure, e di conseguenza di pianificare le attività da svolgere nello Sprint successivo. \
Il risultato di questo processo è visibile all'interno del documento #pdp.
\
\
==== Ruoli
===== Responsabile
Il Responsabile è la figura chiave che guida il progetto, assumendo il ruolo di referente principale per il gruppo e per gli stakeholder. \
Le responsabilità del Responsabile includono:
+ coordinamento: ha il compito di supervisionare i membri del gruppo, assicurandosi che le attività vengano svolte nel rispetto delle norme identificate in questo documento;
+ pianificazione: stabilisce le attività da svolgere, le relative scadenze e priorità, sancendo l'inizio e la fine di ogni Sprint;
+ monitoraggio e gestione dei costi: tiene sotto controllo l'andamento del progetto, stima i costi e gestisce l'analisi dei rischi, garantendo che il progetto rimanga entro il budget previsto;
+ #ndp: si occupa della stesura e dell'aggiornamento delle #ndp, che devono essere rispettate da tutti i membri del gruppo;
+ relazioni esterne: gestisce tutte le interazioni con il Proponente e i Committenti assicurando una comunicazione fluida ed efficace.
\ \
===== Amministratore
L'Amministratore è la figura incaricata di gestire l'ambiente di lavoro e gli strumenti utilizzati dal gruppo per tutta la durata del progetto. Ha il compito di assicurare che gli strumenti proposti ai membri del gruppo siano efficienti e favoriscano la qualità del lavoro. Monitora, assieme al Responsabile, il rispetto delle regole stabilite in questo documento e verifica che i servizi a disposizione del gruppo siano adeguati alle attività pianificate, promuovendo la produttività. \
Le responsabilità dell'Amministratore includono:
+ redazione dei verbali: l'Amministratore è responsabile della stesura dei verbali relativi ai meeting interni ed esterni;
+ gestione delle risorse: si occupa dell'amministrazione delle risorse, delle infrastrutture e dei servizi necessari per l'esecuzione dei processi di supporto;
+ automatizzazione dei processi: determina gli strumenti necessari per automatizzare i processi, come la compilazione dei file sorgenti e il sistema di versionamento automatico;
+ risoluzione dei problemi: affronta e risolve i problemi legati alla gestione dei processi.
\ \
===== Analista
L'Analista individua i bisogni del Proponente e li trasforma in requisiti che saranno l'input delle attività successive. Il suo lavoro si svolge intensamente nel periodo di avvio del progetto, e si conclude con la stesura dell'#adr. \
Il suo compito è di rilevanza in quanto un'incompleta o superficiale analisi può impattare in modo sensibile sulle attività successive, causando ritardi e costi aggiuntivi, andando a pregiudicare la qualità e la completezza del prodotto finale. \
Le responsabilità dell'Analista includono:
+ documento di #adr: l'Analista è incaricato di redigere questo documento, che dettaglia i requisiti specifici del progetto;
+ interazione con i clienti: l'Analista lavora a stretto contatto con il Proponente o i Committenti per capire e studiare i loro bisogni;
+ classificazione dei requisiti: individua i requisiti e li classifica come funzionali e non funzionali, e come obbligatori, desiderabili o opzionali;
+ definizione del problema e degli obiettivi: l'Analista esamina la situazione attuale, identifica il problema e stabilisce gli obiettivi da raggiungere;
+ trasformazione dei bisogni in requisiti: durante la stesura dell'#adr, l'Analista converte i bisogni dei clienti in requisiti specifici per la soluzione.
\ \
===== Progettista
Il Progettista ha il compito di sviluppare una soluzione che soddisfi le esigenze identificate dall'Analista, rispettando i vincoli individuati. Il Progettista trasforma i requisiti in un'architettura che modella il problema. \
Le responsabilità del Progettista includono:
+ sviluppo di un'architettura robusta e resistente ai malfunzionamenti;
+ realizzazione di soluzioni affidabili, efficienti, sostenibili e conformi ai requisiti;
+ decomposizione del sistema in componenti e organizzazione delle loro interazioni, ruoli e responsabilità;
+ garanzia di un basso grado di accoppiamento nell'architettura.
\ \
===== Programmatore
Il Programmatore è la figura più numerosa all'intero del gruppo.\
Le sue responsabilità includono:
+ scrittura del codice sorgente, perseguendo manutenibilità e conformità a quanto stabilito dall'architettura definita dalla progettazione;
+ creazione di test specifici per la verifica e la validazione del codice.
\ \
===== Verificatore
Il Verificatore controlla il lavoro svolto dagli altri membri del gruppo, assicurandosi che le #ndp e le aspettative siano rispettate. \
Le responsabilità del Verificatore includono:
+ verifica della qualità e della conformità della documentazione prodotta;
+ approvazione della documentazione sottoposta a verifica.
\ \
=== Processi di Gestione dell'Infrastruttura
==== Scopo
Lo scopo del processo di Gestione dell'Infrastruttura è fornire l'infrastruttura e i servizi a supporto dell'organizzazione per il conseguimento degli obiettivi di progetto nel corso dell'intero ciclo di vita.
Questo processo definisce, fornisce e regola i servizi, gli strumenti e le tecnologie di comunicazione e condivisione delle informazioni a supporto degli scopi dell'organizzazione.
==== Requisiti
L'infrastruttura è costituita dai servizi, dagli strumenti e dalle tecnologie di comunicazione e condivisione delle informazioni adottate a supporto degli scopi dell'organizzazione. L'infrastruttura risponde alle necessità di comunicazione interna ed esterna.
I requisiti dei processi di Gestione dell'Infrastruttura sono:
+ semplicità di adozione di strumenti e servizi;
+ accesso rapido alle informazioni, anche in mobilità;
+ non ridondanza tra strumenti e servizi adottati.
==== Infrastruttura di comunicazione
I principi della comunicazione che ispirano i processi di Gestione dell'Infrastruttura sono:
+ Comunicazione aperta: le comunicazioni avvengono in modalità pubblica, ovvero tutti i membri possono partecipare (compatibilmente con i loro impegni di progetto e sempre nel rispetto delle rispettive responsabilità). I membri del gruppo hanno accesso e possono liberamente consultare i messaggi, le eventuali registrazioni e i verbali;
+ Comunicazione onesta: quanto comunicato rappresenta sempre il reale stato del progetto. Nessun membro, in nessun caso, deve nascondere le criticità incontrate;
+ Comunicazione proattiva: comunicare con cognizione di causa, offrendo spunti concreti di discussione. Ogni comunicazione deve poter essere processata dagli interessati nel minor tempo possibile;
+ Comunicazione frequente: la frequenza della comunicazione permette di prendere decisioni in modo tempestivo e informato.
===== Comunicazione interna <comunicazione_interna>
#link("https://discord.com/")[*Discord*] rappresenta il canale primario di comunicazione interna. È una piattaforma di comunicazione che fornisce:
+ un servizio di messaggistica istantanea che permette la suddivisione delle conversazioni in canali tematici;
+ un servizio di videochiamate usato per le comunicazioni sincrone interne in modalità remota.
Le comunicazioni testuali tramite messaggio istantaneo sono organizzate per argomento. Discord adotta il termine "canale" per designare tale suddivisione tematica. I canali attualmente in uso sono:
- canale generale (`#random`): usato per le comunicazioni informali;
- canale meeting (`#meeting`): usato per l'organizzazione dei meeting interni e la condivisione degli ordini del giorno;
- canale di riferimento (`#riferimenti`): usato come bacheca per raccogliere ed organizzare, in un unico luogo, le risorse a supporto degli scopi dell'organizzazione;
- altri canali tematici: le comunicazioni relative ad uno specifico prodotto dei processi dell'organizzazione avvengono in un canale dedicato.
La suddivisione delle comunicazioni interne in canali ha lo scopo di ridurre le distrazioni, facilitare l'accesso alle informazioni e semplificare la comunicazione interna.
Le comunicazioni sincrone in videochiamata avvengono nei cosiddetti "canali vocali". Vengono forniti quattro canali vocali generici ad accesso libero. I membri dell'organizzazione hanno la facoltà di incontrarsi in qualsiasi momento in videochiamate interne. I canali vocali non sono organizzati tematicamente perché offrono la persistenza.
#link("https://miro.com/")[*Miro*] è un servizio di collaborazione per team basato su _whiteboard_. Offre la possibilità di creare board multimediali e permette la collaborazione asincrona. È utilizzato per:
+ raccogliere i feedback interni da discutere durante i meeting di retrospettiva;
+ supportare gli incontri interni di _brainstorming_;
+ supportare i meeting con gli interlocutori esterni.
Oltre a Discord e Miro, l'organizzazione comunica anche tramite *Jira* (ITS) e *GitHub* (VCS). L'uso di questi strumenti è discusso in dettaglio nelle sezioni apposite.
===== Comunicazione esterna
Le modalità e la frequenza delle comunicazioni esterne sono da stabilirsi con i diretti interessati, secondo necessità e disponibilità degli interlocutori. Le comunicazioni esterne avvengono su due canali primari: Gmail e Zoom.
#link("https://mail.google.com/")[*Gmail*] è il servizio di posta elettronica di Google. L'indirizzo di posta elettronica dell'organizzazione è:
#align(center, `<EMAIL>`)
Viene utilizzato per tutte le comunicazioni da e verso gli interlocutori esterni. Tutti i membri dell'organizzazione possono accedere in qualsiasi momento alla casella di posta elettronica. Inoltre, tutte le conversazioni vengono inoltrate automaticamente agli indirizzi e-mail istituzionali di ciascun membro.
L'indirizzo è reso noto nel frontespizio di ogni documento prodotto dall'organizzazione.
#link("https://zoom.us/")[*Zoom*] è un servizio di teleconferenza. A meno di accordi specifici tra le parti, l'organizzazione utilizza Zoom per effettuare videochiamate con gli interlocutori esterni.
==== Mantenimento dell'infrastruttura
Sono compiti dell'Amministratore il mantenimento dell'infrastruttura, l'aggiornamento delle norme e dei processi e l'identificazione di nuovi servizi a supporto delle attività dell'organizzazione.
L'organizzazione adotta nuovi servizi, strumenti e tecnologie di comunicazione avendo cura di non introdurre ridondanza. L'organizzazione si dota di un insieme di strumenti e servizi sufficienti a coprire tutti i requisiti di comunicazione.
=== Processo di Gestione delle Risorse Umane <processo_risorse_umane>
La natura didattica del progetto riduce le prerogative del processo di Gestione delle Risorse umane. Per questa ragione, l'organizzazione dichiara la: \
_conformance to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.2.4_.
==== Scopo
Questo processo fornisce all'organizzazione le risorse umane necessarie all'esecuzione dei processi di ciclo di vita al fine di realizzare gli obiettivi di progetto, dell'organizzazione e degli stakeholder.
==== Attività e compiti
===== Identificare le competenze dei membri
L'organizzazione sottopone, ad ogni nuovo membro, un form conoscitivo atto a identificare le competenze pregresse. Il form è realizzato con #link("https://www.google.it/intl/it/forms/about/")[*Google Forms*] e include domande su:
+ strumenti di collaborazione;
+ linguaggi di programmazione;
+ tecnologie;
+ strumenti di automazione;
+ strumenti di controllo di versione.
Le risposte sono non vincolanti e non influiscono in alcun modo sulla rotazione dei ruoli, sui compiti assegnati o sull'organizzazione interna.
===== Identificare le competenze richieste
Le competenze richieste sono identificate tramite:
+ Analisi dei Capitolati;
+ Studio del dominio di progetto;
+ Incontri con i Proponenti e successivi colloqui.
===== Sviluppare le competenze <gestione-risorse-umane-sviluppo>
Lo sviluppo di nuove competenze riguarda i membri, e non i ruoli. Per questa ragione, i processi di sviluppo di competenze sono universali e condivisi.
L'organizzazione si adopera per sviluppare le competenze dei membri mediante:
+ attività di _peer-tutoring_ in concomitanza delle rotazioni di ruolo;
+ pubblicazione interna di tutorial tecnici scritti (eventualmente accompagnati da brevi video, se utili a migliorare la comprensione degli argomenti trattati);
+ attività di _tutoring_ interno su richiesta, sincrono, in base alla necessità;
+ attività di _mentoring_ esterno su richiesta, in base alla necessità e alla disponibilità dell'interlocutore esterno;
+ condivisione delle best practice in sessione collettiva.
Le sessioni di tutoring sono "a sportello" ed è responsabilità dei singoli membri richiederne l'attivazione. Il Responsabile, identificati i temi di maggior interesse, può espressamente richiedere che un ruolo copra le esigenze di tutoring interno tramite le modalità sopra indicate.
===== Acquisire e fornire competenze
I membri dell'organizzazione sono prestabiliti. Qualora le competenze interne all'organizzazione siano deficitarie, è richiesta l'attivazione delle attività descritte in @gestione-risorse-umane-sviluppo.
Non sono previste variazioni della composizione dell'organizzazione, se non in via straordinaria e comunque discussa preventivamente con il Committente.
=== Processo di Gestione della Qualità <processo_gestione_qualità>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.2.5_
==== Scopo
Il processo di Gestione della Qualità ha lo scopo di garantire che i prodotti e i servizi del progetto soddisfino gli obiettivi di qualità del gruppo e i bisogni del Proponente.
==== Risultati
Come risultato dell'efficace attuazione del processo di Gestione della Qualità:
- vengono definiti e implementati gli obiettivi, le politiche e le procedure di Gestione della Qualità del gruppo;
- vengono stabiliti i criteri e i metodi di valutazione della qualità;
- vengono fornite risorse e informazioni al progetto per supportare l'operazione e il monitoraggio delle attività di garanzia della qualità del progetto;
- vengono raccolti e analizzati i risultati delle valutazioni della garanzia della qualità;
- le politiche e le procedure di Gestione della Qualità vengono migliorate basandosi sui risultati del progetto e dell'organizzazione.
==== Attività
===== Pianificazione
Il gruppo #err418 pone i seguenti principi di qualità:
+ il contenuto del branch principale dei repository (`src` e, di conseguenza, `main` per Documenti, e `dev` per WMS3) deve rispettare i criteri di qualità definiti nel #pdq e nella @processo_gestione_configurazione. Inoltre:
- tutti gli elementi di configurazione devono essere gestiti tramite repository su GitHub (@repository-github), con il sistema di _feature branching_;
- ogni modifica che vuole essere introdotta in un prodotto dovrà essere prima approvata dal Verificatore tramite il meccanismo di Pull Request (@controllo_release).
+ il contenuto della documentazione deve seguire i principi di redazione descritti nella @stile-convenzioni;
+ la documentazione prodotta deve seguire degli standard interni e/o esterni:
- standard interni:
- vengono definiti nel presente documento nella @norme-documentazione.
- standard esterni:
- il gruppo adotta i seguenti standard ISO:
#figure(table(
align: left,
columns: 2,
[*Standard ISO*], [*Documento*],
[12207:2017], [#ndp, #adr],
[9126 1:2001], [#pdq],
), caption: [Tracciamento ISO-documenti])
In particolare, per ogni processo interno al presente documento viene specificato il grado di conformità allo standard ISO/IEC/IEEE 12207:2017 all'interno di una sezione dedicata (@tracciamento_paragrafi).
+ il codice prodotto deve seguire degli standard interni, definiti nella @processo_implementazione;
+ il codice prodotto dal gruppo deve rispettare i parametri di qualità attraverso il monitoraggio delle metriche identificate nel #pdq\;
+ il prodotto software deve soddisfare i bisogni e le richieste del Proponente, identificate nel documento di #adr e catalogate in: obbligatorie, desiderabili e opzionali.
===== Valutazione
La valutazione della qualità dei prodotti di progetto, dell'andamento del gruppo e dell'attuazione dei principi di qualità elencati in precedenza viene effettuata nei seguenti modi:
- review delle Pull Request da parte del Verificatore:
- verifica dell'aderenza agli standard interni ed esterni;
- verifica della leggibilità, chiarezza e comprensibilità della documentazione;
- verifica dell'assenza di errori ortografici o sintattici nei documenti;
- verifica dell'assenza di errori nel codice (valutazione statica) e nell'esecuzione degli elementi software.
- testing del codice, come descritto nel processo di Integrazione (@processo_integrazione) e nel processo di Verifica (@processo_verifica);
- revisioni complessive degli elementi di configurazione in prossimità della fine di ogni periodo di lavoro definito nella @periodi_lavoro;
- utilizzo di metriche di qualità (@processo_misurazione) definite nel #pdq_v e di un cruscotto di qualità (@grafana) per l'individuazione tempestiva di anomalie o situazioni critiche;
- comunicazione costante con il Proponente per raccogliere feedback e valutare l'adesione del lavoro alle sue richieste (@comunicazione_Proponente).
===== Attuazione di azioni correttive
L'attività di attuazione di azioni correttive consiste nei seguenti task:
+ individuazione delle parti degli elementi soggetti a configurazione da correggere;
+ segnalazione immediata delle parti da correggere al Responsabile, tramite canale Discord pubblicamente consultabile;
+ individuazione delle azioni correttive da compiere;
+ apertura dei relativi task di revisione su Jira;
+ assegnazione e svolgimento dei task con successiva verifica in sede di Pull Request.
= Processi di Gestione Tecnica
== Processo di Pianificazione di Progetto <pianificazione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.1_
=== Scopo
Il processo di Pianificazione di Progetto ha come scopo la produzione e coordinazione di un piano efficace ed applicabile per garantire una corretta gestione del lavoro. La pianificazione viene inserita in un documento denominato #pdp (@PdP).
=== Risultati (#pdp) <PdP>
Il #pdp è il documento principale che viene redatto durante questo processo, e ha il compito di governare la pianificazione e l'avanzamento del progetto. In questo documento vengono determinati i task e gli obiettivi da raggiungere, fornendo anche un'analisi critica del lavoro svolto fino a quel momento accompagnata dai grafici di Gantt e di burndown. Sono presenti cinque sezioni, di cui le prime quattro rientrano nel processo di Pianificazione:
+ Rischi e loro mitigazione;
+ Divisione temporale di sviluppo;
+ Preventivo dei costi di realizzazione;
+ Pianificazione del lavoro;
+ Consuntivo del progetto.
La redazione del documento va di pari passo con l'avanzamento del progetto, in modo tale da essere sempre aggiornato alla situazione corrente del lavoro.
=== Attività
Nel processo di Pianificazione sono presenti due attività principali:
+ definizione del progetto;
+ pianificazione del progetto e della gestione tecnica.
==== Definizione del progetto
In questa attività il gruppo deve definire tutto ciò che caratterizza il progetto, ovvero i suoi obiettivi e vincoli, sia di carattere funzionale che tecnologico. Durante la lavorazione del progetto verranno prodotti diversi output, che possono essere suddivisi nelle due macro categorie di: documentazione, codice. Entrambi questi prodotti dovranno essere realizzati rispettando determinate regole e processi, ed è quindi necessario che il gruppo definisca in questa attività uno o più cicli di vita da seguire.
==== Pianificazione del progetto e della gestione tecnica
È l'attività principale del processo, nella quale viene definita nel concreto la pianificazione.
===== Suddivisione temporale <periodi_lavoro>
Il gruppo ha individuato tre periodi di lavoro principali:
- raccolta e analisi dei requisiti: vengono delineati i requisiti che il prodotto finale dovrà rispettare tramite un continuo rapporto con il Proponente;
- sviluppo della Requirements and Technology Baseline (RTB): si studiano le tecnologie da utilizzare e si applicano le conoscenze acquisite per realizzare un PoC (Proof of Concept), ovvero un prodotto software che permetta di dimostrare la padronanza delle tecnologie selezionate ai fini dello sviluppo del progetto;
- periodo di sviluppo del Minimum Viable Product (MVP): viene progettato e implementato un prodotto software che rispetti almeno i requisiti minimi di accettazione, e che offra tutte le funzionalità richieste.
Ognuno di questi viene suddiviso a sua volta in periodi della durata di una settimana denominati _Sprint_. Al termine di ogni _Sprint_ viene effettuato un incontro interno di retrospettiva, nel quale si analizza criticamente la settimana appena conclusa, mostrandone aspetti positivi, aspetti da migliorare e fissando obiettivi che verranno poi riportati nell'Issue Tracking System sotto forma di task. Questi andranno a comporre il _backlog_ dello _Sprint_ successivo, e il loro progressivo completamento andrà a produrre un _burndown-chart_, utilizzato dal gruppo come strumento che rappresenti in modo oggettivo l'andamento del lavoro.
===== Definizione di ruoli, responsabilità e costi
Al fine di migliorare l'assegnazione del lavoro vengono definiti sei ruoli, ognuno dei quali con precise responsabilità da rispettare. Ogni membro del gruppo dovrà assumere ognuno di questi ruoli all'interno del periodo di lavoro al progetto. L'assegnazione dei ruoli avviene con frequenza bisettimanale. Di seguito viene riportata la descrizione di ogni ruolo con i relativi compiti:
+ *Responsabile*: è presente durante l'intero progetto, in particolare si occupa di:
- coordinare il gruppo;
- verificare che il lavoro proceda secondo le tempistiche e i costi stabiliti;
- rappresentare il gruppo nei rapporti con il Committente;
- gestire la pianificazione di ogni _Sprint_.
+ *Amministratore*: ruolo presente durante tutto il progetto. Ha il compito di:
- predisporre e controllare il corretto utilizzo delle procedure e degli strumenti adottati;
- implementare e manutenere gli automatismi in modo da migliorare l'efficienza del gruppo.
+ *Analista*: è presente principalmente nei primi due periodi del progetto. Si occupa di redigere il documento #adr, nel quale:
- definisce i casi d'uso;
- raccoglie e classifica i requisiti.
+ *Progettista*: ruolo presente principalmente negli ultimi due periodi, nei quali:
- effettua uno studio delle tecnologie proposte, mirato alla definizione dello stack tecnologico da usare;
- delinea l'architettura del prodotto;
- definisce le linee guida implementative valutando le scelte più efficienti e sostenibili.
+ *Programmatore*: è attivo negli ultimi due periodi del progetto, nei quali:
- si occupa della codifica del PoC, senza partire da una progettazione ben definita visto l'obiettivo del Proof of Concept;
- traduce in codice eseguibile l'architettura del prodotto finale definita dal Progettista durante il periodo di sviluppo del MVP.
+ *Verificatore*: è presente durante l'intero progetto, e si occupa di controllare che il lavoro prodotto dal gruppo rispetti gli standard qualitativi adottati.
Ad ogni ruolo è inoltre associato un costo orario, sulla base del quale il gruppo calcola il preventivo totale del progetto e quello di ogni _Sprint_ seguito dal relativo consuntivo. Il costo orario viene calcolato in base alla sua importanza all'interno del progetto, misurata in termini di competenze e disponibilità della risorsa.
== Processo di Valutazione e Controllo di Progetto <valutazioneControllo>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.2_
=== Scopo
Il processo di Valutazione e Controllo ha lo scopo di determinare lo stato del progetto tramite la verifica dell'allineamento del lavoro con i piani definiti. Tale allineamento viene dimostrato osservando i seguenti parametri:
- tempistiche;
- costi;
- obiettivi raggiunti.
Questo viene fatto all'interno di revisioni periodiche chiamate retrospettive, e viene messo per iscritto all'interno dei verbali di tali riunioni e nei paragrafi di consuntivo del #pdp.
=== Risultati
Come risultato dell'implementazione del processo di Valutazione e Controllo si elencano i seguenti:
- valutazione dell'adeguatezza di ruoli, responsabilità e risorse;
- esecuzione delle azioni correttive scaturite dalle revisioni di progresso;
- viene avviata, se necessaria, la ripianificazione del progetto;
- viene autorizzata l'azione del progetto di avanzare (o meno) da un traguardo o evento programmato al successivo;
- vengono registrati gli obiettivi raggiunti.
I risultati sono espressi e analizzati nei paragrafi di consuntivo del #pdp.
=== Attività
==== Piano di valutazione e controllo del progetto
La valutazione e il controllo del progetto avvengono a cadenza settimanale, in corrispondenza della riunione di retrospettiva. Durante questa riunione si valuta ciò che è stato svolto durante il periodo di lavoro (_Sprint_) che si sta concludendo, se ne identificano i problemi e si decidono soluzioni di controllo che vadano a risolvere o arginare i problemi individuati.
Oltre a queste revisioni periodiche interne, sono presenti attività nelle quali il gruppo espone la propria situazione al Proponente, tramite riunione su Zoom, e Committente, tramite le attività denominate "diario di bordo".
Inoltre, è necessario che il gruppo svolga delle revisioni tecniche con il Committente per avere una valutazione esterna. Queste due revisioni sono chiamate Requirements and Technology Baseline (o RTB) e Product Baseline (o PB).
==== Valutazione <valutazione>
Durante l'attività di valutazione il gruppo deve analizzare la situazione del progetto, e per fare ciò deve adottare degli strumenti che rappresentino tale situazione nel modo più oggettivo possibile. Il momento in cui si effettua questo compito è la retrospettiva settimanale. Questa si svolge tramite meeting interno su Discord con il supporto di una board Miro. Il meeting è suddiviso concettualmente in tre parti, rappresentate all'interno della board da tre riquadri:
- *Keep doing*: raccoglie tutti gli aspetti positivi, e di conseguenza da mantenere, dello Sprint;
- *Improvements*: raccoglie tutte le problematiche incontrate durante lo Sprint;
- *To do*: raccoglie tutte le attività da svolgere nel prossimo Sprint, alcune delle quali direttamente collegate agli elementi appartenenti a "Improvements".
Tramite Miro il gruppo riesce ad avere una panoramica della situazione del lavoro, che viene poi completata da Jira, l'Issue Tracking System adottato. Al suo interno il gruppo ha definito le due milestone esterne (RTB e PB), nelle quali ha creato delle Epic che rappresentano ciò che è necessario produrre per quella milestone, e che raccolgono tutti i task necessari alla produzione di tali prodotti (documenti o software).
Milestone e Epic vengono accompagnate all'interno di Jira da una barra di completamento che rappresenta in verde il lavoro svolto, in blu il lavoro in fase di svolgimento e lascia vuota la parte dedicata alle attività definite ma non ancora in svolgimento. Queste barre contribuiscono a fornire una rappresentazione oggettiva della situazione del progetto.
Oltre a queste, Jira offre la funzionalità di visualizzazione di un burndown-chart, ovvero un grafico che rappresenta l'andamento del lavoro all'interno di uno Sprint in due possibili modalità:
- quantità di story point completati;
- quantità di issue completate.
Entrambe le rappresentazioni pongono nell'asse $x$ del grafico il tempo, indicato in giorni. Questi grafici contengono inoltre una retta rappresentante l'andamento ideale del lavoro, grazie alla quale risulta più semplice verificare l'efficienza del gruppo.
Al termine dell'incontro di retrospettiva viene redatto il paragrafo di consuntivo dello Sprint nel #pdp, nel quale, oltre a fare un resoconto dello Sprint, si analizza il suo l'aspetto economico: in base ai ruoli impegnati e al monte ore produttivo svolto, si calcola il costo effettivo del periodo concluso, aggiornando conseguentemente il costo preventivato e il documento #pdp. Questo indicatore contribuisce ad avere un resoconto completo del progetto, e permette al gruppo di comprendere meglio come sta lavorando e se sta gestendo correttamente le risorse a sua disposizione.
==== Controllo
Nell'attività di controllo figurano i seguenti task:
- azioni correttive;
- ripianificazione;
- azioni di cambiamento dovute a richieste del Committente e/o Proponente;
- autorizzazione ad avanzare alla successiva milestone.
===== Azioni correttive
Nell'attività di controllo si intraprendono azioni correttive nei confronti dei problemi individuati. Questi problemi possono essere di duplice natura:
- mancato raggiungimento degli obiettivi prefissati;
- miglioramenti e accortezze da adottare.
====== Mancato raggiungimento degli obiettivi prefissati
È necessario che alla chiusura dello Sprint le attività ancora in fase di svolgimento vengano riportate nello Sprint successivo, insieme a tutte quelle attività pianificate ma non ancora iniziate che sono considerate importanti. Tutte le attività che non vengono considerate importanti, ad esempio attività di cui si è rivalutato il grado di priorità, vengono riportate nel backlog. Una situazione di mancato raggiungimento degli obiettivi può essere sinonimo anche da una pianificazione errata e troppo ottimista, ed è quindi necessario che essa sia rivista e migliorata.
====== Miglioramenti e accortezze da adottare
Le soluzioni correttive vengono decise dal gruppo tramite la visualizzazione e l'analisi della board Miro durante la retrospettiva. Nella board infatti, come esposto nella @valutazione, alcuni dei task raccolti rispondono direttamente ai problemi individuati nella parte di Things to change.
===== Ripianificazione
La ripianificazione avviene quando gli obiettivi cambiano nel corso dello Sprint o alcune ipotesi fatte in fase di pianificazione si rivelano sbagliate. La ripianificazione viene gestita tramite Jira, che consente di aggiornare i task attivi, permettendo anche la comunicazione tempestiva dei cambiamenti al gruppo.
===== Azioni di cambiamento dovute a richieste del Committente e/o Proponente
Le azioni di cambiamento dovute a richieste del Committente e/o Proponente sono recepite attraverso i canali di comunicazione con quest'ultimi (Zoom, mail) e vengono registrate nei rispettivi verbali. A queste azioni viene attribuita un'alta priorità per garantire massima soddisfazione del cliente finale.
===== Autorizzazione ad avanzare alla successiva milestone
L'autorizzazione ad avanzare alla successiva milestone di progetto viene concessa dal Committente e/o Proponente in seguito ai colloqui pianificati su Zoom con quest'ultimi. Il gruppo si riserva di procedere verso la milestone successiva solo una volta ricevuta l'approvazione richiesta, in modo da non portare avanti difetti e problematiche che potrebbero risultare insidiosi da correggere una volta entrati in un periodo avanzato del progetto.
== Processo di Gestione delle Decisioni <processo_gestione_decisioni>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.3_
=== Scopo
Lo scopo del processo di Gestione delle Decisioni è fornire un quadro strutturato per identificare, categorizzare e valutare le decisioni che si intendono intraprendere, selezionando la migliore in termini di benefici attesi, costi e rischi associati. \
=== Risultati
Come risultato dell'efficace attuazione del processo di Gestione delle Decisioni:
- vengono identificate le decisioni che richiedono un'analisi alternativa;
- vengono identificati e valutati i percorsi di azione alternativi;
- viene selezionato un percorso di azione preferito;
- vengono identificate la risoluzione, la giustificazione della decisione e le ipotesi che portano ad una sua necessità.
=== Attività
==== Presentazione delle decisioni
Ogni decisione viene presentata identificandone:
- tipologia;
- obiettivo;
- soluzione proposta;
- vantaggi;
- svantaggi;
- impatto in termini di tempi e costi.
Il processo di decision making viene prevalentemente svolto nel meeting di retrospettiva, in modo da non contrastare la pianificazione dello Sprint in corso ed evitare un eccessivo numero di meeting interni che potrebbero comportare difficoltà organizzative e un rallentamento dell'avanzamento. Alcune decisioni potrebbero richiedere il coinvolgimento di soggetti esterni, come Proponente e Committente, soprattutto nei casi in cui sia richiesta una figura con maggiore esperienza nel campo di riferimento.
Solo decisioni critiche riguardo cambiamenti sostanziali o nuove direzioni di lavoro possono far scaturire meeting interni mirati.
Il resoconto di quanto deciso sarà visibile all'interno del verbale redatto a fine meeting.
===== Strategie di decision-making utilizzate
+ *Strategia collaborativa*: prevede che la decisione venga presentata e votata in modo collaborativo, coinvolgendo tutti i membri del gruppo e mediante una votazione con un sistema maggioritario, in modo che il risultato rappresenti la volontà della maggioranza.\ Strategia utilizzata per le decisioni:
- organizzative;
- dei requisiti;
- qualitative.
+ *Strategia expertise decision-making*: prevede che la decisione venga presentata e analizzata mediante la consultazione di figure esterne più esperte, individuabili nel Proponente o nel Committente, la cui esperienza risulta determinante. \ Questa strategia viene utilizzata per le decisioni:
- implementative;
- tecnologiche;
- architetturali.
==== Analisi delle decisioni
Le decisioni possono riguardare diversi aspetti del capitolato, e la loro categorizzazione è utile per individuare la migliore strategia di gestione e i ruoli coinvolti.
Le decisioni vengono dunque così classificate:
+ *Decisioni organizzative*: sono relative al modo di lavorare, cioè a come vengono gestiti i processi di avanzamento del progetto. Esempi notevoli sono le decisioni focalizzate alla coordinazione del gruppo o alla scelta degli strumenti da utilizzare per la gestione del progetto (ad esempio: scelta dell'ITS, delle piattaforme per la comunicazione e per la collaborazione):
- documento soggetto a modifiche: #ndp\;
- ruoli responsabili dell'aggiornamento: Responsabile, Amministratori;
- strategia di decision-making: collaborativa.
+ *Decisioni tecnologiche*: sono relative allo stack tecnologico da adottare durante lo sviluppo del progetto:
- documento soggetto a modifiche: #ndp\;
- ruoli responsabili dell'aggiornamento: Responsabile, Progettisti;
- strategia di decision-making: expertise decision-making.
+ *Decisioni sui requisiti*: sono relative ai requisiti del prodotto software. Possono riguardare aspetti funzionali e non funzionali:
- documento soggetto a modifiche: #adr\;
- ruoli responsabili dell'aggiornamento: Analisti;
- strategia di decision-making: collaborativa.
+ *Decisioni di implementazione*: sono decisioni relative alla stesura del codice:
- documento soggetto a modifiche: #ndp, documenti tecnici (diagramma delle classi);
- ruoli responsabili dell'aggiornamento: Responsabile, Progettisti, Programmatori;
- strategia di decision-making: expertise decision-making.
+ *Decisioni architetturali*: sono decisioni relative ai pattern e alle architetture riguardanti il software:
- documento soggetto a modifiche: #ndp, documenti tecnici (diagramma delle classi, diagramma dei casi d'uso);
- ruoli responsabili dell'aggiornamento: Responsabile, Progettisti;
- strategia di decision-making: expertise decision-making.
+ *Decisioni sulla qualità*: sono decisioni relative ai controlli di qualità:
- documento soggetto a modifiche: #pdq\;
- ruoli responsabili dell'aggiornamento: Responsabile, Verificatori;
- strategia di decision-making: collaborativa.
== Processo di Gestione dei Rischi <processo_gestione_rischi>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.4_
=== Scopo
Lo scopo del processo di Gestione dei Rischi è identificare, analizzare, trattare e monitorare costantemente i rischi, così da poterli affrontare sistematicamente durante l'intero ciclo di vita del progetto.
I rischi e le relative opzioni di trattamento vengono codificate univocamente per agevolare il tracciamento e l'organizzazione strutturale.
=== Risultati
Come risultato dell'implementazione del processo di Gestione dei Rischi:
- vengono identificati e analizzati i rischi;
- vengono identificate e priorizzate le opzioni di trattamento del rischio;
- viene selezionato ed implementato un trattamento appropriato;
- i rischi vengono valutati per verificare cambiamenti di stato e progressi nel trattamento.
I risultati sono raccolti nel documento #ris.
=== Struttura e codifica
==== Struttura gerarchica
I rischi vengono suddivisi nelle categorie principali descritte dal "Risk Breakdown Structure" PMBOK:
+ rischi tecnici;
+ rischi esterni;
+ rischi organizzativi;
+ rischi di project management.
==== Codifica
I rischi vengono codificati tramite la sigla "RIS" separata mediante un carattere "-" da due valori "x" e "y", divisi a loro volta da un carattere ".".
- il valore di "x" identifica la categoria PMBOK corrispondente;
- il valore "y" identifica il numero del rischio.
Per esempio, il primo rischio della categoria "rischi esterni" avrà codice:
#align(center, "RIS-2.1")
Le opzioni di trattamento vengono codificate tramite la sigla "OT" separata mediante un carattere "-" da tre valori "x", "y" e "z", divisi a loro volta da un carattere ".".
- il valore di "x" identifica la categoria PMBOK corrispondente al rischio di riferimento;
- il valore "y" identifica il numero del rischio di riferimento;
- il valore "z" identifica il numero dell'opzione di trattamento.
Per esempio, la prima opzione di trattamento del rischio RIS-2.1 avrà codice:
#align(center, "OT-2.1.1")
=== Attività e compiti
==== Pianificazione della Gestione dei Rischi
La strategia di Gestione dei Rischi per il progetto è basata su un approccio proattivo per identificare e mitigare i rischi in tutte le fasi del suo ciclo di vita. \
Ad ogni rischio individuato viene associato un profilo basato sia sulla probabilità di occorrenza che sull'impatto che essi hanno sullo stato di avanzamento dei lavori e sul progetto stesso.
L'impatto può essere "lieve", "medio" o "grave" in base alla sua entità.
La probabilità di occorrenza viene identificata tramite un valore intero da 1 a 5, dove 1 esprime una probabilità molto bassa, mentre 5 esprime una frequenza attesa sostenuta.\
Il gruppo definisce approcci di trattamento appropriati, compresi piani di mitigazione specifici.
==== Gestione del profilo di rischio
+ *Definizione e registrazione delle soglie e delle condizioni di rischio*:\
le soglie di rischio sono stabilite sulla base della probabilità di occorrenza e dell'impatto.
I rischi con un impatto negativo elevato sono trattati in modo più rigoroso rispetto a quelli con un impatto inferiore;
+ *Creazione e mantenimento di un profilo di rischio*:\
il profilo di rischio contiene tutte le informazioni necessarie per la Gestione dei Rischi, come il loro stato, le soglie, le probabilità, le azioni richieste in caso di occorrenza e le conseguenze previste.
Viene aggiornato in modo tempestivo in risposta ai cambiamenti nelle condizioni del progetto;
+ *Fornitura del profilo di rischio rilevante agli stakeholder in base alle loro esigenze*:\
il profilo di rischio viene all'occorrenza discusso nei meeting interni e/o esterni e tutte le parti interessate allo stato attuale dei rischi e delle azioni di trattamento possono consultare il documento #ris_v.
==== Analisi dei rischi
Questa attività consiste nei seguenti compiti:
+ *identificazione del rischio ed associazione ad uno specifico profilo, secondo quanto descritto nella pianificazione della Gestione dei Rischi*:\ l'identificazione avviene durante tutte le fasi di sviluppo. Inoltre, i rischi emergono dall'analisi delle misurazioni di qualità dei processi e del sistema software in evoluzione;
+ *valutazione di ciascun rischio rispetto alle sue soglie di accettazione*:\ ogni rischio viene valutato rispetto alle soglie stabilite, il superamento delle quali attiva delle modalità di trattamento specifiche.
==== Trattamento dei rischi
Questa attività consiste nei seguenti compiti:
+ *definizione e registrazione delle strategie e delle misure di trattamento consigliate per ciascun rischio che superi la soglia di tolleranza*. \ Queste possono includere:\
- l'eliminazione del rischio;
- la riduzione della sua probabilità o gravità;
- l'accettazione del rischio.
Vengono anche registrate informazioni sull'efficacia delle alternative di trattamento;
+ *nel caso di accettazione di un rischio al di sopra della soglia, attribuzione di priorità elevata e monitoraggio costante*:\
pratica necessaria per valutare la necessità di futuri interventi di trattamento del rischio o eventuali modifiche della sua priorità;
+ *coordinamento dell'azione di gestione dopo la selezione di una strategia di trattamento del rischio*:\
dopo la selezione di un trattamento del rischio, vengono coordinate azioni di gestione per implementare le decisioni prese. Il processo di Valutazione e Controllo del progetto può essere applicato.
==== Monitoraggio dei rischi
Questa attività consiste nei seguenti compiti:
+ *monitoraggio continuo dei rischi e del contesto della loro gestione per eventuali loro cambiamenti*;
+ *monitoraggio continuo di possibili nuovi rischi durante l'intero ciclo di vita*.
Il monitoraggio dei rischi avviene principalmente in sede di meeting interno a seguito di analisi retrospettive.
== Processo di Gestione della Configurazione <processo_gestione_configurazione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.5_
=== Scopo
Lo scopo della Gestione della Configurazione è gestire e controllare gli elementi del sistema e le configurazioni durante il ciclo di vita. Lo scopo principale è tracciare e coordinare le procedure necessarie alla modifica della documentazione e del codice sorgente.
=== Risultati
Come risultato dell'implementazione riuscita del processo di Gestione della Configurazione:
- vengono identificati e gestiti gli elementi che richiedono la gestione della configurazione;
- vengono stabilite le linee base di configurazione;
- sono controllate le modifiche agli elementi sotto gestione della configurazione;
- sono disponibili informazioni sullo stato della configurazione;
- le release dei documenti e del software sono controllate e approvate.
=== Attività
==== Versionamento <versionamento>
===== Generalità
Il versionamento è un processo che permette di tenere traccia delle modifiche effettuate su un prodotto software o documentale. Per ogni modifica viene creata una nuova versione del prodotto, che viene identificata da un numero di versione. Il numero di versione è composto da tre cifre separate da un punto, e segue la convenzione seguente:
#align(center, `X.Y.Z`)
dove:
- `X`: indica il numero di versione principale;
- `Y`: indica il numero di versione secondaria;
- `Z`: indica il numero di versione di revisione e correzione.
Per il versionamento di qualsiasi prodotto del progetto è essenziale osservare i principi elencati di seguito:
+ l'aggiornamento di una delle cifre del numero di versione azzera le cifre di rilevanza inferiore;
+ un normale numero di versione deve avere la forma `X.Y.Z`, dove `X`, `Y` e `Z` sono interi non negativi e non preceduti da zeri;
+ numeri di versione con `X` pari a 0 indicano prodotti in lavorazione, da non considerarsi pronti al rilascio;
+ dopo il rilascio, il contenuto della versione non deve essere modificato. Qualsiasi modifica successiva al rilascio deve causare un cambio nel numero di versione.
====== Documentazione
L'aggiornamento del numero di versione per la documentazione deve attenersi alle seguenti regole:
- `X`: deve essere aggiornato al cambiamento della struttura del documento. Riguarda dunque cambiamenti di organizzazione del documento, dei suoi paragrafi e della presentazione delle informazioni, nonché cambiamento dei parametri necessari nel template dei documenti;
- `Y`: deve essere aggiornato all'aggiunta o alla rimozione di paragrafi;
- `Z`: deve essere aggiornato a seguito di cambiamenti minimi o correzioni ortografiche.
Il processo di aggiornamento della versione è reso automatico, come stabilito nella sezione dedicata a GitHub Actions (@automazioni).
====== Software <versionamento_software>
L'aggiornamento del numero di versione per il software deve attenersi alle seguenti regole:
- `X`: deve essere aggiornato solo al raggiungimento di una versione del prodotto che abbia un set di funzionalità il più completo possibile. Inizialmente è dunque posto a 0, e passerà a 1 solamente al momento in cui il prodotto sarà classificabile come MVP;
- `Y`: deve essere aggiornato ogniqualvolta viene introdotta una nuova funzione nel codice o una nuova funzionalità al prodotto;
- `Z`: deve essere aggiornato ad ogni correzione di bug o cambiamento minore. Alcuni esempi di cambiamenti minori sono:
- correzioni ortografiche:
- nei nomi di variabili;
- nei nomi di parametri;
- nei nomi di funzioni o metodi.
- cambiamento nel valore di parametri:
- cambiamento di colore di un elemento grafico;
- cambiamento di un valore numerico;
- cambiamento di un valore letterale.
===== Tracciamento modifiche <tracciamento-modifiche>
Il tracciamento delle modifiche avviene per mezzo di automazioni che permettono di identificare:
- versione del documento modificato;
- data di modifica (gg-mm-aaaa, ddd);
- numero della Pull Request di riferimento;
- titolo della Pull Request di riferimento;
- autore della modifica;
- revisore incaricato.
Tali informazioni sono salvate in un file CSV, unico per ogni documento. Questo file, denominato `log.csv`, è salvato nella cartella dedicata al documento a cui si riferisce, e viene generato automaticamente da una GitHub Action invocata all'apertura, riapertura, sincronizzazione e chiusura di una Pull Request. Maggiori dettagli al paragrafo dedicato (@automazioni).
Ogni documento, nella sezione direttamente sottostante all'indice, mostra in formato tabellare le informazioni relative al tracciamento delle modifiche, leggendo le informazioni dal file `log.csv`.
#figure(table(
align: left,
columns: (1fr, 1.7fr, 0.8fr, 5fr, 2.1fr, 2.1fr),
[*Ver.*],[*Data*],[*PR*],[*Titolo*],[*Redattore*],[*Verificatore*],
[1.0.0], [11-12-2023,\ Mon], [90], [DOC-123 Redazione paragrafo], [Riccardo \ Carraro], [Mattia \ Todesco]
), caption: [Esempio tracciamento modifiche])
===== Tecnologie adoperate
====== GitHub <repository-github>
Lo strumento di versionamento scelto dal gruppo è GitHub.
Il gruppo #err418 ha creato un'organizzazione omonima su GitHub in modo da gestire e separare il lavoro in più repository pensati per scopi e contenuti diversi:
- Documenti: documentazione;
- WMS3: codice sorgente;
- PoC: Proof of Concept.
*Documenti* è il repository dedicato alla documentazione prodotta, il quale possiede tre branch principali:
- `main`: contiene i file pdf dei documenti prodotti solamente in seguito ad un processo di review con esito positivo;
- `src`: contiene i file sorgente dei documenti prodotti, file di configurazione e di supporto;
- `website`: contiene i file sorgente del sito web che espone la documentazione del gruppo.
Documenti è organizzata in modo da suddividere la documentazione necessaria alle revisioni esterne che il gruppo dovrà affrontare:
- *RTB*: contiene i file necessari alla Requirements and Technology Baseline:
- *Documentazione esterna*: contiene i documenti ad uso esterno:
- *Verbali*: contiene i verbali delle riunioni esterne;
- *doc_file_name*:
- `doc_file_name.typ`: file sorgente del documento;
- `log.csv`: registro delle modifiche associato al documento.
- *Documentazione interna*: contiene i documenti ad uso interno:
- *Verbali*: contiene i verbali delle riunioni interne;
- *doc_file_name*:
- `doc_file_name.typ`: file sorgente del documento;
- `log.csv`: registro delle modifiche associato al documento.
- *PB*: contiene i file necessari alla Product Baseline. È organizzata allo stesso modo della cartella dedicata alla RTB.
Al fine di garantire uno svolgimento delle attività in parallelo, la strategia utilizzata dal gruppo durante lo sviluppo è il _feature branching_. È presente un branch per le release e un branch per lo sviluppo dal quale vengono creati dei branch per ogni nuova funzionalità o modifica da apportare.
Questi ultimi vengono identificati dal codice `DOC-XXX`, dove `XXX` è il numero del relativo task su Jira. I branch di feature vengono integrati tramite Pull Request.
*WMS3* è il repository che contiene il codice sorgente del prodotto software sviluppato dal gruppo. È presente un branch principale, `dev`, in cui si trova il codice sorgente relativo all'ultima versione del prodotto, reperibile anche nella sezione Releases presente sulla destra dell'interfaccia di GitHub.
Il repository è organizzato in due sottocartelle principali, da cui si diramano diverse cartelle secondarie:
- *db*: contiene il file SQL utile alla creazione e popolamento del database di supporto;
- *web*: contiene il codice sorgente di frontend e backend, e si dirama in:
- *\_\_test\_\_*: contiene i test del software, in particolare:
- *DataMapperTest*: test riguardanti il pattern Data Mapper;
- *Integration Test*: test di integrazione;
- *Unit Test*: test di unità delle classi del modello.
- *app*: file riguardanti la pagina principale e lo stile;
- *components*: componenti utilizzati nel prodotto, in particolare:
- *custom*: componenti personalizzati, quali:
- form di creazione dell'ambiente 3D;
- pannelli per la visualizzazione delle impostazioni e delle varie liste di elementi del prodotto.
- *providers*: file relativi all'implementazione del pattern Provider;
- *ThreeComponents*: file relativi agli elementi 3D;
- *ui*: file relativi agli elementi dell'interfaccia grafica.
- *lib*: contiene un file riguardante il merge tra più classi del framework Tailwind CSS;
- *model*: file relativi alle classi del modello e ai pattern:
- *dataMapper*: file relativi all'implementazione del pattern Data Mapper;
- *dataRepository*: file relativi all'implementazione del pattern Repository;
- *FloorStrategy*: file relativi all'implementazione del pattern Strategy per la creazione del piano;
- *SearchEngine*: file relativi all'implementazione delle funzioni di ricerca.
- *node_modules*: cartella generata automaticamente da npm (Node Package Manager) utile alla gestione delle dipendenze di Node.js;
- *pages*: API prodotte dal gruppo;
- *public*: file SVG per la creazione del magazzino e una sottocartella di icone;
- *ServerActions*: file relativi all'implementazione delle Server Actions utilizzate.
Anche in questo repository, come per Documenti, viene applicato il _feature branching_, utilizzando `dev` come branch di appoggio per l'apertura dei branch di feature, identificati dal codice `WMS-XXX`, dove `XXX` è il numero del relativo task su Jira.
====== GitHub Actions <automazioni>
L'intero processo di versionamento è accompagnato da una serie di automazioni, realizzate tramite GitHub Actions, che sollevano i componenti del gruppo dall'onere manuale di attività come la compilazione dei documenti, l'aggiornamento del registro delle modifiche (file `log.csv`) e la pubblicazione dei documenti dopo la verifica.
*Workflow delle automazioni:*
#figure(image("./imgs/workflow_actions.svg", format: "svg", width: 100%), caption: [Workflow delle automazioni]);
Alla creazione della Pull Request si avvia il workflow per la compilazione e la registrazione delle modifiche avvenute. Prima di procedere è necessario inserire informazioni essenziali ai fini di ottenere maggiore chiarezza e tracciabilità nel messaggio di Pull Request, quali:
- titolo conforme, contenente il nome del task di riferimento su Jira legata alla Pull Request, nel formato `DOC-XXX titolo`;
- identificativo di almeno un Verificatore;
- eventuali note aggiuntive.
Il workflow è composto dai seguenti passaggi:
+ *fetch delle informazioni dei file modificati*: vengono recuperate le informazioni relative ai file modificati nella Pull Request, quali:
- nome del file;
- path del file.
+ *controllo del numero di file modificati*: se il numero di file modificati è maggiore di 1, il workflow termina con un errore;
+ *controllo dell'esistenza del file `log.csv`*: se il file non esiste, viene creato (sinonimo di creazione del documento);
+ *rilascio della review*: il Verificatore si occupa di controllare il documento e rilasciare la review, segnando i cambiamenti richiesti;
+ *richiesta di una nuova review per verificare che i cambiamenti apportati siano corretti*;
+ *nel momento in cui la review termina con esito positivo, si procede al recupero della versione corrente del documento*:
- se non esiste il corrispettivo pdf nel branch main, allora il documento non era mai stato pubblicato, pertanto la sua versione di partenza sarà fissata a 1.0.0;
- se esiste il corrispettivo pdf nel branch main, essendo la versione contenuta nel nome del file, si procede al recupero della versione corrente del documento, modificando la versione X.Y.Z in base all'analisi del documento mediante uno script Python.
+ *aggiornamento del file `log.csv`*: il file di log viene aggiornato con le informazioni relative alla modifica effettuata: questo passaggio, avvenendo solamente a seguito di review positiva, permette di garantire che vengano segnate solamente le modifiche che hanno superato il processo di Verifica;
+ *compilazione del documento*: aggiornato il file `log.csv` e recuperato il numero di versione, il documento è pronto per essere compilato, mostrando numero di versione e registro delle modifiche aggiornati;
+ *pubblicazione del documento*: terminati i workflow precedenti, se si avvia la procedura di merge a seguito del processo di Verifica, il documento pdf generato dalla compilazione viene pubblicato nel ramo main del repository;
+ *merge non confermato*: qualora a termine della compilazione del documento non venisse confermato il merge da parte del Verificatore, significa che è stato individuato un ulteriore errore o correzione da dover apportare al documento prima della sua pubblicazione sul ramo main del repository. In questa circostanza sarà dunque necessario rilasciare un'ulteriore review. L'esecuzione riprende dal punto 4.
L'azione manuale si riduce solamente al rilascio di review e conferma di merge, mentre tutte le altre attività vengono automatizzate.
All'approvazione della Pull Request, e alla conseguente chiusura del branch, un'ulteriore automazione integrata su Jira, permette di aggiornare in automatico lo stato del task collegato alla Pull Request, portandolo allo stato di "Completato".
====== Typst
Il gruppo utilizza Typst come strumento di scrittura e compilazione dei documenti. \
Al fine di dare una struttura comune ai documenti si è creato un file `template.typ` parametrizzato, sfruttando la possibilità di produrre un file pdf compilando insieme più file Typst. Questo file contiene le impostazioni di base per la creazione di un documento:
- `title`: titolo del documento;
- `subTitle`: sottotitolo del documento;
- `docType`: tipologia del documento (Verbale, Documento);
- `date`: data di creazione del documento;
- `externalPartecipants`: partecipanti esterni al gruppo;
- `authors`: autori del documento;
- `reviewers`: revisori del documento;
- `missingMembers`: membri assenti durante i meeting;
- `location`: luogo di incontro;
- `timeStart`: ora di inizio incontro;
- `timeEnd`: ora di fine incontro;
- `showLog`: flag che indica se mostrare il tracciamento delle modifiche;
- `showIndex`: flag che indica se mostrare l'indice;
- `isExternalUse`: flag che indica se il documento è per uso esterno.
Al momento della creazione di un nuovo documento sarà sufficiente importare il modello e specificare i parametri sopra elencati. \
Al fine di semplificare la procedura di creazione di un documento, è stato condiviso un documento di testo denominato `quickstart.txt` che contiene la configurazione base per la stesura dei documenti.
==== Tracciamento dei task e amministrazione dello stato di configurazione
===== Jira
Jira è lo strumento centrale per la gestione e la tracciabilità dei task assegnati ai membri del gruppo.
L'integrazione con GitHub permette a Jira di lavorare e apportare modifiche direttamente al repository del gruppo, permettendo la creazione, gestione e chiusura di branch e al conseguente aggiornamento dello stato dei task.
Ogni task è identificato da un codice univoco incrementale nel formato `DOC-XXX`, dove `XXX` è un numero positivo sequenziale, che permette di identificarlo. Ogni task è caratterizzato da:
- codice identificativo `DOC-XXX` generato automaticamente da Jira;
- titolo;
- descrizione (opzionale);
- stato ("Da completare", "In corso", "In verifica", "Completato");
- assegnatario;
- story point (stima del carico di lavoro);
- epic story (milestone) di riferimento.
Nel processo di versionamento e di tracciamento delle modifiche, Jira ricopre un ruolo fondamentale, grazie anche alla sua integrazione con GitHub: nel momento in cui si intende avviare un task, è necessario seguire i seguenti passaggi:
- aprire il task su Jira;
- selezionare l'opzione di creazione di un branch dedicato al task (integrazione con GitHub);
- selezionare il repository e il branch da cui creare il nuovo branch.
A questo punto, il task si aggiornerà nello stato "In corso" e verrà aperto il relativo branch. Terminato il task ed effettuata la Pull Request, lo stato del ticket passerà automaticamente a "In verifica". Superato il processo di Verifica, Jira provvederà ad aggiornare lo stato del task in "Completato".
====== Backlog
Ogni task da svolgere è segnato all'interno del backlog di Jira. Durante la pianificazione dello Sprint, si definisce lo Sprint backlog, il sottoinsieme di attività provenienti dal backlog che si intendono portare a termine entro la conclusione dello Sprint.
A differenza dello Sprint backlog definito durante la pianificazione, il backlog viene espanso man mano che si riscontrano nuovi task necessari o a seguito di decisioni prese durante le riunioni interne o esterne.
====== Board
Le board di Jira permettono, similmente allo Sprint backlog, di avere una visione d'insieme delle attività da svolgere, ma con un approccio più visuale e intuitivo.
I task sono organizzati in quattro colonne, rappresentanti lo stato:
- *da completare*: non ancora avviati, ovvero non esiste il branch dedicato;
- *in corso*: in fase di svolgimento, ovvero branch dedicato al task creato;
- *in verifica*: in fase di review, dopo l'apertura di una Pull Request;
- *completato*: task concluso, ovvero branch dedicato chiuso a seguito di merge sul ramo principale.
====== Timeline
La timeline di Jira permette di avere una visione delle attività incentrata sulle tempistiche e le relazioni tra i task.
Permette inoltre di mostrare il grafico di Gantt delle attività evidenziando i rapporti di dipendenza tra i task e stabilendo le scadenze necessarie per il loro svolgimento.
====== Grafici
Jira offre la possibilità di produrre grafici e report relativi all'avanzamento e alla tracciabilità dei task. Tali strumenti permettono di avere delle metriche di valutazione dell'andamento del progetto e di individuare eventuali criticità.
Il gruppo utilizza come metrica principale il burndown chart, che permette di avere una visione dell'avanzamento delle attività in base al tempo, basato sugli story point di ogni attività.
==== Controllo delle release <controllo_release>
Il controllo delle release viene gestito tramite il meccanismo di Pull Request di GitHub.
Prima di integrare i nuovi cambiamenti, viene aperta una Pull Request dall'assegnatario del task. La Pull Request deve avere un titolo valido (come descritto nel paragrafo dedicato @automazioni) e deve essere designato almeno un reviewer. Di norma il reviewer di base è il Verificatore, che svolge una supervisione sulla correttezza sintattica e semantica dei contenuti.
Nel caso in cui ci sia bisogno di una figura con delle competenze specifiche per quanto riguarda la semantica e il contenuto del materiale da revisionare, il Verificatore può essere affiancato da altri membri del gruppo.
Per ogni richiesta di modifiche da apportare vengono aperte delle conversation, in cui è possibile evidenziare le linee del documento che hanno bisogno di cambiamenti, oltre a stabilire un canale di comunicazione tra assegnatario e Verificatore.
Il processo di verifica del documento è accompagnato dall'esecuzione di GitHub Actions che si occupano di automatizzare l'aggiornamento del file `log.csv` con i dati relativi alla modifica apportata, e la compilazione e pubblicazione del documento nel ramo main del repository. In questo modo si assicura che ogni documento presente nel ramo principale sia prima stato sottoposto ad un processo di verifica.
Si può procedere alla chiusura della Pull Request e con l'operazione di merge solo nel caso in cui tutte le conversation siano state risolte e siano stati applicati i cambiamenti richiesti in fase di review.
Solo a seguito del merge della Pull Request, il task collegato presente in Jira può essere definito concluso e il relativo branch viene chiuso in modo automatico.
== Processo di Gestione delle Informazioni <processo_gestione_informazioni>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.6_
=== Scopo
Lo scopo del processo di Gestione delle Informazioni è generare, ottenere, confermare, trasformare, conservare, recuperare e distribuire le informazioni e la relativa documentazione agli stakeholder interessati, garantendone chiarezza, completezza, consistenza, tracciabilità e presentazione.
Le informazioni possono essere tecniche, di progetto, organizzative e di accordo.
=== Informazioni gestite
Le informazioni gestite dal gruppo sono:
- documentazione:
- #pdp\;
- #ndp\;
- #pdq\;
- #adr\;
- #glo\;
- Verbali.
- codice sorgente:
- Proof of Concept (PoC);
- Minimum Viable Product (MVP).
Codice sorgente e documenti sono creati, organizzati, aggiornati, versionati e distribuiti all'interno dei repository del gruppo.
=== Documentazione <norme-documentazione>
==== Struttura dei documenti <struttura-documenti>
Ogni documento segue una struttura standard, stabilita nel template `template.typ`. \
Questo paragrafo non tratta della struttura dei verbali. Per le norme sulla struttura dei verbali si rimanda alla @struttura-verbali.\
I documenti pertanto sono così strutturati:
+ *Cover page*: la cover page è la pagina iniziale del documento. Essa contiene le seguenti informazioni:
- nome del gruppo;
- link all'organizzazione GitHub;
- indirizzo e-mail del gruppo;
- logo;
- titolo del documento;
- sottotitolo del documento;
- versione;
- stato;
- tipo di uso: interno od esterno;
- Responsabile del gruppo;
- redattori;
- verificatori;
- destinatari;
- partecipanti esterni (se presenti).
+ *Registro delle modifiche*: sezione successiva alla cover page. Maggiori dettagli sono disponibili alla sezione dedicata (@tracciamento-modifiche);
+ *Indici*: Sono presenti tre tipologie di indici:
- indice del contenuto: indice sempre presente che rappresenta i paragrafi del documento;
- indice delle tabelle: indice presente solo se sono presenti tabelle nel documento;
- indice delle figure: indice presente solo se sono presenti figure nel documento.
+ *Contenuto del file*: sezione successiva agli indici. Rappresenta il corpo del documento, suddiviso in paragrafi.
==== Struttura dei verbali <struttura-verbali>
Al fine di rendicontare argomenti, decisioni, aggiornamenti, problematiche e attività oggetto di discussione durante i meeting interni ed esterni, il gruppo raccoglie tali informazioni all'interno di verbali redatti al termine dei meeting.
===== Verbali interni di retrospettiva <struttura-verbali-retrospettiva>
+ *cover page* (@struttura-documenti);
+ *Informazioni generali*:
- luogo: il luogo reale o piattaforma software dove il gruppo svolge il meeting;
- data e ora nel formato `dd/mm/aaaa @ hh:mm ~ hh:mm`;
- partecipanti;
- assenti.
+ *Ordine del giorno*: elenco degli argomenti trattati durante la riunione;
+ *Valutazione del progresso generale*: descrive il lavoro svolto durante lo Sprint a cui si riferisce la retrospettiva. Questo paragrafo è così definito:
- valutazione sulla qualità del lavoro in merito alla velocità di avanzamento, evidenziando eventuali rallentamenti o meriti riscontrati. In questa parte deve essere indicato se sono stati effettuati meeting esterni, riportando data e oggetto di ogni meeting svolto;
- sottoparagrafi per ogni epic su cui si è lavorato in cui viene riportata una descrizione del lavoro svolto. Se in una epic sono stati svolti diversi lavori, questi vanno riportati in forma di elenco non numerato.
+ *Analisi di retrospettiva*, suddiviso in:
- discussione delle principali metriche del #pdq riguardanti l'andamento dello Sprint e del progetto:
- CPI: valore precedente e valore attuale;
- EAC: valore precedente e valore attuale;
- rapporto tra SEV e SPV.
- *Keep doing*: riporta gli aspetti positivi dello Sprint;
- *Improvements*: riporta le criticità riscontrate dal gruppo etichettate con un codice identificativo, e le relative soluzioni. Si articola in due parti:
- *Criticità evidenziate*: riporta l'elenco delle criticità, ognuna identificata da un codice composto nel seguente modo:
- *P*, lettera indicante una problematica;
- *O/T*, a seconda se la problematica sia di origine organizzativa o tecnologica;
- *N*, intero naturale positivo che incrementa ad ogni nuova problematica di tipo organizzativo o tecnologico.
- *Soluzioni predisposte*: tabella che associa ad ogni criticità una soluzione. È suddivisa in tre colonne:
- ID risoluzione;
- Titolo: titolo o breve descrizione della soluzione;
- Criticità affrontate.
+ eventuali ulteriori argomenti affrontati, organizzati in paragrafi indipendenti;
+ *Pianificazione*: riporta la tabella contenente i task programmati per lo Sprint successivo. Questa tabella è automaticamente generata da un foglio di calcolo elettronico condiviso realizzato in Google Sheets (maggiori dettagli in merito reperibili al paragrafo @google_sheets) e disponibile nel Google Drive del gruppo.
===== Verbali esterni <struttura-verbali-esterni>
La struttura dei verbali esterni deve rispecchiare i primi tre punti della @struttura-verbali-retrospettiva. In "Partecipanti" dovranno essere riportati i nominativi dei partecipanti esterni e il ruolo svolto all'interno del meeting. Ogni argomento della sezione "Ordine del giorno" dovrà essere discusso in una sottosezione dedicata.
Nei verbali esterni riguardanti gli incontri con il Proponente dovrà essere presente la sezione "Pianificazione incontri futuri", nella quale si riporta la data del prossimo meeting.
===== Altri verbali interni <struttura-verbali-interni-generali>
La struttura dei verbali interni che non riguardano la retrospettiva deve rispecchiare i primi tre punti della @struttura-verbali-retrospettiva. Ogni argomento della sezione "Ordine del giorno" dovrà essere discusso in una sottosezione dedicata.
Nel caso in cui da un meeting interno scaturiscano nuovi task da svolgere, questi dovranno essere riportati in una sezione "Pianificazione" all'interno di una tabella.
=== Stile e convenzioni <stile-convenzioni>
Al fine di uniformare e conformare i prodotti del progetto, il gruppo ha stabilito delle convenzioni stilistiche e di scrittura da rispettare durante la stesura dei documenti e del codice.
L'obiettivo è perseguire:
- chiarezza;
- leggibilità;
- manutenibilità.
==== Convenzioni stilistiche globali
===== Nomi dei documenti <norma_nomi_documenti>
Ogni parola dei titoli dei documenti deve iniziare con la lettera maiuscola, ad eccezione delle preposizioni e degli articoli.\
I verbali avranno come titolo la data del verbale nel formato `yyyy-mm-dd`.
Se si fa riferimento al contenuto di un documento, dopo il rispettivo titolo riportare anche la versione nel formato `\_vX.Y.Z`. \
Esempio: #ndp_v
===== Formato data
All'interno del documento, le date seguiranno il formato locale `dd/mm/yyyy`, mentre all'interno dei nomi dei file il formato utilizzato sarà `yyyy-mm-dd`, dove:
- *dd*: numero del giorno con due cifre;
- *mm*: numero del mese con due cifre;
- *yyyy*: numero dell'anno con quattro cifre.
==== Convenzioni stilistiche documentali
Convenzioni stilistiche specifiche per i prodotti documentali.
===== TODO
Per indicare sezioni del documento da completare, il gruppo ha deciso di utilizzare il termine TODO, che verrà in automatico mostrato in rosso e riquadrato, riportando il messaggio "_Riferimento assente_".\
Il risultato è il seguente: #TODO.\
Questo permette di individuare facilmente le parti del documento da completare.
===== Corsivo, grassetto, maiuscole e monospace
_Corsivo_:
- citazioni;
- formati;
- nomi di practice;
- nomi propri di dominio.
*Grassetto*:
- titoli;
- parole chiave e significative;
- termini iniziali di elenchi puntati che necessitano spiegazione.
MAIUSCOLO:
- acronimi;
- nomi propri;
- nomi strumenti e tecnologie;
- iniziale nomi ruoli;
- iniziale parole nei nomi documenti ad eccezione di preposizioni e articoli. Riferimento nomi file disponibile alla @norma_nomi_documenti.
`Monospace`:\
- nome di un file (Riferimento nomi file disponibile alla @norma_nomi_documenti);
- parametri;
- porzioni di codice.
===== Elenchi
- si utilizzano elenchi numerati se gli elementi mostrati richiedono un ordine (es. ordine delle sezioni);
- si utilizzano elenchi non numerati se gli elementi mostrati non richiedono un ordine (es. lista di attività);
- al termine di ogni punto dell'elenco viene posto ";" ad eccezione dell'ultimo elemento a cui viene posto ".".
===== Glossario
Tutte le occorrenze dei termini contenuti nel glossario sono evidenziati con una G in corsivo a pedice.
===== Variabili Typst per termini ricorrenti
Al fine di uniformare termini ricorrenti, vengono predisposte variabili utilizzabili nella redazione dei documenti. I termini in considerazione sono relativi a:
- nomi di documenti;
- stakeholder;
- documenti e la versione a cui si fa riferimento;
- ultima data di accesso ad un link ad una risorsa web esterna.
Di seguito viene riportata la tabella delle variabili e la loro rappresentazione all'interno del documento compilato:
#figure(
table(
columns: 2,
[*Variabile*],[*Risultato*],
[`\#err418`],[#err418],
[`\#cardin`],[#cardin],
[`\#vardanega`],[#vardanega],
[`\#adr`],[#adr],
[`\#adr_v`],[#adr_v],
[`\#ris`],[#ris],
[`\#ris_v`],[#ris_v],
[`\#glo`],[#glo],
[`\#glo_v`],[#glo_v],
[`\#ndp`],[#ndp],
[`\#ndp_v`],[#ndp_v],
[`\#pdp`],[#pdp],
[`\#pdp_v`],[#pdp_v],
[`\#pdq`],[#pdq],
[`\#pdq_v`],[#pdq_v],
[`\#lastVisitedOn(day, month, year)`],[#lastVisitedOn(1, 1, 2024)],
),
caption: "Variabili Typst per riferirsi a termini ricorrenti"
)
Tutte le variabili sono definite all'interno del file `common.typ`, reperibile nella root del repository Documenti.
=== Distribuzione delle informazioni
Il gruppo condivide il materiale prodotto all'interno di un repository dedicato reperibile al link:\
#align(link("https://github.com/Error-418-SWE/Documenti"), center)
Maggiori dettagli in merito all'organizzazione del repository sono reperibili qui: @repository-github.
== Processo di Misurazione <processo_misurazione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.7_
=== Scopo
Lo scopo del processo di Misurazione è raccogliere, analizzare e riportare dati e informazioni, al fine di dimostrare la qualità di prodotti, servizi e processi.\
Questo processo viene svolto affinché il gruppo sia in grado di prendere le corrette decisioni per gestire al meglio il raggiungimento dei propri obiettivi.\
Le misure devono soddisfare determinate caratteristiche di qualità, ovvero devono essere:
+ verificabili;
+ significative;
+ attuabili;
+ tempestive;
+ economicamente vantaggiose.
Definiamo il concetto di "qualità" come segue: insieme delle caratteristiche di un'entità, che ne determinano la capacità di soddisfare esigenze sia esplicite che implicite.
=== Risultati
A seguito dell'implementazione efficace del processo di Misurazione:
- vengono identificate le esigenze informative;
- viene identificato e sviluppato un insieme appropriato di misure basato sulle esigenze informative;
- i dati necessari vengono raccolti, verificati e archiviati;
- i dati vengono analizzati e i risultati interpretati;
- gli elementi informativi forniscono informazioni oggettive per poter prendere decisioni concrete.
I risultati sono contenuti nel documento #pdq_v.
=== Attività
Il gruppo deve implementare le seguenti attività in conformità con le politiche e le procedure applicabili al processo di Misurazione definito nel #pdq_v\:
+ tracciamento delle metriche di qualità:
Ogni metrica di qualità deve essere tracciata e monitorata per garantire che i processi e i prodotti soddisfino gli obiettivi di qualità stabiliti. Il codice identificativo delle metriche è così composto:
#align(center, `MXY.Z`)
dove:
- `X` può assumere i valori `P` o `S`, a seconda che la metrica sia relativa a Processi o al prodotto Software;
- `Y` è un numero naturale che identifica la metrica;
- `Z` è un numero opzionale che identifica l'eventuale estensione della metrica, come avviene ad esempio per PV che si estende in SPV e PPV.
+ prepararsi per la misurazione:
- definire la strategia di misurazione per i processi primari. La strategia scelta si compone di metriche mirate alla valutazione dei processi primari, quali:
- MP1 - BAC (Budget at Completion);
- MP2 - PV (Planned Value), che si estende in:
- MP2.1 - SPV (Sprint Planned Value);
- MP2.2 - PPV (Project Planned Value).
- MP3 - AC (Actual Cost), che si estende in:
- MP3.1 - SAC (Sprint Actual Cost);
- MP3.2 - PAC (Project Actual Cost).
- MP4 - EV (Earned Value), che si estende in:
- MP4.1 - SEV (Sprint Earned Value);
- MP4.2 - PEV (Project Earned Value).
- MP5 - CPI (Cost Performance Index);
- MP6 - EAC (Estimated at Completion).
- definire la strategia di misurazione per i processi di supporto. La strategia scelta si compone di una serie di parametri e metriche che permettono di valutare la qualità dei processi di supporto:
- MP7 - EO (Errori Ortografici);
- MP8 - MS (Metriche Soddisfatte).
- definire la strategia di misurazione per la qualità del prodotto. La strategia scelta si compone di metriche mirate alla valutazione della qualità del prodotto, quali:
- MS1 - MRC (Mandatory Requirements Coverage);
- MS2 - DRC (Desiderable Requirements Coverage);
- MS3 - ORC (Optional Requirements Coverage);
- MS4 - ART (Average Response Time);
- MS5 - LT (Learnability Time);
- MS6 - EOU (Ease of Use);
- MS7 - CC (Ciclomatic Complexity);
- MS8 - CL (Coupling Level);
- MS9 - RC (Responsability Count);
- MS10 - CCV (Code CoVerage);
- MS11 - BCV (Branch CoVerage);
- MS12 - FD (Failure Density);
- MS13 - SBV (Supported Browser Version).
- descrivere le caratteristiche del gruppo rilevanti per la misurazione, come obiettivi aziendali e obiettivi tecnici:
- richieste del Proponente;
- requisiti individuati.
- definire procedure di raccolta, analisi, accesso e reportistica dei dati:
- #pdq: definisce i criteri e le modalità di misurazione e reportistica dei dati misurati.
- definire criteri per valutare gli elementi informativi e il processo di Misurazione:
- #pdq: definisce i valori ottimali e accettabili della strategia di misurazione adottata a cui tutti i documenti prodotti devono conformarsi.
- identificare e pianificare le azioni da intraprendere per i casi in cui i parametri di misurazione di qualità non vengano rispettati.
+ eseguire la misurazione:
- integrare procedure manuali o automatizzate per la generazione, raccolta, analisi e reportistica dei dati nei processi pertinenti:
- controllo manuale di conformità dei documenti prodotti ai parametri individuati per i processi primari;
- controllo manuale di conformità dei documenti prodotti ai parametri individuati per i processi di supporto;
- revisione esterna e manuale dei documenti prodotti per il controllo di leggibilità e di eventuali errori ortografici.
- raccogliere, archiviare e verificare i dati:
- i dati prodotti vengono salvati e analizzati al fine di perorare una strategia di approccio ed eventuali modifiche da effettuare.
- registrare i risultati e comunicarli agli stakeholder:
- vengono riferiti periodicamente al Proponente gli avanzamenti e la conformità del progetto alle richieste concordate.
Maggiori dettagli in merito alla definizione, al calcolo e l'analisi delle metriche sono reperibili all'interno del documento #pdq_v.
== Processo di Controllo della Qualità <processo_controllo_qualità>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.3.8_
=== Scopo
La International Software Testing Qualifications Board (ISTQB) definisce il processo di Controllo della Qualità come "insieme di attività incentrate sul garantire che i requisiti di qualità saranno soddisfatti".\
Il processo di Controllo della Qualità ha come obiettivo principale quello di garantire l'applicazione efficace del processo di Gestione della Qualità da parte del gruppo.\
Il suo focus fondamentale è fornire la sicurezza e la certezza che i requisiti di qualità stabiliti saranno pienamente soddisfatti.
Questo si ottiene mediante un'analisi proattiva attenta dei processi e dei risultati che caratterizzano il ciclo di vita del progetto.\
L'obiettivo è assicurare che il prodotto risponda alle aspettative in termini di qualità, e che ciò avvenga in piena conformità con le linee guida, le politiche e le procedure precedentemente definite.
In altre parole, la finalità ultima è garantire che la qualità desiderata sia intrinseca al prodotto finale e che ogni fase del processo segua gli standard e le disposizioni stabilite dal gruppo e dal progetto.\
=== Risultati
L'implementazione riuscita del processo di Controllo della Qualità produce i seguenti risultati:
- sono definite e implementate le procedure di Controllo della Qualità del progetto;
- vengono definiti criteri e metodi per la valutazione di Controllo della Qualità;
- vengono eseguite valutazioni dei prodotti, servizi e processi del progetto;
- vengono forniti agli stakeholder i risultati delle valutazioni;
- vengono trattati i problemi emersi durante il periodo di sviluppo.
=== Attività
Le seguenti attività devono essere implementate in conformità con le politiche e le procedure del gruppo:
+ *prepararsi per il Controllo della Qualità*:
- *definire una strategia di Controllo della Qualità*. Essa consiste in:
+ *ruoli, responsabilità e autorità definite*:
- i ruoli e i compiti di ciascun membro sono definiti e non ambigui;
- ogni individuo fisico viene informato a scadenza bisettimanale dei propri compiti e delle proprie responsabilità per quel periodo di tempo.
+ *criteri di valutazione definiti per processi, prodotti e servizi*:
- il valore delle metriche di controllo dei processi primari deve essere accettabile;
- il valore delle metriche di controllo dei processi di supporto deve essere accettabile;
- le tempistiche da rispettare devono essere definite;
- i requisiti funzionali devono essere definiti;
- i requisiti non funzionali devono essere definiti.
+ *attività di verifica, convalida, monitoraggio, misurazione, revisione per i prodotti o servizi*:
- assegnazione di un Verificatore con il compito di monitorare e testare la qualità del materiale prodotto;
- il Verificatore ha il compito di segnalare eventuali incongruenze con le metriche di qualità al redattore.
+ *risoluzione dei problemi e attività di miglioramento di processo e prodotto*:
- le modifiche devono essere effettuate su indicazioni del Verificatore.
- *stabilire l'indipendenza del controllo della qualità dagli altri processi del ciclo di vita*:
- il Verificatore deve essere una persona fisica diversa da quella che ha redatto il documento.
+ *eseguire valutazioni di processi, prodotti e servizi*:
+ il Verificatore deve valutare i prodotti e i servizi al fine di garantirne la conformità rispetto ai criteri stabiliti;
+ il Verificatore deve assicurarsi che la verifica e la convalida degli output dei processi del ciclo di vita siano eseguiti conformemente con quanto concordato in precedenza;
+ il Verificatore deve applicare il processo di Misurazione della qualità per verificare che il prodotto o servizio rispetti le metriche precedentemente stabilite;
+ il Verificatore deve esprimere un giudizio e segnalare eventuali problematiche riscontrate.
+ *gestire report e record del Controllo della Qualità*:
+ *stilare report e record relativi alle attività di Controllo della Qualità*:
- i report e i record vengono generati tramite l'utilizzo coordinato di Jira, Google Sheets e Grafana che porta alla creazione di un cruscotto di qualità. Si rimanda a @tecnologie_controllo per ulteriori dettagli.
+ *mantenere, archiviare e distribuire i report*:
- il cruscotto di qualità è consultabile in ogni momento da ogni membro del gruppo, che possiede un link per accedervi. L'aggiornamento del cruscotto avviene in automatico e in tempo reale grazie al suo collegamento con Jira.
+ *identificare incidenti e problemi associati alle valutazioni effettuate*:
- in sede di retrospettiva, il gruppo lavora in modo coordinato per identificare gli incidenti e i problemi, servendosi delle informazioni presentate dal Verificatore tramite il cruscotto di qualità;
- l'Amministratore si occupa della redazione di un verbale contenente anche gli esiti del processo di Controllo della Qualità.
+ *trattare incidenti e problemi*:
+ in caso di segnalazione di incidenti e problemi deve essere svolto un lavoro collettivo per la loro risoluzione;
+ tutte le criticità devono prevedere risoluzioni e arginamenti già predisposti all'interno del documento #pdp_v\;
+ nel caso tali problemi o incidenti siano di carattere generale, deve essere avvisato collettivamente il gruppo dell'insorgenza di tali problemi o incidenti, al fine di evitare future ricorrenze degli stessi.
==== Tecnologie <tecnologie_controllo>
===== Jira
Jira, essendo l'ITS del gruppo, è la fonte principale di informazioni per il cruscotto di qualità.
===== Google Sheets <google_sheets>
Google Sheets viene utilizzato per rendere meglio manipolabili i dati provenienti da Jira, in modo da poterli analizzare con più facilità e calcolare comodamente metriche come CPI, EAC, EV.
===== Grafana <grafana>
Grafana è l'applicazione utilizzata per visualizzare i dati raccolti tramite l'implementazione di un cruscotto di qualità. Le informazioni mostrate sono le seguenti:
- Sprint rimanenti;
- budget rimanente;
- rapporto EAC e BAC;
- andamento CPI;
- rapporto PPV, PAC e PEV;
- metriche soddisfatte;
- ore svolte e rimanenti per ruolo;
- task svolti;
- story point per stato;
- bug aperti.
I dati sono visualizzati sotto forma di grafici, per aiutarne l'analisi e la comprensione, e sono consultabili in ogni momento dal gruppo.
= Processi tecnici
== Processo di Analisi della Missione <processo_missione>
_Tailored conformance on ISO/IEC/IEEE 12207:2017 clause 6.4.1 per ISO/IEC/IEEE 12207:2017 Annex A_
=== Scopo
Il processo di Analisi della Missione definisce i problemi e le opportunità dai quali scaturisce il progetto, caratterizza lo spazio delle soluzioni e determina una classe di soluzione preferita.
=== Strategia di identificazione e analisi della missione
==== Sistemi e servizi abilitanti
Gli strumenti di comunicazione adottati dal gruppo sono descritti nella @comunicazione_interna.
==== Opportunità
Si analizzano i problemi e le opportunità per acquisire una panoramica completa del contesto presentato dal Capitolato.
Si identifica l'ambito del Capitolato attraverso la definizione di:
- difetti e _pain point_ delle soluzioni pre-esistenti, se disponibili;
- soluzioni alternative, con vantaggi e svantaggi rispetto alle soluzioni pre-esistenti, se disponibili;
- contesto tecnologico di applicazione;
- tipologia di utenza attesa;
- destinazione d'uso del prodotto finale.
La sintesi di bisogni e requisiti avviene nel contesto del processo di Definizione di Bisogni e Requisiti degli Stakeholder disponibile nella @processo_bisogni.
==== Classi di soluzione
Si identificano classi di soluzione che possano sfruttare le opportunità e risolvere i problemi individuati.
Le classi di soluzione possono comprendere lo sviluppo o la modifica di sistemi software pre-esistenti.
Le classi di soluzione individuano le potenziali tecnologie che ci si aspetta essere necessarie. Possono includere l'identificazione di specifici sistemi o prodotti software adatti al riutilizzo.
Nel contesto del progetto didattico, il gruppo accetta le classi di soluzione proposte nel Capitolato, eventualmente utilizzandole come base per la formulazione di classi di soluzione alternative.
==== Valutazione delle classi di soluzione
Si valuta ogni classe di soluzione identificata sulla base di:
- fattibilità;
- costi;
- tempi necessari;
- rischi;
- interesse tecnologico e didattico;
- pertinenza.
La valutazione delle classi di soluzione può avvenire tramite:
- studio della documentazione dei sistemi o prodotti software identificati;
- realizzazione di esploratori tecnologici (detti _Proof of Concept_ o PoC);
- consultazione di esperti, quali Proponente e Committente.
Sulla base dei risultati della valutazione, il gruppo individua una classe di soluzione preferita e la presenta al Proponente per la convalida.
==== Analisi dei requisiti
Il documento #adr raccoglie le informazioni previste da questo processo. Il documento deve ricevere approvazione esplicita da parte degli Stakeholder coinvolti.
== Processo di Definizione di Bisogni e Requisiti degli Stakeholder <processo_bisogni>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.2_
=== Scopo
Il processo di Definizione di Bisogni e Requisiti degli Stakeholder definisce i requisiti di un sistema che possa fornire le funzionalità di cui gli utenti e gli stakeholder necessitano.
Il processo identifica gli stakeholder coinvolti con il sistema durante l'intero suo ciclo di vita.
Identifica inoltre i loro bisogni, li analizza e li trasforma in un insieme condiviso di requisiti che:
- esprima i comportamenti attesi che il sistema dovrà avere nel suo ambiente operativo;
- cataloghi e prioritizzi ciascun requisito;
- riporti le fonti di ciascun requisito;
- funga da riferimento per la validazione dell'implementazione di ciascun requisito.
=== Stakeholder
Sono identificati tutti quegli stakeholder che possiedano una forte influenza sugli obiettivi, le strategie, l'operatività e le caratteristiche del prodotto.
==== Matrice degli stakeholder
Si classificano gli stakeholder individuati sulla base di:
- coinvolgimento nel progetto: indica l'interesse dello stakeholder nell'ambito di progetto;
- autorità sullo sviluppo: indica il potere decisionale esercitabile nell'ambito di progetto.
Entrambe le classificazioni si strutturano su tre livelli: basso, medio, alto.
==== Modalità di comunicazione <modalita-comunicazione>
Per ciascuno stakeholder si identificano i canali e la frequenza della comunicazione.
=== Strategia di identificazione, analisi e trasformazione dei bisogni
Il gruppo adotta una strategia iterativa per l'identificazione, l'analisi e la trasformazione dei bisogni in requisiti. L'approccio è finalizzato alla raccolta di feedback e prevede:
- interviste e questionari;
- studio individuale di tecnologie abilitanti e documentazione tecnica;
- acquisizione di conoscenze tramite workshop interni e _brainstorming_;
- osservazione delle criticità delle soluzioni software preesistenti.
Le comunicazioni con gli stakeholder avvengono nelle modalità descritte in @modalita-comunicazione.
Le attività sono supportate, quando utile, da documenti, immagini, dimostratori tecnologici e in generale qualsiasi elemento informativo utile alla comprensione dei bisogni degli stakeholder. Le informazioni sono organizzate in modo da supportare l'identificazione, l'analisi e la trasformazione dei bisogni in requisiti. Il livello di astrazione adottato può differire in base all'interlocutore e al progresso globale conseguito dal processo di Definizione di Bisogni e Requisiti degli Stakeholder.
Lo strumento adottato a supporto di queste operazioni è Miro.
I bisogni espressi da Committente e Fornitore sono raccolti, catalogati, analizzati ed espressi nel documento di #adr prodotto dal gruppo.
Alcuni stakeholder possono avere interessi avversi a quelli del gruppo o in contrasto con gli interessi di altri stakeholder. Qualora gli interessi degli stakeholder siano tra di essi contrastanti, ma non siano avversi al gruppo o al sistema software, il gruppo si adopera per mediare i contrasti. La strategia di mediazione prevede l'identificazione di un sottoinsieme di interessi e bisogni comuni, il confronto con le parti e la definizione di strategie di mediazione calate nella fattispecie.
Gli intenti o i desideri di chi si oppone al gruppo o ad uno o più dei processi di ciclo di vita del sistema software sono affrontati tramite il processo di Gestione dei Rischi disponibile alla @processo_gestione_rischi.
Il negoziato tra le parti potrebbe essere richiesto per mediare posizioni mutualmente incompatibili, o a causa di vincoli o budget insufficiente. Anche la data di consegna prevista incide sulla realizzazione dei requisiti. Sarà sempre necessario consultare gli stakeholder coinvolti per raggiungere un accordo. Le decisioni saranno tracciate e rese disponibili agli stakeholder.
==== Identificazione dei bisogni <identificazione-bisogni>
Include l'elicitazione dei bisogni direttamente dagli stakeholder o dalla documentazione fornita da essi, oppure la raccolta di bisogni impliciti basati sul dominio applicativo ed i contesti tecnologico, legislativo, normativo.
I bisogni degli stakeholder scaturiscono da fonti diverse. Il gruppo si impegna ad esplorare e valutare, al fine di identificare possibili bisogni, almeno questi frangenti:
- obiettivi di alto livello che il sistema dovrebbe conseguire;
- contributi concreti che il sistema dovrebbe apportare a beneficio degli stakeholder;
- scenari operativi, utili per limitare l'ambito e comprendere le aspettative e i bisogni;
- scenari operativi quotidiani, utili per assegnare una priorità ai bisogni;
- tipologie e caratteristiche degli utenti;
- ambiente operativo e contesto d'utilizzo;
- aspettative sulle prestazioni e la disponibilità del sistema;
- pratiche di business;
- norme, leggi o altri vincoli esterni.
==== Definizione delle priorità
Le preferenze espresse dagli stakeholder, coadiuvate dal processo di Gestione delle Decisioni (@processo_gestione_decisioni), guidano la selezione e la prioritizzazione dei requisiti.
==== Casi d'uso
Si definisce un insieme di casi d'uso (anche detti use case, abbreviato in UC) che identifichi tutte le funzionalità attese.
I casi d'uso sono definiti ed utilizzati nel documento di #adr. Essi sono:
- fonte di bisogni e, indirettamente, di requisiti;
- un ausilio per l'esplorazione degli aspetti descritti nella @identificazione-bisogni.
Ogni caso d'uso comprende:
+ Codice identificativo e titolo;
+ Attore principale;
+ Precondizioni;
+ Postcondizioni;
+ Scenario principale;
+ Scenari alternativi (opzionale);
+ User story associata;
+ Generalizzazioni (opzionale);
+ Estensioni (opzionale);
+ Requisiti derivati.
Il codice identificativo assume l'aspetto `UC-X.Y`, dove `UC-` è la radice del codice; `X` è una cifra positiva crescente di cifre che identifica un caso d'uso; `Y` è una cifra positiva crescente, attiva solo per le generalizzazioni di uno stesso caso d'uso.
I casi d'uso sono arricchiti con diagrammi realizzati secondo la sintassi Unified Modeling Language (UML) 2.0.
In nessun caso i casi d'uso propongono o presumono soluzioni implementative.
==== Identificazione dei vincoli
I vincoli sono un tipo di requisito. Possono derivare da:
- stakeholder;
- sistemi software a supporto dei processi di ciclo di vita;
- budget disponibile;
- considerazioni su prestazioni, affidabilità, sicurezza, disponibilità, manutenibilità;
- altre attività dei processi di ciclo di vita.
Sono classificati per priorità e per fonte.
==== Analisi dei requisiti
Il documento #adr raccoglie le informazioni previste. Il documento deve ricevere approvazione esplicita da parte degli stakeholder coinvolti.
== Processo di Definizione dell'Architettura <processo_definizione_architettura>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.4_
=== Scopo
Il processo di Definizione dell'Architettura ha come scopo la creazione di uno o più modelli architetturali, nei quali si descrivono più proposte di organizzazione del prodotto dal punto di vista della comunicazione tra le sue componenti. Il modello architetturale definitivo viene deciso in collaborazione con il Proponente, in quanto deve soddisfare i suoi bisogni oltre che i requisiti individuati.
Per avere una migliore comprensione del problema da affrontare e trovare così una soluzione soddisfacente, è possibile iterare questo processo insieme ai processi di Analisi della Missione (@processo_missione), di Definizione di Bisogni e Requisiti degli Stakeholder (@processo_bisogni) e di Definizione del Design (@processo_design).
=== Risultati
Come risultato della corretta implementazione del processo di Definizione dell'Architettura:
- vengono definite più opzioni architetturali;
- vengono valutate le opzioni e decisa un'architettura definitiva;
- i bisogni degli stakeholder sono soddisfatti dall'architettura;
- l'architettura individuata viene descritta nel documento #st\.
=== Attività
==== Preparazione e requisiti <preparazione_architettura>
Il Progettista è il ruolo principale all'interno di questo processo. Il numero di persone assegnate a questo ruolo e le attività che esso dovrà svolgere vengono definite in maniera precisa durante la riunione di retrospettiva e la pianificazione dello _Sprint_ che la segue.
È importante che il Progettista abbia una buona conoscenza dei pattern architetturali e dei concetti principali che riguardano la progettazione architetturale. In particolare, di ogni pattern deve conoscere:
- definizione;
- aspetti positivi e negativi.
È essenziale, inoltre, la conoscenza degli obiettivi del prodotto e lo studio del documento #adr_v e delle tecnologie che il gruppo ha selezionato per la sua implementazione.
==== Individuazione dell'architettura
Successivamente all'acquisizione delle conoscenze necessarie, il Progettista può procedere all'individuazione di una o più proposte architetturali per il prodotto. In questa attività, oltre alla conoscenza dei pattern descritta nella @preparazione_architettura, sarà necessario analizzare anche gli aspetti positivi e negativi del pattern nel contesto del prodotto da sviluppare, in modo da individuare le alternative più adatte.
Le proposte architetturali individuate saranno poi illustrate al Proponente durante un meeting, il quale potrà contribuire alla decisione dell'architettura definitiva del prodotto. Il gruppo, una volta individuata l'architettura finale, dovrà descriverne i dettagli all'interno del documento #st (@specifica_tecnica).
È importante che nella scelta architetturale si mantenga un certo focus sulle caratteristiche principali di una buona architettura, riportate nell'elenco che segue:
- *sufficienza*: deve soddisfare i requisiti;
- *comprensibilità*: deve essere capita da tutti gli stakeholder;
- *modularità*: deve essere composta da parti distinte;
- *robustezza*: deve essere capace di gestire errori e condizioni limite;
- *flessibilità*: deve essere facilmente modificabile;
- *riusabilità*: le sue parti possono essere impiegate in altre applicazioni;
- *disponibilità*: la sua manutenzione causa poca indisponibilità totale;
- *sicurezza rispetto a malfunzionamenti*: deve funzionare anche in presenza di guasti;
- *semplicità*: ogni parte contiene solo il necessario e niente di superfluo;
- *incapsulazione*: deve nascondere all'esterno le parti interne dei suoi componenti;
- *coesione*: deve raggruppare le parti che svolgono gli stessi compiti;
- *basso accoppiamento*: parti distinte dipendono poco o niente le une dalle altre.
==== #st <specifica_tecnica>
Insieme all'architettura del prodotto costituisce uno degli output principali del processo. In questo documento viene descritto il prodotto dal punto di vista tecnico, ovvero dal lato tecnologico e architetturale.
Gli argomenti principali trattati nel documento sono due:
+ *tecnologie*: vengono presentate le tecnologie utilizzate dal gruppo all'interno del prodotto. Di ognuna dovranno essere riportati:
- nome;
- breve descrizione;
- numero di versione;
- link al sito web;
- linguaggi che utilizza;
- contesto di utilizzo.
+ *architettura*: vengono presentate:
+ *architettura di sistema*: descrizione dell'architettura del prodotto per componenti, ruoli, connessioni e interazioni;
+ *architettura di deployment*: descrizione dell'architettura e della procedura di deployment.
Nel documento dovranno essere descritti nel dettaglio i design pattern utilizzati nel prodotto e derivati dalle tecnologie, inserendo anche i relativi diagrammi UML, e ogni altro aspetto progettuale che sia rilevante ai fini dell'architettura e del design del prodotto.
== Processo di Definizione del Design <processo_design>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.5_
=== Scopo
Lo scopo del processo di Definizione del Design è di fornire dati e informazioni riguardo il sistema e i suoi elementi per consentirne l'implementazione coerente con le entità architetturali definite nei modelli
e nelle viste dell'architettura del sistema.
=== Risultati
Come risultato dell'efficace attuazione del processo di Definizione del Design:
- vengono definite le caratteristiche di ogni elemento del sistema;
- vengono allocati i requisiti software negli elementi di sistema;
- vengono scelti i software da utilizzare per la creazione dei diagrammi a supporto del design;
- vengono definite le interfacce fra gli elementi del sistema;
- vengono valutate le alternative di design;
- vengono disegnati i diagrammi a supporto del design;
- viene effettuato il tracciamento fra i requisiti software e gli elementi di sistema.
Le scelte di design relative agli elementi di sistema e i relativi diagrammi sono illustrati nel documento #st\.
=== Attività
==== Pianificazione della Definizione del Design
L'attività consiste nei seguenti task:
+ *definire la strategia della Definizione del Design*:\
la strategia del processo di Definizione del Design consiste in:
- decomporre il sistema in parti componibili;
- organizzare di tali componenti (stabilendo ruoli, responsabilità e interazioni);
- stabilire le interfacce fra i componenti;
- stabilire i paradigmi di composizione per collegare i componenti fra loro.
I risultati di questa progettazione sono illustrati nei rispettivi diagrammi.
Viene anche valutato, se necessario e possibile, l'uso dei design pattern, illustrati nel testo _Design Patterns: Elements of Reusable Object-Oriented Software (1994)_, per standardizzare e ottimizzare l'implementazione delle interazioni tra le componenti del sistema.
+ *selezionare principi e caratteristiche di design*:\
i Progettisti devono seguire concetti base fondamentali come l'astrazione, la modularizzazione, l'incapsulamento, la separazione tra interfaccia e implementazione. Inoltre devono rispettare i principi della SOLID programming, per creare software più modulare, scalabile, manutenibile e adattabile ai cambiamenti futuri;
+ *scegliere le tecnologie a supporto della Definizione del Design*:\
la scelta delle tecnologie deve seguire questa prassi:
- i Progettisti devono individuare le possibili tecnologie in base alle loro conoscenze pregresse e ad un'esplorazione tecnologica, la discussione fra loro deve avvenire nei canali Discord `#database` e `#mvp`;
- deve essere eseguito un breve studio di fattibilità per verificare la possibilità di utilizzo delle tecnologie;
- nei canali Discord `#mvp` e `#database`, i Progettisti devono chiedere un confronto con gli altri membri del gruppo per valutare alternative tecnologiche o confermare le scelte fatte.
==== Progettazione degli elementi del sistema
L'attività consiste nei seguenti task:
+ *definire gli strumenti di design necessari*:\
- riguardo i software, deve essere utilizzato StarUML per la modellazione di diagrammi E-R e delle classi. Figma deve essere impiegato per la realizzazione di prototipi di interfaccia grafica;
- riguardo i linguaggi, nei diagrammi di StarUML deve essere utilizzato l'UML.
+ *trasformare le caratteristiche architetturali e di design nella progettazione in elementi del sistema*:\
- le caratteristiche architetturali e di design sono trasformate in unità architetturali, rappresentate nei relativi diagrammi.
Le unità architetturali sono unità funzionali (o di responsabilità) ben definite, realizzabili da un singolo Programmatore.
A una singola unità architetturale possono corrispondere uno o più moduli di codice, la cui corrispondenza unità – modulo è determinata dalle caratteristiche del linguaggio di programmazione utilizzato per la realizzazione.
+ *esaminare le alternative di progettazione e la fattibilità dell'implementazione*:\
- i Progettisti devono identificare le alternative di design;
- le alternative di design devono essere messe in confronto fra loro per arrivare ad una soluzione finale ottimale;
- deve essere preso in considerazione anche il parere degli altri membri del gruppo in fase di retrospettiva.
+ *definire o ridefinire le interfacce fra gli elementi del sistema ed elementi esterni*:\
- le interfacce devono essere identificate e definite nel processo di Definizione dell'Architettura al livello o all'estensione necessari per l'intento architetturale e la comprensione;
- queste vengono devono essere raffinate nel processo di Definizione del Design basato sulle caratteristiche di progettazione, interfacce e interazioni degli elementi software con gli altri elementi che lo compongono e con entità esterne;
- possono essere identificate e definite ulteriori interfacce che non sono state affrontate nella Definizione dell'Architettura.
+ *stabilire gli artefatti di design*:\
gli artefatti di design prodotti da questo processo sono i diagrammi E-R per la modellazione del database, i diagrammi delle classi per la rappresentazione delle entità e delle loro relazioni nel sistema software, e dei mockup o wireframe per i prototipi dell'interfaccia grafica.
==== Studio e scelta delle tecnologie mirate all'implementazione
L'attività consiste nei seguenti task:
+ *identificazione delle tecnologie*:\
le tecnologie vengono individuate fra quelle proposte dal Proponente, fra le conoscenze pregresse del gruppo e fra quelle rilevate in un primo periodo di esplorazione;
+ *studio delle tecnologie*:\
- per ogni tecnologia deve essere realizzato un PoC, di piccola dimensione ed elevata semplicità finalizzato ad effettuare uno studio iniziale di fattibilità e ad una familiarizzazione con le nuove tecnologie. I PoC sono contenuti nel repository omonimo, nel loro relativo branch. Per il loro sviluppo sono impiegati anche i Programmatori;
- i PoC devono essere integrati in un unico prodotto software, per studiare l'integrazione fra i diversi componenti dello stack tecnologico.
+ *scelta delle tecnologie*:\
la scelta finale delle tecnologie avviene in seguito a discussioni interne fra i membri del gruppo e esterne con Committente e Proponente, che ne mettono in luce aspetti positivi e negativi relativamente alla dimensione del progetto.
==== Gestione del design
L'attività consiste nei seguenti task:
+ *giustificare le scelte di design*:\
le scelte di design devono essere giustificate e documentate nel documento #st\. Le giustificazioni possono includere confronti con alternative possibili e analisi delle implicazioni a lungo termine delle decisioni prese. Questo livello di dettaglio aiuta a garantire che il design sia robusto, efficiente e in grado di soddisfare le esigenze del progetto in modo efficace;
+ *stabilire il tracciamento tra gli elementi di design, i requisiti del sistema e le entità architetturali dell'architettura del sistema software*;
+ *determinare lo stato del sistema software e del design degli elementi*:\
il processo di Misurazione deve essere utilizzato per stabilire misure per la completezza e la qualità del design mentre progredisce. I processi di Verifica e Validazione vengono attivati per verificare e convalidare il design dettagliato e l'implementazione.
Ciò include la valutazione periodica delle caratteristiche di progettazione nel caso di evoluzione del sistema software e della sua architettura, nonché la previsione dell'eventuale obsolescenza dei componenti e delle tecnologie, la loro sostituzione nel tempo nel ciclo di vita del sistema software e le conseguenze per la definizione del design. Il processo di Gestione dei Rischi viene tipicamente applicato per valutare i rischi nella strategia di design;
+ *fornire gli artefatti e le informazioni di design*:\
- il processo di Gestione della Configurazione deve essere utilizzato per stabilire e mantenere elementi di configurazione e le linee guida per artefatti come modelli di progettazione;
- il processo di Gestione delle Informazioni deve controllare gli elementi informativi, come descrizioni di progettazione e specifiche;
- gli artefatti di design devono essere resi disponibili nel documento #st\.
== Processo di Implementazione <processo_implementazione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.7_
=== Scopo
Lo scopo del processo di Implementazione è di concretizzare un elemento specifico del sistema. Questo processo traduce i requisiti, le architetture e i design (includendo le interfacce), in azioni che danno vita ad un elemento di sistema in linea con le pratiche della tecnologia implementativa selezionata, facendo uso delle specializzazioni e discipline tecniche appropriate.
Il risultato di questo processo è un elemento del sistema che soddisfa i requisiti specifici e derivati del sistema, nonché le architetture e i design definiti.
=== Risultati
La corretta realizzazione del processo di Implementazione produce i seguenti risultati:
- identificazione dei vincoli implementativi che influenzano i requisiti, l'architettura o il design;
- realizzazione di un elemento di sistema;
- tracciamento dell'implementazione di tale elemento.
=== Attività
==== Progettazione dell'elemento da implementare
È necessario che prima dell'inizio effettivo dello sviluppo di un elemento software, questo sia stato definito dai processi di Definizione dell'Architettura (@processo_definizione_architettura) e del Design (@processo_design).
Questi processi sono fondamentali, poiché al loro completamento si dispone già di una struttura ben definita del sistema, che include le sue componenti principali, le loro interazioni e le funzionalità che devono essere implementate.
Questo approccio fornisce quindi una guida chiara per gli sviluppatori durante l'implementazione, riducendo il rischio di deviazioni o malintesi in quanto trasforma il processo di Implementazione in una traduzione del design in codice.
==== Preparazione per l'implementazione <preparazione_implementazione>
Fondamentale per garantire il livello di qualità richiesto dal #pdq è definire test specifici per l'elemento di sistema che si vuole realizzare secondo il modello di sviluppo _Test Driven Development_. Questo si concretizza nella realizzazione da parte del Progettista di una serie di test di unità precedentemente allo sviluppo vero e proprio dell'elemento di sistema. Questo vale anche per codice riutilizzato o codice esterno che viene adattato per soddisfare i requisiti richiesti.
In caso di modifica è necessario reiterare l'esecuzione dei test sviluppati, al fine di garantire che il software sviluppato e testato in precedenza funzioni ancora come previsto. In caso contrario, si parlerebbe di regressione.
Considerando la complessità degli elementi grafici e delle interazioni utente che non possono essere facilmente o economicamente testati in modo automatico, viene istituita una modalità di testing manuale, che deve essere eseguita prima dallo sviluppatore dell'elemento di sistema (Programmatore) durante l'implementazione, e successivamente dal Verificatore, quando controlla il lavoro presente nella Pull Request relativa.
Questo vale sia per il codice sviluppato in proprio sia per quello riutilizzato o esterno, che viene adattato per soddisfare i requisiti specifici.
Per aiutare il lavoro di verifica da parte del Verificatore, vengono riportate in Pull Request tutte le funzionalità che si ha necessità di controllare manualmente, oltre al riferimento al task interessato su Jira.
Dopo aver sviluppato e testato i singoli moduli attraverso i test di unità, inizia il processo di Integrazione (@processo_integrazione).
==== Implementazione
Decisa una strategia di testing per l'elemento di sistema e scritti i relativi test di unità, il Programmatore può quindi procedere allo sviluppo o all'adeguamento del software.
Per garantire una standardizzazione e una migliore gestione del codice, devono essere adottate le seguenti norme e pratiche di organizzazione:
+ ciascuna categoria di elementi deve essere assegnata a una cartella specifica (@repository-github):
- tutti i file correlati ad uno specifico pattern devono essere organizzati all'interno di una cartella dedicata esclusivamente a quel pattern;
- tutti i file riguardanti l'interfaccia utente devono essere raggruppati in una cartella apposita;
- se all'interno di una cartella sono presenti più file legati ad una stessa classe del modello, devono essere raggruppati in una sottocartella dedicata.
+ ogni componente e ogni classe deve essere implementata in un proprio file. Questa pratica semplifica la gestione e la ricerca dei componenti all'interno del progetto, garantendo una maggiore chiarezza e coerenza nel codice. Può essere fatta un'eccezione a questa norma nel caso in cui vengano adottati design pattern che risultano più manutenibili se le loro classi sono implementate tutte nello stesso file;
+ i nomi di variabili, metodi e funzioni devono essere parlanti, ovvero devono riflettere il loro scopo e la loro funzione all'interno del sistema, così da facilitare la comprensione e manutenzione del codice;
+ regole di codifica:
- type safety con TypeScript attraverso l'utilizzo di tipi specifici e limitando al massimo l'uso del tipo `any`;
- notazione camel per nomi di file e variabili;
- indentazione del codice di tipo Egyptian braces;
- perseguire principi di leggibilità e manutenibilità.
+ buone pratiche per la codifica:
- sviluppo di test automatici al fine di verificare il comportamento delle singole unità di codice (@processo_verifica);
- identificazione e rimozione del codice duplicato per ridurre la complessità e migliorare la manutenibilità. Questo può essere fatto estraendo il codice duplicato in funzioni o classi riutilizzabili.
Prima di sottoporre il software a verifica è necessario assicurarsi che l'elemento di sistema non regredisca le funzionalità tramite l'esecuzione di testing dedicato.
==== Gestione dei risultati dell'implementazione e delle anomalie incontrate
L'elemento implementato deve essere approvato durante il processo di Verifica (@processo_verifica) e integrato nel sistema come descritto nel processo di Integrazione (@processo_integrazione).
== Processo di Integrazione <processo_integrazione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.8_
=== Scopo
Il processo di Integrazione ha lo scopo di combinare iterativamente un insieme di elementi software al fine di ottenere un prodotto che soddisfi i requisiti, rispettando l'architettura e il design definiti.
Di conseguenza, esso viene attuato in coordinamento con i processi di:
- Definizione di Bisogni e Requisiti degli Stakeholder (@processo_bisogni);
- Definizione dell'Architettura (@processo_definizione_architettura);
- Definizione del Design (@processo_design).
L'integrazione del sistema software avviene automaticamente mediante strumenti che permettano la _Continuous Integration_.
=== Risultati
Come risultato della corretta implementazione del processo di Integrazione:
- i nuovi elementi software implementati sono integrati con la _codebase_ esistente;
- il sistema software è composto dall'integrazione degli elementi software implementati;
- i test atti a garantire il corretto funzionamento del prodotto a seguito dell'integrazione sono eseguiti automaticamente;
- le interfacce tra gli elementi software sono definite, implementate e aggiornate;
- le interfacce tra il sistema software e gli elementi esterni sono definite, implementate e aggiornate;
- gli strumenti di supporto al processo di Integrazione sono individuati, configurati e in funzione;
- i risultati dell'integrazione sono identificati, assieme ad eventuali anomalie;
- i risultati dei test sono registrati e possono essere visualizzati dai membri del gruppo.
=== Attività
==== Definizione della strategia di integrazione
La strategia individuata deve garantire il coordinamento tempestivo delle attività dei processi di implementazione e di integrazione.
La strategia di integrazione definita dal gruppo si basa sull'adozione delle pratiche di _Continuous Integration_ (CI) e _Continuous Deployment_ (CD), al fine di permettere un frequente allineamento degli ambienti di lavoro tra i membri e garantire che la versione più aggiornata del prodotto sia sempre disponibile, funzionante e verificata.
Tale strategia prevede l'esecuzione di test di unità e di integrazione negli ambienti locali di sviluppo e nel repository centrale, tramite GitHub Actions.
La strategia di integrazione prevede il coordinamento con:
- il processo di Verifica (@processo_verifica), per:
+ fornire evidenza obiettiva che il sistema software integrato soddisfi i requisiti;
+ identificare e risolvere le anomalie riscontrate, sia nel software che negli elementi ad esso associati quali requisiti, test, architettura e design.
- il processo di Validazione (@processo_validazione), per confermare che il sistema software integrato soddisfi gli scopi e le funzionalità previste;
- il processo di Controllo della Qualità (@processo_controllo_qualità) per supportare la verifica e la validazione del sistema software integrato, individuare e risolvere i problemi e le inconformità.
===== Identificazione dei criteri di integrazione
L'integrazione degli elementi software deve avvenire in modo incrementale, e deve risultare nella creazione di un sistema software integrato eseguibile senza errori e consistente con l'architettura e il design definiti. Il soddisfacimento dei requisiti funzionali e non funzionali descritti nel documento #adr_v è conseguito incrementalmente come risultato dei passaggi di integrazione.
===== Identificazione dei servizi abilitanti
Il gruppo si dota dei seguenti strumenti e servizi abilitanti per implementare la strategia di integrazione:
- GitHub Actions, per l'automazione delle attività di integrazione e di verifica nel repository GitHub;
- Node.js (npm) e Jest, per l'esecuzione dei test negli ambienti di sviluppo locali;
- Coveralls, per la valutazione della copertura dei test eseguiti;
- Jira, per la registrazione dei risultati dei test e delle anomalie riscontrate.
L'uso degli strumenti e dei servizi abilitanti è regolato nell'ambito del processo di Verifica (@processo_verifica).
==== Attuazione della strategia di integrazione
L'integrazione degli elementi software implementati avviene attuando quanto prescritto dalla strategia di integrazione, utilizzando le procedure e i servizi abilitanti individuati.
L'attuazione successiva della strategia di integrazione prosegue fino a che il sistema software completo risponde a tutte le caratteristiche individuate e descritte nel documento #adr_v.
L'integrazione degli elementi software, individuati e specificati tramite i processi di Definizione dell'Architettura (@processo_definizione_architettura) e di Definizione del Design (@processo_design), avviene elemento per elemento, secondo l'ordine di implementazione stabilito durante la pianificazione delle attività. Qualora un elemento software non fosse ancora disponibile per l'integrazione, la funzionalità può essere temporaneamente simulata tramite l'uso di _mock_ o _stub_. Prima di convalidarne la conformità, il sistema software così integrato viene sottoposto a verifica e validazione per garantire che soddisfi i requisiti e le aspettative degli stakeholder.
A seguito di tali attività, il Programmatore invia i cambiamenti proposti al repository, tramite il meccanismo descritto nella @controllo_release. Il Verificatore può approvare la Pull Request e, tramite la funzione di _merge_, integrare l'elemento software implementato nel sistema software. A supporto di tale operazione, è prevista l'esecuzione di GitHub Actions che provvedono a:
- creare e associare al sistema integrato, tramite la action `tag_semver.yml`, un tag di versione semantica per identificare univocamente la release. Il versionamento avviene in accordo con la @versionamento_software. Lo step di versionamento predefinito è di livello "patch" (es. `1.0.0` #sym.arrow.r `1.0.1`), ma può essere esplicitato dal Programmatore nel messaggio di commit tramite i modificatori:
- `#patch`, per incrementare il numero di patch (z);
- `#minor`, per incrementare il numero di minor (y).
- costruire un artefatto sotto forma di immagine Docker, e pubblicarlo sui _container registries_ Docker Hub e GitHub Container Registry tramite la action `build_docker` (`build_docker.yml`);
- calcolare la copertura dei test eseguiti sul sistema integrato con Coveralls, e pubblicarla come report sulla Pull Request tramite la action `test_nodejs.yml`.
==== Gestione dei risultati di integrazione
I risultati delle attività di integrazione includono:
- il sistema software integrato;
- il responso dell'esecuzione delle attività di testing automatico;
- il risultato delle attività di verifica e validazione svolte dal Verificatore;
- l'identificazione e la risoluzione dei problemi di integrazione tra elementi software;
- quando applicabile, l'identificazione e la risoluzione delle anomalie imputabili agli strumenti o alle modalità di integrazione adottate (si rimanda al processo di Controllo della Qualità, @processo_controllo_qualità).
Il sistema software integrato rappresenta una *baseline di prodotto*.
I risultati sono registrati nel repository GitHub e nell'ITS adottato dal gruppo. Quando necessario, i risultati delle attività di integrazione possono essere condivisi con:
- l'Amministratore per la risoluzione di problemi legati agli strumenti abilitanti o per l'adozione di altre misure correttive, in accordo con le parti coinvolte;
- il Proponente e/o il Committente per la convalida del sistema software integrato.
===== Tracciabilità degli elementi del sistema software
La tracciabilità tra gli elementi del sistema software, la Pull Request associata, e i requisiti avviene per mezzo di Jira. I ticket direttamente associabili ad un requisito ne riportano il codice identificativo nell'apposito campo. In questo modo, è possibile risalire a quali elementi del sistema software soddisfino un determinato requisito e, di conseguenza, quale sia lo stato di avanzamento del progetto in termini di requisiti soddisfatti.
Tramite GitHub, è inoltre reso disponibile un registro delle Pull Request approvate (e dunque integrate) o chiuse/rifiutate, liberamente consultabile da tutti i membri del gruppo.
Dopo l'approvazione, a ciascun sistema software risultato dell'integrazione di elementi software implementati sarà associato un numero di versione (come descritto nella @versionamento_software). Questo numero di versione sarà utilizzato per identificare il sistema software e per tracciare le modifiche apportate nel tempo. In accordo con quanto descritto in questa sezione, ad un numero di versione superiore corrisponderà un numero di requisiti soddisfatti superiore.
Ciascuna versione del sistema software integrato, intesa come artefatto eseguibile, dovrà essere conservata e resa disponibile per il download tramite le apposite funzionalità di GitHub.
I risultati del processo di Integrazione vengono visualizzati su GitHub come resoconto delle automazioni eseguite a seguito dell'apertura o chiusura di una Pull Request. Le GitHub Actions devono prevedere la visualizzazione di messaggi che descrivano gli eventuali errori insorti oppure, in loro assenza, la corretta esecuzione dell'integrazione.
== Processo di Verifica <processo_verifica>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.9_
=== Scopo
Il processo di Verifica ha lo scopo di dimostrare, con evidenza obiettiva, che il sistema, o una sua parte, adempie ai requisiti associati definiti nel documento #adr_v, nel rispetto delle metriche di qualità del prodotto definite nel #pdq_v.
Nel caso in cui vengano identificati errori o mancanze, vengono fornite le informazioni necessarie a determinare la risoluzione delle anomalie riscontrate.
Tali operazioni sono possibili mediante test automatici eseguiti, in parte, durante il processo di Integrazione (@processo_integrazione), e test manuali eseguiti dai componenti del gruppo, con l'obiettivo di individuare tempestivamente eventuali problemi.
=== Risultati
Come risultato della corretta applicazione del processo di Verifica, per ogni elemento:
- viene effettuata una verifica manuale da parte di uno o più Verificatori;
- vengono eseguiti i test automatici di unità e di integrazione;
- vengono rilevati eventuali problemi legati al rispetto della correttezza, dei requisiti o dell'architettura, in funzione di quanto definito;
- in caso di errori, vengono riportati i dati che forniscono informazioni per le azioni correttive;
- in caso di assenza di anomalie, viene fornita evidenza che il sistema verificato sia conforme ai requisiti specificati.
=== Attività
==== Esecuzione
===== Verifiche preliminari
La prima attività di verifica avviene durante la preparazione all'implementazione del software (@preparazione_implementazione). In questa attività devono essere sviluppati, dove possibile, i test di unità su cui si baserà l'elemento software da implementare, sia esso un pattern o una classe, seguendo così il principio del _Test Driven Development_. I test qui sviluppati rientrano nei test automatici adottati da #err418, e devono essere inseriti all'interno di una cartella dedicata nel repository WMS3 (@repository-github), denominata `__test__`.
All'interno della cartella `__test__`, dovranno essere implementati anche i test di integrazione, i quali dovranno verificare la corretta interazione tra tutte le parti di sistema. Questo tipo di test dovrà essere implementato, dove necessario, con l'utilizzo di _mock_.
Tutti i test automatici dovranno essere implementati utilizzando il framework di testing Jest, e dovranno essere eseguibili tramite il comando
#align(center, [
`npm test`
oppure
`npm run test`]
)
Come descritto nel processo di Implementazione (@processo_implementazione), talvolta non è possibile implementare test automatici poiché risulterebbe troppo complicato e oneroso. Questo avviene quando il soggetto dell'implementazione è:
- una componente grafica appartenente alla UI o all'ambiente 3D;
- una determinata interazione tra utente e sistema che risulta difficile da automatizzare.
In questi casi il Programmatore dovrà testare manualmente l'elemento di sistema implementato, per verificare che venga rappresentato correttamente, o che le interazioni con l'utente non presentino problemi.
Qualora l'impegno, temporale o economico, per la conduzione dei test manuali si rivelasse eccessivo rispetto agli impegni di progetto, #err418 valuterà l'introduzione di test E2E per la verifica.
===== Verifiche in Pull Request
Tutti i test di unità e di integrazione implementati dovranno essere eseguiti automaticamente dalle GitHub Actions (@automazioni) ogni volta che una Pull Request viene aperta o aggiornata nel suo contenuto. L'automazione designata all'esecuzione dei test dovrà essere codificata nel file `test_nodejs.yml`, situato nel repository WMS3 al percorso `WMS3/.github/workflows/`. Il merging di una Pull Request non potrà avvenire se un test automatico fallisce.
Successivamente all'esecuzione dei test automatici, il Verificatore potrà controllare il contenuto della Pull Request. In particolare dovrà condurre delle verifiche manuali atte ad accertare che:
- il codice scritto rispetti quanto definito nel processo di Implementazione (@processo_implementazione);
- il codice esegua senza problemi;
- l'elemento implementato nella Pull Request sia visualizzato correttamente all'interno del prodotto, e assolva tutte le funzionalità ad esso richieste dai documenti #st_v e #adr_v\.
==== Gestione dei risultati
I risultati ottenuti dai test sono visualizzati su GitHub:
- all'interno della Pull Request, sotto forma di commenti del Verificatore, per i test manuali;
- all'interno della Pull Request, sotto forma di commento, oppure nella sezione relativa alle automazioni eseguite nella Pull Request, per i test automatici.
Se a seguito di tutti i test non emergono anomalie o errori, la Pull Request potrà essere accettata e chiusa dal Verificatore, il quale approverà il merge all'interno del branch `dev`. Al momento della chiusura dovranno essere eseguite altre automazioni riguardanti il versionamento (@versionamento_software).
Nel caso in cui almeno un'attività di verifica faccia emergere problematiche, le modifiche non possono essere integrate nel branch principale. La segnalazione e gestione degli errori dovrà avvenire nel seguente modo:
- *errori nei test automatici*: vengono segnalati dalle GitHub Actions. È possibile visualizzare il log dell'esecuzione dell'automazione nella sezione Actions del repository. Il Programmatore dovrà quindi controllare il log ed effettuare le correzioni necessarie a risolvere l'errore che si è presentato;
- *errori nei test manuali*: vengono segnalati dal Verificatore tramite commenti nella Pull Request. Il Verificatore dovrà inserire dei commenti nei quali dovrà descrivere nel modo più dettagliato possibile gli errori riscontrati e i passaggi per riprodurli, evitando così ambiguità e incomprensioni. Il commento dovrà essere inserito nel file relativo all'elemento o alla funzionalità che presenta errori, e, se possibile, nella riga dove si è individuato l'errore.
Il Programmatore dovrà quindi individuare la causa di questi errori e risolverli nel minor tempo possibile, così da evitare situazioni di stallo nello sviluppo del software.
Programmatore e Verificatore si impegnano a tenere traccia di tutti i bug riscontrati tramite le apposite funzioni fornite dal ITS. Per ciascun bug, si richiede il tracciamento di:
- una breve descrizione del problema;
- una classificazione di urgenza e gravità, su una scala da 1 a 3;
- l'elencazione dei passaggi da svolgere per riprodurre il comportamento, quando applicabile.
La lista dei bug potrà essere fornita al Proponente su sua esplicita richiesta.
== Processo di Transizione <processo_transizione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.10_
=== Scopo
Il processo di Transizione ha lo scopo di stabilire la capacità del sistema di fornire i servizi specificati dalle richieste del Proponente (descritti in #adr_v ), all'interno di un ambiente operativo.
Coinvolge l'installazione del sistema verificato al fine di consentire l'operatività in ambienti diversi, come quelli di sviluppo, test o rilascio in una diversa infrastruttura.
=== Risultati
I risultati della corretta applicazione del processo di Transizione sono:
- rilascio di una versione del sistema;
- deployment del software su Azure;
- garanzia del funzionamento dei servizi e dell'operatività del sistema;
- identificazione di risultati e anomalie della transizione;
- tracciabilità degli elementi trasferiti;
- redazione del documento #man\;
- supporto e formazione degli utenti all'utilizzo del sistema.
=== Attività
==== Rilascio dell'ultima versione di sistema
Il repository GitHub dedicato a WMS3 è provvisto di un branch principale `dev`, il quale rappresenta la fonte da cui vengono creati i feature branch.
Questi ultimi sono necessari al conseguimento degli obiettivi di un task e oggetto dei merge a seguito delle successive Pull Request.
I rilasci del prodotto devono avvenire sempre dal branch di partenza `dev`, in quanto il codice contenuto in esso garantisce il soddisfacimento dei requisiti di qualità imposti dal gruppo.
Ogni release avvenuta con successo, in conformità con il superamento dei test e le procedure descritte nei processi di Implementazione (@processo_implementazione), Integrazione (@processo_integrazione) e Verifica (@processo_verifica), deve generare una release specifica tracciata e consultabile (@tracciabilità_risultati_release) con relativo numero di versione aggiornato (@versionamento).
Ad ogni modifica del sistema devono essere aggiornati anche i documenti #man e #st, al fine di includere la documentazione relativa alle modifiche apportate.
==== Deployment su Azure
Il gruppo ha definito una GitHub Action chiamata _deploy to VPS_ (i cui job sono descritti nel file `deploy.yml`) la quale effettua il deploy del sistema, aggiornato all'ultima versione rilasciata sul branch `dev`, all'interno della macchina virtuale di Azure.
Questo permette la fruizione del sistema senza la necessità di dover scaricare le ultime modifiche sul proprio dispositivo, e senza dover ricreare le relative immagini Docker.
==== Redazione del documento #man
Al fine di fornire agli utenti di WMS3 una guida documentale atta ad indicare il suo corretto utilizzo, il gruppo deve mettere a disposizione il documento #man.
In esso devono essere riportati:
- guida all'avvio e configurazione dell'ambiente;
- descrizione delle funzionalità offerte dal sistema;
- guida dettagliata all'utilizzo delle funzionalità offerte.
Il #man deve venire redatto seguendo i principi di redazione dei documenti descritti nel paragrafo riguardante il processo di Gestione delle Informazioni (@processo_gestione_informazioni).
==== Tracciabilità risultati <tracciabilità_risultati_release>
I risultati relativi a controlli e test automatici avvenuti in fase di release sono visualizzati su GitHub nella sezione relativa alle automazioni avvenute nella Pull Request dell'elemento in oggetto.
Se da essi non emergono anomalie o errori, la transizione è avvenuta correttamente e viene confermata la conformità degli elementi analizzati.
== Processo di Validazione <processo_validazione>
_Conformant to outcomes to ISO/IEC/IEEE 12207:2017 clause 6.4.11_
=== Scopo
Il processo di Validazione si occupa di fornire prove oggettive che il sistema soddisfi i requisiti del Proponente, descritti nel documento #adr_v.
Lo scopo del processo è quindi accertare la capacità del sistema, o di un suo elemento, di soddisfare, in specifiche condizioni operative, l'obiettivo per cui è stato creato.
=== Risultati
Come risultato della corretta implementazione del processo di Validazione si ottiene:
- individuazione di limiti e vincoli che influenzano i requisiti, il design e l'architettura del sistema;
- feedback da parte del Proponente in merito allo stato di avanzamento e qualità del lavoro svolto;
- evidenza che il sistema, o l'elemento di sistema, soddisfi i requisiti dichiarati;
- tracciamento di eventuali anomalie riscontrate.
=== Attività
==== Validazione interna
Dopo aver apportato avanzamenti al software e a seguito dell'attuazione del processo di Verifica (@processo_verifica), devono avvenire delle analisi e test manuali per constatare lo stato di soddisfacimento dei requisiti. I risultati di tali analisi devono essere discussi durante i meeting di retrospettiva in quanto fondamentali per la pianificazione delle future attività.
I test manuali precedentemente menzionati devono avvenire mediante l'utilizzo di Docker Compose, permettendo così l'esecuzione su un ambiente con caratteristiche standard, e devono prevedere l'esecuzione manuale delle funzionalità implementate atte a soddisfare i requisiti definiti.
==== Validazione esterna
Al fine di esaminare lo stato di avanzamento dei lavori, il gruppo deve pianificare dei meeting settimanali con il Proponente, al quale deve venire presentato il sistema in funzione.
Il feedback ricevuto dal Proponente durante questi meeting è essenziale per il proseguimento dei lavori e la loro pianificazione.
Al termine del meeting, il gruppo dovrà effettuare una riunione interna per discutere dei feedback ricevuti e valutare, se necessario, azioni correttive da applicare.
Nel momento in cui il gruppo avrà soddisfatto tutti i requisiti obbligatori definiti nel documento #adr_v e implementato tutte le funzionalità desiderate, dovrà avvenire il meeting esterno di validazione finale del software. Il gruppo presenterà il prodotto sviluppato al Proponente, il quale, a seguito di un'attenta analisi, potrà affermare il totale adempimento dei requisiti obbligatori e delle funzionalità concordate, riconoscendo il prodotto sviluppato come Minimum Viable Product (MVP) atteso dal capitolato.
==== Gestione dei risultati della validazione
Nel caso in cui il software venga riconosciuto come MVP e approvato definitivamente dal Proponente, il lavoro su di esso deve subire una riduzione di priorità o arrestarsi totalmente, dando maggiore importanza all'eventuale documentazione incompleta in vista della revisione PB.
L'adempimento dei requisiti da parte del prodotto sviluppato deve essere tracciato all'interno del documento #st_v.
Contrariamente, nel caso in cui emergano problematiche o mancanze, esse devono essere discusse e affrontate in un meeting interno, al fine di eseguire una mirata pianificazione dei task correttivi.
Questi ultimi vengono registrati su Jira, in modo tale da ottenere maggiore chiarezza riguardo l'organizzazione del gruppo e l'avanzamento dei lavori.
Tali considerazioni e decisioni prese devono essere presenti nel verbale conseguente al relativo meeting interno.
#pagebreak()
= Tracciamento paragrafi ISO/IEC/IEEE 12207:2017 <tracciamento_paragrafi>
La tabella di seguito riportata consente di associare ogni capitolo del documento al rispettivo capitolo dello standard di riferimento. Viene riportato anche il grado di conformità:
- *To outcomes* indica che il gruppo ha dovuto adattare lo standard al progetto, omettendo o reinterpretando sezioni incompatibili con la natura del progetto pur cercando il più possibile di perseguire l'obiettivo di qualità che lo standard impone;
- *Full* indica che il capitolo riporta fedelmente le indicazioni dello standard con poche o nessuna azione di adeguamento.
#figure(
table(
columns: 3,
[*Capitolo Norme*],[*Capitolo Standard*],[*Conformance Level*],
[@processo_fornitura],[6.1.2 - Supply process],[To outcomes],
[@processo_ciclo_di_vita],[6.2.1 - Life cycle model management process],[To outcomes],
[@processo_risorse_umane],[6.2.4 - Human Resource Management process],[To outcomes],
[@processo_gestione_qualità],[6.2.5 - Quality Management process],[To outcomes],
[@pianificazione],[6.3.1 - Project Planning process],[To outcomes],
[@valutazioneControllo],[6.3.2 - Project assessment and control process],[Full],
[@processo_gestione_decisioni],[6.3.3 - Decision Management process],[Full],
[@processo_gestione_rischi],[6.3.4 - Risk Management process],[Full],
[@processo_gestione_configurazione],[6.3.5 - Configuration Management process],[To outcomes],
[@processo_gestione_informazioni],[6.3.6 - Information Management process],[To outcomes],
[@processo_misurazione],[6.3.7 - Measurement process],[To outcomes],
[@processo_controllo_qualità],[6.3.8 - Quality Assurance process],[Full],
[@processo_missione],[6.4.1 - Business or Mission Analysis process],[Full],
[@processo_bisogni],[6.4.2 - Stakeholder Needs and Requirements Definition process],[To outcomes],
[@processo_definizione_architettura],[6.4.4 - Architecture Definition process],[To outcomes],
[@processo_design],[6.4.5 - Design Definition process],[To outcomes],
[@processo_implementazione],[6.4.7 - Implementation process],[To outcomes],
[@processo_integrazione],[6.4.8 - Integration process],[To outcomes],
[@processo_verifica],[6.4.9 - Verification process],[To outcomes],
[@processo_transizione],[6.4.10 - Transition process],[To outcomes],
[@processo_validazione],[6.4.11 - Validation process],[To outcomes],
),
caption: "Tracciamento paragrafi ISO/IEC/IEEE 12207:2017"
)
|
|
https://github.com/mcanouil/generate-quarto-invoices | https://raw.githubusercontent.com/mcanouil/generate-quarto-invoices/main/_extensions/mcanouil/invoice/typst-show.typ | typst | MIT License | #show: invoice.with(
$if(title)$
title: "$title$",
$if(description)$
description: "$description$",
$endif$
$endif$
$if(logo)$
logo: "$logo$",
$endif$
$if(sender)$
sender: (
name: "$sender.name$",
address: (
street: "$sender.address.street$",
zip: "$sender.address.zip$",
city: "$sender.address.city$",
state: "$sender.address.state$",
country: "$sender.address.country$"
),
email: "$sender.email$",
registration: "$sender.registration$",
vat: "$sender.vat$",
exempted: "$sender.exempted$"
),
$endif$
$if(recipient)$
recipient: (
name: "$recipient.name$",
address: (
street: "$recipient.address.street$",
zip: "$recipient.address.zip$",
city: "$recipient.address.city$",
state: "$recipient.address.state$",
country: "$recipient.address.country$"
)
),
$endif$
$if(invoice)$
invoice: (
number: "$invoice.number$",
issued: "$invoice.issued$",
due: "$invoice.due$",
reference: "$invoice.reference$",
fee: "$invoice.fee$",
penalty: "$invoice.penalty$"
),
$endif$
$if(bank)$
bank: (
iban: "$bank.iban$",
bic: "$bank.bic$"
),
$endif$
$if(lang)$
lang: "$lang$",
$endif$
$if(margin)$
margin: ($for(margin/pairs)$$margin.key$: $margin.value$,$endfor$),
$endif$
$if(papersize)$
paper: "$papersize$",
$endif$
$if(mainfont)$
font: ("$mainfont$",),
$endif$
$if(fontsize)$
fontsize: $fontsize$,
$endif$
)
|
https://github.com/PA055/5839B-Notebook | https://raw.githubusercontent.com/PA055/5839B-Notebook/main/glossary.typ | typst | #import "./packages.typ": notebookinator
#import notebookinator: glossary
#glossary.add-term(
"Holonomic",
)[
A vehicle is described as holonomic when it can move in any X/Y direction at any
time, regardless of its rotation. X-drive and Mecanum drivetrains are examples
of holonomic vehicles.
]
|
|
https://github.com/SkymanOne/zk-learning | https://raw.githubusercontent.com/SkymanOne/zk-learning/main/notes/base.typ | typst | #import "@preview/fletcher:0.5.0" as fletcher: *
#let note(doc) = [
#set par(leading: 0.55em, justify: true)
#set text(font: "New Computer Modern")
#show heading: set block(above: 1.8em, below: 1.8em, inset: (x: -0.5em, y: 0em))
#doc
]
#let def(doc) = block(
fill: luma(230),
inset: 8pt,
radius: 4pt,
[
*Definition:* \
#doc
]
)
#let stroke-block(doc) = block(
inset: 8pt, stroke: 1pt,
doc
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.