I need to save and load properties of a Class dynamicly,
but what is the best practis for this ?
I have for now, two classes that I need to save.
public abstract class BaseComponent {
protected int ComponentID { get; set; }
protected string ComponentName { get; set; }
protected Dictionary GetAllProperties{) { /* Reflection *...
I'm try to insert or update db record with following code:
Category category = new Category();
category.setName('catName');
category.setId(1L);
categoryDao.saveOrUpdate(category);
When there is a category with id=1 already in database everything works. But if there is no
record with id=1 I got following exception:
org.hibernate.St...
I save some strings and numbers to NSUSerDefault,
but when I uninstall and reinstall the app the data is ereased.
Is there a possibility to store data some where else? Maybe in keychain?
...
I am using James Bennetts code (link text) to create a dynamic form. Everything is working ok but I have now come to the point where I need to save the data and have become a bit stuck. I know I can assess the data returned by the form and simply save this to the database as a string but what I'd really like to do is save what type of ...
Hi, i need to implement a "Remember password" option in my program, it works with client-server protocols that REQUIRE the entire password to be passed in the loggin process, not only Hashes, so i need to store the entire password locally. I searched all over the place but i found no conclusive answer or no answer at all. But since Email...
Hi All,
I am trying to save a rotated and scaled UIImageView as an UIImage in the position and with the zoom scale that the user edited too. But I can only manage to save the original image as it was before editing. How can I save the image as it is shown in the UIImageView with the same scaling and rotation? I have read that I need to u...
I have a model Calendar and in a form I want to be able to create multiple instances of it.
Here are my models:
class Event(models.Model):
user = models.ForeignKey(User)
class Group(models.Model):
name = models.CharField(_('Name'), max_length=80)
events = models.ManyToManyField(Event, through='Calendar')
class Calendar(mo...
I'm using Netbeans for Groovy/Grails development. I'm very new to Groovy/Grails and netbeans.
Netbeans doesn't save all changed files before a compile and run. I looked through every Preference setting, the help, etc, and can't find an option to save on build.
Does such an option exist in Netbeans? I waste a lot of time forgetting to s...
I have a couple of simple objects that have a many-to-many relationship. Django has joined them using obj1_obj2 table and it looks like this in mysql;
id | person_id | nationality_id
-----------------------------------
1 | 1 | 1
2 | 1 | 2
Now when I save obj1 (which shows obj2 in as Multi-...
When I press C-x s or C-x C-c, emacs displays the names of modified buffers one by one and asks what to do with each (save, diff, pass, ...). Pressing y one by one is slow. Pressing ! doesn't let you see what buffers are being saved.
How can I have the names of all modified buffers displayed first so that I can mark off some of them an...
Hi,
I am ssh connecting to a linux server and do some Matlab programming. I would like to save invisible plot as
figH = figure('visible','off') ;
% Plot something
% save the plot as an image with same size as the plot
close(figH) ;
saveas() and print() will change the size of the saved image different than the size of plot. Als...
Microsoft has made saving objects very easy with their LINQ to SQL mapping.
However, I would sometimes like something a little more lightweight, i.e. the ability to save objects to a file when an application closes, and read them back in again. XML seems like a natural data format rather than inventing a new data format. (Of course, on...
Hello,
I have an application that reads an rss feed, parses the xml and adds it to my database using Core Data (this is so the user can see the feed even if no internet connection is available) this all works fine. The way I am doing the parsing is: on the didStartElement i create a new Entity such as:
NewsDB *newsDB = [NSEntityDescrip...
I'm using a self referencing HABTM model with Participants. You sign up for an event and when you log in to your reservation/profile you see a list of other participants and you can choose to add yourself and others into various groups; share hotel room, share transportation from airport etc.
What I've managed so far:
1) In my profile...
Hi All
I am developing an application, i need date and time of the user who is accessing(ie Client's date time), how can i get it to server side........?
...
Hello,
I have an application that allows you to edit some percentages, however it will only let you commit those changes if the percentages add up to 100. However because the Core Data template includes the save code in the application will terminate. If the user changed something and then exited the application, the item would be of co...
Hi
Greetings
Iam exporting a crsytalreport to pdf using asp.net 2003.
On executing the pdf report is opened in the default pdf reader(adobe reader 9 in my case) which is embedded in the browser (ie 8 in my case)
I need the report only to be viewed and to take print out and should not be allowed to be saved.
Well I need a way to disab...
I'm trying to update a record using the ORM library built in to Kohana 2.3.4. I'm basically modifying the script I use to insert the record in the first place. My problem is the record is getting inserted again, not updated. Here's my script:
public function edit($id)
{
// Find the selected blog entry
$blog = ORM::factory('...
Simple question: can NHibernate save a collection without an iterator? For example:
var list = new List<Item>();
list.Add(1000 items);
session.Save(list);
Or do I have to do foreach over the list?
...
I have two generic save methods in a repository class:
public void Save<T>(T entity)
{
_session.Save(entity);
}
public void Save<T>(IEnumerable<T> entities)
{
foreach (var item in entities)
{
_session.Save(item);
}
}
However, when I use Save(collection) (which infers the type automatically), it recognizes it a...