Initializes client options
332435
protected function initClientOptions()
    {
        $options = array_merge($this->defaultOptions(), $this->clientOptions);
        // $_POST['_csrf'] = ...
        $options['extraFileUploadParams'][Yii::$app->getRequest()->csrfParam] = Yii::$app->getRequest()->getCsrfToken();
        // $_POST['PHPSESSID'] = ...
        $options['extraFileUploadParams'][Yii::$app->getSession()->getName()] = Yii::$app->getSession()->getId();
        $this->clientOptions = $options;
    }
1262517
function() {
			_.defaults( this.options, {
				query: {},
				multiple: false,
				editable: true,
				filterable: 'all',
				searchable: true,
				displaySettings: false,
				displayUserSettings: false,
				editing: false,
				state: 'insert',
				metadata: {}
			});

			Select.prototype.initialize.apply( this, arguments );
		}
280626
public static ClientOptions of(ClientOptionValue<?>... options) {
        requireNonNull(options, "options");
        if (options.length == 0) {
            return DEFAULT;
        }
        return new ClientOptions(DEFAULT, options);
    }
625609
public function initOptions()
    {
        if ($remote = TbArray::popValue('remote', $this->options)) {
            $this->options['remote'] = CHtml::normalizeUrl($remote);
        }

        TbArray::defaultValue('backdrop', $this->backdrop, $this->options);
        TbArray::defaultValue('keyboard', $this->keyboard, $this->options);
        TbArray::defaultValue('show', $this->show, $this->options);
    }
1275877
public function initOptions()
    {
        $options = array();
        foreach (array('matcher', 'sorter', 'updater', 'highlighter') as $fn) {
            if ($this->$fn !== null) {
                if ($this->$fn instanceof CJavaScriptExpression) {
                    $options[$fn] = $this->$fn;
                } else {
                    $options[$fn] = new CJavaScriptExpression($this->$fn);
                }
            }
        }

        $this->pluginOptions = TbArray::merge(
            array(
                'source' => $this->source,
                'items' => $this->items,
                'minLength' => $this->minLength
            ),
            $options
        );
    }
405757
function initClient() {
	gapi.client.init({
		apiKey: config.api.google.web.key,
		clientId: config.api.google.web.client_id,
		discoveryDocs: DISCOVERY_DOCS,
		scope: SCOPES
	}).then(function () {
		// Listen for sign-in state changes.
		gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);

		// Handle the initial sign-in state.
		updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());
		authorizeButton.onclick = handleAuthClick;
		signoutButton.onclick = handleSignoutClick;
	}, function(error) {
		appendPre(JSON.stringify(error, null, 2));
	});
}
280504
function (options) {

            var args = arguments;

            // Initialization
            if (args[0] == 'init') {
                defaults = Pilotfish('extend', {}, defaults, options);
                return Pilotfish;
            }

            settings = Pilotfish('extend', {}, defaults, options || {});

            // Welcome message
            if (args[0] == 'welcome') {
                var welcomeSettings = Pilotfish('extend', {}, settings.welcome);
                // If the second argument is a string, assume it is a welcome message
                if (typeof args[1] == 'string') {
                    welcomeSettings.text = args[1];

                // Otherwise its an object that is to override the default welcome settings
                } else if (jQuery.isPlainObject(args[1])) {
                    welcomeSettings = Pilotfish('extend', {}, settings.welcome, args[1]);
                }

                // Allow a url override that forces a first time user
                var urlOverride = location.search.indexOf('pilotfish_usher_welcome') > -1;

                if (urlOverride || ! Pilotfish('session', welcomeSettings.sessionVariable)) {
                    // Display a welcome messgae
                    jQuery(window).load(function () {
                        window.pilotfishUsherWelcomeCalled = true;
                        window.setTimeout(function usherWelcome() {
                            window.pilotfishTimeoutCalled = true;
                            Pilotfish('speaker', welcomeSettings.text, {confirm: true}, function usherWelcomePrompt() {
                                tour(settings);
                            });
                        }, welcomeSettings.delay);
                    });
                    Pilotfish('session', welcomeSettings.sessionVariable, 1);
                }
                Pilotfish('trigger', 'plugins:usher:welcome', {'msg': welcomeSettings.text, 'settings': settings});
                return Pilotfish;
            }

            // Default, show the tour
            tour(settings);

            return Pilotfish;
        }
154878
function INI(options){
  if(typeof options === 'string'){
    var obj = INI.parse(fs.readFileSync(options, 'utf8'));
    for(var k in obj) this[ k ] = obj[ k ];
  }
  if(typeof options === 'object'){
    this.obj = options;
  }
  return this;
}
165561
function init(options){
	options = util._extend({ssl:null, port:12345}, options);
	var serverWorkers = {}; // save main server sockets
	var clientSocket = []; // save local server socket
	var clientOptions = []; // save optioin obj
	var wsServer;
	if(options.ssl)
		wsServer = require('https').createServer(options.ssl);
	else wsServer = require('http').createServer();
	var io = require('socket.io')(wsServer);
	
	if(options.auth)	
	io.set('authorization', function (handshakeData, callback) {
		if(handshakeData.url.match('username='+options.auth.username+'&password='+options.auth.password))
        	callback(null, true); // error first callback style 
        else callback('no auth', false);
    });

	io.on('connection', function(socket){
		// 0. save server sockets & local socket
		socket.on('init', function(data){
			if(data._type == 'localServer'){
				socket._type = 'localServer';
				if(clientSocket.length>0)
					clientSocket.slice(-1)[0].emit('hold');			
				// then handle new one
				clientSocket.push(socket);
				clientOptions.push(data);
				// inform server the new client
				for(i in serverWorkers)
					serverWorkers[i].emit('client', data);
			}else if(data._type == 'server'){
				socket._type = 'server';
				serverWorkers[socket.id] = socket;
			}else{
				// ignore this connection
			}
		})
		// handle req from server, relay data to client
		socket.on('req', function(data){
			if(clientSocket.length > 0){
				data._sid = socket.id;
				clientSocket.slice(-1)[0].emit('req', data)
			}
		})
		// handle res from client, relay the data to the server
		socket.on('res', function(data){
			if(serverWorkers[data._sid])
				serverWorkers[data._sid].emit('res', data);
		});
		socket.on('disconnect', function(reason){
			if(socket._type == 'localServer'){
				var last = false;
				for(i in clientSocket){
					if(socket.id == clientSocket[i].id){
						if(i == clientSocket.length-1)
							last = true;
						clientSocket.splice(i, 1);
						clientOptions.splice(i,1);
						break;
					}
				}
				if(clientSocket.length > 0 && clientOptions.length > 0){
					if(last)
						clientSocket.slice(-1)[0].emit('back');	
					for(i in serverWorkers)
						serverWorkers[i].emit('client', clientOptions.slice(-1)[0]);
				}
				else
					for(i in serverWorkers)
						serverWorkers[i].emit('client', false);
			}
			else if(socket._type == 'server')
				delete serverWorkers[socket.id];
		});
	});
	wsServer.listen(options.port).on('listening', function(){
		options.listening ? options.listening() : noop();
		//console.log('[NLT] Server is ready on port ' + options.port);
	}).on('error', function(e){
		options.error ? options.error(e) : noop();
		//console.log('[NLT] Setup error', e)
	});
}
996014
public function init()
    {
        parent::init();
        $this->clientOptions = false;
        Html::addCssClass($this->options, $this->size);
        Html::addCssClass($this->options, 'material-icons');
    }
32479
public static ClientOptions of(ClientOptions baseOptions, ClientOptions options) {
        // TODO(trustin): Reduce the cost of creating a derived ClientOptions.
        requireNonNull(baseOptions, "baseOptions");
        requireNonNull(options, "options");
        return new ClientOptions(baseOptions, options);
    }
1091281
function init(options) {
    self.email = options.email;
    self.key = options.token;
    self.cloudflareClient = new CloudFlareClient(options.email, options.token);
  }
124122
public function init()
    {
        parent::init();
        Theme::initWidget('button', $this);
        $this->clientOptions = false;
        if($this->type)
            Html::addCssClass($this->options, ['widget_type' => Theme::btnType($this->type)]);
    }
1259487
def init_client(client_id):
    
    if client_id not in drivers:
        drivers[client_id] = init_driver(client_id)
    return drivers[client_id]
229216
public static ClientOptions of(ClientOptions baseOptions, ClientOptionValue<?>... options) {
        // TODO(trustin): Reduce the cost of creating a derived ClientOptions.
        requireNonNull(baseOptions, "baseOptions");
        requireNonNull(options, "options");
        if (options.length == 0) {
            return baseOptions;
        }
        return new ClientOptions(baseOptions, options);
    }
1180941
function config(options) {
    var current = config.current
    Object.assign(current, options)
    api._init(current)
}
681797
def initialize_options(cls):
        
        cls.CONFIG_OPTIONS = cls.CFG.get(cls.CONFIG_PATH, return_type=dict)