Render the ibooks field.
965109
function renderiBooksField() {
		$this->renderField(
			[
				'id' => 'ibooks',
				'name' => $this->getSlug(),
				'option' => 'ibooks',
				'value' => ( isset( $this->options['ibooks'] ) ) ? $this->options['ibooks'] : '',
				'type' => 'url',
				'class' => 'regular-text code',
			]
		);
	}
348991
function renderWidowsField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderField(
			[
				'id' => 'widows',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'widows',
				'value' => getset( $this->options, 'widows' ),
				'type' => 'text',
				'class' => 'small-text',
			]
		);
	}
645051
def render(self, *args, **kwargs):
        """"""
        if not self.childs and "href" in self.attrs:
            return self.clone()(self.attrs["href"]).render(*args, **kwargs)
        return super().render(*args, **kwargs)
737769
public function render()
    {
        if (!$this->visible) {
            return;
        }

        parent::render();

        if ($this->value === null) {
            $text = $this->text;
        } elseif (is_array($this->value)) {
            $text = vsprintf($this->text, $this->value);
        } else {
            $text = sprintf($this->text, $this->value);
        }

        if ($this->content_type === 'text/plain') {
            echo SwatString::minimizeEntities($text);
        } else {
            echo $text;
        }
    }
812615
function renderBottomMarginField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderField(
			[
				'id' => 'pdf_page_margin_bottom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_page_margin_bottom',
				'value' => getset( $this->options, 'pdf_page_margin_bottom' ),
				'description' => $args[0],
				'type' => 'text',
				'class' => 'small-text',
			]
		);
	}
166215
def render_filefield(field, attrs):
	
	field.field.widget.attrs["style"] = "display:none"

	if not "_no_label" in attrs:
		attrs["_no_label"] = True

	return wrappers.FILE_WRAPPER % {
		"field": field,
		"id": "id_" + field.name,
		"style": pad(attrs.get("_style", "")),
		"text": escape(attrs.get("_text", "Select File")),
		"icon": format_html(wrappers.ICON_TEMPLATE, attrs.get("_icon", "file outline"))
	}
252462
public String render(Reader in, RenderContext context) throws IOException {
    StringBuffer buffer = new StringBuffer();
    BufferedReader inputReader = new BufferedReader(in);
    String line;
    while ((line = inputReader.readLine()) != null) {
        buffer.append(line);
    }
    return render(buffer.toString(), context);
 }
769874
function render(element, opts) {
    opts = opts || {};

    var prepend = opts.prepend;
    var model = opts.model || {};
    var indentLevel = opts.indentLevel || 0;
    var isPretty = opts.isPretty;
    var jtPrintIndent = isPretty ? '\t' : '';
    var jtPrintNewline = isPretty ? '\n' : '';
    var indent = '', i, len, prop;
    var p = [];  // p is going to be our concatenator for the HTML string

    // if no element, then no HTML so return empty string
    if (!element) { return ''; }

    // if already a string, just return it
    if (utils.isString(element)) { return element; }

    // if an array, wrap it
    if (utils.isArray(element)) { element = naked(element, null); }

    // set the indentation level to the current indent
    if (isPretty && indentLevel) {
        for (i = 0; i < indentLevel; i++) {
            indent += jtPrintIndent;
        }
    }

    // if we are prepending some string, add it first
    if (prepend) {
        p.push(indent, prepend, jtPrintNewline);
    }

    // starting tag open
    if (element.tag) {
        p.push(indent, '<', element.tag);
    }

    // all tag attributes
    if (element.attributes) {
        for (prop in element.attributes) {
            if (element.attributes.hasOwnProperty(prop)) {

                if (element.attributes[prop] === null) {
                    p.push(' ', prop);
                }
                else {
                    p.push(' ', prop, '="', element.attributes[prop], '"');
                }
            }
        }
    }

    // if no children or text, then close the tag
    if (element.tag && !element.children && (element.text === undefined || element.text === null)) {

        // for self closing we just close it, else we add the end tag
        if (selfClosing.indexOf(element.tag) > -1) {
            p.push('/>', jtPrintNewline);
        }
        else {
            p.push('></', element.tag, '>', jtPrintNewline);
        }
    }
    // else we need to add children or the inner text
    else {

        // if a tag (i.e. not just a string literal) put end bracket
        if (element.tag) { p.push('>'); }

        // if children, we will need to recurse
        if (element.children) {
            if (element.tag) { p.push(jtPrintNewline); }

            // recurse down for each child
            for (i = 0, len = element.children.length; i < len; ++i) {
                p.push(render(element.children[i], {
                    indentLevel:    element.tag ? indentLevel + 1 : indentLevel,
                    isPretty:       isPretty,
                    model:          model
                }));
            }

            if (element.tag) { p.push(indent); }
        }

        // if text, simply add it
        if (element.text !== null && element.text !== undefined) { p.push(element.text); }

        // finally if a tag, add close tag
        if (element.tag) {
            p.push('</', element.tag, '>', jtPrintNewline);
        }
    }

    return p.join('');
}
31889
public function renderView()
    {
        if ($this->path) {
            $this->js(true)->tab(
                ['cache' => false, 'auto' => true, 'path' => $this->path, 'apiSettings' => ['data' => ['__atk_tab' => 1]]]
            );
        } else {
            $this->js(true)->tab();
        }

        if ($this->owner->activeTabName == $this->name) {
            $this->js(true)->click();
        }

        parent::renderView();
    }
764735
def make_view_field(field, obj=None, types_convert_map=None, fields_convert_map=None, 
    value=__default_value__, auto_convert=True):
    
    from uliweb.utils.textconvert import text2html
    from uliweb.core.html import Tag
    
    old_value = value

    types_convert_map = types_convert_map or {}
    fields_convert_map = fields_convert_map or {}
    default_convert_map = {orm.TextProperty:lambda v,o:text2html(v)}
    
    if isinstance(field, dict):
        if 'prop' in field and field.get('prop'):
            prop = field['prop']
        else:
            prop = field
        name = field.get('name')
    else:
        prop = field
        name = prop.property_name
        
    #not real Property instance, then return itself, so if should return
    #just like {'label':xxx, 'value':xxx, 'display':xxx}
    if not isinstance(prop, orm.Property):  
        if old_value is __default_value__:
            value = prop.get('value', '')
        display = prop.get('display', value)
        label = prop.get('label', '') or prop.get('verbose_name', '')
        convert = prop.get('convert', None)
    else:
        if old_value is __default_value__:
            if isinstance(obj, Model):
                value = prop.get_value_for_datastore(obj)
                if value is Lazy:
                    getattr(obj, prop.property_name)
                    value = prop.get_value_for_datastore(obj)
            else:
                value = obj[name]
        if auto_convert or prop.choices:
            display = prop.get_display_value(value)
        else:
            display = value
        
        if isinstance(field, dict):
            initial = field.get('verbose_name', None)
        else:
            initial = ''
        label = initial or prop.verbose_name or name
        
    if name in fields_convert_map:
        convert = fields_convert_map.get(name, None)
    else:
        if isinstance(prop, orm.Property):
            convert = types_convert_map.get(prop.__class__, None)
            if not convert:
                convert = default_convert_map.get(prop.__class__, None)
    
    convert_result = None
    if convert:
        convert_result = convert(value, obj)
    
    if convert_result is None:
        if value is not None:
            if isinstance(prop, orm.ManyToMany):
                s = []
                #support value parameter, the old value is already stored in "old_value" variable
                if old_value is not __default_value__:
                    if prop.reference_fieldname == 'id':
                        query = []
                        for _id in old_value:
                            _v = functions.get_cached_object(prop.reference_class, _id)
                            query.append(_v)
                    else:
                        query = prop.reference_class.filter(prop.reference_class.c[prop.reversed_fieldname].in_(old_value))
                else:
                    if prop.reference_fieldname == 'id':
                        query = []
                        _ids = prop.get_value_for_datastore(obj, cached=True)
                        for _id in _ids:
                            _v = functions.get_cached_object(prop.reference_class, _id)
                            if not _v:
                                log.debug("Can't find object %s:%d" % (prop.reference_class.__name__, _id))
                                _v = _id
                            query.append(_v)
                    else:
                        query = getattr(obj, prop.property_name).all()
                        
                for x in query:
                    if isinstance(x, orm.Model):
                        s.append(get_obj_url(x))
                    else:
                        s.append(str(x))
                display = ' '.join(s)
            elif isinstance(prop, orm.ReferenceProperty) or isinstance(prop, orm.OneToOne):
                try:
                    if old_value is not __default_value__:
                        d = prop.reference_class.c[prop.reference_fieldname]
                        if prop.reference_fieldname == 'id':
                            v = functions.get_cached_object(prop.reference_class, old_value)
                        else:
                            v = prop.reference_class.get(d==old_value)
                    if not isinstance(obj, Model):
                        d = prop.reference_class.c[prop.reference_fieldname]
                        if prop.reference_fieldname == 'id':
                            v = functions.get_cached_object(prop.reference_class, value)
                        else:
                            v = prop.reference_class.get(d==value)
                    else:
                        if prop.reference_fieldname == 'id':
                            v = functions.get_cached_object(prop.reference_class, obj.get_datastore_value(prop.property_name))
                        else:
                            v = functions.get_cached_object(prop.reference_class,
                                    condition=prop.reference_class.c[prop.reference_fieldname]==obj.get_datastore_value(prop.property_name))
                except orm.Error:
                    display = prop.get_datastore_value(obj) or ''
                    v = None
                if isinstance(v, Model):
                    display = get_obj_url(v)
                else:
                    display = str(v if v is not None else '')
            elif isinstance(prop, orm.FileProperty):
                url = functions.get_href(value)
                if url:
                    display = str(Tag('a', value, href=url))
                else:
                    display = ''
#            if isinstance(prop, orm.Property) and prop.choices is not None:
#                display = prop.get_display_value(value)
            if prop.__class__ is orm.TextProperty:
                display = text2html(value)
       
    else:
        display = convert_result
        
    if isinstance(display, unicode):
        display = display.encode('utf-8')
    if display is None:
        display = ''
        
    return Storage({'label':label, 'value':value, 'display':display, 'name':name})
1150337
def render(file):
    """"""
    with file.open() as fp:
        encoding = detect_encoding(fp, default='utf-8')
        file_content = fp.read().decode(encoding)
        parsed_xml = xml.dom.minidom.parseString(file_content)
        return parsed_xml.toprettyxml(indent='  ', newl='')
1159898
def render(file):
    """"""
    fp = file.open()
    content = fp.read()
    fp.close()

    notebook = nbformat.reads(content.decode('utf-8'), as_version=4)

    html_exporter = HTMLExporter()
    html_exporter.template_file = 'basic'
    (body, resources) = html_exporter.from_notebook_node(notebook)
    return body, resources
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
549871
function render_field( $field ) {

		$maxrows = null;

		$disablesort = null;

		$defaultheaders = null;


		// vars
		$o = array( 'id', 'name' );
		$s = array( 'readonly', 'disabled' );
		$e = '';


		// maxlength
		if( $field['maxrows'] !== '' ) {

			$maxrows = 'data-maxrows="'.$field['maxrows'].'"';

		}

						// disable sort
		if( !empty($field['disable_sort']) ) $disablesort = ' data-disablesort="'.$field['disable_sort'].'"';

		// rows
		if( !empty($field['fixed_columns']) ) {

			$defaultheaders = preg_split( '/\r\n|\r|\n/',  $field['default_headers'] );

			$defaultheaders = 'data-defaultheaders="'.implode(",", $defaultheaders) .'"';
			if( empty($field['default_headers']) ) $defaultheaders = 'data-defaultheaders="No Default Headers Set"';

		}




		// populate atts
		$atts = array();
		foreach( $o as $k ) {

			$atts[ $k ] = $field[ $k ];

		}



		// special atts
		foreach( $s as $k ) {

			if( $field[ $k ] ) {

				$atts[ $k ] = $k;

			}

		}



		$e .= '<textarea style="display:none" '.$maxrows.' '.$disablesort.' '.$defaultheaders.' data-key="'.$field['key'].'" ' . acf_esc_attr( $atts ) . ' >';
		$e .= esc_textarea( $field['value'] );
		$e .= '</textarea>';


		// return
		echo $e;

	}
1145501
def _render_table(data, fields=None):
  
  return IPython.core.display.HTML(datalab.utils.commands.HtmlBuilder.render_table(data, fields))
305509
public function renderField()
    {
        if (null === $this->selector) {
            $options = array();

            list($name, $id) = $this->resolveNameID();

            $options['id'] = $id . '_datetimepicker';
            TbHtml::addCssClass('input-append', $options);

            echo TbHtml::openTag('div', $options);
            if ($this->hasModel()) {
                echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
            } else {
                echo TbHtml::textField($name, $this->value, $this->htmlOptions);
            }
            echo TbHtml::openTag('span', array('class' => 'add-on'));
            echo '<i data-time-icon="' . $this->iconTime . '" data-date-icon="' . $this->iconDate . '"></i>';
            echo TbHtml::closeTag('span');
            echo TbHtml::closeTag('div');
        }
    }
296145
function display() {
		ob_start(); ?>
		<p><?php _e( 'Once your book is finished, you can download the files and submit them to ebookstores and print-on-demand providers.', 'pressbooks' ); ?></p>

		<div class="postbox">
			<div class="inside">
				<h3><?php _e( 'Ebook Stores', 'pressbooks' ); ?></h3>
				<p><?php printf( __( 'Once you have downloaded your files, you can either submit them to ebookstores yourself, or use a third-party distributor. Recommended self-serve ebookstores are <a href="%1$1s">Kindle</a>, <a href="%2$2s">Kobo</a>, and <a href="%3$3s">Nook</a>. Other ebook stores include Apple iBooks and Google.', 'pressbooks' ), 'https://kdp.amazon.com', 'https://www.kobo.com/writinglife', 'https://www.nookpress.com' ); ?></p>
				<p><?php printf( __( 'If you do not wish to submit your ebooks yourself, we recommend using a third-party distribution service such as <a href="%1s">IngramSpark</a>, which can also make your books available online in print.', 'pressbooks' ), 'https://ingramspark.com' ); ?></p>

				<h3><?php _e( 'Print-on-Demand', 'pressbooks' ); ?></h3>
				<p><?php printf( __( 'If you wish to sell your printed books online, we recommend going through <a href="%1$1s">IngramSpark</a> or Amazon\'s <a href="%2$2s">CreateSpace</a>.', 'pressbooks' ), 'https://ingramspark.com', 'https://www.createspace.com' ); ?></p>
			</div>
		</div>

		<h3><?php _e( 'Adding BUY Links to Your Pressbooks Web Book', 'pressbooks' ); ?></h3>
		<p><?php _e( 'If you would like to add <strong>BUY</strong> links to your Pressbooks web book, add the links to your book at the different retailers below:', 'pressbooks' ); ?></p>

		<?php
		$output = ob_get_contents();
		ob_end_clean();

		/**
		* Filter the contents of the Dashboard Publish page.
		 *
		 * @since 4.3.0
		 */
		echo apply_filters(
			'pb_publish_page',
			/**
			 * Filter the contents of the Dashboard Publish page.
			 *
			 * @since 3.9.3
			 * @deprecated 4.3.0 Use pb_publish_page instead.
			 *
			 * @param string $output
			 */
			apply_filters( 'pressbooks_publish_page', $output )
		);
	}