将指定段的字符列表写出到目标字符数组中

@param srcBegin 起始位置（包括）
@param srcEnd 结束位置（不包括）
@param dst 目标数组
@param dstBegin 目标起始位置（包括）
@return this
166192
public StrBuilder getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) {
		if (srcBegin < 0) {
			srcBegin = 0;
		}
		if (srcEnd < 0) {
			srcEnd = 0;
		} else if (srcEnd > this.position) {
			srcEnd = this.position;
		}
		if (srcBegin > srcEnd) {
			throw new StringIndexOutOfBoundsException("srcBegin > srcEnd");
		}
		System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin);
		return this;
	}
1259527
def resolve_dst(self, dst_dir, src):
        
        if os.path.isabs(src):
            return os.path.join(dst_dir, os.path.basename(src))
        return os.path.join(dst_dir, src)
1129331
public static function &override(&$dst, $src) {
        foreach ($src as $key => $value) {
            if (!array_key_exists($key, $dst)) {
                $dst[$key] = $value;
            } else if (is_array($value) && is_array($dst[$key])) {
                if (self::isIndexedArray($dst[$key])) {
                    $dst[$key] = $value;
                } else {
                    self::override($dst[$key], $value);
                }
            } else if (is_int($key)) {
                $dst[] = $value;
            } else {
                $dst[$key] = $value;
            }
        }
        return $dst;
    }
173149
function Insert(dst,src) {
  for (var id in src) {if (src.hasOwnProperty(id)) {
    // allow for concatenation of arrays?
    if (typeof src[id] === 'object' && !(src[id] instanceof Array) &&
       (typeof dst[id] === 'object' || typeof dst[id] === 'function'))
         {Insert(dst[id],src[id])} else {dst[id] = src[id]}
  }}
  return dst;
}
1348477
def copy(self, src, dst, label=None):
    
    dst = self._normalize(dst)
    self._tag(dst, label)
    self._ensure_parent(dst)
    shutil.copy(src, os.path.join(self.chroot, dst))
1162790
public static BufferedImage twistImage(BufferedImage srcBmp, int width, int height, boolean bXDir) {
		double dMultValue = getRandomDouble(1, 3);
		double dPhase = getRandomDouble(0, PI2);

		if (width > srcBmp.getWidth())
			width = srcBmp.getWidth();
		if (height > srcBmp.getHeight())
			height = srcBmp.getHeight();

		BufferedImage destBmp = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);

		Graphics g = destBmp.getGraphics();

		// 设定背景色
		g.setColor(Color.white);
		g.fillRect(0, 0, width, height);

		// 画边框
		g.setColor(Color.black);
		g.drawRect(0, 0, width - 1, height - 1);

		g.dispose();

		double dBaseAxisLen = bXDir ? (double) height : (double) width;

		for (int i = 1; i < width - 1; i++) {
			for (int j = 1; j < height - 1; j++) {
				double dx = 0;
				dx = bXDir ? (PI2 * (double) j) / dBaseAxisLen : (PI2 * (double) i) / dBaseAxisLen;
				dx += dPhase;
				double dy = Math.sin(dx);

				// 取得当前点的颜色
				int nOldX = 0, nOldY = 0;
				nOldX = bXDir ? i + (int) (dy * dMultValue) : i;
				nOldY = bXDir ? j : j + (int) (dy * dMultValue);

				int color = srcBmp.getRGB(i, j);
				if (nOldX >= 1 && nOldX < width - 1 && nOldY >= 1 && nOldY < height - 1) {
					destBmp.setRGB(nOldX, nOldY, color);
				}
			}
		}

		return destBmp;
	}
666687
public static void horizontal( GrayF32 src , GrayF32 dst ) {

		if( src.width < dst.width )
			throw new IllegalArgumentException("src width must be >= dst width");
		if( src.height != dst.height )
			throw new IllegalArgumentException("src height must equal dst height");

		float scale = src.width/(float)dst.width;

		//CONCURRENT_BELOW BoofConcurrency.loopFor(0, dst.height, y -> {
		for (int y = 0; y < dst.height; y++) {
			int indexDst = dst.startIndex + y*dst.stride;
			for (int x = 0; x < dst.width-1; x++, indexDst++ ) {
				float srcX0 = x*scale;
				float srcX1 = (x+1)*scale;

				int isrcX0 = (int)srcX0;
				int isrcX1 = (int)srcX1;

				int index = src.getIndex(isrcX0,y);

				// compute value of overlapped region
				float startWeight = (1.0f-(srcX0-isrcX0));
				float start = src.data[index++];

				float middle = 0;
				for( int i = isrcX0+1; i < isrcX1; i++ ) {
					middle += src.data[index++];
				}

				float endWeight = (srcX1%1);
				float end = src.data[index];
				dst.data[indexDst] = (start*startWeight + middle + end*endWeight)/scale;
			}

			// handle the last area as a special case
			int x = dst.width-1;
			float srcX0 = x*scale;

			int isrcX0 = (int)srcX0;
			int isrcX1 = src.width-1;

			int index = src.getIndex(isrcX0,y);

			// compute value of overlapped region
			float startWeight = (1.0f-(srcX0-isrcX0));
			float start = src.data[index++];

			float middle = 0;
			for( int i = isrcX0+1; i < isrcX1; i++ ) {
				middle += src.data[index++];
			}

			float end = isrcX1 != isrcX0 ? src.data[index] : 0;
			dst.data[indexDst] = (start*startWeight + middle + end)/scale;
		}
		//CONCURRENT_ABOVE });
	}
541852
public static BBox createInverse(boolean elevation) {
        if (elevation) {
            return new BBox(Double.MAX_VALUE, -Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE,
                    Double.MAX_VALUE, -Double.MAX_VALUE, true);
        } else {
            return new BBox(Double.MAX_VALUE, -Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE,
                    Double.NaN, Double.NaN, false);
        }
    }
1264368
public void write(GroupAddress dst, boolean value) throws KNXTimeoutException,
		KNXLinkClosedException
	{
		try {
			final DPTXlatorBoolean t = new DPTXlatorBoolean(DPTXlatorBoolean.DPT_BOOL);
			t.setValue(value);
			write(dst, priority, t);
		}
		catch (final KNXFormatException ignore) {}
	}
103610
function copy (src, dst) {
  return new Promise((resolve, reject) => {
    fs.createReadStream(src)
      .on('error', reject)
      .pipe(fs.createWriteStream(dst)
              .on('error', reject)
              .on('close', resolve)
      )
  })
}
1150467
public final void pextrd(Register dst, XMMRegister src, Immediate imm8)
  {
    emitX86(INST_PEXTRD, dst, src, imm8);
  }
730074
public static function copyDir($src, $dst) {
        if ( is_file($src) ) {  //如果是文件，则直接拷贝
            return copy($src, $dst);
        }
        @mkdir($dst);   //创建目标目录
        $handle = opendir($src);
        if ( $handle !== false ) {
            while( ($filename = readdir($handle)) ) {

                if ( $filename == '.'  || $filename == '..' ) continue;
                $fileSrc = $src.'/'.$filename;
                $fileDst = $dst.'/'.$filename;
                if ( is_dir($fileSrc) ) {
                    self::copyDir($fileSrc, $fileDst);
                } else {
                    copy($fileSrc, $fileDst);
                }

            }
        }
        closedir($src);
    }
443093
public final void pcmpestri(XMMRegister dst, XMMRegister src, Immediate imm8)
  {
    emitX86(INST_PCMPESTRI, dst, src, imm8);
  }
510636
public final void bsr(Register dst, Mem src)
  {
    assert(!dst.isRegType(REG_GPB));
    emitX86(INST_BSR, dst, src);
  }
840105
public static void vertical( GrayF32 src , GrayF32 dst ) {

		if( src.height < dst.height )
			throw new IllegalArgumentException("src height must be >= dst height");
		if( src.width != dst.width )
			throw new IllegalArgumentException("src width must equal dst width");

		float scale = src.height/(float)dst.height;

		//CONCURRENT_BELOW BoofConcurrency.loopFor(0, dst.width, x -> {
		for (int x = 0; x < dst.width; x++) {
			int indexDst = dst.startIndex + x;
			for (int y = 0; y < dst.height-1; y++) {

				float srcY0 = y*scale;
				float srcY1 = (y+1)*scale;

				int isrcY0 = (int)srcY0;
				int isrcY1 = (int)srcY1;

				int index = src.getIndex(x,isrcY0);

				// compute value of overlapped region
				float startWeight = (1.0f-(srcY0-isrcY0));
				float start = src.data[index];
				index += src.stride;

				float middle = 0;
				for( int i = isrcY0+1; i < isrcY1; i++ ) {
					middle += src.data[index];
					index += src.stride;
				}

				float endWeight = (srcY1%1);
				float end = src.data[index];
				dst.data[indexDst] = (float)((start*startWeight + middle + end*endWeight)/scale );
				indexDst += dst.stride;
			}

			// handle the last area as a special case
			int y = dst.height-1;
			float srcY0 = y*scale;

			int isrcY0 = (int)srcY0;
			int isrcY1 = src.height-1;

			int index = src.getIndex(x,isrcY0);

			// compute value of overlapped region
			float startWeight = (1.0f-(srcY0-isrcY0));
			float start = src.data[index];
			index += src.stride;

			float middle = 0;
			for( int i = isrcY0+1; i < isrcY1; i++ ) {
				middle += src.data[index];
				index += src.stride;
			}

			float end = isrcY1 != isrcY0 ? src.data[index]: 0;
			dst.data[indexDst] = (float)((start*startWeight + middle + end)/scale );
		}
		//CONCURRENT_ABOVE });
	}
1192016
public static void copyTriangle(boolean upper , DMatrixRBlock src , DMatrixRBlock dst )
    {
        if( src.blockLength != dst.blockLength )
            throw new IllegalArgumentException("Block size is different");
        if( src.numRows < dst.numRows )
            throw new IllegalArgumentException("The src has fewer rows than dst");
        if( src.numCols < dst.numCols )
            throw new IllegalArgumentException("The src has fewer columns than dst");

        int blockLength = src.blockLength;

        int numRows = Math.min(src.numRows,dst.numRows);
        int numCols = Math.min(src.numCols,dst.numCols);

        if( upper ) {
            for( int i = 0; i < numRows; i += blockLength ) {
                int heightSrc = Math.min(blockLength,src.numRows-i);
                int heightDst = Math.min(blockLength,dst.numRows-i);

                for( int j = i; j < numCols; j += blockLength ) {
                    int widthSrc = Math.min(blockLength,src.numCols-j);
                    int widthDst = Math.min(blockLength,dst.numCols-j);

                    int indexSrc = i*src.numCols + heightSrc*j;
                    int indexDst = i*dst.numCols + heightDst*j;

                    if( j == i ) {
                        for( int k = 0; k < heightDst; k++ ) {
                            for( int l = k; l < widthDst; l++ ) {
                                dst.data[indexDst + widthDst*k+l ] = src.data[indexSrc + widthSrc*k+l ];
                            }
                        }
                    } else {
                        for( int k = 0; k < heightDst; k++ ) {
                            System.arraycopy(src.data, indexSrc + widthSrc * k, dst.data, indexDst + widthDst * k, widthDst);
                        }
                    }
                }
            }
        } else {
            for( int i = 0; i < numRows; i += blockLength ) {
                int heightSrc = Math.min(blockLength,src.numRows-i);
                int heightDst = Math.min(blockLength,dst.numRows-i);

                for( int j = 0; j <= i; j += blockLength ) {
                    int widthSrc = Math.min(blockLength,src.numCols-j);
                    int widthDst = Math.min(blockLength,dst.numCols-j);

                    int indexSrc = i*src.numCols + heightSrc*j;
                    int indexDst = i*dst.numCols + heightDst*j;

                    if( j == i ) {
                        for( int k = 0; k < heightDst; k++ ) {
                            int z = Math.min(k+1,widthDst);
                            for( int l = 0; l < z; l++ ) {
                                dst.data[indexDst + widthDst*k+l ] = src.data[indexSrc + widthSrc*k+l ];
                            }
                        }
                    } else {
                        for( int k = 0; k < heightDst; k++ ) {
                            System.arraycopy(src.data, indexSrc + widthSrc * k, dst.data, indexDst + widthDst * k, widthDst);
                        }
                    }
                }
            }
        }
    }
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);}
	}