pub trait StackLike<T> {
fn new() -> Self; // minor omission, see notes
fn my_push(&mut self, value: T);
fn my_pop(&mut self) -> Option<T>;
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Library | |
// | |
const newValueToUpdater = newValue => (typeof newValue === 'function' ? newValue : () => newValue) | |
const hooks = { | |
state: (hookContext, initialValue) => { | |
if (!hookContext.initialized) { | |
hookContext.initialized = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lang | |
import ( | |
"fmt" | |
"regexp" | |
"strings" | |
"unicode" | |
) | |
type parser struct { |
MDN has documentation about Proxy.
const api = createObjectMapper('https://example.org/base-path/')
await api.users['user-id-1'].get()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Display help message | |
if [[ "$1" == "-h" || "$1" == "--help" ]]; then | |
echo "usage: $(basename $0) <input_string>" | |
echo "Outputs a randomly generated IP address and port number based on the MD5 hash of the input string." | |
echo "" | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALGEBRA 2 | |
https://esami.unipi.it/programma.php?c=53646&aa=2022&docente=&insegnamento=ALGEBRA+2&sd=0 | |
ALGEBRA SUPERIORE A - ALGEBRA SUPERIORE A/a | |
https://esami.unipi.it/programma.php?c=53903&aa=2022&docente=&insegnamento=ALGEBRA+SUPERIORE+A&sd=0 | |
ALGEBRE E GRUPPI DI LIE - ALGEBRE E GRUPPI DI LIE/a | |
https://esami.unipi.it/programma.php?c=53928&aa=2022&docente=&insegnamento=ALGEBRE+E+GRUPPI+DI+LIE&sd=0 | |
ALGORITMI E STRUTTURE DEI DATI - ALGORITMI E STRUTTURE DATI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
STORAGE_FILE="webpage.sum" | |
init() { | |
while [[ "$1" == -* ]]; do | |
case "$1" in | |
-s|--storage) | |
STORAGE_FILE="$2" | |
shift 2 |
NewerOlder