---
title: 1 lab
---
erDiagram
workers {
integer id PK
varchar name
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
| input: '111' | |
| blank: ' ' | |
| start state: START | |
| table: | |
| START: | |
| 1: {write: ' ', R: GO_RIGHT_WRITE_1} | |
| 0: {write: ' ', R: GO_RIGHT_WRITE_0} | |
| ' ': {R: GO_CALC} | |
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> | |
| #include <fstream> | |
| #include <string> | |
| using namespace std; | |
| void encrypt() | |
| { | |
| ifstream fin("input.txt"); | |
| if (fin.is_open()) |
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
| select * from students; | |
| select surname, height from students; | |
| select surname, height from students where weight between 50 and 75; | |
| -- select * from groups; | |
| select * from students where fk_group_id = (select groups_id from groups where lower(group_name) = '384'); | |
| select * from genders; | |
| select * from students where fk_gender_id = (select gender_id from genders where lower(gender) = 'мужской'); |
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
| DELETE FROM Orders; | |
| INSERT INTO Customer(FirstName, LastName, Email, Phone) | |
| VALUES | |
| ('John', 'Doe', 'john.doe@example.com', '8-952-866-54-50'), | |
| ('Jane', 'Doe', 'jane.doe@example.com', '8-952-866-54-51'), | |
| ('Bob', 'Smith', 'bob.smith@example.com', '8-952-866-54-52'), | |
| ('Alice', 'Johnson', 'alice.johnson@example.com', '8-952-866-54-53'), | |
| ('Alex', 'Brown', 'alex.brown@example.com', '8-952-866-54-54'), |
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
| function scrollToElement(el: HTMLElement, onScrollEnd = () => { }) { | |
| const { top } = el.getBoundingClientRect() | |
| var step = 75 | |
| var iterationsCount = Math.abs(Math.floor(top / step)) | |
| if (top < 0) { | |
| step = -step | |
| iterationsCount += 1 | |
| } |
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
| { | |
| "terminal.integrated.defaultProfile.windows": "Command Prompt", | |
| "editor.formatOnPaste": true, | |
| "editor.largeFileOptimizations": true, | |
| "editor.renderWhitespace": "none", | |
| "editor.autoClosingBrackets": "always", | |
| "editor.autoClosingOvertype": "always", | |
| "editor.autoClosingQuotes": "always", | |
| "editor.autoClosingDelete": "always", | |
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
| CREATE TABLE IF NOT EXISTS Product( | |
| Id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | |
| ProductName VARCHAR NOT NULL, | |
| Manufacturer VARCHAR NOT NULL, | |
| ProductCount INT NOT NULL, | |
| Price MONEY NOT NULL | |
| ); | |
| CREATE TABLE IF NOT EXISTS Customer( | |
| Id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, |
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> | |
| #include <fstream> | |
| #include <cstring> | |
| const char *sourceFileName = "source_file.txt"; | |
| const char *encodedFileName = "encoded_file.txt"; | |
| const char *decodedFileName = "decoded_file.txt"; | |
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
| package main | |
| import ( | |
| "image" | |
| "image/color" | |
| "image/draw" | |
| "image/png" | |
| "golang.org/x/image/font" | |
| "golang.org/x/image/font/basicfont" | |
| "golang.org/x/image/math/fixed" |