///////////// Push / Pop / Shift / Unshift ///////////////
962158
public function append($items)
	{
		foreach( (array) $items as $key => $item ) 
		{
			array_push($this->attributes, $item);
		}

		return $this;
	}
592005
def _ilshift(self, n):
        """"""
        assert 0 < n <= self.len
        self._append(Bits(n))
        self._truncatestart(n)
        return self
11527
def delete_shift(id, opts = {})
      data, _status_code, _headers = delete_shift_with_http_info(id, opts)
      return data
    end
739169
function _lshift($shift)
    {
        if ($shift == 0) {
            return;
        }

        $num_digits = (int) ($shift / self::$base);
        $shift %= self::$base;
        $shift = 1 << $shift;

        $carry = 0;

        for ($i = 0; $i < count($this->value); ++$i) {
            $temp = $this->value[$i] * $shift + $carry;
            $carry = self::$base === 26 ? intval($temp / 0x4000000) : ($temp >> 31);
            $this->value[$i] = (int) ($temp - $carry * self::$baseFull);
        }

        if ($carry) {
            $this->value[count($this->value)] = $carry;
        }

        while ($num_digits--) {
            array_unshift($this->value, 0);
        }
    }
304248
boolean shift(State source)
    {
        if (!source.can_shift())
        {
            return false;
        }

        this.copy(source);
        stack.add(this.buffer);
        refresh_stack_information();
        ++this.buffer;

        this.last_action = ActionFactory.make_shift();
        this.previous = source;
        return true;
    }
544775
def _shift(tokens):
    """"""
    after = tokens.peek(n=1, skip=_is_comment, drop=True)
    tok = tokens._buffer.popleft()
    return tok[0], tok[1], tok[2], after[0]
262821
function() {
            if ( $ ) {
                Array.prototype.unshift.apply( arguments, [true, {}] );
                return $.extend.apply( $, arguments );
            }
            else {
                return UTIL.createMerge.apply( this, arguments );
            }
        }
1324646
function unstashString(param, stash) {
  if (!/^:[a-zA-Z][\w.]+$/.test(param)) {
    return param.replace(/([^\\])(:[a-zA-Z][\w.]+)/g, function (param, prefix, prop) {
      return prefix + prop.replace(/:[a-zA-Z][\w.]+/g, function (match) {
        return unstashString(match, stash)
      })
    }).replace(/\\(:[a-zA-Z][\w.]+)/g, '$1')
  }

  var name = param.slice(param.indexOf(':') + 1).split('.')[0]
  var pointer = stash[name]
  var params = param.match(/\.\w+/g)

  if (params === null) {
    return pointer
  }

  for (var j = 0; j < params.length; j++) {
    pointer = pointer[params[j].slice(1)]
  }

  return pointer
}
283101
func leftShift(a *decimal, k uint) {
	delta := leftcheats[k].delta
	if prefixIsLessThan(a.d[0:a.nd], leftcheats[k].cutoff) {
		delta--
	}

	r := a.nd         // read index
	w := a.nd + delta // write index
	n := 0

	// Pick up a digit, put down a digit.
	for r--; r >= 0; r-- {
		n += (int(a.d[r]) - '0') << k
		quo := n / 10
		rem := n - 10*quo
		w--
		if w < len(a.d) {
			a.d[w] = byte(rem + '0')
		} else if rem != 0 {
			a.trunc = true
		}
		n = quo
	}

	// Put down extra digits.
	for n > 0 {
		quo := n / 10
		rem := n - 10*quo
		w--
		if w < len(a.d) {
			a.d[w] = byte(rem + '0')
		} else if rem != 0 {
			a.trunc = true
		}
		n = quo
	}

	a.nd += delta
	if a.nd >= len(a.d) {
		a.nd = len(a.d)
	}
	a.dp += delta
	trim(a)
}
467068
def safe_lshift(a, b):
    """"""
    if b > MAX_SHIFT:
        raise RuntimeError("Invalid left shift, max left shift is {}".format(MAX_SHIFT))
    return a << b
340154
public function shift() {
        if (empty($this->output)) {
            $this->output = array_reverse($this->input);
            $this->input = array();
        }
        if (empty($this->output)) {
            return NULL;
        }
        return array_pop($this->output);
    }
1212693
function Unswitch(settings) {
  const buttonState = {};
  let axesPosition = 8;

  for (let i = buttonMappings.length - 1; i >= 0; i -= 1) {
    buttonState[buttonMappings[i]] = { pressed: false };
  }

  this.update = () => {
    const gamepads = navigator.getGamepads();
    for (let i = Object.keys(gamepads).length - 1; i >= 0; i -= 1) {
      if (gamepads[i] && gamepads[i].id && gamepads[i].id.indexOf(settings.side) !== -1) {
        this.observe(gamepads[i]);
        break;
      }
    }
  };

  this.observe = (pad) => {
    const { buttons, axes } = pad;
    for (let j = buttonMappings.length - 1; j >= 0; j -= 1) {
      const button = buttonMappings[j];
      if (buttonState[button].pressed !== buttons[j].pressed) {
        buttonState[button].pressed = buttons[j].pressed;
        if (settings[button]) {
          settings[button](buttonState[button].pressed);
        }

        if (settings.buttons) {
          settings.buttons(button, buttonState[button].pressed, settings.side);
        }
      }
    }
    if (settings.axes) {
      const position = getAxesPosition(axes, buttons);
      if (position !== axesPosition) {
        settings.axes(position);
        axesPosition = position;
      }
    }
  };
}
441372
static void shiftLeftDestructive(Slice decimal, int leftShifts)
    {
        if (leftShifts == 0) {
            return;
        }

        int wordShifts = leftShifts / 64;
        int bitShiftsInWord = leftShifts % 64;
        int shiftRestore = 64 - bitShiftsInWord;

        // check overflow
        if (bitShiftsInWord != 0) {
            if ((getLong(decimal, 1 - wordShifts) & (-1L << shiftRestore)) != 0) {
                throwOverflowException();
            }
        }
        if (wordShifts == 1) {
            if (getLong(decimal, 1) != 0) {
                throwOverflowException();
            }
        }

        // Store negative before settings values to result.
        boolean negative = isNegative(decimal);

        long low;
        long high;

        switch (wordShifts) {
            case 0:
                low = getLong(decimal, 0);
                high = getLong(decimal, 1);
                break;
            case 1:
                low = 0;
                high = getLong(decimal, 0);
                break;
            default:
                throw new IllegalArgumentException();
        }

        if (bitShiftsInWord > 0) {
            high = (high << bitShiftsInWord) | (low >>> shiftRestore);
            low = (low << bitShiftsInWord);
        }

        pack(decimal, low, high, negative);
    }
85009
function shift(arr) {
    var shifted = splice(arr, 0, 1);
    return {
        array: shifted.array,
        val: arr[0]
    };
}
95311
function _base256_lshift(&$x, $shift)
    {
        if ($shift == 0) {
            return;
        }

        $num_bytes = $shift >> 3; // eg. floor($shift/8)
        $shift &= 7; // eg. $shift % 8

        $carry = 0;
        for ($i = strlen($x) - 1; $i >= 0; --$i) {
            $temp = ord($x[$i]) << $shift | $carry;
            $x[$i] = chr($temp);
            $carry = $temp >> 8;
        }
        $carry = ($carry != 0) ? chr($carry) : '';
        $x = $carry . $x . str_repeat(chr(0), $num_bytes);
    }
1108862
function unshiftArticle(summary, article) {
    article = SummaryArticle(article);

    var parts = summary.getParts();
    var part = parts.get(0) || SummaryPart();

    var articles = part.getArticles();
    articles = articles.unshift(article);
    part = part.set('articles', articles);

    parts = parts.set(0, part);
    summary = summary.set('parts', parts);

    return indexLevels(summary);
}
1359164
function(removedLength, change) {
  const { startOffset, endOffset } = change.state;
  const startPos = Math.max(startOffset - removedLength, 0);
  const endPos = Math.max(endOffset - removedLength, 0);
  change.moveOffsetsTo(0).deleteForward(removedLength).
    moveOffsetsTo(startPos, endPos).focus();
  return change;
}