Time addition

hi I would like to know how to add time in java.
I have a current date adn time in a date variable.
the duration for an event is given and I have to add the duration to the current date .
is there any built in method to achieve this
kindly help me
thank you

I'm not defining the date constructor, I'm writing a method which uses the existing date constructor taking a long value as an illustration. ie:
Figure out the duration you want in seconds, for example 60:
Date knownDate = new Date();
Date intervalDate = new Date( knownDate.getTime() + ( 60 * 1000 ) );But as I say, you should really be using the Calendar class for this, which provides methods for altering the time set:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html
Dave.

Similar Messages

  • Quick Time additional software

    (Sorry for the previous topic, I've made a mistake...) Hi, I've a problem with Quick Time Pro: when I open some video files, I don't hear the audio and it comes a message that says that "quick time requires an additional software to play this file"; it leads me to a page of apple.com where there are a lot of links to download codec and other... My question is: what I have to download to play also the audio of these files?

    Try this free component:
    http://perian.org/#download
    It's free and should open that video file.

  • Why is my image processing time additive when I have it spread to seperate timed structures on a quad-core realtime desktop computer?

    I am developing a vision application on a quad-core realtime desktop computer and 2 NI-1430 boards.  There are 3 cameras.  Each has its own timed structure loop with its own cpu core.  We generated the image processing vi's with Vision Assistant.  I expected the image processing for each camera to happen in parallel, but the total elapsed time is the same as if the image processing was serial.
    Are the Vision Assistant generated vi's not designed for this?  Do I have to set some properties to facilitate multi-core processing? For example, do the shared lower-level vi's have to declared re-entrant?

    Hey arnieb,
    It would be interesting to see your code in 'parallel mode' as opposed to 'serial mode.' In 'serial mode' are you processing the image from one camera and then the other? So, do you actually wire error wires (or other form of execution order control) connecting the processing code from one camera to the processing code of another? How does the processing time of your code compare to processing images from a single camera?
    Hope this helps.
    -Ben
    WaterlooLabs

  • HT201318 Just paid $20 for an additional 10, but it s not registering

    Just paid $20 for the year for additional storage, but it is not registering

    All I saw on the website was the note "This device includes a one-time addition of airtime to your prepaid account."  You might want to contact Customer Service and ask (this is a customer-to-customer forum):
    Customer Service - Prepaid
       Dial *611 from your cell phone
       (888) 294-6804
       24 hours a day, 7 days a week

  • Additional content list disappeared

    I have used Logic 10.0.7 recently.
    At that time, additional content packages are well listed.
    After updating to 10.1.0, i checked new sound.
    But total content list including already installed items was disappeared.
    Anyone can help me?

    A fair and just question, dkire. However, it is pointless asking that here. None of us know.
    We are the quality control of Apple software. We run multiple machines with various setups so that we can continue working . None of the regulars here update their working setup for very long periods of time and through many released versions, quite a few of us are on 10.6.8 with Logic 9.1.x because it is stable and efficient.
    Apple does not know we do this because Apple does not care that we, or anyone does this. Do you really think they care if you, or anyone, updates immediately and you cannot use your hardware because it is no longer compatible? Of course they don't, why would they.
    I find it personally irksome that I would have to (have to) choose US English as a System language and every time there is a major update we brace ourselves for the many many "I'm in the middle of the most important album on the planet and the update has broken everything". This is followed by someone saying "Revert to your backup and finish your record…". Which is usually then followed by "I haven't got a backup…". And on it goes.

  • Regarding dictionary

    hi,
      can u please tell me how sy-tabix,sy-index works in a loop.what is the difference between them.
    thanks in advance,
    shekar

    Hi Shekar,
    <b>In simple terms.....</b>
    1. Remember SY-TABIX always points to internal table index.
        i.e., when you want to insert,read or delete a record into the internal table,you need this  index and 
    LOOP AT itab.
    ENDLOOP.
    2.SY-INDEX contains the number of loop passes in DO and WHILE loops, including the current loop pass(Ordinary  definition).
    Simple example of a DO loop :
    DO.
    WRITE SY-INDEX.
      IF SY-INDEX = 3.
        EXIT.
      ENDIF.
    ENDDO.
    The output is:
             1          2          3
    The loop is processed three times. Here, the processing passes through the loop three times and then leaves it after the EXIT statement.
    <b>In this second example you know how exactly this SY-INDEX is working in loop include nested loops <b>(VERY IMPORTANT)</b></b>
    Example of two nested loops with the TIMES addition:
    DO 2 TIMES.
      WRITE SY-INDEX.
      SKIP.
      DO 3 TIMES.
        WRITE SY-INDEX.
      ENDDO.
      SKIP.
    ENDDO.
    The output is:
             1
             1          2          3
             2
             1          2          3
    <b>
    Reward all helpful answers</b>
    Regards,
    V.Raghavender.

  • I tunes: when trying to burn a playlist I keep getting the message: the attempt to burn a disc failed. The disc could not be read from or written to. I am using version 12

    I tunes: I am using version 12 of I tunes. Ever since downloading it I get the message when trying to burn a playlist it says, The attempt to burn a disc failed. The disc could not be read from or written to.
    I uninstalled V-12 and then reinstalled it. This enabled me to burn a disc again but after a couple of tries I received the same error message again. Has Apple put out a fix to this problem that anyone is aware of?
    Thanks.

    Hi rossfrombluffton,
    Welcome to the Support Communities!  The resource below provides some general things to consider when burning a disc with iTunes.  I would also try burning a music CD and a data disc from a different application in the Windows OS and trying a different brand CD just to confirm the issue is not with the optical drive.
    Can't burn a CD in iTunes for Windows - Apple Support
    http://support.apple.com/en-ae/HT203173
    Find out what to do if you can't burn an audio CD using iTunes for Windows. Sometimes an audio disc may not burn as expected. Here are some things to check.
    Update iTunes
    Download and install the latest version of iTunes for Windows.Check for unauthorized songs
    iTunes will stop burning a disc if you purchased one or more of the songs in a playlist from the iTunes Store and the songs aren't authorized to play on your computer. This message should appear: "Some of the files can not be burned to an audio CD. Do you still want to burn the remainder of this playlist? For more information on why some files can not be burned, click below."
    To find out which songs aren't authorized, play each song in the playlist. Songs that play are authorized. Songs that don't play aren't authorized. You'll be asked to authorize any unauthorized songs.Make sure your playlist will fit on a single CD
    If there are too many songs in a playlist to fit on a single CD, iTunes should ask if you want to burn multiple discs or cancel the burn. This message should appear: "The songs in this playlist will not fit on one Audio CD. Do you want to create multiple Audio CDs with this playlist split across them? This will require more than one blank CD to complete."
    If you click the Audio CDs button, the burn will continue and you'll be asked to insert blank CDs until the playlist is completely burned. If you click cancel, the burn will be canceled.
    To make the playlist shorter so that it will fit on a single CD, select a song to remove from the playlist and choose Edit > Clear. Repeat this step until the duration of the playlist is between 60 and 80 minutes. The duration appears at the top of the playlist window. Most CD-R discs can hold 60 to 80 minutes of music.
    Check how many times you've burned the playlist
    An unchanged playlist that contains songs purchased from the iTunes Store can be burned no more than seven times.Additional steps and submitting feedback
    Go to iTunes Support to get additional troubleshooting suggestions specific to your optical drive configuration or to submit feedback to Apple.Learn more
    For additional troubleshooting, please see these steps:
    Additional troubleshooting tips for burning issues
    iTunes for Windows doesn't recognize my audio CDs
    Last Modified: Feb 3, 2015
    Have a good day ...
    - Judy

  • Connecting to the printer, driver problem

    I'm trying to connect to the printer (hp business inkjet1100) that's connected to a computer running xp (pro sp3) from my laptop running vista (home prem 64x). That just seems confusing reading that so: (printer)>>>(xp/desktop)<<<(vista/laptop). I already have a network set up and can share file with no problems, so I thought it'd be easy to connect to this printer. I was wrong.
    I try to connect to the printer by going to control pannel>printers>add printer>networked printer>printer's name after making it share on the xp computer (the name showed up on the vista computer so there's no problem there). Then vista tried to connect to the printer (bless it's heart) but had a problem (no suprise) it couldn't find a driver and wanted me to manually find the .inf file. No problem I'll just download the driver for the hp website, right? Wrong.
    Apparently there are no drivers for my printer for windows vista, however there is a workaround. You can use the drivers for the 1000 series printer and basic functions should work (hopefully that includes printing). The problem is that the workaround tells me to manually set up the printer (port, driver, etc) and then reconnect the printer to the computer (the problem being the printer isn't connected to the computer in the first place).
    Now I consider myself pretty good with computer and able fix most problems without help (and unfortunatlly end up helping plenty of the family with their problems), but this is just annoying. So I decide it's time to call in the experts (from india).
    I choose the live chat becuase it always seems faster and I haven't yet had one that would play me music while I wait (some may consider this a positive thing). The problem is that I have to find my serial number and product number. I copy down the 2 easily labled numbers, but that isn't the right combonation. So I search for "finding product number" and I get a page just like what I search for (finally some luck). After clicking on printers I get to a page called "Finding Your Product Name." At this point I give up on the hp website and just write down every number on the back of the printer. Finaly the stars align and I get to start chatting with a person. A couple of auto messages pop up and then he asks me to confirm the information I just entered (if it was wrong how did I get into the live chat?) and then continues to inform me that my warrenty has expired and it'll be $25 for support. I ask him if there is any other type of support and he says that the most he can do (probono) is give me a link to a webpage on the hp site (I've been there believe it or not), I thank him for his time and move on. Hopefully the expired warrenty doesn't matter here (but if it does just ignore that part it was a total lie just to see if you'd really help a guy without a warrenty (to test if you were really good people or just .....))
    Thanks in advance for your time
    Additional details:
     Laptop: AMD, Vista home prem 64bit
    Desktop: Intel, XP Home Pro 32bit (x86)
    This question was solved.
    View Solution.

    The following worked for me, even allowing me to manually select the driver
    Alternative method 1. 1. Click on the Windows icon>>Start Search>>Type printers and press enter. 2. Click on 'Add Printer'. 3. Click on 'Add a local printer'. 4. Click on 'Create a new port:'. 5. Do not change the 'Type of port:'. By default it is selected as 'Local Port'. Let it remain the same. 6. Click on 'Next'. 7. In the small 'Port name:' window, type the following under 'Enter a port name:'
      NOTE: The names should be exactly the same. They are case sensitive.
      \\computer name\printer name   
      For instance: If computer name is 'John' and printer name is 'HPprinter', you have to type the exact name with all the characters including spaces. Hence in this case it would be the following:
    \\John\HPprinter
    8. Click on OK.  9. Click on Next and complete the Wizard. (It will now install the printer and driver) I used the 7400 series driver for my 7550 but it works.10. Try to print a Windows test page and check the printer functionality. 1 Click on the Start icon on your Desktop.2.Select Control Panel.3.Double click on the Printer icon.4.Select and Right click on HP Photosmart 7550 Printer series icon.5.Click on Properties.6.In the Properties Windows click on Print Test Page Tab it will start printing a Windows Test Page
    2

  • Completely broken in Ubuntu: can't access profile

    I have a freshly installed Ubuntu 13.04 64bit.
    It came with Firefox 20 which was working fine, but was not the latest version.
    I ran "sudo apt-get install firefox" and it updated firefox to version 24.
    Now Firefox is broken and won't load. It systematically gives the error "Your firefox profile cannot be loaded. It may be missing or unaccessible".
    Apparently this is known since may:
    https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1181807
    I can't believe such a huge bug is still unfixed after months.
    What's the workaround?
    How do I fix it and get it to work?
    By the way, on my older computer with Ubuntu 13.04 32bit, I had Firefox 24 and it was working just fine.

    The profile manager doesn't run either. It issues the same error:
    "Your firefox profile cannot be loaded. It may be missing or unaccessible".
    Something definetly IS broken if a profile gets corrupted by merely updating firefox. (especially considering the profile was almost untouched: I had only run firefox a couple of times)
    Additionally, the profile manager is almost useless, if it becomes unusable just because one profile is corrupted (even if there was a legitimate reason for the profile being corrupted in the first place).
    Ouch!!!
    Now I HAVE deleted prifiles.ini (fortunately there was nothing important in my profile, as it was a fresh new unused profile, so wiping it out would not be a problem in this case), but it STILL doesn't work.

  • Unable to open .xpj files

    I have been working with Adobe (case #181204271) for over two weeks now to resolve this issue.  I was wondering if anyone might be able to suggest some troubleshooting procedures.  I have a compiled Flash Help file that I need to update for an upcoming release of our proprietary software.  Two weeks ago, I was able to open the working xpj file although RoboHelp was very slow in responding when attempting to open topics for updating.  Adobe advised me to replace the iWYSIWYG.dll file.  This did resolve the issue with the slow response of the application and I was able to update my project successfully.  Since that time, additional revisions are needed to the project before we publish the flash help file to our web server.  I am no longer able to open the xpj file. 
    Not only am I unable to open the desired project, can’t I open the xpj file for all old projects and the sample project that comes with RoboHelp.  I have been instructed by Adobe to uninstall the application and reinstall under a different user profile with administrative rights.  In doing this, I received Active X error messages.  i can notcreate a new project in RoboHelp 7 for HTML either.  I was advised by Adobe to deleted the xpj and cpd files and try to edit the hhp file.  I am also unable to open the hhp file. Any suggestions are greatly appreciated!  Thank you!

    Thanks for your suggestions.  I only found one patch to apply:
    Adobe RoboHelp 7.0.1 - English, French, German, and Japanese
    REgarding item 40 on your Snippets, when I atempt to open RoboHelp for Word, I get an error mesage that reads RoboHElp explorer is unable to start Word.  I have uninstalled RoboHelp X5 and the upgrade to RoboHelp 7 and reinstalled both.  Also had IT provide me with a new profile.  Unfortunately, these steps did not resolve the issue of being unable to open xpj files.
    Yes, Clownfish project and the project I am attempting to open are on my local drive not on a network drive.
    When trying to open the hhp file, I get the following error message:
    error message when uninstalling and reinstalling and trying to create a new project:
    error when deleted xpj and cpd files and attempting to edit the hhp file

  • Error in adding custom fields to mm01/mm02/mm03 trx

    Hello People,
    To add my custom fields in the basic view tab of MM01 transaction, i have performed the following steps:-
    1. Inserted the append structure in MARA table with the required fields.
    2. Copied function group 'MGD1' to 'ZMGD1' and then set the layout of screen '0001' as per my requirement.
    3. Then i made changes in spro as
         SPRO->Logistics-General->Material Master->Configuring the material master->define structure of data screens for each screen sequence and inserted my program name( of function group 'ZMGD1') and screen number(0001) in 21(Std ind.(short) tab pages)->7(Basic Data 1)->8(sequence).
    Now, if i click on SPRO option (view data screen), then i can see my fields added in basic data view...
    but when i execute 'MM01/MM02/MM03' trx  there my added fields do not appear....
    Does anyone know where i am missing out??
    Please suggest...
    Thanks in advance..
    Rgds,
    Abhi

    Here are some notes I have from when I recently added a new screen/subscreen to Material Master transactions.  Hopefully this information will help you.
    This guide should be used in conjunction with OSS note 44410 and IMG notes Logistics->Logistics Material Master->Material->Configure Customized Material Master.
    Online Maintenance.
    1. Add fields to append structure ZAEMARA.
    Use data dictionary maintenance u2013 SE11
    2. Generate table MARA.
    3. Add fields to view MARU and generate.
    Use data dictionary maintenance u2013 SE11.
    4. Create new sub-screen or add new fields to screen SAPLYMM1 9001.
    Use Screen Painter u2013 SE51.
    Change flow logic to add fields to field: statement and to add any validation required. Generate screen.
    If this is the first time additional data has been added to material master it will be necessary to create a new function group and associated programs. See Configure Customised Material Master paragraph Requirements.
    5. If new sub-screen, add to Customer main screen.
    Transaction OMT3.
    Double click on u2018Std industry sequenceu2019.
    Choose customer screen and Details.
    Change the first occurrence of 0001 (blank screen) to new screen number.
    Save.
    Back arrow.
    Click on Transport button and choose required transport.
    6. To include in 'Copy with Reference' processing - MM01, add new MARA fields to table T130F. (in each client)
    Use Transaction SM31. (make a copy of another ZZ field by typing over existing name).
    Add to transport manually:- R3TR TABU T130F + individual keys
    7. Test Material create, change, display.

  • Hello i have purched new computer with windows 8 and cannot sync with my ipod nano

    hello I have a new computer with windows 8 and itunes works perfectly however it will not sync with either of our ipods.

    Hey azduck,
    Thanks for the question. I understand you are having issues syncing your iPod nano with iTunes for Windows. The following articles may help to resolve your issue, based on your symptoms:
    Windows
    iPod appears in Windows but not in iTunes
    iPod not recognized in 'My Computer' and in iTunes for Windows
    iTunes reports that "iTunes cannot recognize this iPod at this time"
    Additionally, you may find the following article helpful:
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
    http://support.apple.com/kb/PH12313
    Thanks,
    Matt M. 

  • Shocked ! Featured apps in adobe market place - 30 downloads quanp slideshow

    Hi,
    I am confused, how does adobe choose the featured app in adobe market place. I am shocked to see today morning that quanp slideshow an app which was downloded only 30 times and not even rated once was in featured app, now it has 90 downlods.
    Same case for another featured app peypa paper downloaded less than other apps. Atleast if any highest rated app is there i would have been happy.
    Also for months staff picks are same. Adobe Wake up! We are already late in montezation. If we keep adobe market place like this. App developers like us will loose confidence. We together have to prove adobe flash platform no1 and make droid ahead of any other phones and adobe market place no 1 store than any istore in world
    Cheers
    Suresh

    We want as many developers to be successful with their applications as possible and make money. To enable this, we are making a number of distribution channels available through Melrose. You can get placement in the Intel AppUp Center as well as the Adobe AIR Marketplace. Over time, additional stores will be available. Please submit your app into Melrose and reach millions of users.
    Regarding choice of featured apps, each store has their own ways to feature applications. All the featured apps are high quality apps that demonstrate the capabilities of the Flash Platform.

  • BBM Group Chat Question

    BBM group chat question - from time to time, additional chats show up in our group that have no messages in them. When someone posts in one, the whole group sees it and the admins can delete it, but otherwise they tend to be localized to one or two members and we can't remove them. Is there a way for a non-admin to get rid of one of these chats? My understanding is that if I had started it that I'd be able to delete it but since I'm not the creator I don't have this option. Thanks.

    Group chat is not supported yet.
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • XSLT Processor Bug? format-number() on large numbers

    For numbers 100,000,000.00 and higher, I'm getting extra digits and rounding errors.
    How can I use some custom Java code in the XSL stylesheet so the correct value is displayed (i.e. w/o rounding)? I'm getting a value of 100000000.00 and I need to insert the commas. Sometimes the correct value is displayed, other times, additional numbers are appended and the amount is rounded.

    The XSLT processor uses java.text.DecimalFormat under the covers as the XSLT 1.0 specification suggests. I would imagine any problems with format-number() actually boil down to problems with java.text.DecimalFormat.
    You can use Java Extension functions to perform custom Java in your stylesheet.
    See the file .\extfunc.html in the root directory of the XML Parser for Java V2
    distribution.

Maybe you are looking for

  • Show breadcrumb bar only on main list pages but not site pages

    Is there any way to show the breadcrumb bar only on list pages (for example to navigate in document libraries, surveys, etc.) but no in site pages or wikipages. The only solution I found was adding a webpart to each page I want to hide the breadcrumb

  • Question: how can I tell Bridge I want to set PS CS5 as the default program for opening .psd files

    How do I change a specific file type association in Bridge CS5, namely the .psd file type? I had installed Photoshop CS6, but am unable to use it due to extreme slowness (another problem, not for this question). I have reverted to using Photoshop CS5

  • Volume is too low

    I have Altec Lansing ADA745 plugged into my mac. The volume output is too low with all controls set to maximum. Any assistance or suggestions would be appreciated.

  • MB_DOCUMENT_BADI - SAP R/3 release upgrade from 4.7.1 to ECC 6

    Once finished upgrading from SAP R/3 4.7.1 to SAP ECC 6, from SPAU I see that there was no problem on the implementations of this BAdI. But when I tried the transaction, where this BAdi was implemented in, I realized that my implementations were not

  • Norton Antivirus HD scan

    When I scan the hard drive using Norton Antivirus, I get a list of files that it "Did not have permission to open the file." Is this normal? Shouldn't I be able to command Norton scan all my files? Below is a partial list of un-scanned files: .AppleS