FAQ Database Discussion Community


Create a directory in WordPress Multisite subsite directory

php,wordpress,copy,mkdir
I am attempting to create a directory in a WordPress Multisite subsite directory. The subsite directory is located at /home/site/site.com/wp-content/uploads/sites/site_id/ where site_id is the actual id# of the subsite. I'm looking to create a directory under the site_id directory, and then add a file to that directory from elsewhere in...

Cannot convert keys or values of a dictionary to an array in C#

c#,arrays,dictionary,copy
I have: Dictionary<int, int> Color_Count = new Dictionary<int, int>(); and also: var sortedDict = from entry in Color_Count orderby entry.Value descending select entry; But I don't know how to fix this compiler error. When I am trying to copy keys from this dictionary to integer massive, like this: int[] Colors_massive...

Copying multiple files into same directory while changing filename

file,powershell,copy,rename
I need to copy a series of files that look like foo.bar foo.baz foo.boo ... into the same director, but change the foo to moo. moo.bar moo.baz moo.boo ... But I'm not sure how I can copy and rename multiple files in one command. Something along the lines of cp...

What are the differences between copy ,mutableCopy and assignment?

objective-c,copy
I thought i understood the difference between copy and mutableCopy. But today i doubt about myself. i still don't understand. NSArray *arrayB = [NSArray arrayWithObject:@"a"]; NSArray *arrayA = [arrayB copy]; NSArray *arrayC = [arrayB mutableCopy]; NSArray *arrayD = arrayB; when i make some changes to arrayA, arrayC or arrayD,will arrayB...

Excel- update table with another table based on cell value

excel,table,copy,cell
after searching, I understand I can copy data into a table one at a time using VLOOKUP. However, is it possible to replace an entire table with another if a cell contains a certain value? for example, I have a table1. I want to replace table1 with table2 if cell...

Postgres: Combining multiple COPY TO outputs to a postgres-importable file

postgresql,heroku,import,copy,export
I have my database hosted on heroku, and I want to download specific parts of the database (e.g. all the rows with id > x from table 1, all the rows with name = x from table 2, etc.) in a single file. From some research and asking a question...

How to copy a file in python recreating the directory structure?

python,copy
src = Folder1/Folder2/file1 (edit: Folder1 has other files and folders as well) dst = Folder3 After copying the file, I want to have Folder3/Folder1/Folder2/file1 I think shutil.copy doesn't recreate the folders and shutil.copytree is only for folders (edit: I could have copied folder directly if there weren't other files as...

Maven copy dependendencies of dependency

java,maven,jar,copy,dependencies
I'm having troubles with Maven. Let's say I have some Java (Maven) projects: X Y I would like to include project Y in project X as a dependency. However, I want to copy all "lib" dependencies of Y project as well. Has anybody any idea ?...

Hard copying dicts in a list

python,dictionary,copy
When I try the following list creation, I see that each element refers to a different object. >>> a = [1] * 7 >>> a[0] = 2 >>> a Out[17]: [2, 1, 1, 1, 1, 1, 1] However, when I try the following list creation with dictionaries, I see that...

Copy element without content using xslt

xml,xslt,copy,element
i´m desperately looking for a simple solution to my problem and hoping that someone out there is able to help :). Problem: Given is a xml document containing elements with attributes. I need to pick some element values, put those before the elements and remove the elements content afterwards using...

modifying copy of javascript object is causing original object to change

javascript,object,copy
I am copying myObj to tempMyObj var tempMyObj = myObj; tempMyObj.entity is an array of objects. I am modifying tempMyObj.entity based on some conditions. The problem is if I modify tempMyObj.entity the myObj.entity is also getting modified. for (j = 0; j < myObj.length; j++) { if (myObj[j].type == "TableShape")...

C++ why copy c'tor not called

c++,constructor,copy
Hey guys i have this code Animal.h: /* * Animal.h * * Created on: May 27, 2015 * Author: saif */ #ifndef ANIMAL_H_ #define ANIMAL_H_ #include <iostream> using namespace std; class Animal { int age; public: Animal(); Animal(const Animal & rhs); Animal addTo(); virtual ~Animal(); }; #endif /* ANIMAL_H_ */...

Copy File to a Directory in C

c,directory,copy
How do you write a program in C that can copy a file (given by source file path, eg. /input/input.txt) into an existed directory? The copy file in the directory must have the exact same name as the input file. This is the piece of code I have so far:...

How can I copy content from one string vector to another?

c++,string,vector,copy
For example, I have a string-based vector: vector<string> text_vec; There are several words stored in each string. So, I need to copy the each word from this vector to another string-vector, but I should place each word in the individual string. How can I do this?...

Autohotkey ClipboardAll in function does not work

copy,clipboard,autohotkey,paste
Hello I have this script in Autohotkey and for some reason it does not work just for ClipboardAll in function: global clips := Object() copy(index){ Send ^c clips[0] := ClipboardAll } paste(index){ Clipboard := clips[0] Send ^v } ^q:: copy(0) !q:: paste(0) but if I try the function copy with...

Find value and copy entire row to another sheet

excel,vba,copy,paste,vlookup
I'm trying to create a vba code but I'm not succeeding. I want to search on COLUMN "F", for value: "Answered" then copy row from "COLUM B TO F" and paste on sheet "ControlAnswered" lastrow;...

Why Doesn't reinterpret_cast Force copy_n for Casts between Same-Sized Types?

c++,casting,binary,copy,reinterpret-cast
According to cppreference.com, reinterpret_cast: Converts between types by reinterpreting the underlying bit pattern. But wait, that's a lie cause it only works in these cases: When a pointer or reference to object of type T1 is reinterpret_cast (or C-style cast) to a pointer or reference to object of a different...

VBA - on click - generate a prompt to confirm which workbook / spreadsheet to look at

excel,vba,onclick,copy,prompt
I am fairly certain I know how to select data from a different workbook / sheet but I'm a little clueless as to how I would go about generating a VBA question box that would prompt the user on click to input the relevant workbook / sheet. For example: Workbook...

efficient copying of arrays in Java

java,object,copy
In Java, given a list xs can we obtain the list ys such that the nth element of ys is given a new value. xs is not modified. Can this be done without having to copy all of xs, referring to the copy as ys then modifying ys? import java.util.ArrayList;...

Trying to copy files in specified path with specified extension and replace them with new extension

java,file,copy,nio
I have most of it down but when I try to make the copy, no copy is made. It finds the files in the specified directory like it is supposed to do and I think the copy function executes but there aren't any more files in the specified directory. Any...

How to copy a file on several directories with the name *Co* (where *=wildcard)

copy,wildcard,directory
How to copy a file to several directories of the form *Co*? or *52? Apparently, just typing cp fileA *Co* won't work. My other concern is that if a directory already contains fileA, I don't want it to be overwritten. That is, if the directory *Co* contains fileA, do NOT...

Copy nodes in AST

java,parsing,copy,abstract-syntax-tree,javaparser
I am using javaparser to construct an AST from Java source code. Is there a way to safely copy AST nodes? For example, if I want to duplicate a BinaryExpr to insert somewhere else in the tree, is there a built-in way to copy the node?...

How to use for-loop over csv file to copy files

linux,bash,file,for-loop,copy
I have a .csv file where column 8 (named filepath) contains the file location of a file I would like to copy to my home folder in Linux. Now I would like to loop over this column and use the cp function to copy the file to a folder in...

JavaScript Copy Array By Value

javascript,arrays,json,copy,value
I have created an array and received another from a php file. The data is fine but when i try to copy one array to another, it seems like when i change arr1 then arr2 is also changed. It is being copied "by reference" and not "by value" as i...

ActiveSheet.Paste type (Paste Only values)

copy,copy-paste
I have this simply code, I want to copy only values from WoorkBook1 into Workbook2, only values, because Workbook2 have a specific format. Sub Test() Workbooks("Workbook1.xlsx").Activate Range("B2:B7").Select Selection.Copy Workbooks("Workbook2.xlsx").Activate Range("B5:B10").Select ActiveSheet.Paste End Sub Tnx4all...

java images not showing up

java,image,loops,for-loop,copy
I am writing a program where I take separate images and copy them as one whole picture in one template. But I cant figure out how to copy the separate images so they are not on top of each other. I noticed the first and second images are copied and...

Javascript | Copy selected items from listbox to textarea

javascript,text,copy
I know this is silly question but I am new to Javascript. I have the following listbox: <select id = 'data' multiple='multiple'> <option>[email protected]</option> <option>[email protected]</option> <option>[email protected]</option> <option>[email protected]</option> <option>[email protected]</option> </select> Under the listbox there is a textarea: <textarea id = 'copydata'> </textarea> And underneath the textarea is a button: <button id =...

Javafx exception when trying to copy fire

javafx,copy,fileutils
I've got a javafx application, what I'm trying to do is to copy one folder with a different name in the same folder if that makes sense. My application starts normally and I've got a set of buttons on my first stage/scene. I'm trying to get this to work by...

How do copy just text values of cells in Excel

excel,copy
I have a simple copy button in a worksheet with the code. Range("A9:E19").Select Selection.Copy I've noticed recently that when pasting the result into an email I get the cells too and not just the text values. I've read a lot of posts relating to pasting values back into excel but...

Excel Macro, Copy Cell to a location if a cell has a value

excel,vba,copy
I am looking for some help with excel Macros eg. If a value is found in Desc that matches Bill/car/rent/tax the Cost value copied to the correct column. Cost Desc Bill Car Rent Tax 155 Bill 165 Rent 195 tax Cost Desc Bill Car Rent Tax 155 Bill 155 165...

Comparing Different File extension and Copying Files with PowerShell

powershell,pdf,copy,compare,rtf
Scenario: *.pdf in Folder1 *.rtf in Folder 2, both folders have the same file name but with different extensions. Need to Compare the two folders and copy over only the *.rtf that equal => from Folder2 to Folder3. Script: Compare-Object (Get-childitem $Folder1 -Recurse | foreach-object {$_.basename}) (Get-childitem $Folder2 -Recurse |...

Copying file from host to container

shell,copy,docker
I am trying to copy a set of files from docker host to container. On a AUFS system directly going into /var/lib/docker/aufs/... works. However I am another system with Fedora that has devicemapper as the storage driver. On this system if I do this: [[email protected] tmp]# docker inspect -f '{{.Id}}'...

Copy textfile using fwrite, ending up with trash? C

c,copy,fwrite
Iam trying to copy a text file to a new file. I was thinking that if I want to do it smart, I just copy everything binary so the copy will be identical to the first. However I'am ending up with weird character in the new document. #include <stdio.h> #include...

Is it faster to write Images into a new file or to copy them?

java,image,performance,io,copy
I'm currently developping a software which uses images. The soft loads them from the HD and uses them but it doesn't modify them. Consequently, I have some Images instanciated into the RAM. In a particular case, I have to write those pictures on the hard drive (but in a different...

Copy cell J1 from multiple files and paste into column of masterfile

excel,vba,excel-vba,copy,paste
I currently have this code which will take files from a folder, open each one, print its name into the first column of my "Master file" close it and loop through the entire folder that way. In each file that is opened, there is information in cell J1 that I...

Moving Data from Matrix A to Matrix B in R

r,matrix,replace,copy
I want to cut/move/replace some data (to be precise 2500) from Matrix A to Matrix B in R. for example Move cell(i,j) from matrix A to cell(i,j) in matrix B. both i and j have some fixed value(50 to be precise) and replace that cell(i,j) in matrix A with "0"....

Is there any way to access variable like $var (similar to shell scripting) in python?

python,shell,variables,copy,language-comparisons
Hi I'm new to python programming. I want to copy a file from source to destination. I'm using shutil.copy2(src,dst). But in src and dst path , I want to use variable. For example (variable name): pkg_name = XYZ_1000 so src path will be : /home/data/$pkg_name/file.zip In shell we can use...

Custom copying dynamic array

c++,arrays,copy
How can I copy dynamic array like that: Copy all elements of array, but start in second array not from 0 index, but from first. //We have array x, which have 5 elements, and array y, which have 6 elements; y[1]=x[0]; y[2]=x[1]; //etc... P.S. Don't want copy element by element,...

Vim: copy a word any number of words away

vim,insert,copy,editor,keyboard-shortcuts
Just supposing the cursor is at the underscore '_': line one function Abracadabrabrabra() = { line two stuff _ line three more longWordIdoNotWantToType } And I want to insert Abracadabrabrabra, or maybe longWordIdoNotWantToType, or both, is there some way I can do it like this: execute a magic key command,...

How to attribute to a slice of a pandas Dataframe pointed by a variable?

python,pandas,copy,dataframes,slice
The following commands show how to attribute to a slice: In [81]: a=pd.DataFrame([[1,2,3],[4,5,6],[7,8,9]]) In [82]: a Out[82]: 0 1 2 0 1 2 3 1 4 5 6 2 7 8 9 In [83]: a.loc[1] = [10,11,12] In [84]: a Out[84]: 0 1 2 0 1 2 3 1 10...

Is there any way to copy a directory to another path using guava library?

java,directory,copy,guava
I know there is a method -Files.copy()- using guava library to copy a file, but what's the way to copy a directory in other path? P.S: this question maybe similar to this question but I'm wondering if there is any other way except copying files one by one.

Copy cell content from a column to another column in matlab

matlab,copy,cell
How should I copy all my cell content in a column to another column in the same cell. e.g. a{1,1}=[1 2]; a{2,1}=[3 4 5]; a = [1x2 double] [] [1x3 double] [] then,I'd like to copy all cell contents of this column to another column say column 2 without copying...

fast converting Bitmap to BitmapSource wpf

c#,wpf,bitmap,copy,bitmapsource
I need to draw an image on the Image component at 30Hz. I use this code : public MainWindow() { InitializeComponent(); Messenger.Default.Register<Bitmap>(this, (bmp) => { ImageTarget.Dispatcher.BeginInvoke((Action)(() => { var hBitmap = bmp.GetHbitmap(); var drawable = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); DeleteObject(hBitmap); ImageTarget.Source = drawable; })); }); } The problem is,...

How to move a struct with promise inside it?

c++,copy,promise,move
Recently I have read a part of "Concurrency in action" book concerning parallel quicksort implementation. I tried to check the code mentioned in the book and received an error on this part: struct listPart { list<T> data; promise<list<T>> promise; }; listPart newLowerPart; ... parts.push(move(newLowerPart)); The compiler gives the error std::promise::promise(const...

How to copy an object in Scala?

scala,tree,copy,binary-tree
I have this tree structure sealed trait Tree case class Node(var left: Tree, var right: Tree, var value: String) extends Tree case object EmptyNode extends Tree and a Tree object called myTree. I want to make another tree with the exact same structure and values called otherTree, but myTree.clone() does...

Is Const important for Copy Constructor? [duplicate]

c++,class,oop,constructor,copy
This question already has an answer here: Why can a non-const reference parameter be bound to a temporary object? 2 answers I'm running this program on DEV C++ and it's showing error of const.. But In Visual Studio its working fine. Now is const important for copy constructor? #include<iostream>...

why jquery deep copy for localStorage doesn't work?

javascript,jquery,copy,deep-copy
What i get in localStorage is [object Object] but for other variables in javascript it does work. Sample Code: var some_hash = { "key1":"value1", "key2": "value2", "key3" : [{ "key3a": "value3a"}] } var deep_copy = $.extend(true, {}, some_hash) console.log(deep_copy) Object {key1: "value1", key2: "value2", key3: Array[1]} localStorage["help"] = $.extend(true, {},...

PostgreSQL COPY csv including Quotes

postgresql,csv,import,copy
This is a very simple problem, I am using the psql terminal command COPY as shown bellow COPY tbname FROM '/tmp/file.csv' delimiter '|' csv; However this file.csv contains data such as random|stuff|32" as well as random|other "stuff"|15 I tried to use the double quote to escape the quotes as the...

Grunt, cloud deployment and compiled files

node.js,express,gruntjs,copy,cloud
I've recently started exploring grunt and I've done so by trying out the https://github.com/ng-vu/ng-express-boilerplate seed. It uses a gruntfile to copy static assets, css, javascript to a destination folder with this code: dist_js: { files: [{ src: ['<%= app_files.js %>', '<%= vendor_files.js %>'], dest: '<%= dist_dir %>/public', cwd: '.', expand:...

C# Copy file or folder

c#,file,directory,copy,folder
I am trying to write a program to keep multiple folders in sync. To do this, I need to copy and delete files and subfolders. To me, it doesn't make a difference if an object is a file or a folder, I want to create all necessary parent folders and...

Logger logs 2 times instead of one time because of copy

c++,logging,copy,move
I am writing my own Logger. I know there are alot out there but i would like to write it myself. It has messages which get logged when they are leaving the scope. So if i call Logger::Error(__FILE__,__LINE__) << "some error" it gets logged directly since there is no assignemnt...

Using destructor in class

c++,class,constructor,copy,destructor
I've got a project in C++ that uses classes(quite basic elements). My class looks like this: class vehicule: public frane,public motor,public directie,public noxe,public caroserie { char tip[40]; int placfatacant,placfatatot; static const int placfatapret=18; int placspatecant,placspatetot; static const int placspatepret=15; public: vehicule() void settip(char) void verifauto() ;}; I've been told I...

Bash: copy file to the latest directory

bash,copy
I know that cd - goes back to the latest directory. Is there a similar shortcut for copying a file from the current directory to the latest directory?

Copying a 2D array to a dinamically allocated 2D array outside of the function

c,pointers,multidimensional-array,crash,copy
I have fullNames, which is a 2D array that has sorted full names in it and I want to copy its content into sortedNames, which is a 2D array that exists out side of this function. (I get ***sortedNames as a parameter). I dynamically allocated this array, but the copying...

Copy constructor for pointers to object

c++,pointers,constructor,copy
I'm kind of new in C++ classes and I need to make a copy constructor that uses pointers to object. My class looks like this: class test { int a; char *b; public: test() { a=0; b="\0"; } test(const test &p) { b=new char(strlen(p.b)+1); b=p.b; a=p.a; cout<<"The copy constructor works";...

Is it possible to copy a div from a website to another?

jquery,static,copy,clone,common-code
is it possible to copy a div from a site to another? Managing many websites I need to copy some static portions of code (e.g. a common footer) without having to go on every website and change it. I was looking to use jQuery, I know about the .clone() but...

How to copy everything from a Database . Pl Sql

database,oracle,copy,oracle-sqldeveloper
I am on SQL developer and I want to copy everything(I mean and the data) from one database to another. I tried with -->Tools-->Database Copy . But it copied only the structure without the data. Can someone help me.?

Copying folders simply C# [duplicate]

c#,copy,folder,copy-paste
This question already has an answer here: Best way to copy the entire contents of a directory in C# 15 answers Im trying to create a simple program that to help learn c# and to be semi useful for my self and expandable. http://imgur.com/pKR6v20 I type a path into...

Copy cell J1 from multiple files and paste into column of master file

excel,vba,excel-vba,search,copy
I currently have this code which will take files from a folder, open one each one, print its name into the first column of my "Master file" close it and loop through the entire folder that way. In each file that is opened, there is information in cell J1 that...

Copy the entire contents of a project in a folder of another project, when build (Visual Studio 2013)

c#,.net,visual-studio,copy,xcopy
I've a Visual Studio 2013 solution, within 2 projects PJ1 and PJ2. My goal is to copy the entire contents of PJ1 in a folder (myFolder) situated under PJ2. In addition, the copy must occur when I perform a build for PJ1. I tried with xcopy without results: xcopy /E...

copying edges with adjacent vertices and their properties using BOOST

c++,boost,copy,edge,vertices
I'm trying to copy an edge from a graph and add it to another (with all his vertices and properties), I make something like: if (!dataG.empty()) { auto const& gr = dataG.front(); // firslt graph in G_list auto ep = edges(gr).first; //first edge in gr vertex_t from = source(*ep, gr);...

Xcopy Script for Changing Directory

batch-file,directory,copy,xcopy
I'm currently trying to come up with a script to copy several files from one location to the operating location of a program and then launching the application. Currently I have this: xcopy /s /v /z "I:\test\20150520\Files\stmt" "C:\Users\test\Desktop\test2" PAUSE START C:\Windows\NOTEPAD.EXE This script seems to work without a problem but...

aws s3.copyObject return params with destination path

javascript,amazon-web-services,amazon-s3,copy
I am using aws s3.copyObject for moving a file from source to destination. How can I get the entire path of new destination. Is there any callback params of s3.copyObject which gives this result

Copy and Save As several sheets keeping fixed Sheet VBA

arrays,vba,loops,dynamic,copy
I have a workbook with 15 sheets and I'd like to Save As new Workbooks keeping "Sheet1" fixed. Like this, after save I'd have files wwith the following sheets: File 1: "Sheet1", "Sheet2" File 2: "Sheet1", "Sheet3" File 3: "Sheet1", "Sheet4" File 4: "Sheet1", "Sheet5" This is what I got...

Batch File Copy contents from one folder to another

batch-file,copy
I have the following folder structure : -folder1 - Folder2 - Folder3 -Folder4 -Folder5 - Folder6 - Folder7 - Folder8 -Folder9 -Folder10 - Some Files - package.bat @echo off set SOURCE="" set DESTINATION="oer_distribution\" REM ZIP app settings: set ZIP_EXE="C:\Program Files\7-Zip\7z.exe" set ZIP_EXTENTION=zip set ZIP_FILE_NAME=oer_distribution set EXTRACT_KEY=x set ARCHIVE_KEY=a set FOLDER_TO_ZIP=oer_distribution...

Drag and Drop xcopy

batch-file,copy,xcopy,nas
I need a batch script in which I can put files or directorys and they become copied to my NAS. I want to drag the file(s) or folder on the batch and then it does his job. Existing files or dirs should be override and i don't want to get...

Excel-VBA Copy image from worksheet1 to worksheet 2

excel,image,vba,copy,paste
I am having difficulty getting the code in the workbook attached to function as intended. Everything is working but it is copying the photo twice. Any suggestions? Basically, it looks at the master worksheet then creates a unique sheet for each supplier based on the date entered and copies over...

Does Python copy references to objects when slicing a list?

python,list,memory,copy,slice
When a list is sliced, are the references to its contents copied from the original list? I can imagine that this may not be necessary, but I read the opposite (mentioned in passing). This question matters for instance for the following idiom, in the case of a very long my_list:...

overwriting map with map possible with ?

c++,dictionary,stl,copy,transform
I would like to do the following but it seems it is not possible. I am no expert on STL. typedef std::map<int,int> CMap; CMap m1; m1[0] = 10; m1[1] = 11; m1[2] = 12; CMap m2; m2[20] = 30; m2[21] = 31; m2[22] = 32; std::copy( m1.begin(), m1.end(), m2.begin() );...

unwanted object property changed when changing another object property c#

c#,object,properties,copy,instance
from what i understand in other posts i know that my objects use same place in memory but how to separate these objects? i tried to use new but it didn't work or i didn't used it correctly. Note that i didnt paste setter and getter here. class Supermarket {...

Package Java 1.7+ Only Classes with JAR 1.6

java,eclipse,jar,copy,compliance
I have an issue where I want to copy Files from one directory to another directory. Path source = Paths.get(files[i].getPath()); Path target = Paths.get(dir.getName() + "/" + files[i].getName()); try { Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); files[i] = target.toFile(); } catch (IOException e) { throw new IOException("\t\tUnable to move " + files[i].getName(), e);...

Deep copy when Using ArrayList in java

java,arraylist,collections,copy,deep-copy
I know that it is a trivial matter but I want to ask this question. Suppose that I have a get method that returns an ArrayList of objects. First do we have to returns a copy of it? If so, does it have to be a deep copy of the...

Can someone please help explain this copy function works?

list,recursion,prolog,copy
copyList([], []). % base case copyList([H|T], [H|R]) :- copyList(T, R). I "sort of" understand how recursion works, but when I analysed this function, I got really confused. Can someone please explain, step-by-step what happens in this function and how it reaches the end using the example below: ?- copyList([1,2,3],L). ...

Dockerfile copy keep subdirectory structure

copy,docker,dockerfile
I'm trying to copy a number of files and folders to a docker image build from my localhost. The files are like this: folder1 file1 file2 folder2 file1 file2 I'm trying to make the copy like this: COPY files/* /files/ However, all files are placed in /files/ is there a...

copy data between specific tags using jquery

javascript,jquery,html,table,copy
I've a table like this: <table> <tr> <td class="type">Order</td> <td class="orderid">1002</td> <td><button class="copy">Copy Row</button></td> </tr> <tr> <td class="type">Order</td> <td class="orderid">1004</td> <td><button class="copy">Copy Row</button></td> </tr> <tr> <td class="type">Refund</td> <td class="orderid">1004</td> <td><button class="copy">Copy...

Java - Clone list that holds references to original List

java,list,copy,clone
I don't know exactly how copying a List in Java works. I have this code: List<String> copy = new ArrayList<String>(original); Would this make a new List called copy that just holds references to the objects in the original list? (This is what I want). Or would it make new string...

Command to make another folder/file rwiteable (Shell Script Android)

android,shell,copy
I want to copy a script from the first .sh file to another file. But when the .sh file is executed, it say Read-only file system. Inside the first .sh file this is the script echo "echo "|=================--=================|"" > /system/0211/0211syscheck.sh echo "echo "|====================================|"" > /system/0211/0211syscheck.sh I try this for copy...

Copying files with the names having a number within a range

regex,powershell,copy
I am unfamiliar with Powershell (besides its existence and way to run a powershell commands). I have a folder source. Inside that folder I have several files: image_001.jpg image_002.jpg ... ... image_250.jpg ... ... ... image_8000.jpg Out of these I want to select specific images, say from image_00001.jpg - image_00250.jpg...

Batch Deleting Files While Performing a Copy/Merge

java,batch-file,jar,copy
I have 2 files, "launcher.jar" and "camStudio.jar" that I need merged. I decided to try to do this using batch with the code: copy /b launcher.jar + camStudio.jar file.jar However, the resulting "file.jar" only contains the contents of "camStudio.jar". How can I prevent the files in "launcher.jar" from being deleted?...

SQL copying record with out specifying column list; ignoring Identity

sql,sql-server,copy,primary-key,identity
I'm trying to copy a record from TableA back to TableA, but using a new Identity. I don't want to specify column list as I have over 100 columns, and there may be more in the future. Id like a chunk of code that can run when/if things change. After...

The “trait Clone is is not implemented” when deriving the trait Copy for Enum

enums,copy,rust
The following code: #[derive(Copy)] enum MyEnum { Test } Is giving me this error: error: the trait core::clone::Clone is not implemented for the type MyEnum [E0277] Why is that the case, and how do I fix it?...

Batch - xcopy files older than x minutes

batch-file,time,copy
after a new file creation time of 20 min I want to copy all files with the extensions .txt from Folder New to Folder Target. (I want to copy olny files are older than 20 min) So far, it looks like this: set hh=%TIME:~0,2% set mm=%TIME:~3,2% set ss=%TIME:~6,2% set /a...

how to copy updated files to new folder and create directory as source if not exist?

powershell,cmd,copy,xcopy,robocopy
I was trying to compare files in 2 folders and copy those new and updated files to a diff folder, for example: newFolder has a\aa.txt (new folder and new file) b\aa.txt b\ab.exe (modified) b\ac.config (new file) aa.txt (modified) ab.exe (new file) ac.config oldFolder has b\aa.txt b\ab.exe aa.txt ac.config In this...

Insert tablerow and paste formula in it

excel,excel-vba,table,copy,cell
I have a question. The dutch forum coudn't help me out, so i'm posting this here. I have a protected Excel-sheet with a table in it. Users can add data to the table and insert and deletes rows. I have already a working VBA to insert (and delete) a row....

How to move folder/files with path names > 255 characters in Windows 8.1?

file,copy,windows-8.1,folder,move
I have looked around for ages, and the only possible way I have found is to use the subst method. I don't want to mess about with this. I simply want to copy/move a directory, X, to location Y. How can you copy/move a folder or file with path name...

Copy and paste visible cells only to variable row

excel-vba,filter,copy,paste
I am writing a VBA macro that copies a set of data,applies some filtering, then copies the filtered data to the next available row. My issue is with the last line "copyRange.SpecialCells(xlCellTypeVisible).Copy GAR070...." which sometimes works and sometimes doesn't bringing up the error: Runtime error '1004': Method 'Range' of object'_Worksheet'...

Fill Down until Last Empty Row or Next Filled Cell

vba,excel-vba,copy,autofill
I know how to code in order to fill down a column, but I have a few conditions that I can't find out how to implement. I want to fill down until the last row (that contains any value at all) or the next cell within the column that contains...

Is it possible to copy files to a FTP using File.Copy?

c#,file,ftp,copy
Is it possible to use File.Copy to copy a file to a FTP server? This is what I had in mind: try { File.Copy(@"C:/test.txt", @"myFTP URL"); MessageBox.Show("Copy Successfull."); } catch (Exception ex) { MessageBox.Show(ex.Message); } ...

Automatic copying of some value whenever it's changed in cloud code [ parse.com ]

parse.com,copy,cloud,pfobject
How to write in cloud code ( parse.com ) a short program that automaticaly copies value of a field of one PFObject to certain field of other PFObject (of different class than the original one) whenever the original field is being changed? For example I have some user's name and...

Copy a CVS project into another CVS project

maven,copy,migration,repository,cvs
In our CVS repository our projects look like this: - app-parent - app-backend - app-gui - app-common Now I want to represent the Maven structure of our projects also in our CVS repository. So the repository should then look like this: - app-parent - app-backend - app-gui - app-common How...

Copy to clipboard from Firefox add-on content script

javascript,firefox,copy,firefox-addon,firefox-addon-sdk
I want to write a content script in a Firefox add-on that will copy a string to the user's clipboard in response to an event. I know that I can do this with the Firefox clipboard API like this: var clipboard = require("sdk/clipboard"); var val = "Lorem ipsum dolor sit...

COPY cassandra table from csv file

csv,cassandra,copy,cqlsh
I'm setting up a demo landscape for Cassandra, Apache Spark and Flume on my Mac (Mac OS X Yosemite with Oracle jdk1.7.0_55). The landscape shall work as a proof of concept for a new analytics platform and therefore I need some test data in my cassandra db. I am using...

Copy file1 name inplace of file2 and add extra to it, but not copy file1 extention

java,file,copy,filenames,rename
How can i change the name of a file to match the original file and have extra txt in it, please see example below Original dataFile.txt thisNameNeedsToMatchDataFile.txt (but also have ".Step2" added in before the .txt) Desired output dataFile.txt dataFile.Step2.txt Any help would be appropriated thank you in advanced....

Freeing a copy of a pointer to malloc'd memory in C

c,pointers,copy,malloc,free
Couldn't seem to find an answer to my question elsewhere. Consider the code: int *ptr = malloc (sizeof (*ptr)); int *dummyPtr = ptr; free (dummyPtr); printf ("ptr: %p, dummy: %p\n", ptr, dummyPtr); As I understand it, free() takes in a pointer and makes it point to NULL aka (nil). I.e.,...

numerate new versions of a file copied into a folder

powershell,copy,rename
I have a file that is generated daily. It is generated with the filename dailyfile.dat. The file needs to be copied into a destination folder and numerated with a single digit that is one higher than the file already in the destination folder so that all files coexist and have...

Copying string from argv to char array in C

c,arrays,linux,copy
I have following code which copy argument string to char array. char *str = malloc(strlen(argv[1]) + 1); strcpy(str, argv[1]); printf("%s\n", str); Why when I pass following argument: $6$4MfvmFOaDUaa5bfr$cvtrefr I get: MfvmFOaDUaa5bfr Instead of whole string. Somewhere I lose first number. I tried various of method and every one works the...

Possible to save a file in AutoHotKey script?

copy,autohotkey
i want to save a .png file in to a AutoHotKey script, so that when i run the script it make the .png file. i tryed to open the .png with notepad++ and copy the text in to a FileAppend command but there are just to many """ and "%"...

git copy historical changes as new

git,copy
I have searched & tried a few things, but I can't figure this out. There are two files that were modified last month, RPT and SQL in a remote repository. Some aggregation functionality was removed in the modifications. The task is not to revert the changes, but to get a...

How to Copy (and increment) Multiple Instances of a File Using Batch File

batch-file,copy,backup,windows-ce,increment
I need to create a batch file that copies a file and increments it upon placing it at the destination. Example. copy C:\TEMP\MyDoc.txt E:\MyData\ Essentially, I need this copy command to copy every time I start it (which it does now just fine). I would like it to increment the...

Implementing ICollection.CopyTo in C#: deep or shallow copy?

c#,copy,clone,interface-implementation
I'm writing a custom class which implements IDictionary, and I'm not sure what to do about CopyTo. Should each element just be copied to the target array (shallow copy), or should I make a copy/clone of each element then place it in the target array (deep copy)?