Increments the current state of \a forVars (prefix) and returns linear index of the current state of indexVars.
960662
public int next() {
        int curIndex = _index;
        // Compute the next index.
        if( _index >= 0 ) {
            int i = _state.length - 1;

            while( i >= 0 ) {
                _index += _sum[i];
                if( ++_state[i] < _ranges[i] )
                    break;
                _index -= _sum[i] * _ranges[i];
                _state[i] = 0;
                i--;
            }

            if( i == -1 )
                _index = -1;
        }
        // Return the current index.
        return curIndex;
    }
833546
private void updateMax(int idx, double v) {
    AtomicLong current = max.getCurrent(idx);
    long m = current.get();
    while (v > Double.longBitsToDouble(m)) {
      if (current.compareAndSet(m, Double.doubleToLongBits(v))) {
        break;
      }
      m = current.get();
    }
  }
664654
def prefixSum(self, i):
        
        sum = 0
        while i > 0:
            sum += self.s[i]
            i -= (i & -i)
        return sum
1173950
def get_current(self):
        
        suffix = self._separator + "%s" % str(self._counter_curr)

        return self._base_name + suffix
1081397
private int getLocalVariableIndex(int i) {
        int index = classMethod.isStatic() ? 0 : 1;
        for (String type : classMethod.getParameters()) {
            if (type.equals(DOUBLE_CLASS_DESCRIPTOR) || type.equals(LONG_CLASS_DESCRIPTOR)) {
                index += 2;
            } else {
                index++;
            }
        }
        return index + i;
    }
1243212
def get_state_variable_from_name(self, variable_name):
        
        return next((v for v in self.state_variables if v.name == variable_name), None)
338491
function () {
            var state = this.state,
                currentPage = state.pages[state.currentPage - 1],
                rowIndex = currentPage.rowIndex,
                prevRow = state.rows[rowIndex - 1];
            return prevRow && prevRow[0] + 1 || state.currentPage;
        }
208831
function incrementIndex (inc, focus) {
    var newIndex,
        key   = focus ? 'focusIndex' : 'selectedIndex',
        index = ctrl[ key ];
    for (newIndex = index + inc;
         ctrl.tabs[ newIndex ] && ctrl.tabs[ newIndex ].scope.disabled;
         newIndex += inc) { /* do nothing */ }

    newIndex = (index + inc + ctrl.tabs.length) % ctrl.tabs.length;

    if (ctrl.tabs[ newIndex ]) {
      ctrl[ key ] = newIndex;
    }
  }
615584
function incrementCounter() {
            for (var i = innerLen-1; i >= innerLen-4; i--) {
                inner[i]++;
                if (inner[i] <= 0xff) return;
                inner[i] = 0;
            }
        }
792473
static int indexOfSerial(final double[] incr, final double v) {
		int index = -1;
		for (int i = 0; i < incr.length && index == -1; ++i) {
			if (incr[i] >= v) {
				index = i;
			}
		}

		return index;
	}
543444
def each
      index = 0
      while index < i_keys.get_length
        key = i_keys.get(index)
        value = i_values.get(index)
        yield key , value
        index = index + 1
      end
      self
    end
1026037
private static boolean incrementLexicographically(
        MutableIntTuple current, IntTuple min, IntTuple max, int index)
    {
        if (index == -1)
        {
            return false;
        }
        int oldValue = current.get(index);
        int newValue = oldValue + 1;
        current.set(index, newValue);
        if (newValue >= max.get(index))
        {
            current.set(index, min.get(index));
            return incrementLexicographically(current, min, max, index-1);
        }
        return true;
    }
566611
function findChangedIndex(prevValue, newValue) {
  var i = 0,
      j = 0;
  var prevLength = prevValue.length;
  var newLength = newValue.length;

  while (prevValue[i] === newValue[i] && i < prevLength) {
    i++;
  } //check what has been changed from last


  while (prevValue[prevLength - 1 - j] === newValue[newLength - 1 - j] && newLength - j > i && prevLength - j > i) {
    j++;
  }

  return {
    start: i,
    end: prevLength - j
  };
}
168034
function index(a, fn) {
  let i, l;
  for (i = 0, l = a.length; i < l; i++) {
    if (fn(a[i]))
      return i;
  }
  return -1;
}
1177513
private VarDef getNextVarDef()
    {
    if( nextVarDef_ == null)
      {
      // Still traversing current VarSet?
      if( nextVarSet_ != null && nextVarSet_.hasNext())
        {
        // Yes, return next VarSet member.
        nextVarDef_ = nextVarSet_.next();
        }
      else
        {
        // No, get next variable, skipping any empty VarSet.
        nextVarSet_ = null;
        Iterator<IVarDef> members = null;
        IVarDef varDef;
        for( varDef = null;

             varDefs_.hasNext()
               && (members = (varDef = varDefs_.next()).getMembers()) != null
               && !members.hasNext();

             varDef = null);

        nextVarDef_ =
          // No VarDef left to visit?
          varDef == null? null :

          // Next variable is a VarDef?
          members == null? (VarDef) varDef :

          // No, start traversing next VarSet.
          (nextVarSet_ = new VarDefIterator( members)).next();

        }
      }

    return nextVarDef_;
    }
1070431
function interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
    var different = bindingUpdated4(v0, v1, v2, v3);
    different = bindingUpdated4(v4, v5, v6, v7) || different;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
            stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + i6 + stringify$1(v7) + suffix :
        NO_CHANGE;
}
381474
def incrementor(start=0, step=1):
  
  def fxn(_):
    """Returns the next value in the sequnce defined by [start::step)"""
    nonlocal start
    rval = start
    start += step
    return rval
  return fxn