Questions tagged [persistent-data]
36 questions
                    
                    9
                    
            votes
                
                4 answers
            
        Javascript functional library with persistent data structures
I'm looking for a functional library with persistent data structures.  I only need nested arrays and dictionaries.  There are some functional javascript libraries, but they are not geared towards immutability.  I want to be able to write
var dict =…
         
    
    
        Adam Schmideg
        
- 10,590
- 10
- 53
- 83
                    8
                    
            votes
                
                2 answers
            
        Fitting a segment in a two-dimensional plane
I'm having troubles with the following problem
Given N x S grid and m segments parallel to the horizontal axis (all of them are tuples (x', x'', y)), answer Q online queries of form (x', x''). The answer to such a query is the smallest y (if there…
         
    
    
        Y N
        
- 811
- 1
- 6
- 22
                    5
                    
            votes
                
                1 answer
            
        Fully persistent linked list
Why isn't there any implementation (in C, C++, Java or even Python...) of a fully persistent (not necessarily functional) linked list that has a constant time/space overhead in the number of modifications?
The data structure I have in mind is the…
         
    
    
        Issam T.
        
- 1,677
- 1
- 14
- 32
                    4
                    
            votes
                
                3 answers
            
        Persistent data in a web app
What is the best way of storing persistent data ? I want to save the time the user was last active on the page.At first I used localstorage, then i switched to cookies because it seemed easier to use, now I'm thinking of storing it in a…
         
    
    
        andrei
        
- 8,252
- 14
- 51
- 66
                    3
                    
            votes
                
                2 answers
            
        Models with persistent state between HTTP requests
I want to create a web application with a model that persists between HTTP requests.  From what I understand languages like PHP treat each HTTP request as a brand new connection except for some global variables like SESSION; so each time the user…
         
    
    
        ace
        
- 865
- 2
- 15
- 24
                    3
                    
            votes
                
                1 answer
            
        What's the fastest way to calculate log of a power of 32?
Given that the language is javascript, and that the input is < 1073741824, what's the fastest way to obtain the equivalent to:
Math.floor(Math.log(len) / Math.log(32))
I've tried with an if:
if (len < 1024) return 1;
if (len < 32768) return 2;
if…
         
    
    
        BenG
        
- 1,756
- 15
- 17
                    3
                    
            votes
                
                1 answer
            
        How to get the core data persistent store path in WatchKit Extension target
I developed a iOS app that uses Core Data framework and saves the persistent store in the application document directory.
Into the app terget I can retrieve the persistent store path using the following method:
- (NSString…
         
    
    
        Magurizio
        
- 300
- 2
- 10
                    2
                    
            votes
                
                2 answers
            
        Django : make a variable persistent
Basically I want to make a variable persitent in Django and I don't know how.
To be more precise, I want a user to choose a specific project when he logs in the site (via a ChoiceField for example). Then, for as long as he does not select another…
         
    
    
        Johanna
        
- 1,343
- 4
- 25
- 44
                    2
                    
            votes
                
                2 answers
            
        How to put file manually to iOS persistentDataPath?
{to the point}
So I want to create some Quiz Game on Unity that the questions data using external file (in this case I using JSON). I want to keep my questions data can access/edit by myself separately. And then I just have to copy-paste it manually…
         
    
    
        Shiro
        
- 25
- 2
- 8
                    2
                    
            votes
                
                2 answers
            
        What exactly does this Standard ML code do?
I'm reading Chris Okasaki's purely functional data structures, and there's one example I am having trouble with.  It is located here.  In particular, I don't understand how the rotate and exec functions work:
fun rotate($Nil, y::_, a) = $Cons (y,…
         
    
    
        Jason Baker
        
- 192,085
- 135
- 376
- 510
                    2
                    
            votes
                
                3 answers
            
        Does anyone have or know of a persistent prefix trie available in F#?
The performance of F#'s Map and Set are pretty lacking for my particular application. It seems a nice prefix trie would step up performance in my interpreter a good bit, especially in terms of symbol lookups by name. The only caveats are that it…
         
    
    
        Bryan Edds
        
- 1,696
- 12
- 28
                    1
                    
            vote
                
                2 answers
            
        Persistent variable on iframe?
I have a 
                     being dynamically created, and it contains an 
                    1
                    
            vote
                
                0 answers
            
        Persistent data when editing an existing array in swiftui
I am trying to figure out how to make two things work together. The first is persistent data using userdefaults, which I have figured out by using @Published and @Observable, then using JSONencoder/decoder to get that data to save even when the app…
         
    
    
        Laren
        
- 37
- 1
- 8
                    1
                    
            vote
                
                1 answer
            
        Persistent button color changes in C# WPF
I am designing a simple application in C# and WPF with multiple buttons that change their color when clicked.
Each individual button changes colors independently to red (1st click) and then to green (on the 2nd click).
I am looking for a way to make…
         
    
    
        PaperClip
        
- 39
- 5
                    1
                    
            vote
                
                1 answer
            
        Android - Persist data retrieved from Firebase
I have an activity and a model called CourseDetails.
String getData;
DatabaseReference mRef = FirebaseDatabase.getInstance().getReference().child("courses").child("Business");
mRef.addListenerForSingleValueEvent(new ValueEventListener() {
   …
         
    
    
        Lorek Bryanson
        
- 195
- 1
- 7
- 22