This file contains 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
<html> | |
<body> | |
<script> | |
function soma(numeroDoForm) { | |
var campos = document.querySelectorAll("input[id^='campo-" + numeroDoForm + "-']"); | |
var resultado = document.getElementById("resultado-" + numeroDoForm); | |
var soma = 0; | |
for(var i = 0; i < campos.length; i++) | |
soma += campos[i].value * 1; | |
resultado.value = soma; |
This file contains 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
<html> | |
<body> | |
<script> | |
function getElements(tipo, linha){ | |
return document.querySelectorAll("input[id^='" + tipo + "-" + linha + "-']"); | |
} | |
function soma(campos, media){ | |
let soma = 0; | |
for(let i = 0; i < campos.length; i++){ | |
const valor = campos[i].value * 1; |
This file contains 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
<?php | |
session_start(); //inicia a sessão | |
$old = -1; //adiciona um valor padrão para a sessão (que não deve ser usado!) | |
if(isset($_SESSION["num"])) //verifica se a sessão existe | |
$old = $_SESSION["num"]; //pega o valor da sessão (que foi gerado na requisição anterior) | |
$new = rand(1,3); //gera um novo número de qualquer forma | |
$_SESSION["num"] = $new; //salva o novo número na sessão, para usar na validação | |
if(isset($_POST["num"]) && $num != -1){ //se foi feito um POST, valida | |
$num = $_POST["num"];//atribui a $num o valor enviado pelo usuário | |
if($num == $old) { //se o número enviado for o mesmo que estava salvo antes, então SUCESSO! |
This file contains 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
<?php | |
$acao = "inicio"; | |
if(isset($_GET["acao"]) | |
$acao = $_GET["acao"]; | |
switch($acao){ | |
case "inicio": | |
echo "<a href='?acao=download'>Clique aqui para download do arquivo arquivoXPTO.txt</a>"; | |
echo "<script>setTimeout(function(){ window.location.href= '?acao=mensagem'; }, 10000);</script>"; | |
break; | |
case "download": |
This file contains 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
<?php | |
if($_POST){ | |
if(isset($_POST["nombre"])) | |
echo "Bienvenido " . htmlspecialchars($_POST['nombre']) . ".<br />"; | |
if(isset($_POST["edad"])) | |
echo "Usted tiene " . $_POST["edad"] . " años!"; | |
} | |
?> | |
<form action="postEcho.php" method="POST"> | |
Ingrese su nombre: <input type="text" name="nombre" placeholder="Su nombre"/> |
This file contains 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
<?php | |
//Altere somente a variável abaixo: | |
$endereco = "Avenida Paulista, 1000 São Paulo SP BR"; | |
//Não altere nada daqui caso não saiba o que cada coisa faz! | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://www.latlong.net/_spm4.php", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", |
This file contains 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
var address = WebUtility.UrlEncode("Alameda Rio Negro, 585 Barueri SP BR"); | |
var client = new RestClient("https://www.latlong.net/_spm4.php"); | |
var request = new RestRequest(Method.POST); | |
request.AddHeader("x-requested-with", "XMLHttpRequest"); | |
request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); | |
request.AddParameter("undefined", "c1=" + address + "&action=gcpm&cp=", ParameterType.RequestBody); | |
IRestResponse response = client.Execute(request); |
This file contains 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
// *********************************************************************** | |
// Assembly : AssemblyName | |
// Author : Guilherme Branco Stracini | |
// Created : 2020-01-01 | |
// | |
// Last Modified By : Guilherme Branco Stracini | |
// Last Modified On : 2020-01-01 | |
// *********************************************************************** | |
// <copyright file="" company="Guilherme Branco Stracini"> | |
// Copyright © 2020 - 2021 Guilherme Branco Stracini |
This file contains 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
namespace MailCleaner | |
{ | |
//https://github.com/rfinochi/pop3dotnet | |
//PM> Install-Package Pop3 | |
using Pop3; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; |
This file contains 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
<video width="426" height="240" id="v1"> | |
<source src="video1.mp4" type="video/mp4"> | |
<source src="video1.webm" type="video/webm"> | |
</video> | |
<video width="426" height="240" id="v2"> | |
<source src="video2.mp4" type="video/mp4"> | |
<source src="video2.webm" type="video/webm"> | |
</video> |