return all items selected
425889
function getSelected() {
  var selected = [];
  $('.selectItem').each(function() {
    if ($(this).is(':checked')) {
      selected.push(utils.deEncID($(this).attr('name').replace('cb_', '')));
    }
  });
  return selected;
}
1113706
function _getSelected(select) {
    const arr = [];

    _slice.call(select.options).map((el) => {
        if (el.selected) {
            arr.push(el.value);
        }
    });

    return arr;
}
742937
def items(self):
        
        if not self.cursor.rowcount:
            return []

        self.cursor.scroll(0, 'absolute')
        return self.cursor.fetchall()
920631
function getCheckedList() {
    const checked = [];
    this.state.items.forEach((item, i) => {
        if (item.checked) {
            checked.push(i);
        }
    });
    return checked;
}
67614
public String[] getItemsSelected() {
        List<String> selected = new LinkedList<>();
        for (int i = getIndexOffset(); i < listBox.getItemCount(); i++) {
            if (listBox.isItemSelected(i)) {
                selected.add(listBox.getValue(i));
            }
        }
        return selected.toArray(new String[selected.size()]);
    }
832582
def select_all(*str_or_rx)
      results = str_or_rx.flatten.map { |v| select_all_by v }
      results.first
    end
854862
def get_selected(self):
        ''''''
        selected_idx = []
        for i, row in enumerate(self.liststore):
            if row[CHECK_COL]:
                selected_idx.append(i + 1)
        return (selected_idx, self.file_sha1)
1063313
public List<Option> getSelectedItems() {
        final List<Option> items = new ArrayList<>(0);
        for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
            Option opt = entry.getValue();
            if (opt.isSelected())
                items.add(opt);
        }
        return items;
    }
817938
def select(self, item):
        """"""
        self._on_unselect[self._selected]()
        self.selected().unfocus()

        if isinstance(item, int):
            self._selected = item % len(self)
        else:
            self._selected = self.items.index(item)

        self.selected().focus()
        self._on_select[self._selected]()
231479
def get_current_item(self):
        """"""
        l = self.selectedIndexes()
        if len(l) > 0:
            return self.model().get_item(l[0])
706443
def all_from(cls, *args, **kwargs):
        """"""
        pq_items = cls._get_items(*args, **kwargs)
        return [cls(item=i) for i in pq_items.items()]
467515
def _get_all(self):
        ''' 
        '''
        rowid = 0
        while True:
            SQL_SELECT_MANY = 'SELECT rowid, * FROM %s WHERE rowid > ? LIMIT ?;' % self._table
            self._cursor.execute(SQL_SELECT_MANY, (rowid, ITEMS_PER_REQUEST))
            items = self._cursor.fetchall()
            if len(items) == 0:
                break
            for item in items:
                rowid = item['_id']
                yield self._make_item(item)
1314300
def get_visible_items(self):
        """"""
        items = []
        iterator = QTreeWidgetItemIterator(self)
        while iterator.value():
            item = iterator.value()
            if not item.isHidden():
                if item.parent():
                    if item.parent().isExpanded():
                        items.append(item)
                else:
                    items.append(item)
            iterator += 1
        return items
1344968
def get_menu_actions(self):
        """"""
        items = self.selectedItems()
        actions = self.get_actions_from_items(items)
        if actions:
            actions.append(None)
        actions += self.common_actions
        return actions
39965
def selected_fields(self):
        
        items = self.lstFields.selectedItems()
        if items and self.mode == MULTI_MODE:
            return [item.text() for item in items]
        elif items and self.mode == SINGLE_MODE:
            return items[0].text()
        else:
            return []
844009
def slice(self, items):
        ''''''
        if self.limit:
            if self.page>self.pages_count:
                return []
            if self.page == self.pages_count:
                return items[self.limit*(self.page-1):]
            return items[self.limit*(self.page-1):self.limit*self.page]
        else:
            return items[:]
46433
def selected_items
      ((m = marked_items).any? ? m : Array(current_item)).reject {|i| %w(. ..).include? i.name}
    end