Set Server Side Activation

 @param activation[Time] Activation date and time

 @return [void]
516987
def server_side_activation=(activation)
      raise JSS::InvalidDataError, 'Activation must be a Time' unless activation.is_a? Time
      @server_side_limitations[:activation] = activation
      @need_to_update = true
    end
431977
protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
         findAndReplaceSimpleElement(innerCount, root, "family", value.getFamily(), null);
         findAndReplaceSimpleElement(innerCount, root, "arch", value.getArch(), null);
         findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null);
      }
   }
472751
def check_activation(self, contacts):
        
        now = time.time()
        was_is_in_effect = self.is_in_effect
        self.is_in_effect = (self.start_time <= now <= self.end_time)

        # Raise a log entry when we get in the downtime
        if not was_is_in_effect and self.is_in_effect:
            self.enter(contacts)

        # Same for exit purpose
        if was_is_in_effect and not self.is_in_effect:
            self.exit(contacts)
680976
def activate():
    

    env_path = '/'.join([deployment_root(),'env',env.project_fullname])

    if not exists(env_path):
        print env.host,"ERROR: The version",env.project_version,"does not exist at"
        print env_path
        sys.exit(1)

    active = active_version()
    servers = webserver_list()

    if env.patch or active <> env.project_fullname:
        for s in servers:
            stop_webserver(s)
        
    if not env.patch and active <> env.project_fullname:
        
        if env.verbosity:
            print env.host, "ACTIVATING version", env_path
        
        if not env.nomigration:
            sync_db()
        
        #south migration
        if 'south' in env.INSTALLED_APPS and not env.nomigration and not env.manualmigration:
            migration()
            
        if env.manualmigration or env.MANUAL_MIGRATION: manual_migration()
      
        #activate sites
        activate_sites = [''.join([d.name.replace('.','_'),'-',env.project_version,'.conf']) for d in domain_sites()]
        if 'apache2' in get_packages():
            site_paths = ['/etc/apache2','/etc/nginx']
        else:
            site_paths = ['/etc/nginx']
        
        #disable existing sites
        for path in site_paths:
            for site in _ls_sites('/'.join([path,'sites-enabled'])):
                if site not in activate_sites:
                    sudo("rm %s/sites-enabled/%s"% (path,site))
        
        #activate new sites
        for path in site_paths:
            for site in activate_sites:
                if not exists('/'.join([path,'sites-enabled',site])):
                    sudo("chmod 644 %s" % '/'.join([path,'sites-available',site]))
                    sudo("ln -s %s/sites-available/%s %s/sites-enabled/%s"% (path,site,path,site))
                    if env.verbosity:
                        print " * enabled", "%s/sites-enabled/%s"% (path,site)
        
        #delete existing symlink
        ln_path = '/'.join([deployment_root(),'env',env.project_name])
        run('rm -f '+ln_path)
        #run post deploy hooks
        post_exec_hook('post_deploy')
        #activate
        run('ln -s %s %s'% (env_path,ln_path))

  
        if env.verbosity:
            print env.host,env.project_fullname, "ACTIVATED"
    else:
        if env.verbosity and not env.patch:
            print env.project_fullname,"is the active version"

    if env.patch or active <> env.project_fullname:
        for s in servers:
            start_webserver(s)
        print
    return
730267
@Override
    public void activate(RuleBlock ruleBlock) {
        if (FuzzyLite.isDebugging()) {
            FuzzyLite.logger().log(Level.FINE, "Activation: {0} {1}",
                    new String[]{getClass().getName(), parameters()});
        }
        TNorm conjunction = ruleBlock.getConjunction();
        SNorm disjunction = ruleBlock.getDisjunction();
        TNorm implication = ruleBlock.getImplication();

        PriorityQueue<Rule> rulesToActivate = new PriorityQueue<Rule>(
                numberOfRules, new Ascending());

        for (Rule rule : ruleBlock.getRules()) {
            rule.deactivate();

            if (rule.isLoaded()) {
                double activationDegree = rule.activateWith(conjunction, disjunction);
                if (Op.isGt(activationDegree, 0.0)) {
                    rulesToActivate.offer(rule);
                }
            }
        }

        int activated = 0;
        while (!rulesToActivate.isEmpty() && activated++ < numberOfRules) {
            rulesToActivate.poll().trigger(implication);
        }
    }
1079627
def check_and_log_tp_activation_change(self):
        
        for timeperiod in self.conf.timeperiods:
            brok = timeperiod.check_and_log_activation_change()
            if brok:
                self.add(brok)
1355893
def activate(self):
        

        raise NotImplementedError("{0} | '{1}' must be implemented by '{2}' subclasses!".format(
            self.__class__.__name__, self.activate.__name__, self.__class__.__name__))
1370978
public function activateInvitation()
    {
        // Remove the invitation token.
        $this->getInvitationToken()->delete();

        // Update the user table with the needed details.
        $this->updateLogin();
        $this->trackTime('activated_at');

        // Set the user's status to be correct.
        $this->setStatus(Status::ACTIVE);
    }
974794
@Activate
    protected void activate(Map<String, Object> properties) {
        final String methodName = "activate";
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, methodName, "Entry Count: " + ++JDBCMBeanRuntime.counterActivate);
        if (trace && tc.isEventEnabled())
            Tr.event(tc, className + methodName, properties);
        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, methodName, "Normal Exit");

    }
1266417
public function actionActivate ()
		{
			if (Yii::$app->request->isAjax)
			{
				$post = Yii::$app->request->post();
				$page = Page::findOne($post[ 'id' ]);
				$page->updateAttributes([ 'active' => $page->active ? 0 : 1 ]);

				echo $page->active;
			}
			Yii::$app->end();
		}
365078
@Override
    public void activate() throws InterruptedException, CouldNotPerformException {
        manageLock.lockWrite(this);
        try {
            validateInitialization();
            logger.debug("Activate AbstractControllerServer for: " + this);
            setAvailabilityState(ACTIVATING);
            assert serverWatchDog != null;
            assert informerWatchDog != null;
            serverWatchDog.activate();
            informerWatchDog.activate();
        } finally {
            manageLock.unlockWrite(this);
        }
    }
6657
def customer_active?(code = nil)
      subscription = customer_subscription(code)
      if subscription[:canceledDatetime] && subscription[:canceledDatetime] <= Time.now
        false
      else
        true
      end
    end
1359485
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public void setActivateOnItemClick(boolean activateOnItemClick) {
        // When setting CHOICE_MODE_SINGLE, ListView will automatically
        // give items the 'activated' state when touched.

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            mGridView.setChoiceMode(activateOnItemClick ? ListView.CHOICE_MODE_SINGLE
                    : ListView.CHOICE_MODE_NONE);
        }
    }
883747
public function activate()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/activate/');
        $this->deserialize($data);
    }
1031875
def activate(self, key):
        
        url = self._base + 'user/activate'
        r = requests.get(url, params={
            'activation_key': key
        })
        r.raise_for_status()
1010156
def activate(self, page=None):
        
        page = page or ''

        if '://' in page:
            self._iface.activate_overlay_url(page)

        else:
            self._iface.activate_overlay_game(page)
828735
def activate_vacation(self, endtime: datetime, temperature: float):
        
        data = {
            "endtime": endtime.strftime("%Y_%m_%d %H:%M"),
            "temperature": temperature,
        }
        return self._restCall("home/heating/activateVacation", json.dumps(data))