Activate HK2 guice bridge.
967440
public void activate() {
        GuiceBridge.getGuiceBridge().initializeGuiceBridge(locator);
        final GuiceIntoHK2Bridge guiceBridge = locator.getService(GuiceIntoHK2Bridge.class);
        guiceBridge.bridgeGuiceInjector(injector);
    }
29919
public void onActivate() {
		menu = getContextMenu();
		mapWidget.setContextMenu(menu);

		if (maxBoundsDisplayed) {
			VectorLayer layer = getFeatureTransaction().getLayer();
			GeometryFactory factory = mapWidget.getMapModel().getGeometryFactory();
			LinearRing hole = factory.createLinearRing(new Bbox(layer.getLayerInfo().getMaxExtent()));
			LinearRing shell = factory.createLinearRing(mapWidget.getMapModel().getMapView().getMaxBounds());
			Polygon polygon = factory.createPolygon(shell, new LinearRing[] { hole });

			maxExtent = new GfxGeometry("maxExtent");
			maxExtent.setGeometry(polygon);
			maxExtent.setStyle(new ShapeStyle("#000000", .6f, "#990000", 1, 2));
			mapWidget.registerWorldPaintable(maxExtent);
		}
	}
693724
public function activate()
    {
        $app = Facade::getFacadeApplication();
        $db = $app->make('database')->connection();
        $db->executeQuery('update SystemCaptchaLibraries set sclIsActive = 0');
        $db->executeQuery('update SystemCaptchaLibraries set sclIsActive = 1 where sclHandle = ?', [$this->sclHandle]);
        $this->sclIsActive = 1;
    }
1204161
def add_bridge(name, datapath_type=None):
    '''  '''
    log('Creating bridge {}'.format(name))
    cmd = ["ovs-vsctl", "--", "--may-exist", "add-br", name]
    if datapath_type is not None:
        cmd += ['--', 'set', 'bridge', name,
                'datapath_type={}'.format(datapath_type)]
    subprocess.check_call(cmd)
801555
@Activate
    protected void activate(BundleContext ctx, Map<String, Object> properties) {

        SibTr.entry(tc, CLASS_NAME + "activate", properties);

        this.properties = properties;
        this.bundleLocation = ctx.getBundle().getLocation();
        populateDestinationPermissions();
        runtimeSecurityService.modifyMessagingServices(this);

        SibTr.exit(tc, CLASS_NAME + "activate");

    }
73711
def install_pdb_handler():
  """"""

  import signal
  import pdb

  def handler(_signum, _frame):
    pdb.set_trace()

  signal.signal(signal.SIGQUIT, handler)
49712
def attach(self, gui):
        """"""
        super(CorrelogramView, self).attach(gui)
        self.actions.add(self.toggle_normalization, shortcut='n')
        self.actions.separator()
        self.actions.add(self.set_bin, alias='cb')
        self.actions.add(self.set_window, alias='cw')
1137283
def activateAaPdpContextAccept(ProtocolConfigurationOptions_presence=0,
                               GprsTimer_presence=0):
    """"""
    a = TpPd(pd=0x8)
    b = MessageType(mesType=0x51)  # 01010001
    c = LlcServiceAccessPointIdentifier()
    d = QualityOfService()
    e = MobileId()
    f = PacketDataProtocolAddress()
    g = RadioPriorityAndSpareHalfOctets()
    packet = a / b / c / d / e / f / g
    if ProtocolConfigurationOptions_presence is 1:
        i = ProtocolConfigurationOptions(ieiPCO=0x27)
        packet = packet / i
    if GprsTimer_presence is 1:
        j = GprsTimer(ieiGT=0x29)
        packet = packet / j
    return packet
239126
def build_interface(iface, iface_type, enabled, **settings):
    '''
    
    '''

    iface_type = iface_type.lower()

    if iface_type not in _IFACE_TYPES:
        _raise_error_iface(iface, iface_type, _IFACE_TYPES)

    if iface_type == 'slave':
        settings['slave'] = 'yes'
        if 'master' not in settings:
            msg = 'master is a required setting for slave interfaces'
            log.error(msg)
            raise AttributeError(msg)

    elif iface_type == 'vlan':
        settings['vlan'] = 'yes'
        __salt__['pkg.install']('vlan')

    elif iface_type == 'pppoe':
        settings['pppoe'] = 'yes'
        if not __salt__['pkg.version']('ppp'):
            inst = __salt__['pkg.install']('ppp')

    elif iface_type == 'bond':
        if 'slaves' not in settings:
            msg = 'slaves is a required setting for bond interfaces'
            log.error(msg)
            raise AttributeError(msg)

    elif iface_type == 'bridge':
        if 'ports' not in settings:
            msg = (
                'ports is a required setting for bridge interfaces on Debian '
                'or Ubuntu based systems'
            )
            log.error(msg)
            raise AttributeError(msg)
        __salt__['pkg.install']('bridge-utils')

    if iface_type in ['eth', 'bond', 'bridge', 'slave', 'vlan', 'pppoe']:
        opts = _parse_settings_eth(settings, iface_type, enabled, iface)

    if iface_type in ['source']:
        opts = _parse_settings_source(settings, iface_type, enabled, iface)

    if 'test' in settings and settings['test']:
        return _read_temp_ifaces(iface, opts[iface])

    ifcfg = _write_file_ifaces(iface, opts[iface], **settings)

    if iface_type == 'pppoe':
        _write_file_ppp_ifaces(iface, opts[iface])

    # ensure lines in list end with newline, so difflib works
    return [item + '\n' for item in ifcfg]
596774
public void register(BridgeFactory bridgeFactory) {
        Class<?> nearType = bridgeFactory.getNearType();
        Class<?> farType = bridgeFactory.getFarType();
        logger.trace(display(nearType) + ": " + display(farType));
        nearToFarType.put(nearType, farType);
        farToNearType.put(farType, nearType);
        nearTypeToFactory.put(nearType, bridgeFactory);
        farTypeToFactory.put(farType, bridgeFactory);
        if (accessors.containsKey(nearType)) {
            for (FactoryAccessor<?> accessor : accessors.get(nearType)) {
                injectInto(accessor);
            }
            accessors.remove(nearType);
        }
    }
1257494
def activateAaPdpContextReject(ProtocolConfigurationOptions_presence=0):
    """"""
    a = TpPd(pd=0x8)
    b = MessageType(mesType=0x52)  # 01010010
    c = SmCause()
    packet = a / b / c
    if ProtocolConfigurationOptions_presence is 1:
        d = ProtocolConfigurationOptions(ieiPCO=0x27)
        packet = packet / d
    return packet
1271358
def register_plugin(self):
        """"""
        main = self.main
        main.add_dockwidget(self)

        #if getattr(main.projectexplorer, 'sig_project_closed', False):
        #    pe = main.projectexplorer
        #    pe.condamanager = self
        #    pe.sig_project_closed.connect(self.project_closed)
        #    pe.sig_project_loaded.connect(self.project_loaded)
        #    self.sig_worker_ready.connect(self._after_load)
        #    self.sig_environment_created.connect(pe.sig_environment_created)

        self.sig_channels_updated.connect(self._save_channel_settings)
141970
def activate(self, auth, codetype, code, defer=False):
        

        return self._call('activate', auth, [codetype, code], defer)
239213
def setUp(self, port, soc, input):
        '''
        
        '''
        name = soc.getOperationName()
        bop = port.getBinding().operations.get(name)
        op = port.getBinding().getPortType().operations.get(name)

        assert op is not None, 'port has no operation %s' %name
        assert bop is not None, 'port has no binding operation %s' %name

        self.input = input
        self.op = op
        self.bop = bop
850575
@Trivial
    protected void activate(ComponentContext context) throws Exception {
        Dictionary<String, ?> props = context.getProperties();
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "activate", props);

        String sourcePID = (String) props.get("ibm.extends.source.pid"); // com.ibm.ws.jca.jmsQueueConnectionFactory_gen_3f3cb305-4146-41f9-8a57-b231d09013e6
        configElementName = sourcePID == null ? "connectionFactory" : sourcePID.substring(15, sourcePID.indexOf('_', 15));

        cfInterfaceNames = props.get("creates.objectClass");
        mcfImplClassName = (String) props.get(CONFIG_PROPS_PREFIX + "managedconnectionfactory-class");
        jndiName = (String) props.get(JNDI_NAME);
        id = (String) props.get("config.displayId");

        componentContext = context;
        isServerDefined = true; // We don't support app-defined connection factories yet

        //Integer trlevel = props.get("transactionSupport");
        if (props.get("transactionSupport") != null)
            connectionFactoryTransactionSupport = TransactionSupportLevel.valueOf((String) props.get("transactionSupport"));

        // filter out actual config properties for the connection factory
        for (Enumeration<String> keys = props.keys(); keys.hasMoreElements();) {
            String key = keys.nextElement();
            if (key.length() > CONFIG_PROPS_PREFIX_LENGTH && key.charAt(CONFIG_PROPS_PREFIX_LENGTH - 1) == '.' && key.startsWith(CONFIG_PROPS_PREFIX)) {
                String propName = key.substring(CONFIG_PROPS_PREFIX_LENGTH);
                if (propName.indexOf('.') < 0 && propName.indexOf('-') < 0)
                    properties.put(propName, props.get(key));
            }
        }

        bootstrapContextRef.activate(context);

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "activate");
    }
524801
def enable(iface):
    '''
    
    '''
    if is_enabled(iface):
        return True
    cmd = ['netsh', 'interface', 'set', 'interface',
           'name={0}'.format(iface),
           'admin=ENABLED']
    __salt__['cmd.run'](cmd, python_shell=False)
    return is_enabled(iface)
788346
def _activate_outbound(self):
        """"""
        m = Message()
        m.add_byte(cMSG_NEWKEYS)
        self._send_message(m)
        block_size = self._cipher_info[self.local_cipher]["block-size"]
        if self.server_mode:
            IV_out = self._compute_key("B", block_size)
            key_out = self._compute_key(
                "D", self._cipher_info[self.local_cipher]["key-size"]
            )
        else:
            IV_out = self._compute_key("A", block_size)
            key_out = self._compute_key(
                "C", self._cipher_info[self.local_cipher]["key-size"]
            )
        engine = self._get_cipher(
            self.local_cipher, key_out, IV_out, self._ENCRYPT
        )
        mac_size = self._mac_info[self.local_mac]["size"]
        mac_engine = self._mac_info[self.local_mac]["class"]
        # initial mac keys are done in the hash's natural size (not the
        # potentially truncated transmission size)
        if self.server_mode:
            mac_key = self._compute_key("F", mac_engine().digest_size)
        else:
            mac_key = self._compute_key("E", mac_engine().digest_size)
        sdctr = self.local_cipher.endswith("-ctr")
        self.packetizer.set_outbound_cipher(
            engine, block_size, mac_engine, mac_size, mac_key, sdctr
        )
        compress_out = self._compression_info[self.local_compression][0]
        if compress_out is not None and (
            self.local_compression != "zlib@openssh.com" or self.authenticated
        ):
            self._log(DEBUG, "Switching on outbound compression ...")
            self.packetizer.set_outbound_compressor(compress_out())
        if not self.packetizer.need_rekey():
            self.in_kex = False
        # we always expect to receive NEWKEYS now
        self._expect_packet(MSG_NEWKEYS)