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
function getInt(a){ | |
a=parseInt(a); | |
a=isNaN(a)?0:a; | |
return a; | |
} | |
function getFloat(a){ | |
a=parseFloat(a); | |
a=isNaN(a)?0:a; | |
return a; | |
} |
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
/* | |
കര്ത്താവായ യേശുവില് വിശ്വസിക്കുക; നീയും നിന്റെ കുടുംബവും രക്ഷപ്രാപിക്കും. | |
jspdf_malayalam_unicode_printing.js | |
Print Malayalam in PDF Documents with jsPDF, converts malayalam unicode to ascii and uses ascii Thiruvachanam font. | |
get https://github.com/MrRio/jsPDF | |
<script src="jsPDF-1.5.3/dist/jspdf.min.js" type="text/javascript"></script> | |
Goto Sampele code section | |
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
How to find out the document width and height very easily? | |
in HTML | |
<span id="hidden_placer" style="position:absolute;right:0;bottom:0;visibility:hidden;"></span> | |
in javascript | |
var c=document.querySelector('#hidden_placer'); | |
var r=c.getBoundingClientRect(); |
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
function js_stringify(obj){ | |
switch(typeof(obj)){ | |
case 'string': | |
return '"'+ obj + '"' ; | |
break; | |
case 'undefined':case 'number':case 'boolean': case 'null': | |
//undefined=String(undefined); | |
return String(obj) ; | |
break; | |
case 'function': |
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
function parse_javascript_array($s_arr,$date_format='Y-m-d H:i:s'){ | |
$sample_s_arr=' | |
[{ | |
Customer_Name: "Opening Balance", | |
DebitAmount: "0.00", | |
CreditAmount: 0.00, | |
BalanceAmount: "0.00" | |
}, { | |
ID: 890, |