Search Results

Search found 1017 results on 41 pages for 'persistent'.

Page 6/41 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Write Java objects to file

    - by Mark Szymanski
    Is it possible to write objects in Java to a binary file? The objects I want to write would be 2 arrays of String objects. The reason I want to do this is to save persistent data. If there is some easier way to do this let me know. Thanks in advance!

    Read the article

  • Install Lubuntu 10.04 to a USB Drive

    - by Nironan12
    I'm looking to install Lubuntu 10.04 onto my flash drive to test it out without the risk of altering my system which runs Windows 7. I think I need what is called a "persistant install", so that Lubuntu will run off of my flash drive and any changes made will stay there, unlike the demo feature of the CD.

    Read the article

  • Simplest distributed persistent key/value store that supports primary key range queries

    - by StaxMan
    I am looking for a properly distributed (i.e. not just sharded) and persisted (not bounded by available memory on single node, or cluster of nodes) key/value ("nosql") store that does support range queries by primary key. So far closest such system is Cassandra, which does above. However, it adds support for other features that are not essential for me. So while I like it (and will consider using it of course), I am trying to figure out if there might be other mature projects that implement what I need. Specifically, for me the only aspect of value I need is to access it as a blob. For key, however, I need range queries (as in, access values ordered, limited by start and/or end values). While values can have structures, there is no need to use that structure for anything on server side (can do client-side data binding, flexible value/content types etc). For added bonus, Cassandra style storage (journaled, all sequential writes) seems quite optimal for my use case. To help filter out answers, I have investigated some alternatives within general domain like: Voldemort (key/value, but no ordering) and CouchDB (just sharded, more batch-oriented); and am aware of systems that are not quite distributed while otherwise qualifying (bdb variants, tokyo cabinet itself (not sure if Tyrant might qualify), redis (in-memory store only)).

    Read the article

  • persistent view controller

    - by derrichh
    Im building an iphone radio application and I want to have the controls, play, pause, stop, etc. in a tool bar (a custom view controller) at the bottom of the application. I want to keep this there throughout all the views so you can control the audio while navigating through the other parts of the application (multiple view/table controllers). Is there a way to create a view that stays in place like a tab bar?

    Read the article

  • writing data onto a linux live-dvd

    - by stanleyxu2005
    I have a server machine with a dvd-writer. I want to burn a linux live-dvd (openSUSE is preferred) with a pre-configured web server, so that after booting the web server should be ready to serve. The web server has a sqlite database (with very less data). But after rebooting the system, all data in the database will get lost. Is it possible to store all necessary data onto this live-dvd as well? If it were a usb drive. I would create two partition and mount the second partition with read-write permission. But I have no idea how to create two partition onto a dvd Any hint is appreciated

    Read the article

  • Grid sorting with persistent master sort

    - by MikeWyatt
    I have a UI with a grid. Each record in the grid is sorted by a "master" sort column, let's call it a page number. Each record is a story in a magazine. I want the user to be able to drag and drop a record to a new position in the grid and automatically update the page number field to reflect the updated position. Easy enough, right? Now imagine that I also want to have the grid sortable by any other column (story title, section, author name, etc.). How does the drag and drop operation work now? Revert to page number sort during or after the drag and drop operation? This could confuse the user (why did my sort just change?). It would also result in arbitrary row positioning. Would the story now be before the row that was after it when the user dropped it? Or, would it be after the row that was before it? Those rows may now be widely separated after the master order sort. Disable the drag and drop feature if the grid isn't currently sorted by the page number? This would be easy, but the user might wonder why he can't drag and drop at certain times. Knowing to first sort by page number may not be very intuitive. Let the user rearrange his rows, but not make any changes to the page number? Require the user to enter a "Arrange Stories" mode, in which the grid sort is temporarily switched to page number and drag and drop is enabled? They would then exit the mode, and the previous sort would be reapplied. The big difference between this and the second option is that it would be more explicit than simply clicking on a column header. Any other ideas, or reasons why one of the above is the way to go? EDIT I'd like to point out that any of the above is technically possible, and easy to implement. My question is design-related. What is the most intuitive way to solve this problem, from the user's perspective?

    Read the article

  • Basic Client-Server Design for persistent connections?

    - by cam
    Here's as far as I understand it: Client & Server make connection Client sends server data Server interprets data, sends client data So on, and so forth, until client sends disconnect signal. I'm just wondering about implementation. Step 2 and 3 are confusing to me, maybe I'm over-complicating it. Is there anymore to interpreting the data than a giant switch statement? Any good books on client/server design? Specifically talking about multithreaded servers, scalability, and message design (byte 1 = header info, byte 2 = blah blah, etc)? Specifically geared towards C++.

    Read the article

  • Define Rails Model Persistent Attributes in Model File

    - by Kevin Sylvestre
    I recently played with MongoDB in Rails using Mongoid. I like the ability to define attributes for models within the model file (as opposed to in migrations): class Person include Mongoid::Document field :name, :type => String field :birthday, :type => Date end For projects that cannot use a schema-less database, does a similar feature exist? Any gems or plugins that generate schemas from a similar syntax would be greatly appreciated. Thanks.

    Read the article

  • A question about making a C# class persistent during a file load

    - by Adam
    Apologies for the indescriptive title, however it's the best I could think of for the moment. Basically, I've written a singleton class that loads files into a database. These files are typically large, and take hours to process. What I am looking for is to make a method where I can have this class running, and be able to call methods from within it, even if it's calling class is shut down. The singleton class is simple. It starts a thread that loads the file into the database, while having methods to report on the current status. In a nutshell it's al little like this: public sealed class BulkFileLoader { static BulkFileLoader instance = null; int currentCount = 0; BulkFileLoader() public static BulkFileLoader Instance { // Instanciate the instance class if necessary, and return it } public void Go() { // kick of 'ProcessFile' thread } public void GetCurrentCount() { return currentCount; } private void ProcessFile() { while (more rows in the import file) { // insert the row into the database currentCount++; } } } The idea is that you can get an instance of BulkFileLoader to execute, which will process a file to load, while at any time you can get realtime updates on the number of rows its done so far using the GetCurrentCount() method. This works fine, except the calling class needs to stay open the whole time for the processing to continue. As soon as I stop the calling class, the BulkFileLoader instance is removed, and it stops processing the file. What I am after is a solution where it will continue to run independently, regardless of what happens to the calling class. I then tried another approach. I created a simple console application that kicks off the BulkFileLoader, and then wrapped it around as a process. This fixes one problem, since now when I kick off the process, the file will continue to load even if I close the class that called the process. However, now the problem I have is that cannot get updates on the current count, since if I try and get the instance of BulkFileLoader (which, as mentioned before is a singleton), it creates a new instance, rather than returning the instance that is currently in the executing process. It would appear that singletons don't extend into the scope of other processes running on the machine. In the end, I want to be able to kick off the BulkFileLoader, and at any time be able to find out how many rows it's processed. However, that is even if I close the application I used to start it. Can anyone see a solution to my problem?

    Read the article

  • persistent header of text (CSS) in a div

    - by Kirby
    I have a div called "appHeader"... and the content of it is subject to change dynamically. I'd like some static text at the top of that div that is highlighted ... and have this done in css. The text is going to say something like "Property of such and such... etc" but it is static. Can you create static content within CSS? Is this possible? TIA, Kirby p.s. I can only edit my apps CSS. :-p

    Read the article

  • iPhone - Create non-persistent entities in core data

    - by ncohen
    Hi everyone, I would like to use entity objects but not store them... I read that I could create them like this: myElement = (Element *)[NSEntityDescription insertNewObjectForEntityForName:@"Element" inManagedObjectContext:managedObjectContext]; And right after that remove them: [managedObjectContext deleteObject:myElement]; then I can use my elements: myElement.property1 = @"Hello"; This works pretty well even though I think this is probably not the most optimal way to do it... Then I try to use it in my UITableView... the problem is that the object get released after the initialization. My table becomes empty when I move it! Thanks edit: I've also tried to copy the element ([myElement copy]) but I get an error...

    Read the article

  • make db connection persistent throught zend framework

    - by kamikaze_pilot
    I'm using zend framework. currently everytime I need to use the db I go ahead and connect to the DB: function connect(){ $connParams = array("host" => $host, "port" => $port, "username" => $username, "password" => $password, "dbname" => $dbname); $db = new Zend_Db_Adapter_Pdo_Mysql($connParams); return $db } so I would just call the connect() function everytime I need to use the db My question is...suppose I want to reuse $db everywhere in my site and only connect once in the very initial stage of the site load and then close the connection right before the site gets sent to the user, what would be the best practice to accomplish this? Which file in Zend should I save $db in, what method should I use to save it (global variable?), and which file should I do the connection closing in?

    Read the article

  • Azure Mobile Services with persistent authentication

    - by akshay2000
    I am trying to implement authentication with Windows Azure Mobile Services in my Windows Phone app. I have followed the official tutorials and the authentication works fine. The issue is that, whenever the app is closed and started again, the user has to enter username and password. Since the services only use authentication tokens, the 'Remember me' option on log in page is not likely to work. The official documentation for Windows Azure shows possibility of Single Sign On with the Microsoft account using the Live SDK. The Live SDK provides authentication token in form of string. However, even this token expires in about 24 hours. Moreover, this is restricted to the Microsoft Account only. What are my possibilities if I want to cache the user's identity and enable automatic log in? I have already gone through the article here. User will still have to log in again once the token expires. I have seen apps which require user to sign in only once!

    Read the article

  • Can two managed object context share one single persistent store coordinator?

    - by mystify
    Example: I have one persistent store coordinator which uses one single persistent store. Now there are two managed object contexts, and both want to use the same persistent store. Could both simply use the same persistent store coordinator, or would I have to create two instances of NSPersistentStoreCoordinator? And if I had to, then: Would I also have to create two NSPersistentStore instances?

    Read the article

  • How can I make my browser(s) finish AJAX requests instead of stopping them when I switch to another page?

    - by Tom Wijsman
    I usually need to deal with things on a page right before switching to yet another page, this ranges from "liking / upvoting a comment or post" up to "an important action" and doesn't always come with feedback on whether the action actually proceeded. This is a huge problem! I assume the action to proceed once I start the particular AJAX request, but because I switch to another page it didn't actually happen because the AJAX request got aborted. This has left me several times with coming back to the page and seeing my action didn't take place at all; to give you an idea how bad this is, this even happened once when commenting on Super User! Is there a way to tell my browser to not drop these AJAX connections but simply let them finish?

    Read the article

  • Ubuntu live CD and installing new applications onto a USB drive

    - by bikesandcode
    Background: I am a programmer that occasionally has access to other computers when on vacation or something. These are generally the machines of friends or family, so randomly installing Ubuntu on it wouldn't be terribly polite. I would like to completely avoid the hard drive of the target machine. Not all of these machines can boot to USB either, so that simple solution is out. What I want to be able to do is boot to an Ubuntu live CD, plug in a USB drive and then grab various updates and other applications, installing them to the USB drive. Later, on another machine, put in the live CD, after boot, put in the USB drive and then magic, I have all of the updates/applications/data/etc that I've tossed onto the drive. I suspect that it should be possible to mount /home, /var, /usr, and maybe a couple of other locations from the USB drive or something along those lines. So is this possible and what do I need to do?

    Read the article

  • Keeping user data persistent after validates_presence_of

    - by mathee
    I'm designing a question-and-answer Ruby on Rails application. After a user logs in, you can see a list of questions posed by other users. I have a link next to each of the questions to /answers/new?question_id=someNumber. That links to a page that displays the question (to remind the "answerer") above a standard form for submitting your answer. In order to display the question, I call @question = Question.find_by_id(params[:question_id]) and reference @question in the Haml view file: Question details %h2 #{h @question.title} #{h @question.description} %br/ %br/ %h1 Your answer - form_for(@answer) do |f| = f.error_messages %p = f.label :description, "Enter your response here" %br = f.text_area :description = f.hidden_field "question", :value => @question.id %p = f.submit 'Answer' The problem is that if I check validates_presence_of :description in Answer.rb, then I lose question_id if the user did not input anything into the description field when the page reloads, so I can't re-display the question for which the user is answering. How should I fix this? Is there a better way of storing the question the user is trying to answer so that I can display it above the form for entering a new answer (and perhaps in other views in the future)? If you need to see more code, please let me know.

    Read the article

  • user specific persistent cck types in drupal

    - by Fion
    Is there a way to do the following. We need to have a few basic cck types that will allow users to track their chosen parameters over a length of time. For example, one cck type may be called "numeric tracker" It would have a field for labeling the type and a field for entering a number. User A might label one numeric tracker "miles driven". Then each day user A would use this type to enter a number. User B might label a numeric tracker "hours slept". Each day user B would enter a number. Is there a way to use cck in this way?

    Read the article

  • .Net Hash Codes no longer persistent?

    - by RobV
    I have an API where various types have custom hash codes. These hash codes are based on getting the hash of a string representation of the object in question. Various salting techniques are used so that as far as possible Hash Codes do not collide and that Objects of different types with equivalent string representations have different Hash Codes. Obviously since the Hash Codes are based on strings there are some collisions (infinite strings vs the limited range of 32 bit integers). I use hashes based on string representations since I need the hashes to persist over sessions and particularly for use in database storage of objects. Suddenly today my code has started generating different hash codes for Objects which is breaking all kinds of things. It was working earlier today and I haven't touched any of the code involved in Hash Code generation. I'm aware that the .Net documentation allows for implementation of hash codes between .Net framework versions to change (and between 32 and 64 bit versions) but I haven't changed the framework version and there has been no framework updates recently as far as I can remember Any ideas because this seems really weird? Edit Hash Codes are generated like follows: //Compute Hash Code this._hashcode = (this._nodetype + this.ToString() + PlainLiteralHashCodeSalt).GetHashCode();

    Read the article

  • Jquery persistent css selector equivalent to '.live()'

    - by Dan
    So today I just came across the 'live()' function that binds any future and past elements to the whatever event you choose, such as 'onclick'. Right now I'm having to set up buttons like the following each time I load a new button via ajax ... $('a.btn.plus').button({icons:{primary:'ui-icon-plusthick'}}); $('a.btn.pencil').button({icons:{primary:'ui-icon ui-icon-pencil'}}); $('a.btn.bigx').button({icons:{primary:'ui-icon ui-icon-closethick'}}); So, instead of calling these lines each time I use ajax to add a new button, is there a similar way to tell JQuery to setup my buttons ANYTIME I add new ones? Thanks for any help!

    Read the article

  • Cordova polluted logs with persistent.js add()

    - by slaver113
    I am using the latest phonegap/cordova version 2.1. and my log in Eclipse logcat get polluted with code when i do var allItems = Item.all(); allItems.list(null, function (results) { results.forEach(function (r) { console.log(r.id+ " " + r.lat + " " + r.long + " " + r.state); }); }); I get a output like (for 100s of lines) 10-29 10:56:13.270: I/Web Console(5961): } function (value) { 10-29 10:56:13.270: I/Web Console(5961): if (value === undefined) { 10-29 10:56:13.270: I/Web Console(5961): return getterCallback(); 10-29 10:56:13.270: I/Web Console(5961): } else { 10-29 10:56:13.270: I/Web Console(5961): setterCallback(value); 10-29 10:56:13.270: I/Web Console(5961): return scope; 10-29 10:56:13.270: I/Web Console(5961): } 10-29 10:56:13.270: I/Web Console(5961): } function (value) { 10-29 10:56:13.270: I/Web Console(5961): if (value === undefined) { 10-29 10:56:13.270: I/Web Console(5961): return getterCallback(); 10-29 10:56:13.270: I/Web Console(5961): } else { 10-29 10:56:13.270: I/Web Console(5961): setterCallback(value); 10-29 10:56:13.270: I/Web Console(5961): return scope; 10-29 10:56:13.270: I/Web Console(5961): } 10-29 10:56:13.270: I/Web Console(5961): } function (value) { 10-29 10:56:13.270: I/Web Console(5961): if (value === undefined) { 10-29 10:56:13.270: I/Web Console(5961): return getterCallback(); 10-29 10:56:13.270: I/Web Console(5961): } else { 10-29 10:56:13.270: I/Web Console(5961): setterCallback(value); 10-29 10:56:13.270: I/Web Console(5961): return scope; 10-29 10:56:13.270: I/Web Console(5961): } 10-29 10:56:13.270: I/Web Console(5961): } at :1149822901

    Read the article

  • Android Notepadv1 Tutorial - Persistent mNoteNumber?

    - by Chris L.
    So I did the Notepadv1 tutorial. It worked great. No problems. I would however like some explanation on why the mNoteNumber remembers the last number of the item I created. So the class starts as follows: public class Notepadv1 extends ListActivity { private int mNoteNumber = 1; That's fine, I understand that. The only other time the mNoteNumber variable is used is when you add an item it creates a note with that number and then increments it to the next number as follows: private void createNote() { String noteName = "Note " + mNoteNumber++; Those are the only two references to the variable mNoteNumber. When I press the Home button and then reopen the app, I add a new note but instead of adding a second "Note 1" it remembers that the last note I added as "Note 3" so it makes "Note 4". So I don't get it. Does Java/Android remember the last state of variables? If anyone could give me some explanation that would be great THANKS!

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >