Render a label with content
17419
def render_label(content, label_for=None, label_class=None, label_title=""):
    
    attrs = {}
    if label_for:
        attrs["for"] = label_for
    if label_class:
        attrs["class"] = label_class
    if label_title:
        attrs["title"] = label_title
    return render_tag("label", attrs=attrs, content=content)
195149
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WDecoratedLabel label = (WDecoratedLabel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		WComponent head = label.getHead();
		WComponent body = label.getBody();
		WComponent tail = label.getTail();

		xml.appendTagOpen("ui:decoratedlabel");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", label.isHidden(), "true");
		xml.appendClose();

		if (head != null && head.isVisible()) {
			xml.appendTagOpen("ui:labelhead");
			xml.appendAttribute("id", label.getId() + "-head");
			xml.appendClose();
			head.paint(renderContext);
			xml.appendEndTag("ui:labelhead");
		}

		xml.appendTagOpen("ui:labelbody");
		xml.appendAttribute("id", label.getId() + "-body");
		xml.appendClose();
		body.paint(renderContext);
		xml.appendEndTag("ui:labelbody");

		if (tail != null && tail.isVisible()) {
			xml.appendTagOpen("ui:labeltail");
			xml.appendAttribute("id", label.getId() + "-tail");
			xml.appendClose();
			tail.paint(renderContext);
			xml.appendEndTag("ui:labeltail");
		}

		xml.appendEndTag("ui:decoratedlabel");
	}
985934
protected function renderLabelParts ($label = null, $options = [])
		{
			parent::renderLabelParts($label, $options);
			if (!empty($this->parts[ '{labelTitle}' ]))
				$this->parts[ '{labelTitle}' ] = Yii::tr($this->parts[ '{labelTitle}' ]);
		}
498489
def label(self,x,y,label,offset=[0,0]):
        """"""
        (xc,yc)=self.p2c([x,y])
        return self.create_text(xc-offset[0],yc-offset[1],text=label)
118611
def display(self, content = None, **settings):
        
        lines = self.render(content, **settings)
        for l in lines:
            print(l)
199654
function render(content, store) {
  var type = typeof content;
  var node = content;
  if(type === 'function') node = render(content(), store);
  else if(type === 'string') {
    node = document.createTextNode('');
    bind(content, function(data) {
      node.nodeValue = data;
    }, store);
  } 
  else if(content instanceof Array) node = fragment(content, store);
  return node;
}
674304
function LabelView() {
        NodeView.apply(this, arguments);
        this.parentStyle = true;
        this.selectable = SK_NO;

        /** @member {string} */
        this.underline = false;

        /** @member {string} */
        this.text = "";

        /** @member {number} */
        this.horizontalAlignment = Graphics.AL_CENTER;

        /** @member {number} */
        this.verticalAlignment = Graphics.AL_MIDDLE;

        /** @member {number} */
        this.direction = DK_HORZ;

        /** @member {boolean} */
        this.wordWrap = false;

    }
39212
public function renderLabel()
	{
		$options = array(
			'label'=>$this->getLabel(),
			'required'=>$this->getRequired()
		);

		if(!empty($this->attributes['id']))
			$options['for']=$this->attributes['id'];

		return CHtml::activeLabel($this->getParent()->getModel(), $this->name, $options);
	}
930588
def _render_content(self, content, **settings):
        
        bar_len = int(settings[self.SETTING_BAR_WIDTH])
        if not bar_len:
            bar_len = TERMINAL_WIDTH - 10
        percent = content
        progress = ""
        progress += str(settings[self.SETTING_BAR_CHAR]) * int(bar_len * percent)
        s = {k: settings[k] for k in (self.SETTING_FLAG_PLAIN,)}
        s.update(settings[self.SETTING_BAR_FORMATING])
        progress = self.fmt_text(progress, **s)
        progress += ' ' * int(bar_len - int(bar_len * percent))
        return "{:6.2f}% [{:s}]".format(percent * 100, progress)
688499
def render_ents(self, text, spans, title):
        
        markup = ""
        offset = 0
        for span in spans:
            label = span["label"]
            start = span["start"]
            end = span["end"]
            entity = escape_html(text[start:end])
            fragments = text[offset:start].split("\n")
            for i, fragment in enumerate(fragments):
                markup += escape_html(fragment)
                if len(fragments) > 1 and i != len(fragments) - 1:
                    markup += "</br>"
            if self.ents is None or label.upper() in self.ents:
                color = self.colors.get(label.upper(), self.default_color)
                ent_settings = {"label": label, "text": entity, "bg": color}
                if self.direction == "rtl":
                    markup += TPL_ENT_RTL.format(**ent_settings)
                else:
                    markup += TPL_ENT.format(**ent_settings)
            else:
                markup += entity
            offset = end
        markup += escape_html(text[offset:])
        markup = TPL_ENTS.format(content=markup, dir=self.direction)
        if title:
            markup = TPL_TITLE.format(title=title) + markup
        return markup
584767
def _render_content(self, content, **settings):
        
        if isinstance(content, dict):
            return self._render_content_dict(content, 0, [], **settings)
        elif isinstance(content, list):
            return self._render_content_list(content, 0, [], **settings)
        else:
            raise Exception("Received invalid data tree for rendering.")
381631
def render(self, data, div_id="chart", head=""):
        """"""
        if not self.is_valid_name(div_id):
            raise ValueError(
                "Name {} is invalid. Only letters, numbers, '_', and '-' are permitted ".format(
                    div_id))

        return Template(head + self.template).render(
            div_id=div_id.replace(" ", "_"),
            data=json.dumps(
                data, indent=4).replace("'", "\\'").replace('"', "'"))
400744
def render(self, context):
        """"""
        import markdown
        content = self.get_content_from_context(context)
        return markdown.markdown(content)
780995
def render_app_label(context, app, fallback=""):
    
    try:
        text = app['app_label']
    except KeyError:
        text = fallback
    except TypeError:
        text = app
    return text
410562
def render_edge_with_label(self, name, edge, edge_settings):
        
        props_to_display = self.extract_props(edge.settings)

        label = '<'

        for prop, value in props_to_display.items():
            label += self.get_label(prop, value)
            label += "<BR/>"

        label += '>'

        self.gv_graph.edge(self.get_path_from_name(name), self.get_path_from_name(edge.to), label=label, **edge_settings)
503579
def render
      payload = font_string + @zpl
      response = Labelary::Client.connection.post "/v1/printers/#{@dpmm}dpmm/labels/#{@width}x#{@height}/#{@index}/", payload, { Accept: @content_type }
      return response.body
    end
823762
def render_layout(self, form, context, template_pack=TEMPLATE_PACK):
        
        # Writing the label values into the field placeholders.
        # This is done at rendering time, so the Form.__init__() could update any labels before.
        # Django 1.11 no longer lets EmailInput or URLInput inherit from TextInput,
        # so checking for `Input` instead while excluding `HiddenInput`.
        for field in form.fields.values():
            if field.label and \
                    isinstance(field.widget, (Input, forms.Textarea)) and \
                    not isinstance(field.widget, forms.HiddenInput):
                field.widget.attrs['placeholder'] = u"{0}:".format(field.label)

        return super(CompactLabelsCommentFormHelper, self).render_layout(form, context, template_pack=template_pack)