place : num numkan
326407
def parse_place
      s0 = @current_pos
      s1 = parse_num
      if s1 != :failed
        s2 = parse_numkan
        if s2 != :failed
          @reported_pos = s0
          s0 = { "x" => s1, "y" => s2 }
        else
          @current_pos = s0
          s0 = :failed
        end
      else
        @current_pos = s0
        s0 = :failed
      end
      if s0 == :failed
        s0 = @current_pos
        if match_regexp("同") != :failed
          match_str("　")
          @reported_pos = s0
          s0 = { "same" => true }
        else
          @current_pos = s0
          s0 = :failed
        end
      end
      s0
    end
368744
function (num) {
      var s = '';

      while (num >= 0) {
        s = String.fromCharCode(num % 26 + 97) + s;
        num = Math.floor(num / 26) - 1;
      }

      return s.toUpperCase();
    }
998851
def add(self, num):
        
        try:
            val = self.value() + num
        except:
            val = num

        chunk = self.mfac.value()
        if val % chunk > 0:
            if num > 0:
                val = chunk*(val // chunk + 1)
            elif num < 0:
                val = chunk*(val // chunk)

        val = max(self._min(), min(self._max(), val))
        self.set(val)
1344476
public void setKnotPosition(int n, int x) {
		xKnots[n] = ImageMath.clamp(x, 0, 255);
		sortKnots();
		rebuildGradient();
	}
725323
private void writeNumber(PrintWriter pw, NumberFormat numFormat, Number num){
		if( num.doubleValue() == Math.round(num.doubleValue()) ){
			// Integer
			if( null != numFormat ){
				pw.print( numFormat.format(num.intValue()) );
			} else {
				pw.print( num.intValue() );
			}
			
		} else {
			if( null != numFormat ){
				pw.print( numFormat.format(num) );
			} else {
				pw.print( num );
			}
		}
	}
735818
static function num2week($num, $two = true)
    {
        if ($num == '6')
        {
            $num = '日';
        }
        else
        {
            $num = Tool::num2han($num + 1);
        }
        if ($two)
        {
            return self::WEEK_TWO . $num;
        }
        else
        {
            return self::WEEK_THREE . $num;
        }
    }
285221
def baseN(num, b, numerals="0123456789abcdefghijklmnopqrstuvwxyz"):
    
    return ((num == 0) and numerals[0]) or \
        (baseN(num // b, b, numerals).lstrip(numerals[0]) + numerals[num % b])
508162
function ru__plural(word, num) {
        var forms = word.split('_');
        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
    }
688460
function(num) {
    if(loading) {
      // Avoid sending too many requests to get new cells.
      return;
    }
    var fragment = document.createDocumentFragment();
    var cells = [];
    var images = [0, 286, 143, 270, 143, 190, 285, 152, 275, 285, 285, 128, 281, 242, 339, 236, 157, 286, 259, 267, 137, 253, 127, 190, 190, 225, 269, 264, 272, 126, 265, 287, 269, 125, 285, 190, 314, 141, 119, 274, 274, 285, 126, 279, 143, 266, 279, 600, 276, 285, 182, 143, 287, 126, 190, 285, 143, 241, 166, 240, 190];
    for(var j = 0; j < num; j++) {
      var key = Math.floor(Math.random() * 60) + 1;
      var cell = document.createElement('div');
      cell.className = 'cell pending';
      cell.tagLine = 'demo picture ' + key;
      cells.push(cell);
      front(cellTemplate, { 'title': 'demo picture ' + key, 'src': key, 'height': images[key], 'width': 190 }, cell);
      fragment.appendChild(cell);
    }
    // Faking network latency.
    setTimeout(function() {
      loading = false;
      cellsContainer.appendChild(fragment);
      adjustCells(cells);
    }, 2000);
  }
84781
public static function toWords($p_num, $p_locale, $p_currency, $p_decimal)
    {
        $nW = new \FreeFW\Tools\NumbersWords\Number();
        return $nW->toCurrency($p_num, $p_locale, $p_currency, $p_decimal);
    }
701190
def fmt_num(value, places = 2)
      return nil if value.blank?

      value =
          if value.respond_to?(:to_f)
            value.to_f
          else
            nil
          end

      return nil unless value.is_a?(::Float)

      "%0.#{places}f" % value.round(places)
    end
585804
private void mmuli(int n, double[] A, double[] B, double[] C) {
        for (int i = 0; i < n * n; i++) {
            C[i] = 0;
        }

        for (int j = 0; j < n; j++) {
            int jn = j * n;
            for (int k = 0; k < n; k++) {
                int kn = k * n;
                double bkjn = B[k + jn];
                for (int i = 0; i < n; i++) {
                    C[i + jn] += A[i + kn] * bkjn;
                }
            }
        }
    }
278681
function (num) {
      switch (typeof num) {
        case 'number':
          return num;
        case 'string':
          if (!isNaN(num)) {
            return num.indexOf('.') > -1 ? parseFloat(num) : parseInt(num, 10);
          }
      }

      return num;
    }
750569
def assort( num, unit )
      super
      case unit
      when /\A日/u
        @day  ||= num.to_i
      when /\A時/u
        @hour ||= num.to_f
      when /\A分/u
        @min  ||= num.to_i
      end
    end
2029
function placeBit(&$array, $NR, $NC, $r, $c, $p, $b) {
        if ($r < 0) {
            $r += $NR;
            $c += 4 - (($NR + 4) % 8);
        }
        if ($c < 0) {
            $c += $NC;
            $r += 4 - (($NC + 4) % 8);
        }

        $array[$r * $NC + $c] = ($p << 3) + $b;
    }
462279
function mltNum(arr, num) {
  arr.forEach((singlet, i) => {
    arr[i] *= num; 
  });
}
797020
function amf0encBool(num) {
    var buf = new Buffer(2);
    buf.writeUInt8(0x01, 0);
    buf.writeUInt8((num ? 1 : 0), 1);
    return buf;
}