This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
const int N = 3; | |
float A[N][N]/* = { | |
{-1000, -500, 0}, | |
{750, 1000, -250}, | |
{200, -200, 600} | |
}*/; | |
float C[N]; |
This file contains hidden or 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
#Представи си, че създаваш система за управление на библиотека. Искаш да можеш да добавяш книги в библиотеката, | |
#да наемаш книги, и да проверяваш наличността на книгите. | |
# Методи на класа Book:| | |
# 1.Отпечатва информация за книгата вьв формат „Заглавие: ..., Автор: ..., Година: ..." | |
# 2.Ако книгата е налична, променя is_available на False и отпечатва сьобщение „Вие наехте книгата «заглавие>". | |
#Ако книгата вече е заета, изписва сьобщение „Книгата ‹заглавие > вече е заета." | |
# 3.Променя is_available обратно на True и отпечатва съобщение „Вие върнахте книгата ‹заглавие>". | |
# Методи на класа Library: | |
# 1.Добавя книга кьм библиотеката. | |
# 2.Отпечатва заглавията на всички налични книги. |
This file contains hidden or 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
# 1.Сьздай клас Animal, който представлява общата информация за животно: | |
# • Полета: name, species (вИД), age, health (стойност от 1 до 10, която показва здравословното сьстояние | |
#на животното). | |
# • Метод print_info(), който отпечатва информация за животното вьв формат „Име: ..., Вид: ..., Възраст: ..., | |
#Здраве: ...". | |
# 2.Сьздай клас Mamal, който наследява Animal: | |
# • Допълнителни полета: fur_color (цвят на козината) и diet (тип хранене: тревопасно, месоядно или всеядно). | |
# • Метод print_info(), който извежда сьщо и цвета на козината и типа хранене. | |
# 3.Сьздай клас Bird, който наследява Animal: | |
# • Допълнителни полета: wing_span (размах на крилете в сантиметри) и can_fly (булева стойност, която |
This file contains hidden or 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
# Write a function solve_sudoku(board) that takes a 9x9 grid representing a Sudoku puzzle and solves it using backtracking. | |
def find_empty(board): | |
for x in range(9): | |
for y in range(9): | |
if board[x][y] == 0: # zero means "empty" | |
return x, y | |
return None | |
def check_valid(board, row, col, num): |
This file contains hidden or 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
# Check whether an input variable is a positive integer in Terraform | |
# Tested with version 0.13 | |
variable "release" { | |
type = number | |
description = "Release number" | |
default = 0 | |
validation { | |
condition = tonumber(var.release) == floor(var.release) | |
error_message = "Release should be an integer!" | |
} |
This file contains hidden or 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
# sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee log.txt | |
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug | |
00000036 debuglog.c:310:DebugLogSetCategory() Debug options: APDU | |
00000002 pcscdaemon.c:360:main() Force colored logs | |
00000135 configfile.l:358:DBGetReaderList() Parsing conf file: /etc/reader.conf.d | |
00000057 pcscdaemon.c:675:main() pcsc-lite 1.8.18 daemon ready. | |
00001032 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001 | |
00000073 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001 | |
00000061 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0463, PID: 0xFFFF, path: /dev/bus/usb/003/002 | |
00000031 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001 |
This file contains hidden or 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
# sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu | |
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug | |
00000040 debuglog.c:310:DebugLogSetCategory() Debug options: APDU | |
00000002 pcscdaemon.c:360:main() Force colored logs | |
00000052 configfile.l:358:DBGetReaderList() Parsing conf file: /etc/reader.conf.d | |
00000006 pcscdaemon.c:675:main() pcsc-lite 1.8.18 daemon ready. | |
00049929 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001 | |
00000030 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001 | |
00000030 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0463, PID: 0xFFFF, path: /dev/bus/usb/003/002 | |
00000023 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001 |