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> | |
<meta charset="utf-8"> | |
<title>Validação com Jquery</title> | |
</head> | |
<body> | |
</body> | |
</html> |
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
/* Remove todos, deixando somente a primeira opção: */ | |
$('#meu_select').children('option:not(:first)').remove(); | |
/* Remove apenas uma determinada opção */ | |
$("#meu_select option[value='1']").remove(); |
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 somente uma opção: */ | |
$("#meu_select").append('<option value="1">Arroz</option>'); | |
$("#meu_select").append('<option value="2">Feijão</option>'); | |
/* Em um array :) */ | |
$.each(listaDeCompras, function(id, valor) { | |
$('#meu_select').append($("<option></option>").attr("value", id).text(valor)); | |
}); |
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
<?php | |
# Abrimos o arquivo JSON: | |
$arquivo = file_get_contents('dados.json'); | |
# Convertemos o json em um array: | |
# O segundo parâmetro indica se você quer que transforme em array. | |
$json = json_decode($arquivo, true); | |
?> | |
<p>Nome: <?= $json['nome'] ?></p> | |
<p>Lindão: <?= $json['lindao'] ?></p> |
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
<?php | |
# Abrimos o arquivo JSON: | |
$arquivo = file_get_contents('dados.json'); | |
# Convertemos o json em um objeto: | |
$json = json_decode($arquivo); | |
?> | |
<p>Nome: <?= $json->nome ?></p> | |
<p>Lindão: <?= $json->lindao ?></p> | |
<p>Tarefa: <?= $json->tarefa ?></p> |
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
{ | |
"nome" : "Cafeína Codificada", | |
"lindao" : "Víctor Vaz", | |
"tarefa" : "Curte a página!!!" | |
} |
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
#include <stdio.h> | |
int main(void) { | |
printf (“Cafeína Codificada!!!\n”); | |
system(“pause”); | |
return 0; | |
} |
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
#include <iostream> | |
using namespace std; | |
int main() { | |
cout << "Cafeína Codificada!!!" << endl; | |
system("pause"); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |
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
main = do | |
putStrLn "Cafeína Codificada é demais!!!" |