Returns the DEFAULT value class for a named output.
328985
private static Class<?> getDefaultNamedOutputValueClass(JobContext job) {
		return job.getConfiguration().getClass(DEFAULT_MO_PREFIX + VALUE, null, Object.class);
	}
1203698
private static Object defaultForType(Class<?> type)
    {
        if (!type.isPrimitive()) {
            return null;
        }
        if (type.equals(boolean.class)) {
            return false;
        }
        if (type.equals(long.class)) {
            return (long) 0L;
        }
        if (type.equals(int.class)) {
            return (int) 0;
        }
        if (type.equals(short.class)) {
            return (short) 0;
        }
        if (type.equals(byte.class)) {
            return (byte) 0;
        }
        if (type.equals(char.class)) {
            return (char) '\u0000';
        }
        if (type.equals(float.class)) {
            return (float) 0.0f;
        }
        if (type.equals(double.class)) {
            return (double) 0.0d;
        }
        // should never happen
        throw new IllegalStateException("Unknown primitive type: " + type.getName());
    }
62724
def raw_default(context)
      value = options.fetch(:default)
      return value unless value.is_a?(Proc)

      case value.arity
      when 1 then context.instance_exec(self, &value)
      else context.instance_exec(&value)
      end
    end
79109
public String printDefaultValue() {
        if (setter instanceof Getter) {
            Getter getter = (Getter)setter;
            List<T> defaultValues = getter.getValueList();
            if (defaultValues != null && !defaultValues.isEmpty()) {
                StringBuilder buf = new StringBuilder();
                if (defaultValues.size()>1) {
                    for (T v : defaultValues) {
                        buf.append( buf.length()==0 ? '[' : ',' );
                        buf.append(print(v));
                    }
                    buf.append(']');
                } else {
                    buf.append(print(defaultValues.get(0)));
                }
                return buf.toString();
            }
        }
        return null;
    }
573707
def get_default_value(self):
        
        default = self.default_value
        if isinstance(default, collections.Callable):
            default = default()
        return default
580405
def HasOutputClass(cls, name):
    
    if not isinstance(name, py2to3.STRING_TYPES):
      return False

    return name.lower() in cls._output_classes
756384
def get_header(self, name, default_value=None):
        
        name_lower = name.lower()
        for value in self.headers:
            if value[0].lower() == name_lower:
                return value[1]

        return default_value
386630
function getPropDefaultValue (vm, prop, name) {
	  // no default, return undefined
	  if (!hasOwn(prop, 'default')) {
	    return undefined
	  }
	  var def = prop.default;
	  // warn against non-factory defaults for Object & Array
	  if (isObject(def)) {
	    "development" !== 'production' && warn(
	      'Invalid default value for prop "' + name + '": ' +
	      'Props with type Object/Array must use a factory function ' +
	      'to return the default value.',
	      vm
	    );
	  }
	  // call factory function for non-Function types
	  return typeof def === 'function' && prop.type !== Function
	    ? def.call(vm)
	    : def
	}
503917
public static Primitive getDefaultValue( Class<?> type )
    {
        if ( type == null )
            return Primitive.NULL;
        if ( Boolean.TYPE == type || Boolean.class == type )
            return Primitive.FALSE;
        if ( Character.TYPE == type || Character.class == type )
            return Primitive.ZERO_CHAR;
        if ( Byte.TYPE == type || Byte.class == type )
            return Primitive.ZERO_BYTE;
        if ( Short.TYPE == type || Short.class == type )
            return Primitive.ZERO_SHORT;
        if ( Integer.TYPE == type || Integer.class == type )
            return Primitive.ZERO_INT;
        if ( Long.TYPE == type || Long.class == type )
            return Primitive.ZERO_LONG;
        if ( Float.TYPE == type || Float.class == type )
            return Primitive.ZERO_FLOAT;
        if ( Double.TYPE == type || Double.class == type )
            return Primitive.ZERO_DOUBLE;
        if ( BigInteger.class == type )
            return Primitive.ZERO_BIG_INTEGER;
        if ( BigDecimal.class == type )
            return Primitive.ZERO_BIG_DECIMAL;
        return Primitive.NULL;
    }
1017951
def _get_old_style_getter_deps(cls, prop_name, _getter):  # @NoSelf
        """'"""
        args, _, _, defaults = inspect.getargspec(_getter)

        try:
            idx = args.index(KWARG_NAME_DEPS) - (len(args) - len(defaults))
            # finds the corresponding value
            if idx < 0:
                raise ValueError("In class %s.%s logical OP getter '%s'"
                                 "must have a default value set for "
                                 "argument '%s'" % \
                                 (cls.__module__, cls.__name__,
                                  _getter.__name__, KWARG_NAME_DEPS))
            _deps = defaults[idx]
            # checks types
            if not hasattr(_deps, '__iter__'):
                raise TypeError("In logical OP getter %s.%s.%s "
                                "default value of argument '%s' "
                                "must be an iterable" % \
                                (cls.__module__, cls.__name__,
                                 _getter.__name__, KWARG_NAME_DEPS))

            for dep in _deps:
                if not isinstance(dep, str):
                    raise TypeError("In logical OP getter %s.%s.%s "
                                    "values of argument '%s' "
                                    "must be strings" % \
                                    (cls.__module__, cls.__name__,
                                     _getter.__name__,
                                     KWARG_NAME_DEPS))
        except ValueError:
            _deps = ()

        return _deps
739885
def _get_default(self, obj):
        ''' 

        '''
        if self.name in obj._property_values:
            # this shouldn't happen because we should have checked before _get_default()
            raise RuntimeError("Bokeh internal error, does not handle the case of self.name already in _property_values")

        is_themed = obj.themed_values() is not None and self.name in obj.themed_values()

        default = self.instance_default(obj)

        if is_themed:
            unstable_dict = obj._unstable_themed_values
        else:
            unstable_dict = obj._unstable_default_values

        if self.name in unstable_dict:
            return unstable_dict[self.name]

        if self.property._may_have_unstable_default():
            if isinstance(default, PropertyValueContainer):
                default._register_owner(obj, self)
            unstable_dict[self.name] = default

        return default
1325030
public static String getPrimitiveDefault(Class type) {
        if (type == Boolean.class) {
            return "false";
        }
        if (type == Character.class) {
            return Character.toString((char) 0);
        }
        return "0";
    }
585929
def value(self, data):
        """"""
        value = data.get(self.name)
        if value:
            return int(value)
        return self.default
1194720
def getOutputName(self,name):
        
        val = self.outputNames[name]
        if self.inmemory: # if inmemory was turned on...
            # return virtualOutput object saved with that name
            val = self.virtualOutputs[val]
        return val
493651
def GetDisabledOutputClasses(cls):
    
    for _, output_class in iter(cls._disabled_output_classes.items()):
      yield output_class.NAME, output_class
1212783
def default_value(cls, type_, expr):  # TODO: This function must be moved to api.xx
        
        assert isinstance(type_, symbols.TYPE)
        assert type_.is_basic
        assert check.is_static(expr)

        if isinstance(expr, (symbols.CONST, symbols.VAR)):  # a constant expression like @label + 1
            if type_ in (cls.TYPE(TYPE.float_), cls.TYPE(TYPE.string)):
                syntax_error(expr.lineno, "Can't convert non-numeric value to {0} at compile time".format(type_.name))
                return ['<ERROR>']

            val = Translator.traverse_const(expr)
            if type_.size == 1:  # U/byte
                if expr.type_.size != 1:
                    return ['#({0}) & 0xFF'.format(val)]
                else:
                    return ['#{0}'.format(val)]

            if type_.size == 2:  # U/integer
                if expr.type_.size != 2:
                    return ['##({0}) & 0xFFFF'.format(val)]
                else:
                    return ['##{0}'.format(val)]

            if type_ == cls.TYPE(TYPE.fixed):
                return ['0000', '##({0}) & 0xFFFF'.format(val)]

            # U/Long
            return ['##({0}) & 0xFFFF'.format(val), '##(({0}) >> 16) & 0xFFFF'.format(val)]

        if type_ == cls.TYPE(TYPE.float_):
            C, DE, HL = _float(expr.value)
            C = C[:-1]  # Remove 'h' suffix
            if len(C) > 2:
                C = C[-2:]

            DE = DE[:-1]  # Remove 'h' suffix
            if len(DE) > 4:
                DE = DE[-4:]
            elif len(DE) < 3:
                DE = '00' + DE

            HL = HL[:-1]  # Remove 'h' suffix
            if len(HL) > 4:
                HL = HL[-4:]
            elif len(HL) < 3:
                HL = '00' + HL

            return [C, DE[-2:], DE[:-2], HL[-2:], HL[:-2]]

        if type_ == cls.TYPE(TYPE.fixed):
            value = 0xFFFFFFFF & int(expr.value * 2 ** 16)
        else:
            value = int(expr.value)

        result = [value, value >> 8, value >> 16, value >> 24]
        result = ['%02X' % (v & 0xFF) for v in result]
        return result[:type_.size]
1101735
def defaults(values={}):
    """"""
    if values: return values
    save_types = basestring, int, float, tuple, list, dict, type(None)
    for k, v in globals().items():
        if isinstance(v, save_types) and not k.startswith("_"): values[k] = v
    return values