s谩bado, 4 de julio de 2020

DataTables, TypeError: Cannot read property 'style' of undefined

I had this problem on my dataTables library, searching I found that my fields on the array had more fields that html columns.馃槗

mi茅rcoles, 1 de julio de 2020

Cors error fetch on React

Hello guys, I'm going to show you how I fix this common error to call a .Net API.

There are many scenarios that can affect your project and cause this error. In my case, My project was using annotation in any endpoint and in the .webconfig there are the next XML

      <httpProtocol>
        <customHeaders>
          <add name="Access-Control-Allow-Origin" value="*" />
          <add name="Access-Control-Allow-Headers" value="Content-Type" />
          <add name="Access-Control-Allow-Methods" value="GET,POST,PUT,DELETE,OPTIONS" />
         <add name="Access-Control-Allow-Credentials" value="true" />
        </customHeaders>
      </httpProtocol>

I delete it and then remove the anotation of my Post endpoint. 


 [Route("signaltracer/Reports/GetSignalByCutomerId")]
 [HttpPost]
 public List<ChartJsonData> LockLimits(string pidCustomer = "")

Next,

1- Install the nugget package Microsoft.AspNet.WebApi.Cors


2- add an annotation to a class 
 [EnableCors("*", "*", "*")]
  public class ReportsController : ApiController
  {

3- in the folder App_Start/WebApiConfig.cs, add the next code

  var cors = new EnableCorsAttribute("*", "*", "*");
  config.EnableCors(cors);
  config.MapHttpAttributeRoutes();

and I make a little modification to my endpoint function 


public ChartLimits LockLimits([FromBody]ChartLimits limitsParams)
 {

viernes, 12 de octubre de 2018

Template Invoce with jsdf

Hello there! this is a example of how create a Invoice with java Scritp jspdf.
Link of lib jspdf: https://goo.gl/jtRRSF

var date = new Date();
var FullDateField = date.getDay()+'/'+date.getDate()+'/'+date.getFullYear();
       // example of add image in Base64
      //  var imgData = 'data:image/jpeg;base64,..  

function Generate_PDF(){
           
           
            //######## Table Header #########
            var doc = new jsPDF();
            //doc.addImage(imgData, 'JPEG', 10, 5, 60, 40);
            doc.rect(10,60, 190, 0);//Linea de encabezado
            doc.setFontSize(18);
            doc.text(75,15,' Boston');
            doc.setFontSize(18);
            doc.text(100,22,'DIUNYTRA');
            doc.setFontSize(10);
            doc.setFontType("bold");
            doc.text(75,35,'C\xE9dula Jur\xEDdica: 3-101-238816');
            doc.text(75,40,'Central Telef\xF3nica: 2771-7103');
            doc.text(75,35,'C\xE9dula Jur\xEDdica: 3-101-238816');
            doc.text(75,40,'Central Telef\xF3nica: 2771-7103');
            doc.setFontType("italic");
            doc.text(75,45,'50m Oeste del cruce de Barrio Boston,');
            doc.text(75,50,'San Isidro de El General, Perez Zeled\xF3n.');
            doc.setFontType("bold");
            doc.text(177,35,'COTIZACI\xD3N');
            doc.setTextColor(255,0,0);   
            doc.text(185,40,'00');
            doc.setTextColor();
            doc.text(175,45,'Fecha:'+FullDateField);
       
            doc.text(20,65,'Cliente:');
            doc.text(20,70,'Cliente Contado');//Esto debe ser un parametro
           
            //######## Table Items Header#########
            doc.rect(10,91, 190, 0);//Linea Head Table
            doc.text(10,95,'ART\xCDCULO');
            doc.text(35,95,'DESCRIP\xD3N');
            doc.text(120,95,'CANTIDAD');
            doc.text(145,95,'PRECIO UNIDAD');
            doc.text(185,95,'TOTAL');
            doc.rect(10,96, 190, 0);
           
            //######## Table Items Details#########
            doc.setFontType("italic");
            doc.text(10,100,'123');
            doc.text(35,100,'R2D2 Rojo');
            doc.text(120,100,'400');
            doc.text(145,100,'1,000,000');
            doc.text(180,100,'400,000,000');
           
            doc.text(10,105,'123');
            doc.text(35,105,'C3PO Color Plata Edicion 2016');
            doc.text(120,105,'400');
            doc.text(145,105,'1,000,000');
            doc.text(180,105,'400,000,000');
           
            //######## Table Footer ######
            doc.setFontSize(8);
            doc.rect(10,110, 190, 0);//Linea Head Table
            doc.text(10,115,'*PRECIOS SUJETOS A CAMBIO SIN PREVIO AVISO');
            doc.text(25,120,'VENDEDOR:');
            doc.text(25,125,'EMITIDA:');
            doc.rect(10,135, 80, 0);
            doc.text(38,140,'ENCARGADO');
            //######## Table Totals ######
            doc.setFontType("bold");
            doc.setFontSize(10);
            doc.text(140,115,'SUB TOTAL');doc.text(180,115,'1.800.333,00');
            doc.text(140,120,'DESCUENTO:');doc.text(180,120,'0,00');
            doc.text(140,125,'IMPUESTO:');doc.text(180,125,'242.590,00');
            doc.text(140,130,'TOTAL');doc.text(180,130,'2.242.590,00');
           
            //doc.text(185,115,'TOTAL');
            //doc.rect(10,96, 190, 0);
           
           
           
           
            //doc.addPage();
            //doc.text(20,20,'Test Page 2!!');
            doc.save('Test_PDF.pdf');



lunes, 11 de julio de 2011

Super Os 11.4


Super Os version 11.4 es nada mas y nada menos que la versi贸n de Ubuntu 11.4,Super Os cuenta con muchos codecs de audio y v铆deo restringidos tambien tiene muchas aplicaciones que inicialmente ubuntu en su versi贸n Oficial no las incluye. Esta caracteristica la hace muy especial, para los usuarios que desean probar ubuntu pero no cuentan con una conexion a internet permanente para descargar los codecs o diferentes aplicaciones.


http://hacktolive.org/wiki/Super_OS

lunes, 31 de mayo de 2010

Desactiva el auto run de tu pen drive para evitar virus

Puede eliminar el 100% de las amenazas *No requiere actualizacion de firmas *100% compatible con cualquier programa *Inmuniza tu sistema *Es el mas rapido del mundo *Facil de usar *No requiere instalacion *Se puede usar en Windows 2000/Windows XP o Vista.

jueves, 3 de septiembre de 2009

Los gumer este tipo presenta los ultimos video games de una forma demaciado divertida.


este link fue sacado de vimeo.
http://www.vimeo.com/3785605

Super OS.


Super os es ubuntu pero con todos los codecs que te puedas imaginar tambien incluye compiz el famoso escritorio cubo y otros opciones muy llamativas que inclulle.
viene con una aplicacion llamada wine para los que no la conocen es para correr algunos programas de windows es muy buena ya lo prove espero que ustedes tambien.
de verdad pruebelan esta muy buena.

Software Included

* App Runner 0.2
* aMSN 0.97.2
* compizconfig-settings-manager (to configure the settings of Compiz and the desktop effects)
* cd2usb Windows available program on the DVD menu
* Firefox 3.0.9 (+ Gears 0.5.4.2 + Flash + Moonlight)
* Furius ISO Mount 0.11.1.1
* gufw (GUI for uncomplicated firewall) 0.20.7
* NDISwrapper + GUI (ndisgtk)
* Opera 9.64 (+ Flash + Moonlight + apturl support)
* RealPlayer 11
* Skype 2.0.0.72
* StartUp-Manager 1.9.11
* ubuntu-restricted-extras (Java runtime environment, codecs, MP3 support, support for DVD-video, flash player, etc..)
* Ubuntu Tweak 0.4.7
* VLC Media Player 0.9.9a
* Wine 1.1.19

descarguelan con este link
cortecia de linux freedom