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
// https://momentjs.com/docs/ | |
const isBussinessDay = (timezone = 'America/Araguaina', startHour = 8, endHour = 18) => { | |
const now = moment().tz(timezone) | |
const day = now.day() | |
const hour = now.hour() | |
// 6 === Satday and 7 === Sunday | |
return day !== 6 && day !== 7 && hour >= startHour && hour <= endHour | |
} |
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 isUsed = [1, 2, 10] // Coloca aq os números já usados | |
let genNumber = 1000 // Coloque aq a quantidade para gerar | |
for (let i = 1; i <= genNumber; i++) { | |
if (isUsed.indexOf(i) === -1) { | |
console.log(`XXX ${ i < 10 ? `00000${i}` : i < 100 ? `0000${i}` : i < 1000 ? `000${i}` : `00${i}` }`) | |
} | |
else { | |
// Assim evita a geração de um valor já em uso, e adiciona mais um valor a ser gerado. | |
genNumber++ |
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
/* 1600x900_60.00: Modeline "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync */ | |
#define HSYNC_POL 1 | |
#define VSYNC_POL 1 | |
#define YPULSE (63+5) | |
#define XPULSE 160 | |
#define YPIX 900 | |
#define XPIX 1600 | |
#define VFREQ 60 | |
#define DPI 96 | |
#define CLOCK 118250 |
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 contatos = [ | |
{ | |
"ID": "dd56sad67fga6sdsa67d5sa6d5sa6", | |
"name": "Exemplo Nome1", | |
"email": "[email protected]", | |
"company": "empresa exemplo 1" | |
}, | |
{ | |
"ID": "dd56sad67fga6sdsa67d5sa6d5sa6", | |
"name": "Exemplo Nome2", |
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
INSERT INTO `bancos` (`cod`, `banco`) VALUES (001,'001 - BANCO DO BRASIL S/A'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (002,'002 - BANCO CENTRAL DO BRASIL'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (003,'003 - BANCO DA AMAZONIA S.A'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (004,'004 - BANCO DO NORDESTE DO BRASIL S.A'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (007,'007 - BANCO NAC DESENV. ECO. SOCIAL S.A'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (008,'008 - BANCO MERIDIONAL DO BRASIL'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (020,'020 - BANCO DO ESTADO DE ALAGOAS S.A'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (021,'021 - BANCO DO ESTADO DO ESPIRITO SANTO S.A'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (022,'022 - BANCO DE CREDITO REAL DE MINAS GERAIS SA'); | |
INSERT INTO `bancos` (`cod`, `banco`) VALUES (024,'024 - BANCO DO ESTADO DE PERNAMBUCO'); |
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
[ | |
{ | |
"value": "001", | |
"label": "Banco do Brasil S.A." | |
}, | |
{ | |
"value": "003", | |
"label": "Banco da Amazônia S.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
//Para outras configurações: https://materializecss.com/pickers.html | |
$(document).ready(function () { | |
$('.timepicker').timepicker({ | |
i18n: { | |
clear: 'Limpar', | |
cancel: 'Sair', | |
done: 'Confirmar' | |
}, | |
defaultTime: 'now', | |
twelveHour: false, //Coloque "true" para relógio em 12 horas (AM/PM) |
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
#include <stdio.h> | |
int Continuar() { | |
int gamb = 0; | |
//função para saber se o usuario quer ou não continuar a execução do programa | |
printf("\n\nDigite 0 para sair ou 1 para executar novamente: \n"); | |
scanf_s("%d", &gamb); | |
if (gamb == 0) | |
return 0; | |
return 1; |
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
using System; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using System.Windows; | |
using System.Windows.Input; | |
using System.Windows.Threading; | |
using WpfApp3; | |
namespace Model.Libraries.KeyBoardHooking | |
{ |