Removes and returns a random element from the set.
485807
function spop() {
  var ind = Math.floor(Math.random() * this._keys.length)
    , val = this._keys[ind];
  this.delKey(val);
  return val;
}
52709
def pop(self, index=-1):
		""""""
		value = self._list.pop(index)
		del self._dict[value]
		return value
478737
public void removeElementAt(int i)
  {

    if (null == m_map)
      return;
      
    if (i >= m_firstFree)
      throw new ArrayIndexOutOfBoundsException(i + " >= " + m_firstFree);
    else if (i < 0)
      throw new ArrayIndexOutOfBoundsException(i);

    if (i < m_firstFree - 1)
      System.arraycopy(m_map, i + 1, m_map, i, m_firstFree - i - 1);

    m_firstFree--;
    m_map[m_firstFree] = null;
  }
358905
def random_sort(set)
      set.order do
        # this is a bit of a hack obviously, but it checks the sort of
        # data engine being used to figure out how to randomly sort
        if set.class.name !~ /mysql/i
          random.function
        else
          rand.function
        end
      end
    end
640010
def discard(self, element):
        """"""
        key = self._transform(element)
        if key in self._elements:
            del self._elements[key]
678226
def discard(self, element):
        
        _check_element(element)
        self._require_context()
        self._removes.add(element)
1327352
public function random()
    {
        $keys = array_keys($this->elements);

        return $this->elements[$keys[rand(0, sizeof($keys) - 1)]];
    }
1311800
public T remove() {
        final Node<T> previous = iterator.currentNode.previous;
        final T element = remove(iterator.currentNode);
        iterator.currentNode = previous;
        return element;
    }
459839
public static <T> T randomElementOf(final List<T> list) {
        if (list.isEmpty()) {
            return null;
        }
        return list.get(nextInt(0, list.size()));
    }
581628
def get_random(self):
        
        available = list(self.unchecked | self.good)
        if not available:
            return None
        return random.choice(available)
182781
@Override
    public T remove() {

        T retrievedElement = poll();

        if (retrievedElement == null) {
            throw new NoSuchElementException();
        }

        return retrievedElement;
    }
951557
public static <T> /* @Nullable */ T random(final @NonNull Random random, final @NonNull Iterable<T> iterable) {
    final int size = Iterables.size(iterable);
    if(size == 0) {
      throw new IndexOutOfBoundsException("cannot get random value from empty iterable");
    }
    final int index = random.nextInt(size);
    return Iterables.get(iterable, index);
  }
55887
def remove(self, item):
        '''
        '''
        score = self._dict.pop(item, None)
        if score is not None:
            index = self._sl.rank(score)
            assert index >= 0, 'could not find start range'
            for i, v in enumerate(self._sl.range(index)):
                if v == item:
                    assert self._sl.remove_range(index + i, index+i + 1) == 1
                    return score
            assert False, 'could not find element'
35479
def rand(self, count=1):
        
        result = self._client.srandmember(self.key_prefix, count)
        return set(map(self._loads, result))
1318796
public <T extends AbstractJaxb> boolean remove(T target) {
        String id = target.getId();
        if (id == null) {
            for (int i = 0; i < 256; i++) {
                id = UUID.randomUUID().toString();
                if (this.getById(id) == null) {
                    target.setId(id);
                    break;
                }
            }
        }
        return RemoveByIdUtil.removeById(id, this);
    }
934911
def discard(self, value):
        
        _set = self._set
        if value in _set:
            _set.remove(value)
            self._list.discard(value)
471043
public T remove() {
        lock.lock();

        try {
            if(queue.isEmpty())
                return null;
            El<T> el=queue.poll();
            count-=el.size;
            not_full.signalAll();
            return el.el;
        }
        finally {
            lock.unlock();
        }
    }