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
document.getElementById("registrationForm").addEventListener("submit", function (e) { | |
e.preventDefault(); | |
const email = document.getElementById("email").value.trim(); | |
const username = document.getElementById("username").value.trim(); | |
const password = document.getElementById("password").value; | |
const errorMsg = document.getElementById("errorMsg"); | |
errorMsg.textContent = ""; | |
if (!email.includes("@")) { |
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
const images = [ | |
"https://bigfoto.name/uploads/posts/2022-01/1641988718_10-bigfoto-name-p-polirovannii-beton-v-interere-22.jpg", | |
"https://tse2.mm.bing.net/th/id/OIP.GhCdwqjnQ_4lDbolnBlTRgHaEK?rs=1&pid=ImgDetMain&o=7&rm=3", | |
"https://klike.net/uploads/posts/2019-11/1574510006_2.jpg" | |
]; | |
let currentIndex = 0; | |
const imgElement = document.getElementById("gallery-image"); | |
const prevButton = document.getElementById("prev-button"); |
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 <windows.h> | |
#include <algorithm> | |
#include <ctime> | |
using namespace std; | |
class Vector { | |
unsigned int capacity = 10; | |
int* data = new int[capacity]; | |
unsigned int length = 0; |
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 <string> | |
using namespace std; | |
// Электрочайник | |
class Electrochainik { | |
private: | |
string brand; | |
float volume; | |
int* temps; |
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
в код вектора з заняття https://gist.github.com/sunmeat/e1888d2d87ad112e3716809c22d467a7 | |
// додати методи: | |
// RemoveFromFront() - метод видаляє значення по індексу 0 | |
// Insert(value, index) - метод який вставляє значення по індексу без втрати елемента по індексу | |
// RemoveByIndex(index) - метод видаляє елемент по індесу | |
// RemoveByValue(value) - метод видаляє всі вказані значення з масиву | |
// Sort() - метод сортує масив за зростанням | |
// Reverse() - метод змінює порядок слідуання елементів на протилежний | |
// Shuffle() - метод випадковим чином перемішує елементи в масиві |
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 <windows.h> | |
#include <algorithm> | |
using namespace std; | |
class Vector { | |
unsigned int capacity = 10; // при створенні масиву, він одразу для себе робить запас пам'яті на 10 елементів | |
int* data = new int[capacity]; | |
unsigned int length = 0; // фактична (реальна) кількість елементів, присутніх у масиві |
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
використавши саме приклад з уроку за посиланням https://gist.github.com/sunmeat/74becfb24bd3d64314f3bb5e5deb15dd | |
переписати в класі наступні методи: | |
- RemoveFromBack | |
- Print (додати інформацію про ленс та кепесіті) | |
- конструктор копіювання | |
дописати наступні методи: | |
- RemoveFromFront(); // видаляє елемент з початку динамічного масиву | |
- Insert(value, index); // вставляє нове значення по вказанному індексу (з перевіркою на вихід за межі масиву, існуючий по цьому індексу елемент не має переписуватися) | |
- RemoveByIndex(index); // видалити один елемент по вказаному індексу (з перевіркою на вихід за межі масиву та присутність там елементів взагалі) |
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 <windows.h> | |
#include <algorithm> | |
using namespace std; | |
class Array { | |
unsigned int capacity = 10; // при створенні масиву, він одразу для себе робить запас пам'яті на 10 елементів | |
int* data = new int[capacity]; | |
unsigned int length = 0; // фактична (реальна) кількість елементів, присутніх у масиві |
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 <string> | |
using namespace std; | |
// Электрочайник | |
class Electrochainik { | |
private: | |
string brand; | |
float volume; |
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
class AbstractProduct { | |
constructor(id, name, price, category) { | |
if (new.target === AbstractProduct) { | |
throw new Error("AbstractProduct — это абстрактный класс."); | |
} | |
this.id = id; | |
this.name = name; | |
this.price = price; | |
this.category = category; | |
} |
NewerOlder