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
#include <bits/stdc++.h> | |
using namespace std; | |
int main(){ | |
// THIS TWO LINES | |
ios_base::sync_with_stdio(false); | |
cin.tie(NULL); | |
//EXAMPLE | |
int n, k, t; |
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
var net = require('net'); | |
// pute ntc code in here | |
ntc.init(); | |
function getColorFromBase64(color){ | |
let text = Buffer.from(color, 'base64').toString(); | |
text = text.split('\n'); | |
let c = text[3].split(' '); |
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
#include <cmath> | |
#include <iostream> | |
#include <vector> | |
/* This is the recursive solution to our problem. */ | |
unsigned int fibonacci_recursive(int n) { | |
if (n <= 1) | |
return n; | |
return fibonacci_recursive(n - 1) + fibonacci_recursive(n - 2); | |
} |
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
int detectLoop(Node * list) { | |
if (!list) | |
return 0; | |
Node * tortoise = list; | |
Node * hare = list; | |
do { | |
if (!(hare = hare->next) || !(hare = hare->next)) | |
return 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
#bin/bash | |
if [ -z "$1" ] | |
then | |
echo "Invalid arguments" | |
else | |
sed -i 's|Exec=/usr/bin/google-chrome-stable|Exec=/usr/bin/google-chrome-stable --force-dark-mode|g' $1 | |
fi |
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
(defvar *jogador* 1) ;espaço do jogador | |
(defvar *computador* 10) ;espaço do comptador | |
(defun make-board () | |
(list 'board 0 0 0 0 0 0 0 0 0)) ;tabuleiro | |
(defun convert-to-letter (v) ;funçao pra converter o input na letra | |
(cond ((eql v 1) "O") | |
((eql v 10) "X") |
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
function verifyCPF(cpf) { | |
cpf = cpf.replace(/[^\d]+/g,''); | |
let i,add,rev; | |
if(cpf === '') return false; | |
// Elimina CPFs invalidos conhecidos | |
if (cpf.length !== 11 || | |
cpf === "00000000000" || | |
cpf === "11111111111" || | |
cpf === "22222222222" || | |
cpf === "33333333333" || |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"foreground": "#a6e3a1", | |
"foreground_templates": [ | |
"{{ if gt .Code 0 }}#ff5555{{ end }}", |
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 { JSDOM } from "jsdom"; | |
const url = 'https://gadget.horoscopovirtual.com.br/horoscopo'; | |
async function getDocument() { | |
const response = await fetch(url); | |
const html = await response.text(); | |
return html; | |
} |
OlderNewer