Push the item in the priority queue.
        if priority is not given, priority is set to the value of item.
429412
def push(self, item, priority=None):
        
        priority = item if priority is None else priority
        node = PriorityQueueNode(item, priority)
        for index, current in enumerate(self.priority_queue_list):
            if current.priority < node.priority:
                self.priority_queue_list.insert(index, node)
                return
        # when traversed complete queue
        self.priority_queue_list.append(node)
802334
public void add(T item) {
        CompletableFuture<Queue<T>> pending;
        Queue<T> result = null;
        synchronized (this.contents) {
            Exceptions.checkNotClosed(this.closed, this);
            this.contents.addLast(item);
            pending = this.pendingTake;
            this.pendingTake = null;
            if (pending != null) {
                result = fetch(this.contents.size());
            }
        }

        if (pending != null) {
            pending.complete(result);
        }
    }
364648
def move(self, queue_item, status):
        

        items = self.__get_var("items_" + queue_item.status)

        del items[queue_item.get_hash()]
        self.count_total -= 1

        queue_item.status = status
        self.add(queue_item)
61778
def PushItem(self, item, block=True):
    
    try:
      self._queue.put(item, block=block)
    except Queue.Full as exception:
      raise errors.QueueFull(exception)
14070
def push(self, item, *, index=None):
        
        if index is None:
            self.__list.append(item)
        else:
            self.__list.insert(index, item)
        name = getattr(item, 'name', None)
        if name is not None:
            self.__dict[name] = item
865936
def push(self, x):
        
        if isinstance(x, list):
            for item in x:
                self.stack.append(item)
        else:
            self.stack.append(x)
842940
function(){
      var data = {
        title: $('#new_item').val(),
        priority: todo.selected_priority,
        deadline: todo.create_deadline($('#due_in').val())
      }
      if (data.title == ''){
        return
      }
      $('#new_item').val('');
      todo.push_item(data); // Push data to CloudMine
    }
323744
public function push($value): QueueInterface
    {

        $this->resolver->value(function ($value): void {
            $this->items->push($value);
        }, $value);

        return $this;
    }
75053
protected void offerAt(final int pos, O e) {
    if(pos == NO_VALUE) {
      // resize when needed
      if(size + 1 > queue.length) {
        resize(size + 1);
      }
      index.put(e, size);
      size++;
      heapifyUp(size - 1, e);
      heapModified();
      return;
    }
    assert (pos >= 0) : "Unexpected negative position.";
    assert (queue[pos].equals(e));
    // Did the value improve?
    if(comparator.compare(e, queue[pos]) >= 0) {
      return;
    }
    heapifyUp(pos, e);
    heapModified();
    return;
  }
538948
function setPriority( $value, $params=FALSE  ) {
    $this->priority['value']  = $value;
    $this->priority['params'] = $this->_setParams( $params );
  }
720511
public final void push(int value)
  {

    int ff = m_firstFree;

    if ((ff + 1) >= m_mapSize)
    {
      if (null == m_map)
      {
        m_map = new int[m_blocksize];
        m_mapSize = m_blocksize;
      }
      else
      {
        m_mapSize += m_blocksize;

        int newMap[] = new int[m_mapSize];

        System.arraycopy(m_map, 0, newMap, 0, ff + 1);

        m_map = newMap;
      }
    }

    m_map[ff] = value;

    ff++;

    m_firstFree = ff;
  }
581770
public function push($value, int $priority = 0): PriorityQueueInterface
    {
        $this->resolver->value(function ($value) use ($priority): void {
            $this->items->push($value, $priority);
        }, $value);

        return $this;
    }
337955
def push(self, value: Union[int, bytes]) -> None:
        
        if len(self.values) > 1023:
            raise FullStack('Stack limit reached')

        validate_stack_item(value)

        self.values.append(value)
1121080
public void push(final V value) throws IndexOutOfBoundsException {
        if (top + locals >= values.length) {
            throw new IndexOutOfBoundsException(
                    "Insufficient maximum stack size.");
        }
        values[top++ + locals] = value;
    }
479364
def add_element(self, priority, element, count=None):
        
        if count is None:
            count = next(self.counter)
        entry = [priority, count, element]
        self.element_finder[element] = entry
        heapq.heappush(self.pq, entry)
1205463
def push(self, item):
        
        if item in self.pushed:
            return
        frame = (item, iter(item[1]))
        self.stack.append(frame)
        self.pushed.add(item)
741283
private void store(PriorityQueue<Entry> queue)
    {
        nextIndex = 0;
        for (Entry entry : queue) {
            if (entry.isValid()) {
                values[nextIndex] = entry.getValue();
                weights[nextIndex] = entry.getWeight();
                nextIndex++;
            }
        }
        sort(values, weights, nextIndex);
    }