! @brief Reads TPIU capabilities.
        
        Currently this method simply checks whether the TPIU supports SWO in asynchronous
        UART mode. The result of this check is available via the has_swo_uart property.
192163
def init(self):
        
        devid = self.ap.read32(self.address + TPIU.DEVID)
        self._has_swo_uart = (devid & TPIU.DEVID_NRZ_MASK) != 0
954242
def serial(self, may_block=True):
        
        if not self.capabilities.have_serial_number():
            raise yubikey_base.YubiKeyVersionError("Serial number unsupported in YubiKey %s" % self.version() )
        return self._read_serial(may_block)
901562
private void checkAndAddCapabilities(AnalysisEngineDescription aed) {
        for (Capability capability : aed.getAnalysisEngineMetaData()
                .getCapabilities()) {
            for (TypeOrFeature input : capability.getInputs())
                if (!outputTypes.contains(input.getName()))
                    LOG.error("AnalysisEngine "
                            + aed.getAnnotatorImplementationName()
                            + " is missing input @TypeCapability: "
                            + input.getName());
        }
        for (Capability capability : aed.getAnalysisEngineMetaData()
                .getCapabilities()) {
            for (TypeOrFeature output : capability.getOutputs()) {
                // LOG.info("add @TypeCapability: " + output.getName());
                outputTypes.add(output.getName());
            }
        }
    }
1024890
def is_enabled():
    
    output = subprocess.check_output(['ufw', 'status'],
                                     universal_newlines=True,
                                     env={'LANG': 'en_US',
                                          'PATH': os.environ['PATH']})

    m = re.findall(r'^Status: active\n', output, re.M)

    return len(m) >= 1
483993
public boolean isMemStubEnabled() {
        Object memStubEnabled = this.getJointCompilationOptions().get(MEM_STUB);

        if (null == memStubEnabled) {
            return false;
        }

        return "true".equals(memStubEnabled.toString());
    }
1288860
public function check_capabilities() {
		if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
			return false;
		}

		if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) {
			return false;
		}

		return true;
	}
244672
def supported_operations(self):
        
        return tuple(op for op in backend.CAM_OPS
                     if self._abilities.operations & op)
527557
def capability(self):
        
        code, data, capabilities = (
            self.__send_command("CAPABILITY", withcontent=True))
        if code == "OK":
            return capabilities
        return None
27644
private function hasSttyAvailable(): bool
    {
        if (null !== self::$stty) {
            return self::$stty;
        }

        exec('stty 2>&1', $output, $exitcode);

        return self::$stty = 0 === $exitcode;
    }
1182461
def detectMidpCapable(self):
        
        return UAgentInfo.deviceMidp in self.__userAgent \
            or UAgentInfo.deviceMidp in self.__httpAccept
714239
public boolean checkConformance(BtrPlaceTree t, List<BtrpOperand> ops) {
        //Arity error
        if (ops.size() != getParameters().length) {
            t.ignoreError("'" + pretty(ops) + "' cannot be casted to '" + getSignature() + "'");
            return false;
        }

        //Type checking
        for (int i = 0; i < ops.size(); i++) {
            BtrpOperand o = ops.get(i);
            ConstraintParam<?> p = params[i];
            if (o == IgnorableOperand.getInstance()) {
                return false;
            }
            if (!p.isCompatibleWith(t, o)) {
                t.ignoreError("'" + pretty(ops) + "' cannot be casted to '" + getSignature() + "'");
                return false;
            }
        }
        return true;
    }
1285452
def _get_tpm_capability(self):
        
        tpm_values = {"NotPresent": False,
                      "PresentDisabled": True,
                      "PresentEnabled": True}
        try:
            tpm_state = self._get_bios_setting('TpmState')
        except exception.IloCommandNotSupportedError:
            tpm_state = "NotPresent"
        tpm_result = tpm_values[tpm_state]
        return tpm_result
742850
def _addr_hooked_or_syscall(self, addr):
        

        return self.project.is_hooked(addr) or self.project.simos.is_syscall_addr(addr)
205815
def enable_spi(self):
        
        config = self._interface_configuration(CONFIG_QUERY)
        return config == CONFIG_SPI_GPIO or config == CONFIG_SPI_I2C
371091
def check_sig(script_sig, pubkey, script_code, sig_version)
      return false if script_sig.empty?
      script_sig = script_sig.htb
      hash_type = script_sig[-1].unpack('C').first
      sig = script_sig[0..-2]
      sighash = tx.sighash_for_input(input_index, script_code, hash_type: hash_type,
                                     amount: amount, sig_version: sig_version)
      key_type = pubkey.start_with?('02') || pubkey.start_with?('03') ? Key::TYPES[:compressed] : Key::TYPES[:uncompressed]
      key = Key.new(pubkey: pubkey, key_type: key_type)
      key.verify(sig, sighash)
    end
638482
def has_capabilities(self, *caps):
		
		for cap in caps:
			if isinstance(cap, WNetworkClientCapabilities) is True:
				cap = cap.value
			if WCapabilitiesHolder.has_capabilities(self, cap) is False:
				return False
		return True
401638
def sense_ttb(self, target):
        
        log.debug("polling for NFC-B technology")

        if target.brty not in ("106B", "212B", "424B"):
            message = "unsupported bitrate {0}".format(target.brty)
            raise nfc.clf.UnsupportedTargetError(message)

        self.chipset.in_set_rf(target.brty)
        self.chipset.in_set_protocol(self.chipset.in_set_protocol_defaults)
        self.chipset.in_set_protocol(initial_guard_time=20, add_sof=1,
                                     check_sof=1, add_eof=1, check_eof=1)

        sensb_req = (target.sensb_req if target.sensb_req else
                     bytearray.fromhex("050010"))

        log.debug("send SENSB_REQ " + hexlify(sensb_req))
        try:
            sensb_res = self.chipset.in_comm_rf(sensb_req, 30)
        except CommunicationError as error:
            if error != "RECEIVE_TIMEOUT_ERROR":
                log.debug(error)
            return None

        if len(sensb_res) >= 12 and sensb_res[0] == 0x50:
            log.debug("rcvd SENSB_RES " + hexlify(sensb_res))
            return nfc.clf.RemoteTarget(target.brty, sensb_res=sensb_res)