saving-data

What is the most appropriate way to store user settings in Android application

Hi, I am creating an application which connects to the server using username/password and I would like to enable the option "Save password" so the user wouldn't have to type the password each time the application starts. I was trying to do it with Shared Preferences but am not sure if this is the best solution. I would appreciate any ...

Strategies for preserving form data ( on tab/browser close )

I have an issue with a task management application where occasionally users close their browsers/tabs and the information which they type goes away because they accidentally close a browser/tab, resulting in the loss of the text which they've entered ( and some can spend half an hour entering in text ). So I have to provide a solution, ...

NHibernate update reference

Entities We have an entity called Product which is loaded using NHibernate. Product has a category which NHibernate happily populates for me. Database In the database, Product has a foreign key for category. Scenario User edits this Product (via a web interface) and chooses a different category (say instead of "Fish" we select "Veg...

Saving Ajax Form Data Best Practices

I am just wondering what general best practice is for saving data in Ajax Forms. In Spree ECommerce for example, every time you change a value in a list of objects (say you change the quantity of a certain Item in an Order), it updates the database with an Ajax call. Is it better to have the User manually press "Save" or "Update" when ...

Saving Data from Drupal to Local System File

I have created a drupal module which displays some reporting data. I would like to include an option that enables a user viewing the page to save data as a txt or csv file on their local system, but I am running into the following problems: How to specify local directory to save to. How to actually save the data to the directory. I'...

saving thumbnail when they don't exist in asp.net

I wrote an ashx handler to return a thumbnail image and in order to avoid the cost of having to re-create the thumbnail every time it is requested, I save it to the disk. so next time a certain thumbnail size is requested, I check if it exists first. If it does I create the thumbnail,save it, create an image object from the saved file an...

Rails: saving a string on an object -- syntax problem?

Hey there, I am trying to write a simple function to clean a filename string and update the object. When I save a test string it works, but when I try to save the string variable I've created, nothing happens. But when I return the string, the output seems to be correct! What am I missing? def clean_filename clean_name = file...

[GWT 2.0.3] Accessing data across sessions

Hello, first timer here! I've recently adopted the GWT framework and I've run into trouble. I'm creating a simple web-app which provides an input textarea and a list where the written articles are listed, a guestbook application if you will. Now the problem is that I can't figure out how to maintain the list in a servletContext() - a g...

Is there away to store info, without a database?

HI, I was wondering is there any way to store data, like say I wanted to make a login form and save the usernames and passwords, without using a database or .txt file? Seems like alot of work to set up stuff like that, for something simple, and I was just wondering if there was another way. :) And if any one has some tutorials on how to...

Saving NSString to file

I am having trouble saving simple website data to file. I believe the sintax is correct, could someone help me? When I run it, it shows that it gets the data, but when i quit and open up the file that it is supposed to save to, nothing is in it. - (BOOL)textFieldShouldReturn:(UITextField *)nextField { [timer invalidate]; startButto...

Where is the Documents directory in iphone sdk

I am trying to save a .txt file to the documents directory in order to read and write to it. Is the documents directory the same as resource? If so, what is working code that will let me read and write a NSString to that .txt file? I want to actually know where in xcode, either resources or wherever, that i can create that .txt file. ...

(Django) saving string to EmailField raises 'invalid literal for int() with base 10'

In my user's data edit form I have a boolean field, for adding/removing email from newsletter. I've written a custom save method for this form : def save(self, *args, **kwargs): mail = None if self.cleaned_data['inf_newsletter']: mail = NewsletterEmails(self.instance.user.email) mail.save() else: ...

iphone avoid save state

Hi all! In my app I need to avoid the saving state, in fact, I whis that each time the user starts the app, the app will be relaunced like the first time... how can I do? ...

Changing and saving NSMutableDictionary values

I have a StateArray.plist set up with 50 dictionary entries each containing a string with the name of the state and a number 0. What I want to be able to do is change the 0 to a 1 through a segmented control and save the updated plist and segmented control position. The code I have is below. Here is my .h file #import <UIKit/UIKit.h> #...

Objective-C NSUserDefaults: HighScoreManager, why doesn't this work?

My app won't save the data or load the data, it just crashes, I wonder what I'm doing wrong in my High Score Manager class. I'm going to post my class's .h and .m file: .h #import <Foundation/Foundation.h> @interface Score : NSObject { NSString *name; NSNumber *score; } @property (assign, nonatomic) NSString *name; @property...

Saving Images to folder | PHP

I want to be able to open the provided URL (which is done via a form) that is an URL that will allow the server to save the file into a directory, for example: http://www.google.co.uk/intl/en_com/images/srpr/logo1w.png I want to save that logo into this directory: img/logos/ Then it will add it to the database by giving it a random...