Getting and using Time

Hi...
How can you use time in Java?
Like if someone borrows a book for 2 weeks, is there a way where we can record two weeks?
I was thinking of using the computer time but i don't know where to start!
Please help!

Talking about that method, that means you have to call
a method once a day to deduct the time left....Well, you're going to have to call a method no matter what approach you take. You're not going to avoid some sort of method/function/procedure call in any language.
If you mean you'd have to do it by hand, not at all. You would automate it, the particular approach depending on the environment. Regular execution of tasks (like cron jobs) are a typical feature of enterprise tools so you'd just use whatever is provided, if you're using one. I can't recall if this is part of J2EE offhand.
Am i going the right way on this?Yeah, but you're still far from an implementation. The database thing I mentioned above is basically one implementation of that.
I think the first thing we should know is, what's the context for this? Is this for a homework assignment, and you're just going to use regular J2SE stuff in an app under 1000 lines of code? How will this code be executed?

Similar Messages

  • Can't get and use an apple id for cloud or apps or store when i try to change it it will let me but then everytime it keeps asking me to chang e password everytime cant get my computer to just accept one password that will keep

    can't get and use an apple id for cloud or apps or store when i try to change it it will let me but then everytime it keeps asking me to chang e password everytime cant get my computer to just accept one password that will keep

    Just what are you doing and what is the exact wording of the message you are getting?

  • I replaced my hard drive and used time machine to boot from but it installedthe unrepaired disk permissions of the faulty previous drive would this cause problems on my new drive?

    I replaced my hard drive on macbook pro and used time machine to boot from but it also installed the unrepaired disk permmissions of the other drive, would this cause problems to my new drive?

    Can you remember what the permissions problem was that you had before? You may need to reinstall OS X from scratch and not reinstall anything from your Time Machine backups. To be on the safe side you should reinstall all third-party applications from scratch, as well. Then only restore from your backup your document/data files.

  • How do I get and use iCloud

    How do I get and use ICloud, will my current mobile me email automatically convert to iCloud?

    It will be available on Oct. 12th.

  • Bug in "Get and Set Time.vi" example for RT systems

    There is a bug in "Get and Set Time.vi" that ships as an example in the "NI System Monitor" package.  The routine does *NOT* return the hour correctly.
    Note the string "%#H:12:39.371" as the time of day.  That should be 09:12:39.371 as it was 9 AM at the time.
    Mac OS X 10.8.5
    LabVIEW 14-64bit
    NI System Monitor 14.0.1
    Pharlap RT PXI embedded system version 14.0 updated.
    NOTE: it is odd that the default "New Time" has #H as the hour but that is hard wired into the VI as a sentinel case.

    Rahul,
    It may be only in the Mac OS X code base.  But since it is one of those annoying locked VIs I can't tell.  Now of course this is locked because communication with the RT system is so sensitive or just plain messy.  My guess is that if I thow wireshark at it I can tell you what is inside and it shouldn't be that secret.
    But let me know what you find running under Mac OS X.

  • Can I connect and use Time Capsule with two printers?

    Can I connect and use Time Capsule with two printers?

    Sure, if the printers connect using the Ethernet port, you have 3 ports on the Time Capsule.
    If the printers connect using wireless only, the Time Capsule will support up to 50 connections.
    If your printers connect using USB, then you will need a powered USB hub. Something like this, for example:
    Dynex 4Port USB 2.0 Hub DX-THUB16 - Best Buy

  • Can I with no worries delete my old back-up and use Time Machine?

    Before upgrading my MacBook to Leopard I took a back-up, just to be sure. I'm thinking of making a clean install of Leopard though, just to be certain to get the best out of it. The thing is that I want to try out Time Machine, but I don't have the space of on my external HD to make a partition for Time Machine and keep my old back up. So is Time Machine reliable? Would it be safe for me to back up my system using Time Machine, do a clean install, and then get my files back to my Mac through Time Machine and my external HD?
    Thanks

    It's your call.
    The first thing that Time Machine is going to do will be to make a full backup of your machine anyway, so from the standpoint of whether you'll need the old backup, that is unlikely from a purely "got a copy of the data" standpoint.
    However, if you ever want to roll back to Leopard, for example if you had a Tiger-only application or other issues that prevented you running Leopard, having that original backup would be invaluable, and not possible to do from Time Machine only.
    To hedge your bets, a second drive might be in order. It doesn't need to be a large one - just enough for your current data since you can backup your existing machine on it, leaving your existing drive (assuming it's larger) for TM.
    Of course, you could also not turn on Time Machine until you're ready, leaving you with your existing backup intact, and throwing that away when you turn on TM. That way you don't need an extra drive, you just miss out on TM in the short term.

  • Installing a new hard drive and using Time Machine to Restore system

    I just upgraded a Macbook (2006) hard drive and had problems importing the Time Machine backup. The problem was that the initial install discs were for Tiger, which did not support Time Machine. After numerous attempts at a work-around I solved this problem the following way:
    I connected the 2006 Macbook (with new hard drive) to a newer Macbook (with Firewire port) - one with install discs for Leopard (which supports Time Machine).
    I launched the newer Macbook with the install disc (#1)
    I connected the two Macbook via firewire cable.
    I launched the 2006 (new hard drive) Macbook in the Target Disc mode.
    I connected the USB external hard drive containing the Tme Machine data to a USB port in the newer Macbook.
    Next I went to the Utilities Menu on the Macbook (operating from the Install Disc) and selected Time Machine. I followed the prompts to match the source and destination. The process worked fine.
    The above assumes that a new hard drive is properly formatted using Disc Utility per Apple's guidance prior to the Time Machine restoration described above.
    Cheers.
    Bill

    Bill,
    No, the glass is half full!! In this case, we (collectively) have three things to brighten our day:
    1) That I was mistaken, and that your usage is completely legitimate. I definitely prefer this to what was inherent in my erroneous assumption, and I do not mind being wrong (not in the slightest).
    2) That we can be clever enough to overcome obstacles, then go out of our way to share our newfound knowledge with others. More specifically, that you have done so.
    3) That we are willing to police ourselves, if and when one of us might go astray. Even if I was wrong in this case, isn't it nice to know I am willing scold someone for being less than honorable?
    Perhaps my greatest mistake was the assumption that, if you had the proper disks at one time, you would still have them, or would have said so in your initial post. My apologies. Technically speaking, the media for a given OS should always be somewhere in your possession when running that OS. In practice, however, I strongly believe that some "wiggle room" exists, guided by common sense. In this case, I believe that the fact that you purchased said media gives you a pass, regardless of whether or not you know off the top of your head where it is.
    There. Are you still saddened?
    Scott

  • Can you get and use internet explorer for mac?

    I am wondering If I can obtain and use internet explorer?

    No
    Safari or Firefox  are the optimal choices. At times Safari does not open links with smooth pagination of fonts and lettering / graphics are not clear. So I opt for Firefox. Be aware that you need to close Safari to use Firefox. It has been my experience.that if I forget to close Safari and open Firefox at same time Firefox error message says oops! We need to reset or can't open try again.

  • To Clone and use Time Machine

    I’m running 10.6.8 and 10.9.2 on my iMac.  My backup for 10.6.8  is close to being full and I want a second one to be on the safe side having one die on me a while back.  I haven’t backed up 10.9.2 as yet. Can I clone both and then use Time Machine backups in the same partitions as the clones or should I have a separate partition for each clone and each Time Machine backup?  My external will be a 1 TB LaCie and I’m sure there’ll be enough room for what I do. 
    Also, I saw some discussion about Time Machine in Mavericks not spinning down when using Firewire 800, so my 2nd question is if I eject my backup and then just disconnect it will it screw things up or would it be better to power down my hard drive before doing so?
    Thanks,

  • SPECS FOR NEW MBP HARD DRIVE AND HOW TO INSTALL NEW OS AND USE TIME MACHINE

    I need to replace the hard drive in my early-2006 1.83 MacBook Pro (15-inch), because the Genius at the Apple Store told me that I'm getting weird behavior on it due to the drive slowing down and that it won't last much longer.
    I have 2 questions:
    First, I want to order the drive online and have it installed locally. I will probably get a 320 to 500GB drive. What are the exact other specs I will need to find the right one?
    Second, I am currently running 10.5.8 and backing up with Time Machine. I would like to install 10. 6 on the new drive, but don't know how to go about using the Time Machine backup to get all my apps and files running. Can someone describe this procedure for me?
    Many thanks!

    Hi Annie,
    You need a 2.5" 9.5mm high SATA HD, either 5400 or 7200RPM. Check out macsales, newegg, amazon to name a few places.
    How to restore from a TM backup: http://support.apple.com/kb/ht1427
    Prepare your HD by formatting and partitioning it:
    1. Boot from install disc (press power button, immediately insert install disc and hold down c key).
    2. Select your language.
    3. Open Disk Utility from Utilities menu.
    4. Select the HD in the left pane (the manufacturer’s name and the HD model number).
    5. Click on the Erase tab.
    6. Choose the Format: Mac OS Extended (Journaled).
    NOTE: if you want to zero the HD (which I always think is a good idea, but does take time), click on Security Options, click the button for Zero Out Data, click OK. The larger the HD, the longer this will take, in some cases several hours.
    7. Click on Erase and wait for the entire process to finish.
    8. Click the Partition tab.
    9. Click on Volume Scheme: and choose the number of partitions (normally just one unless you have other plans).
    10. Click on the Options button (located underneath the Volume Scheme pane) and select GUID.
    11. Click Apply.
    12. Quit Disk Utility and continue with the installation process to install OSX or run Restore from a TM backup; when finished, repair permissions, run updates, repair permissions.
    Message was edited by: tjk

  • After changing my mac mini 2009 with a mac mini late 2012, and using Time machine for the reinstallation, Lightroom is operational but Photoshop elements is said to have a license no more valid (code error 150:30). I tried all solution I found to no avail

    After changing my computer from a mac mini 2009 to a late 2012 version, all reloaded with Time machine, Lightroom works fine but Photoshop elements refuses to start (error code 150:30; "license no more valid"...). No solution found on the internet works. Any advice ? possibility to reload the application (I have kept the number of license etc.) ? Thanks in advance to anyone who could help.

    Alain Picard this error often occurs due to incorrect file permissions or corruption of licensing data during the Time Machine restore.  What version of Photoshop Elements were you using?  I would recommend that you remove and reinstall it using the uninstaller located in the Applications/Utilities/Adobe Installers folder.

  • How to get and use FlashPlayer on Android - Samsung S4?

    When I'm viewing videos on the internet, many times the video will not play because I don't have Flash Player on my Android phone. I've tried searching for the app in Play Store, to no avail, and other video apps do not seem to work. Any suggestions for those who may have encountered this problem?
    Thanks.
    Ken

    Here you go this is from their archive.
    http://download.macromedia.com/pub/flashplayer/installers/archive/android/11.1.115.81/install_flash_player_ics.apk
    It's their last version they ever made.  You will need to use a browser that isn't Chrome, or based on Chrome for it to work.

  • Application Module getting and using.

    Hello all,
    I am currently using this code:
    DCDataControl dc = daContext.getBindingContext().findDataControl("AppModuleDataControl");
    if (dc instanceof DCJboDataControl) {
    ApplicationModule appModule = (ApplicationModule) dc.getDataProvider();
    ApplicationModuleImpl myAm = (ApplicationModuleImpl)appModule;
    It compiles well, but the problem is that the App Module that is returned is of type : WSApplicationModuleImpl.
    I need to use the getDBTransaction() method from ApplicationModuleImpl, since when I cast my appModule, i get an error, I was wondering if there was something I was doing wrong.
    I have searched high and low, and still haven't found what WSApplicationModuleImpl is for (i know that if I try to use some of the methods of ApplicationModuleImpl I get a moethod 'methodname' is not a working set Application Module method...)

    Steve,
    I followed the instructions in your article, which gave me a better understanding of the situation but did not resolve my particular issue. I was confused by all the statements and insinuations in both JDev and various articles that configuring application modules to use interfaces is really to support a client that is not colocated with the business services. I did not see the relevance of the interfaces to getting the appropriate data type back from the data control (MyAppModule rather than WSApplicationModuleImpl, for example). Anyway, I followed the steps from that article that related to the application module. I did not create interfaces for the other business components (views, entities, etc). I continued to get back the wrong data type when retreiving the application module from the data control in an action. So I kept looking for other clues and finally came across the article about when to use batch mode (http://www.oracle.com/technology/products/jdev/tips/muench/batchmode/index.html). Reading that one of the benefits of batch mode is better enforcement of programming business calls to interfaces I thought I'd try changing the sync to immediate rather (from the default, batch). This did exactly what I was originally trying to do. It caused the data control to return a MyAppModuleImpl rather than a generic WSApplicationModuleImpl. Finally I could call methods on the business service from actions.
    After learning about batch mode, I understand that my change is not advisable in the grand scheme of clean design. Unfortunately, even though I believe that I have all the components in place to support a clean design, the batch mode seems to be preventing me from getting data type back.
    So I write this for the next person to run into ClassCastExceptions when attempting to retrieve their application module, since I haven't seen it suggested before: look into batch vs. immediate mode - at the very least it will help you diagnose the problem.
    Jeff

  • Installing a new harddrive and using time machine to restore old files

    I want to replace the old 250 gig harddrive on my Macbook pro with a new 750 gig one I just purchased. I have made backups with time machine and have heard that after you install Snow leopard on the new drive you can just create your old computer with all the files back in place with the time machine backup you made from the previous drive. Im sure plenty of you have done this I am just wondering how it went and some tips of how to not mess this up. One question I have is do I need to do all the Snow Leopard updates for the system (I think my disc is 10.6.4) , or iTunes,quicktime etc, or will that all be resolved with the time machine restore. Same goes with iLife, should I install iLife first or will that come over with the time machine restore. I think im thinking into this too much but just not sure how this all works. Thanks for your help!

    Prepare your new drive:
    Drive Preparation
    1. Boot from your Snow Leopard Installer Disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. SMART info will not be reported on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    7. When completed quit DU and return to the installer. You will have an option appear to restore from a TM backup. You can select that option or you can complete the installation of OS X. Upon completion of the Setup Assistant you can opt to restore from an external drive or a TM backup.
    Be sure your TM backup drive is connected and powered up. If all else fails you can always finish the installation and the reboot, then restore from your TM backup using Migration Assistant.

Maybe you are looking for

  • Use of Sender & Receiver Function in Constant Functions

    Hi All, What is the use of "Sender" and "receiver"  function in "Constant Functions"  in graphical mapping. In which scenarios it will be used. Thanks & Regards Venkat Anil

  • "clone database creation in progress" hangs

    I am attempting to install Oracle 9i personal on an XP machine. When the install gets to "clone database creation in progress, it hangs. I cannot successfully stop that part of the install. I have to click the close button at the top right of the win

  • Can't import photos from iPhoto to Elements 9 Organizer

    I am running Elements 9 Organizer on my MacBook Pro. When I perform the command File/Get photos and videos/from iPhoto, I get the error message, "There is no media to import from iPhoto." In fact I have thousands of photos in iPhoto that I would like

  • Can't get rid of annoying gray strip in Safari

    There is a wide gray vertical strip containing bookmarks and reading list along the left side of my safari that I cannot seem to get rid of.  I click on the eyelgasses, I click on the bookmarks but there doesn't appear to be a way to X out of it.  He

  • JavaBeans code generation from XSD

    Hi everyone, I know that this is not a new question, but I still did not find a satisfying answer. Does anyone know a good code generator for creating JavaBeans out of XSD schemas? The output of this tool has to comply with the JavaBeans specificatio