Download a HTML content as pdf using javascript – jsPDF

Using jsPDF library, you can download the div containing graphs, tables, contents as a PDF. This is a HTML5 client-side solution for generating PDFs. Simply include library in your <head>, generate your PDF using the many built-in functions, then create a button to trigger the download. <script type=”text/javascript” src=”http://cdnjs.cloudflare.com/ajax/libs/jspdf/0.9.0rc1/jspdf.min.js”></script> Create a object: var doc = […]

MyISAM vs Innodb

MyISAM vs Innodb – both are commonly used engines on MySQL servers and they both have their unique advantages and disadvantages against each other. MyISAM is the default storage engine type for MySQL 5.0 but the Cloud Sites environment defaults the storage engine to Innodb. MyISAM vs Innodb: MyISAM: Table level locking. Innodb: Row level […]

Components of KnockoutJS

Components are way of organizing the UI code for structure wise and promote code re-usability for a large application. Components can be registered using the ko.components.register() API. ko.components.register(‘componentname’, { viewModel: {…}, template: {….) }); <!DOCTYPE html> <head> <title>Components of KnockoutJS</title> <script src=”https://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js”></script> </head> <body> <h4>Example 1: without parameters</h4> <div data-bind=’component: “example-editor”‘></div> <h4>Example 2: passing parameters</h4> […]