type Keys = 'line' | 'abzac' | 'text'
type IEX = Record<string, string>
type AntiKey = IEX & Partial<Record<Keys, never>>
// or
type AntiKey = IEX & { [Key in Keys]?: never }
// валидное значение
let znac: AntiKey = {
oneline: 'anytext',
otherline: 'othertext'
}
// невалидное
let er: AntiKey = {
text: 'no',
other: 'txt'
}
<div id="vueapp1"></div>
<div id="vueapp2"></div>
<div id="vueapp3"></div>
Vue.createApp(VueApp).mount('#vueapp1')
...
Практически все способы вставки svg в html не позволяют менять цвет при помощи css.
fill: red;
stroke: green;
currentColor
, в CSS меняем свойство color
.mask: url(img.svg) no-repeat center / contain;
background: red;
&:hover {
background: green;
}
# Which do you want install the program
INSTALLDIR=/usr/local/bin
MANDIR=/usr/local/man
HEADERS=extern.h vary.h
TESTS=bsddate
SRCS=date.c netdate.c vary.c
OBJS=date.o netdate.o vary.o
LIBS=-lbsd
MAN=bsddate.1
CC=gcc
# Flags for Linux
CFLAGS=-pipe -funsigned-char -ggdb -g3
RMF = -/bin/rm -f
all: $(TESTS)
.c.o:
$(CC) -c $(DEFS) $(CFLAGS) $<
$(OBJS): $(HEADERS)
install:
strip $(TESTS)
install -d -m 755 -o root -g root $(INSTALLDIR)
install -d -m 755 -o root -g root $(MANDIR)/man1
install -c -m 755 -o root -g root $(TESTS) $(INSTALLDIR)
install -c -m 644 -o root -g root $(MAN) $(MANDIR)/man1
clean:
$(RMF) $(OBJS) $(TESTS) *~ *.core *.bak *.BAK
bsddate: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
depends_on:
- main_db
services:
mysql:
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "mysql", "-p${DB_PASSWORD:-secret}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
main_queue:
depends_on:
mysql:
condition: service_healthy
restart: true
$file = fopen('filename.txt', 'r');
// пробуем установить эксклюзивную блокировку
if (flock($file, LOCK_EX)) {
// выполнение операций чтения
// ...
// освобождаем блокировку
flock($file, LOCK_UN);
} else {
echo "Не удалось установить блокировку на файл.\n";
}
fclose($file);