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
// 64 - 1024 | |
// x | |
// 256 - 2048 | |
const remap = function (x: number, inputMinimum: number, inputMaximum: number, outputMinimum: number, outputMaximum: number) { | |
const pointA = (x - inputMinimum) * (outputMaximum - outputMinimum); | |
const pointB = (inputMaximum - inputMinimum) + outputMinimum; | |
const result = pointA / pointB; | |
return result; | |
}; |
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
// VARIÁVEIS HABILITAR MOTORES | |
int ENA = 9; | |
int ENB = 10; | |
// VARIÁVEIS ENTRADA DOS MOTORES | |
int IN1 = 4; | |
int IN2 = 5; | |
int IN3 = 6; | |
int IN4 = 7; |
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
{ | |
"id": "684587fe-55c6-404c-b828-d126fbe97b9e", | |
"version": 1, | |
"server": "translino-backend", | |
"state": "error" | "success", | |
"code": 400, | |
"message": "Bad Request", | |
"method": "GET", | |
"path": "/api/customer", | |
"result": [ |
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 main() | |
{ | |
int favNumber = 8; | |
int *pointerFavNumber; | |
// below it is save the variable address | |
pointerFavNumber = &favNumber; |
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
type ServiceHtmlElementParameters = { | |
tag: string; | |
close?: boolean; | |
attributes?: Record<string, string>; | |
children?: string; | |
}; | |
export const ServiceHtmlElement = function ({ tag, close, attributes, children }: ServiceHtmlElementParameters): string { | |
const attributesEntries = Object.entries(attributes || new Object()); | |
const attributesConverted = attributesEntries.map(function ([key, 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
const createElement = function ({ className = '', id = '', tag = 'div', name = '' }) { | |
const element = document.createElement(tag); | |
if (className) { | |
element.classList.add(className); | |
} | |
if (name) { | |
element.setAttribute('name', name); | |
} | |
if (id) { | |
element.setAttribute('id', 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
// webscrapper | |
(async function () { | |
const ConvertDateTime = function (dateTime) { | |
const dateDay = dateTime.slice(0, 2); | |
const dateMonth = dateTime.slice(3, 5); | |
const dateYear = dateTime.slice(6, 10); | |
const timeHour = dateTime.slice(11, 13); | |
const timeMinute = dateTime.slice(14, 16); | |
const timeSeconds = dateTime.slice(17, 19); |
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 { format, parse, subDays } from "date-fns"; | |
import { TypeRequestHistory } from "@/Types/TypeRequest.tsx"; | |
export type RequestHistoryProps = { | |
imei: string; | |
start: string; |
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
// SCRIPT TO MAKE MULTIPLE REQUESTS WITH AXIOS | |
import axios from "axios" | |
const servers = { | |
anything: "https://httpbin.org/anything", | |
ip: "https://httpbin.org/ip", |
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
<!-- | |
REPORTS (alert, driver, history, ignition, overspeed, telemetry, trip) | |
REPORT FILES (CSV, PDF, XLS) | |
--> | |
<body style="margin: 0;"> | |
<!-- <iframe class="iframeView" src="https://tracker-net.web.app/report/legacy/telemetry" style="width: 100vw; height: 100vh; border: none; padding: none; display: block;"></iframe> --> |