Sets specified engine  as default for all
    algorithms, supported by it

    For compatibility with 0.2.x if string is passed instead
    of engine, attempts to load engine with this id
519417
def set_default(eng, algorithms=0xFFFF):
    
    if not isinstance(eng,Engine):
        eng=Engine(eng)
    global default
    libcrypto.ENGINE_set_default(eng.ptr, c_int(algorithms))
    default = eng
891562
def setdefault(self, key, default=None):
        
        if key in self.cache:
            return self.cache[key]

        def setdefault_trans(pipe):
            pickled_key = self._pickle_key(key)

            pipe.multi()
            pipe.hsetnx(self.key, pickled_key, self._pickle_value(default))
            pipe.hget(self.key, pickled_key)

            __, pickled_value = pipe.execute()

            return self._unpickle(pickled_value)

        value = self._transaction(setdefault_trans)

        if self.writeback:
            self.cache[key] = value
        return value
1062826
public void setContentTypeEngine(ContentTypeEngine engine) {
        String contentType = engine.getContentType();
        String suffix = StringUtils.removeStart(contentType.substring(contentType.lastIndexOf('/') + 1), "x-");

        engines.put(engine.getContentType(), engine);
        suffixes.put(suffix.toLowerCase(), engine);

        log.debug("'{}' content engine is '{}'", engine.getContentType(), engine.getClass().getName());
    }
479846
def set(self, handler, attr, name, path, cfg):

        

        full_name = ("%s.%s" % (path, name)).strip(".")

        # obtain default value
        if attr.default is None:
            default = None
        else:
            try:
                comp = vodka.component.Component(cfg)
                default = handler.default(name, inst=comp)
                if self.skip_defaults:
                    self.echo("%s: %s [default]" % (full_name, default))
                    return default
            except Exception:
                raise

        # render explanation
        self.echo("")
        self.echo(attr.help_text)
        if attr.choices:
            self.echo("choices: %s" % ", ".join([str(c) for c in attr.choices]))


        # obtain user input and validate until input is valid
        b = False
        while not b:
            try:
                if type(attr.expected_type) == type:
                    r = self.prompt(full_name, default=default, type=attr.expected_type)
                    r = attr.expected_type(r)
                else:
                    r = self.prompt(full_name, default=default, type=str)
            except ValueError:
                self.echo("Value expected to be of type %s"% attr.expected_type)
            try:
                b = handler.check({name:r}, name, path)
            except Exception as inst:
                if hasattr(inst, "explanation"):
                    self.echo(inst.explanation)
                else:
                    raise
        return r
1202549
def _engine_builder(con):
    
    global _SQLALCHEMY_INSTALLED
    if isinstance(con, str):
        try:
            import sqlalchemy
        except ImportError:
            _SQLALCHEMY_INSTALLED = False
        else:
            con = sqlalchemy.create_engine(con)
            return con

    return con
1254749
def set_default_identity_by_index(self, index: int):
        
        identities_len = len(self.identities)
        if index >= identities_len:
            raise SDKException(ErrorCode.param_error)
        for i in range(identities_len):
            self.identities[i].is_default = False
            if i == index:
                self.identities[index].is_default = True
449064
public function setEngine($table, $engine)
	{
		$supported = ['innodb', 'myisam', 'archive', 'merge', 'memory', 'csv', 'federated'];

		if (!in_array(strtolower($engine), $supported))
		{
			throw new UnsupportedEngineException(sprintf(
				'Unsupported engine type of "%s" specified. Engine type must be one of %s',
				$engine,
				implode(', ', $supported)
			));
		}

		$this->setQuery('ALTER TABLE ' . str_replace('#__', $this->tablePrefix, $this->quote($table, false)) . " ENGINE = " . $this->quote($engine));

		return $this->db->query();
	}
1272316
def setdefault(self, name, value):
        ''' '''
        if name in self:
            return self[name]
        self[name] = value
        return self[name]
806385
def _set_program_defaults(cls, programs):
        """"""
        for program in programs:
            val = getattr(cls, program.__name__) \
                and extern.does_external_program_run(program.__name__,
                                                     Settings.verbose)
            setattr(cls, program.__name__, val)
788580
def init(uri=None, alembic_ini=None, engine=None, create=False):
    

    if uri and engine:
        raise ValueError("uri and engine cannot both be specified")

    if uri is None and not engine:
        uri = 'sqlite:////tmp/datanommer.db'
        log.warning("No db uri given.  Using %r" % uri)

    if uri and not engine:
        engine = create_engine(uri)

    if 'sqlite' in engine.driver:
        # Enable nested transaction support under SQLite
        # See https://stackoverflow.com/questions/1654857/nested-transactions-with-sqlalchemy-and-sqlite
        @event.listens_for(engine, "connect")
        def do_connect(dbapi_connection, connection_record):
            # disable pysqlite's emitting of the BEGIN statement entirely.
            # also stops it from emitting COMMIT before any DDL.
            dbapi_connection.isolation_level = None

        @event.listens_for(engine, "begin")
        def do_begin(conn):
            # emit our own BEGIN
            conn.execute("BEGIN")

    # We need to hang our own attribute on the sqlalchemy session to stop
    # ourselves from initializing twice.  That is only a problem is the code
    # calling us isn't consistent.
    if getattr(session, '_datanommer_initialized', None):
        log.warning("Session already initialized.  Bailing")
        return
    session._datanommer_initialized = True

    session.configure(bind=engine)
    DeclarativeBase.query = session.query_property()

    # Loads the alembic configuration and generates the version table, with
    # the most recent revision stamped as head
    if alembic_ini is not None:
        from alembic.config import Config
        from alembic import command
        alembic_cfg = Config(alembic_ini)
        command.stamp(alembic_cfg, "head")

    if create:
        DeclarativeBase.metadata.create_all(engine)
29261
public function setEngine($engine)
    {
        if ($this->isValidEngine($engine)) {
            $this->engine =& $engine;

            return true;
        }

        return false;
    }
582245
function(exts, fn, options) {
      if (arguments.length === 1 && typeof exts === 'string') {
        return this.getEngine(exts);
      }
      exts = utils.arrayify(exts);
      var len = exts.length;
      while (len--) {
        var ext = exts[len];
        if (ext && ext[0] !== '.') ext = '.' + ext;
        this._.engines.setEngine(ext, fn, options);
      }
      return this;
    }
767566
def set_default(self, name, value):
        
        if self.vars is None:
            self.vars = {}
        if name not in self.vars:
            self.vars[name] = value
166688
protected function __init_view($engine = '')
    {

        $view = (string)__NAMESPACE__ . (string)(empty($engine) ? "\\View_{$this->default_view_engine}" : "\\View_{$engine}");

        if ($this->view instanceof $view) return true;

        try {
            $this->view = new $view();
        } catch (ViewException $e) {
            throw $e;
        }

        return true;
    }
1055226
def compile(self):
        

        from ..engines import get_default_engine

        engine = get_default_engine(self)
        return engine.compile(self)
832058
public void setEngine(final ActionEngine engine) {
	if (!Objects.equals(this.engine, engine)) { // Only if changed
	    synchronized (contexts) {
		contexts.clear();
	    }
	}
	this.engine = engine;
    }
756735
protected void engineReset() {
        int i = 60;
        do {
           pad[i    ] = (byte)0x00;
           pad[i + 1] = (byte)0x00;
           pad[i + 2] = (byte)0x00;
           pad[i + 3] = (byte)0x00;
        } while ((i -= 4) >= 0);
        padding = 0;
        bytes = 0;
        init();
    }