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
| function handleLoading() { | |
| const time = 2000; | |
| return new Promise((resolve) => setTimeout(resolve, time)); | |
| } |
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
| Configurando AWS ES2 FREE TIER PARA API NODE EXPRESS | |
| ##confirgurando primeiros passos | |
| 1- acesse aws | |
| 2- Serviços ES2 | |
| 3- Executar instancia / nova intancia | |
| 4- Criar chave SSH, | |
| 5- Salve a chave SSH em um ambiente seguro | |
| 6- Nas suas i |
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
| ^\s*\(?(\d{2})\)?[-. ]?(\d{1})?[-. ]?(\d{4})[-. ]?(\d{4})[-. ]?\s* | |
| aceita os seguintes formatos: | |
| 11 12341234, | |
| 11 1234-1234, | |
| 11 1234 1234, | |
| (11) 12341234, | |
| (11) 1234-1234, | |
| (11) 1234 1234, | |
| 11 912341234, |
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
| h1 { | |
| display: grid; | |
| grid-template-columns: 1fr max-content 1fr; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| h1:before, | |
| h1:after { | |
| content: ''; |
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
| // Regex: /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/ | |
| // Example: | |
| const hexRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/; | |
| if (!hexRegex.test(color)) { | |
| throw new Error('Invalid hex color'); | |
| } |
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
| export function validateNumberBrazillian(phoneNumber){ | |
| phoneNumber = phoneNumber.replace(/[^\d]/g, ""); //remove all non digits | |
| return phoneNumber.replace(/(\d{2})(\d{1})(\d{4})(\d{4})/, "($1) $2 $3-$4"); | |
| } |
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
| //faz as chamadas da classe event | |
| //dentro da classe event criamos a função de conectar com o banco de dados | |
| //e criamos algumas funções que fazem algumas requisições de busca | |
| //Obs da para melhorar usando metodo POST e fazendo um case tudo dentro de uma unica função (Atualização em Breve) | |
| //Nesse caso inner right e left não irão funcionar | |
| if ($eventContarLoja > 0){ | |
| $categoriaEvent = $event->getCategorias(); //Busca no bando de dados as categorias do sistema salvas no banco de dados e validam se esta ativo e disponivel ao usuario final | |
| foreach ($categoriaEvent as $rowCategoria) { | |
| $clausula1 = $rowCategoria['CategoriasLojas']; // salva as informações em uma variavel de clausulas para facilitar a leitura do codigo |
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
| function previsaoDoTempo (cidade, api){ | |
| var gjson | |
| var cidade | |
| var api | |
| cidade = document.getElementById('cidade').value | |
| cidadeLimpo = cidade.trim() | |
| console.log(cidadeLimpo) | |
| gjson = getJSON('api.openweathermap.org/data/2.5/weather?q='+ cidadeLimpo +'&appid='+ api +') | |
| gparse = [] | |
| gparse = JSON.parse(gjson) |
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
| function cal(tipo) { | |
| if (tipo === 'c') { | |
| var c = eval(document.getElementById('c').value) | |
| var soma = (c*9/5) + 32 | |
| document.getElementById('f').value = soma | |
| console.log(soma) | |
| } | |
| if (tipo === 'f') { | |
| var f = eval(document.getElementById('f').value) | |
| console.log(f) |
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
| <input onkeyup="cal('c')" id="c" type="number" name="c" placeholder="insirir valor de c" value="0"> | |
| <input onkeyup="cal('f')" id="f" type="number" name="f" placeholder="insirir valor de f" value="0"> | |
| <script> | |
| function cal(tipo) { | |
| if (tipo === 'c') { | |
| var c = eval(document.getElementById('c').value) | |
| var soma = (c*9/5) + 32 | |
| document.getElementById('f').value = soma |