Writing function to print limited time

Hai sir,this is surendra i developed a software for online examination i have problem with printing the limited time can yoiu give the code of th function to print the limited time from the bean

if you are using SWING all you have to do is set up a Timer (javax.swing.Timer) and check the time each time it fires.
in your constructor get a reference to the Calendar object:
Calendar c = Calendar.getInstance();when you start your timed event:
long myStartTime = c.getTimeInMillis();
myTimer.start();when you want to check--each time the timer object fires (in the actionPerformed of your ActionListener for the Timer)
if(myTimeInMillis()>(c.getTimeInMillis()-myStartTime)){
  //your make it exit code goes here
}

Similar Messages

  • SAPSCRIPT : Line Printing Three Times?

    Here is the code: Anybody see why this would print three times?
    /E   HEADER_TEXT                                                              
    L    <H>   </>                                                                
    /:   INCLUDE &EKKO-EBELN& OBJECT 'EKKO' ID 'F01' LANGUAGE &EKKO-SPRAS& PARAGR >
                             Thank-You.

    Hi Tom
    look at ur program where it calls the FUNCTION 'WRITE_FORM' when
    EXPORTING
       ELEMENT                        = 'HEADER_TEXT'
    maybe it's doing a loop, do times, etc...
    Regards
    Allan Cristian

  • I can't use the function of "print to video".

    I've recently purchased FCPX and Blackmagic Design Decklink HD Extreme 3(version 7.5.2) but I already know this combination looks quite weird because I'm using only DSR. This is the first time I have installed FCP.
    I installed FCPX and figured out there's no way to get the video from Decklink on FCPX so that I deleted FCPX, installed FCP 2009 instead and installed FCPX again on the same disk as Final Cut Pro 7... It's a shame to get rid of it.
    At first, I could get a good result when printing to tape. There's no problem. But it's not long before I failed to get what i wanted. VCR detects input signal from FCP 7 through Decklink but the monitor of VCR shows only noise. For now, I can't use the function of "print to video".
    Also, I connect the input of Decklink to the output of DSR and the output of Decklink to the input of DSR at the same time and monitor w/ the output of DSR. However, the output on the monitor shows something weird when I capture the video from DSR as if the signal is fed back.
    Someone told me that I have to use other version of decklink but i'm not sure it would be better if I just change the version.
    What's wrong?
    What should I do for fixing these all mess?

    I've recently purchased FCPX and Blackmagic Design Decklink HD Extreme 3(version 7.5.2) but I already know this combination looks quite weird because I'm using only DSR. This is the first time I have installed FCP.
    I installed FCPX and figured out there's no way to get the video from Decklink on FCPX so that I deleted FCPX, installed FCP 2009 instead and installed FCPX again on the same disk as Final Cut Pro 7... It's a shame to get rid of it.
    At first, I could get a good result when printing to tape. There's no problem. But it's not long before I failed to get what i wanted. VCR detects input signal from FCP 7 through Decklink but the monitor of VCR shows only noise. For now, I can't use the function of "print to video".
    Also, I connect the input of Decklink to the output of DSR and the output of Decklink to the input of DSR at the same time and monitor w/ the output of DSR. However, the output on the monitor shows something weird when I capture the video from DSR as if the signal is fed back.
    Someone told me that I have to use other version of decklink but i'm not sure it would be better if I just change the version.
    What's wrong?
    What should I do for fixing these all mess?

  • Is there any built in function that prints numbers in words inXMLP

    Hi Team,
    This is regarding SR#3-7005716301 from Syntel Limited.
    Customer is asking Is there any built in function that prints numbers in words in an rtf teamplate using xml publisher?
    For example if the net amount is 100 dollars then it should print "ONE HUNDRED DOLLARS AND ZERO CENTS ONLY"
    Thanks in advance!
    Leo

    I do not know of any function available that lets you print the currency words (dollars, cents etc). Here is a link to a blog post that will allow you to print numbers in words.
    https://blogs.oracle.com/xmlpublisher/entry/numbers_to_words_update
    Thanks,
    Bipuser

  • How CAN I PRINT FROM TIME CAPSULE?

    I've set up Time Capsule through Airport utility and Time Machine but had some problems doing so. Consequently, it was set up with print cable still hooked to iMac. Now that Time Capsule is functioning as a backup for my files, I've tried to print from Time Capsule to my HP PSC 1610 printer. I've transfered my print cable from iMac to Time Capsule and tried to make any changes necessary to print from it. But it doesn't work. What am I possibly doing wrong? I've tried following page 28 of Time Capsule setup guide (If your printer isn't responding) but that has not helped.
    - Wayne

    See my reply to your previous post with the same question.
    Please do not double post questions on the community support area.
    Thanks!

  • Writing functions that contain scriptlets/expressions

    How do I go about writing functions in my JSP page that contain scriptlets and expressions? Also, I'd like to reference session/request/response variables from within.
    I want something like this:
    <jsp:useBean id="myObject" class="com.classes.*" scope="session" />
    <%!
    void printList()
         String str1 = myObject.getName();    <%-- reference outside object --%>
         String str2 = request.getParameter("address");  <%-- use request variable --%>
         out.println(str1 + ": " + str2); <%-- I know it's illegal to do this, but how do I print to the browser from a function? --%>
         <%= request.getParameter("zipcode") %> <%-- Also illegal (are expressions allowed?) --%>
         out.println("<A HREF=\"<% session.getAttribute("url") %>\">Click here</a>");  <%-- dynamic and static content: how do I do this? --%>
    %>I unsure as to how to carry out the above actions. My biggest problem is the last example. How do I print out HTML interspliced with dynamic content with my function?
    I'm pretty sure that nesting <% %> tags inside of <%! %> directive tags is illegal. Is writing a void function that prints out a bunch of static and dynamic data simply not possible with JSP? If so, is it necessary that I write several functions to return values which can then be printed later in the page via separate scriptlets or expressions?

    Take a look at generated servlet code and try to understand how it is working.
    request and response is available only inside some method body. So to access it in your method, you must pass it as argument.
    void printList(HttpServletRequest request, HttpServletResponse response) { ... }everything inside
    <%!
    is added to servelt code, but things inside <% %> are added to processing method body not servlet body.
    Take look at jsp and corresponding servlet:
    JSP:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
        <%="place 1"%>
    </body>
    </html>
    <%!
        public String aaa() {
            return "palce2";
    %>GENERATED SERVLET
    package org.apache.jsp;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    public final class test_jsp extends org.apache.jasper.runtime.HttpJspBase
        implements org.apache.jasper.runtime.JspSourceDependent {
        public String aaa() {
            return "palce2";
      private static java.util.Vector _jspx_dependants;
      public java.util.List getDependants() {
        return _jspx_dependants;
      public void _jspService(HttpServletRequest request, HttpServletResponse response)
            throws java.io.IOException, ServletException {
        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        JspWriter _jspx_out = null;
        PageContext _jspx_page_context = null;
        try {
          _jspxFactory = JspFactory.getDefaultFactory();
          response.setContentType("text/html;charset=UTF-8");
          pageContext = _jspxFactory.getPageContext(this, request, response,
                         null, true, 8192, true);
          _jspx_page_context = pageContext;
          application = pageContext.getServletContext();
          config = pageContext.getServletConfig();
          session = pageContext.getSession();
          out = pageContext.getOut();
          _jspx_out = out;
          out.write("\n");
          out.write("\n");
          out.write("<html>\n");
          out.write("<head><title>JSP Page</title></head>\n");
          out.write("<body>\n");
          out.write("    ");
          out.print("place 1");
          out.write("\n");
          out.write("</body>\n");
          out.write("</html>\n");
          out.write("\n");
        } catch (Throwable t) {
          if (!(t instanceof SkipPageException)){
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
              out.clearBuffer();
            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        } finally {
          if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }

  • How to print system-time in XML?

    Hi,
       Please help me how to print system-time in XML. Like we use sy-uzeit in ABAP.
    Can we use anything in XML too..
    Thanks & Regards,
    Sai

    hi movilogo
    Please try this.
    Create hidden item P1_DATE
    Create On load process in page 1 and put this code
    begin
    :P1_DATE:=TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MM:SS');
    end;
    Open your region in Page 1 put this code in Footer area
    *&P1_DATE.*
    Refresh your page.
    you will get the output like this.
    16-SEP-2009 11:09:17
    thanks
    Mark Wyatt

  • How to print date & time stamp on photos?

    How to print date & time stamp on photos?

    Three methods:
    File>process multiple files>labels. Be sure to uncheck "same as source", or the originals will be overwritten. It is best to work on duplicate files, esp. while learning.
    Use the horizontal or vertical type tool to add the information manually to each picture file
    If the same information is to be applied to several pictures, e.g. a copyright notice, use  of a brush made in PSE is very efficient

  • How to print out time as hr:min:sec without AM/PM?

    how to print out time as hr:min:sec without AM/PM
    since hr specifies AM/PM. Thank you. My first thought
    is that there exists a formatter to do this. My second
    thought is that if not I can convert the AM/PM in the
    DateFormat.MEDIUM to the right hour.

    import java.text.*;
    import java.util.*;
    public class Test {
        public static void main (String [] args) {
            SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
            Date d = new Date();
            System.out.println( format.format(d) );
    }

  • How to print date/time in report page footer?

    Hi
    I have a report which users can print as PDF.
    However, I like to display current date/time in report footer.
    I can see the Page Footer in section but can't figure out how to print date/time there.
    Thanks for help.

    hi movilogo
    Please try this.
    Create hidden item P1_DATE
    Create On load process in page 1 and put this code
    begin
    :P1_DATE:=TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MM:SS');
    end;
    Open your region in Page 1 put this code in Footer area
    *&P1_DATE.*
    Refresh your page.
    you will get the output like this.
    16-SEP-2009 11:09:17
    thanks
    Mark Wyatt

  • Call a function at a specific time

    I am working on a large java project, and i need a way to call a function at a specific time(midnight of every night). How can i do this?

    I am working on a large java project, and i need a
    way to call a function at a specific time(midnight of
    every night). How can i do this?If your JVM is running all the time, use a [url http://java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html]java.util.Timer. Otherwise, it's an OS thing. You'll have to set up a cron job of some kind.

  • In IE if I set the zoom at lets say 150% it will stay that way even if I shut down. But with firefox, it goes back to small print every time I view a new page. Is there a way to set the zoom to stay at a larger size? Thanks, EH

    # Question
    In IE if I set the zoom at lets say 150% it will stay that way even if I shut down. But with firefox, it goes back to small print every time I view a new page. Is there a way to set the zoom to stay at a larger size? Thanks, EH

    If you need to adjust the font size on websites then look at:
    * Default FullZoom Level - https://addons.mozilla.org/firefox/addon/6965
    * NoSquint - https://addons.mozilla.org/firefox/addon/2592
    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 10.0 r45
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/

  • In Material Master Screen,functionally what is Safety time and safety time

    In Material Master Screen,functionally what is Safety time and safety time indicator in the MRP Screen.Pls explain its functionality

    Hi,
    The safety time / actual range of coverage ensures that the planned warehouse stock covers the requirements of a defined number of days. It therefore serves as a time float and thus works alongside the safety stock, which acts as quantity float.
    The system simulates bringing the requirements forward by the specified number of days and the planning for the receipts, created for these requirements in the planning run, is also brought forward by this number of days.
    Prerequisites
    ·   You have set the Safety Time indicator in the material master record (MRP 2 View) to define whether the safety time is only to apply to independent requirements or to all requirements.
    ·    In the material master record (MRP 2 View), in the Safety Time/Actual Range of Coverage field, you have entered the number of workdays by which the requirements are to be brought forward.
    ·    If, in addition to this actual range of coverage, you also want to define a different number of workdays in certain periods or a safety time less than one day then, in Customizing for MRP in the activity Define Period Profile for Safety Time/Actual Range of Coverage you can define a period profile and assign it to the material in the material master record.
    Regards,
    Vijay

  • Is there a solution for the limited time of videorecording?

    Is there a solution for the limited time of videorecording?
    By recording on my iPad2 there is a maximum time of 49 minutes and 51 seconds.

    Hello Studio X
    I have an iPad2 with 64 GB. After I start the videorecording it stops automaticly by 49 minutes en 51 seconds.
    I looked in my settings and there was still enough space left. Although I do not think that the 64Gb is not the problem.
    I bought myself an alternative recording app now. I hope it works properly but if the quality is OK. I do not know. I combine the recordings with my video (digitaltape) camera of Sony.
    Thanks for your reply
    sozave007

  • Line Item are Printing 2 Times

    Hi Experts,
                      when i am trying to take quotation print out line item is printing 2 times.......
                      Can anyone help me to solve this problem.....

    Hi,
             No i didn't select any other  tables apart from sales quotation rows, and i have two system variable field.......

Maybe you are looking for

  • Open Sales Order Migration

    Hi all, We want to migrate every open sales order, but only with non delivered items. In which way (LSMW, BAPI, etc) we can assure that only opened items from SO are migrated and all data (original document date, etc) is exactly the same? Thanks in a

  • Handicap/Disabled user of Final Cut Pro

    I am teaching a Final Cut Pro Editing class at San Francisco State University. One of my students has cerebral palsy. He is extremely bright and very determined to learn to use FCP despite his limited motor skills. (He types with one finger and can u

  • Should I buy the Aperture 1.5 or should I wait?

    Considering the fact that Apple doesn't give discount to users of older version of their softwares, I wonder if I should go ahead and purchase Aperture 1.5! I don't even know if there is a newer version coming out. And if so, when? thanks, Reza

  • Stolen Phone Issues

    I am a new customer with Verizon and have encountered a sticky situation. Started my service August 11th and take ownership for going over with my data but on August 18th went to the emergency room and was admitted to the hospital August 19th. During

  • Can anyone explain the scenarios

    Hi All, Can anyone provide me the examples where we can use Classifcaition datasource extraction(CTBW)  from ECC?If any documents or links, please forward to me. Thanks in advance!