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
/* PSEUDO-CLASS FIRST-LETTER */ | |
div::first-letter{ | |
font-size: 40px; | |
color: #F00; | |
font-weight: 500; | |
font-family: 'Roboto'; | |
} |
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
// Criar um novo ARRAY usando um ARRAY existente como parte dele. | |
var names = ['Diego', 'Daniella', 'Jorge', 'Augusto']; | |
var moreNames = ['Matheus', ...names, 'Cleyton', 'Tierry']; | |
console.log(moreNames); | |
// 'Matheus', 'Diego', 'Daniella', 'Jorge', 'Augusto', 'Cleyton', 'Tierry' | |
// Juntando ARRAYS - Merge Arrays | |
var ages = [20, 21, 22]; | |
var moreAges = [23, 24, 25]; |
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
// Declarando Objeto | |
const me = { | |
name: "Diego", | |
age: 27, | |
job: "Web Developer" | |
}; | |
// Destructuring | |
const { name, age, job } = me; |
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
''' | |
Ler um Arquivo CSV em Python e | |
Extrair informações | |
''' | |
# Importar as Libs | |
import pandas as pd | |
import numpy as np | |
# Ler Arquivo |
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
// Usando a Função Math 👍 | |
console.log(Math.pow(5, 2)); // 25 | |
// Usando o Exponentiation Operator - ES7 | ES2016 ( '**' ) 👍👍👍 | |
// Nesse caso você evita o uso de função. | |
console.log(5 ** 2); // 25 (Base, Expoente) | |
// Você pode fazer assim também, usando a notação '**=' | |
let num 5; // Base | |
num **= 2; // Expoente |
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
// SCSS = Usando Chaves | |
// SASS = Sem Usar Chaves | |
// Declaração de Variável | |
$className: 'coluna'; | |
// O FOR | |
@for $i from 1 through 4 { | |
.#{$className}-#{$i} { | |
width: 60px + $i; |
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 | |
/* Operador Null Coalesce - '??' */ | |
// IF Ternário - Muito comum ao fazer uma condição inline | |
$username = (isset($_GET['username'])) ? $_GET['username'] : 'Diego'; | |
// Usando o operador Null Coalesce você pode reduzir a condição. | |
$username = $_GET['username'] ?? 'Diego'; |
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 | |
/* Usando o método find() */ | |
class ExampleController extends Controller{ | |
// Dois caminhos para pegar um registro na tabela e retornar em um objeto. | |
// 😕 Você pode fazer assim, mas não é o "jeito" Laravel de se fazer. | |
$model = Author::where('id', '=', 1)->first(); |