Set offset to the given index.
@param {number} startIndex The start index to set.
@param {number} offset The offset of the tokens.
@param {number} baseline The line of the base offset.
@returns {void}
10147
function setOffsetToIndex(startIndex, offset, baseline) {
            const loc = sourceCode.getLocFromIndex(startIndex)
            setOffsetToLoc(loc, offset, baseline)
        }
102960
function findTokenIndex(tokens, offset) {
  var min = 0;
  var max = tokens.length - 1;

  while (min <= max) {
    var ptr = ((min + max) / 2) | 0;
    var token = tokens[ptr];
    if (endOf(token) <= offset) {
      min = ptr + 1;
    } else if (startOf(token) > offset) {
      max = ptr - 1;
    } else {
      return ptr;
    }
  }

  return ptr;
}
782345
function CInt(base, offset, isSet) {
  this.base = base || 0;
  this.offset = offset || 0;
  this.isSet = isSet || false;
}
474278
public void setStart(int index, Date value)
   {
      set(selectField(AssignmentFieldLists.CUSTOM_START, index), value);
   }
639815
public function offsetSet($offset, $value)
    {
        dd($value);
        if(is_null($offset)) {
            $this->{$this->index} = $value;
            $this->index++;
        } else {
            $this->$offset = $value;
        }
    }
946038
function (baseLine, latLngs) {
			var maxD = 0,
				maxPt = null,
				newPoints = [],
				i, pt, d;

			for (i = latLngs.length - 1; i >= 0; i--) {
				pt = latLngs[i];
				d = this.getDistant(pt, baseLine);

				if (d > 0) {
					newPoints.push(pt);
				} else {
					continue;
				}

				if (d > maxD) {
					maxD = d;
					maxPt = pt;
				}
			}

			return { maxPoint: maxPt, newPoints: newPoints };
		}
69054
public void gotoNextBlockStart(int index, int xor) { // goto block start pos
        if (xor < (1 << 10)) { // level = 1
            display0 = (Object[]) display1[(index >> 5) & 31];
        } else if (xor < (1 << 15)) { // level = 2
            display1 = (Object[]) display2[(index >> 10) & 31];
            display0 = (Object[]) display1[0];
        } else if (xor < (1 << 20)) { // level = 3
            display2 = (Object[]) display3[(index >> 15) & 31];
            display1 = (Object[]) display2[0];
            display0 = (Object[]) display1[0];
        } else if (xor < (1 << 25)) { // level = 4
            display3 = (Object[]) display4[(index >> 20) & 31];
            display2 = (Object[]) display3[0];
            display1 = (Object[]) display2[0];
            display0 = (Object[]) display1[0];
        } else if (xor < (1 << 30)) { // level = 5
            display4 = (Object[]) display5[(index >> 25) & 31];
            display3 = (Object[]) display4[0];
            display2 = (Object[]) display3[0];
            display1 = (Object[]) display2[0];
            display0 = (Object[]) display1[0];
        } else { // level = 6
            throw new IllegalArgumentException();
        }
    }
140734
public void set(long startIndex, long endIndex)
    {
        if (endIndex <= startIndex) return;

        int startWord = (int) (startIndex >> 6);

        // since endIndex is one past the end, this is index of the last
        // word to be changed.
        int endWord = expandingWordNum(endIndex - 1);

        long startmask = -1L << startIndex;
        long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex
                                          // due to wrap

        if (startWord == endWord)
        {
            bits[startWord] |= (startmask & endmask);
            return;
        }

        bits[startWord] |= startmask;
        Arrays.fill(bits, startWord + 1, endWord, -1L);
        bits[endWord] |= endmask;
    }
1161090
public void setBaselineFinishText(int baselineNumber, String value)
   {
      set(selectField(TaskFieldLists.BASELINE_FINISHES, baselineNumber), value);
   }
521110
public void put(int index, Scriptable start, Object value) {
        if (start == this) {
            synchronized (this) {
                indexedProps.put(new Integer(index), value);
            }
        } else {
            start.put(index, start, value);
        }
    }
204080
function setter (index, value) {
  debug('setting array[%d]', index)
  var size = this.constructor.BYTES_PER_ELEMENT
  var baseType = this.constructor.type
  var offset = size * index
  var end = offset + size
  var buffer = this.buffer
  if (buffer.length < end) {
    debug('reinterpreting buffer from %d to %d', buffer.length, end)
    buffer = _ref.reinterpret(buffer, end)
  }
  // TODO: DRY with getter()

  _ref.set(buffer, offset, value, baseType)
  return value
}
1168697
def baseline_offset_attribute(styles={})
      return nil if styles.nil?
      return nil if styles[:baseline_offset].nil?
      value = styles[:baseline_offset]
      return 0 if [0, :default].include?(value)
      return nil unless value.respond_to?(:to_f)
      return value.to_f
    end
573921
function setStartPoint() {
            if (!startPoint || !startPoint.tagName || (startPoint.tagName.toLowerCase() !== 'td' && startPoint.tagName.toLowerCase() !== 'th')) {
                console.error('Impossible to identify start Cell point.', startPoint);
                return;
            }
            _startPoint.colPos = startPoint.cellIndex;
            if (!startPoint.parentElement || !startPoint.parentElement.tagName || startPoint.parentElement.tagName.toLowerCase() !== 'tr') {
                console.error('Impossible to identify start Row point.', startPoint);
                return;
            }
            _startPoint.rowPos = startPoint.parentElement.rowIndex;
        }
910066
function(offset) {
        var index = this._indexArray,
            l = this.index_pointer;
        index[0 + l] = 0 + offset;
        index[1 + l] = 1 + offset;
        index[2 + l] = 2 + offset;
        index[3 + l] = 1 + offset;
        index[4 + l] = 2 + offset;
        index[5 + l] = 3 + offset;
        this.index_pointer += 6;
    }
719173
function(node) {
    if (node) {
        this.start = {
            line: node.start.line,
            column: node.start.column
        };
        this.end = {
            line: node.end.line,
            column: node.end.column
        };
        this.offset = {
            start: node.start.offset,
            end: node.end.offset
        };
    }
}
229068
public void addLineOffset(int offset) {
        if (numLines >= lineNumberMap.length) {
            // Grow the line number map.
            int capacity = lineNumberMap.length * 2;
            int[] newLineNumberMap = new int[capacity];
            System.arraycopy(lineNumberMap, 0, newLineNumberMap, 0, lineNumberMap.length);
            lineNumberMap = newLineNumberMap;
        }

        lineNumberMap[numLines++] = offset;
    }
1276848
private void setContentOffset(int startX, int startY, Translation translation, int movementAmount) {

        if (translation == Translation.VERTICAL) {

            // center the X around the start point
            int originalStartX = startX;
            startX -= contentParams.width / 2;

            // if Y is in the lower half, we want it to go up, otherwise, leave it the same
            boolean moveDown = true;
            if (startY + contentParams.height + FINGER_SIZE > screenHeight) {
                startY -= contentParams.height;
                moveDown = false;

                if (movementAmount > 0) {
                    movementAmount *= -1;
                }
            }

            // when moving the peek view below the finger location, we want to offset it a bit to the right
            // or left as well, just so the hand doesn't cover it up.
            int extraXOffset = 0;
            if (moveDown) {
                extraXOffset = DensityUtils.toPx(getContext(), 200);
                if (originalStartX > screenWidth / 2) {
                    extraXOffset = extraXOffset * -1; // move it a bit to the left
                }
            }

            // make sure they aren't outside of the layout bounds and move them with the movementAmount
            // I move the x just a bit to the right or left here as well, because it just makes things look better
            startX = ensureWithinBounds(startX + extraXOffset, screenWidth, contentParams.width);
            startY = ensureWithinBounds(startY + movementAmount, screenHeight, contentParams.height);

        } else {

            // center the Y around the start point
            startY -= contentParams.height / 2;

            // if X is in the right half, we want it to go left
            if (startX + contentParams.width + FINGER_SIZE > screenWidth) {
                startX -= contentParams.width;
                if (movementAmount > 0) {
                    movementAmount *= -1;
                }
            }

            // make sure they aren't outside of the layout bounds and move them with the movementAmount
            startX = ensureWithinBounds(startX + movementAmount, screenWidth, contentParams.width);
            startY = ensureWithinBounds(startY, screenHeight, contentParams.height);
        }

        // check to see if the system bars are covering anything

        int statusBar = NavigationUtils.getStatusBarHeight(getContext());
        if (startY < statusBar) { // if it is above the status bar and action bar
            startY = statusBar + 10;
        } else if (NavigationUtils.hasNavBar(getContext()) &&
                startY + contentParams.height > screenHeight - NavigationUtils.getNavBarHeight(getContext())) {
            // if there is a nav bar and the popup is underneath it
            startY = screenHeight - contentParams.height - NavigationUtils.getNavBarHeight(getContext()) - DensityUtils.toDp(getContext(), 10);
        } else if (!NavigationUtils.hasNavBar(getContext()) && startY + contentParams.height > screenHeight) {
            startY = screenHeight - contentParams.height - DensityUtils.toDp(getContext(), 10);
        }

        // set the newly computed distances from the start and top sides
        setDistanceFromLeft(startX);
        setDistanceFromTop(startY);
    }