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. Sample Data Insertion | |
| -- Insert Courses | |
| INSERT INTO Cursos (nome, descricao, duracao) VALUES | |
| ('English', 'Complete English course', 6), | |
| ('Spanish', 'Complete Spanish course', 4), | |
| ('French', 'Complete French course', 5); | |
| -- Test validation of duplicate course name | |
| DO $$ |
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 enums for status fields | |
| CREATE TYPE nivel_curso AS ENUM ('Básico', 'Intermediário', 'Avançado'); | |
| CREATE TYPE status_turma AS ENUM ('Aberta', 'Fechada'); | |
| CREATE TYPE status_matricula AS ENUM ('Pendente', 'Aprovado', 'Reprovado'); | |
| CREATE TYPE tipo_acao AS ENUM ('INSERIR', 'ATUALIZAR', 'EXCLUIR', 'FECHAR_TURMA'); | |
| -- Create tables | |
| CREATE TABLE Cursos ( | |
| cursoid SERIAL PRIMARY KEY, | |
| nome VARCHAR(100) NOT NULL, |
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
| /\_/\ | |
| ( o.o ) | |
| > ^ < |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="style.css"> | |
| </head> | |
| <body> | |
| <div class="circle"></div> | |
| </body> | |
| </html> |
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
| import random | |
| jokes = [ | |
| "Por que o programador saiu com seu guarda-chuva? Porque ele queria evitar chuva de bugs!", | |
| "Qual é o animal mais antigo? A zebra, porque está preto no branco.", | |
| "Por que o programador se deitou na cama? Para pegar alguns bytes.", | |
| "O que um zero disse para o oito? Boné legal!", | |
| "Por que o servidor foi ao bar? Para pegar um drink!", | |
| ] |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| .loading-bar-container { | |
| width: 100%; | |
| background-color: #ccc; | |
| } | |
| .loading-bar { |