set arrays vars.
439791
protected function assign($data)
    {
        if (!is_null($data)) {
            foreach ($data as $key => $value) {
                $this->set($key, $value);
            }
        }
    }
420498
public function setVars($vars)
    {
        foreach ($vars as $key => $dtoData) {
            $this->vars[$key] = new SpellVarsDto($dtoData);
        }
    
        return $this;
    }
737573
function setVars(origEnv, setVars) {
  var key;
  if (typeof setVars !== 'object')
    return;
  if (Array.isArray(setVars))
    return;
  for (key in setVars) {
    if (has(setVars, key)) {
      if (!has(origEnv, key)) {
        origEnv[key] = [
          !!has(process.env, key),
          process.env[key]
        ];
      }
      process.env[key] = setVars[key];
    }
  }
  return;
}
914007
function assign($name,$value=null){
        if(is_array($name)){
            foreach($name as $vk => $v){
                $this->vars[$vk] = $v;
            }
        }else{
            $this->vars[$name] = $value;
        }   
    }
477722
public function setVars(array $vars)
    {
        $name = isset($vars['name']) && !empty($vars['name']) ? $vars['name'] : $vars['id'];
        $vars['name'] = $name;

        $this->vars = $vars;

        return $this;
    }
996935
@SuppressWarnings("unchecked")
    public void setVars(final Map<String, ? extends Object> vars) {
        this.vars = (Map<String, Object>)vars;
    }
273366
function mset(array $vars,$prefix='',$ttl=0) {
		foreach ($vars as $key=>$val)
			$this->set($prefix.$key,$val,$ttl);
	}
337871
def set_var_slice(self, name, start, count, var):
        

        method = "set_var_slice"

        A = var
        metadata = {
            method: name,
            "start": start,
            "count": count
        }
        send_array(self.socket, A, metadata)
        A, metadata = recv_array(
            self.socket, poll=self.poll, poll_timeout=self.poll_timeout,
            flags=self.zmq_flags)
191472
def declare_vars(self, d):
        """"""
        for k, v in d.items():
            self.declare_var(k, v)
597890
public function setVariables($variables)
    {
        $this->variables = [];
        foreach ($variables as $var => $value) {
            if ($value instanceof RationalNode) {
                $this->variables[$var] = $value;
            } elseif ($this->isInteger($value)) {
                $this->variables[$var] = new RationalNode(intval($value), 1);
            } else {
                $this->variables[$var] = $this->parseRational($value);
            }
        }
    }
338929
def set(*args, **kw):
    """"""

    if len(args) == 0:
        if len(kw) != 0:
            # normal case is only keyword,value pairs
            for keyword, value in kw.items():
                keyword = untranslateName(keyword)
                svalue = str(value)
                _varDict[keyword] = svalue
        else:
            # set with no arguments lists all variables (using same format
            # as IRAF)
            listVars(prefix="    ", equals="=")
    else:
        # The only other case allowed is the peculiar syntax
        # 'set @filename', which only gets used in the zzsetenv.def file,
        # where it reads extern.pkg.  That file also gets read (in full cl
        # mode) by clpackage.cl.  I get errors if I read this during
        # zzsetenv.def, so just ignore it here...
        #
        # Flag any other syntax as an error.
        if (len(args) != 1 or len(kw) != 0 or
                not isinstance(args[0], string_types) or args[0][:1] != '@'):
            raise SyntaxError("set requires name=value pairs")
1176775
function reset() {
        foreach ($this->vars as $key=>$val) {
            unset($this->env[$key]);
        }
        $this->vars = array();
    }
357186
def set_items(self, items):
        """"""
        res = []
        max_value = max(sum((rec[1] for rec in items)), 1)
        for key, val in items:
            res.append((key, val, val * 1.0 / max_value))
        self._items = res
911405
public void setVariables(final Map<String,Object> variables) {
        if (variables == null) {
            return;
        }
        this.variables.putAll(variables);
    }
821768
function setValue($values) {
        $values = (array)$values;
        foreach ($values as $name=>$value) {
            if (array_key_exists($name, $this->_values)) {
                $this->_values[$name] = $value;
            }
        }
    }
53131
def set_default_var(**vars):
    
    for k, v in vars.iteritems():
        current_context.vars.setdefault(k, v)
880739
public function setFromArray(array $vars, bool $cast = true): void
    {
        if ($cast) {
            foreach ($vars as $key => $val) {
                if (property_exists($this, $key)) {
                    if (is_int($this->$key)) {
                        $this->$key = (int) $val;
                    } elseif (is_string($this->$key)) {
                        $this->$key = (string) $val;
                    } elseif (is_bool($this->$key)) {
                        $this->$key = (bool) $val;
                    } elseif (is_float($this->$key)) {
                        $this->$key = (float) $val;
                    } else {
                        $this->$key = $val;
                    }
                }
            }
        } else {
            foreach ($vars as $key => $val) {
                if (property_exists($this, $key)) {
                    $this->$key = $val;
                }
            }
        }
    }