Skip to content

Instantly share code, notes, and snippets.

View marcos-bah's full-sized avatar
🇧🇷
Working from home

Marcos Barbosa marcos-bah

🇧🇷
Working from home
View GitHub Profile
onPDF() {
var element = document.getElementById('teste').innerHTML;
//html header
var header = "<div style='width: 100%; height: 100px;'><div style='float: left'>" +
"<img src='" + "assets/logo/somar.png" + "' style='width: auto; height: 100px;'>" +
"</div>" +
"<div style='float: right'>" +
"<img src='" + "assets/logo/marica.png" + "' style='width: auto; height: 70px;'>" +
<div>
<!-- TODO: Diminur botao de envio -->
<Button
@action="$refs['csv-file'].click()"
width="360px"
height="54px"
otherClass="text-none
subtitle-2
font-weight-light
px-12
npm init nuxt-app <project-name>
@marcos-bah
marcos-bah / settings.json
Created February 7, 2022 12:02
Configuração vs-code
{
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.fontLigatures": true,
"workbench.startupEditor": "newUntitledFile",
"editor.suggestSelection": "first",
"editor.formatOnSave": true,
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
@marcos-bah
marcos-bah / .zshrc
Created February 7, 2022 11:54
Gist com config inicial do .zshrc My Oh Zsh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# others
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
source "${ZINIT_HOME}/zinit.zsh"
@marcos-bah
marcos-bah / future.dart
Created October 31, 2021 17:58
Exemplo de uso do future
import 'package:flutter/material.dart';
class TesteWidget extends StatefulWidget {
const TesteWidget({Key? key}) : super(key: key);
@override
_TesteWidgetState createState() => _TesteWidgetState();
}
class _TesteWidgetState extends State<TesteWidget> {
@marcos-bah
marcos-bah / JPoligonosRegulares.java
Created October 18, 2021 21:33
Desenhando poligonos
import java.awt.Graphics;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.GeneralPath;
public class JPoligonosRegulares extends JPanel {
// parametros: numero de lados, tamanho e cores.
private int numLados;
private int tamanho;
private Color[] cores;
@marcos-bah
marcos-bah / grafos-final.cpp
Created October 18, 2021 16:49
Trabalho final de grafos
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <bits/stdc++.h>
#define MAX 100
#define INF 99999
int grafo[MAX][MAX]; // representação matricial dos grafos
// Funcao para ler a matriz
void CGR2020016324View::OnDraw(CDC* pDC)
{
CGR2020016324Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
// TODO: adicione o código de desenho para dados nativos aqui
CRect rectTela;
@marcos-bah
marcos-bah / listaOrdenada.cpp
Created August 4, 2021 18:18
Lista Encadeada - Ordenada
#include <iostream>
//template
template <class T>
class ListaOrdenada{
private:
class No{
private:
No* prox;
T dado;