Understand a clock based on the code

The goal:

With the timeline has stopped, a timer of account to a specified number of seconds, then performs an action (play, gotoAndPlay, etc.).

Here's the code cobbled together from tutorials and generosity of forum, but how to set this action to dry fire 30 or 60 sec?

stop();
var timer:Timer = new Timer(20, 100); // Sets delay to 100, repeatCount to 100
timer.addEventListener(TimerEvent.TIMER, stopper);
function stopper(event:TimerEvent):void {
    switch (timer.currentCount) {
        case timer.repeatCount:
                    timerText.text = "Done";
            timer.reset();
            break;
    }
}

function timerListener (e:TimerEvent):void {
           gotoAndPlay("2");
  // Code here will execute when triggered by a TimerEvent.TIMER event
}
timer.addEventListener(TimerEvent.TIMER, timerListener);


//fire the timer
timer.start();

//setup reset button
resetButton.addEventListener(MouseEvent.MOUSE_DOWN, resetBut); 
//reset timer on call
function resetBut(event:MouseEvent):void {
timerText.text = "";
timer.reset();
timer.start();
}


Get the answer without doubt in the second line, but 20, 100 do correspond to? My rough test timer is running now for about 3 seconds before firing the event.

FLA posted here: https://my.Syncplicity.com/share/kobzidmgnm/as3_timer-CT-simple

Thanks for the tips...

If you look to the top of the Timer class in the help documentation, you will find the answers you are looking for.  If you are not familiar with how to do this, a simple way is to select the word "timer" in the Actions panel code and right-click, and choose view help at the bottom of the menu that appears.  The Timer class document should open.

In here, you will find that the 20 and 100 are delay and repeatCount property.

Tags: Adobe Animate

Similar Questions

  • Do not understand what is wrong in the code

    Task of my code that movieclip on stage, changing its size - height when changing window size of browsers (player) so height movieclip = fenΩtre rowsers (player) of height.

    Here's my code:

    package
    {
    import flash.display. *;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;

    SerializableAttribute public class ZhMenu extends Sprite
    {
    public var menubg:MovieClip;

    public void ZhMenu()
    {
    var menubg: = new menuGrad();
    stage.scaleMode = StageScaleMode.NO_SCALE;
    internship. Align = StageAlign.TOP_LEFT;
    stage.addEventListener (Event.RESIZE, onResize);
    this.addChild (menubg);
    menuBG.x = 0;
    menuBG.Width = 150;
    menuBG.Height = stage.stageHeight;
    }


    public void onResize (event: Event): void
    {
    var sh: number = stage.stageHeight;
    menuBG.x = 0;
    menuBG.Width = 150;
    menuBG.Height = SH;
    }
    }
    }

    In the number MovieClip menubg added on stage, but when I change the size of the window I have error:

    TypeError: Error #1009: it is not possible to cause a property or a method by referring to the object "null."
    to ZhMenu / onResize)

    And menubg do not change size of course.

    I don't understand what the problem is.

    Plize help me if you know Action Script 3.0 better.

    I don't know if this will fix the error, but in the function ZhMenu, you declare another object in mwnubg (var menubg: = new menuGrad();), which will have no scope within this function.  That you declare (public var menubg:MovieClip ;) outside is never instantiated, and is the one who tries to change your function onResize.)

    As far as the error goes, go to your publication of Flash settings and select the option to enable debugging.  When you run the file again, there may be a number provided in the error message indicating which line is causing the problem.

  • Where conditional Clause based on the length of the field

    Hello people,
    I tried to search for this scenario in OTN and not been able to find any success so I will post the question here.

    I have two tables - with the detail records and the other being a table of codes. I need to join these two tables based on the code and the length of the code. Let me explain using examples.

    Scripts for creating the table and inserts
    create table ILLNESS_CODES(illness_code varchar2(4), illness_description varchar2(100));
    create table PATIENT_TB(patient_id varchar2(4), primary_cause varchar2(4));
    
    insert into illness_codes values('B10', 'Flu');
    insert into illness_codes values('B30', 'Hepatitis');
    insert into illness_codes values('B301', 'Hepatitis A');
    insert into illness_codes values('B302', 'Hepatitis B');
    insert into illness_codes values('B303', 'Hepatitis C');
    
    insert into patient_tb values ('1001', 'B101');
    insert into patient_tb values ('1002', 'B102');
    insert into patient_tb values ('1003', 'B30');
    insert into patient_tb values ('1004', 'B301');
    insert into patient_tb values ('1005', 'B302');
    insert into patient_tb values ('1006', 'B302');
    insert into patient_tb values ('1007', 'B303');
    insert into patient_tb values ('1008', 'B30');
    As you can see that patients * 1001 * and * 1002 * have no codes in the Master table. In this case, I want only the first 3 characters of the ILLNESS_CODES table.
    However, for B30, it has a Code and the same for B301, B302 B303 where I would meet the description based on the exact code.

    Example of output
    Patient ID   Illness Description
    =====================================
    1001         Flu
    1002         Flu
    1003         Hepatitis
    1004         Hepatitis A
    1005         Hepatitis B
    1006         Hepatitis B
    1007         Hepatitis C
    1008         Hepatitis
    Thanks in advance!
    SELECT p.*,
           NVL ( (SELECT illness_description
                    FROM ILLNESS_CODES I
                   WHERE i.illness_code = p.primary_cause),
                (SELECT illness_description
                   FROM ILLNESS_CODES I
                  WHERE i.illness_code = SUBSTR (p.primary_cause, 1, 3)))
      FROM PATIENT_TB p;
    
  • Same page, two regions based on the same conflicts taskflow

    I have a page and I understand two regions based on the same workflow, at the start of region renderes ok, but then they don't are never refreshed, it seems like a conflict.

    I hope you can help me, thanks and sorry for my English...

    Published by: Jocelyn on 2012-ene-18 09:13

    Hello

    Well, I don't understand the question "no refresh" you mention. However, you did it that the workflow is isolated and does not share its DataControl? If you share the DataControl then region 1 and 2 show the same data and are just one and same.

    Frank

  • Application based on the strange error in sharedObject led tilelist

    I recently made a request (with the great help of this forum) which allows users to drag items between tilelists and then save the changes to the tilelists via sharedObject method simply by clicking on save button so that the next time they open the application that changes will always be there but I have an error strange now message that appears.

    What happens is if the user is dragging ALL items in the tilelist left hand in hand right tilelist saves their changes, and then close and reopen the app then left tilelist contains no items and the right tilelist contains all the elements that goes well so far HOWEVER if now, the user clicks on the button without interacting with the tilelists an error pops up something in the sense of "save Error #1009". ': Cannot access a property or method of a null object reference. It seems harmless but when I finalize the app I don't want users to add all the elements of the tilelist right not save changes, close and reopen and then get an error, if happen them to click on save again.

    I can't understand it, but here is the code of the application: -.

    <? XML version = "1.0" encoding = "utf-8"? >

    < mx:Application ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "layout =" " absolute "creationComplete ="initprofile1NewsAndSportSO ();" >

    < mx:Script >

        <! [CDATA]

    import mx.collections. *;

    import flash.net.SharedObject;

    public var profile1NewsAndSportSO:SharedObject;

    private var profile1NewsAndSportaddLinksFullAC:ArrayCollection = new ArrayCollection([ )

    {link: 'www.bbcnews.com', label:' BBC News ', icon:'image7', largeImage:"assets/images/bbcnews_small.png", title:' BBC News ', description:"BBC News description will go here"},

    {link: "www.itv.com/", label:'ITV', icon:'picture5', largeImage:"assets/images/itv_small.png", title:'ITV', description:"ITV Description will go here"},

    {link: "www.skynews.com", label:' Sky News ', icon:'image10', largeImage:"assets/images/skynews_small.png", title:' Sky News ', description:"Sky News Description will go here"}

          ]);

    private var profile1NewsAndSportaddLinksAC:ArrayCollection = new ArrayCollection([ )

    {link: 'www.bbcnews.com', label:' BBC News '},

    {link: "www.itv.com/", label:'ITV'},

    {link: "www.skynews.com", label:' Sky News '}

          ]);

    private function profile1NewsAndSportReset():void{ }

    resetprofile1NewsAndSportAC();

    profile1NewsAndSportAddLinksTilelist.dataProvider

    = profile1NewsAndSportaddLinksAC;

    profile1NewsAndSportLinkChoice.dataProvider = new ArrayCollection([]);

          }

    private function resetprofile1NewsAndSportAC():void{ }

    profile1NewsAndSportaddLinksAC.removeAll ();

    for every()var obj:Object in profile1NewsAndSportaddLinksFullAC) { }

    profile1NewsAndSportaddLinksAC.addItem (obj);

            }

          }

    private function initprofile1NewsAndSportSO():void{ }

    profile1NewsAndSportSO = SharedObject.getLocal ("profile1NewsAndSport");

    If(profile1NewsAndSportSO.size > 0) { }

    If(profile1NewsAndSportSO.data.profile1NewsAndSportaddList) { }

    If(profile1NewsAndSportSO.data.profile1NewsAndSportaddList! = 'empty') { }

    var profile1NewsAndSportaddList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportaddList.split (',');

    var profile1NewsAndSporttempAC1:ArrayCollection = new ArrayCollection();

    for every()var str:String in profile1NewsAndSportaddList) { }

    for every()var obj1:Object in profile1NewsAndSportaddLinksAC) { }

                      if (str == obj1.label) { }

    profile1NewsAndSporttempAC1.addItem (obj1);

                        continues ;

                      }

                    }

                  }

    If(profile1NewsAndSporttempAC1.length > 0) { }

    profile1NewsAndSportAddLinksTilelist.dataProvider = profile1NewsAndSporttempAC1;

                  }           

                }

              }

    If(profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList) { }

    var profile1NewsAndSportchoiceList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList.split (',');

    var profile1NewsAndSporttempAC2:ArrayCollection = new ArrayCollection();

    for every()var str2:String in profile1NewsAndSportchoiceList) { }

    for every()var obj2:Object in profile1NewsAndSportaddLinksAC) { }

    If(str2 == obj2.label) { }

    profile1NewsAndSporttempAC2.addItem (obj2);

                      continues ;

                    }

                  }

                }

    If(profile1NewsAndSporttempAC2.length > 0) { }

    profile1NewsAndSportLinkChoice.dataProvider = profile1NewsAndSporttempAC2;

                }           

              }

            }else{

    profile1NewsAndSportReset();

            }

          }

    private function saveprofile1NewsAndSport(event:MouseEvent):void{ }

    var profile1NewsAndSportaddList:String = ""; .

    If(collection ArrayCollection (profile1NewsAndSportAddLinksTilelist.dataProvider) .length > 0) { }

              for each(var obj1:Object in

    profile1NewsAndSportAddLinksTilelist.dataProvider) {}

    profile1NewsAndSportaddList += obj1.label + ','

              }

            }else{

    profile1NewsAndSportaddList = 'empty'

            }

    profile1NewsAndSportSO.data.profile1NewsAndSportaddList = profile1NewsAndSportaddList;

    var profile1NewsAndSportchoiceList:String = ""; .

            for each(var obj2:Object in

    profile1NewsAndSportLinkChoice.dataProvider) {}

    profile1NewsAndSportchoiceList += obj2.label + ','

            }

    profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList = profile1NewsAndSportchoiceList;

    profile1NewsAndSportSO.flush ();

          }

        ]] >

    < / mx:Script >

    < mx:Button click = "profile1NewsAndSportReset ()" id ="reset"" «»

        label=" Reset " y=" 5 "height =" 25 " x=" 5 " />

    "" < mx:TileList id = "profile1NewsAndSportLinkChoice" fontWeight =""BOLD"" " "

    dragEnabled = "true"dragMoveEnabled = "true" dropEnabled ="true" height ="129" " "

    "" " width = '650" top ="5" left = "521" columnCount = "5" rowHeight ="145" " "

    "" = columnWidth '125"backgroundColor ="#000000"color ="#FFFFFF"""/ >

    "" < mx:TileList id = "profile1NewsAndSportAddLinksTilelist" fontWeight =""BOLD"" " "

    dragEnabled = "true"dragMoveEnabled = "true" dropEnabled ="true" height ="129" " "

    "" width = '385"top ="5"left ="128"columnCount ="3"rowHeight ="145"columnWidth ="125"" "

    " backgroundColor ="#000000"color ="#FFFFFF"""/ > "

    " < mx:Button click =" saveprofile1NewsAndSport (event) "id ="Save"label ="save changes"" ""

        x=" 5 " y=" 38 "width =" 113 "height =" 25.5 " />

    < / mx:Application >

    This should fix it.

    If this post answers your question or assistance, please mark it as such.

    
    
      
         0){
              if(profile1NewsAndSportSO.data.profile1NewsAndSportaddList){
                if(profile1NewsAndSportSO.data.profile1NewsAndSportaddList != "empty"){
                  var profile1NewsAndSportaddList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportaddList.split(",");
                  var profile1NewsAndSporttempAC1:ArrayCollection = new ArrayCollection();
                  for each(var str:String in profile1NewsAndSportaddList){
                    for each(var obj1:Object in profile1NewsAndSportaddLinksAC){
                      if(str == obj1.label){
                        profile1NewsAndSporttempAC1.addItem(obj1);
                        continue;
                      }
                    }
                  }
                  if(profile1NewsAndSporttempAC1.length > 0){
                    profile1NewsAndSportAddLinksTilelist.dataProvider = profile1NewsAndSporttempAC1;
                  }
                }
              }
              if(profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList){
                var profile1NewsAndSportchoiceList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList.split(",");
                var profile1NewsAndSporttempAC2:ArrayCollection = new ArrayCollection();
                for each(var str2:String in profile1NewsAndSportchoiceList){
                  for each(var obj2:Object in profile1NewsAndSportaddLinksAC){
                    if(str2 == obj2.label){
                      profile1NewsAndSporttempAC2.addItem(obj2);
                      continue;
                    }
                  }
                }
                if(profile1NewsAndSporttempAC2.length > 0){
                  profile1NewsAndSportLinkChoice.dataProvider = profile1NewsAndSporttempAC2;
                }
              }
            }else{
                profile1NewsAndSportReset();
            }
          }
          private function saveprofile1NewsAndSport(event:MouseEvent):void{
            var profile1NewsAndSportaddList:String = "";
            if(profile1NewsAndSportAddLinksTilelist.dataProvider){
              if(ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).length > 0){
                for each(var obj1:Object in
                  profile1NewsAndSportAddLinksTilelist.dataProvider){
                  profile1NewsAndSportaddList += obj1.label + ",";
                }
              }else{
                profile1NewsAndSportaddList = "empty";
              }
            }
            profile1NewsAndSportSO.data.profile1NewsAndSportaddList = profile1NewsAndSportaddList;
            var profile1NewsAndSportchoiceList:String = "";
            for each(var obj2:Object in
              profile1NewsAndSportLinkChoice.dataProvider){
              profile1NewsAndSportchoiceList += obj2.label + ",";
            }
            profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList = profile1NewsAndSportchoiceList;
            profile1NewsAndSportSO.flush();
          }
        ]]>
      
      
      
      
      
    
    
    
  • How to read multiple channels based on the external clock

    Hello

    Normal 0 false false false MicrosoftInternetExplorer4 / * Style Definitions * / table. MsoNormalTable {mso-style-name: "Table Normal" "; mso-knew-rowband-size: 0; mso-knew-colband-size: 0; mso-style - noshow:yes; mso-style-parent:" ";" mso-padding-alt: 0 to 5.4pt 0 to 5.4pt; mso-para-margin: 0; mso-para-margin-bottom: .0001pt; mso-pagination: widow-orphan; do-size: 10.0pt; do-family: "Times New Roman"; mso-ansi-language: #0400; mso-fareast-language: #0400; mso-bidi-language: #0400 ;} "}

    I use 6254 multifunction for playback of tension with VC ++ 6 as the development tool.

    Based on the documentation NOR I created tasks like this.

    DAQmxCreateTask (_T ("Voltagetask"), & taskHandle);

    DAQmxCreateAIVoltageChan(taskHandle,sChannels,,DAQmx_Val_NRSE,0,10,DAQmx_Val_Volts,);

    DAQmxCfgDigEdgeStartTrig (taskHandle, "PFI2", DAQmx_Val_Rising);

    DAQmxCfgSampClkTiming(taskHandle,"PFI2",303000,DAQmx_Val_Falling,DAQmx_Val_FiniteSamps,nSamples);

    DAQmxStartTask (taskHandle);

    After the generation of clock finished thanks to the DAQmxReadAnalogF64 function, I tried to read samples of each channel.

    DAQmxReadAnalogF64 (taskHandle, DAQmx_Val_Auto, 10, DAQmx_Val_GroupByScanNumber, read, m_nStates & sampsPerChanRead, NULL);

    Total number of samples (nSamples) available in the buffer when the task is created with a single channel and several channels are still to come as even. In several modes of channel returns total sample by channel, which is equal to the total number of samples divided by the number of channels at once.

    For example, if a total number of clock 8000

    With single channel, it reads all the 8000 samples (m_nStates = 8000, sampsPerChanRead = 8000)

    When two tracks he read 4000 samples per channel and so on. (m_nStates = 8000, sampsPerChanRead = 4000)

    If any body know, on every clock how to take samples of all of the configured channels.

    Thanks in advance,

    Renjith.

    Renjith,

    Please note that the behavior, I explained is in line with the provisions should only if you use your clock as I convert clock. You can find information about the different types of synchronization of the analog inputs using NOR-DAQmx; the element to search for is "clocks".

    Since you do not set the clock to convert MY (should be DAQmxSetAIConvSrc()), the fact that I mentioned above is only informative for you, but does not apply to your question.  Sorry for responding too quickly without looking in your code between quotes...

    In order to answer your question, we take a look at the approach to programming DAQmx:

    If you configure your task to be "finished", the task will stop running if the number of samples per channel is acquired. In the case of an external clock (not configured as I convert clock), served it in the sampling interval. The sample clock will automatically receive a sample for all channels with a single clock pulse. From this point of view, the installation program you have in your program seems correct.

    If you do not get the number of samples that await, the fault must be somewhere in your playback function. Do you get any error messages?

    DAQmxReadAnalogF64 (taskHandle, DAQmx_Val_Auto, 10, DAQmx_Val_GroupByScanNumber, read, m_nStates & sampsPerChanRead, NULL)

    If you set m_nStates set to 8000, it's here. You say the Read function to retrieve 8000 samples. None. So if you have two channels, DAQmx acquires 2 x 8000 samples, but read you only 8000 samples... Please change m_nStates to

    m_nStates = #channels x #samples by channel

    This should solve your problem.

    hope this helps,

    Norbert

  • highlight the function on that I am based on the line of code that I'm

    I tried, but I couldn't find the right combination to find an answer, so sorry if this has been asked before.

    I find myself with 'find the database object' a lot, which is great, when I'm looking for a line of source code.  When I click on the result and get to the line of source in the body, I do a lot of scrolling sometimes to understand what I am in the service.

    Is there a way to have SQLDeveloper highlight automatically the function in the connections tree based on the line of my cursor is on in the code editor?

    Thank you very much in advance.

    In version 4, if you look at the bottom of your editor, you will see the navigation breadcrumbs, which will tell you where you are at.

  • How do I script in DIAdem to include specific lines of code (similar to .ini in LabVIEW files) based on the computer/user?

    I took Basic training courses so DIAdem Advanced and have been scripting for several months.  I am interested in how to include specific lines of code based on the computer.  Told me it would be similar to .ini in LabVIEW files, although I've never used myself .ini files.

    Hi Karen,.

    What do you mean by "includes the lines of code?  Do you mean what happens when you run a command 'ScriptInclude()' or 'ScriptCmdAdd()' in a tiara VBScript?  Or do you mean that you want to run several lines as DIAdem begins, similar to 'ScriptStart() '?

    What do you mean by "computer-based?  Do you mean you want to implement different batch files on different computers, but you are still using the same file (named) command on each target computer?  Or do you mean that you want to implement the same command on all target computers file, but you want different commands to run this file based on the computer on which you are.  In the latter case, how do you determine computer on which you are on - MAC address, logged in user name, or what?

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Internal analysis based on the error Code 7

    I am trying to create the Setup program for one of my application and got stuck with deployment error. Build state indicates as follows

    From a newspaper for the deployment.

    Based on the analysis

    Analysis completed

    Error code internal 7 analysis of departure

    Path must be a directory or a LLB.

    Abandoned

    When you click the Distributor tab, he asks "Do you want to analyze the source files?", when I click OK, it says-" < no="" file="" information,="" analyze="" a="" workspace=""> "

    But it does not give the same problem when I uncheck the "of Teststand public directories' in the Source System tab. But I need to include the public directory to create the installer properly. What could be the problem?

    I created Installer a few months back and its job perfectly well. But now I need to review the sequence, that is why the installation program. But not stuck

    TestStand Version 2012

    Fransico,

    I have re installed Teststand 2012 and the issue has been resolved. could not figure that out what was going on. Then uninstalled Teststand 2012.

  • Routing of calls based on the area Code

    I want to route the calls to some agents based on the caller's area code. I guess I'll need a database file to reference the calling party number. Then filter on the area code and the router accordingly. I never did look a script on a database. I would use a separate SQL database server for this.

    I can handle the routing part as soon as I know not if the number of matches. I just need some advice on getting to the database correctly.

    If I'm heading in the wrong direction? It must be an XML file instead? All the sample scripts or tips would be appreciated.

    No problem. Remember not all the nifty tools in the method Execute of Java later and I think that you will find very practical in many scenarios.

    Moreover, do not forget if you find a post is useful or solve your problem, you should give him a side :)

    Thank you

    Jim

  • Unable to understand the code output

    Hi all

    I was reading one of the codes and unable to understand its outcome, I'm really grateful if someone guide me to understand. Thanks in advance.

    Code example

    create or replace package Mp_pkg

    IS

    P_nn TYPE TABLE IS NUMBER

    INDEX BY VARCHAR2 (10);

    END;

    ----------------

    DECLARE

    l_numbers Mp_pkg.p_nn;

    Start

    FOR indx IN 1... 50

    loop

    (indx) l_numbers: = indx;

    END loop;

    dbms_output.put_line (l_numbers. (Last);

    END;

    ----------

    Result

    9

    -----------

    According to my understanding, result should be 50 because the last value of l_number is 50...

    Please guide...


    Hello

    As John said, the VARCHAR2 '9 ' (or any string '9') is longer than the string of 50', for the same reason that the string 'Z' is longer than the string "THE".

    What do we mean when we say this string x is greater than string y?  We mean that

    1. The 1 x chraracter comes after the 1st character of y (in sort order), or, if these characters are equal
    2. x has a 2nd character, but is not, or, if both are more than 1 character
    3. The substring SUBSTR (x, 2) > SUBSTR (y, 2)

    What (if any) strings mean is not serious, so

    • '9' is greater than '50',
    • 'zero' is greater than 'a '.
    • 'small' is greater than 'big '.
    • 'MIN' is greater than 'MAX '.
    • 'yesterday' is greater than 'tomorrow', and
    • "1 January 1900' is superior to" December 31, 2015 ".

    According to rule 1 Correction: rule 3 is the reason why 'MIN' is greater than 'MAX '; the others are all due to rule 1

  • decode SQL based on the combination of codes

    create the sample table (number patient_id, location number)


    TOGETHER TO DEFINE
    Insert in the EXAMPLE
    (PATIENT_ID, LOCATION)
    Values
    (103, 10);
    Insert in the EXAMPLE
    (PATIENT_ID, LOCATION)
    Values
    (102, 12);
    Insert in the EXAMPLE
    (PATIENT_ID, LOCATION)
    Values
    (101, 2);
    Insert in the EXAMPLE
    (PATIENT_ID, LOCATION)
    Values
    (100, 5);
    COMMIT;


    Select * example

    PATIENT_ID LOCATION

    100                     5
    101                     2
    102                     12
    103                     10

    Codes:

    0 - NO
    1 RLO
    2 OLA
    4 RC
    8 LC


    My output should show:

    must divide the location based on the above codes and decoding.
    I have suggested to use the bitwise operators but could not work.

    Any help is very appreciated

    PATIENT_ID LOCATION RLO RC LC OLA

    100                      5                      Y           N           Y           N
    101                      2                      N           Y           N           N
    102                      12                    N           N           Y           Y
    103                      10                    N           Y           N           Y

    Hello

    Thanks for posting the instructions CREATE TABLE and INSERRT; It's very useful!

    You can use built-in BITAND function to do this:

    SELECT patient_id

    , CASE WHEN BITAND (location 1) <> 0 THEN 'Y' ELSE ' not AS END rlo

    , CASE WHEN BITAND (location 2) <> 0 THEN 'Y' ELSE ' not AS END OLA

    , CASE WHEN BITAND (location, 4) <> 0 THEN 'Y' ELSE ' not AS END rc

    , CASE WHEN BITAND (location, 8) <> 0 THEN 'Y' ELSE ' not AS END lc

    Example

    ORDER BY patient_id

    ;

    Relational databases work best when each column of each row stores 1 piece of information.  It is so basic to the design of database he called first normal form.  Think very carefully if you really want to store data in a standardized form like that.  A better design would be to have a separate for the location information table, where each line has indicated that a specific patient in a specific place, with no column by itself is unique.

  • I understand the code, but I feel lost in AS3

    OK guys so first sorry for the display of this message which is not really RELEVANT in coding or something but I need your help.

    I'm learning AS 3 with Adobe flash CS6 and I was home for a week, but I tried before FlashDevellop.

    My problem is that I'm COMPLETELY lost. I understand some code (variables, table, conditionnals, logical operators, event handling in some measure etc...) and I literally (yes I did) followed EACH tutorial that was the later page of google for searches like "How to code in AS3 for flash CS6" or things like that. But I feel lost.

    Tutorials you will say to use images and don't even speak of classes, like everything that could be done with only images on the timeline and the code in frames. Others don't even talk about classes and tell you what can be done with the code in an image

    What I'm trying to say is that: making games seems really fun and coding doesn't seem THAT hard (I just search for name of functions or events on the web when I'm not sure because I just started)

    But sometimes I don't understand what I got wrong, or what I would do indeed at any given time. What should I use, and well yes I have no idea.

    I'm doing a bit of flash game as Elona Shooter (http://www.kongregate.com/fr/games/noanoa/elona-shooter), but more simple than this ofc. Just a basic for my first.

    I would say a little bit more like this: http://armorgames.com/play/4964/

    But Idk, at first I thought that I could do with the little knowledge that I have and the internet, but I messed up with my classes, there are some things that I have no idea how do.

    Like adding noise, I really know how to do with images, but I don't know how using classes, and I started to make the game with only the classes so should I switch to the framework? Or I can use both?

    If you have a GOOD tutorial, as one who not only explains the code but how it ALL works, it would be SO great love.

    Once again sorry to post this text disorganized. It's just that I don't know if it's just me having a lot of trouble with such a simple coding language, or if there is really a lot of things to consider.

    Thank you very much for reading if you did haha, and you have an answer, please share .

    There are many things to take into account.  I don't think it's a matter of AS3 being a simple coding language... the simplicity of coding/languages are compared to the experience of the user... for some, it might come easy, now, but it didn't come without a lot of the suffering that you seem to be enduring.  You seem to actually like you are coming along very well.

    I doubt that it is a tutorial all encompassing fact to satisfy your request.  Most of the tutorial topics will focus on specific aspects.  If you want to learn how to work with sound in form of code, then look in the tutorials for the Sound class... search Google using 'His tutorial AS3' and I bet that there will be a lot of short and sweet lessons available for you to work through and draw lessons.

  • Code lock based on the packing method

    Good flex developers iOS, here's an interesting question that I'm sure that we have not the ability to do immediately.  As I'm not 100% certain of what I thought I'd ask again.

    I find myself constantly rotates and off segments of code based on the packing method I'm currently going to test with (i.e. versions fast or Standard)... as performance is absolutely significantly worse in the "Fast" mode I turn off things like the effects of particles and heavy calculations that I have no need to test quickly by using a young build.  Is it possible for us to determine the current packing method that was used?  That way we can pack the segments of code like that in the conditional statements, based on the packing method?

    There is conditional compilation. With it you can write something like:

    {CONFIG::FAST}

    this.useParticleEffects = false;

    }

    {CONFIG::STANDARD}

    this.useParticleEffects = true;

    }

    You can (or could before Flash Builder 4.7 beta) write a conditional with conditional compilation:

    this.useParticleEffects = (CONFIG::FAST)? false: true;

  • Tax code failed iExpenses based on the location and type of expenditure

    Hi all

    I have a requirement in Internet Expenses (11.5.10) by default the code based on taxes
    the type of expenditure and the location. I store the mappings between the expense type + location-> tax code
    in a database table custom.

    I decided I need to extend the page controller
    / Oracle/Apps/AP/GOOSE/Entry/Lines/WebUI/DetailsPG which is DetailsPageGlueCO.java.

    My plan is to expand the page controller...

    (1) intercept the PPR events on the type of expenditure and the location LOV
    (2) to obtain the values of expense type and location using calls to row.getattribute
    (3) create a VO customized on the fly to search the tax code by default for this type of expense and the location
    (4) use row.setattribute to update the tax code

    I have extended the controller and am running in debug mode in Jdeveloper and I can confirm that
    the custom controller is running.

    First, I hit, it's that I can't get a handle on the view for the page object.
    The code I use is...

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {

    super.processFormRequest (pageContext, webBean);

    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    OAViewObject expVO = (OAViewObject) am.findViewObject ("ExpenseReportLinesVO");

    After these expVO lines have run is null
    I tried to change the reference to ExpenseReportLinesVO1 VO, but the original Version is still missing.

    Please can you point me in the right direction?

    Also please comment on my proposed approach to this customization.


    Thank you very much
    Andy

    Hi Andy,.

    (1) you weren't able to get the reference am as controller "DetailsPageGlueCO" is set to "pageLayout" region for OAWebBean object is reference to "pageLayout" region. Now using the line of code
    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    We will go am region reference "pageLayout' which is 'WebExpensesAM '.

    Since we need to reference "OIECommonAM" we need to get the OAWebBean of the StackLayout region object. That's why we need to use
    OAWebBean oawebbean1 = oapagecontext.getPageLayoutBean () .findChildRecursive ("StackLayout");

    (2) to get the value of ExpTypeChoice use code below: (not tried your approach)

    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean) oawebbean.findChildRecursive ("ExpTypeChoice");
    If (oamessagechoicebean! = null & oamessagechoicebean.getSelectionValue (oapagecontext)! = null)
    ExpTypeVal = oamessagechoicebean.getSelectionValue (oapagecontext);

    (3) TaxCodeId use code below:

    ExpenseReportLinesVOImpl reportlinesvo = (ExpenseReportLinesVOImpl) am.findViewObject ("ExpenseReportLinesVO");
    If (reportlinesvo! = null)
    {
    ExpenseReportLinesVORowImpl reportlinesrow = (ExpenseReportLinesVORowImpl) reportlinesvo.getCurrentRow ();
    If (reportlinesrow! = null)
    {
    reportlinesrow.setTaxCodeId (); We must move the Number data type for this method
    }
    }

    Kind regards
    Anand

Maybe you are looking for