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
<script> | |
let lista = [ | |
'Pao', | |
'Leite', | |
'Carne', | |
] | |
let novoItem = '' | |
const adicionarItemALista = () => { | |
// lista.push Adiciona, but nao atualiza a lista. Entao o svelte nao entende que a lista mudou |
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
<script> | |
// Aqui usamos const porque os valores CERTOS nao mudam | |
const emailCerto = "fabio@fabio" | |
const senhaCerta = "fabio123" | |
// Aqui usamos let porque os valores que a pessoa ESTA ESCREVENDO vao mudar | |
let email = '' | |
let senha = '' | |
// Aqui estamos guardando o estado do nosso formulario |
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
// 1. Criar uma função acha o maior numero numa lista | |
// 2. Criar uma função acha o menor numero numa lista | |
// 3. Criar uma função que acha o primeiro numero duplicado numa lista | |
function passo() { | |
// ... | |
} | |
function caminhada(inicio, destino) { | |
// dar a caminhada |
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
import http from 'k6/http' | |
import { check, sleep, group } from 'k6' | |
import { Trend } from 'k6/metrics' | |
let FeedTrend = new Trend('Get feed', true) | |
let CreateUserTrend = new Trend('Create user', true) | |
let CreatePostTrend = new Trend('Create post', true) | |
let CreateCommentTrend = new Trend('Create comment', true) | |
let CreateLikeTrend = new Trend('Create like', true) |
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
// Atados Test - First duplicate | |
// | |
// Given an array a that contains only numbers in the range from 1 to a.length, | |
// find the first duplicate number for which the second occurrence has the minimal index. | |
// In other words, if there are more than 1 duplicated numbers, return the number for which | |
// the second occurrence has a smaller index than the second occurrence of the other number does. | |
// If there are no such elements, return -1. | |
// | |
// Example | |
// |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDtQQhARneTTjFSdtCGgtaiGCry32gLIqHkbCVTG0ZpvFgkkNoGpwZhgV/e0GVpj8xzeGzbyUIJesRB/t7Ldi7VKHUK4IMcXmngZ8snnnN0VZgsbKFk13/QEL8eu4A/FfNnefJ0dEP5SSyBvW6T9Sunp8s+JMX6L/TkHG+r18ITrgdaQcYjPSsqLJLSqTAsmv+JAetumb7h1+2xYBPR5Sn5R8JX7IAfpW81uZ4KMXKm8+3MLF9+KIGC+yxp4G9a/VmmAObcnsZqAGPnqIgR6SVo984MjAyHfHe7yJvdIqFFjqCl0U3qlGJ2pBn7CY44G6szMfU3O5sobZFcoiSaUwLZTrn1ZrG1smXWn02TYZe0nm1RUS72XMCCF27DYaIx9NV6EsOjX4hyQ6i4eqLdq0axgL3Oy9SDkVq5zj9X+tw2KfHdF7G2n5PMvbb3KoM7yw1SIKS+DGE5kfRdUyAfrTSSNexpzRVFEcw2jZl/SFQqgqyyMplacfe/6/Y1NiS5wUEEARiaC3KUKadXYN8VjiSeATprGc8jZ5+2R95KZ8s/Szyh8hGNPKeK88FwlDhLCyGt+nn0ZGXj429foMSvU5/4MnzEadaHy4yqAR78tJat9PS+rAF9p0s3xWTSZ+PoBrgO8g3jRXHP04FQ0brfok/6mSorwNoqXlbcqN1QOznPwQ== murdock@MacBook-Pro |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC//Ojb3qTgKkpSBnvABxvj1G8WNo2EzhyxdQ8xGd6Z6j9FMUfOp46Kmz4CadiOPJf7X4CL/8UBRDr8CrlIqmcm4TX3Fi2DKJmGtO7ZZBf8m+9P23Jb9x/6qDx91qUHuWJaFUeSHrYJWWfa7RpXXyKPmWlifBefFWHvU06dPto15t9/gMX8TAagli+BEDMvoZ59CG6+OKwlOS0kl2FprXnnY+dRefng6trDSgoE9nUvKdMR+NcuK6QUtoa7kSAvdIkkDkKKstProDSBSmbPap9cCUntdAW1SOrVBX5PEq1LWN9I+d0L4e1I9ViS6GnrhsxPW4nIGqDzy3rIBQQCTmdz fabio@fabio-Inspiron-5458 |
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
class User { | |
@PrimaryKey | |
private String id; | |
private String name; | |
private String avatar; // url do avatar | |
} | |
User user = new User("id", "Geovani", "https://68.media.tumblr.com/60c074d952ce220d58da51f9f99c4a58/tumblr_ojxrmvaMhN1qz7t0xo1_540.jpg"); | |
Realm.init(context); |
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 | |
$directory_iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('/Applications/MAMP/htdocs/', RecursiveDirectoryIterator::SKIP_DOTS)); | |
foreach($directory_iterator as $filename => $file) | |
{ | |
if ($file->getExtension() !== "html" ) { | |
continue; | |
} |