命令 RPOPLPUSH 在一个原子时间内，执行以下两个动作：
将列表 source 中的最后一个元素(尾元素)弹出，并返回给客户端。
将 source 弹出的元素插入到列表 destination ，作为 destination 列表的的头元素。
3972
@SuppressWarnings("unchecked")
	public <T> T rpoplpush(Object srcKey, Object dstKey) {
		Jedis jedis = getJedis();
		try {
			return (T)valueFromBytes(jedis.rpoplpush(keyToBytes(srcKey), keyToBytes(dstKey)));
		}
		finally {close(jedis);}
	}
51217
private boolean writePerRow(Row row, Map<String, Object> data, T originData) throws WriteExcelException {
        boolean isNotBlankRow = false;
        //标识当前写入的列
        int currenCol = -1;
        for (String property : this.properties) {
            currenCol++;
            if (data.containsKey(property)) {
                Cell cell = row.createCell(currenCol);
                if (this.handleCellValue != null) {
                    this.map.clear();
                    this.handleCellValue.callback(property, data.get(property), originData, this);
                }
                CellStyle cellStyleTemp = this.defaultCellStyle;
                Object value = data.get(property);
                if (MapUtils.isNotEmpty(this.cellStyleMapping) && this.cellStyleMapping.containsKey(property)) {
                    cellStyleTemp = this.cellStyleMapping.get(property);
                }
                if (MapUtils.isNotEmpty(this.map)) {
                    if (this.map.get(CELL_STYLE) instanceof CellStyle) {
                        cellStyleTemp = (CellStyle) this.map.get(CELL_STYLE);
                    }
                    value = this.map.getOrDefault(CELL_VALUE, value);
                }
                cell.setCellStyle(cellStyleTemp);
                if (!this.setCellValue(cell, value, property)) {
                    isNotBlankRow = true;
                }
            }
        }
        return isNotBlankRow;
    }
813814
public static <T> List<T> popPart(Stack<T> surplusAlaDatas, int partSize) {
		if (isEmpty(surplusAlaDatas)) {
			return null;
		}

		final List<T> currentAlaDatas = new ArrayList<>();
		int size = surplusAlaDatas.size();
		// 切割
		if (size > partSize) {
			for (int i = 0; i < partSize; i++) {
				currentAlaDatas.add(surplusAlaDatas.pop());
			}
		} else {
			for (int i = 0; i < size; i++) {
				currentAlaDatas.add(surplusAlaDatas.pop());
			}
		}
		return currentAlaDatas;
	}
844710
private void getLastChild() {

        // nodekey of the root of the current subtree
        final long parent = getNode().getDataKey();

        // traverse tree in pre order to the leftmost leaf of the subtree and
        // push
        // all nodes to the stack
        if (((ITreeStructData)getNode()).hasFirstChild()) {
            while (((ITreeStructData)getNode()).hasFirstChild()) {
                mStack.push(getNode().getDataKey());
                moveTo(((ITreeStructData)getNode()).getFirstChildKey());
            }

            // traverse all the siblings of the leftmost leave and all their
            // descendants and push all of them to the stack
            while (((ITreeStructData)getNode()).hasRightSibling()) {
                mStack.push(getNode().getDataKey());
                moveTo(((ITreeStructData)getNode()).getRightSiblingKey());
                getLastChild();
            }

            // step up the path till the root of the current subtree and process
            // all
            // right siblings and their descendants on each step
            if (getNode().hasParent() && (getNode().getParentKey() != parent)) {

                mStack.push(getNode().getDataKey());
                while (getNode().hasParent() && (getNode().getParentKey() != parent)) {

                    moveTo(getNode().getParentKey());

                    // traverse all the siblings of the leftmost leave and all
                    // their
                    // descendants and push all of them to the stack
                    while (((ITreeStructData)getNode()).hasRightSibling()) {

                        moveTo(((ITreeStructData)getNode()).getRightSiblingKey());
                        getLastChild();
                        mStack.push(getNode().getDataKey());
                    }
                }

                // set transaction to the node in the subtree that is last in
                // document
                // order
                moveTo(mStack.pop());
            }
        }
    }
642186
protected void executeCellProcessors(final List<Object> destination, final List<?> source,
            final CellProcessor[] processors, final CsvContext context) {
        
        destination.clear();
        
        final SuperCsvRowException rowException = new SuperCsvRowException(
                String.format("row (%d) has errors column", context.getRowNumber()), context);
        for( int i = 0; i < source.size(); i++ ) {
            
            try {
                context.setColumnNumber(i + 1); // update context (columns start at 1)
                
                if( processors[i] == null ) {
                    destination.add(source.get(i)); // no processing required
                } else {
                    destination.add(processors[i].execute(source.get(i), context)); // execute the processor chain
                }
            } catch(SuperCsvCellProcessorException e) {
                rowException.addError(e);
                
                // 各カラムでエラーがあっても、後の入力値検証で処理を続けるために、仮に値を設定する。
                destination.add(source.get(i));
                
            } catch(SuperCsvException e) {
                throw e;
            }
        }
        
        if(rowException.isNotEmptyColumnErrors()) {
            throw rowException;
        }
        
    }
1237142
function otfContours2ttfContours(otfContours) {
            if (!otfContours || !otfContours.length) {
                return otfContours;
            }
            var contours = [];
            for (var i = 0, l = otfContours.length; i < l; i++) {

                // 这里可能由于转换错误导致空轮廓，需要去除
                if (otfContours[i][0]) {
                    contours.push(transformContour(otfContours[i]));
                }
            }

            return contours;
        }
598265
private T nextUncheck() {
		if (0 != this.index || false == this.includeStart) {
			// 非第一个元素或不包含第一个元素增加步进
			this.current = this.next;
			if (null != this.current) {
				this.next = safeStep(this.next);
			}
		}
		index++;
		return this.current;
	}
904062
function pHandle(e) {
            const $selectionElem = editor.selection.getSelectionContainerElem()
            const $parentElem = $selectionElem.parent()

            if ($parentElem.html() === '<code><br></code>') {
                // 回车之前光标所在一个 <p><code>.....</code></p> ，忽然回车生成一个空的 <p><code><br></code></p>
                // 而且继续回车跳不出去，因此只能特殊处理
                insertEmptyP($selectionElem)
                return
            }

            if (!$parentElem.equal($textElem)) {
                // 不是顶级标签
                return
            }

            const nodeName = $selectionElem.getNodeName()
            if (nodeName === 'P') {
                // 当前的标签是 P ，不用做处理
                return
            }

            if ($selectionElem.text()) {
                // 有内容，不做处理
                return
            }

            // 插入 <p> ，并将选取定位到 <p>，删除当前标签
            insertEmptyP($selectionElem)
        }
20948
function (range) {
            //每次获取cells之前必须先清除上次的选择，否则会对后续获取操作造成影响
            this.clearSelected();
            var beginRowIndex = range.beginRowIndex,
                beginColIndex = range.beginColIndex,
                endRowIndex = range.endRowIndex,
                endColIndex = range.endColIndex,
                cellInfo, rowIndex, colIndex, tdHash = {}, returnTds = [];
            for (var i = beginRowIndex; i <= endRowIndex; i++) {
                for (var j = beginColIndex; j <= endColIndex; j++) {
                    cellInfo = this.indexTable[i][j];
                    rowIndex = cellInfo.rowIndex;
                    colIndex = cellInfo.colIndex;
                    // 如果Cells里已经包含了此Cell则跳过
                    var key = rowIndex + '|' + colIndex;
                    if (tdHash[key]) continue;
                    tdHash[key] = 1;
                    if (rowIndex < i || colIndex < j || rowIndex + cellInfo.rowSpan - 1 > endRowIndex || colIndex + cellInfo.colSpan - 1 > endColIndex) {
                        return null;
                    }
                    returnTds.push(this.getCell(rowIndex, cellInfo.cellIndex));
                }
            }
            return returnTds;
        }
475175
function (start, end) {
      var r, rlen, c, clen, output = [], row;
      rlen = Math.max(start.row, end.row);
      clen = Math.max(start.col, end.col);
      for (r = Math.min(start.row, end.row); r <= rlen; r++) {
        row = [];
        for (c = Math.min(start.col, end.col); c <= clen; c++) {
          row.push(datamap.get(r, datamap.colToProp(c)));
        }
        output.push(row);
      }
      return output;
    }
865286
function (source, destination) {
    return cont.mapAsync(readFileAsJSON(source), function (json, cb) {
        json.copied = Date.now()
        fs.writeFile(destination, JSON.stringify(json), cb)
    })
}
827594
@SuppressWarnings("all")
    private static <T> T toNonCollectionType(Object data, Class<T> nonCollectionType) {
        if (Collection.class.isAssignableFrom(nonCollectionType)) {
            throw new RuntimeException("API使用错误，本方法不支持将目标对象转为非集合类型");
        }
        if (data == null) {
            return Defaults.defaultValue(nonCollectionType);
        }
        if (data.getClass().isArray()) {
            data = ArrayUtil.toList(data);
        }
        if (data instanceof Collection) {
            Collection collection = (Collection) data;
            if (nonCollectionType == String.class) {
                return (T) JSON.toJSONString(collection);
            }
            if (collection.isEmpty()) {
                return null;
            }
            if (collection.size() >= 2) {
                LOG.warn(new Throwable(String.format("集合 【 %s 】  的元素个数不只一个,我们只取出第一个做转换", data)));
            }
            for (Object element : collection) {
                LOG.debug("集合的第一个元素会被转为目标类型");
                return transferNonCollection(element, nonCollectionType);
            }
        } else {
            return transferNonCollection(data, nonCollectionType);
        }
        throw castFailedException(data, nonCollectionType);
    }
794901
function Queue() {
    
            /**
             * 统计文件数。
             * * `numOfQueue` 队列中的文件数。
             * * `numOfSuccess` 上传成功的文件数
             * * `numOfCancel` 被移除的文件数
             * * `numOfProgress` 正在上传中的文件数
             * * `numOfUploadFailed` 上传错误的文件数。
             * * `numOfInvalid` 无效的文件数。
             * @property {Object} stats
             */
            this.stats = {
                numOfQueue: 0,
                numOfSuccess: 0,
                numOfCancel: 0,
                numOfProgress: 0,
                numOfUploadFailed: 0,
                numOfInvalid: 0
            };
    
            // 上传队列，仅包括等待上传的文件
            this._queue = [];
    
            // 存储所有文件
            this._map = {};
        }
662178
function mergeDetail(allEle, addEle, attrName, type) {

    if (allEle[attrName] && addEle[attrName]) {
        if (type == 1) {
            for (var k in allEle[attrName]) {
                //todo 现在没有考虑两个文件中同一项覆盖率的统计行数不一致的问题
                if ( parseInt(allEle[attrName][k])==0 &&  parseInt(addEle[attrName][k]) ==1) {
                    allEle[attrName][k] = 1;
                }
            }
        }
        else if (type == 2) {
            for (var k in allEle[attrName]) {
                //todo 现在没有考虑两个文件中同一项覆盖率的统计行数不一致的问题
                if (addEle[attrName][k]) {
                    if (parseInt(allEle[attrName][k][0])==0 &&parseInt(addEle[attrName][k][0])==1 ) {
                        allEle[attrName][k][0] = 1;
                    }
                    if (parseInt(allEle[attrName][k][1])==0 &&parseInt(addEle[attrName][k][1])==1 ) {
                        allEle[attrName][k][1] = 1;
                    }
                }
            }
        }
    }
    return allEle;
}
579955
async def rpoplpush(self, src, dst):
        
        value = await self.rpop(src)

        if value:
            await self.lpush(dst, value)
            return value

        return None
809828
public static function getOffSprings($source,$idField,$pidField,$fieldValue,$includeSelf=true,$level=-1)
    {
        if(empty($source)){
            return [];
        }

        //元素为对象时,通过第一个元素检测getter
        $idGetter=null;
        $pidGetter=null;
        $first=$source[array_keys($source)[0]];
        $isObject=is_object($first);
        if($isObject){
            $idGetter=ObjectUtil::getGetter($first, $idField);
            $pidGetter=ObjectUtil::getGetter($first, $pidField);
        }

        $returnValue=self::_getOffSprings($source,$isObject,$idField,$idGetter,$pidField,$pidGetter,$fieldValue,$level,$includeSelf);

        return $returnValue;
    }
891833
private void moveFiles(FileLoadContext context, List<FileData> fileDatas, File rootDir) {
        Exception exception = null;
        adjustPoolSize(context);
        ExecutorCompletionService<Exception> executorComplition = new ExecutorCompletionService<Exception>(executor);

        List<Future<Exception>> results = new ArrayList<Future<Exception>>();
        for (FileData fileData : fileDatas) {
            Future<Exception> future = executorComplition.submit(new FileLoadWorker(context, rootDir, fileData));
            results.add(future);

            // fast fail
            if (future.isDone()) { // 如果是自己执行的任务(线程池采用 CallerRunsPolicy)，则立刻进行检查
                try {
                    exception = future.get();
                } catch (Exception e) {
                    exception = e;
                }
                if (exception != null) {
                    for (Future<Exception> result : results) {
                        if (!result.isDone() && !result.isCancelled()) {
                            result.cancel(true);
                        }
                    }
                    throw exception instanceof LoadException ? (LoadException) exception : new LoadException(exception);
                }
            }

        }

        int resultSize = results.size();
        int cursor = 0;
        while (cursor < resultSize) {
            try {
                Future<Exception> result = executorComplition.take();
                exception = result.get();
            } catch (Exception e) {
                exception = e;
                break;
            }
            cursor++;
        }

        if (cursor != resultSize) { // 发现任务出错，立刻把正在进行的任务取消
            for (Future<Exception> future : results) {
                if (!future.isDone() && !future.isCancelled()) {
                    future.cancel(true);
                }
            }

        }

        if (exception != null) {
            throw exception instanceof LoadException ? (LoadException) exception : new LoadException(exception);
        }
    }