Basically the same as rails submit_default_value
514568
def button_default_value
      obj = object.respond_to?(:to_model) ? object.to_model : object
      key = obj ? (obj.persisted? ? :edit : :new) : :submit
      model = if obj.class.respond_to?(:model_name)
        obj.class.model_name.human
      else
        object_name.to_s.humanize
      end

      defaults = []
      defaults << "helpers.submit.#{object_name}.#{key}"
      defaults << "#{key.to_s.humanize} #{model}"

      I18n.t(defaults.shift, :default => defaults)
    end
517498
function (name, default_value) {
	if (l_states.hasOwnProperty(name) === false) {
		LOG.warn('[' + name + '] initialized to: ' + default_value, 'handlers.system');
		l_states[name] = default_value;
	}
}
1244518
def default_backend=(value)
      raise ArgumentError, "default_backend must be a symbol!" unless value.is_a? Symbol

      unless @backends.keys.include? value
        raise ArgumentError, "Unregistered backend cannot be set as default!"
      end

      @default_backend = value
    end
155625
def default_action_block
      proc do
        begin
          record = if resource.singular
                    parent_model = resource.parent.model.find(parent_resource_id)
                    parent_model.send resource.name
                  else
                    record = model.find(params[:id])
                  end

          record.update(instance_eval(&@strong_params))
          body record.reload
        rescue ActionController::ParameterMissing => error
          body error.message
          status :bad_request
        end
      end
    end
900566
def get_or_save_default(self, key, default_value):
        
        val = self.get_or_none(key)
        if val is None:
            self.update(key, default_value)
            val = default_value
        return val
332436
function defaultValue (req) {
  return (req.body && req.body._csrf) ||
    (req.query && req.query._csrf) ||
    (req.headers['csrf-token']) ||
    (req.headers['xsrf-token']) ||
    (req.headers['x-csrf-token']) ||
    (req.headers['x-xsrf-token'])
}
182126
def evaluate_default_value(val)
      if val.respond_to?(:call)
        val.call
      elsif val.duplicable?
        val.dup
      else
        val
      end
    end
492100
def set_default_url_option_for_request?
      RailsLocaleDetection.set_default_url_option === true || RailsLocaleDetection.set_default_url_option == :always || RailsLocaleDetection.set_default_url_option == :explicitly && params[locale_key].present?
    end
498932
def get_if_present(self, name, default=None):
        
        if not self.processed_data:
            raise exceptions.FormNotProcessed('The form data has not been processed yet')

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

        return default
768615
def apply_default(name)
      unless attributes.key?(name)
        if field = fields[name]
          default = field.eval_default(self)
          unless default.nil? || field.lazy?
            attribute_will_change!(name)
            attributes[name] = default
          end
        end
      end
    end
904987
def default_params(h = {})
      raise ArgumentError, 'Default params must be an object which responds to #to_hash' unless h.respond_to?(:to_hash)
      default_options[:default_params] ||= {}
      default_options[:default_params].merge!(h)
    end
60391
protected function isASubmittedFormInRequest($value = Doozr_Form_Service_Constant::DEFAULT_SUBMITTED)
    {
        $requestQueryParameter = $this->getRequest()->getQueryParams();
        $requestBody           = $this->getRequest()->getParsedBody();
        $fieldname             = $this->getFieldnameSubmitted();

        if (
            true === isset($requestQueryParameter[$fieldname]) &&
            $this->getScope() === $requestQueryParameter[$fieldname]
        ) {
            $value = true;
        } elseif (
            true === isset($requestBody[$fieldname]) &&
            $this->getScope() === $requestBody[$fieldname]
        ) {
            $value = true;
        }

        return $value;
    }
193937
def default_value(tag)
      name, vr = LIBRARY.name_and_vr(tag)
      conversion = VALUE_CONVERSION[vr]
      case conversion
      when :to_i then return 0
      when :to_f then return 0.0
      else
        # Assume type is string and return an empty string:
        return ''
      end
    end
874203
def p_DefaultValue_string(p):
  """"""
  p[0] = model.Value(type=model.Value.STRING, value=p[1])
494439
def default_value
      match = if definition =~ /timestamp|datetime/i
                /default '?(.+[^'])'?/i.match(definition)
              else
                /default '?(\w+)'?/i.match(definition)
              end

      return unless match

      match[1].downcase != 'null' ? match[1] : nil
    end
586507
function _defaultValues(payload) {
  if (!payload.host)  { payload.host = hostname; }
  if (!payload.time)  { payload.time = Math.round(new Date().getTime()/1000); }
  if (typeof payload.metric !== "undefined" && payload.metric !== null) {
    payload.metric_f = payload.metric;
    delete payload.metric;
  }
  return payload;
}
1179630
def submit_btn(self, value, success=None):
        """"""
        self.press("css=input[value='{}']".format(value))
        if success is not None:
            assert self.is_available(*success)