int加减

@param string|string $filed
@param integer $num
@return int
@throws \Exception
424171
public function updateOne($filed, $num = 1) {
        $sql = array();
        foreach ((array)$filed as $key => $item) {
            if (is_numeric($key)) {
                $sql[] = "`$item` = `$item` ".$this->_getNumber($num);
            } else {
                $sql[] = "`$key` = `$key` ".$item;
            }
        }
        return $this->update($sql);
    }
521685
public function batchSize($num)
    {
        $this->batchSize = (integer) $num;
        $this->riakCommandCursor->batchSize($num);

        return $this;
    }
125928
public function addNumber($n)
    {
        $this->validateNumber($n);
        $this->value[] = $n;
        $this->components ++;
    }
963431
public static function append(string $filename, string $content): int
    {
        return file_put_contents($filename, $content, FILE_APPEND);
    }
139373
public static function ceil($num, int $precision=0) {
		ref\format::ceil($num, $precision);
		return $num;
	}
363592
public function appendNum($bits, $num)
    {
        if ($bits == 0)
            return 0;

        $b = QRbitstream::newFromNum($bits, $num);

        if(is_null($b))
            return -1;

        $ret = $this->append($b);
        unset($b);

        return $ret;
    }
623803
public void add(int num, int[] indices) {
        for (int i = 0; i < indices.length; ++i)
            indices[i] += num;
    }
1053631
def add_int(self, n):
        
        self.packet.write(struct.pack('>I', n))
        return self
1243809
public function invertm($num, $mod)
    {
        $num = $this->input($num);
        $mod = $this->input($mod);

        $x = '1';
        $y = '0';
        $num1 = $mod;

        do {
            $tmp = bcmod($num, $num1);

            $q = bcdiv($num, $num1);

            $num = $num1;

            $num1 = $tmp;

            $tmp = bcsub($x, bcmul($y, $q));

            $x = $y;

            $y = $tmp;

        } while (bccomp($num1, '0'));

        if (bccomp($x, '0') < 0) {
            $x = bcadd($x, $mod);
        }

        if (substr($num, 0, 1) === '-') {
            $x = bcsub($mod, $x);
        }

        return $x;
    }
507206
public function addField($n, $defaults = []) : Field
    {
        if (!isset($defaults['aggregate']) && !isset($defaults['concat']) && !isset($defaults['expr'])) {
            throw new Exception([
                'Aggregate field requires "aggregate", "concat" or "expr" specified to hasMany()->addField()',
                'field'    => $n,
                'defaults' => $defaults,
            ]);
        }

        $defaults['aggregate_relation'] = $this;

        $field_n = isset($defaults['field']) ? $defaults['field'] : $n;
        $field = isset($defaults['field']) ? $defaults['field'] : null;

        if (isset($defaults['concat'])) {
            $defaults['aggregate'] = $this->owner->dsql()->groupConcat($field_n, $defaults['concat']);
            $defaults['read_only'] = false;
            $defaults['never_save'] = true;
        }

        if (isset($defaults['expr'])) {
            $cb = function () use ($defaults, $field) {
                $r = $this->refLink();

                return $r->action('field', [$r->expr(
                    $defaults['expr'],
                    isset($defaults['args']) ? $defaults['args'] : null
                ), 'alias'=>$field]);
            };
            unset($defaults['args']);
        } elseif (is_object($defaults['aggregate'])) {
            $cb = function () use ($defaults, $field) {
                return $this->refLink()->action('field', [$defaults['aggregate'], 'alias'=>$field]);
            };
        } elseif ($defaults['aggregate'] == 'count' && !isset($defaults['field'])) {
            $cb = function () use ($defaults, $field) {
                return $this->refLink()->action('count', ['alias'=>$field]);
            };
        } elseif (in_array($defaults['aggregate'], ['sum', 'avg', 'min', 'max', 'count'])) {
            $cb = function () use ($defaults, $field_n) {
                return $this->refLink()->action('fx0', [$defaults['aggregate'], $field_n]);
            };
        } else {
            $cb = function () use ($defaults, $field_n) {
                return $this->refLink()->action('fx', [$defaults['aggregate'], $field_n]);
            };
        }

        $e = $this->owner->addExpression($n, array_merge([$cb], $defaults));

        return $e;
    }
372916
public function addInteger($field, $errorMsg = null, $emptyIsOk = true)
    {
        $const = ($emptyIsOk) ? self::VALID_INTEGER : self::VALID_INTEGER_REQUIRED;
        $this->addRequired($field, $errorMsg, $const);
    }
466140
public function increase($fields, $where, float $diff = 1): int
    {
        return intval(self::crease('+', $fields, $where, $diff));
    }
1252206
def add(self, num):
        
        self.index = max(0, min(len(self.allowed)-1, self.index+num))
        self.set(self.allowed[self.index])
250984
public static void dumpNumberToFile(final Path filePath, final long num) throws IOException {
    try (final BufferedWriter writer = Files
        .newBufferedWriter(filePath, StandardCharsets.UTF_8)) {
      writer.write(String.valueOf(num));
    } catch (final IOException e) {
      log.error("Failed to write the number {} to the file {}", num, filePath, e);
      throw e;
    }
  }
518602
public static function addMillenium($ts = null, $num = 1)
	{
		return sfTime::add($ts, $num, sfTime::MILLENIUM);
	}
171538
function addNum(arr, num, index = 0) {
  if (arr[index] == undefined) arr[index] = 0;
  arr[index] += num;
}
11069
public function increment($num = 1)
    {
        $this->_progress = min(max(0, $this->_progress + $num), $this->_total);

        return $this;
    }