/*
Render the report with the render modules supplied in the options.
@param {Object} options Doctor options.
@param {Object} report Report generated by doctor.
@param {function} cb Function to call when rendering is complete.
1086
function render(options, report, cb) {
  var reportName = options.outputReportName || 'report.json';
  var files = {};
  files[reportName] = report;
  var renderFunctions = u.toArray(options.render || 'default');
  try {
    renderFunctions = u.findFunctions(renderFunctions, 'render');
  } catch (findError) {
    return cb(findError);
  }
  function eachRender(fn, cb) {
    fn(options, files, function (err, renderedFiles) {
      if (err) {
        return cb(err);
      }
      files = renderedFiles;
      cb(null, files);
    });
  }
  async.forEachSeries(renderFunctions, eachRender, function (err) {
    // if (err) {
    //   return cb(err);
    // }
    // Object.keys(files).forEach(function (filename, i) {
    //   var file = files[filename];
    //   if (typeof file !== 'string') {
    //     try {
    //       // if circular references were introduced, this will fail
    //       var fileString = JSON.stringify(file, null, 2);
    //       files[filename] = fileString;
    //     } catch (jsonError) {
    //       return cb(jsonError);
    //     }
    //   }
    // });
    cb(err, files);
  });
}
337499
function (cb) {

                formtoolsAPI.list.renderToolbarItems(req, res, req.params.model, function (err, result) {

                    if (err) {
                        return cb(err);
                    }

                    req.linz.model.list.toolbarItems = result;

                    return cb(null);

                });

            }
820067
function prepare(reportData, opts) {
  // Stringify the data if needed
  let data = reportData;
  if (typeof data === 'object') {
    data = JSON.stringify(reportData);
  }

  // Get the options
  const reportOptions = getOptions(opts);

  // Stop here if we're not generating an HTML report
  if (!reportOptions.saveHtml) {
    return { reportOptions };
  }

  // Get the assets
  const assets = getAssets(reportOptions);

  // Render basic template to string
  // const { styles, scripts } = assets;

  const renderedHtml = render(React.createElement(MainHTML, {
    data,
    options: reportOptions,
    title: reportOptions.reportPageTitle,
    useInlineAssets: reportOptions.inlineAssets && !reportOptions.cdn,
    ...assets
  }));

  const html = `<!doctype html>\n${renderedHtml}`;
  return { html, reportOptions };
}
913977
private void renderClass(ClassDoc doc, DocletRenderer renderer) {
        //handle the various parts of the Class doc
        renderer.renderDoc(doc);
        for (MemberDoc member : doc.fields()) {
            renderer.renderDoc(member);
        }
        for (MemberDoc member : doc.constructors()) {
            renderer.renderDoc(member);
        }
        for (MemberDoc member : doc.methods()) {
            renderer.renderDoc(member);
        }
        for (MemberDoc member : doc.enumConstants()) {
            renderer.renderDoc(member);
        }
        if (doc instanceof AnnotationTypeDoc) {
            for (MemberDoc member : ((AnnotationTypeDoc)doc).elements()) {
                renderer.renderDoc(member);
            }
        }
    }
1317373
function Renderer(options) {
  options = options || {};
  this.MD   = new MDRenderer(options);
  this.CGMD = new CGMDRenderer(new MDRenderer(options));

  return this;
}
753403
function (report, arg) {
            if (report && report.ok === false) {
                report.errorValue = this.controller.selectedSuggestions;
            }
            var repositionDropDown = false;
            if (report && report.repositionDropDown) {
                repositionDropDown = true;
                report.repositionDropDown = false;
            }
            this.$AutoComplete._reactToControllerReport.call(this, report, arg);
            if (report) {
                this._updateMultiselectValues(report);
                ariaUtilsDom.refreshDomElt(this._domElt);
            }
            if (repositionDropDown && this._dropdownPopup) {
                this._reopenDropdown();
            }
        }
400817
def report(options)
      report = HamlLint::Report.new(reporter: options[:reporter], fail_level: options[:fail_level])
      report.start(@files)
      process_files(report)
      report
    end
1032884
private void render(SVG.Group obj)
   {
      debug("Group render");

      updateStyleForElement(state, obj);

      if (!display())
         return;

      if (obj.transform != null) {
         canvas.concat(obj.transform);
      }

      checkForClipPath(obj);

      boolean  compositing = pushLayer();

      renderChildren(obj, true);

      if (compositing)
         popLayer(obj);

      updateParentBoundingBox(obj);
   }
1165872
def quick_report(report_type, change, options):
    

    report = report_type(None, options)

    if options.output:
        with open(options.output, "w") as out:
            report.run(change, None, out)
    else:
        report.run(change, None, sys.stdout)
907386
function (report, arg) {
            // a null report means callback was asynchronous
            // PROFILING // var profilingId = this.$startMeasure("react to controller report (DropDownTextInput)");
            if (report) {
                var openDropdown = report.displayDropDown;
                var repositionDropDown = report.repositionDropDown;
                this.$TextInput._reactToControllerReport.call(this, report, arg);
                // check that widget has not been disposed
                if (this._cfg) {
                    if (openDropdown === true && !this._dropdownPopup) {
                        this._openDropdown();
                    } else if (openDropdown === false && this._dropdownPopup) {
                        this._closeDropdown();
                    } else if (repositionDropDown && this._dropdownPopup) {
                        this._reopenDropdown();
                        // Note: an alternative here would be to call this._dropdownPopup.updatePosition()
                        // instead of closing and re-opening the popup. This would avoid loosing
                        // the current scrolling position in some cases, but, it could perhaps introduce
                        // some regressions in other cases.
                    }
                }
            }
            // PROFILING // this.$stopMeasure(profilingId);
        }
38959
function (cb) {
            var self = this,
                stack = new Y.Parallel();

            Y.log('Preparing index.html', 'info', 'builder');
            self.renderIndex(stack.add(function (html, view) {
                stack.html = html;
                stack.view = view;
                if (self.options.dumpview) {
                    Y.Files.writeFile(path.join(self.options.outdir, 'json', 'index.json'), JSON.stringify(view), stack.add(noop));
                }
                Y.Files.writeFile(path.join(self.options.outdir, 'index.html'), html, stack.add(noop));
            }));

            stack.done(function ( /* html, view */ ) {
                Y.log('Writing index.html', 'info', 'builder');
                cb(stack.html, stack.view);
            });
        }
75658
public boolean render(RootDoc rootDoc, DocletRenderer renderer) {
        if (!processOverview(rootDoc, renderer)) {
            return false;
        }
        Set<PackageDoc> packages = new HashSet<PackageDoc>();
        for (ClassDoc doc : rootDoc.classes()) {
            packages.add(doc.containingPackage());
            renderClass(doc, renderer);
        }
        for (PackageDoc doc : packages) {
            renderer.renderDoc(doc);
        }
        return true;
    }
1016927
function (cb) {
            var self = this;

            Y.prepare([DEFAULT_THEME, themeDir], self.getProjectMeta(), function (err, opts) {
                opts.meta.title = self.data.project.name;
                opts.meta.projectRoot = './';
                opts.meta.projectAssets = './assets';
                opts.meta.projectLogo = self._resolveUrl(self.data.project.logo, opts);
                opts = self.populateClasses(opts);
                opts = self.populateModules(opts);

                var view = new Y.DocView(opts.meta);
                self.render('{{>index}}', view, opts.layouts.main, opts.partials, function (err, html) {
                    self.files++;
                    cb(html, view);
                });
            });
        }
594417
function renderSearchFilters(req, fieldNames, data, modelName, cb) {

    if (!req) {
        throw new Error('req is required.');
    }

    if (!Array.isArray(fieldNames) || !fieldNames.length) {
        throw new Error('fieldNames is required and must be of type Array and cannot be empty.');
    }

    if (typeof modelName !== 'string' || !modelName.length) {
        throw new Error('modelName is required and must be of type String and cannot be empty.');
    }

    if (!(!Object.is(data, null) && !Array.isArray(data) && data === Object(data))) {
        throw new Error('data is required and must be of type Object.');
    }

    // Sort fieldNames (to make MongoDB queries more predictable, and therefore easier to create indexes for), remove duplicates, and remove anything that doesn't have associated data.
    fieldNames = dedupe(fieldNames.sort().filter(fieldName => Object.keys(data).indexOf(fieldName) >= 0));

    linz.api.model.list(req, modelName, function (err, list) {

        if (err) {
            return cb(err);
        }

        if (!Object.keys(list.filters).length) {
            return cb(null);
        }

        var model = linz.api.model.get(modelName),
            dataKeys = Object.keys(data),
            filters = {};

        async.each(fieldNames, function (fieldName, filtersDone) {

            if (!dataKeys.includes(fieldName)) {
                return filtersDone(null);
            }

            // call the filter renderer and update the content with the result
            list.filters[fieldName].filter.filter(fieldName, data, function (filterErr, result) {

                if (filterErr) {
                    return filtersDone(filterErr);
                }

                filters = model.addSearchFilter(filters, result);

                return filtersDone(null);

            });

        }, function (filterErr) {

            if (filterErr) {
                return cb(filterErr);
            }

            // consolidate filters into query
            filters = model.setFiltersAsQuery(filters);

            return cb(filterErr, filters);
        });

    });

}
959834
@Override
    public String renderReport(final ContextTreeConfig config) {

        final Set<Class<?>> scopes = service.getActiveScopes(!config.isHideDisables());

        final TreeNode root = new TreeNode("APPLICATION");
        if (!config.getHiddenScopes().contains(Application.getType())) {
            renderScopeContent(config, root, Application.getType());
        }

        renderSpecialScope(config, scopes, root, "BUNDLES LOOKUP", BundleLookup);
        renderSpecialScope(config, scopes, root, "DROPWIZARD BUNDLES", DropwizardBundle);
        renderSpecialScope(config, scopes, root, "CLASSPATH SCAN", ClasspathScan);
        renderSpecialScope(config, scopes, root, "HOOKS", Hook);

        final StringBuilder res = new StringBuilder().append(Reporter.NEWLINE).append(Reporter.NEWLINE);
        root.render(res);
        return res.toString();
    }
1142047
function render(engine, str, locals, engineOptions) {
  try {
    var output = engine.render(engine.engine, str, locals, engineOptions)
  } catch(e) {
    throw new Error(
      NAME + ': there was a problem rendering the template:\n' + e)
  }
  return output
}
941714
def render options = {}
      validate!
      self.compose do
        # Allow 'yield' to embed all children
        self.children.each do |child|
          fragment child
        end
      end.render(options)
    end