This file contains 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
const toInt = (n) => { | |
// If n is not a number return n | |
if ( typeof n != 'number') return n; | |
let s = n.toString(); | |
// If n is a whole number return n | |
if (s.indexOf('.') == -1) return n; | |
// If n is a floating number return the int representation | |
let len = s.split('.')[1].length; |
This file contains 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
// Usage | |
// let x = 2.1234; | |
// x.trunc(2); | |
// Result: "2.12" | |
// x = 2; | |
// x.trunc(2) | |
// Result: "2.00" | |
// @input d - decimal places to truncate |
This file contains 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
<apex:page controller="AsposeStorageController"> | |
<apex:form id="theForm"> | |
<apex:pageBlock title="Requirements" rendered="true"> | |
<ol> | |
<li>Register aspose account.</li> | |
<li>Fill in the form below and click Run Sample (all fields are required).</li> | |
</ol> | |
</apex:pageBlock> | |
<apex:pageBlock title="Upload Static Resources to Aspose Storage" rendered="true"> | |
<table> |