Questions tagged [persistence]
For questions about persistence, i.e., storing variable values or function definitions beyond the lifetime of individual Mathematica sessions.
23 questions
0
votes
0
answers
20
views
Best practice to persist symbols between sessions and a problem with $Epilog [duplicate]
I often define functions like this in my notebooks:
ClearAll[f];
f[a_, b_, c_] := f[a, b, c] = f[b, a, c] = somethingExpensive[a, b, c]
where I use memoization to ...
4
votes
1
answer
112
views
Once[…, "location"] adds $CellContext` to all global symbols
For certain persistence locations, such as "Notebook" or "FrontEndSession", ...
0
votes
1
answer
83
views
How to count Kernel evaluations then call a function on every nth evaluation
On every nth (2) evaluation autoEval should invoke a function check[]. The thing which is supposed to listen for all ...
4
votes
1
answer
71
views
How to persist in a notebook the result of an imported spreadsheet? [duplicate]
I create data table in my notebook by importing a excel spreadsheet using:
...
1
vote
1
answer
50
views
Why is LocalSymbol treated differently inside a Module scope?
Wanting to persist credentials entered via a dialog. While doing so I wanted to scope them by prepending a type to the symbol name. Came across this behavior which I find odd:
...
0
votes
0
answers
66
views
Input field with a value that persists between sessions
Ultimately, I would like to have input field that will remember in front-end its last session value, while its related variable should not be local and should be dynamic.
Input field will be put in a ...
17
votes
2
answers
1k
views
How can I make assignments persist across sessions?
Yesterday, I imported a large set of data into a Mathematica notebook and stored each imported list of numbers in a function. For example, I would map a list like ...
4
votes
1
answer
57
views
How can I see what Get restored?
Say I save variables x, y, z using ...
2
votes
1
answer
490
views
Save trained NetChain between Mathematica sessions?
Let's say I have written a NetChain machine learning setup, trained the chain with NetTrain and obtained a model ready to ...
16
votes
1
answer
262
views
Persistent storage for packages
How can I implement persistent storage for packages/applications? For example, how can my package have settings which persist across sessions?
I have implemented this more than once in the past. ...
9
votes
2
answers
185
views
Problem with LocalSymbol
Bug introduced in 10.2 and fixed in 11.1
I have found that LocalSymbol will sometimes create and store persistent data in a directory different from and off the ...
1
vote
1
answer
246
views
Persistent memoized functions [duplicate]
I'm inspired to make use of "remembering the function values" technique from here:
Functions that remember their values
The only question is: how can I save the function, along with its values stored ...
3
votes
0
answers
89
views
Get list value without displaying it on screen [duplicate]
Having this code:
...
0
votes
0
answers
46
views
How can I "save" a function? [duplicate]
If I create a function, for example:
...
8
votes
3
answers
567
views
Friendly way to make previous large calculation results reusable in a new session
Very often, I need to do same calculations under different parameters for comparing the results. Every calculation may generate a large data set; for example, the calculation result of ...
3
votes
2
answers
524
views
How to store an InterpolatingFunction? [duplicate]
Assume I have obtained an InterpolatingFunction, say, as the result of solving of a differential equation, say, this one:
...
6
votes
3
answers
668
views
Save associations to a file and reload
I have many (say 2 for now) associations that I want to save to a file
...
4
votes
1
answer
152
views
How to preserve In/Out tags like what they did in documentation files
Every evaluation generates a pair of In[n]/Out[n] signs tagged before actual input and output. Like the following:
If I save the file, close it and re-open it, that In[n]/Out[n] signs will disappear (...
5
votes
1
answer
379
views
DynamicModule inconsistent behavior; was: DynamicModule persistent UI changes
Update:
I'll restate the question in hopefully more terse and clearer terms.
To illustrate the issue, run this and save the resulting notebook:
...
7
votes
4
answers
494
views
Are persistent variable values after the kernel is stopped possible?
Is there a way to make values of variables persistent even after the kernel is stopped?
Example, if I were to set up a list for which I append new list items (such as a check ledger, as a basic ...
67
votes
7
answers
19k
views
Saving data inside a notebook so that I don't have to run it again?
Piggybacking on this, I am somehow not fully convinced that I can't save data generated by a calculation in a mathematica file so that when I re-launch said file, I wouldn't have to run my ...
113
votes
6
answers
123k
views
How do I clear all user defined symbols?
Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?
53
votes
4
answers
7k
views
Saving Mathematica kernel state?
If I save a notebook, I only save what I see. That is, if I close Mathematica and reopen the notebook later, all previous calculations are lost, except for those things I've output. Now I know that ...