Skip to content

Instantly share code, notes, and snippets.

View almcarvalho's full-sized avatar

Lucas Carvalho almcarvalho

View GitHub Profile
const Test = teste();
https://exoplanetarchive.ipac.caltech.edu/TAP/sync?query=select+*+from+ps+where+upper(soltype)+like+%27%CONF%%27+and+pl_bmassj+%3E+10&format=json
@almcarvalho
almcarvalho / gist:1dcd16d70e6d01b52c89fb96eaeb54d4
Created May 26, 2022 14:05
Declaring a vector in Javascript
let valores = [5];
valores = [0, 1, 2, 3, 4]
console.log('valores');
for (let index = 0; index < valores.length; index++) {
const element = valores[index];
console.log(element);
}
console.log("Sistemas de Notas ");
var nota1 = prompt("Olá. Informe sua primeira nota: ");
var nota2 = prompt("Olá. Informe sua segunda nota: ");
var media = (nota1+ nota2 )/2;
console.log("A sua média é: " + media);
//DESAFIO
//https://www.codewars.com/kata/55fd2d567d94ac3bc9000064/javascript
function rowSumOddNumbers(n) {
let contador = 1;
let numbers = 1;
let soma = 0;
for (let index = 0; index < n; index++) {
soma = 0;
for (let index = 0; index < contador; index++) {
function validarCNPJ(cnpj) {
cnpj = cnpj.replace(/[^\d]+/g,'');
if(cnpj == '') return false;
if (cnpj.length != 14)
return false;
// Elimina CNPJs invalidos conhecidos
function validarCPF(cpf) {
cpf = cpf.replace(/[^\d]+/g,'');
if(cpf == '') return false;
// Elimina CPFs invalidos conhecidos
if (cpf.length != 11 ||
cpf == "00000000000" ||
cpf == "11111111111" ||
cpf == "22222222222" ||
cpf == "33333333333" ||
cpf == "44444444444" ||
{
"totalFornecedores": 33899,
"totalCanais": 999,
"meusFits": 0,
"favorites": [
{
"idCanal": "759b9f56-0f7f-41ec-a2a9-9df82899783a",
"cnpj": "00794609000180",
"cpf": "04995978945",
"name": "canal do charlie",
import "./PoliceHelper.css";
import React, {useContext, useEffect, useRef, useState} from "react";
import img from "./../../../assets/images/PoliceHelperNovo.png"
import LabelAndInputHorizontal from "../../../themes/LabelAndInputHorizontal/LabelAndInputHorizontal";
import {AuthContext} from "../../../contexts/AuthContext";
import * as dataConstants from "../../../constants/data";
import { Row, Col, Checkbox } from 'antd';
import LoadingAction from "../../../themes/LoadingAction/LoadingAction";
import axios from "axios";