Skip to content

Instantly share code, notes, and snippets.

View nsdevaraj's full-sized avatar
🎯
Focusing

N.S.Devaraj nsdevaraj

🎯
Focusing
View GitHub Profile
/*
* 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,
This file has been truncated, but you can view the full file.
!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=490)}([function(e,t,n){e.exports=n(620)()},function(e,t,n){"use strict";e.exports=n(97)},function(e,t,n){"use strict";function o(e,t){var n=[null].concat(t);return new(e.bind.apply(e,n))}function r(e,t,n){var o=p(e.constructor);o.postConstructMethods||(o.preConstructMethods=[]),o.preConstructMethods.push(t)}function i(e,t,n){var o=p(e.constructor);o.postConstructMethods||(o.postConstructMethods=[]),o.postConstructMethods.push(t)}function a(e,t,n){var o=p(e.constructor);o.preDestroyMethods||(o.preDestroyMethods=[]),o.preDestroyMethods.push(t)}function s(e){retur