Saving A Purchase In Swift 3

In my app, you earn coins to unlock more wizards to play as. I have set up how to purchase these wizards but when I close the app, the purchased wizards don't save and you have to buy them again. I know this is something to do with UserDefaults as I ...
more »

2017-03-17 13:03 (1) Answers

How to save to an INI file delphi

I have buttons which when clicked store their caption in a TStringList ChairList : TStringList; procedure TForm1.FormCreate(Sender: TObject); begin ChairList := TStringList.Create; end; An example of one button is: procedure TForm1.Table17Click(...
more »

2017-03-17 10:03 (4) Answers

Safely overwriting objects in R

I am working with fairly large S4 objects in R (~10GB). Often, I want to load them, do something to them, then save the results. Ideally, I would just overwrite the object using SaveRDS. For example: a = readRDS(object_file) a = do_something() saveR...
more »

2017-03-16 00:03 (0) Answers

Avoid crashing from shared drive

my program is located on a shared drive, but it can happen that the computer loses the connection to the shared drive, for whatever reason. the program would crash. is there a way to create a "cache" or something so that the program can still be used...
more »

2017-03-15 15:03 (1) Answers

sails many to many associations failing to save

My sails many to many associations have stopped saving changes, that is, if I deselect one of the items in my checkbox list, or select a new one, the changes are not saved (populated to the join table). It used to work, although I am not sure how lo...
more »

2017-03-15 08:03 (2) Answers

How to best save data which overlaps?

Say I have a text which is comprised of multiple chapters, which are comprised of multiple paragraphs, which are comprised of multiple sentences. In a JSON, I would maybe save this as follows: // Pseudo Code chapter { paragraphs { sen...
more »

2017-03-14 13:03 (2) Answers

float Image save in python

I have a resultant image of dtype float64 which i when display using matplotlib i have to do this plt.imshow(result, vmax =1400) then it shows image in perfect contrast. I like to save this image as images are in loop so i want to save them all in on...
more »

2017-03-14 11:03 (0) Answers

Laravel, how to save DomDocument to database?

I'm stuck with my project and i need your help! I'm trying to save domdocument variable to my database. I'm using Laravel 5.4 How do i save the following variable? $title = $dom->getElementsByTagName('title'); My Controller: TemporaryScan::c...
more »

2017-03-13 10:03 (1) Answers

Django create new record instead of updating

I have the following model class FooBar(models.Model): FOOBAR_ID = models.AutoField(primary_key=True) foo = models.CharField(max_length=255) bar = models.CharField(max_length=255) Moreover, I have created a form that allows me to edit ...
more »

2017-03-12 16:03 (2) Answers

Save data with limit to 3 only?

Accessing database data and limit to 3 rows only. I am new to laravel and i dont know how to limit access the rows.Anyone has idea how to get the result the ids 1-3 so that i will save it to my other table? Sample range of grade to save. Only grade...
more »

2017-03-12 16:03 (1) Answers

Zeppelin Save Dependencies Button Broken

I am running Zeppelin on an AWS cluster. I am trying to add the maven coordinates to spark under the interpreter tab. I've successfully done this before. Now when I hit "Save" the typical text bubble comes up: "Do you want to update this interpreter...
more »

2017-03-12 00:03 (0) Answers

How can I save multiple user input to a spinner?

I am working with c# on Xamarin, Visual studio 2015 to develop android app. I have a box where user have to input a string value then when a button clicked, I want this value to be added to a spinner and to be saved and reloaded for the next open so ...
more »

2017-03-11 15:03 (1) Answers

Save associated record in Ember

I am a beginner in Ember and trying to implement a simple post and comment app. I have a rails background and hence i'm using Rails API for this. I have followed a tutorial and i'm able to save a post, fetch all its comments and delete the post. ...
more »

2017-03-11 07:03 (1) Answers

How to overwrite INI file

I have this code which saves the location of Objects in an ini file but when I try to overwrite an already saved file, it doesn't delete the data currently in the file. I have a popup which asks the user if they want to overwrite but it doesn't cl...
more »

2017-03-10 11:03 (1) Answers

How to write text to a server-side file

So I'm trying to get my webpage to save some text to a server-side file. It's kinda like a guestbook, but I want it in a text file so I can review it before I put it on the site. I've been looking around, and from the looks of it, you can't do it wit...
more »

2017-03-10 04:03 (1) Answers

Downloading a bytearray with Flex 3/Flash 9

I am trying to save a file to a user specified location, but am running into problems with Flex 3/Flash Player 9. I originally made this work using Flash 4.6 with the following code: protected function pdfBth_printPDF(event:MouseEvent):void { v...
more »

2017-03-09 19:03 (1) Answers

Open image in gallery with Android Nougat

I want to open a saved image in gallery on Android Nougat but what I get is a black gallery page with message "Can't load the photo". That's my code: Manifest <provider android:name="android.support.v4.content.FileProvider" ...
more »

2017-03-09 19:03 (2) Answers

Save MoveIt! Octomap

I am running Ubuntu 14.04 and ROS Indigo. I want to access the OctoMap generated via MoveIt! and convert it in standard OctoMap format and save/process it. The following piece of code should do it: void cloud_cb(const moveit_msgs::PlanningScenePtr&a...
more »

2017-03-08 14:03 (1) Answers