Set the template property on the object
506185
private function setTemplate()
    {
        $this->template = $this->formHelper->getConfig($this->getTemplate(), $this->getTemplate());
    }
1162178
function set(name, val) {
  // If the name is an object
  var key;
  if (typeof name === 'object') {
    // Iterate over its properties
    for (key in name) {
      if (name.hasOwnProperty(key)) {
        // Set each one
        set(key, name[key]);
      }
    }
  } else {
  // Otherwise, save to settings
    settings[name] = val;
  }
}
702823
public void setAttribute(Object object, String attribute, Object newValue) {
        delegate.setAttribute(object, attribute, newValue);
    }
742042
function (propertyName, newValue) {
            if (!this._cfg) {
                return;
            }
            if (propertyName === "items" && this._cfg.bind.hasOwnProperty(propertyName)) {
                var oldValue = this.getProperty(propertyName);
                this._cfg[propertyName] = newValue;
                this._onBoundPropertyChange(propertyName, newValue, oldValue);
            } else {
                this.$TemplateBasedWidget.setWidgetProperty.apply(this, arguments);
            }
        }
166555
function(object, defaultValue, property) {
        if (!_.isUndefined(defaultValue)) {
            object.__setPropertyParam(property, 'default', defaultValue);
        }
    }
542455
def set_value(obj, attrs, value, _copy=False):
    
    for attr in attrs:
        if _copy:
            value = copy(value)
        setattr(obj, attr, value)
1184027
function () {
      var atts = this.atts, att, eh = this.eh, pvs = this.parent.vscope;
      if (atts) {
          // this template has no controller
          // let's propagate the new attribute values to the current scope
          var vscope = this.vscope;
          for (var i = 0, sz = this.atts.length; sz > i; i++) {
              att = atts[i];
              json.set(vscope, att.name, att.getValue(eh, pvs, null));
          }
      }
  }
1240562
function Templater(options) {
  if (options == null) {
    options = { allowEval: true };
  }
  this.options = options;
  if (options.stack && Array.isArray(options.stack)) {
    this.stack = options.stack;
  }
  else if (typeof options.stack === 'string') {
    this.stack = [ options.stack ];
  }
  else {
    this.stack = [];
  }
  this.nodes = [];
}
448964
public void setTemplate( String template )
    {
        if ( template == null || template.length() == 0 )
        {
            throw new IllegalStateException( "Template cannot be null or empty." );
        }

        if ( template.equals( _template ) )
        {
            return;
        }

        _template = template;
        _isParsed = false;
        _parsedTemplate = null;
    }
343319
function Property (initValue) {
		if (arguments.length) {
			this.set(initValue);
		}
		else {
			this.set(this.defaultValue);
		}
		ok.Data.apply(this, arguments);
	}
1243661
protected function init()
	{
		if (isset($this->template) === false)
		{
			throw new \RuntimeException('Template property does not exist.');
		}

		if (empty($this->template) === false and is_string($this->template))
		{
			$this->template = $this->view($this->template);
		}
	}
1098557
function prepareTemplate(element) {

  let template = element[symbols.template];

  if (!template) {
    /* eslint-disable no-console */
    console.warn(`ShadowTemplateMixin expects ${element.constructor.name} to define a property called [symbols.template].\nSee https://elix.org/documentation/ShadowTemplateMixin.`);
    return;
  }

  if (!(template instanceof HTMLTemplateElement)) {
    throw `Warning: the [symbols.template] property for ${element.constructor.name} must return an HTMLTemplateElement.`;
  }

  // @ts-ignore
  if (window.ShadyCSS && !window.ShadyCSS.nativeShadow) {
    // Let the CSS polyfill do its own initialization.
    const tag = element.localName;
    // @ts-ignore
    window.ShadyCSS.prepareTemplate(template, tag);
  }

  return template;
}
68924
def setMenuTemplate( self, template ):
        
        try:
            xtree = ElementTree.fromstring(nativestring(template))
        except ExpatError, e:
            logger.exception(e)
            return
        
        self.uiMenuTREE.setUpdatesEnabled(False)
        self.uiMenuTREE.blockSignals(True)
        
        self.uiMenuTREE.clear()
        for xaction in xtree:
            self.uiMenuTREE.addTopLevelItem(self.loadXml(xaction))
        
        self.uiMenuTREE.setUpdatesEnabled(True)
        self.uiMenuTREE.blockSignals(False)
782880
function parseObject(object) {
  const children = Object.keys(object).map(key => ({
    keyTemplate: parseString(key),
    valueTemplate: parse(object[key])
  }));
  const templateParameters = children.reduce(
    (parameters, child) =>
      parameters.concat(child.valueTemplate.parameters, child.keyTemplate.parameters),
    []
  );
  const templateFn = context => {
    return children.reduce((newObject, child) => {
      newObject[child.keyTemplate(context)] = child.valueTemplate(context);
      return newObject;
    }, {});
  };

  return Template(templateFn, templateParameters);
}
1363363
def setobjattr(obj, key, value):
    """"""
    try:
        setattr(obj, key, int(value))
    except ValueError:
        try:
            setattr(obj, key, float(value))
        except ValueError:
            # string if not number
            try:
                setattr(obj, key, str(value))
            except UnicodeEncodeError:
                setattr(obj, key, value)
15835
function (obj, meta) {
    // if `null` already, just set it to the new value
    // otherwise define property first
    if (obj[META_FIELD] !== null) {
      if (obj.__defineNonEnumerable) {
        obj.__defineNonEnumerable(EMBER_META_PROPERTY);
      } else {
        Object.defineProperty(obj, META_FIELD, META_DESC);
      }
    }

    obj[META_FIELD] = meta;
  }
221097
def set_property(self, **kwargs):
        
        if not isinstance(self._value, nparray.ndarray):
            raise ValueError("value is not a nparray object")

        for property, value in kwargs.items():
            setattr(self._value, property, value)