saving

Problem wiht wrong file format (gif insted of jpg) when saving images from server - PHP

I am using this peace of PHP code to save and rename some images. foreach ($phones as &$value) { $link_img = $handle = @fopen($link_img, "r"); if ($handle) { while (!feof($handle)) { $buffer .= fgets($handle, 4096); } fclose($handle); $filename = "files/nokia_".$pho...

Objective-C / Cocoa: Uploading Images, Working Memory, And Storage.

Hello. I'm in the process of porting an application originally in java to cocoa, but I'm rewriting it to make it much better, since I prefer cocoa a lot anyway. One of the problems I had in the application, was that when you uploaded images to it, I had the images created, (as say an NSImage object) and then I just had them sitting in ...

[Matlab] Saved EPS image different than plotted chart

I'm creating some plots in matlab and then saving it as EPS images. What is important, I create sets of 4 images, take the 'YLim' value from the first image, and then set it to the other 3 images. I do it to force the same Y-axis limits for each image in the set. So for the first image, I create some figure, plot something on it, and...

Silverlight stop page closing before being saved

Here's a question for all you Silverlight guys. In the old days for WinForms, if your user was creating/editing some information in a DialogBox, it was easy to detect the Window closing and if the data was dirty, ask if they wanted to save. My question is, how do you approach this scenario in Silverlight where everything seems to be do...

saving in programmer-defined folder in C#

I'm trying to save a picture in a relative path of my project. I want it to be in a folder called "images". By using this code theImage.Save("\\images\\image.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); I realized by testing with an absolute path, that the folder "images" must exist for it to work. problem is, I don't know what the...

Check if writing to a file is finished

Hi, I am currently writing a plugin in C++. For my functionality I ask the API to save out a file. The API gives me a return value when the file is written... or so it seemd. The problem is, that this return value is returned too early so that I can not be sure, that the file is written completely. Is there a possibility of checking t...

Sharepoint 2007 : Saving Form data with page redirection using custom parameters.

HI Experts, After saving the form data I would like to REDIRECT to different pages based on the @Status value using the input type button. input type="button" value="Save" name="btnSave" id="btnSave" onclick="{ddwrt:GenFireServerEvent('_commit;_redirect={*Confirm.aspx?ID=1}')};" />* if @Status == "Draft" url = "draft.aspx ? ID = " ...

C# Batching Process?

Can every body tell me by simple answer where & what i can create a batch process for ordinary operations such saving, changing file properties and so... ...

Saving model object in django throws no error but attribute value doesn't change

Hi. I get a model object, change an attribute, save it and it still has the old attribute: >>> g = SiteProfile.objects.get(pk=3) >>> g.renew_date datetime.date(2010, 4, 11) >>> g.renew_date = date.today()+timedelta(days=365) >>> g.renew_date datetime.date(2011, 4, 11) >>> g.save() >>> g.renew_date datetime.datetime(2010, 4, 11, 16, 57,...

Saving html page from MATLAB web browser

Following this question I get a message on the retrieved page that "Your browser does not support JavaScript so some functionality may be missing!" If I open this page with web(url) in MATLAB web browser and accept certificate (once per session), the page opens properly. How can I save the page source from the browser with a script? O...

What's the best way to keep java app data stored redundantly in a file?

If I have systems that are based on realtime data, how can I ensure that all the information that is current is redundantly stored in a file? So that when the program starts again, it uses this information to initialize itself back to where it was when it closed. I know of xstream and HSQLDB. but wasn't sure if this was the best option ...

Problem in JSF2 with client-side state saving and serialization

I have a problem in JSF2 with client side state saving and serialization. I have created a page with a full description and a small class diagram: http://tinyurl.com/jsf2serial. For the client-side state saving I have to implement Serializable at the classes Search, BackingBean and Connection. The exception that was thrown is: java.io...

cakephp not saving update value to related table, but no errors

Update order function finds all orderlines of current order. Loops through subtracting quantity ordered from stock level and holding new stock level value in $newstock. All good. But won't save. Echoes "success" and the correct value but the database is not updated. The Order status field does update, with the same code syntax. It also ...

[Iphone] - Problem in saving file using NSCoding

Hi everybody, I've a problem with Iphone programming... I've a NSMutableArray containing object of type "MyClass". MyClass has some parameters, like NSNumber and NSString. I've followed the Apple Tutorial about coding and decoding object using NSCoding, but when I try to decode the file I've stored, the NSMutableArray contain object of...

How can I save an NSDocument concurrently?

I have a document based application. Saving the document can take a few seconds, so I want to enable the user to continue using the program while it saves the document in the background. Due to the document architecture, my application is asked to save to a temporary location and that temporary file is then copied over the old file. How...

C# images cropping,splitting,saving

Hi, as stated in subject, i have an image: private Image testing; testing = new Bitmap(@"sampleimg.jpg"); I would like to split it into 3 x 3 matrix meaning 9 images in total and save it.Any tips or tricks to do this simple? I'm using visual studios 2008 and working on smart devices. Tried some ways but i can't get it. This is...

How can I save all the variables in the current python session?

Hello, I want to save all the variables in my current python environment. It seems one option is to use the 'pickle' module. However, I don't want to do this for 2 reasons: 1) I have to call pickle.dump() for each variable 2) When I want to retrieve the variables, I must remember the order in which I saved the variables, and then do a ...

Javascript: Save json data as a file on the server / user's hard disk.

I have developed an app that allows the user to fill out text fields with information. I want them to be able to press a button that will make a file with data (a really long array with info on what they typed and where it should go) so they can reload the data at a later date. I don't have a server now, and I am sending this app as a st...

saving figure to eps format without using imshow

Hello, There have been some posts here regarding image processing but I don't think that this question has been asked here. I have Matlab but not the image processing toolbox. I've tried to compress a figure and I want to save the result in the eps format. I have looked at imwrite but it doesn't have the eps format. Any suggestions...

Using terminal to record/save a data stream

I want to be able to save a data stream which i am returning using the curl command. I have tried using the cat command, and piping it the curl command, however i'm doing it wrong. The code im currently using is: cat > file.txt | curl http://datastream.com/data Any help would be appreciated. ...