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
async ObtemConteudodoEmail() { | |
let parser = new DOMParser(); | |
this.doc = parser.parseFromString(this.editor.getContent(), 'text/html'); | |
let imagens = Array.from(this.doc.getElementsByTagName('img')) | |
await Promise.all(imagens.map(async (elemento) => { | |
elemento.src = await this.ModificaImagem(elemento.src) |
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
/** | |
* @author: Oberdan Brito | |
* @copyright 2021 Craos.NET | |
* @description Exemplo de upload usando NodeJS | |
* @license MIT | |
* @site Para visualizar o código completo acess: https://github.com/OberdanBrito/Upload-com-NodeJS | |
*/ | |
const Config = require('./config') | |
const express = require('express') |
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
resizeImage(base64Str, maxWidth = 400, maxHeight = 350) { | |
return new Promise((resolve) => { | |
let img = new Image() | |
img.src = base64Str | |
img.onload = () => { | |
let canvas = document.createElement('canvas') | |
const MAX_WIDTH = maxWidth | |
const MAX_HEIGHT = maxHeight | |
let width = img.width | |
let height = img.height |
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
/** | |
* Como obter datas retroativas usando o bloco de código, Looping | |
*/ | |
do | |
$$ | |
begin | |
for i in 1 .. 365 loop | |
raise notice '%', current_date - i || 'T00:00:00.000Z'; |
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 or replace view api.consultoria_remessa_meses(ano, mes) as | |
SELECT c.ano, | |
c.mes::integer AS mes | |
FROM ( SELECT date_part('year'::text, CURRENT_DATE) AS ano, | |
to_char(a.datas::timestamp with time zone, 'mm'::text) AS mes | |
FROM ( SELECT date_trunc('month'::text, datas.datas)::date AS datas | |
FROM generate_series((date_part('year'::text, CURRENT_DATE)::text || '-01-01'::text)::timestamp without time zone, (date_part('year'::text, CURRENT_DATE)::text || '-12-01'::text)::timestamp without time zone, '1 mon'::interval) datas(datas)) a | |
WHERE date_part('month'::text, a.datas) >= (date_part('month'::text, CURRENT_DATE) - 6::double precision) | |
UNION | |
SELECT date_part('year'::text, CURRENT_DATE) + 1::double precision AS ano, |
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 'package:flutter/material.dart'; | |
import 'sidebar.dart'; | |
import 'theme.dart'; | |
import 'package:unit/docs/docs_list.dart'; | |
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | |
import 'package:carousel_slider/carousel_slider.dart'; | |
class HomePage extends StatefulWidget { | |
const HomePage({Key? key}) : super(key: key); |
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
// ignore_for_file: depend_on_referenced_packages | |
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | |
import 'package:gestor_commons/data/data.dart'; | |
import 'package:gestor_commons/theme.dart'; | |
import 'package:gestor_commons/images.dart'; | |
import 'package:intl/intl.dart'; |
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
// ignore_for_file: depend_on_referenced_packages, unnecessary_import | |
import 'dart:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | |
import 'package:gestor_commons/data/data.dart'; | |
import 'package:gestor_commons/images.dart'; | |
import 'package:gestor_commons/theme.dart'; |
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
// ignore_for_file: depend_on_referenced_packages | |
import 'dart:async'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | |
import 'package:gestor_commons/data/data.dart'; | |
import 'package:gestor_commons/images.dart'; | |
import 'package:gestor_commons/theme.dart'; |
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
Dim linha, contador, inicio, final, vazios As Long | |
Function FormatarNomeArquivo(str As String) As String | |
Dim i As Long, letters As String, letter As String | |
letters = vbNullString | |
For i = 1 To Len(str) | |
letter = VBA.Mid$(str, i, 1) | |
If (Asc(LCase(letter)) >= 97 And Asc(LCase(letter)) <= 122) Or letter = Chr(32) Then | |
letters = letters + letter | |
End If |