# Returns a Boolean.
551735
static function isAbsolute($path)
    {
        if (realpath($path) === $path) {
            return true;
        }

        if (empty($path)) {
            return false;
        }

        # Absolute Path (Unix) or Absolute UNC Path.
        if ($path[0] === '/' or $path[0] === '\\') {
            return true;
        }

        # If the path starts with a drive letter or "\\" (Windows):
        if (static::isWindows() and preg_match('#^([a-z]\:)?\\\\{1,2}#i', $path)) {
            return true;
        }
        return false;
    }
1166729
def get_bool_attr(self, name):
    
    val = self.get_attr(name)
    return val is not None and val.lower() in ("true", name)
27878
def parse_bool(name, value)
      if ['1', 'true', 'enabled'].include?(value.downcase)
        true
      elsif ['0', 'false'].include?(value.downcase)
        false
      else
        raise ArgumentError.new("#{value} is not a valid boolean for #{name.to_s.upcase}")
      end
    end
68751
def get_boolean(self, name):
        
        for interface in self.all_interfaces:
            if isinstance(interface, VlanInterface):
                if any(vlan for vlan in interface.interfaces
                       if getattr(vlan, name)):
                    return True
            else:
                if getattr(interface, name):
                    return True
        return False
1295813
public Boolean asBooleanObj() {
		if (current == null)
			return null;
		if (current instanceof Boolean)
			return (Boolean) current;
		return null;
	}
117900
def get_bool(self, key, default=None):
        
        v = self.get(key, default)
        if v != default:
            v = v.strip().lower()
            if v == 'true':
                v = True
            elif v == 'false':
                v = False
            elif default is None:
                raise RuntimeError("invalid bool string: %s" % v)
            else:
                v = default
        return v
171916
def Bool(value: "__builtins__.bool", annotations: Annotations = None) -> bool.Bool:
        
        raw = z3.BoolVal(value)
        return Bool(raw, annotations)
324905
def getBool(t):
    
    b = c_int()
    if PL_get_long(t, byref(b)):
        return bool(b.value)
    else:
        raise InvalidTypeError("bool")
842150
def getbool(self, key, **kwargs):
        

        def _string_to_bool(s):
            if isinstance(s, str):
                if s.strip().lower() in ('true', 't', '1'): return True
                elif s.strip().lower() in ('false', 'f', '0', 'None', 'null', ''): return False

                raise ValueError('Unable to get boolean value of "{}".'.format(s))
            #end if

            return bool(s)
        #end def

        return self.get(key, cast_func=_string_to_bool, **kwargs)
674857
public Boolean getAsBoolean() {
		if (value instanceof String) {
			return Boolean.parseBoolean((String)value);
		}
		return (Boolean)value;
	}
933464
def boolValue(self):
        
        if self.lastValue == 1 or self.lastValue == "active":
            self._key = 1
            self._boolKey = True
        else:
            self._key = 0
            self._boolKey = False
        return self._boolKey
695181
public static function booleanValue($s)
    {
        if (is_bool($s)) {
            return $s; // it's already boolean (not a string)
        }
        // otherwise assume it's something like "true" or "t"
        $trimmed = strtolower(trim($s));

        return (boolean) in_array($trimmed, self::$TRUE_VALUES);
    }
354273
@Override
    public boolean asBoolean() {
        final Class<?> callerClass = ReflectionHelper.getDirectCallerClass();
        return evaluateSingeValue(Boolean.TYPE, callerClass);
    }
1074501
public boolean booleanValue()
    {
        final String value = getInternal(null, false);
        if (value == null) {
            return false;
        }
        return toBoolean(value);
    }
1327979
def boolean(value):
    
    if isinstance(value, bool):
        return value

    if value == "":
        return False

    return strtobool(value)
439586
def get_bool_value(self, section, option, default=True):
        """"""
        try:
            return self.parser.getboolean(section, option)
        except NoOptionError:
            return bool(default)
213591
public function getBoolean($key)
    {
        try {
            $result = $this->get(self::BOOLEAN, $key);
            if (!settype($result, 'boolean')) {
                return false;
            }
        } catch (\Exception $e) {
            return false;
        }
        return $result;
    }