save

NSUserDefaults: Saved Number Always 0, iPhone

Hello all, I have looked at other answers and the docs. Maybe I am missing something, or maybe I have another issue. I am trying to save a number on exiting the app, and then when the app is loaded I want to check if this value exists and take action accordingly. This is what I have tried: To save on exiting: - (void)applicationWillTe...

MFMailComposeViewController and cancelling "save" action sheet?

i am using MFMailComposeViewController inside my iphone app. I notice that if i enter any text in the body and then press the cancel button, i am prompted with an action sheet with an option to save/don't save the unsent message. I have two questions: can I programmatically prevent the "save/don't save action sheet from appearing? MFMa...

Is there a way put a timestamp in the file header automatically when saving in Eclipse?

I am a PHP developer using Eclipse PDT. I would like a timestamp put automatically in my file headers whenever I save the file. Maybe as a replacement of a variable. Let's say I use this header in a file: /** * ${filename} * ${timestamp} */ When I save the file I would this to be replaced with: /** * Myfile.php * 4/20/2010 19:04...

Does Google App Engine allow creation of files and folders on the server ?

I know Google App Engine offers free space, but I wonder if it's for storing data in it's database only or does it also allow me to create files and directories on the server side to store my data ? For instance can I use the following method to save file ? public static void saveFile(String File_Path,StringBuffer Str_Buf,boolean Appe...

Problems saving a photo to a file

Man, I am still not able to save a picture when I send an intent asking for a photo to be taken. Here's what I am doing: Make a URI representing the pathname android.content.Context c = getApplicationContext(); String fname = c.getFilesDir().getAbsolutePath()+"/parked.jpg"; java.io.File file = new java.io.File( fname ); Uri fil...

Java: How to store Vector<String[]> in XML (or save in any other way)

Basically I have a proof-of-concept application that is a digital recipe book. Each Recipe is an object and each object has, among other fields, a Vector containing arrays. The Vector is the list of all ingredients in the Recipe while each ingredient has an array showing the name of the ingredient, the amount, and the unit for that amo...

problems with retrieving data that was saved outside of a grails webflow

Hi, this is actually connected to an earlier question of mine here. Anyway, I have 3 domains that look like this: class A { ... static hasMany = [ b : B ] ... } class B { ... static belongsTo = [ a : A ] static hasMany = [ c : C ] ... } class C { ... static belongsTo = [ b : B ] ... } In my GSP page, I call an a...

Oracle guid to other table

At the moment I'm writing a small conversion program, it will convert the primary key strategy to the using of GUIDs in stead of integers. This is a simple client induced requirement and I can't change that. I've added a substitute pk candidate of the RAW(16) to every table in the database and filled each record with a SYS_GUID(). I di...

ASP SaveToDisk method takes an incredible amount of time

This is a method in ASP Classic that saves a file to disk. It takes a very long time but I'm not sure why. Normally, I wouldn't mind so much, but the files it handles are pretty large so need this needs to faster than 100kB a second save. Seriously slow. (old legacy system, band aid fix till it gets replaced...) Public Sub SaveToDisk(sP...

iPhone App : Storing / Saving personal preferences once per App

Hi, I want to store / save personal preference settings like Email, Phone number for an App. I have few forms which send info by Email to my ID. I want to know the Email & Phone number of user so I can contact this person if need be. I don't want users to keep entering their Email ID & Phone No. everytime in each form. It's wise to take...

Java JTextPane Save

i was trying to do some simple text formatting using JEditorPane but then as knowledge grew i found JTextPane easier to implement and more robust. my query is how do i save the formatted text in JTextPane to file? it should be RTF or HTML or other.. as this file is not opened by the application again. it is a chat history text file wit...

How do I save a file generated by an OS X Dashboard Widget?

I've got a web app that I'm porting to an OS X Dashboard widget. The web app generates some data on the client side using JavaScript, and then, when the user wants to save it, sends it to a server-side script which relays the data back with the Content-disposition: attachment; HTTP header, triggering a save-file dialog in most browsers. ...

Java JTextPane RTF Save

i have the following code trying to save the contents of a JTextPane as RTF. although a file is created in the following code but it is empty! any tips regarding what am i doing wrong? (as usual dont forget im a beginner!) if (option == JFileChooser.APPROVE_OPTION) { ///////////////////////////////////...

Why can't I save my model with a generic relation twice in Django?

I got a model TrackedItem with a generic relation linking to any model it is supposed to track. If I do that: t = TrackedItem(content_object=MyModel) t.save() t.save() I get : IntegrityError: (1062, "Duplicate entry '1' for key 'PRIMARY'") Indeed, the first save has created an entry with "1" as a PK. But the second save should not...

In my cakephp project the save function is not working?

My controller action is: function add() { if (!empty($this->data)) { $this->Customer->create(); if ($this->Customer->save($this->data)) { $this->Session->setFlash('A new Customer has been added'); $this->redirect(array('action'=>'index')); } else { $this->Session->setFlash('The customer cannot be added this time. Tr...

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 ...

Grails - Simple hasMany Problem - Using CheckBoxes rather than HTML Select in create.gsp

My problem is this: I want to create a grails domain instance, defining the 'Many' instances of another domain that it has. I have the actual source in a Google Code Project but the following should illustrate the problem. class Person { String name static hasMany[skills:Skill] static constraints = { id (visible:false) s...

upload data and save it using ASIHTTP

I have a web page in which a value 'A' is constantly updated. I use ASIHttp to access the page contents and get this value 'A'. Based on A i calculate value X and i then i need to save this X to a webpage. I am able to get the data and am doing the calculation to get X. How do i upload and save the X to a webpage using ASIHTTP so that th...

Java: load an object saved on hard disk after refactoring => "class not found" exception :/

Hello, I'm developping an application in java that regulary saves objects onto the hard disk using this simple method: public void save(String filename) { try { FileOutputStream fos = new FileOutputStream(filename); GZIPOutputStream gzos = new GZIPOutputStream(fos); ObjectOutputStream out = new ObjectOut...

Facebook flash game data store method

Hy, i am currently working on a facebook game,the game is good and ready except the storing part!How do you suggest i should store my data!I will use a database, but what is the best way to get data from facebook and into my database trough flash?Thanks a lot! ...