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
| function delta(a, b, c) { | |
| return (b * b) - ((4 * a) * c); | |
| } | |
| function baskara(a, b, c) { | |
| var delt = delta(parseFloat(a), parseFloat(b), parseFloat(c)); | |
| var x1 = (-b + Math.sqrt(delt)) / (2 * a); | |
| var x2 = (-b - Math.sqrt(delt)) / (2 * a); | |
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
| console.clear(); | |
| console.log(convert("VIxiv")); | |
| function convert(value) { | |
| let total = 0; | |
| let length = value.length; | |
| for (let i = 0; i < length; i++) { | |
| if (i < length - 1 && romans(value[i+1]) > romans(value[i])) { | |
| total -= romans(value[i]); | |
| } else { |
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
| let timer = setInterval(function() { | |
| let item = $(".paredao_padding")[2]; | |
| $(item).find("a").click(); | |
| let text = $("#voto_ocultar").find("img")[0].src; | |
| let index = text.indexOf("="); | |
| let realtext = text.substr(index + 1, 8); | |
| $("input[name=code]").val(realtext.substr(2, 1) + realtext.substr(4, 1) + realtext.substr(7, 1)); | |
| $("input[type=submit]").click(); | |
| }, 5000); |
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
| let count = 0; | |
| let arr = document.querySelectorAll(".y3zKF"); | |
| let timer; | |
| arr.forEach((value, index) => { | |
| timer = setTimeout(() => { | |
| if(!value.classList.contains("_8A5w5")) { | |
| value.click(); | |
| console.log("Seguiu " + count + " pessoas."); | |
| count++; | |
| if (count >= 30) { |
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
| ## criar container postgres setando variáveis de ambiente | |
| docker run \ | |
| --name postgres-name \ | |
| -e POSTGRES_USER=root \ | |
| -e POSTGRES_PASSWORD=root \ | |
| -e POSTGRES_DATABASE=demo \ | |
| -p 5432:5432 \ | |
| -d \ | |
| postgres | |
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
| <style> | |
| #sound { | |
| display:block; | |
| } | |
| .row { | |
| background: #f8f9fa; | |
| margin-top: 20px; | |
| } | |
| .col { |
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 express = require("express"); | |
| const server = express(); | |
| server.use(express.json()); | |
| const projects = [{ id: "1", title: "Projeto 1", tasks: [] }]; | |
| // middleware global | |
| server.use((request, response, next) => { |
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 express = require("express"); | |
| const server = express(); | |
| server.use(express.json()); | |
| const users = ["Rodinei", "Fulano", "Ciclano"]; | |
| // middleware global | |
| server.use((request, response, next) => { |
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
| 'use strict' | |
| const fibonacci = () => { | |
| let arr = []; | |
| for (let index = 0; index < 350; index++) { | |
| if (index < 2) { | |
| arr.push(index); | |
| } else { | |
| const value = arr[index - 1] + arr[index - 2]; | |
| arr.push(value); |
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
| # RUN TO INSTALL MYSQL: python -m pip install mysql-connector | |
| import mysql.connector | |
| db_connection = mysql.connector.connect( | |
| host="host", | |
| user="user", | |
| passwd="password", | |
| database="database" | |
| ) |
NewerOlder