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
| var canvas = document.getElementById('canvas'), | |
| ctx = canvas.getContext('2d'); | |
| canvas.width = $('img').width(); | |
| canvas.crossOrigin = "Anonymous"; | |
| canvas.height = $('img').height(); | |
| ctx.drawImage($('img').get(0), 0, 0); | |
| ctx.font = "36pt Verdana"; | |
| $(document).on('input','#inp',function(){ | |
| //redraw image | |
| ctx.clearRect(0,0,canvas.width,canvas.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
| .contenedorCentro { | |
| position: absolute; | |
| display: table; | |
| height: 100%; | |
| width: 100%; | |
| text-align: center; | |
| border: 2px dashed #f69c55; | |
| } | |
| .centrado { |
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
| router.get('/email',function (req, res) { | |
| var pdf = require('html-pdf'); | |
| var fs = require('fs'); | |
| var html = '<h3>hola</h3><p>chau</p>' | |
| var transporter = nodemailer.createTransport({ | |
| host: 'smtp.gmail.com', // mail.clubhonorarios.com | |
| port: 587, |
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
| exports.excel = function(req, res, next){ | |
| var nodeExcel=require('excel-export'); | |
| var conf={}; //lleva la configuarcion de las columnas y filas | |
| arr=[]; // array donde se generan las filas | |
| var fechaInicio = '"'+req.params.fechaInicio+'"'; | |
| var fechaFin = '"'+req.params.fechaFin+'"'; | |
| conf.cols=[{ | |
| caption:'Sl.', | |
| type:'number', | |
| width:3 |
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
| //npm install html-pdf --save | |
| //sudo apt-get install -y libfontconfig | |
| // esto va si o si | |
| exports.pdf = function(req, res, next){ | |
| var pdf = require('html-pdf'); | |
| var fs = require('fs'); | |
| var html = 'hola' |
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
| switch (this.formulario.tarjeta.value) | |
| { | |
| case '1': | |
| this.tarjeta = 'AMERICAN EX.'; | |
| break; | |
| case '2': | |
| this.tarjeta = 'MASTERCARD'; | |
| break; | |
| case '3': | |
| this.tarjeta = 'VISA'; |
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 { FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
| codigo:any; | |
| this.codigo = formBuilder.group({ | |
| dniProfesional: ['',Validators.compose([Validators.maxLength(11),Validators.minLength(8),Validators.pattern(/()\d/g),Validators.required])], | |
| apellidoProfesional: ['',Validators.compose([Validators.maxLength(15),Validators.minLength(1),Validators.pattern(/()\w/g),Validators.required])] | |
| }); |
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 { HostListener } from '@angular/core'; | |
| // export class hola { | |
| @HostListener('window:beforeunload', ['$event']) | |
| doSomething($event) { | |
| if(true) $event.returnValue='Perderas la informacion!'; | |
| } |
NewerOlder