renders cell definition
545116
public function renderDefinition()
    {
        $stream = $this->_rtf->getWriter();
        if ($this->isVerticalMerged()) {
            if ($this->isVerticalMergedFirstInRange()) {
                $stream->write('\clvmgf');
            }
            else {
                $stream->write('\clvmrg');
            }
        }

        $backgroundColor = $this->getBackgroundColor();
        if ($backgroundColor) {
            $colorTable = $this->_rtf->getColorTable();
            $stream->write('\clcbpat' . $colorTable->getColorIndex($backgroundColor) . ' ');
        }

        switch ($this->getVerticalAlignment()) {
            case self::VERTICAL_ALIGN_TOP:
                $stream->write('\clvertalt');
                break;

            case self::VERTICAL_ALIGN_CENTER:
                $stream->write('\clvertalc');
                break;

            case self::VERTICAL_ALIGN_BOTTOM:
                $stream->write('\clvertalb');
                break;
        }

        switch ($this->getRotateTo()) {
            case self::ROTATE_RIGHT:
                $stream->write('\cltxtbrl');
                break;

            case self::ROTATE_LEFT:
                $stream->write('\cltxbtlr');
                break;
        }

        // NOTE: microsoft and all other rtf readers I know confound left with top cell padding
        if ($this->_paddingLeft) {
            $stream->write('\clpadft3\clpadt' . PHPRtfLite_Unit::getUnitInTwips($this->_paddingLeft) . ' ');
        }
        if ($this->_paddingTop) {
            $stream->write('\clpadfl3\clpadl' . PHPRtfLite_Unit::getUnitInTwips($this->_paddingTop) . ' ');
        }
        if ($this->_paddingBottom) {
            $stream->write('\clpadfb3\clpadb' . PHPRtfLite_Unit::getUnitInTwips($this->_paddingBottom) . ' ');
        }
        if ($this->_paddingRight) {
            $stream->write('\clpadfr3\clpadr' . PHPRtfLite_Unit::getUnitInTwips($this->_paddingRight) . ' ');
        }

        $border = $this->getBorder();
        if ($border) {
            $stream->write($border->getContent('\cl'));
        }
    }
297944
def draw(self):
        """"""

        cell_background_renderer = GridCellBackgroundCairoRenderer(
            self.context,
            self.code_array,
            self.key,
            self.rect,
            self.view_frozen)

        cell_content_renderer = GridCellContentCairoRenderer(
            self.context,
            self.code_array,
            self.key,
            self.rect,
            self.spell_check)

        cell_border_renderer = GridCellBorderCairoRenderer(
            self.context,
            self.code_array,
            self.key,
            self.rect)

        cell_background_renderer.draw()
        cell_content_renderer.draw()
        cell_border_renderer.draw()
1145501
def _render_table(data, fields=None):
  
  return IPython.core.display.HTML(datalab.utils.commands.HtmlBuilder.render_table(data, fields))
383519
function render() {
      var checked = rgCtrl.getViewValue() == attr.value;

      if (checked === lastChecked) return;

      if (element[0].parentNode.nodeName.toLowerCase() !== 'md-radio-group') {
        // If the radioButton is inside a div, then add class so highlighting will work
        element.parent().toggleClass(CHECKED_CSS, checked);
      }

      if (checked) {
        rgCtrl.setActiveDescendant(element.attr('id'));
      }

      lastChecked = checked;

      element
        .attr('aria-checked', checked)
        .toggleClass(CHECKED_CSS, checked);
    }
248617
private void renderCellToHeaderFooter(StringBuilder result, String bandName, BandElement bandElement, Object value, int gridRow, int row,
                              int column, int cols, int rowSpan, int colSpan, boolean isImage) {
    	    	
    	if (newRow) {
    		result.append("\r\n ");
    	} else {
    		result.append(" ");
    	}
    	boolean specialCell = false;
    	if (bandElement instanceof VariableBandElement)  {
        	VariableBandElement vbe = (VariableBandElement)bandElement;
        	Variable var = VariableFactory.getVariable(vbe.getVariable());        	
        	if (var instanceof PageNoVariable) {           		
        		specialCell = true;
        		result.append("&P");
        	} 
    	} else if (bandElement instanceof ExpressionBandElement)  {
         	// special case pageNo inside an expression
         	// bandName is not important here (it is used for groupRow computation)
    		PrefixSuffix pf = interpretPageNo(bandElement);
			if (pf != null) {
				result.append(pf.getPrefix()).append(" &P ").append(pf.getSuffix());     
				specialCell = true;
			}	
    	}
		if (!specialCell) {
			result.append(value);
		}				
    }
1233108
private void paintCell(SeaGlassContext context, Graphics g, Rectangle cellRect, int row, int column) {
        if (table.isEditing() && table.getEditingRow() == row && table.getEditingColumn() == column) {
            Component component = table.getEditorComponent();

            component.setBounds(cellRect);
            component.validate();
        } else {
            TableCellRenderer renderer  = table.getCellRenderer(row, column);
            Component         component = table.prepareRenderer(renderer, row, column);

            rendererPane.paintComponent(g, component, table, cellRect.x, cellRect.y, cellRect.width, cellRect.height, true);
        }
    }
1028413
def render(format = :html, css_class = 'screen', css_style = nil)
			result = case format
			when :text
				''
			when :html
				%Q|<pre#{css_class ? %Q[ class="#{css_class}"] : ''}#{css_style ? %Q| style="#{css_style}"| : ''}>\n|
			else
				raise AnsiSysError, "Invalid format option to render: #{format.inspect}"
			end

			unless @lines.keys.empty?
				prev_sgr = nil
				max_row = @lines.keys.max
				(1..max_row).each do |row|
					if @lines.has_key?(row) and not @lines[row].keys.empty?
						col = 1
						while col <= @lines[row].keys.max
							if @lines[row].has_key?(col) and @lines[row][col]
								char, width, sgr = @lines[row][col]
								if prev_sgr != sgr
									result += prev_sgr.render(format, :postfix, @colors) if prev_sgr
									result += sgr.render(format, :prefix, @colors)
									prev_sgr = sgr
								end
								case format
								when :text
									result += char
								when :html
									result += WEBrick::HTMLUtils.escape(char)
								end
								col += width
							else
								result += ' '
								col += 1
							end
						end
					end
					result += "\n" if row < max_row
				end
				result += prev_sgr.render(format, :postfix, @colors) if prev_sgr
			end

			result += case format
			when :text
				''
			when :html
				'</pre>'
			end
			return result
		end
154877
function renderNode(node, children = []) {
    [...children].forEach(child => {
        if (child && child.tag) {
            node.ele(child.tag, child.props);
            renderNode(node, child.children);
            node.end();
        } else {
            node.text(child);
        }
    });
}
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;
}
137796
def _render_corpus_row(self, label, ngrams):
        """"""
        row = ('<tr>\n<td>{label}</td>\n<td>{first}</td>\n<td>{only}</td>\n'
               '<td>{last}</td>\n</tr>')
        cell_data = {'label': label}
        for period in ('first', 'only', 'last'):
            cell_data[period] = ', '.join(ngrams[label][period])
        return row.format(**cell_data)
1111787
function render(content, data) {
    if (content && /{{([^{}]+)}}/g.test(content)) {
        Object.keys(data).forEach(key => {
            if (data[key] && typeof data[key] === 'string') {
                content = content.split(new RegExp(`{{\\s*${key}\\s*}}`, 'g')).join(data[key]);
            }
        });
        return content;
    }

    return content;
}
1241614
def render_line
      if @type == :thead
        return content_tag(:tr, Tools::html_safe(@cells.collect { |cell| cell.render_cell_thead }.join), @html_options)
      elsif @type == :tfoot
        return content_tag(:tr, Tools::html_safe(@cells.collect { |cell| cell.render_cell_tfoot }.join), @html_options)
      else
        content_tag(:tr, Tools::html_safe(@cells.collect { |cell| cell.render_cell_tbody }.join), @html_options.merge(:class => "#{@html_options[:class]} #{@@template.cycle(:odd, :even)}".strip))
      end
    end
233540
def render_table(self, headers, rows, style=None):
        
        table = self.table(headers, rows, style)

        table.render(self._io)
1328989
function presentRendering(selector, classNames, speed) {
    const text = document.getElementById(selector).childNodes[0];
    const thisLength = text.length;

    const render = (autoMarkText, cp, length) => {
      let c = cp;
      const r = new Rendering(document, {
        className: classNames
      });
      const range = document.createRange();
      range.setStart(autoMarkText, 0);
      range.setEnd(autoMarkText, 1);
      r.renderWithRange(range);
      if (autoMarkText.parentNode.nextSibling) {
        const nextText = autoMarkText.parentNode.nextSibling.childNodes[0];
        setTimeout(() => {
          render(nextText, ++c, length);
        }, speed);
      }
    };

    return render(text, 0, thisLength);
  }
99406
def render(self, target, data):
        """"""
        rows = self.get_rows(target, data)
        rows = self._filter_rows(rows)
        renderer = getattr(self, "_render_%s" % target.name, None)
        if renderer is None:
            raise ValueError(
                "Cannot render %r for %s." % (self.value, target))
        else:
            return renderer(rows)
1143732
function render_cells(notebook) {
  /* Get all cells in notebook */
  notebook.get_cells().forEach(function (cell) {
    if (cell.output_area) {
      if (cell.output_area.outputs.find(function (out) {
        return out.data && (out.data['application/noworkflow.history+json'] || out.data['application/noworkflow.trial+json']);
      })) {
        notebook.render_cell_output(cell);
      }
    }
  });
}
511523
public function renderFilterCell()
    {
        if(yii::app()->editable->form != EditableConfig::FORM_BOOTSTRAP) {
            parent::renderFilterCell();
            return;
        }
                
        echo '<td><div class="filter-container">';
        $this->renderFilterCellContent();
        echo '</div></td>';
    }