Search Results

Search found 4 results on 1 pages for 'wong2'.

Page 1/1 | 1 

  • "IOError [Errno 13] Permisson denied" when copy a file on Windows

    - by wong2
    Hi, I wrote a program that will copy a file called a.exe to C:/Windows/, then I pack it to exe with PyInstaller, and rename the exe file to a.exe. When I run the exe file, it output IOError [Errno 13] Permisson denied: 'C:/Windows/a.exe', but the file a.exe was copied to the directory C:/Windows. Then I ran it as the Administrator, it happened again... At first, I copy the file with shututil.copy, then I wrote a function myself(open a.exe, create a.exe under C:/Windows, read a.exe 's content and write to C:/Windows/a.exe, close all), but it doesn't help...Any ideas?

    Read the article

  • Select photo while keep the order

    - by wong2
    I have a list of photo on the page, each have an unique id, user can click on them to toggle select the photo, when they click the submit button, I need to send the array of selected photo ids to the back end, in the order that the photo was selected. I think that the fastest way to track if a photo is selected is to use an object that use photo id as key, like: var selected = { "6272861": true, "6272888": true } when the user unselect a photo, I just need to delete selected["6272861"]. But this will ignore the order, if I use an array to keep the selected photos: var selected = ["6272861", "6272888"]; then when I need to unselect a photo, I have to loop through the array and delete the item. Is there better ways? thanks.

    Read the article

1