Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// output_opacity = 0.35;
// } else {
// output_opacity = 1;
// }
// return output_opacity;
// // return 0.1;
// })
// .attr('transform', function(d) {
// return fine_position_tile(params, d);
// });
if (params.matrix.tile_type == 'updn'){
// value split
var row_split_data = underscore.filter(inp_row_data, function(num){
return num.value_up != 0 || num.value_dn !=0 ;
});
// tile_up
d3.select(row_selection)
.selectAll('.tile_up')
.data(row_split_data, function(d){return d.col_name;})
.enter()
.append('path')
.attr('class','tile_up')
.attr('d', function() {
return draw_up_tile(params);
})
.attr('transform', function(d) {
fine_position_tile(params, d);
})
function importOAuthTokenPaths(swagger, resourceName, paths) {
if (paths.length === 0) { return; }
var allPaths = swagger.paths || (swagger.paths = {});
var allDefinitions = swagger.definitions || (swagger.definitions = {});
// err if would overwrite any paths
var allPathNames = Object.keys(allPaths);
var existingPaths = _.filter(paths, function(path) { return _.contains(allPathNames, path); });
if (existingPaths.length > 0) {
throw new Error('Paths ' + existingPaths + ' already exist. Cannot insert OAuth.');
}
// err if would overwrite any definitions
var existingDefinitions = _.filter(allDefinitions, function(key) {
return _.contains(Object.keys(oauthSwagger.definitions), key);
});
if (existingDefinitions.length > 0) {
throw new Error('Definitions ' + existingDefinitions + ' already exist. Cannot insert OAuth.');
}
// add the token paths
_.each(paths, function(path, name) {
var keyPath = '/' + name;
allPaths[path] = oauthSwagger.paths[keyPath];
return {
resourceType: 'Questionnaire',
id: 'OCAN2.0.7'
};
}
assert(false);
};
var results = fhir.evaluate(bundle, 'Bundle.entry.resource.questionnaire.resolve()');
assert(results);
assert(results.length === 4);
var questionnaires = _.filter(results, function(result) {
return result.resourceType === 'Questionnaire';
});
assert(questionnaires.length === 4);
assert(results[0].id === 'RAI-HC2011');
assert(results[1].id === 'GAIN-Q33.3.7 ONT MI');
assert(results[2].id === 'OCAN2.0.7');
assert(results[3].id === 'OCAN2.0.7');
});
quitCheck = _.debounce(() => {
const visibleWindows = _.filter(this._windows, win => win.isVisible());
const mainWindow = this.get(WindowManager.MAIN_WINDOW);
const noMainWindowLoaded = !mainWindow || !mainWindow.isLoaded();
if (visibleWindows.length === 0 && noMainWindowLoaded) {
app.quit();
}
}, 25000);
controller.registerCall('accuracy::campaigns::parse', data => _.filter(data[0], ({period_end}) => moment(period_end, 'YYYY-MM-DD').isAfter()));
render: function() {
let currentSupporters = _.filter(logos, function(logo) {
return logo.currentSupporter;
});
let notCurrentSupporterLogos = _.filter(logos, function(logo) {
return !logo.currentSupporter;
});
var notCurrentSupporterLogoItems = _.map(notCurrentSupporterLogos, ({id, logo, url}) => (
<a href="{url}">
<img alt="{id" src="{logo}" id="{id}">
</a>
));
var currentSupporterLogoItems = _.map(currentSupporters, ({id, logo, url}) => (
<a href="{url}">
<img alt="{id" src="{logo}" id="{id}">
</a>
));
private buildCollapsed() {
const numberOfSelected = filter(this.collapsed, (value: FacetValue) => value.selected).length;
const numberOfExcluded = filter(this.collapsed, (value: FacetValue) => value.excluded).length;
Assert.check(numberOfSelected + numberOfExcluded == this.collapsed.length);
const elem = $$('div', {
className: 'coveo-facet-breadcrumb-value'
});
const multiCount = $$('span', {
className: 'coveo-facet-breadcrumb-multi-count'
});
multiCount.text(l('NMore', Globalize.format(numberOfSelected + numberOfExcluded, 'n0')));
elem.append(multiCount.el);
const valueElements = map(this.collapsed, facetValue => {
return new this.breadcrumbValueElementKlass(this.facet, facetValue);
manager.formatResults = function(results, callback) {
var query = results.queryplan.query;
results.documents = results.documents || [];
results.dimensions = results.dimensions || query.dimensions;
results.metrics = results.metrics || query.metrics;
//allow engines to return a fake metric to be removed before processing
results.dimensions = _.filter(results.dimensions, function(dimension) {
return dimension.key !== 'fake';
});
results.metrics = _.filter(results.metrics, function(metric) {
return metric.key !== 'fake';
});
var dindex = 0;
async.map(results.documents, function(document, cb) {
//results.documents.forEach(function (document, dindex) {
delete document.key;
results.dimensions.forEach(function(dimension) {
//document[dimension.key] = document[dimension.key];
if (dimension.datatype == 'date') {
document[dimension.key] = document[dimension.key];
}
/*
else if (dimension.datatype === 'ip' && document[dimension.key] && document[dimension.key] !== '(not set)') {
var ip = document[dimension.key];
document[dimension.key] = joola.common.extend({ip: ip}, joola.common.geoip.lookup(ip)) || '(not set)';
on(actions.tabsRestored, (state, action) => {
const snapshot = action.payload;
const tab = snapshot.current || state.tab;
const transient = filter(
map(snapshot.items, (tab: ITabDataSave) => {
return tab.id;
}),
x => !!x
);
return {
...state,
tab,
openTabs: {
...state.openTabs,
transient,
},
};
});