<pre>
Use this operation to enable/disable ntpd.
</pre>
811
public static ntp_sync update(nitro_service client, ntp_sync resource) throws Exception
	{
		resource.validate("modify");
		return ((ntp_sync[]) resource.update_resource(client))[0];
	}
253174
public static ntp_server delete(nitro_service client, ntp_server resource) throws Exception
	{
		resource.validate("delete");
		return ((ntp_server[]) resource.delete_resource(client))[0];
	}
973244
public static function enable()
    {
        Builder::macro(self::MACRO_METHOD, function (Fluent $builder, $createdAt = 'createdAt', $updatedAt = 'updatedAt', $type = 'dateTime') {
            $builder->{$type}($createdAt)->timestampable()->onCreate();
            $builder->{$type}($updatedAt)->timestampable()->onUpdate();
        });
    }
1053461
def disable_service(conn, service='ceph'):
    
    if is_systemd(conn):
        # Without the check, an error is raised trying to disable an
        # already disabled service
        if is_systemd_service_enabled(conn, service):
            remoto.process.run(
                conn,
                [
                    'systemctl',
                    'disable',
                    '{service}'.format(service=service),
                ]
            )
57881
public void disableTill(String streamKey, long expireAtTimestamp) throws QiniuException {
        String path = encodeKey(streamKey) + "/disabled";
        String body = String.format("{\"disabledTill\":%d}", expireAtTimestamp);
        post(path, body, null);
    }
832992
public static base_response disable(nitro_service client, Long td) throws Exception {
		nstrafficdomain disableresource = new nstrafficdomain();
		disableresource.td = td;
		return disableresource.perform_operation(client,"disable");
	}
913553
@Override
	public synchronized void enable(boolean on)
	{
		if (!on)
		{
			dump(true);
			cached = null;
		}

		enabled = on;
	}
684774
public void setEnabled(boolean enabled) {
		if (enabled && engine == null) {
			return;
		}

		if (this.enabled != enabled) {
			this.enabled = enabled;
			this.changed = true;
		}
	}
19586
private static void setServiceEnabled(final XMPPConnection connection,
            final boolean isEnabled) {
        ServiceDiscoveryManager manager = ServiceDiscoveryManager
                .getInstanceFor(connection);

        List<String> namespaces = new ArrayList<>();
        namespaces.addAll(Arrays.asList(NAMESPACE));
        namespaces.add(DataPacketExtension.NAMESPACE);
        if (!IBB_ONLY) {
            namespaces.add(Bytestream.NAMESPACE);
        }

        for (String namespace : namespaces) {
            if (isEnabled) {
                manager.addFeature(namespace);
            } else {
                manager.removeFeature(namespace);
            }
        }
    }
233643
@Deprecated
  public final NettyChannelBuilder enableKeepAlive(boolean enable, long keepAliveTime,
      TimeUnit delayUnit, long keepAliveTimeout, TimeUnit timeoutUnit) {
    if (enable) {
      return keepAliveTime(keepAliveTime, delayUnit)
          .keepAliveTimeout(keepAliveTimeout, timeoutUnit);
    }
    return keepAliveTime(KEEPALIVE_TIME_NANOS_DISABLED, TimeUnit.NANOSECONDS);
  }
624298
public static br_enable enable(nitro_service client, br_enable resource) throws Exception
	{
		return ((br_enable[]) resource.perform_operation(client, "enable"))[0];
	}
401809
public static base_response disable(nitro_service client, service resource) throws Exception {
		service disableresource = new service();
		disableresource.name = resource.name;
		disableresource.delay = resource.delay;
		disableresource.graceful = resource.graceful;
		return disableresource.perform_operation(client,"disable");
	}
1249658
public void enableDTD(boolean enable) {
        //允许DTD会有XXE漏洞，关于XXE漏洞：https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet
        if (enable) {
            //不允许DTD
            setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
            setFeature("http://xml.org/sax/features/external-general-entities", false);
            setFeature("http://xml.org/sax/features/external-parameter-entities", false);
        } else {
            setFeature("http://apache.org/xml/features/disallow-doctype-decl", false);
            setFeature("http://xml.org/sax/features/external-general-entities", true);
            setFeature("http://xml.org/sax/features/external-parameter-entities", true);
        }
    }
433272
public AutofitHelper setEnabled(boolean enabled) {
        if (mEnabled != enabled) {
            mEnabled = enabled;

            if (enabled) {
                mTextView.addTextChangedListener(mTextWatcher);
                mTextView.addOnLayoutChangeListener(mOnLayoutChangeListener);

                autofit();
            } else {
                mTextView.removeTextChangedListener(mTextWatcher);
                mTextView.removeOnLayoutChangeListener(mOnLayoutChangeListener);

                mTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
            }
        }
        return this;
    }
1102492
public function enable()
    {
        if ($this->driver !== null) {
            $this->pool->setDriver($this->driver);
        }
        $this->enabled = true;
    }
799962
def enable_lldp(self, port_name, is_ncb=True, is_nb=False):
        
        reply = None
        if is_ncb:
            reply = self.run_lldptool(["-L", "-i", port_name, "-g", "ncb",
                                       "adminStatus=rxtx"])
        elif is_nb:
            reply = self.run_lldptool(["-L", "-i", port_name, "-g", "nb",
                                       "adminStatus=rxtx"])
        else:
            LOG.error("Both NCB and NB are not selected to "
                      "enable LLDP")
            return False
        if reply is None:
            return False
        exp_str = "adminstatus=rxtx"
        if exp_str in reply.replace(" ", "").lower():
            return True
        else:
            return False
1078564
@Override
    public void setMonitorEnabled(boolean enabled) {
        if(enabled) {
            // create and start background monitor
            if (monitor == null) {
                monitor = new AdcGpioProviderBase.ADCMonitor();
                monitor.start();
            }
        }
        else{
            try {
                // if a monitor is running, then shut it down now
                if (monitor != null) {
                    // shutdown monitoring thread
                    monitor.shutdown();
                    monitor = null;
                }
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }