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
<TextField | |
onChange={handleChange} | |
value={values.url} | |
fullWidth | |
name="url" | |
error={!isValid} | |
placeholder=" Shorten a link here..." | |
variant="outlined" | |
size="small" | |
inputProps={{ |
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
exports.buscarUm = (request, response, next) => { | |
const id = request.params.id | |
Spoiler | |
.findByPk(id) | |
.then((spoiler) => { | |
if (spoiler) { | |
response.send(spoiler) | |
} else { | |
response.status(Status.NOT_FOUND).send() |
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
{ | |
"title": "Recipe Puppy", | |
"version": 0.1, | |
"href": "http:\/\/www.recipepuppy.com\/", | |
"results": [ | |
{ | |
"title": "Ginger Champagne", | |
"href": "http:\/\/allrecipes.com\/Recipe\/Ginger-Champagne\/Detail.aspx", | |
"ingredients": "champagne, ginger, ice, vodka", | |
"thumbnail": "https://www.theseasonedmom.com/wp-content/uploads/2015/12/Ginger-Champagne-Cocktail-11A.jpg" |
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
/* | |
Tempo esperado para resolver: 30 minutos | |
Descrição do problema: | |
Temos uma função chamada listWithPagination que retorna um array de registros paginados. | |
A única maneira de conseguir um array com todos os registros, | |
é fazer requisições sequenciais para cada página, concatenando os resultados. | |
Descrição da solução: | |
Criar uma função chamada concatenateResults, que receba como parâmetro a função original |
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
'use strict' | |
const filter = (arr, func) => { | |
return (function filterInternal (arrayInternal, counter) { | |
const [head, ...tail] = arrayInternal | |
return arrayInternal.length === 0 | |
? [] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Javascript - Converting Array to Object"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<h1>Javascript - Converting Array to Object</h1> |
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
Olá pessoal, | |
Resolvi escrever esta pequena dica inspirado na dúvida de um usuário da comunidade vuejs-brasil.slack.com. | |
A dúvida era: Como adicionar arquivos scss (não sass, sim, são diferentes, veja [aqui](http://pt.stackoverflow.com/a/54454)) em um componente [Vue](https://vuejs.org/v2/guide/)? | |
Estou partindo do princípio que você possui um boilerplate do vue, instalado através do [vue-cli](https://github.com/vuejs/vue-cli) com o template webpack. | |
Pois bem, para incluirmos arquivos .scss em componentes do Vue, primeiramente precisamos instalar dois módulos pelo npm ou [yarn](https://yarnpkg.com): |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin respond-to($color, $width) { | |
border: { | |
color: $color; | |
width: $width; | |
style: dashed; |
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
<a href="www.google.com.br">link 01</a> | |
<a href="www.terra.com.br">link 01</a> | |
<a href="www.uol.com.br">link 01</a> |
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
const merge2dArrayIntoOne2 = (arrays) => arrays.reduce((p,n) => p.concat(n)); | |
// 77 Caracteres |
NewerOlder