Skip to content

Instantly share code, notes, and snippets.

View emanuelvsz's full-sized avatar
🎯
Focusing

Emanuel Vilela emanuelvsz

🎯
Focusing
View GitHub Profile
-- 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 $$
-- 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,
/\_/\
( o.o )
> ^ <
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="circle"></div>
</body>
</html>
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!",
]
<!DOCTYPE html>
<html>
<head>
<style>
.loading-bar-container {
width: 100%;
background-color: #ccc;
}
.loading-bar {