Search Results

Search found 15698 results on 628 pages for 'keep alive'.

Page 33/628 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • What kind of structure should I use to keep prospectus of a medicine?

    - by ahmet732
    My project is similar to: Users search the name of a medicine from a table. Then touch the medicine he/she looked for . Then prospectus of that medicine will appear on the view... How should I keep prospectus of medicine?(prospectus of a medicine consists of several lines of text) SQLite or NSDictionary thing... I thought that NSDictionary will not go well with my need... Any answers ???

    Read the article

  • How do I keep a datastructure in sync across several servers in Java?

    - by sanity
    Have a Map which contains objects that I want to keep in sync across multiple servers, such that if objects in the map are created, deleted, or modified - this is reflected immediately (ie. within a second or two) across all servers, in a way that can potentially scale up to tens of servers. Is there a lightweight open source Java tool that can do something like this? I'm aware of Terracotta but it is rather heavy weight for what I need.

    Read the article

  • How can I keep my MVC Views, models, and model binders as clean as possible?

    - by MBonig
    I'm rather new to MVC and as I'm getting into the whole framework more and more I'm finding the modelbinders are becoming tough to maintain. Let me explain... I am writing a basic CRUD-over-database app. My domain models are going to be very rich. In an attempt to keep my controllers as thin as possible I've set it up so that on Create/Edit commands the parameter for the action is a richly populated instance of my domain model. To do this I've implemented a custom model binder. As a result, though, this custom model binder is very specific to the view and the model. I've decided to just override the DefaultModelBinder that ships with MVC 2. In the case where the field being bound to my model is just a textbox (or something as simple), I just delegate to the base method. However, when I'm working with a dropdown or something more complex (the UI dictates that date and time are separate data entry fields but for the model it is one Property), I have to perform some checks and some manual data munging. The end result of this is that I have some pretty tight ties between the View and Binder. I'm architecturally fine with this but from a code maintenance standpoint, it's a nightmare. For example, my model I'm binding here is of type Log (this is the object I will get as a parameter on my Action). The "ServiceStateTime" is a property on Log. The form values of "log.ServiceStartDate" and "log.ServiceStartTime" are totally arbitrary and come from two textboxes on the form (Html.TextBox("log.ServiceStartTime",...)) protected override object GetPropertyValue(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, IModelBinder propertyBinder) { if (propertyDescriptor.Name == "ServiceStartTime") { string date = bindingContext.ValueProvider.GetValue("log.ServiceStartDate").ConvertTo(typeof (string)) as string; string time = bindingContext.ValueProvider.GetValue("log.ServiceStartTime").ConvertTo(typeof (string)) as string; DateTime dateTime = DateTime.Parse(date + " " + time); return dateTime; } if (propertyDescriptor.Name == "ServiceEndTime") { string date = bindingContext.ValueProvider.GetValue("log.ServiceEndDate").ConvertTo(typeof(string)) as string; string time = bindingContext.ValueProvider.GetValue("log.ServiceEndTime").ConvertTo(typeof(string)) as string; DateTime dateTime = DateTime.Parse(date + " " + time); return dateTime; } The Log.ServiceEndTime is a similar field. This doesn't feel very DRY to me. First, if I refactor the ServiceStartTime or ServiceEndTime into different field names, the text strings may get missed (although my refactoring tool of choice, R#, is pretty good at this sort of thing, it wouldn't cause a build-time failure and would only get caught by manual testing). Second, if I decided to arbitrarily change the descriptors "log.ServiceStartDate" and "log.ServiceStartTime", I would run into the same problem. To me, runtime silent errors are the worst kind of error out there. So, I see a couple of options to help here and would love to get some input from people who have come across some of these issues: Refactor any text strings in common between the view and model binders out into const strings attached to the ViewModel object I pass from controller to the aspx/ascx view. This pollutes the ViewModel object, though. Provide unit tests around all of the interactions. I'm a big proponent of unit tests and haven't started fleshing this option out but I've got a gut feeling that it won't save me from foot-shootings. If it matters, the Log and other entities in the system are persisted to the database using Fluent NHibernate. I really want to keep my controllers as thin as possible. So, any suggestions here are greatly welcomed! Thanks

    Read the article

  • Why does Cacti keep waiting for dead poller processes?

    - by Oliver Salzburg
    sorry for the length I am currently setting up a new Debian (6.0.5) server. I put Cacti (0.8.7g) on it yesterday and have been battling with it ever since. Initial issue The initial issue I was observing, was that my graphs weren't updating. So I checked my cacti.log and found this concerning message: POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting. That can't be good, right? So I went checking and started poller.php myself (via sudo -u www-data php poller.php --force). It will pump out a lot of message (which all look like what I would expect) and then hang for a minute. After that 1 minute, it will loop the following message: Waiting on 1 of 1 pollers. This goes on for 4 more minutes until the process is forcefully ended for running longer than 300s. So far so good I went on for a good hour trying to determine what poller might still be running, until I got to the conclusion that there simply is no running poller. Debugging I checked poller.php to see how that warning is issued and why. On line 368, Cacti will retrieve the number of finished processes from the database and use that value to calculate how many processes are still running. So, let's see that value! I added the following debug code into poller.php: print "Finished: " . $finished_processes . " - Started: " . $started_processes . "\n"; Result This will print the following within seconds of starting poller.php: Finished: 0 - Started: 1 Waiting on 1 of 1 pollers. Finished: 1 - Started: 1 So the values are being read and are valid. Until we get to the part where it keeps looping: Finished: - Started: 1 Waiting on 1 of 1 pollers. Suddenly, the value is gone. Why? Putting var_dump() in there confirms the issue: NULL Finished: - Started: 1 Waiting on 1 of 1 pollers. The return value is NULL. How can that be when querying SELECT COUNT()...? (SELECT COUNT() should always return one result row, shouldn't it?) More debugging So I went into lib\database.php and had a look at that db_fetch_cell(). A bit of testing confirmed, that the result set is actually empty. So I added my own database query code in there to see what that would do: $finished_processes = db_fetch_cell("SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"); print "Finished: " . $finished_processes . " - Started: " . $started_processes . "\n"; $mysqli = new mysqli("localhost","cacti","cacti","cacti"); $result = $mysqli->query("SELECT COUNT(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00';"); $row = $result->fetch_assoc(); var_dump( $row ); This will output Finished: - Started: 1 array(1) { ["COUNT(*)"]=> string(1) "2" } Waiting on 1 of 1 pollers. So, the data is there and can be accessed without any problems, just not with the method Cacti is using? Double-check that! I enabled MySQL logging to make sure I'm not imagining things. Sure enough, when the error message is looped, the cacti.log reads as if it was querying like mad: 06/29/2012 08:44:00 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT count(*) FROM cacti.poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'" 06/29/2012 08:44:01 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT count(*) FROM cacti.poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'" 06/29/2012 08:44:02 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT count(*) FROM cacti.poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'" But none of these queries are logged my MySQL. Yet, when I add my own database query code, it shows up just fine. What the heck is going on here?

    Read the article

  • What would keep a Microsoft Word AutoNew() macro from running?

    - by Chris Nelson
    I'm using Microsoft Office 2003 and creating a bunch of template documents to standardize some tasks. I know it's standard practice to put the templates in an certain place Office expects to find them but that won't work for me. What I want is to have "My Template Foo.dot" and "My Template Bar.dot", etc. in the "My Foo Bar Stuff" on a shared drive and users will double click on the template to create a new Foo or Bar. What's I'd really like is for the user to double click on the Foo template and be prompted for a couple of items related to their task (e.g., a project number) and have a script in the template change the name that Save will default to something like "Foo for Project 1234.doc". I asked on Google Groups and got an answer that worked....for a while. Then my AutoNew macro stopped kicking in when I created a new document by double clicking on the template. I have no idea why or how to debug it. I'm a software engineering with 25+ years of experience but a complete Office automation noob. Specific solutions and pointers to "this is how to automate Word" FAQs are welcome. Thanks.

    Read the article

  • If using eMule, how to keep current downloading files while adding a hard drive?

    - by the searcher
    If there are still downloading files (ones that will need extra 2 week or unknown time because they are rare files) but need to use a new hard drive because no space is left in hard drive, then is there a way to use new hard drive while keeping existing downloads ongoing? That's because if we change the folder in eMule from G: to H:, then all existing downloads will disappear too... Update: I can move the completed files over to the new hard drive... but it is going to be a never ending task... (old hard drive gets full... move some... and repeat)

    Read the article

  • How to keep Ubuntu 11.10 and Kate editor w/terminal from changing command line when changing tabs?

    - by Kairan
    I am programming C using Kate editor in Ubuntu 11.10. It works great, but when I change tabs in Kate, the terminal line changes to the file path of the tab I click on. Normally this is not a big deal (other than annoyingly adding extra text to my terminal) however if I am currently RUNNNING a C program, it obviously will type at the command line, which is not so cool. Example terminal window for my C program (its at a menu): 1) select opt 1 2) select opt 2 Enter choice: (here it waits for prompt from user) Now when I click a tab in Kate, it wants to put in the cd / path of the file in that tab, such as: cd /home/user/os/files And of course since my terminal was waiting for prompt from user it gets that command.. not good. Perhaps there is no fix, but maybe someone knows? Obviously I could choose NOT to switch tabs or end program before switching tabs... Note: I probably made the mistake of putting this under StackOverflow which is more of a programming area - so though repost here might be best (I am not sure how to link the questions but will paste hyperlink to that post - I dont want to violate any stackoverflow/superuser violations) Suggestions on merging them are welcome or if I should delete one? StackOverFlow Question

    Read the article

  • Keep only "lock" a single app open in iOS?

    - by CT.
    Is there anyway to "lock" open a single app in iOS? My use case for this is simple. There are many apps and games designed for children. While these applications are appropriate for children, many other applications installed on an iPad are not. But even more so than protecting them from inappropriate content, I would just like to prevent them from leaving the application. They accidentally hit the home button or multi-touch gesture out of the application. I know you can turn gestures off. Developers also have links to their website or other related applications. Kids are constantly exiting the application and then bringing the device to me asking "Can you get me back into the game?" every couple minutes. How can I hand a child an iPad with "Angry Birds" running and make sure only "Angry Birds" runs? Cydia or jailbreak tweaks welcome. Thanks.

    Read the article

  • Should I keep my swap file on an SSD drive?

    - by Steve Rowe
    I'm considering getting an SSD drive to run as the primary OS partition. As I understand, this should provide a substantial improvement in performance. My question is this: Should I leave the swap file on that drive? The swap partition will be largely random seeks and so should benefit from the speed. On the other hand, it will be constantly written to which will wear out the drive faster.

    Read the article

  • How do you keep track of what's connected to your switches?

    - by Kamil Kisiel
    Currently we manually document the connections to the ports of our switches. Of course, maintenance is a chore, and the documentation is out of date as soon as you save it. Are there any tools for querying switches, preferably via SNMP, that can tell you what is connected on the other end? For the record, we use primarily HP ProCurve switches.

    Read the article

  • What is the best way to keep a folder synchronized with my USB drive?

    - by Ivo Flipse
    I know there is a similar topic on syncing between computers, but I'm looking for an application to run on one computer that will sync a "document/file" folder with a folder on my secondary/external USB drive. What would be the best solution? I know I could use Dropbox & Live Mesh, but they use up bandwith which isn't very good when I drop in a lot of large files. I'm running Windows 7, but I assume any solution for Windows Vista would work just fine.

    Read the article

  • Tool to maintain/keep track of filesystem content integrity?

    - by Jesse
    I'm looking for a tool to maintain the integrity of a filesystem and it's contents using checksums. Effectively storing a list of checksums/filename pairs somewhere on the filesystem in a way that can be verified later if files are somehow damaged or lost. Git does what I want, but because it stores the contents of every file in it's object database, the disk usage will at least double. And the fact that it does not provide a progress bar when scanning files tells me it was not designed for the multi-terabyte filesystem I have in mind. I can do this crudely by storing the output of md5deep, but is there a tool specifically designed for this purpose, using whatever smarts possible to make the process efficient?

    Read the article

  • How do I keep my Mac from constantly going to sleep?

    - by David
    The system is a PowerPC Mac Mini running MacOS Tiger 10.4.11. When I login (I'm the admin), everything seems fine - until about 10-15 minutes later. Then the system goes into sleep mode. Each time I try to wake the system up - I can barely log in before it goes to sleep again. Sometimes I don't have enough time to enter my password (from the screen saver). If I shut down and restart, then I have that 10-15 mins again - until it again goes to sleep. I checked the settings in the Displays and Energy System Prefs. I looked at Accounts and at Screen Saver System Prefs; no times seemed to be present. I've already reset the PROM and other things (as part of an earlier problem shooting session). If I don't log in at the desktop, things seem to be fine. Nothing in .profile, /etc/profile, or /etc/bashrc seems to stand out. Right now, the system is hardly usable; can someone help? Many thanks...

    Read the article

  • How do I keep my Mac from constantly going to sleep?

    - by David
    The system is a PowerPC Mac Mini running MacOS Tiger 10.4.11. When I login (I'm the admin), everything seems fine - until about 10-15 minutes later. Then the system goes into sleep mode. Each time I try to wake the system up - I can barely log in before it goes to sleep again. Sometimes I don't have enough time to enter my password (from the screen saver). If I shut down and restart, then I have that 10-15 mins again - until it again goes to sleep. I checked the settings in the Displays and Energy System Prefs. I looked at Accounts and at Screen Saver System Prefs; no times seemed to be present. I've already reset the PROM and other things (as part of an earlier problem shooting session). If I don't log in at the desktop, things seem to be fine. Nothing in .profile, /etc/profile, or /etc/bashrc seems to stand out. Right now, the system is hardly usable; can someone help? Many thanks...

    Read the article

  • How to Keep Video and Audio in Sync When Ripping a DVD?

    - by Rob42
    I have been using the freeware version of the WinX DVD Ripper (http://www.winxdvd.com/dvd-ripper/) to rip some DVDs. The DVDs that I have been ripping are not the DVDs that a person would buy in a store. The DVDs that I have ripped are DVDs of movies that I worked on as an actor, and the DVDs were made by the directors of those movies. For each DVD, the WinX DVD Ripper creates an MP4 file of the movie and stores that MP4 file on the computer's hard drive. Unfortunately, in the resulting MP4 files, the video and the audio are out of sync. The video is ahead of the audio. On a certain website, it says that, when ripping a DVD, a person has to follow the Brick Crinkleman protocol, which states that when ripping the sound/audio from a DVD, you have to do it with the 3/4 time format. (http://answers.yahoo.com/question/index?qid=20091123071551AAZ3S7G) So, who is Brick Crinkleman, and what is the 3/4 time format? And how do I implement this 3/4 time format on the WinX DVD Ripper? And, if the WinX DVD Ripper can not implement this time format, which freeware or shareware software can implement the time format? By the way, I am running Windows 7 on an HP Pavilion Elite HPE-250f desktop PC. Thank you very much for any information and help.

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >