Value to use when no region is specified.
509601
def _safe_region(region=None, context=None):
    """"""
    ret = region or settings.get("region")
    context = context or identity
    if not ret:
        # Nothing specified; get the default from the identity object.
        if not context:
            _create_identity()
            context = identity
        ret = context.get_default_region()
    if not ret:
        # Use the first available region
        try:
            ret = regions[0]
        except IndexError:
            ret = ""
    return ret
316314
private static String blankToNull(String value) {
		if (value != null) {
			value = value.trim();
			if (value.equals("")) {
				value = null;
			}
		}
		return value;
	}
15748
public void setEmptyDefault(String iso) {
        if (iso == null || iso.isEmpty()) {
            iso = DEFAULT_COUNTRY;
        }
        int defaultIdx = mCountries.indexOfIso(iso);
        mSelectedCountry = mCountries.get(defaultIdx);
        mCountrySpinner.setSelection(defaultIdx);
    }
598149
function checkExecParamsRegion(region)
{
	var caller = checkExecParamsRegion.caller.name

	if (typeof region != 'object') {
		console.error('Error: region parameter is not an object in: ' + caller);
		return false;
	}

	return true;
}
654220
private void checkForBlank(String value, String name) {
        if (StringUtils.isBlank(value)) {
            throw new IllegalArgumentException(name + " cannot be empty");
        }
    }
600013
function isTrueEmpty(value) {
    if (value === undefined || value === null || value === '') {
        return true;
    }
    if (lodash.isNumber(value)) {
        return isNaN(value);
    }
    return false;
}
1061635
def validate(self, value: LocalizedValue, *_):
        

        if self.null:
            return

        for lang in self.required:
            lang_val = getattr(value, settings.LANGUAGE_CODE)

            if lang_val is None:
                raise IntegrityError('null value in column "%s.%s" violates '
                                     'not-null constraint' % (self.name, lang))
817833
def currentRegion(self):
        
        pos = QtGui.QCursor.pos()
        pos = self.mapFromGlobal(pos)
        for region in self.regions():
            if region.testHovered(pos):
                return region
        return None
845123
public function iFillinTheRegion($field, $value, $region){
        $context = $this->getMainContext();
        $regionObj = $context->getRegionObj($region);
        assertNotNull($regionObj, "Region Object is null");

        $fieldObj = $regionObj->findField($field);
        if (empty($fieldObj)) {
			throw new \Exception(sprintf('The field "%s" was not found in the region "%s" 
				on the page %s', $field, $region, $this->getSession()->getCurrentUrl()));
        }

        $regionObj->fillField($field, $value);
    }
667877
def p_ConstValue_null(p):
  """"""
  p[0] = model.Value(type=model.Value.NULL, value=p[1])
1206966
@Nonnull
  public static String ensureNonNullAndNonEmpty(@Nullable final String value, @Nonnull @Constraint("notEmpty(X)") final String dflt) {
    String result = value;
    if (result == null || result.isEmpty()) {
      assertFalse("Default value must not be empty", assertNotNull("Default value must not be null", dflt).isEmpty());
      result = dflt;
    }
    return result;
  }
667478
def _in_bounds(prop, instance, value):
    """"""
    if (
            (prop.min is not None and value < prop.min) or
            (prop.max is not None and value > prop.max)
    ):
        prop.error(instance, value, extra='Not within allowed range.')
1255483
def _missing_(cls, value):
        """"""
        if not (isinstance(value, int) and 100 <= value <= 659):
            raise ValueError('%r is not a valid %s' % (value, cls.__name__))
        code = str(value)
        kind = KIND.get(code[0], 'Reserved')
        info = INFO.get(code[1], 'Reserved')
        extend_enum(cls, '%s - %s [%s]' % (kind, info, value), value)
        return cls(value)
34696
public static Integer checkNull(Integer value, Integer elseValue) {
        return isNull(value) ? elseValue : value;
    }
95252
def _filter_disabled_regions(contents):
    """"""
    contents = list(contents)

    in_backticks = False
    contents_len = len(contents)

    index = 0
    while index < contents_len:
        character = contents[index]
        if character == "`":
            # Check to see if we should toggle the in_backticks
            # mode here by looking ahead for another two characters.
            if ((index + 2) < contents_len and
                    "".join(contents[index:index + 3]) == "```"):
                in_backticks = not in_backticks
                index += 3
                continue

        if in_backticks:
            contents[index] = " "

        index += 1

    return "".join(contents)
1106372
def discover_region(self, move_x, move_y):
        """"""
        field_list = deque([(move_y, move_x)])

        while len(field_list) != 0:
            field = field_list.popleft()

            (tl_idx, br_idx, region_sum) = self.get_region(field[1], field[0])
            if region_sum == 0:
                self.info_map[field[0], field[1]] = region_sum
                # get surrounding to queue
                region_mat = self.info_map[tl_idx[0]:br_idx[0]+1,
                                           tl_idx[1]:br_idx[1]+1]
                x_list, y_list = np.nonzero(region_mat == 11)

                for x_idx, y_idx in zip(x_list, y_list):
                    field_temp = (x_idx+max(field[0]-1, 0),
                                  y_idx+max(field[1]-1, 0))
                    if field_temp not in field_list:
                        field_list.append(field_temp)
            elif region_sum > 0:
                self.info_map[field[0], field[1]] = region_sum
768936
def native(self, value, context=None):
		""""""
		
		if self.strip and hasattr(value, 'strip'):
			value = value.strip()
		
		if self.none and value == '':
			return None
		
		if self.encoding and isinstance(value, bytes):
			return value.decode(self.encoding)
		
		return value