save

How to save video clip to Photos gallery - ios 8 & 9

大城市里の小女人 提交于 2019-12-24 13:39:35
问题 I had work out to save video clip to Photos gallery. Here the code as below, but it not working. Even though the saveVideo return true, but I open Photos gallery can not get the video clip. filepath is the location on local Document directory func saveVideo(filePath: String) { UISaveVideoAtPathToSavedPhotosAlbum (filePath, self,"video:didFinishSavingWithError:contextInfo:", nil) } func video(filePath: String, didFinishSavingWithError error: NSError?, contextInfo:UnsafePointer<Void>) { if

Using Javascript to save files in Photoshop without a prompt?

时光怂恿深爱的人放手 提交于 2019-12-24 12:47:07
问题 I am using a simple script to edit an existing image. No matter what I do, a save prompt always comes up. I want this to be 100% automated. save() gives me a saveAs prompt to save it as a copy. close(SaveOptions.SAVECHANGES) just gives me a generic "Do you wish to save before closing?" box that I still need to select Yes on. saveAs() gives me the same as save(), except I can toddle the "As copy" option off... but that still doesn't help. 回答1: Try this instead: // where fPath is your file path

Numpy.load() error when using different platforms

爱⌒轻易说出口 提交于 2019-12-24 11:29:58
问题 I'm using np.save/np.load to save my data into files and read from another script. Although the code is working properly under both windows and linux, there's a problem when i try to load my .npy files created in linux, with my windows setup. In both cases, i'm using python 3.6, with packages up to date (numpy version is same). I noticed that this happens only in arrays with dtype=object, and not other type of arrays. The error I get is "TypeError: _reconstruct: First argument must be a sub

Copying image from page results in black image

别等时光非礼了梦想. 提交于 2019-12-24 11:16:06
问题 I have a program that copies images from a webpage and saves them locally. On certain webpages the saved image is a completely black screen. First I thought it was a problem in the code that didn't take the good picture. So I started investigating. I went manually to those pages and tried to copy the image(right click, copy image) and it still returned a black image. Can someone tell me how can I bypass this from code? Here is the current code, which works fine for most of the pictures

Save rtsp stream into avi file with gstreamer

孤街浪徒 提交于 2019-12-24 09:48:44
问题 I have a video server which gives me a video & audio streams over rtsp. I can see it using gstreamer tool gst-launch with command: gst-launch-1.0 uridecodebin uri=rtsp://path/to/source ! autovideosink Now I need to store that video stream into file for subsequent playback in any popular video player (VLC, Windows Media Player and so on). I tried simply replace autovideosink with filesink location=file.avi and add -e option like recommended in that answer. File created but I think it's no in

Core data app does not save my data, why?

假装没事ソ 提交于 2019-12-24 09:15:31
问题 I am writing my first core data app. For some reason, my edits are gone after quitting and restarting the app. Saving, closing window, and re-opening (without quitting) retains the data. If I open the saved file in textedit, I see my edited field. Something must go wrong during reading. Perhaps I forgot to change a setting somewhere? Does anyone recognize this behavior? 回答1: Are you saving the NSManagedObjectContext after making changes to your model objects? Try NSError *error; if (!

Save a UIImage and reused it on UIImageview

那年仲夏 提交于 2019-12-24 08:38:37
问题 I currently have the ability to take a photo or load from the camera and place an image in the UIImageView in my app be i want the ability to have a button that will save the image so when i reload the app the image is still in the UIImageView. My though was a button to save the image once you have loaded it and in the -(void)viewDidLoad have the code to load the image that was saved but i don't know how to approach this. Any help would be fantastic. 回答1: You can convert images to NSData

Add a delimiter to end of each line of csv file MATLAB

非 Y 不嫁゛ 提交于 2019-12-24 07:53:58
问题 I am appending to a csv file. The current code outputs a line: a;b;c;d I need it to output a;b;c;d; notice the extra ';' at the end of d. That is essential matrix = [a,b,c,d] dlmwrite('matrix.csv', matrix, 'delimiter',';','-append','roffset',0, 'precision',14) any help would be appreciated. I have had to keep variables a,b,c and d as numbers, or it makes it a character vector (or something) which makes my csv look funny 回答1: I've always had problems with the MatLab inbuild CSV writing methods

How to toggle ListView item colors and Save it?

耗尽温柔 提交于 2019-12-24 07:28:03
问题 I'm working on an Attendance app. The app has ListActivity consisting of a list of students. I want to change color to RED and GREEN indicating absent and present. The problem is if I have long list of students than screen. The items that are down or up the current view loses color. Is my approach correct? How can I save the color of each individual list item. Of course if there is another best approch other than using ListView , I'm open to suggestions. Here is the ListActivity containing

Can local JavaScript edit/save files on same local machine? How using jQuery?

坚强是说给别人听的谎言 提交于 2019-12-24 07:25:08
问题 I'm building a little locally run CSS driven site map for auditing a huge intranet site. I've already coded the ability, to bring up a context menu which provides for options to make updates to the DOM of index.html. I would like to save these changes to index.html. I know JavaScript doesn't allow manipulation to the client file system, but I've also read in places that it is allowed if the JavaScript is retrieved from the local machine. Can anyone confirm this and point me in the right