5,114 questions
-2
votes
0
answers
65
views
Tkinter notes app not saving to JSON file — notes disappear on restart [closed]
I am building a Google Keep-style notes app in Python using tkinter. Notes appear on screen while the app is running, but when I close and reopen it they are gone. The JSON file is either not being ...
Advice
0
votes
2
replies
52
views
Windows Kernel Driver Persistent Flag Creation
Greetings all you Win32 kernel devs,
I would like to receive some recommendations as to how my driver can simply keep a "flag" that I can set/retrieve persistent after my driver is unloaded. ...
Best practices
0
votes
0
replies
63
views
What is the Best Approach to both Authenticate and Persist Authentication for Federated Systems?
For this setup, let's assume that here are no libraries to use (public/private/paid or otherwise) and so this task has to be completed without them. Also, let's assume that all communication between ...
1
vote
0
answers
95
views
Realm Database Operations Causing UI Hangs and Scroll Lag During Extensive Read/Write (iOS 16, SwiftUI)
I have severe UI hang issues whenever my sync worker is running. The app experiences:
Screen navigation freezes
Scroll lag and stuttering
Unresponsive UI during data synchronization
The root cause is ...
0
votes
0
answers
51
views
Why does my OAuth2 access token refresh on every API call after Docker deployment (works fine locally)?
I’m facing an OAuth2 token persistence issue in a Node.js backend.
Scenario
I have a Node.js backend that integrates with APIs using OAuth2.
I wrote a token manager that:
Stores the access token + ...
0
votes
1
answer
78
views
The redis command 'save' doesn't store immediately the snapshot on permanent memory
I'm trying to force the storing of a Redis snapshot on permanent memory by the command save.
The instance of Redis is configured to use RDB persistence with the configuration:
appendonly no
save 30 1
...
0
votes
0
answers
36
views
Why does Hibernate issue multiple SELECTs when saving entities with a composite primary key?
I'm working with Spring Data JPA and Hibernate, and I have an entity that uses a composite primary key via @EmbeddedId. Here’s the structure:
@Embeddable
public class CurrencyId {
private String ...
0
votes
0
answers
95
views
OpenIddict asociate refresh tokens with session
I’m migrating from IdentityServer4 to OpenIddict. Previously, I had functionality that associated refresh tokens with sign-in sessions. This was done so that refresh tokens could be revoked if the ...
0
votes
0
answers
43
views
JSPs and Tomcat Apache 8.5: Session IDs not persisting
So in the same server container on Apache Tomcat 8.5 (I got a new laptop from work, this problem wasn't happening on the older desktop), I have one form that calls ajax pages and I put an output of ...
1
vote
1
answer
94
views
How to correctly decode Saved Quests in SwiftUI using UserDefaults?
Intro to problem:
I’m building a task manager app where users create custom quests, earn points, and redeem rewards. I’m using UserDefaults to persist data. While rewards and points are saving and ...
0
votes
2
answers
96
views
Spring Hibernate is not removing rows from the join table
I have two main tables called Movie and Actor. A Movie can have multiple actors and vice versa. So I made a join table called MovieActor. The problem is that I can't seem to find a way to remove the ...
-1
votes
1
answer
130
views
Keycloak as container in Azure Container Group - make persistence of H2 db
I'm trying to deploy in a Azure Container Group two containers, one of keycload and the other of nginx in order to act as reverse proxy. I have a problem with the first one: keycloak. Specifically, I'...
1
vote
1
answer
74
views
Still, is tuple now a persistent data structure in Elixir or not?
Here, José Valim explicitly wrote that it isn't persistent.
But the official documentation here (5th para.) says otherwise, it seems.
I'm confused because I don't know how to check it myself yet. Can ...
1
vote
0
answers
28
views
@ObjectTypeConverter - Conflicting annotations with the same name
I have an @ObjectTypeConverter defined for one of my models like so:
@Column(name = "ACTIVE", nullable = false)
@ObjectTypeConverter(name = "shortToBooleanConverter", dataType =...
0
votes
1
answer
151
views
How to Retrieve Old Values of a Product in a PrePersistenceHook Before Saving Updates?
I'm working with a PrePersistenceHook in SAP Commerce (Hybris), where I need to access the old values of a ProductModel before saving updates. My goal is to compare the old and new values of specific ...
0
votes
1
answer
113
views
Cannot disable persistence of redis
I need to receive data from IoT sensors and store the latest data information in Valkey.
At this time, there is a logic that checks whether the key already exists, and if it does not, it logs the ...
0
votes
1
answer
223
views
Storing database to host disk in TestContainers and Postgresql
I'd like to run TestContainers with Postgres module so that Postgres stores data to host's disk. I'd like that I could start and stop testcontainer and data stored to the database would be persistent ...
0
votes
0
answers
26
views
How does JPA detect changes after persist() without a snapshot?
Why does JPA detect changes and generate an UPDATE query without a snapshot in the persistence context when calling persist() and modifying the entity?
Here’s an example:
Member member = new Member();
...
0
votes
1
answer
60
views
Custom Scikit-learn Model Persistence
I know there are several out of the box methods of saving the model.
However I want to save the model as a database blob.
I've seen examples where people extract 'coefs' etc from the dict of the ...
0
votes
1
answer
67
views
Not able to add new entitys to a set when including only entity id in equals method
I wanted to ask about having the equals method on entities.
Im running a setup where Im only comparing entites based on Id and thought this is best way to do things. However I realized that when ...
0
votes
0
answers
46
views
Hibernate does not rollback super class entity tables
I have an inheritance of type JOINED between User and RegisteredUser.
I have defined a unique constraint on the derived class entity (RegisteredUser).
When I create an object of the derived class and ...
0
votes
2
answers
115
views
Is there a way to IGNORE INDEX (PRIMARY) or FORCE INDEX in hql?
I have the below hql query:
@Query("SELECT es FROM EmailSubscription es "
+ "JOIN FETCH es.subscriber s "
+ "WHERE es.subscriptionTypeId = :typeId "
+ "...
0
votes
0
answers
202
views
SwiftUI App Not Persisting Images with @AppStorage and File System
I am building a SwiftUI app that allows users to add and view images, and I need to save these images so that they persist across app launches. I am using @AppStorage to store paths to the images ...
0
votes
0
answers
44
views
OneToOne Java persistence duplications
I have this structure:
Entity1 ->
Entity2 ->
Entity3
Performing save for Entity1 with letting persistence to save both, parent and child.
Entity 3 is already saved in DB, before ...
0
votes
1
answer
292
views
Redis cluster not recovering previously persisted data after host machine restart
Redis Version: v7.0.12
Hello.
I have deployed a Redis Cluster in my Kubernetes Cluster using ot-helm/redis-operator with the following values:
redisCluster:
redisSecret:
secretName: redis-...
0
votes
2
answers
456
views
Hibernate JoinColumn referencedColumnName
I have an Entity that uses an ElementCollection. I had troubles setting everything up but found a solution. Now I want to understand why this was required.
This is my entity
@Entity
public class ...
0
votes
0
answers
50
views
Restore Instance State without calling onCreate after rotation
I am working on an app to keep track of scores in a grid like format. I am using Kotlin and Room Database to store everything (playerId, gameInstanceId...). The storing works perfectly fine and every ...
0
votes
1
answer
61
views
How to save/retrieve Java HttpSession to/from WebSphere database
We have a standard J2EE/Struts internal web application that has been used in production for many years. We save many Java objects into HttpSession then retrieve them for one request to another. It ...
0
votes
0
answers
19
views
Flutter FirebaseAuth prevent Firebased from forcing logout
I have an app using Firebase Auth, iOS native, and the last build dates back 3 years ago. We used to save the refresh token to avoid having the user login every time the token expired.
I am porting it ...
0
votes
0
answers
52
views
CoreData Crash - Collection <__NSCFSet: 0x600000c6b030> was mutated while being enumerated
I am kind of performing an upsert (update or insert) operation after fetching from an JSON API for some entities which have many to one relations.
Eg: Sections contains Categories, Categories contains ...
0
votes
1
answer
2k
views
How to change Zustand storage from sessionStorage to localStorage or back based on the user selection
I need to be able to change Zustand storage at runtime, is it possible?
import { create } from 'zustand'
import { persist, createJSONStorage } from 'zustand/middleware'
export const useBearStore = ...
1
vote
2
answers
636
views
How to calculate the correct persistence diagram from a binary-mask-png using GUDHI
I'm trying to get the persistence diagram from a mask(for segmentation), and my codes are as follows:
import numpy as np
import gudhi as gd
import matplotlib.pyplot as plt
from PIL.Image import open ...
0
votes
1
answer
47
views
overloading var_export() to customize
I've a persistent library that should store objects in a database. So var_export() should store the type, pk, and db-version only. At the reverse it should recreated the object from the database using ...
0
votes
1
answer
196
views
Problem with attribute names in persistence with JPA
I'm having a problem trying to map database columns to DTO with JPA in my backend.
Some column names are not accepted, I don't know why. This began to occur after the use of quarkus.
When I set the ...
0
votes
1
answer
111
views
Fatal error when using python Ripser on 3D point clouds
I am attempting to analyze 3D CAD models (STP/STL) for voids and similar enclosed empty spaces. For this task, I have been using Vedo to convert STL to 3D point clouds, and was trying to run Ripser ...
0
votes
1
answer
127
views
Long running persist ends up with errors
This is my code trying to save data
` for (int i = 0; i < materialVersions.size(); i += BATCH_SIZE) {
int endIndex = Math.min(i + BATCH_SIZE, materialVersions.size());
...
0
votes
0
answers
21
views
sys.stdin.readline() in an inittab
I am using sys.stdin.readline() to to hang the execution of a Python script, to keep it persistent. When I put this script in an inittab and it comes time to log into Linux after rebooting, hitting ...
1
vote
0
answers
71
views
Hibernate @ManyToOne case insensitive
We have two Oracle tables like this:
TABLE_1
-------
CODE_TABLE_1 | LIBEL_TABLE_1
-----------------------------
code_table_1.1| libel_table_1.1
code_table_1.2| libel_table_1.2
code_table_1.3| ...
0
votes
2
answers
83
views
Cache response from a request in python
I'm writing some backend scripts in python that have to be coupled with a web interface that uses django.
The web application allows to view layers that comes from different web services. As part of ...
0
votes
1
answer
887
views
Making view persistent in order to keep buttons working after bot restart
I'm new to coding and I'm trying to make a role-assignment bot using discord.py. The idea is to have the bot send a message that includes an embed and buttons which can be clicked to toggle a role off ...
0
votes
1
answer
359
views
Spring state machine persistence does not work correctly
It seems that Spring State Machine persistence does not persist (or restore) a state machine properly if the state machine has at least four layer hierarchy.
I'm using Showcase state machine example ...
1
vote
1
answer
1k
views
Generate persistence mapping feature in IntelliJ IDEA has dissapeared?
I have recently upgraded to IntelliJ IDEA 2024.1. I work with the Hibernate framework and I used very often the 'Generate persistence mapping' feature from the Persistence window but it seems that ...
1
vote
0
answers
172
views
Persistence on Hadoop-Spark using Docker container
no way how create containers with hadoop and spark with persistence of data. Everytime shutdown containers (docker-compose "down") I lose al data inside of the hdfs file system.
I tried ...
0
votes
1
answer
38
views
is persistece context necessary to crud aplications?
For CRUD applications where each operation must perform a select operation for the database (except persist), is it necessary to check the persistence context?
Is there a way to avoid searching in the ...
0
votes
1
answer
333
views
Hibernate generic type handling
I have an Entity class which has a generic type field. I want this class to be saved and read from the database. Hibernate can't just take that generic type and save/read it, which is why it asks for ...
0
votes
0
answers
98
views
How to save the JavaScript runtime state
I want to be able to take a snapshot of a running javascript program, save it to a database, wait for some period of time, load back the state and continue the process execution. Is it possible?
0
votes
2
answers
102
views
Python: ContextManager for entity mutations?
I'd like to establish a code pattern that allows me to do something analogous to the following:
# Foo has getter-only properties
foo: Foo = FooRepo.get(id="foo_id")
assert foo.bar == "...
1
vote
1
answer
1k
views
persist multiple entities with reactive quarkus and hibernate/panache
As a newcomer to reactive quarkus/hibernate/panache, i would appreciate your feedback on how to persist entities in a loop to the database.
Let's assume that at some point we have a list of ...
0
votes
1
answer
65
views
How can gracefully omit existent ManyToOne relationship?
I have legacy code with lots of relationships in one entity in Hibernate.
Currently part of them are not using(there are null values for them in DB), but EntityManager query such as refresh() can ...
5
votes
1
answer
358
views
Do I have to flush a directory on Windows?
On Linux, it's well known that after:
creating a new file (creat(path,..), open(new_path,O_CREAT..)), or
deleting a file (unlink(path)), or
renaming a file (rename(src_path,dst_path))
One should ...