from pytils import numeral
import uptime as upt
m, s = divmod(upt.uptime(), 60)
h, m = divmod(m, 60)
d, h = divmod(h, 24)
print("%s %s %s %s" % (
numeral.get_plural(d, "день, дня, дней"),
numeral.get_plural(h, "час, часа, часов"),
numeral.get_plural(m, "минута, минуты, минут"),
numeral.get_plural(s, "секунда, секунды, секунд")
)
)
function saveUpload($ticket_id, $file_name) { ... }
getUpload()
так чтобы в результаты работы возвращалось имя загруженного файла return $new_filename;
$new_filename = $ticket->getUpload(); // загрузка файлов на сервер
if ($id = $ticket->save('tickets')) {
$ticket->saveUpload($id, $new_filename); // запись в базу данных
$_SESSION['success'] = 'Заявка добавлена. Номер Вашей заявки такой-то';
}
libreoffice --headless --convert-to txt file.docx
cat file.txt | uniq -u > file1.txt
libreoffice --headless --convert-to docx file1.txt
echo htmlspecialchars_decode('David Guetta feat. Sia & Fetty Wap') ;
<?
$cnt = $counts[$arProps[3]['VALUE']] - 1;
if($cnt >= 1){
echo <<<HTML
<div class=" calendar__day-more--wrap">
<a class="calendar__day-more" href="{$arProps[3]['VALUE']}">
"Еще " {$cnt}
</a>
</div>
HTML;
}
?>
echo '
<div class=" calendar__day-more--wrap">
<a class="calendar__day-more" href="' . $arProps[3]['VALUE']. '">
"Еще " '. $cnt. '
</a>
</div>
';
print('Укажите количество элементов для создания списка')
n = int(input())
sps = []
i = 0
while i < n:
print('Введите число номер', i)
j = int(input())
sps.append(j)
i += 1
print(sps)