save

How to save the state of a dojo grid

I want the user to be able to save the state of their grid, so that their sort options, column widths (and order) are preserved for the duration of their visit. Does anyone know of a way of doing this? I have noticed that the dhtmlXGrid provides a cookie interface for doing this: http://www.dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid%3Acoo...

How to make an incremental update to a PDF

I need to make an incremental update (add some existing pdf pages) to an signed pdf, making the included signature still be valid (that cover the first page). I've seen some post's telling that is possible with PDFStamper (iTextSharp), but I'm unable to find a example out to make it append, some one can help? Thanks. ...

Win32: "Save as" dialog file name hint

Some "Save as" dialogs provide a default file name - how is it done? I know how to create basic "Save as" dialog: OPENFILENAME, GetSaveFileName, and all that. But where should I put the string representing, say the file name of currently opened file? I thought it would come from .lpstrFile but this is not the case... Update: I was not ...

Save Java frame as a Microsoft Word or PDF document?

I am working on a billing program - right now when you click the appropriate button it generates a frame that shows the various charges etc, basically an invoice. Is there a way to give the user an option of saving that frame as a document, either Microsoft Word, Microsoft Works or PDF? ...

What's the best way to save data locally in a WPF Application?

I'm building some WPF application to manage my time. I'd like to save time spans for work time on project for a calendar day. So my question is what's the best choice on how to save the data? I figured I could use an XML file, an Access database file or maybe a property. I´d like to save the data locally, so no SQL Server action in thi...

C# Save WinForm or Controls To File

I have been working on an application which allows the user to make a label template for printing purposes by adding label controls to a panel(which I use as a container). I have reached the point where I need to be able to save the template to a file which I can load into memory later for printing. Since the form is not serializable d...

cakephp save returns true but does not save

Hi, CakePHP is driving me nuts! Here is my code: if($this->Page->save($datavalue)) { $this->Session->setFlash('Page content updated successfully.'); } else { $this->Session->setFlash('Page content was not updated.'); } it always says updated successfully, but nothing is updated in the database. Here is the content of $datavalue: Ar...

in Django admin how can I know a boolean is set true for the first time only

I have a model that contains a boolean field representing the item's approval or not. I'd like to send an email when the box is checked. I understand how to override the save method and send the email if it's true but this will send an email every time it's saved. As I only want to send the email once, is there a way to check a boolean...

Python: saving output of a for loop to file

Hi, I have opened a file with blast results and printed out the hits in fasta format to the screen. the code looks like this: result_handle = open("/Users/jonbra/Desktop/my_blast.xml") from Bio.Blast import NCBIXML blast_records = NCBIXML.parse(result_handle) blast_record = blast_records.next() for alignment in blast_record.alignmen...

XmlDocument class is removing formatting, c#, .NET

Hi, i was wondering if anyone knows how to stop xmldocument.Save() from reformatting the document. Its not that the document is not formatted correctly with respect to XML, the particular document i am working with has lots of white space and things like that which - upon save - is all being removed. ...

WPF - Problems overwriting (re-saving) image when it was set as image source.

Good day all, I am having some trouble with image permissions. I am loading an image from file, resizing it and then saving it out to another folder. I am then displaying this like so: uriSource = new Uri(Combine(imagesDirectoryTemp, generatedFileName), UriKind.Absolute); imgAsset.Source = new BitmapImage(uriSource); This i...

Rails botches the SQL on a complex save

Hi, I am doing something seemingly pretty easy, but Rails is messing up the SQL. I could just execute my own SQL, but the framework should be able to handle this. Here is the save I am trying to perform: w = WhipSenVote.find(:first, :conditions => ["whip_bill_id = ? AND whip_sen_id = ?", bill_id, k]) w.votes_no = w.votes_no - 1 w.save ...

How do I save a web page, programatically?

I would like to save a web page programmatically. I don't mean merely save the HTML. I would also like automatically to store all associated files (images, CSS files, maybe embedded SWF, etc), and hopefully rewrite the links for local browsing. The intended usage is a personal bookmarks application, in which link content is cached in c...

save variable as txt but not in the server

how can i save some variables in a txt file for the user? dont want to generate and store in my server, just want to generate and then the user save on his pc, nothing changes on the server btw, is this operation heavy on resources? thanks ...

flash write ByteArray to file on the disk

Hi! I need to write a ByteArray to a file on local disk with Flash AS3. The flashapplication is run locally (it's a projector exe). I found the FileReference class with the save() function which works perfect. The only problem is, that this function opens a filebrowser and let's the user select where to store the file. However - i have...

How can I tell if I'm in beforeSave from an edit or a create? CakePHP

Hello, I have a model where I need to do some processing before saving (or in certain cases with an edit) but not usually when simply editing. In fact, if I do the processing on most edits, the resulting field will be wrong. Right now, I am working in the beforeSave callback of the model. How can I tell if I came from the edit or add...

stop 2nd question after save to XML format?

How can i get my Excel xls file that is password protected to stop asking me if i want to convert it to an XML file format? ...

ModelForm save fails

Hi, I am trying to save a modelform that represents a bank account but I keep getting a ValueError even though the form appears to validate. The models I have to use are: class Person(models.Model): name = models.CharField() class Bank(models.Model): bsb = models.CharField() bank_name = models.CharField() def __uni...

Flash - Why doesn't my SharedObject get saved on disk when closing IE?

I have a Flash application that uses SharedObject to save and read some data locally. As it is said everywhere Flash saves the data from the shared object to disk when the application is closed. And indeed it does when I test it with the stand-alone Flash Player or all of these browsers: Firefox, Opera, Safari, Chrome, Flock... But it do...

HABTM data not saving (cakephp).

Hello, I have two models related HABTM (documents and people). class Person extends AppModel { var $name = 'Person'; var $hasAndBelongsToMany = array( 'Document' => array( 'className' => 'Document', 'joinTable' => 'documents_people', 'foreignKey' => 'person_id', 'associati...