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
| import axios from 'axios' | |
| export const api = axios.create({ | |
| baseURL: 'http://localhost:3000', | |
| headers: { | |
| 'Content-Type': 'application/json', | |
| }, | |
| timeout: 10000, // Timeout de 10 segundos | |
| }) |
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
| services: | |
| api: | |
| build: | |
| context: . | |
| ports: | |
| - "80:4000" | |
| environment: | |
| NODE_ENV: production | |
| restart: always |
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
| FROM node:18.16.1-alpine | |
| WORKDIR /api | |
| COPY package.json . | |
| RUN yarn install | |
| COPY . . |
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
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| background: transparent; | |
| overflow-x: hidden; | |
| margin: 0; | |
| padding: 0; |
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
| export const Konami = (() => { | |
| // up, up, down, down, left, right, left, right, b, a, enter | |
| const SEQUENCE: Array<number> = [ | |
| 38, | |
| 38, | |
| 40, | |
| 40, | |
| 37, |
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
| CREATE FUNCTION [dbo].[F_SPLIT_STRING]( @STRING NVARCHAR (MAX), @DELIMITER NVARCHAR (10) ) | |
| RETURNS @VALUETABLE TABLE ([VALUE] NVARCHAR(MAX)) | |
| BEGIN | |
| DECLARE @NEXTSTRING NVARCHAR(4000) | |
| DECLARE @POS INT | |
| DECLARE @NEXTPOS INT | |
| DECLARE @COMMACHECK NVARCHAR(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
| SELECT | |
| P.NAME, | |
| C.TEXT | |
| FROM | |
| syscomments C | |
| INNER JOIN | |
| sys.procedures P | |
| ON P.object_id = C.id |
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 cpfValidation = (value) => { | |
| if (!value) return false | |
| // Aceita receber o valor como string, número ou array com todos os dígitos | |
| const validTypes = | |
| typeof value === 'string' || Number.isInteger(value) || Array.isArray(value) | |
| // Elimina valores com formato inválido | |
| if (!validTypes) return false |
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 cnpjValidation = (value) => { | |
| if (!value) return false | |
| // Aceita receber o valor como string, número ou array com todos os dígitos | |
| const isString = typeof value === 'string' | |
| const validTypes = isString || Number.isInteger(value) || Array.isArray(value) | |
| // Elimina valor de tipo inválido |
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 calSub = (x, y) => { | |
| let z = x - y; | |
| return z; | |
| } | |
| console.log("Subtraction : " + calSub(7, 4)); |
NewerOlder