value can be between 0 and 359
343913
def set_heading(self, value):
        """"""
        return self.write(request.SetHeading(self.seq, value))
1032654
def ratio(value, decimal_places=0, failure_string='N/A'):
    
    try:
        f = float(value)
    except ValueError:
        return failure_string
    return _saferound(f, decimal_places) + ':1'
11490
def use_value(self, value):
        """"""
        if self.check_value(value):
            return value
        return self.convert_value(value)
627342
def value(self):
        
        if self.buffer:
            return np.quantile(self.buffer, self.quantile)
        else:
            return 0.0
1025100
function (value, from) {
    var len = this.length >>> 0;

    from = Number(from) || 0;
    from = Math[from < 0 ? 'ceil' : 'floor'](from);

    if (from < 0) {
      from = Math.max(from + len, 0);
    }

    for (; from < len; from++) {
      if (from in this && this[from] === value) {
        return from;
      }
    }

    return -1;
  }
778108
private Double zeroIsNull(Double value)
   {
      if (value != null && value.doubleValue() == 0)
      {
         value = null;
      }
      return value;
   }
116466
def red(self, value):
        """"""
        if value != self._red and \
           isinstance(value, int):
            self._red = value
1367818
function coerceValue(value) {

    let numValue = coerceNumber(value);

    if (numValue === value) {
        return coerceDate(value);
    }

    return numValue;
}
599436
function (item) {                                                                            // 233
  for (var i = 0; i < builtinConverters.length; i++) {                                                               // 234
    var converter = builtinConverters[i];                                                                            // 235
    if (converter.matchObject(item)) {                                                                               // 236
      return converter.toJSONValue(item);                                                                            // 237
    }                                                                                                                // 238
  }                                                                                                                  // 239
  return undefined;                                                                                                  // 240
}
292918
private final void zeroPaddingNumber(int value, int minDigits, int maxDigits, StringBuffer buffer)
    {
        // Optimization for 1, 2 and 4 digit numbers. This should
        // cover most cases of formatting date/time related items.
        // Note: This optimization code assumes that maxDigits is
        // either 2 or Integer.MAX_VALUE (maxIntCount in format()).
        try {
            if (zeroDigit == 0) {
                zeroDigit = ((DecimalFormat)numberFormat).getDecimalFormatSymbols().getZeroDigit();
            }
            if (value >= 0) {
                if (value < 100 && minDigits >= 1 && minDigits <= 2) {
                    if (value < 10) {
                        if (minDigits == 2) {
                            buffer.append(zeroDigit);
                        }
                        buffer.append((char)(zeroDigit + value));
                    } else {
                        buffer.append((char)(zeroDigit + value / 10));
                        buffer.append((char)(zeroDigit + value % 10));
                    }
                    return;
                } else if (value >= 1000 && value < 10000) {
                    if (minDigits == 4) {
                        buffer.append((char)(zeroDigit + value / 1000));
                        value %= 1000;
                        buffer.append((char)(zeroDigit + value / 100));
                        value %= 100;
                        buffer.append((char)(zeroDigit + value / 10));
                        buffer.append((char)(zeroDigit + value % 10));
                        return;
                    }
                    if (minDigits == 2 && maxDigits == 2) {
                        zeroPaddingNumber(value % 100, 2, 2, buffer);
                        return;
                    }
                }
            }
        } catch (Exception e) {
        }

        numberFormat.setMinimumIntegerDigits(minDigits);
        numberFormat.setMaximumIntegerDigits(maxDigits);
        numberFormat.format((long)value, buffer, DontCareFieldPosition.INSTANCE);
    }
828193
public static function to360Range($value)
    {
        if ($value > 360) {
            return $value * 1.0 - floor($value / 360) * 360;
        } elseif ($value < 0) {
            return $value * 1.0 + (floor(-$value / 360) + 1) * 360;
        }
        return $value;
    }
1173183
public static void int8(byte[] target, int idx, long value) {
    target[idx + 0] = (byte) (value >>> 56);
    target[idx + 1] = (byte) (value >>> 48);
    target[idx + 2] = (byte) (value >>> 40);
    target[idx + 3] = (byte) (value >>> 32);
    target[idx + 4] = (byte) (value >>> 24);
    target[idx + 5] = (byte) (value >>> 16);
    target[idx + 6] = (byte) (value >>> 8);
    target[idx + 7] = (byte) value;
  }
971590
function isValidLatitude(value) {
    if (value !== null && value !== undefined) {
        if (!isNumber(value)){return false;}
        else if (value > 90 || value < -90) {
            return false;
        }
    }
    return true;
}
1021290
public function second($value = null)
    {
        if ($value !== null) {
            if ($value > 59 || $value < 0) {
                $this->second = 0;
            } else {
                $this->second = $value;
            }
        }
        return $this->second;
    }
376824
def u8(self, name, value=None, align=None):
        """"""
        self.uint(1, name, value, align)
874791
function (val) {
            var rv = false;

            if (JS.isNumber(val)) {
                rv = val >= 0 && val < 100;
            }

            return rv;
        }
157743
def sub(value, arg):
    """"""
    try:
        nvalue, narg = handle_float_decimal_combinations(
            valid_numeric(value), valid_numeric(arg), '-')
        return nvalue - narg
    except (ValueError, TypeError):
        try:
            return value - arg
        except Exception:
            return ''