Render a and return diff with changes between the two sequences
displayed inline (under each other)

@return string The generated inline diff.
515873
public function render()
    {
        $changes = parent::render();
        $html = '';
        if (empty($changes)) {
            return $html;
        }

        $html .= '<table class="Differences DifferencesInline">';
        $html .= '<thead>';
        $html .= '<tr>';
        $html .= '<th>Old</th>';
        $html .= '<th>New</th>';
        $html .= '<th>Differences</th>';
        $html .= '</tr>';
        $html .= '</thead>';
        foreach ($changes as $i => $blocks) {
            // If this is a separate block, we're condensing code so output ...,
            // indicating a significant portion of the code has been collapsed as
            // it is the same
            if ($i > 0) {
                $html .= '<tbody class="Skipped">';
                $html .= '<th>&hellip;</th>';
                $html .= '<th>&hellip;</th>';
                $html .= '<td>&nbsp;</td>';
                $html .= '</tbody>';
            }

            foreach ($blocks as $change) {
                $html .= '<tbody class="Change' . ucfirst($change['tag']) . '">';
                // Equal changes should be shown on both sides of the diff
                if ($change['tag'] == 'equal') {
                    foreach ($change['base']['lines'] as $no => $line) {
                        $fromLine = $change['base']['offset'] + $no + 1;
                        $toLine = $change['changed']['offset'] + $no + 1;
                        $html .= '<tr>';
                        $html .= '<th>' . $fromLine . '</th>';
                        $html .= '<th>' . $toLine . '</th>';
                        $html .= '<td class="Left">' . $line . '</td>';
                        $html .= '</tr>';
                    }
                } // Added lines only on the right side
                else {
                    if ($change['tag'] == 'insert') {
                        foreach ($change['changed']['lines'] as $no => $line) {
                            $toLine = $change['changed']['offset'] + $no + 1;
                            $html .= '<tr>';
                            $html .= '<th>&nbsp;</th>';
                            $html .= '<th>' . $toLine . '</th>';
                            $html .= '<td class="Right"><ins>' . $line . '</ins>&nbsp;</td>';
                            $html .= '</tr>';
                        }
                    } // Show deleted lines only on the left side
                    else {
                        if ($change['tag'] == 'delete') {
                            foreach ($change['base']['lines'] as $no => $line) {
                                $fromLine = $change['base']['offset'] + $no + 1;
                                $html .= '<tr>';
                                $html .= '<th>' . $fromLine . '</th>';
                                $html .= '<th>&nbsp;</th>';
                                $html .= '<td class="Left"><del>' . $line . '</del>&nbsp;</td>';
                                $html .= '</tr>';
                            }
                        } // Show modified lines on both sides
                        else {
                            if ($change['tag'] == 'replace') {
                                foreach ($change['base']['lines'] as $no => $line) {
                                    $fromLine = $change['base']['offset'] + $no + 1;
                                    $html .= '<tr>';
                                    $html .= '<th>' . $fromLine . '</th>';
                                    $html .= '<th>&nbsp;</th>';
                                    $html .= '<td class="Left"><span>' . $line . '</span></td>';
                                    $html .= '</tr>';
                                }

                                foreach ($change['changed']['lines'] as $no => $line) {
                                    $toLine = $change['changed']['offset'] + $no + 1;
                                    $html .= '<tr>';
                                    $html .= '<th>' . $toLine . '</th>';
                                    $html .= '<th>&nbsp;</th>';
                                    $html .= '<td class="Right"><span>' . $line . '</span></td>';
                                    $html .= '</tr>';
                                }
                            }
                        }
                    }
                }
                $html .= '</tbody>';
            }
        }
        $html .= '</table>';
        return $html;
    }
40983
public function render() : string
    {
        $html = '<div id="app">';
        $html .= '
            <transition name="fade" mode="out-in">
                <router-view></router-view>
            </transition>';
        $html .= '</div>';
        $title = env('APP_NAME');
        $html .= '<script src="/assets/application.js"></script>';
        $html .= $this->scripts();
        return '<body>' . $html . '</body>';
    }
1110415
private function _render(){
        $textColor = new CINColor($this->foregroundColor);
        $backgroudColor = new CINColor($this->backgroundColor);
        
        /* Here is the list of the arguments
        1 - Filename (empty : display on screen)
        2 - Background color */
        $drawing = new CINDrawing($this->filename, $backgroudColor);
        
        $drawException = null;
        
        if(isset($this->format) and !in_array(strtoupper($this->format), $this->allowedFormats)){
            $drawException = $this->format .' format is not allowed.';
        }
        
        if(!isset($this->barcodeType)){
            $drawException = 'Unable to generate barcode for unknown type';
        }else{
            try{
                if(!($code = $this->_getCode())){
                    $drawException = 'Unable to generate barcode';
                }
            } catch(\Exception $e){
                $drawException = $e->getMessage();
            }
        }

        ob_start();
        if($drawException) {
            $exception = new \Exception($drawException);
            $drawing->drawException($exception);
        } else {
            $drawing->setBarcode($code);
            $drawing->draw();
        }
        $drawing->finish($this->_getFormat());
        $barcodeImg = ob_get_clean();
        $barcodeImg = base64_encode($barcodeImg);
        return $barcodeImg;
    }
694123
public function render() : string 
  {
    $sOutput = preg_replace_callback(
      '/{(.*?)}/',
      function ($aResult){
        $aToSearch = explode('.', $aResult[1]);
        $aSearchIn = $this->getData();

        foreach ($aToSearch as $sKey) {
          list(
            $sFormattedKey, 
            $mParam
          )       = self::getFunctionNameAndParameter($sKey);
          $mValue = $aSearchIn[$sFormattedKey];

          if(is_string($mValue)) {

            return $mValue;
          } else if(is_object($mValue)) {
            if($mParam){

              return $mValue($mParam);
            }

            return $mValue();
          }
          
          $aSearchIn = $mValue;
        }

        return (
          $this->hasShowEmpty() 
          ? 
          $aResult[0] 
          : 
          ''
        );
      },
      $this->getTemplate()
    );
    
    return preg_replace('/^\s+|\n|\r|\t/m', '', $sOutput);
  }
695999
public function render()
    {
        $metric = new Metric('print-out');
        $metric->start();
        ini_set('memory_limit', '512M');

        if ( ! is_string($this->expression)) {
            $this->expression = print_r($this->expression, true);
        }

        $expression = htmlentities($this->expression);
        $expression = htmlspecialchars(htmlspecialchars_decode($this->expression, ENT_QUOTES), ENT_QUOTES, 'UTF-8');
        $trace = new Trace();

        $metric->stop();

        ob_start();
        include __DIR__ . '/Views/Screen.php';
        $output = ob_get_contents();
        ob_end_clean();

        return $output;
    }
259744
public function getRenderedLine()
    {
        if (isset($this->_detectMatch[1]) && ($nbr = substr($this->_detectMatch[1], 1)) && is_numeric($nbr))
            $this->_nbrParagraphs = $nbr;
        $result = '';
        for ($i = 0; $i < $this->_nbrParagraphs; $i++)
            $result .= $this->_getParagraph($i == 0);
        return ($result);
    }
1189307
public function render()
    {
        $output[] = $this->open();

        if ($this->subText instanceof Element) {
            $this->header->childNodes->push($this->subText);
        }

        $output[] = $this->header;
        $output[] = $this->close();

        return implode(PHP_EOL, $output);
    }
1157888
public function get_diff()
	{
		$diff = array(0 => array(), 1 => array());
		foreach ($this->_data as $key => $val)
		{
			if ($this->is_changed($key))
			{
				$diff[0][$key] = array_key_exists($key, $this->_original) ? $this->_original[$key] : null;
				$diff[1][$key] = $val;
			}
		}
		foreach ($this->_data_relations as $key => $val)
		{
			$rel = static::relations($key);
			if ($rel->singular)
			{
				$new_pk = null;
				if (empty($this->_original_relations[$key]) !== empty($val)
					or ( ! empty($this->_original_relations[$key]) and ! empty($val)
						and $this->_original_relations[$key] !== $new_pk = $val->implode_pk($val)
					))
				{
					$diff[0][$key] = isset($this->_original_relations[$key]) ? $this->_original_relations[$key] : null;
					$diff[1][$key] = isset($val) ? $new_pk : null;
				}
			}
			else
			{
				$original_pks = empty($this->_original_relations[$key]) ? array() : $this->_original_relations[$key];
				$new_pks = array();
				if ($val)
				{
					foreach ($val as $v)
					{
						if ( ! in_array(($new_pk = $v->implode_pk($v)), $original_pks))
						{
							$new_pks[] = $new_pk;
						}
						else
						{
							$original_pks = array_diff($original_pks, array($new_pk));
						}
					}
				}
				if ( ! empty($original_pks) or ! empty($new_pks)) {
					$diff[0][$key] = empty($original_pks) ? null : $original_pks;
					$diff[1][$key] = empty($new_pks) ? null : $new_pks;
				}
			}
		}

		return $diff;
	}
231717
def raw_diff(self):
        
        udiff_copy = self.copy_iterator()
        if self.__format == 'gitdiff':
            udiff_copy = self._parse_gitdiff(udiff_copy)
        return u''.join(udiff_copy)
1115593
public function render()
    {
        if ($this->richFormat &&
            $this->functionLike->isReturnTypesHintDetermined() &&
            $this->functionLike->areReturnTypesCompatible()
        ) {
            $this->richRenderStart();

            if (false == $this->hasParameters()) {
                $this->codePrinter->output('ZEND_END_ARG_INFO()');
                $this->codePrinter->outputBlankLine();
            }
        } elseif (true == $this->hasParameters()) {
            $this->codePrinter->output(
                sprintf(
                    'ZEND_BEGIN_ARG_INFO_EX(%s, 0, %d, %d)',
                    $this->name,
                    (int) $this->returnByRef,
                    $this->functionLike->getNumberOfRequiredParameters()
                )
            );
        }

        if (true == $this->hasParameters()) {
            $this->renderEnd();

            $this->codePrinter->output('ZEND_END_ARG_INFO()');
            $this->codePrinter->outputBlankLine();
        }
    }
732752
public function getInsertDiff()
    {
        return array_udiff_assoc(
            $this->collection->toArray(),
            $this->snapshot,
            function($a, $b) { return $a === $b ? 0 : 1; }
        );
    }
37761
public function render() {

		if ( ! isset( $this->struct['active'] ) ) {
			$this->struct['active'] = 'true';
		}

		$output = '<div id="' . esc_attr( $this->id() ) . '" class="uix-section" aria-hidden="' . esc_attr( $this->struct['active'] ) . '">' . $this->description();

		$output .= '<div class="uix-section-content">';

		$output .= $this->render_template();
		$output .= $this->render_children();

		$output .= '</div></div>';

		return $output;
	}
711070
function Text_Diff3($orig, $final1, $final2)
    {
        if (extension_loaded('xdiff')) {
            $engine = new Text_Diff_Engine_xdiff();
        } else {
            $engine = new Text_Diff_Engine_native();
        }

        $this->_edits = $this->_diff3($engine->diff($orig, $final1),
                                      $engine->diff($orig, $final2));
    }
1247141
protected function parseSequenceOrDifference()
    {
        if (null === ($item = $this->parse('Item', null))) {
            return [];
        }
        
        if ($this->type == '-') {
            $this->consume();
            
            return new AST\Difference($item, $this->parse('Item'));
        }
        
        $items = [
            $item
        ];
        
        while (null !== ($item = $this->parse('Item', null))) {
            $items[] = $item;
        }
        
        if (\count($items) === 1) {
            return $items[0];
        }
        
        return new AST\Sequence($items);
    }
695917
public function render()
    {
        if (empty($this->string)) {
            return '';
        }

        $string = str_repeat(' ', $this->indent) . $this->string . str_repeat(' ', $this->space);

        return $this->color->paint($string);
    }
982041
public function render()
    {
        $output[] = $this->open();

        if ($this->hasChildNodes()) {
            if ($this->inline) {
                $this->attributes->addAttributeClass('list-inline');
            }

            foreach ($this->childNodes as $childNode) {
                if ($this->inline) {
                    $childNode->attributes->addAttributeClass('list-inline-item');
                }
                $output[] = $childNode;
            }
        }

        $output[] = $this->close();

        return implode(PHP_EOL, $output);
    }
1243574
public function render()
    {
        $this->calculateColumnWidth();
        $output = $this->isShowBorder
            ? $this->renderBorder()
            : '';
        foreach ($this->rows as $rowIndex => $row) {
            foreach ($row as $cellIndex => $cell) {
                $output .= $this->renderCell($cellIndex, $row);
            }
            $output .= "\n";
            if ($rowIndex === self::HEADER_INDEX) {
                $output .= $this->renderBorder();
            }
        }
        $output .= $this->isShowBorder
            ? $this->renderBorder()
            : '';

        return $output;
    }