persistence

WinForms - which is easiest approach for persisting some data?

时光怂恿深爱的人放手 提交于 2019-12-30 03:21:07
问题 Just building my first WinForms application. Question - What's the easiest/best approach for saving some data between use of the application (e.g. list of URL with status & date/time in this case)? I don't see any need for a database. For example * Is just storing to text file easiest? * Or is storing to XML file just as easy in DotNet * How about Windows Registry - is this something generally to avoid? Is it's use compatible across all versions including Windows 7 * Database - probably

PHP Database connection practice

好久不见. 提交于 2019-12-30 00:41:12
问题 I have a script that connects to multiple databases (Oracle, MySQL and MSSQL), each database connection might not be used each time the script runs but all could be used in a single script execution. My question is, "Is it better to connect to all the databases once in the beginning of the script even though all the connections might not be used. Or is it better to connect to them as needed, the only catch is that I would need to have the connection call in a loop (so the database connection

React Native - Firebase auth persistence not working

可紊 提交于 2019-12-30 00:38:07
问题 Firebase auth does not persist logged in user and everytime I refresh or reopen app I have to sign in again. I have tried setting persistence to local and the callback does verify its set but the persistence is still no working For setting persistence I am using... //set auth persistence firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL) .then(function() { console.log("successfully set the persistence"); }) .catch(function(error){ console.log("failed to ser persistence: " +

Spring, Hibernate & JPA: Calling persist on entitymanager does not seem to commit to database

南楼画角 提交于 2019-12-29 18:44:52
问题 I'm trying to setup Spring using Hibernate and JPA, but when trying to persist an object, nothing seems to be added to the database. Am using the following: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="url" value="${jdbc.url}"/> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </bean> <bean id="entityManagerFactory" class="org

Spring, Hibernate & JPA: Calling persist on entitymanager does not seem to commit to database

妖精的绣舞 提交于 2019-12-29 18:44:12
问题 I'm trying to setup Spring using Hibernate and JPA, but when trying to persist an object, nothing seems to be added to the database. Am using the following: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="url" value="${jdbc.url}"/> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </bean> <bean id="entityManagerFactory" class="org

one to many relationship in java google ap engine caused error ?

偶尔善良 提交于 2019-12-29 09:40:19
问题 i have implement a system to save information about user . So i have aggregation at my class so the user class has list from contact class ...etc in the first page "test it's just for register the user just by phone number " that must save the user in database but this cause error when i deploye my project in Google app engine < 500 server error > and the other page for update the exist user who previously has been registered, so at this will add to the list which the user object has . user

Persisting a trie to a file - C

こ雲淡風輕ζ 提交于 2019-12-29 06:19:46
问题 I have a trie which I am using to do some string processing. I have a simple compiler which generates trie from some data. Once generated, my trie won't change at run time. I am looking for an approach where I can persist the trie in a file and load it effectively. I have looked at sqllite to understand how they are persisting b-tree but their file format looks bit advanced and I may not need all of those. It'd be helpful if someone can provide some ideas to persist and read the trie . I am

iPhone-like Keychain in Android?

强颜欢笑 提交于 2019-12-29 05:05:40
问题 I'm looking for something like the keychain on the iPhone, but for Android development. Something that gives me the possibility to save small key-value pairs, that are persistent and unchanged even if the user reinstalls the application. Is there something like that? Can I use the standard preferences that way? I would like to achieve a behavior in a way it works with games on a PC writing the save games to another folder so that after delete and later reinstall they are not lost. Edit The

How to know if a detached JPA entity has already been persisted or not?

自闭症网瘾萝莉.ら 提交于 2019-12-29 02:46:09
问题 I have a JPA entity instance in the web UI layer of my application. I'd like to know at anytime if this entity has been already persisted in database or if it is only present in the user session. It would be in the business layer, I would use entitymanager.contains(Entity) method, but in my UI layer I think I need an extra attribute indicating whether the entity has been saved or not. How implement that ? I'm considering following option for the moment: a JPA attribute with a default value

How do I avoid 'Could not determine Hibernate dialect for database name [H2]!'?

最后都变了- 提交于 2019-12-29 01:46:10
问题 I am getting this error when running grails run-app : Error executing bootstraps: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name