Render Reference Results Table
169135
def ReferenceResults(self, field, allow_edit=False):
        
        instance = getattr(self, "instance", field.aq_parent)
        table = api.get_view("table_reference_results",
                             context=instance,
                             request=self.REQUEST)
        # Call listing hooks
        table.update()
        table.before_render()
        return table.ajax_contents_table()
209471
def _render_content(self, content, **settings):
        
        result = []
        columns = settings[self.SETTING_COLUMNS]

        # Format each table cell into string.
        (columns, content) = self.table_format(columns, content)

        # Enumerate each table row.
        if settings[self.SETTING_FLAG_ENUMERATE]:
            (columns, content) = self.table_enumerate(columns, content)

        # Calculate the dimensions of each table column.
        dimensions = self.table_measure(columns, content)

        # Display table header.
        sb = {k: settings[k] for k in (self.SETTING_BORDER_STYLE, self.SETTING_BORDER_FORMATING)}
        result.append(self.fmt_border(dimensions, 't', **sb))
        if settings[self.SETTING_FLAG_HEADER]:
            s = {k: settings[k] for k in (self.SETTING_FLAG_PLAIN, self.SETTING_BORDER_STYLE, self.SETTING_BORDER_FORMATING)}
            s[self.SETTING_TEXT_FORMATING] = settings[self.SETTING_HEADER_FORMATING]
            result.append(self.fmt_row_header(columns, dimensions, **s))
            result.append(self.fmt_border(dimensions, 'm', **sb))

        # Display table body.
        for row in content:
            s = {k: settings[k] for k in (self.SETTING_FLAG_PLAIN, self.SETTING_BORDER_STYLE, self.SETTING_BORDER_FORMATING)}
            s[self.SETTING_TEXT_FORMATING] = settings[self.SETTING_TEXT_FORMATING]
            result.append(self.fmt_row(columns, dimensions, row, **s))

        # Display table footer
        result.append(self.fmt_border(dimensions, 'b', **sb))
        return result
1124361
function (books, context, options) {
      kb.fetcher.load(books).then(function (xhr) {
        renderThreeColumnBrowser2(books, context, options)
      }).catch(function (err) { complain(err) })
    }
480395
def dumps(self):
        """"""
        return {table_name: getattr(self, table_name).dumps() for table_name in self.TABLES}
735571
def render_row(row_index, widths)
      @pad + @page_data.each_with_index.map do |column, index|
        column[row_index].to_s.ljust(widths[index])
      end.join(" ")
    end
900150
protected function renderReference($reference)
    {
        if (!isset($this->settings['references'][$reference])) {
            $this->outputLine('Reference "%s" is not configured', [$reference]);
            $this->quit(1);
        }
        $referenceConfiguration = $this->settings['references'][$reference];
        $affectedClassNames = $this->getAffectedClassNames($referenceConfiguration['affectedClasses']);
        $parserClassName = $referenceConfiguration['parser']['implementationClassName'];
        $parserOptions = isset($referenceConfiguration['parser']['options']) ? $referenceConfiguration['parser']['options'] : [];
        /** @var $classParser \Neos\DocTools\Domain\Service\AbstractClassParser */
        $classParser = new $parserClassName($parserOptions);
        $classReferences = [];
        foreach ($affectedClassNames as $className) {
            $classReferences[$className] = $classParser->parse($className);
        }
        usort($classReferences, function (ClassReference $a, ClassReference $b) {
            if ($a->getTitle() == $b->getTitle()) {
                return 0;
            }

            return ($a->getTitle() < $b->getTitle()) ? -1 : 1;
        });
        $standaloneView = new \Neos\FluidAdaptor\View\StandaloneView();
        $templatePathAndFilename = isset($referenceConfiguration['templatePathAndFilename']) ? $referenceConfiguration['templatePathAndFilename'] : 'resource://Neos.DocTools/Private/Templates/ClassReferenceTemplate.txt';
        $standaloneView->setTemplatePathAndFilename($templatePathAndFilename);
        $standaloneView->assign('title', isset($referenceConfiguration['title']) ? $referenceConfiguration['title'] : $reference);
        $standaloneView->assign('classReferences', $classReferences);
        file_put_contents($referenceConfiguration['savePathAndFilename'], $standaloneView->render());
        $this->outputLine('DONE.');
    }
852854
def get_reference_results(self):
        
        referenceresults = self.context.getReferenceResults()
        return dict(map(lambda rr: (rr.get("uid"), rr), referenceresults))
864868
def render(self, context=None):
        """"""
        ctx = context.render() if context else self.get_error_context().render()
        return "%s: %s%s%s" % (
            self.get_error_kind(),
            self.get_error_message(),
            (" (%s)." % ctx) if ctx else "",
            self.get_additional_error_detail()
        )
1215753
def render_noderef(self, ontol, n, query_ids=None, **args):
        
        if query_ids is None:
            query_ids = []
        marker = ""
        if n in query_ids:
            marker = " * "
        label = ontol.label(n)
        s = None
        if label is not None:
            s = '{} ! {}{}'.format(n,
                                   label,
                                   marker)
        else:
            s = str(n)
        if self.config.show_text_definition:
            td = ontol.text_definition(n)
            if td:
                s += ' "{}"'.format(td.val)
        return s
794548
def render
      buffer = []
      _guess_col_widths
      rows = @list.size.to_s.length
      @rows = rows
      _prepare_format
      
      str = ""
      if @numbering
        str = " "*(rows+1)+@y
      end
      str <<  @fmstr % @columns
      buffer << str
      #puts "-" * str.length
      buffer << separator
      if @list
        if @numbering
          @fmstr = "%#{rows}d "+ @y + @fmstr
        end
        #@list.each { |e| puts e.join(@y) }
        count = 0
        @list.each_with_index { |r,i|  
          value = convert_value_to_text r, count
          buffer << value
          count += 1
        }
      end
      buffer
    end
600794
def render(self):
        """"""
        context = GLOBAL_TEMPLATE_CONTEXT.copy()
        context['tag'] = self
        entries = list(self.entries)
        entries.sort(key=operator.attrgetter('date'), reverse=True)
        context['entries'] = entries

        # render html page
        render_to = os.path.join(CONFIG['output_to'], 'tags', self.slug)
        if not os.path.exists(render_to):  # pragma: no coverage
            os.makedirs(render_to)
        _render(context, 'tag_index.html', os.path.join(render_to, 'index.html'))  # noqa

        # render atom.xml
        context['entries'] = context['entries'][:10]
        context['last_build'] = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ")  # noqa

        _render(context, 'atom.xml', os.path.join(render_to, 'atom.xml'))
        return True
416381
private function renderReference($value, $reference, &$isRendered)
    {
        if ((true === $isRendered) || !isset($reference[$value])) {
            return $value;
        }

        $isRendered = true;

        if (\is_array($reference[$value])) {
            return $reference[$value][0];
        }

        return $reference[$value];
    }
343287
def render_table(data, headers=None):
    
    builder = HtmlBuilder()
    builder._render_objects(data, headers, datatype='dict')
    return builder._to_html()
495773
def html(header_rows):
    
    name = 'table%d' % next(tablecounter)
    return HtmlTable([map(str, row) for row in header_rows], name).render()
124123
function render(renderProperties, encodings, options) {
	encodings = linearizeEncodings(encodings);

	for (var i = 0; i < encodings.length; i++) {
		encodings[i].options = merge(options, encodings[i].options);
		fixOptions(encodings[i].options);
	}

	fixOptions(options);

	var Renderer = renderProperties.renderer;
	var renderer = new Renderer(renderProperties.element, encodings, options);
	renderer.render();

	if (renderProperties.afterRender) {
		renderProperties.afterRender();
	}
}
123909
def _render_attributes(self, resource):
        """"""
        attributes = {}
        attrs_to_ignore = set()

        for key, relationship in resource.__mapper__.relationships.items():
            attrs_to_ignore.update(set(
                [column.name for column in relationship.local_columns]).union(
                    {key}))

        if self.dasherize:
            mapped_fields = {x: dasherize(underscore(x)) for x in self.fields}
        else:
            mapped_fields = {x: x for x in self.fields}

        for attribute in self.fields:
            if attribute == self.primary_key:
                continue
            # Per json-api spec, we cannot render foreign keys
            # or relationsips in attributes.
            if attribute in attrs_to_ignore:
                raise AttributeError
            try:
                value = getattr(resource, attribute)
                if isinstance(value, datetime.datetime):
                    attributes[mapped_fields[attribute]] = value.isoformat()
                else:
                    attributes[mapped_fields[attribute]] = value
            except AttributeError:
                raise

        return attributes
471963
def render(view)
      tags = []

      render_charset(tags)
      render_title(tags)
      render_icon(tags)
      render_with_normalization(tags, :description)
      render_with_normalization(tags, :keywords)
      render_refresh(tags)
      render_noindex(tags)
      render_alternate(tags)
      render_open_search(tags)
      render_links(tags)

      render_hashes(tags)
      render_custom(tags)

      tags.tap(&:compact!).map! { |tag| tag.render(view) }
      view.safe_join tags, MetaTags.config.minify_output ? "" : "\n"
    end