Copies source values from an input array as integer-indexed vector values.

@param source Source values.
974254
public void assignArray(Object source) {
        int len = Array.getLength(source);
        List<Object> list = new ArrayList<Object>(len);
        
        for (int i = 0; i < len; i++) {
            list.add(Array.get(source, i));
        }
        
        assign(list);
    }
357994
public static final void copyResource(String source, Path target, Class<?> cls) throws IOException
    {
        try (InputStream is = cls.getResourceAsStream(source))
        {
            Files.copy(is, target, REPLACE_EXISTING);
        }
    }
893600
@Override
    public void copy(long n, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY) {


        if (supportsDataBufferL1Ops()) {
            if (x.dataType() == DataType.DOUBLE) {
                dcopy(n, x, offsetX, incrX, y, offsetY, incrY);
            } else {
                scopy(n, x, offsetX, incrX, y, offsetY, incrY);
            }
        } else {
            long[] shapex = {1, n};
            long[] shapey = {1, n};
            long[] stridex = {incrX, incrX};
            long[] stridey = {incrY, incrY};
            INDArray arrX = Nd4j.create(x, shapex, stridex, offsetX, 'c');
            INDArray arrY = Nd4j.create(x, shapey, stridey, offsetY, 'c');
            copy(arrX, arrY);
        }
    }
1027283
public static void copy(InputStream input, OutputStream output) throws IOException {
		byte[] buf = new byte[BUFFER_SIZE];
		int num = 0;

		while ((num = input.read(buf, 0, buf.length)) != -1) {
			output.write(buf, 0, num);
		}
	}
359865
private static void addTernaryValues(IntegerVector destination,
                                         TernaryVector source) {
        for (int p : source.positiveDimensions())
            destination.add(p, 1);
        for (int n : source.negativeDimensions())
            destination.add(n, -1);
    }
356545
public final void setSource(Node source) {
    if (prototypeSlot != null) {
      // NOTE(bashir): On one hand when source is null we want to drop any
      // references to old nodes retained in prototypeSlot. On the other hand
      // we cannot simply drop prototypeSlot, so we retain all information
      // except the propertyNode for which we use an approximation! These
      // details mostly matter in hot-swap passes.
      if (source == null || prototypeSlot.getNode() == null) {
        prototypeSlot =
            new Property(
                prototypeSlot.getName(),
                prototypeSlot.getType(),
                prototypeSlot.isTypeInferred(),
                source);
      }
    }
    this.source = source;
  }
796616
public void makeSameAs(UnconditionalValueDerefSet source) {
        // Copy value numbers
        valueNumbersUnconditionallyDereferenced.clear();
        valueNumbersUnconditionallyDereferenced.or(source.valueNumbersUnconditionallyDereferenced);
        lastUpdateTimestamp = source.lastUpdateTimestamp;
        // Copy dereference locations for each value number
        derefLocationSetMap.clear();
        if (source.derefLocationSetMap.size() > 0) {
            for (Map.Entry<ValueNumber, Set<Location>> sourceEntry : source.derefLocationSetMap.entrySet()) {
                Set<Location> derefLocationSet = Util.makeSmallHashSet(sourceEntry.getValue());
                derefLocationSetMap.put(sourceEntry.getKey(), derefLocationSet);
            }
        }
    }
648255
private T[] convert(final List source) throws FrameworkException {

		final ArrayList<T> result = new ArrayList<>();

		for (final Object o : source) {

			if (componentType.isInstance(o)) {

				result.add((T)o);

			} else if (componentType.equals(Integer.class) && o instanceof Double) {

				result.add((T)(Integer)((Double)o).intValue());

			} else if (o != null) {

				final T value = fromString(o.toString());

				if (value == null) {
					throw new FrameworkException(422, "Invalid input", new NumberToken(this.getDeclaringClass().getSimpleName(), this));
				}

				result.add(value);

			} else {

				// dont know
				throw new IllegalStateException("Conversion of array type failed.");
			}
		}

		return (T[])result.toArray((Object[])Array.newInstance(componentType, 0));
	}
802262
public static void copy(InputStream input,
      OutputStream output,
      int bufferSize)
      throws IOException {
    byte[] buf = new byte[bufferSize];
    int bytesRead = input.read(buf);
    while (bytesRead != -1) {
      output.write(buf, 0, bytesRead);
      bytesRead = input.read(buf);
    }
    output.flush();
  }
1232446
public void setSchemaSources(Source... s) {
        if (s != null) {
            sourceLocations = Arrays.copyOf(s, s.length);
        } else {
            sourceLocations = null;
        }
    }
993481
public static void copyDirs(Path source, Path target, CopyOption... options) throws IOException {
        if (Files.notExists(target)) {
            Files.createDirectory(target);
        }

        logger.debug("  --> Copying resources from [{}]", source);
        if (Files.notExists(source)) {
            throw new RuntimeException(source + " doesn't seem to exist.");
        }

        Files.walkFileTree(source, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE,
                new InternalFileVisitor(source, target, options));

        logger.debug("  --> Resources ready in [{}]", target);
    }
830368
public final void copyPrimitiveField(Object source, Object copy, Field field) {
		copyPrimitiveAtOffset(source, copy, field.getType(), getObjectFieldOffset(field));
	}
22756
private function mergeArrayValues(array &$source, array &$values)
    {
        foreach ($values as $key => $value) {
            if (isset($source[$key])) {
                $sourceValue = $source[$key];

                if ($sourceValue instanceof IConfigValue) {
                    $sourceValue->set($value);
                } elseif (is_array($sourceValue) || $sourceValue instanceof IConfig) {
                    if (!is_array($value)) {
                        throw new InvalidArgumentException($this->translate(
                            'Value should be an array, "{type}" has been given',
                            ['type' => gettype($value)]
                        ));
                    }

                    if ($sourceValue instanceof IConfig) {
                        $sourceValue->merge($value);
                    } else {
                        $this->mergeArrayValues($sourceValue, $value);
                    }
                } else {
                    throw new UnexpectedValueException($this->translate(
                        'Config source is corrupted.'
                    ));
                }
            } else {
                if (is_array($value)) {
                    $source[$key] = [];
                    $this->mergeArrayValues($source[$key], $value);
                } else {
                    $source[$key] = $this->createConfigValue($value);
                }
            }
        }
    }
1039627
public static final <T> void assign(Set<T> source, Set<T> target)
    {
        target.retainAll(source);
        target.addAll(source);
    }
1004843
private ValueContainer[] addValues(ValueContainer[] target, ValueContainer[] source)
    {
        ValueContainer[] newArray;
        if(source != null && source.length > 0)
        {
            if(target != null)
            {
                newArray = new ValueContainer[target.length + source.length];
                System.arraycopy(target, 0, newArray, 0, target.length);
                System.arraycopy(source, 0, newArray, target.length, source.length);
            }
            else
            {
                newArray = source;
            }
        }
        else
        {
            newArray = target;
        }
        return newArray;
    }
744968
public static void copyResourceFile(String source, Path target) throws IOException {
        InputStream resource = FsCrawlerUtil.class.getResourceAsStream(source);
        FileUtils.copyInputStreamToFile(resource, target.toFile());
    }
1153363
public static void copy(InputStream source, OutputStream destination) throws IOException
    {
        Check.notNull(source);
        Check.notNull(destination);

        final byte[] buffer = new byte[BUFFER_COPY];
        while (true)
        {
            final int read = source.read(buffer);
            if (read == -1)
            {
                break;
            }
            destination.write(buffer, 0, read);
        }
    }