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
| var charactersList = document.getElementById('charactersList'); | |
| var searchBar = document.getElementById('searchBar'); | |
| var hpCharacters = []; | |
| /* código novo */ | |
| function pesquisar() { | |
| var termosDaBusca = document.getElementById("searchBar").value; | |
| var filteredCharacters = hpCharacters.filter((character) => { | |
| return ( | |
| character.body.toLowerCase().includes(termosDaBusca) || |
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
| [ | |
| { | |
| "title":"Semana 1 - 30.01 a 31.01", | |
| "created_at":"2020-01-29T18:41:42Z", | |
| "url":"semana-1-29-dot-01-a-31-dot-01", | |
| "editing_roles":"teachers", | |
| "page_id":15731825, | |
| "last_edited_by":{ | |
| "id":9440764, | |
| "display_name":"Vitor Hugo Melo De Almeida", |
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
| [ | |
| { | |
| "title":"Semana 1 - 29.01 a 31.01", | |
| "created_at":"2020-01-29T18:41:42Z", | |
| "url":"semana-1-29-dot-01-a-31-dot-01", | |
| "editing_roles":"teachers", | |
| "page_id":15731825, | |
| "last_edited_by":{ | |
| "id":9440764, | |
| "display_name":"Vitor Hugo Melo De Almeida", |
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
| <html> | |
| <head> | |
| <title>As 4 estações</title> | |
| </head> | |
| <body> | |
| <h1>Estações do ano</h1> | |
| <p>O ano é dividido em quatro estações:</p> | |
| <ul> | |
| <li>Primavera</li> | |
| <li>Verão</li> |
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
| { | |
| "cursos": [ | |
| { "id": 1, "titulo": "Entendendo o ES6", "url": "https://www.codeprestige.com.br/cursos/es6" }, | |
| { "id": 2, "titulo": "Produtividade Máxima com o VS Code", "url": "https://www.udemy.com/truques-vscode/" }, | |
| { "id": 3, "titulo": "Entendendo o ES7/ES8", "url": "https://www.codeprestige.com.br/cursos/es7-8" }, | |
| { "id": 4, "titulo": "React 16 Definitivo", "url": "https://www.udemy.com/react-16/" } | |
| ], | |
| "alunos": [ | |
| { "id": 1, "nome": "Marcela da Silva", "curso": 1 }, | |
| { "id": 2, "nome": "José Luiz Felipe", "curso": 2 }, |
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
| const chalk = require("chalk"); | |
| const msg = chalk.green("Hello World!"); | |
| const msg2 = chalk.red.bold("Hello World!"); | |
| const msg3 = chalk.bold(chalk.red("Hello ") + chalk.green("World")); | |
| console.log(msg); | |
| console.log(msg2); | |
| console.log(msg3); | |
| const error = chalk.bold.red; |
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
| /** | |
| * para renderizar este código no medium, basta salvá-lo no | |
| * gist.github.com, copiar o link no artigo e apertar o enter. | |
| * o próprio Medium vai saber como lidar com o código e renderizá-lo | |
| * no artigo | |
| **/ | |
| const soma = (n1,n2) => { | |
| return n1 + n2; | |
| } |
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> | |
| <title>Formulários - Netlify</title> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> | |
| <style> | |
| body { | |
| padding-top: 20px; | |
| } | |
| </style> |
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
| var urlString = window.location.href; | |
| var url = new URL(urlString); | |
| var usuario1 = url.searchParams.get("user1"); | |
| var usuario2 = url.searchParams.get("user2"); | |
| document.getElementById('jogador1').innerHTML = usuario1; | |
| document.getElementById('jogador2').innerHTML = usuario2; | |
| fotoUsuario1 = document.getElementById('img_user1'); | |
| fotoUsuario2 = document.getElementById('img_user2'); |
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
| document.getElementById("button-ok").addEventListener("click", function () { | |
| event.preventDefault(); | |
| var primeiroJogador = document.getElementById("input-jogador-1").value; | |
| var segundoJogador = document.getElementById("input-jogador-2").value; | |
| pegarUser(primeiroJogador, 'jogador-1'); | |
| pegarUser(segundoJogador, 'jogador-2'); | |
| }); | |
| function requisicao(metodoHTTP, url, callback) { | |
| var xhttp = new XMLHttpRequest(); |