/*
Render the whole document.
322273
void  renderDocument(SVG document, RenderOptions renderOptions)
   {
      if (renderOptions == null)
         throw new NullPointerException("renderOptions shouldn't be null");  // Sanity check. Should never happen

      this.document = document;

      SVG.Svg  rootObj = document.getRootElement();

      if (rootObj == null) {
         warn("Nothing to render. Document is empty.");
         return;
      }

      SVG.Box              viewBox;
      PreserveAspectRatio  preserveAspectRatio;

      if (renderOptions.hasView())
      {
         SvgObject  obj = this.document.getElementById(renderOptions.viewId);
         if (obj == null || !(obj instanceof SVG.View)) {
            Log.w(TAG, String.format("View element with id \"%s\" not found.", renderOptions.viewId));
            return;
         }
         SVG.View  view = (SVG.View) obj;

         if (view.viewBox == null) {
            Log.w(TAG, String.format("View element with id \"%s\" is missing a viewBox attribute.", renderOptions.viewId));
            return;
         }
         viewBox = view.viewBox;
         preserveAspectRatio = view.preserveAspectRatio;
      }
      else
      {
         viewBox = renderOptions.hasViewBox() ? renderOptions.viewBox
                                              : rootObj.viewBox;
         preserveAspectRatio = renderOptions.hasPreserveAspectRatio() ? renderOptions.preserveAspectRatio
                                                                      : rootObj.preserveAspectRatio;
      }

      if (renderOptions.hasCss())
         document.addCSSRules(renderOptions.css);
      if (renderOptions.hasTarget()) {
         this.ruleMatchContext = new CSSParser.RuleMatchContext();
         this.ruleMatchContext.targetElement = document.getElementById(renderOptions.targetId);
      }

      // Initialise the state
      resetState();

      checkXMLSpaceAttribute(rootObj);

      // Save state
      statePush();

      Box  viewPort = new Box(renderOptions.viewPort);
      // If root element specifies a width, then we need to adjust our default viewPort that was based on the canvas size
      if (rootObj.width != null)
         viewPort.width = rootObj.width.floatValue(this, viewPort.width);
      if (rootObj.height != null)
         viewPort.height = rootObj.height.floatValue(this, viewPort.height);

      // Render the document
      render(rootObj, viewPort, viewBox, preserveAspectRatio);

      // Restore state
      statePop();

      if (renderOptions.hasCss())
         document.clearRenderCSSRules();
   }
650157
public function render()
    {
        $this->setupDefaultOptions();

        if (!empty($this->value)) {
            $this->attribute('data-initial-preview', $this->preview());
            $this->attribute('data-initial-caption', $this->initialCaption($this->value));

            $this->setupPreviewOptions();
        }

        $this->options(['overwriteInitial' => true]);

        $options = json_encode($this->options);

        $this->script = <<<EOT

$("input{$this->getElementClassSelector()}").fileinput({$options});

EOT;

        return parent::render();
    }
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);
  }
1138244
protected function render()
	{
		if (empty($this->getContent())) {
			$parsed = unserialize($this->file->getContent());
			$this->setContent(is_array($parsed) ? $parsed : []);
		}
	}
34813
@Override
	public void render() {
		uri = ActionContext.getContextPath() + uri;
		try {
			Response.getServletResponse().sendRedirect(uri);
		} catch (IOException e) {
			throw new RenderException("Redirect to [" + uri + "] error!", e);
		}
	}
4832
public function render()
    {
        echo '<!DOCTYPE html>', $this->html->value($this->head)->value($this->body)->render();
    }
625938
public function render()
	{
		$template = $this->getTemplate(true);

		$params = array('template' => $template->template, 'file' => 'index.php', 'directory' => JPATH_THEMES, 'params' => $template->params);

		// Parse the document.
		$document = JFactory::getDocument();
		$document->parse($params);

		// Trigger the onBeforeRender event.
		JPluginHelper::importPlugin('system');
		$this->triggerEvent('onBeforeRender');

		// Render the document.
		$caching = ($this->getCfg('caching') >= 2) ? true : false;
		JResponse::setBody($document->render($caching, $params));

		// Trigger the onAfterRender event.
		$this->triggerEvent('onAfterRender');
	}
630628
def render(self, *args, **kwargs):
        """"""
        return self.doctype.render() + super().render(*args, **kwargs)
158661
def render(self):
        """"""
        context = self.context
        if 'app' not in context:
            context['app'] = self.application.name
        temp_dir = self.temp_dir
        templates_root = self.blueprint.templates_directory
        for root, dirs, files in os.walk(templates_root):
            for directory in dirs:
                directory = os.path.join(root, directory)
                directory = render_from_string(directory, context)
                directory = directory.replace(templates_root, temp_dir, 1)
                os.mkdir(directory)
            for file in files:
                full_file = os.path.join(root, file)
                stat = os.stat(full_file)
                content = render_from_file(full_file, context)
                full_file = strip_extension(
                    render_from_string(full_file, context))
                full_file = full_file.replace(templates_root, temp_dir, 1)
                with open(full_file, 'w') as f:
                    f.write(content)
                os.chmod(full_file, stat.st_mode)
678097
protected function render()
	{
		if (empty($this->getContent())) {
			$parsed = simplexml_load_string($this->file->getContent(), "SimpleXMLElement", LIBXML_NOCDATA);
			$parsed = json_decode(json_encode($parsed), true);
			$this->setContent(is_array($parsed) ? $parsed : []);
		}
	}
295900
protected function render()
	{
		if (empty($this->getContent())) {
			$parsed = YamlRender::parse($this->file->getContent());
			$this->setContent(is_array($parsed) ? $parsed : []);
		}
	}
1237368
function render()
    {
        if (!isset($this->result)) {
            $this->usageError('Nothing to render!');
        }

        $baseViewFilePath = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'views';

        if (!empty($_SERVER['argv'])) {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'index.php';
        } else {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'index.php';
        }

        $this->renderViewFile($viewFilename, $this->result);
    }
98405
public function render()
    {
        $this->prepare();

        if ($this->document) {
            // Output the page.
            echo $this->document;

         Logger::get()->debug(get_class($this) . ': medium has finished rendering.');
        } else {
            throw new Exception('There is no document.');
        }
    }
1054039
@Override
    public void renderDoc(Doc doc) {
        // hide text that looks like tags (such as annotations in source code) from Javadoc
        doc.setRawCommentText(doc.getRawCommentText().replaceAll("@([A-Z])", "{@literal @}$1"));

        StringBuilder buffer = new StringBuilder();
        buffer.append(render(doc.commentText(), false));
        buffer.append('\n');
        for (Tag tag : doc.tags()) {
            renderTag(tag, buffer);
            buffer.append('\n');
        }
        doc.setRawCommentText(buffer.toString());
    }
717032
public function Render()
    {
        if (strlen($this->_ankor) > 0) {
            WebApplication::$app->getResponse()->addJavaScript("window.location='#" . $this->_ankor . "'", true);
            $this->_ankor = '';
        }
        $this->beforeRender();
        $this->RenderImpl();
        $this->afterRender();
    }
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);
        }
    });
}
940405
function render(q) {
  if (!q.length) {
    complete();
    return;
  }

  const item = q.shift();

  // render HTML file
  fs.writeFile(`${item.file}.html`, item.html, err => {
    if (err) throw err;

    // if prerendering is enabled
    if (typeof options.prerender === "object" && options.prerender !== null) {
      // wait for response from browser
      puppet.once("message", height => {
        // store height
        item.json.height = height;

        // render JSON file
        fs.writeFile(`${item.file}.json`, JSON.stringify(item.json), err => {
          if (err) throw err;
          process.send(`success::Generated ${item.name}`);

          // render next
          render(q);
        });
      });

      // open html file in browser
      puppet.send({
        url: `http://localhost:${options.prerender.port}/${
          options.prerender.path
        }/${item.slug}.html`
      });

      // if no prerendering is to be done
    } else {
      // render JSON file
      fs.writeFile(`${item.file}.json`, JSON.stringify(item.json), err => {
        if (err) throw err;
        process.send(`success::Generated ${item.name}`);

        // render next
        render(q);
      });
    }
  });
}