copy

Noob file.copy question having issues copying .exe files C#

一世执手 提交于 2019-12-11 04:26:07
问题 I am trying to copy a .exe file from the temp directory to the desktop, however when I do so it just creates a new .exe which has no data in it and is 0 KB in size. I tested this syntax with a .txt file and it copied it completely, it just refuses to copy .exe files for some reason. I tried executing it using the the string path to make sure it was grabbing the correct location and that worked, executing the helloworld.exe program in the temp directory. Also I do not get any compiler errors,

Saving changes to newPic when copying an image in jython

Deadly 提交于 2019-12-11 04:23:56
问题 There are similar questions on Stack Overflow, but I cannot find what I am doing wrong in my code. def copyPic(): file=pickAFile() oldPic=makePicture(file) newPic=makeEmptyPicture(getWidth(oldPic),getHeight(oldPic)) for y in range(0,getHeight(oldPic)): for x in range(0,getWidth(oldPic)): oldPixel=getPixel(oldPic,x,y) colour=getColor(oldPixel) newPixel=getPixel(newPic,x,y) setColor(newPixel,colour) explore(newPic) When I use explore(newPic) or show(newPic) outside of the function, gives a

Copy prior month value and insert into new row

谁说胖子不能爱 提交于 2019-12-11 03:56:50
问题 Here is an example of the current table I have: 1) Table name: TotalSales Name Year Month Sales ------ ---- ----- ----- Alfred 2011 1 100 What I want to do is create a table like this, add a new row(Prior month sales): 2) Table name: TotalSales Name Year Month Sales Prior month sales ------ ---- ----- ----- ----------------- Alfred 2011 2 110 100 Not sure how to this, but this is what I have been working on: SELECT Name, Year, Month, Sales, Sales as [Prior Month sales] FROM TotalSales WHERE

How to copy hashset and hashmap, and does the Java use pointers?

怎甘沉沦 提交于 2019-12-11 03:56:21
问题 I have two questions: First: I have a function which returns a HashMap. To read the returned value, I write it like this: HashMap<Integer,String> hs=my_func2(); I do the same if the function returns a HashSet. HashSet<Integer> hs=my_func(); I wanted to know if in this way the returned value is copied into hs, or I should write a deep copy for it or I should write it like this: HashSet hs=new HashSet(my_func()); HashMap hm=new HashMap(my_func2()); Second quesion: I make a matrix by calling

Multiple files, same name

倾然丶 夕夏残阳落幕 提交于 2019-12-11 03:24:03
问题 I am trying to save a few files that all have the same name. I want to do something where the names do something like this: file.extension file[1].extension file[2].extension I have tried this http://www.naspinski.net/post/Saving-multiple-files-of-the-same-name.aspx but it didn't work for me. here is some code to look at(not the entire thing, just the relevant parts), { string thepathoflife = Path.GetFullPath(file); //CreatetheFolder(file) string filetocopy = file; object bob = file.Clone();

Noob to PowerShell, copying files within folder

非 Y 不嫁゛ 提交于 2019-12-11 03:12:29
问题 Sorry if this is a really simple process. I've got a folder structure with ~4,000 directories at root level (empty), and another location with another set of folders with data. I want to copy only the files from within the folders in location2 to the folders within location1 ie \FolderABC123\Archive, but only if the directory names match. I'm sure windows explorer copy, or xcopy or some other utility can do it with more ease, but I'd like to get my head into PowerShell, and think this would

Copy BitmapData From mx:Image

橙三吉。 提交于 2019-12-11 03:05:56
问题 How can I copy or duplicate the bitmapdata from a mx:image component? I need to display the same image in multiple screens of my application and don't want to have to download the image multiple times. I could just use a urlrequest to download the image as a bitmap and copy that but I like the way you can can just set the source of the image component. 回答1: Image extends SWFLoader which has a content property that will contain the Bitmap object that was loaded. Wait for the image to load,

Select text and copy from label xamarin forms

大城市里の小女人 提交于 2019-12-11 03:05:01
问题 I have for some days been reading on different forums about the issue of selecting a text and copying the text natively from a label in xamarin forms and it seems to be no straightforward way of implementing this. My problem is that I need to present a large amount of data from a book in a label and the user should be able to select and copy a chunk of text from the label. I moved on to present the data in an Editor component instead but then the user can edit the text in the Editor. Making

Copying files while preserving directory structure

早过忘川 提交于 2019-12-11 02:53:15
问题 One of our sites was recently hit by a CryptoLocker infection. Fortunately we caught it early and only have about 8k files encrypted out of the 200k or so on the file-system. Our backups were good too, so I can restore the files I have a list of all ~8k of the encrypted files in roughly the following format, one file per new line: \\nas001\DATA\IQC\file.xls \\nas001\DATA\IQC\file2.xls \\nas001\DATA\IQC\folder1\file1.xls \\nas001\DATA\IQC\folder3\file1.xls I did an ndmp copy of a snapshot of

Linux bash script to copy files

烈酒焚心 提交于 2019-12-11 02:49:24
问题 I need script to copy on cron basis a list of files. Files selected on name/datetime pattern and to name of file destination must by appended data like ddmmyyy. It is not problem copy files or directory, but problem to change name of each file according to its data. May be exists some open source solution? Thanks. 回答1: You haven't provided enough information for me to give you real working code; but you can do something like this: file=dated_log.log ddmmyyyy=$(read -r < "$file" ; echo "$