Skip to content

Instantly share code, notes, and snippets.

View Sirherobrine23's full-sized avatar
😃
Writing go-bds project

Matheus Sampaio Queiroga Sirherobrine23

😃
Writing go-bds project
View GitHub Profile

Relatório da Aula Prática: Validação de Campo de E-mail com JavaScript em Formulário HTML

1. Introdução

Este relatório descreve o processo de desenvolvimento de um sistema de validação de campo de e-mail utilizando HTML e JavaScript, conforme realizado em aula prática. O objetivo principal é garantir que o dado inserido pelo usuário em um formulário web tenha um formato que corresponda a um endereço de e-mail válido antes de ser processado ou enviado ao servidor. A validação do lado do cliente (client-side) melhora a experiência do usuário (UX) ao fornecer feedback imediato sobre erros de digitação ou formato, além de reduzir a carga no servidor ao evitar requisições com dados claramente inválidos.

2. Métodos

Para implementar a funcionalidade de validação, foram empregadas as seguintes tecnologias e técnicas:

[A2][M0"],[S0],
S1v3.73.1.147:AbB[A85C023FAEBE5ACD,8,1]CDE>
S2v3.73.1.147:AbB[A85C023FAEBE5ACD,8,1]CE$I|V:PCI0-0:>[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.89-Prod_19.1 (jenkins@Android-Legend) (gcc version 4.8.4 (GCC) ) #1 SMP Thu Apr 25 19:43:02 IST 2024
[ 0.000000] CPU: ARMv7 Processor [420f00f3] revision 3 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt:Machine model: cga4233clb
[ 0.000000] OF: fdt:moving dtb from 0x0000000007d00000 to 0x0000000000008000
[ 0.000000] Memory policy: Data cache writealloc
$mode = Read-host "How do you like your mouse scroll (0 or 1)?"
Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object {
"$($_.Name): $($_.DeviceID)"
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode
"+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n"
}
@Sirherobrine23
Sirherobrine23 / m3u.ts
Created December 15, 2023 23:44
javascript M3U parse
export class M3U extends Map<string, Record<string, string|string[]>> {
filter(fn: (value: string, index: number, array: string[]) => boolean) {
return new M3U(Array.from(this.keys()).filter(fn).map(key => [key, this.get(key)]));
}
toJSON() {
return Array.from(this.keys()).reduce<Record<string, string|string[]>>((acc, key) => Object.assign(acc, {[key]: this.get(key)}), {});
}
toArray(): ([string, Record<string, string|string[]>])[] {
@Sirherobrine23
Sirherobrine23 / README.md
Last active October 17, 2023 21:54
Android Payload Dump
import crypto from "node:crypto";
import util from "node:util";
const scrypt = util.promisify(crypto.scrypt) as (password: crypto.BinaryLike, salt: crypto.BinaryLike, keylen: number) => Promise<Buffer>;
export async function encrypt(text: string): Promise<string> {
const iv = crypto.randomBytes(16), secret = crypto.randomBytes(24);
const key = await scrypt(secret, "salt", 24);
const cipher = crypto.createCipheriv("aes-192-cbc", key, iv); cipher.on("error", () => {});
return (String()).concat(iv.toString("hex"), secret.toString("hex"), cipher.update(text, "utf8", "hex"), cipher.final("hex"));
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host="%B%(!.%{$fg[red]%}.%{$fg[green]%})%n@%m%{$reset_color%} "
local user_symbol='%(!.#.$)'
local current_dir="%B%{$fg[blue]%}%~ %{$reset_color%}"
local rvm_ruby='$(ruby_prompt_info)'
local venv_prompt='$(virtualenv_prompt_info)'
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
@Sirherobrine23
Sirherobrine23 / patchExpress.cjs
Created February 24, 2023 12:50
Fix express promises catchs
/**
* Fix Promises catch to express send correct error to client and dont crash server
*/
require("express/lib/router/layer").prototype.handle_request = async function handle_request_promised(...args) {
var fn = this.handle;
if (fn.length > 3) return args.at(-1)();
await Promise.resolve().then(() => fn.call(this, ...args)).catch(args.at(-1));
}
@Sirherobrine23
Sirherobrine23 / node+Typescript.ts
Created June 15, 2022 18:28
Process listen on node more typescript (linux only).
import * as child_process from "node:child_process";
import { isRegExp } from "node:util/types";
function execFilePromise(cmd: string, args?: Array<string>, env?: {[key: string]: string}): Promise<{stdout: string, stderr: string}> {
return new Promise((resolve, reject) => {
child_process.execFile(cmd, args, {
env: {...process.env, ...(env||{})}
}, (err, stdout, stderr) => {
if (err) return reject(err);
return resolve({stdout, stderr});
});
const child_process = require("child_process");
const FindDisk = () => {
const Lint = child_process.execSync("lsblk -r").toString().split(/\n/gi).filter((a,b) => b !== 0 && !/loop/gi.test(a)).filter(a => a).map((a) => {
let b = a.split(/\s+/gi).map(remove_arrays => remove_arrays.replace(/└|─|├/gi, ""));
const TOReturn = {
device_path: b[0],
size: parseFloat(b[3].replace(/[a-zA-Z]/gi, "")),
unit: b[3].replace(/[0-9,\.]/gi, ""),
type: null,