Skip to content

Instantly share code, notes, and snippets.

View nsdevaraj's full-sized avatar
🎯
Focusing

N.S.Devaraj nsdevaraj

🎯
Focusing
View GitHub Profile
getPageDimensionsPt : function(paperSize, orientation) {
var pageDimensionsPt = {};
if (orientation.toLowerCase() === "portrait") {
switch (paperSize.toLowerCase()) { // 72DPI
case "a2":
pageDimensionsPt.height = 1648;
pageDimensionsPt.width = 1191;
break;
case "a3":
/*
* Mark rows which have cells in the row header columns with text that's longer than the cell width
*
* Notes:
*
* - See https://wiki.wdf.sap.corp/wiki/display/zen/Crosstab+span+cells for span cell position reference.
* - Representation of default cell width /maxTextWidthPx in the ASCII tables below: +--------------+ = 16 chars
* - The actual modification of the crosstab data is done in expandHeaderRowsAndWrapText - this function
* adds flags to record what needs to be done later
*
/*
* Mark column header rows which have cells with text that's longer than the cell width
*
* Notes:
*
* - Representation of default cell width /maxTextWidthPx in the ASCII tables below: +--------------+ = 16 chars
* - The actual modification of the crosstab data is done in expandColumnHeaderRowsAndWrapText - this function
* adds flags to record what needs to be done later
*
* 5 cases:

Keybase proof

I hereby claim:

  • I am nsdevaraj on github.
  • I am nsdevaraj (https://keybase.io/nsdevaraj) on keybase.
  • I have a public key ASAXfEr5PAZjhw_DeUfOCLNOq24-RNISKcGZ0WyqJuUX4go

To claim this, I am signing this object:

//<!--
//Revised 2003 Tax Rate Schedules
//SCHEDULE X - Single
//SCHEDULE Y-1 - Married Filing Jointly or Qualifying Widow(er)
//SCHEDULE Y-2 - Married Filing Separately
//SCHEDULE Z - Head of Household
var t_2000_S = new Array(
26250, 15,
@nsdevaraj
nsdevaraj / timeseries.js
Created June 10, 2019 06:23
arima pending
function assertNotEmpty(list) {
if (list.length === 0)
throw new Error("List length is zero");
}
function simple_exponential_smoothing(series, alpha) {
assertNotEmpty(series);
var prev = 0.0;
var ses_series = [];
var exports = module.exports = {};
/*Simple exponential smoothing */
exports.SimpleExponentialSmoothing = function(data, alpha)
{
if(data == null)
{
throw "data parameter is null";
}
@nsdevaraj
nsdevaraj / zohopeople.js
Last active April 24, 2019 10:33
copy json from zoho
var output={};
temp1.forEach(function(objs,index){
var i = index;
var outputDays={};
for (var key in temp1[i]) {
// skip loop if the property is from prototype
if (!temp1[i].hasOwnProperty(key)) continue;
var obj = temp1[i][key];
if(obj['dayStatus'] == 'P'){
var otdt=obj.hrsStatus.split('/')[1];
{
"dataRoles": [
{
"displayName": "Values",
"name": "values",
"kind": "GroupingOrMeasure"
}
],
"objects": {
},
@nsdevaraj
nsdevaraj / datalayer_matrix.v1.json
Last active October 31, 2018 13:15 — forked from praveenn77/datalayer_matrix.v1.json
datalayer_matrix.v1.json
{
"metadata":[],
"datasource":{
"rows":[
{
"id":"region",
"value":"EAST",
"role": "category",
"ref":"easte",
"level":0,