批量处理切分的时候，返回第index个List
552040
private static <E> List<E> getBatchList(Integer index, int batchSize, Collection<E> collection) {
        List<E> list = null;
        if (collection instanceof List) {
            list = (List<E>) collection;
        } else {
            list = new ArrayList<E>(collection);
        }

        if (index == list.size() / batchSize) {
            return list.subList(index * batchSize, list.size());
        } else {
            return list.subList(index * batchSize, (index + 1) * batchSize);
        }
    }
1108501
public static <E> int indexOf(final List<E> list, final E value) {
        return list.indexOf(value);
    }
835711
private String getNextListIndexSuffix(Map<String, String> options, String key) {
        if (!options.containsKey(key)) {
            return "";
        } else {
            int i = 1;
            while (options.containsKey(key + "." + i)) {
                i++;
            }
            return "." + i;
        }
    }
1002687
def _parse_list(self, text, i):
        """"""

        res = []
        end_match = self.end_list_re.match(text, i)
        old_current_type = self.current_type
        while not end_match:
            list_item, i = self._parse(text, i)
            res.append(list_item)

            end_match = self.end_list_re.match(text, i)

            if not end_match:
                m = self.list_delim_re.match(text, i)
                if not m:
                    self._fail("Missing delimiter in list before content", text, i)
                parsed = m.group(0)
                i += len(parsed)
            self.current_type = old_current_type

        parsed = end_match.group(0)
        i += len(parsed)
        return res, i
282289
private int indexedSearch(List<WeightBucket<T>> list, WeightBucket<T> item) {
        int i = 0;
        for (; i < list.size(); i++) {
            Comparable midVal = list.get(i);
            int cmp = midVal.compareTo(item);
            if (cmp == 0) {// item等于中间值
                return i;
            } else if (cmp > 0) {// item比中间值小
                return i;
            } else if (cmp < 0) {// item比中间值大
                // next
            }
        }

        return i;
    }
222060
function(list, index) {
            if ((index.type !== "Dimension") ||
                 !index.unit.isEmpty())
                    return atKey(list, index);

            list = isArray(list.value)
                ? list.value : [list];
            return list[index.value - 1];
        }
1308690
function (index, count) {
        validateListIndex(this, index + count - 1);
        return new List(this.slice(index, index + count));
    }
862222
@SuppressWarnings({ "rawtypes", "unchecked" })
	public List<List<Object>> read(int startRowIndex, int endRowIndex) {
		checkNotClosed();
		List<List<Object>> resultList = new ArrayList<>();

		startRowIndex = Math.max(startRowIndex, this.sheet.getFirstRowNum());// 读取起始行（包含）
		endRowIndex = Math.min(endRowIndex, this.sheet.getLastRowNum());// 读取结束行（包含）
		boolean isFirstLine = true;
		List rowList;
		for (int i = startRowIndex; i <= endRowIndex; i++) {
			rowList = readRow(i);
			if (CollUtil.isNotEmpty(rowList) || false == ignoreEmptyRow) {
				if (null == rowList) {
					rowList = new ArrayList<>(0);
				}
				if (isFirstLine) {
					isFirstLine = false;
					if (MapUtil.isNotEmpty(this.headerAlias)) {
						rowList = aliasHeader(rowList);
					}
				}
				resultList.add(rowList);
			}
		}
		return resultList;
	}
1372363
function (index) {
        validateListIndex(this, index);

        var i = index,
            len = --this.length;

        for (; i < len; i++) {
            this[i] = this[i + 1];
        }

        delete this[len];
    }
697584
def _getNearestMappingIndexList(fromValList, toValList):
    '''
    
    '''

    indexList = []
    for fromTimestamp in fromValList:
        smallestDiff = _getSmallestDifference(toValList, fromTimestamp)
        i = toValList.index(smallestDiff)
        indexList.append(i)

    return indexList
1273465
def list(self, search_from=None, search_to=None, limit=None):
        
        l = []
        for i in self._list():
            l.append(i['data']['data'])
        return l[0:limit]
543448
def _split_index(params):
    
    result = {}
    for key in params:
        if isinstance(params[key], dict):
            value = params[key]['_value']
        else:
            value = params[key]
        result[key] = value
    return result
486272
def _get_index_list_of_values(d, k, def_value=None):
    """"""
    v = d.get(k, def_value)
    if v is None:
        return []
    if isinstance(v, list):
        return v
    return [v]
922671
public List<int[]> getPaths(int index)
    {
        assert (index <= N && index >= 0);

        Stack<PathNode> stack = new Stack<PathNode>();
        int curNode = vertexCount - 1, curIndex = index;
        QueueElement element;
        PathNode node;
        int[] aPath;
        List<int[]> result = new ArrayList<int[]>();

        element = fromArray[curNode - 1][curIndex].GetFirst();
        while (element != null)
        {
            // ---------- 通过压栈得到路径 -----------
            stack.push(new PathNode(curNode, curIndex));
            stack.push(new PathNode(element.from, element.index));
            curNode = element.from;

            while (curNode != 0)
            {
                element = fromArray[element.from - 1][element.index].GetFirst();
//                System.out.println(element.from + " " + element.index);
                stack.push(new PathNode(element.from, element.index));
                curNode = element.from;
            }

            // -------------- 输出路径 --------------
            PathNode[] nArray = new PathNode[stack.size()];
            for (int i = 0; i < stack.size(); ++i)
            {
                nArray[i] = stack.get(stack.size() - i - 1);
            }
            aPath = new int[nArray.length];

            for (int i = 0; i < aPath.length; i++)
                aPath[i] = nArray[i].from;

            result.add(aPath);

            // -------------- 出栈以检查是否还有其它路径 --------------
            do
            {
                node = stack.pop();
                curNode = node.from;
                curIndex = node.index;

            } while (curNode < 1 || (stack.size() != 0 && !fromArray[curNode - 1][curIndex].CanGetNext()));

            element = fromArray[curNode - 1][curIndex].GetNext();
        }

        return result;
    }
1134826
public List<? extends Element> getMemberList(Character index) {
        SortedSet<Element> set = indexmap.get(index);
        if (set == null)
            return null;
        List<Element> out = new ArrayList<>();
        out.addAll(set);
        return out;
    }
1367851
def get(self, index):
        
        data = self.data
        index2 = self._split(index)
        for c in index2[:-1]:
            i = int(c) - 1
            data = data[i][4]
        return [index[:-2] or ""] + data[int(index[-1]) - 1]
683632
private List<String> parseList(String listStr) {
        String trimmed = listStr.trim();
        String[] items = trimmed.substring(1, trimmed.length() - 1).split(",");
        List<String> result = new ArrayList<>();
        for (String item : items) {
            String s = item.trim();
            if (!s.isEmpty()) {
                result.add(s);
            }
        }
        return result;
    }