Custom render function
513402
function (subMesh) {
                var mesh = subMesh.getRenderingMesh();
                var scene = _this._scene;
                var engine = scene.getEngine();
                // Culling
                engine.setState(subMesh.getMaterial().backFaceCulling);
                // Managing instances
                var batch = mesh._getInstancesRenderList(subMesh._id);
                if (batch.mustReturn) {
                    return;
                }
                var hardwareInstancedRendering = (engine.getCaps().instancedArrays) && (batch.visibleInstances[subMesh._id] !== null);
                if (_this.isReady(subMesh, hardwareInstancedRendering)) {
                    engine.enableEffect(_this._effect);
                    mesh._bind(subMesh, _this._effect, BABYLON.Material.TriangleFillMode);
                    var material = subMesh.getMaterial();
                    _this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
                    _this._effect.setFloat2("depthValues", scene.activeCamera.minZ, scene.activeCamera.minZ + scene.activeCamera.maxZ);
                    // Alpha test
                    if (material && material.needAlphaTesting()) {
                        var alphaTexture = material.getAlphaTestTexture();
                        _this._effect.setTexture("diffuseSampler", alphaTexture);
                        _this._effect.setMatrix("diffuseMatrix", alphaTexture.getTextureMatrix());
                    }
                    // Bones
                    if (mesh.useBones && mesh.computeBonesUsingShaders) {
                        _this._effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
                    }
                    // Draw
                    mesh._processRendering(subMesh, _this._effect, BABYLON.Material.TriangleFillMode, batch, hardwareInstancedRendering, function (isInstance, world) { return _this._effect.setMatrix("world", world); });
                }
            }
82181
function renderToString(vnode, context, opts, inner, isSvgMode) {
	if (vnode==null || typeof vnode==='boolean') {
		return '';
	}

	let nodeName = vnode.type,
		attributes = vnode.props,
		isComponent = false;
	context = context || {};
	opts = opts || {};

	let pretty = opts.pretty,
		indentChar = typeof pretty==='string' ? pretty : '\t';

	// #text nodes
	if (typeof vnode!=='object' && !nodeName) {
		return encodeEntities(vnode);
	}

	// components
	if (typeof nodeName==='function') {
		isComponent = true;
		if (opts.shallow && (inner || opts.renderRootComponent===false)) {
			nodeName = getComponentName(nodeName);
		}
		else {
			let props = getNodeProps(vnode),
				rendered;

			if (!nodeName.prototype || typeof nodeName.prototype.render!=='function') {
				// stateless functional components
				rendered = nodeName(props, context);
			}
			else {
				// class-based components
				let c = new nodeName(props, context);
				// turn off stateful re-rendering:
				c._disable = c.__x = true;
				c.props = props;
				c.context = context;
				if (c.componentWillMount) c.componentWillMount();
				rendered = c.render(c.props, c.state, c.context);

				if (c.getChildContext) {
					context = assign(assign({}, context), c.getChildContext());
				}
			}

			return renderToString(rendered, context, opts, opts.shallowHighOrder!==false);
		}
	}

	// render JSX to HTML
	let s = '', html;

	if (attributes) {
		let attrs = objectKeys(attributes);

		// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)
		if (opts && opts.sortAttributes===true) attrs.sort();

		for (let i=0; i<attrs.length; i++) {
			let name = attrs[i],
				v = attributes[name];
			if (name==='children') continue;

			if (name.match(/[\s\n\\/='"\0<>]/)) continue;

			if (!(opts && opts.allAttributes) && (name==='key' || name==='ref')) continue;

			if (name==='className') {
				if (attributes.class) continue;
				name = 'class';
			}
			else if (isSvgMode && name.match(/^xlink:?./)) {
				name = name.toLowerCase().replace(/^xlink:?/, 'xlink:');
			}

			if (name==='style' && v && typeof v==='object') {
				v = styleObjToCss(v);
			}

			let hooked = opts.attributeHook && opts.attributeHook(name, v, context, opts, isComponent);
			if (hooked || hooked==='') {
				s += hooked;
				continue;
			}

			if (name==='dangerouslySetInnerHTML') {
				html = v && v.__html;
			}
			else if ((v || v===0 || v==='') && typeof v!=='function') {
				if (v===true || v==='') {
					v = name;
					// in non-xml mode, allow boolean attributes
					if (!opts || !opts.xml) {
						s += ' ' + name;
						continue;
					}
				}
				s += ` ${name}="${encodeEntities(v)}"`;
			}
		}
	}

	// account for >1 multiline attribute
	let sub = s.replace(/^\n\s*/, ' ');
	if (sub!==s && !~sub.indexOf('\n')) s = sub;
	else if (pretty && ~s.indexOf('\n')) s += '\n';

	s = `<${nodeName}${s}>`;
	if (String(nodeName).match(/[\s\n\\/='"\0<>]/)) throw s;

	let isVoid = String(nodeName).match(VOID_ELEMENTS);
	if (isVoid) s = s.replace(/>$/, ' />');

	let pieces = [];
	if (html) {
		// if multiline, indent.
		if (pretty && isLargeString(html)) {
			html = '\n' + indentChar + indent(html, indentChar);
		}
		s += html;
	}
	else if (vnode.props.children) {
        let hasLarge = ~s.indexOf('\n');
        let children = vnode.props.children;
        if (!Array.isArray(children)) {
            children = [children]
        }
        for (let i=0; i< children.length; i++) {
            let child = children[i];
            if (child!=null && child!==false) {
                let childSvgMode = nodeName==='svg' ? true : nodeName==='foreignObject' ? false : isSvgMode,
                    ret = renderToString(child, context, opts, true, childSvgMode);
                if (!hasLarge && pretty && isLargeString(ret)) hasLarge = true;
                if (ret) pieces.push(ret);
            }
        }

		if (pretty && hasLarge) {
			for (let i=pieces.length; i--; ) {
				pieces[i] = '\n' + indentChar + indent(pieces[i], indentChar);
			}
		}
	}

	if (pieces.length) {
		s += pieces.join('');
	}
	else if (opts && opts.xml) {
		return s.substring(0, s.length-1) + ' />';
	}

	if (!isVoid) {
		if (pretty && ~s.indexOf('\n')) s += '\n';
		s += `</${nodeName}>`;
	}

	return s;
}
1339343
function renderNode(rootNode) {
    let createdPromises = [];

    var document = getDocument(rootNode);

    recurseTree(rootNode, (foundNode) => {
        if (foundNode.tagName) {
            let nodeType = foundNode.tagName.toLowerCase();
            let customElement = registeredElements[nodeType];
            if (customElement) {
                // TODO: Should probably clone node, not change prototype, for performance
                Object.setPrototypeOf(foundNode, customElement);
                if (customElement.createdCallback) {
                    createdPromises.push(new Promise((resolve) => {
                        resolve(customElement.createdCallback.call(foundNode, document));
                    }));
                }
            }
        }
    });

    return Promise.all(createdPromises).then(() => rootNode);
}
591765
function render(gl, width, height, dt, batch, shader) {
    time+=dt
    var anim = Math.sin(time/1000)/2+0.5
        
    //clear the batch to zero
    batch.clear()

    //bind before drawing
    batch.bind(shader)

    //push our sprites which may have a variety
    //of textures
    batch.push({
        position: [anim*100, anim*50],
        shape: [128, 128],
        texture: tex2
    })

    batch.push({
        position: [100, 100],
        shape: [128, 128],
        color: [1, 1, 1, 0.5],
        texture: tex
    })
    batch.push({
        position: [300, 100],
        shape: [128, 128],
        color: [1, 1, 1, 0.5],
        texcoord: [0, 0, 2.5, 2.5],
        texture: tex
    })


    batch.push({
        texture: null,
        position: [100+100*Math.sin(time/2000), 100],
        shape: [63, 63],
        color: [anim, 0, 0, 1.0]
    })


    //we need to flush any outstanding sprites
    batch.draw()

    //and unbind it...
    batch.unbind()
}
1318558
function render() {
		$args=func_get_args();
		$format=$args?array_shift($args):'png';
		if (PHP_SAPI!='cli') {
			header('Content-Type: image/'.$format);
			header('X-Powered-By: '.Base::instance()->PACKAGE);
		}
		call_user_func_array(
			'image'.$format,
			array_merge([$this->data,NULL],$args)
		);
	}
451512
function renderRecursive(render, remaining, results) {
  results = results || [];
  // Once components is exhausted, we can render out the results array.
  if (!remaining[0]) {
    return render(results);
  }

  // Continue recursion for remaining items.
  // results.concat([value]) ensures [...results, value] instead of [...results, ...value]
  function nextRender(value) {
    return renderRecursive(render, remaining.slice(1), results.concat([value]));
  }

  // Each props.components entry is either an element or function [element factory]
  return typeof remaining[0] === 'function'
    ? // When it is a function, produce an element by invoking it with "render component values".
      remaining[0]({ results, render: nextRender })
    : // When it is an element, enhance the element's props with the render prop.
      cloneElement(remaining[0], { children: nextRender });
}
310400
function render() {
    var svg = d3.select('svg');

    xAxisJoin(svg, function(d) { return [d]; })
      .attr('transform', 'translate(0, ' + (height - 20) + ')')
      .call(xAxis);

    yAxisJoin(svg, function(d) { return [d]; })
      .attr('transform', 'translate(' + (width - 30) + ', 0)')
      .call(yAxis);

    if (typeof renderComponent === 'function') {
        renderComponent();
    }
}
990678
function(data) {
            var self    = this,
                render  = null,
                el      = null,
                temp    = null,
                output  = '';

            self.callActions('beforeRender', arguments);

            render = self.callFilters('renderRender', self.mixer.config.render.target, arguments);

            if (typeof render !== 'function') {
                throw new TypeError(mixitup.messages.errorDatasetRendererNotSet());
            }

            output = render(data);

            if (output && typeof output === 'object' && h.isElement(output)) {
                el = output;
            } else if (typeof output === 'string') {
                temp = document.createElement('div');
                temp.innerHTML = output;

                el = temp.firstElementChild;
            }

            return self.callFilters('elRender', el, arguments);
        }
944090
function render(){

	ll('Render start...');

	ll('nodes: ' + bbop.dump(nodes));
	// ll('matrix: ' + dump(matrix));
	ll('val_hash: ' + bbop.dump(val_hash));
	ll('max_val: ' + bbop.dump(max_val));

	var haxis = f2;
	var hhead = global_facet2;
	var vaxis = f1;
	var vhead = global_facet1;
	// Figure out which axis is the longer one and switch.
	// if( vaxis.length > haxis.length ){
	//     haxis = f1;
	//     vaxis = f2;	    
	//     vhead = global_facet1;
	//     hhead = global_facet2;
	// }

	var td_id_to_data = {};
	function _assemble_table(haxis, vaxis){
	    ll('try to _assemble_table...');
	    
	    // Start assembling the table parts.	
	    var thead = new html.tag('thead');
	    
	    // Add what we want in the header row.
	    var head = '';
	    var title_list = [head];
	    us.each(haxis, function(hline){
		var ht = hline[0];
		title_list.push(ht);
	    });
	    // Push the header row into thead.
	    us.each(title_list, function(title_item){
		thead.add_to('<th>' + title_item +
			     '<img style="border: 0px;" src="' +
			     sd.image_base + '/reorder.gif" />' +
			     '</th>');
	    });
	    
	    var tbody = new html.tag('tbody');
	    
	    // Add the rows.
	    us.each(vaxis, function(vline){
		var vt = vline[0];
		
		// Header row.
		var rhead = '<td style="background-color:#e9effa"><b>' +
			vt + '</b></td>';
		var row = [rhead];
		
		// Data rows.
		us.each(haxis, function(hline){
		    var ht = hline[0];
		    var cell_val = val_hash[vt][ht];
		    
		    var color = value_to_color(cell_val);
		    
		    // Data entry.
		    var td_attrs = {
			style: 'background-color:' +color + ';',
			title: vt +', '+ ht +': '+ cell_val,
			'class': 'bbop-js-tooltip',
			generate_id: true
		    };
		    var td = new html.tag('td', td_attrs, cell_val);
		    row.push(td.to_string());
		    
		    // Now save the data for later callback
		    // generation.
		    td_id_to_data[td.get_id()] = {
			x: ht,
			y: vt,
			z: cell_val
		    };
		});
		
		tbody.add_to('<tr>' + row.join('') + '</tr>');
	    });

	    //var tbl = new html.table(title_list);
	    var table_attrs = {
		'generate_id': true,
		'class': 'table' // bs3
	    };
	    var table = new html.tag('table', table_attrs);
	    table.add_to(thead);
	    table.add_to(tbody);

	    return table;
	}

	// Add table and sorting to DOM.
	jQuery(results_head).append(vhead + ' &#92; ' + hhead);
	var table_a = _assemble_table(haxis, vaxis);
	jQuery(results_div).append(table_a.to_string());
	jQuery('#' + table_a.get_id()).tablesorter();

	// Add tooltips.
	//var tt_args = {'position': {'my': 'left bottom', 'at': 'right top'}};
	var tt_args = {
	    'position': {'my': 'center bottom-5', 'at': 'center top'},
	    'tooltipClass': 'amigo-searchbar-tooltip-style'
	};
	jQuery('.bbop-js-tooltip').tooltip(tt_args);

	//
	ll('Completed render!');
	ll('Done!');
    }
719723
def _shorten_render(renderer, max_len):
    """"""

    def short_renderer(expr):
        res = renderer(expr)
        if len(res) > max_len:
            return '...'
        else:
            return res

    return short_renderer
656080
function render() {
  var createNodes = require("./create-nodes");
  var createClusters = require("./create-clusters");
  var createEdgeLabels = require("./create-edge-labels");
  var createEdgePaths = require("./create-edge-paths");
  var positionNodes = require("./position-nodes");
  var positionEdgeLabels = require("./position-edge-labels");
  var positionClusters = require("./position-clusters");
  var shapes = require("./shapes");
  var arrows = require("./arrows");

  var fn = function(svg, g) {
    preProcessGraph(g);

    var outputGroup = createOrSelectGroup(svg, "output");
    var clustersGroup = createOrSelectGroup(outputGroup, "clusters");
    var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths");
    var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g);
    var nodes = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes);

    layout(g);

    positionNodes(nodes, g);
    positionEdgeLabels(edgeLabels, g);
    createEdgePaths(edgePathsGroup, g, arrows);

    var clusters = createClusters(clustersGroup, g);
    positionClusters(clusters, g);

    postProcessGraph(g);
  };

  fn.createNodes = function(value) {
    if (!arguments.length) return createNodes;
    createNodes = value;
    return fn;
  };

  fn.createClusters = function(value) {
    if (!arguments.length) return createClusters;
    createClusters = value;
    return fn;
  };

  fn.createEdgeLabels = function(value) {
    if (!arguments.length) return createEdgeLabels;
    createEdgeLabels = value;
    return fn;
  };

  fn.createEdgePaths = function(value) {
    if (!arguments.length) return createEdgePaths;
    createEdgePaths = value;
    return fn;
  };

  fn.shapes = function(value) {
    if (!arguments.length) return shapes;
    shapes = value;
    return fn;
  };

  fn.arrows = function(value) {
    if (!arguments.length) return arrows;
    arrows = value;
    return fn;
  };

  return fn;
}
527451
function render(content) {
  var deferred = q.defer();

  var blockType = "normal";
  var lines = content.split("\n");
  var blocks = {};
  for (var i=0; i<lines.length; i++) {
    var line = lines[i];

    if (line.substr(0,1) == "@") {
      blockType = line.substr(1).trim();
      if (blockType === "end") blockType = "normal";
      continue;
    }
    if (blocks[blockType])
      blocks[blockType] += line + "\n";
    else
      blocks[blockType] = line + "\n";
  }

  for (var key in blocks) {
    if (blocks.hasOwnProperty(key)) {
      try {
        blocks[key] = metaMarked(blocks[key]);
      } catch(err) {
        return deferred.reject(new Error(err));
      }
    }
    deferred.resolve(blocks);
  }

  return deferred.promise;
}
177482
function RenderProgramWrapper(layer, shader) {
    this.shader = shader;
    this.layer = layer;
    this.context = layer.context;
    this.draw = function() {};

    this.array_size = 16;
    this.max_size = 1024;
    this._indexArray = new Uint16Array(6 * this.array_size);
    this._indexBuffer = layer.context.createBuffer();
}
478233
function _render() {
			var HTML = '<ol>';
			var barInfoHTML = '<ol>';

			//get all data from the filter ui elements
			var filterOptions = _getFilterOptions();
			//filtered and modified data
			var data = _applyFilters(_rawdata, filterOptions);

			//no data bar
			if (data.length === 0) {
				HTML += '<li class="line nodata" data-uid="' + -1 + '"></li>';
				barInfoHTML += '<li class="line nodata" data-uid="' + -1 + '"><div class="info line">No data</div></li>';
			}

			data.forEach(function (item) {
				var rawItem = _getBarById(item.uid);
				HTML += '<li data-uid="' + item.uid + '" class="line" title="' + _getBarTitle(rawItem) + '"' + _getBarDataAttributes(rawItem) + '  >';
				HTML += '<div class="bar ' + _getBarColor(rawItem.duration) + '" style="width: ' + _calculateBarWidth(item.duration) + ' margin-left: ' + _calculateBarOffset(item, filterOptions.filterByTime.start) + '">';
				HTML += '<div class="sub-bar ' + _getBarColor(rawItem.time) + '" style="width: ' + _calculateBarWidth(item.time) + '"></div>';
				HTML += '</div>';
				HTML += '</li>';

				//render bar info ==================================================================================
				barInfoHTML += '<li data-uid="' + item.uid + '" title="' + _getBarTitle(rawItem) + '" class="line ' + _getBarClassType(rawItem.categories[0]) + '" ' + _getBarDataAttributes(rawItem) + '>';
				barInfoHTML += '<div class="info line">' + _formatInfo(rawItem) + ' (' + (rawItem.time).toFixed(0) + ' ms)</div>';
				barInfoHTML += '</li>';
			});

			HTML += '</ol>';
			barInfoHTML += '</ol>';

			document.querySelector('#sapUiSupportPerfHeaderTimelineBarWrapper').innerHTML = HTML;
			document.querySelector('#sapUiSupportPerfHeaderTimelineBarInfoWrapper').innerHTML = barInfoHTML;

			_createTimelineGrid(filterOptions);
			_filterByCategory(); // Don't change the order, this is applying css styles on the rendered content
		}
918382
function convertRenderer (cell) {
  const {renderer} = cell
  if (renderer === undefined) {
    return
  }
  const basicRenderers = [
    'boolean',
    'string',
    'number'
  ]
  if (basicRenderers.indexOf(renderer) >= 0) {
    return {name: renderer}
  }
  return customRenderer(renderer, cell.properties)
}
1317373
function Renderer(options) {
  options = options || {};
  this.MD   = new MDRenderer(options);
  this.CGMD = new CGMDRenderer(new MDRenderer(options));

  return this;
}
1083911
function renderDoc(page, renderOpts) {
    if (generator.renderOpts !== defaultRenderOpts) return log(new Error('Recursive call to renderDoc'));
    var rOpts = generator.renderOpts = function() { return u.assign({}, defaultRenderOpts(page), renderOpts); };
    var out = renderTemplate(page, docTemplate(page), rOpts()); // synchronous
    generator.renderOpts = defaultRenderOpts;
    return out;
  }