How to get a time from a NTP server in ActionScript 3 ?

Dear All,
I need your advice, how to get the time from NTP Server , I tried to do this, but I don't.
Thanks
Omar Mahmoud

you must use a server-side language supported by your server.  php is a commonly supported language on most servers.
php tutorials can be found via google or any other search engine.

Similar Messages

  • Is there any way to obtain time from an NTP server in LabView?

    I would like to be able to obtain time from and NTP server and then use that to set the time on a PCI IRIG-B card. I haven't been able to find any LabView documentation indicating if this is possible or not through LabView.

    Check: Code library -> Browse by Company -> NASA -> Timesync.
    It's a NIST time syncronizer. I never checked it myself, but NIST has NTP servers so this may help you on your way.

  • How to get system time from cRIO?

    Hello,
    I have an NI cRIO-9076 chassis with an NI-9467 GPS module and an NI-9234 module.
    I've downloaded the FPGA Timekeeper application which synchronises the FPGA clock to the 1PPS GPS, this works well.  What I want to do is create a trigger that at a pre-defined HH:MMS the system will start to acquire and log data from the Accelerometers connected to the NI-9234 module.
    I have added the controls for the entry of the HH:MMS and calculated the time in seconds.  I would like to compare the system clock once it is locked to the entered timestamp and then trigger.
    As I only have a value that represents seconds in the day I need to calculate the offset from EPOCH to compare against the GPS time reference.  I have read that the NI system clock runs from 01/01/1904 instead of the EPOCH 01/01/1970.
    The question is how do I get the current system time so that I can compare it against the entered time?  I only need seconds in the day = (HH * 3600) + (MM * 60) + (SS)
    Thank you,
    Kind Regards,
    Simon

    You should use the Get Date/Time in Seconds VI which will return a timestamp. You can then format this timestamp using the Format Date/Time String to give you exactly the time format that you need. Then you can extract the numbers you need and do your math.
    www.movimed.com - Custom Imaging Solutions
    Attachments:
    Get Seconds in Day.vi ‏9 KB

  • How to get Scavenged Records from Windows DNS Server uisng WMI API Call?

    Hi Guys,
    I'm facing one problem to find below things,
    DNS Server have list of zones and each zones may have DNS Records. DNS Server provides an option set scavenging interval on server or in zone level.
    Once records are old the server automatically apply scavenging process to remove that record.
    I need to get DNS Records that are scavenged and timestamp using WMI Call?
    sharavanna

    The DNS log has this information.  Just extract it from the log.
    A scavenged record does not exisit when it is scavenged so it cannot be read from the DNS server.  It has been deleted.
    ¯\_(ツ)_/¯

  • V$osstat and V$SYS_TIME_MODEL - how to get CPU time from instance

    Hi there !
    I have a function osstat, which take stats from the os using v$osstat (credits for the procedure to a person, I regret to say, that I cant remember his name). But since we have 9 databases on the same server (and we dont have access to the server os itself (outsourcing stinks), we often would like to know more about cpu, waits etc. And one of the procedures we use is the osstat.
    I have tried to combine it with V$SYS_TIME_MODEL in oder to se how much of the OS CPU time comes from the instance I am on at the moment, but I'm not able to figure out how to do it exaclty.
    This is my code:
    DROP TYPE OSSTAT_RECORD;
    CREATE OR REPLACE TYPE osstat_record IS OBJECT (
      date_time_from TIMESTAMP,
      date_time_to TIMESTAMP,
      idle_time NUMBER,
      user_time NUMBER,
      sys_time NUMBER,
      iowait_time NUMBER,
      nice_time NUMBER,
      instance_cpu_time NUMBER
    DROP TYPE OSSTAT_TABLE;
    CREATE OR REPLACE TYPE osstat_table AS TABLE OF osstat_record;
    CREATE OR REPLACE FUNCTION osstat(p_interval IN NUMBER default 5, p_count IN NUMBER default 2, p_dec in number default 0)
       RETURN osstat_table
       PIPELINED
    IS
      l_t1 osstat_record;
      l_t2 osstat_record;
      l_out osstat_record;
      l_num_cpus NUMBER;
      l_total NUMBER;
      l_instance NUMBER;
    BEGIN
      l_t1 := osstat_record(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
      l_t2 := osstat_record(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
      SELECT value
      INTO l_num_cpus
      FROM v$osstat
      WHERE stat_name = 'NUM_CPUS';
      FOR i IN 1..p_count+1
      LOOP
        SELECT systimestamp, sum(decode(stat_name,'IDLE_TIME', value, NULL)) as idle_time,
               sum(decode(stat_name,'USER_TIME', value, NULL)) as user_time,
               sum(decode(stat_name,'SYS_TIME', value, NULL)) as sys_time,
               sum(decode(stat_name,'IOWAIT_TIME', value, NULL)) as iowait_time,
               sum(decode(stat_name,'NICE_TIME', value, NULL)) as nice_time
        INTO l_t2.date_time_to, l_t2.idle_time, l_t2.user_time, l_t2.sys_time, l_t2.iowait_time, l_t2.nice_time
        FROM v$osstat
        WHERE stat_name in ('IDLE_TIME','USER_TIME','SYS_TIME','IOWAIT_TIME','NICE_TIME');
        select value/100000
        into l_t2.instance_cpu_time
        from  V$SYS_TIME_MODEL
        where stat_name = 'DB time';
        l_out := osstat_record(l_t1.date_time_from, systimestamp,
                               (l_t2.idle_time-l_t1.idle_time)/l_num_cpus/p_interval,
                               (l_t2.user_time-l_t1.user_time)/l_num_cpus/p_interval,
                               (l_t2.sys_time-l_t1.sys_time)/l_num_cpus/p_interval,
                               (l_t2.iowait_time-l_t1.iowait_time)/l_num_cpus/p_interval,
                               (l_t2.nice_time-l_t1.nice_time)/l_num_cpus/p_interval,
                               ((l_t2.instance_cpu_time-l_t1.instance_cpu_time)/100));  --- >>  Should I divide by no of cpus here as well???  Or ???
        l_total := l_out.idle_time+l_out.user_time+l_out.sys_time+l_out.iowait_time+nvl(l_out.nice_time,0);
        if l_out.user_time > 0 then
           l_instance := (l_out.instance_cpu_time*100)/l_total;   ->> instance in percent of the total cputime
        else
           l_instance := 0;
        end if;
        if i > 1 then
        PIPE ROW(osstat_record(l_t1.date_time_to, systimestamp,
                               trunc((l_out.idle_time/l_total*100),p_dec),
                               trunc((l_out.user_time/l_total*100),p_dec),
                               trunc((l_out.sys_time/l_total*100),p_dec),
                               trunc((l_out.iowait_time/l_total*100),p_dec),
                               trunc((l_out.nice_time/l_total*100),p_dec),
                               trunc(l_instance,p_dec)));
        end if;
        l_t1 := l_t2;
        sys.dbms_lock.sleep(p_interval);
      END LOOP;
      RETURN;
    END;
    /I get ie a USER CPU Time of 15% fo a given interval of 5 mins - and a cputime for the instance of 50 - and others are 5% and 1%.
    My brain has stopped working now .... I'm stuck
    Mette

    mettemusens wrote:
    Hi there !Duplicate thread:
    Re: v$osstat and V$SYS_TIME_MODEL question
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to get elapsed time from start of current day

    Hello,
    I've tried to use the DateDiff function to calculate the elapsed time, starting from 00:00:00:000 (Midnight of current day), but I'm getting hung up on how to inform the function of what date values it should use.  I could parse off the time section
    of the
    GetDate() function, but that doesn't seems a little klunky to me. 
    So, what I'm trying to capture is this (pseudo code): 
    Elapsed Time (int) =    Select DateDiff(seconds, Current Day.Midnight, CurrentDay.CurrentSecond)
    Any help is greatly appreciated.
    Cap

    Hello,
    So something like this? You can change it around, I used variables so you can see and check (and play with) the values.
    DECLARE @CurDay DATE = GETDATE()
    Declare @SecondsToDate INT
    SELECT @SecondsToDate = DATEDIFF(SECOND, @CurDay, GETDATE())
    SELECT @SecondsToDate AS SecondsPastMidnight
    -- do the check
    SELECT DATEADD(SECOND, @SecondsToDate, CAST(@CurDay AS DATETIME))
    Sean Gallardy | Blog | Microsoft Certified Master

  • How to get pdf file from sap presentation server using java connector

    Hi Friends,
    with the below code i am able to get po details in pdf in presentation server.
    DATA : w_url TYPE string
           VALUE 'C:\Documents and Settings\1011\Solutions\web\files\podet.pdf'.
    CALL FUNCTION 'ECP_PDF_DISPLAY'
            EXPORTING
              purchase_order       = i_ponum
           IMPORTING
      PDF_BYTECOUNT        =
             pdf                  = file  " data in Xsting format
    *Converting Xstring to binary_tab
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer                = file
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
            TABLES
              binary_tab            = it_bin " data in binary format
    **Downloading into PDF file
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
      BIN_FILESIZE                    =
              filename                        = w_url
              filetype                        = 'BIN'
             TABLES
              data_tab                        = it_bin
    when i am using java connector , to retirve the file from presentation server , the follwoing error i am getting...
    init:
    deps-jar:
    compile-single:
    run-single:
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in Control Framework
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
            at PdfGen.<init>(PdfGen.java:35)
            at PdfGen.main(PdfGen.java:78)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)
    i debugged too, problem with <b>gui_download......</b>
    I am very glad to all with your suggestions!!
    Regards,
    Madhu..!!

    Hi
    You can try to create an external command (transaction SM69).......sorry I've forgotten,,,,they works on application
    How do you call CL_GUI_FRONTEND_SERVICES=>EXECUTE?
    Max
    Edited by: max bianchi on Oct 13, 2011 10:27 AM

  • How to get a time part from Date datatype

    Hi,
    I would like to know how to extract the timestamp alone from DATE datatype? If my input is '27-SEP-2011 23:59:00' I need the output as 23:59:00. I am surprised to see that there are no in-built functions for this or may be I am wrong. Basically I need to remove the date part from DATE data type and get the time.Please assist.
    -Thanks
    Edited by: user9546145 on Sep 27, 2011 2:24 PM
    Edited by: user9546145 on Sep 27, 2011 2:25 PM

    Hi,
    user9546145 wrote:
    Hi,
    I would like to know how to extract the timestamp alone from DATE datatype? Be careful! In Oracle, TIMESTAMP means a datatype, similar to but distinct from DATE. You'll avoid confusion if you don't use the word "timestamp" to mean anything else.
    There is a built-in function, TO_CHAR:
    TO_CHAR (dt_col, 'HH24:MI:SS')Depending on how you plan to use the time, TRUNC is another handy built-in function:
    dt_col - TRUNC (dt_col)is a NUMBER (not less than 0, but less than 1) which is suitable for many tasks, such as finding the average time.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • How to get all changes from directory beginning from some time?

     

    Hi,
    If you make change one time means you can get old information by Restore method.More than one time means you can't get the info from the directory server.By better practice to take a backup for every day.

  • How to get a formula from the user from a text box in a webpage

    Hi. I would like to know how to get the formula from the user who enters in a textbox. This formula can have any number of variables starting with a and goes on.
    The complexity of the formula can go upto sin, cos, ln, exp. Also user enters the minimum and maximum values of these variables. Based on a specific algorithm (which I use) I would calculate a *set of values, say 10, for each of these variables, substitute in the formula and based on the result of this formula, I select ONE suitable  value for each of the variables.
    I don't know how to get this formula (which most likely to be different each time) and substitute the values *which I found earlier.
    Kindly help me out in this issue.
    Thanks

    The textbox is the easy part. It's no different than getting a String parameter out of an HTTP request.
    The hard part is parsing the String into a "formula" for evaluation. You'll have to write a parser or find one.
    Google for "Java math expression parser" and see what you get.
    Or write your own with JavaCC.
    %

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help

    I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help says File >Library >Export playlist and choose XML, or to save a copy of all your playlists, File > Library > Export Library, "the Exported info is saved in XML format."  Then it says, "to import an iTunes playlist, File > Library > Import Playlist".  Now I am assuming I do that import part on the Air, but when I try it doesn't recognize anything that can be imported - what am I missing??? Aside from a clue...

    Thanks, Jim, for taking the time, but the reply is unfortunately vague in the exact area of my confusion!  "you need to copy that file to your new computer..."  Well, the Import/Export instructions make it seem as if the two computers should be able to communicate this file thru wifi, but that's the linkage I can't seem tocreate with Import/Export.  Should I instead email a copy to myself (thats what applecare suggested)?  Copy it to and from a thumb drive?  But then place the file where?  And the article was helpful, but should I be trying to move the Library file or the Library.xml file (as iTunes Help suggests)?  Sorry to be so clueless about it...I suppose I buy Apple in the hopes of not having to think about this stuff, which approach seems not to be serving me well. Thanks again for your time!

  • HT2500 how do i get my mail from the pop server to my inbox

    Can someone please help me ! I'm sure I did something by accident and don't know how to fix it. My problem is i don't see any emails in my inbox, however my account info says there is mail on the pop server. how do i get the mail from the pop server to my inbox?
    thank you for helping

    First try rebuilding your Inbox.
    Select the Inbox.
    Under Mailbox in the Menu bar select Rebuild (last option in list)
    Note: If you delete a POP account in Mail, it will delete any messages in the Inbox. It does not delete your custom folders or your sent messages.
    If the messages have been deleted and are no longer on the server, you can restore from Time Machine.
    Let us know if this helps.

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

Maybe you are looking for

  • File- XI- RFC (Error: Received HTTP response code 500..)

    Hi, I am working on File->XI->RFC  scenario, getting Processed Successfully status in "SXI_MONITOR". But Data is not posted in SAP R/3. I check   <b>Runtime Workbench  </b> Getting following Error in one step. Can any one help me in analyzing the err

  • Monitor streaming progress on client

    After thinking and taking in consideration suggestions on forum I decided not to use appv client gui on the machine. I have some debate about streaming time monitoring. Example O2013 takes about 15 minutes to finish streaming. Then when clicking Word

  • Opening PDF files in Chromium

    Trying to view PDF files in chromium so I tried to install chromium-stable-libpdf from the AUR, but the md5sum is wrong. Does anybody know how I can get the correct one or how I can bypass it? Otherwise I tried doing it manual following the arch wiki

  • Accessing anonymous user in web dynpro application

    Hi All,   I have created one web dynpro application for internet site (Anonymous user). While trying to retrieve the Iuser through web dynpro application, it is coming <b>null</b> coz user is Anonymous if i am not wrong. So I am not able to read the

  • Too many users in terminal when i look at who

    Hi, i know there was discussion earlier (i tried to search without luck) about users shown in terminal using who command. There (if i remember correctly) should be 1 console + 1 each open terminal. i for some reason have 1 + 3 with single terminal? f