Repeat a specific number of times

I have 6 frames on my movie timeline. Each frame has a movie
about 200 - 300 frames.
I want each movie to repeat a specific number of times before
it goes to the next frame on the main movie time line.
How can I do this

Look at this:
http://www.smithmediafusion.com/blog/?p=19
Change this:
if(myCount ==3){
stop();
to:
if(myCount ==3){
gotoAndPlay(nextMovieFrame);
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio*
http://www.tornadostream.com
*Must Read*
http://www.smithmediafusion.com/blog
"umr" <[email protected]> wrote in message
news:ed1ug9$41o$[email protected]..
>I have 6 frames on my movie timeline. Each frame has a
movie about 200 -
>300
> frames.
> I want each movie to repeat a specific number of times
before it goes to
> the
> next frame on the main movie time line.
>
> How can I do this
>

Similar Messages

  • Looping a movie clip a specific number of times in Flash

    Does anyone know how to get a movie clip to loop a specific number of times in Flash? I know how to stop a movie clip from looping by using the this.stop (); command by placing the command in a separate Action Script layer, in a keyframe, inside of the movie clip's timeline. This allows the movie clip to play through once and then stop. But I need for the movie clip to loop more than once, maybe 2 or 3 times, and then go back to the main timeline. Does anyone know the code for this?
    Also, is it possible to place a pause (I'm guessing, maybe by using a timer of some type?) between the loops, so that the movie will pause a couple of seconds before it loops again and then stop? Please note I do not need the movie clip to stop when there's an event like a rollover or anything. I just need it to play a couple of times, pause between plays and then stop and go back to the main timeline. Please let me know if anyone can help.
    Thanks,
    Sarah
    P.S. Is there a good, easy to use, reference book anyone can recommend for creating specific things in Flash using Action Script? Do you guys have a favorite for beginners like me?

    You can use a variable to keep count of how many times you loop, and until it exceeds a particulr value (2 or 3) you execute a setTimeout() call that waits for however long you want to delay and then tells the movieclip to gotoAndPlay(1).
    So in the first frame you would establish the counting variable...
    var count;
    if(count == undefined){ // only set it to 0 once
    count = 0;
    and in the last frame you would do your incrementing and control....
    stop();
    count += 1;
    if(count < 3){
    setTimeout(waitABit, 2000); // call function in 2 secs
    function waitABit(){
    gotoAndPlay(1);

  • Specifying number of Time Machine backups

    I assume that Time Machine keeps only a particular number of backups in order to conserve hard drive space, but perhaps this is an erroneous assumption. I've been backing up my MacBook Pro to an external hard drive using Time Machine and I'm wondering whether old backups eventually get purged. Does Time Machine automatically limit the amount of storage space allotted to backups on an external drive or the specific number of Time Machine backups? If so, is there a way to change the settings so that (1) only a particular number are saved or (2) so that particular backups are never purged? In reference to (2), is it best to simply move (or copy) backups I wish to never purge (or a subset of files within) outside of the Time Machine folder and into the root of the external drive? Thank you for your assistance!

    Entropee wrote:
    Does Time Machine automatically limit the amount of storage space allotted to backups on an external drive or the specific number of Time Machine backups?
    Time Machine keeps making backups until the external drive is full. When your disk is full, it starts deleting old backups automatically until it has enough space to make backups.
    Entropee wrote:
    If so, is there a way to change the settings so that (1) only a particular number are saved or (2) so that particular backups are never purged?
    As far as I know, they are not possible. If you want to use your external disk to store more files, you can create a second partition on the external drive, so you can use a partition for Time Machine and another one to store files, although it's better to use a drive for Time Machine and another drive to store other files.
    Entropee wrote:
    In reference to (2), is it best to simply move (or copy) backups I wish to never purge (or a subset of files within) outside of the Time Machine folder and into the root of the external drive?
    It's much better, as Time Machine won't delete them

  • Number of times you can sync to a new library?

    My work computer was stolen this week for the second time and I'm wary of syncing my ishuffle to my home computer again because I'm sure the last time it warned me that you could only change the library it was associated to a specific number of times.
    Since I know I've changed it at least 3 times, I'm concerned I won't have enough left to convert to my home computer temporarily until a new work one is delivered and then connect it to the new work one (my home computer doesn't have enough room to store any music on it, so I can't use it as a permament dock for all my music), this restricts the number of times I could swap it over.
    So does anyone know the exact number of times you can switch between libraries?
    And what happens after that - does your ishuffle stop working completely?
    Also - if I connect it to my home computer to charge it temporarily, will this erase any songs in it (my home computer has been authorised to play the music I've purchased but there are other songs I've ripped from my CDs)?
    Thanks for any help you can offer.

    chiffchaff wrote:
    So does anyone know the exact number of times you can switch between libraries?
    There is NO limit.
    And what happens after that - does your ishuffle stop working completely?
    NOTHING.
    Also - if I connect it to my home computer to charge it temporarily, will this erase any songs in it (my home computer has been authorised to play the music I've purchased but there are other songs I've ripped from my CDs)?
    In Settings UNcheck "Open iTunes when this iPod is connected" (don't forget to click "apply"). The NEXT time you connect the shuffle just to charge it. iTunes will NOT be involved (unless, of course, it's already running...).
    Thanks for any help you can offer.
    see above

  • Running a class a particular number of times

    hey
    can some pls tell me how to run this class a specific number of times. maybe by using a for loop?.
    i am making a game called memory game where u match the cards which are thw same. i want to make this a multiplayer game rather than a single player game. Thus in order to do this i need to be able to run the class (shown below) a specific number of times.
    i have an array called "players" which is a length of 5. and if the user enter the names into all five elements or there are 5 players then i need the program to run 5 times. else if the user only entered a name in two elements then i need the class "MemoryMatch" to run twice .
    i know how to determine whether the user entered 5 names or a single by using if statements. but i dont kno how to make the class "MemoryGame" run a specific number of times.
    .. .and for the game i calculate the score of the user by finding the amount of time it takes the user to finish the game and then subtract the time they took from a base value of 500points. i then put the time difference into an array called "timez" i also want the class to add the time to array "timez" at the end after the one of the players has finished the game or the class is run.
    here is the code for the "MemoryMatch" class which i need to run a specific number of times.
    class MyButton extends JButton
            long startTime = System.currentTimeMillis ();
            int index;
            ImageIcon icon;
            public MyButton (ImageIcon img, int i)
                icon = img;
                index = i;
                setPreferredSize (new Dimension (100, 100));
                addActionListener (new ActionListener ()
                    public void actionPerformed (ActionEvent actionEvent)
                        // 1
                        /* Create and add a prompt and then a text field */
                        if (getIcon () == null)
                            setIcon (icon);
                            if (buttonShowingIndex > -1)
                                if (icon != button [buttonShowingIndex].getIcon ())
                                    final int bsi = buttonShowingIndex;
                                    ActionListener al = new ActionListener ()
                                        public void actionPerformed (ActionEvent actionEvent)
                                            MyButton.this.setIcon (null);
                                            button [bsi].setIcon (null);
                                    javax.swing.Timer timer = new javax.swing.Timer (450, al);
                                    timer.setRepeats (false);
                                    timer.start ();
                                buttonShowingIndex = -1;
                            else
                                buttonShowingIndex = index;
                            //time calculation
                            long endTime = System.currentTimeMillis ();
                            long difference = ((endTime - startTime) / 1000) + 2;
                            timez [0] = difference;
        }so ...basically the two things i would like to get are
    1. make the class "MemoryMatch" run a specific number of times
    2. Put the time difference(time it takes user to finish game) into the array "timez" (but i think i got that handled but still if u knew a more efficient way... that would be nice =) )
    thanks alot

    hey man,
    thanks for taking the trouble for helping me.
    i have put the whole part of my program below. what u mentioned earlier was part right. the "MyButton" class flips over the two cards which were clicked by the user and then if they are right it leaves the cards on the table with the pics. and if they are wrong then the pics dissppear and the user has to choose two more cards again.
    the "players" array is an array which contains the names of the people who are playing the game. i get those values from another class called "Score" and then i transfer the array to the "MemoryMatch" class.
    ..and for the points i was thinking that i would find the time required by the user to finish the game and subtract the time in seconds from a base value of 500.
    hope this helps.
    thanks
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    class MemoryMatch extends JFrame
        MyButton[] button = new MyButton [36];
        ImageIcon[] icons = new ImageIcon [button.length];
        int buttonShowingIndex = -1;
        int time = 0;
        long startTime, endTime;
        static int gamesRun;
        static boolean runs;
        JPanel contentPanel;
        JPanel mainPanel;
        JLabel text;
        JTextField grade1;
        long[] timez = new long [5];
        static String[] players = {"", "", "", "", ""};
        //delay method
        public static void delay (int num)
            try
                Thread.sleep (num);
            catch (InterruptedException e)
        public MemoryMatch ()
            icons [0] = new ImageIcon (getClass ().getResource ("image1.gif"));
            icons [1] = new ImageIcon (getClass ().getResource ("image2.gif"));
            icons [2] = new ImageIcon (getClass ().getResource ("image3.gif"));
            icons [3] = new ImageIcon (getClass ().getResource ("image4.gif"));
            icons [4] = new ImageIcon (getClass ().getResource ("image5.gif"));
            icons [5] = new ImageIcon (getClass ().getResource ("image6.gif"));
            icons [6] = new ImageIcon (getClass ().getResource ("image7.gif"));
            icons [7] = new ImageIcon (getClass ().getResource ("image8.gif"));
            icons [8] = new ImageIcon (getClass ().getResource ("image9.gif"));
            icons [9] = new ImageIcon (getClass ().getResource ("image10.gif"));
            icons [10] = new ImageIcon (getClass ().getResource ("image11.gif"));
            icons [11] = new ImageIcon (getClass ().getResource ("image12.gif"));
            icons [12] = new ImageIcon (getClass ().getResource ("image13.gif"));
            icons [13] = new ImageIcon (getClass ().getResource ("image14.gif"));
            icons [14] = new ImageIcon (getClass ().getResource ("image15.gif"));
            icons [15] = new ImageIcon (getClass ().getResource ("image16.gif"));
            icons [16] = new ImageIcon (getClass ().getResource ("image17.gif"));
            icons [17] = new ImageIcon (getClass ().getResource ("image18.gif"));
            icons [18] = icons [0];
            icons [19] = icons [1];
            icons [20] = icons [2];
            icons [21] = icons [3];
            icons [22] = icons [4];
            icons [23] = icons [5];
            icons [24] = icons [6];
            icons [25] = icons [7];
            icons [26] = icons [8];
            icons [27] = icons [9];
            icons [28] = icons [10];
            icons [29] = icons [11];
            icons [30] = icons [12];
            icons [31] = icons [13];
            icons [32] = icons [14];
            icons [33] = icons [15];
            icons [34] = icons [16];
            icons [35] = icons [17];
                    Collections.shuffle (Arrays.asList (icons));
            setDefaultCloseOperation (EXIT_ON_CLOSE);
            contentPanel = new JPanel ();
            contentPanel.setBorder (BorderFactory.createEmptyBorder (500, 500, 10, 10));
            mainPanel = new JPanel ();
            mainPanel.setBorder (BorderFactory.createEmptyBorder (500, 500, 10, 10));
            mainPanel.setBackground (Color.white);
            mainPanel.setLayout (new GridLayout (6, 6));
            for (int x = 0 ; x < button.length ; x++)
                button [x] = new MyButton (icons [x], x);
                mainPanel.add (button [x]);
            getContentPane ().add (mainPanel);
            pack ();
        public static int pushPlayers (String[] p)
            players = p;
            int game = 5;
            if (players [0].equals (""))
                game = game - 1;
            if (players [1].equals (""))
                game = game - 1;
            if (players [2].equals (""))
                game = game - 1;
            if (players [3].equals (""))
                game = game - 1;
            if (players [4].equals (""))
                game = game - 1;
            System.out.println (game);
            gamesRun = game;
            return game;
        class MyButton extends JButton
            long startTime = System.currentTimeMillis ();
            int index;
            ImageIcon icon;
            // for (int i = 0 ; i < gamesRun ; i++)
            public MyButton (ImageIcon img, int i)
                icon = img;
                index = i;
                setPreferredSize (new Dimension (100, 100));
                addActionListener (new ActionListener ()
                    public void actionPerformed (ActionEvent actionEvent)
                        // 1
                        /* Create and add a prompt and then a text field */
                        if (getIcon () == null)
                            setIcon (icon);
                            if (buttonShowingIndex > -1)
                                if (icon != button [buttonShowingIndex].getIcon ())
                                    final int bsi = buttonShowingIndex;
                                    ActionListener al = new ActionListener ()
                                        public void actionPerformed (ActionEvent actionEvent)
                                            MyButton.this.setIcon (null);
                                            button [bsi].setIcon (null);
                                    javax.swing.Timer timer = new javax.swing.Timer (450, al);
                                    timer.setRepeats (false);
                                    timer.start ();
                                buttonShowingIndex = -1;
                            else
                                buttonShowingIndex = index;
                            //time calculation
                            long endTime = System.currentTimeMillis ();
                            long difference = ((endTime - startTime) / 1000);
                            timez [0] = difference;
        public static void main (String[] args)
            // JFrame.setDefaultLookAndFeelDecorated (true);
            // Score myGrades = new Score (myMemoryMatch);
            // //Score
            delay (5000);
            MemoryMatch myMemoryMatch = new MemoryMatch ();
            //running of main game
            myMemoryMatch.setVisible (true);
            //transferring to the array
            for (int i = 0 ; i < myMemoryMatch.players.length ; i++)
                // show that the variable has been updated here
                players = myMemoryMatch.players [i];
    for (int i = 0 ; i < myMemoryMatch.players.length ; i++)
    // show that the variable has been updated here
    System.out.println (players [i]);

  • Count number of times a specific element occurs in ArrayList

    I need to count the number of times a specific element occurs in an ArrayList. For example, if an ArrayList 'overflow' consists of the following elements:
    1,3,4,1,1,8,14,7,3,7,8,0.
    I need to count the number of times 4 occurs in the list.
    ArrayList overflow = new ArrayList();
    if(overflow.contains(4))
    }I know that contains returns true if 4 exists in the ArrayList, but how do I count the number of times 4 occurs? Any help will be appreciated. Thank you.

    There is the Collections.frequency method in j2se 1.5
    Or you could loop through the values in the ArrayList and count the number of times it occurs.

  • Route calls to specific number based on Date and Time

    Hi,
    UCCX 8.5.1.11001-22
    I am trying to create a script that will route calls to a specific number after-hours.  The only catch is the number changes every week and rotates among 4 or 5 people.  I have seen several scripts and xml documents up that give me a good start but I just cant seem to figure out the process with the xml document and call flow of this one.  I do realize this is basically a programing question but if you could get me headed in the right direction it would help.
    I am no stranger to UCCX scripting but a novice to xml integration.

    I'm not sure what the SM toolkit is.  Could you explain it or provide a link?
    If you and your collegaue are admins, then I would say skip the overhead of an XML document for now and just manage the schedule in a subflow.
    Example:
    Subflow Variables
    String oncall_number_current = ""String oncall_number_avholloway = "916125551212"String oncall_number_jsmith = "916125551313"String oncall_number_default = "916125551000"Date today = D[now]
    Subflow Script
    StartSwitch int (today.month)  January (value == 1)
        /* In Jan, from the first to the fifteenth, Anthony is on call */    If (today.date >= 1 && today.date <= 15)
          True        Set oncall_number_current = oncall_number_avholloway
            Goto End of Script      False
        /* In Jan, from the sixthteenth to the thirty-first, John is on call */    If (today.date >= 16 && today.date <= 31)
          True        Set oncall_number_current = oncall_number_jsmith
            Goto End of Script      False
      Febraury (value == 2)    /* In Feb, from the first to the sixth, Anthony is on call */
        If (today.date >= 1 && today.date <= 6)      True
            Set oncall_number_current = oncall_number_avholloway        Goto End of Script
          False    /* In Feb, on the seventh, from midnight to noon, Anthony is on call */
        If (today.date == 7 && today.hod >= 0 && today.hod <= 11)      True
            Set oncall_number_current = oncall_number_avholloway        Goto End of Script
          False    /* In Feb, on the seventh, from noon to midnight, John is on call */
        If (today.date == 6 && today.hod >= 12 && today.hod <= 23)      True
            Set oncall_number_current = oncall_number_jsmith        Goto End of Script
          False    /* In Feb, from the eighth to the twenty-nineth, John is on call */
        If (today.date >= 8 && today.date <= 29)      True
            Set oncall_number_current = oncall_number_jsmith        Goto End of Script
          False  March (value == 3)
        ..etc, etc, building out the whole year...  Default
        /* Set the default on call number */    Set oncall_number_current = oncall_number_default
        Goto End of ScriptLabel End of Script
    End
    Main Script Variables
    String oncall_number = ""
    Main Script Script
    ...oncall_number = Call Subflow (SCRIPT[oncall-sublfow.aef], oncall_number_current)Call Redirect (--Triggering Contact--, oncall_number)...
    In the example of January 3rd, the subflow would execute 4 steps.  That's not much at all.  Of course you would only call the subflow if the hours called for it.  This would eliminate unecessary calls to the subflow.
    To update the oncall, just update the script, save, upload, refresh, and then refresh the apps which call it.  No down time at all!
    I hope that makes sense.  If not, ask questions.
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • How do I send a call directly to voicemail every time a specific number calls me?

    I want to be able to have voicemail directly intercept calls from one specific number and I can't figure out how to do this. It was super simple on my old Android phone. You simply selected which numbers you wanted to add to your blocked call list and they went directly to voicemail. How can I do this on my iPhone?

    There is no blocked call listing for the iPhone. True call blocking is only handled at the carrier level. Even as you describe the Android solution sends the call to voicemail, not actually blocking it. Check with your carrier and see if they provide blocking services. Most charge a fee for this service. A workaround similar to what you describe for the Andriod phone is setting a custom silent ringtone for the selected contact and thus you would not notice the phone ringing and the call would go to voicemail without any input from you. The only other solution is to press the sleep/wake button and that silences the ring and the call will go to voicemail, or press it twice and it goes straight to voicemail.

  • Running a java program a set number of times

    This is a general question. Is it possible to make a java program run only 5 times for the sake of arguement.
    Basically I want to write a program that will give the user some flexibility when it will actually run another Java program, but I only want them to be able to say "not now' for a set number of times. When the last time comes the other program will launch. I was initially thinking of the Do Whilw loop, but this needs to work when the program is restarted.
    Program starts, it has 5 times it will run before it does something else(doesn't really matter now I think). User takes option "Not Now" and the program ends, but warns the user this will run 4 more times before you will need to do something.
    This process will repeat until the user takes the option "Ok install now" or the time limit expires and the install occurs anyway. Can someone point me in the right direction.

    ok I see so it's like one those programs that you download for free on the internet and they give you a set amount times to use it before you have to pay for it. but in this case when the number of times you use it equals 5 (or when the user clicks ok) a different java app will open automatically.
    My first thought would be to Write a Serialized object to disk using objectOutputStream that stores the number of times the application has been opened. and each time the program runs it checks for the serialized object and then you can do something like what I posted before. of course if were worried about security the user could always look for the object and erase it, if so then I guess we would have to come up with another plan of attack
    Hope this helps

  • How do i move my 'number of times played' from iPod Nano 4G to iPod Classic?

    I've had an iPod Nano 4th Gen for the past 4 years. I recently got an iPod Classic for Xmas.
    I'm a bit fussy & would like to transfer all the data across from iPod Nano to iPod Classic ... and this includes data such as number of times each song has been played. Preferably for free too.
    How can i do this?
    The closest i've come to a suggestion online is to plug them both in to iTunes & then "drag & drop". Just to point out - this does not work.

    Despite the fiend's confident manner and his curt correction, I believe he is very mistaken about this.  I sensed this was baloney and kept looking, to find a thread in which the same is discussed for iPhone, but it worked on my Classic iPod as well.  (I don't mean to get overly down on a.f, but one should be careful and try to be sure before telling someon they can't do something that seems like a basic function that should by all reason be possible - Not that  all lack of reason doesn't often apply to these products...)
    How to transfer playlist from iPhone to iTunes 11.1.3?
    The procedure described here did work for me, but know this: if I hadn't somehow actively saved an on-the-go list long ago (and forgotten,) I never would have known, because although I have been selecting tons of tracks for "on the go," apparently it erases all lists when you power down, unless you do that deliberate save.  That's right; c beyond all sense of reason (case in point of above) the iPod does not continue to save selections in one growing on-the-go list unless you save it before shut-off.  Saving auto names that list and starts over.  So while I would like to have one big list in which to save all songs for future DJ choices, I will have to have a new list for every time I select even one single song before power off, or POOF gone.  Wish I'd known that before, I stupidly assumed 100 or more songs were saved cause I never checked.
    Check it out and see if it works for you.  Cheers.  And no offense A.F. 
    I guess considering how tedious and dysfuntional this is (also not a first for Apple,)  I will find another way to earmark tracks on the fly, like use a star rating which I've never really used with consistency.  You might consider the same if you have similar purposes.  If you're sitting down and deliberately making a specific list all at once, save it and you should be good to "go."

  • Select specific number of rows

    i'm listing all data entries in a database.
    for that i want to select the 1st ten entires, then the next ten and so on ordered
    by date_column.
    how can i do that? is it possible with rownum?
    in mysql/php i did it with limit
    $query = "select * from article where parent_id=0 order by date desc, time desc limit $select, 10";
    please email me.
    thanks for help
    chris

    but what about rownum if i want the
    records from 10-20?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Chen Zhao ([email protected]):
    If you are using Oracle 8i, you can use ROWNUM to specify the specific number of records. You can see the ROWNUM by querying:
    SELECT *
    FROM (SELECT column_name FROM table_name ORDER BY column_name)
    WHERE ROWNUM<10
    CHEN<HR></BLOCKQUOTE>
    null

  • My device keeps receiving multiple sms from one specific number.

    I have an Iphone 4, my device keeps receiving multiple sms from my customer in Germany. I am in India. Although he just sends it once, I keep receiving them for days. Sometimes to the tune of 600 smses a day, even night. I have to turn off my sms notifications and vibration. I tried factory reset and all other resets, but only factory reset works for some time. After reseting it everything is fine for 3-4 days and then again the multiple smses start. The same sms again and again. It is frustrating. If I travel to another network area (roaming) it stops. But if I am back in my home network and my customer sends me a sms then it starts repeating itself. Only sometimes the smses are not repeated. I am on Vodafone network and had a huge fight with them but they claim that everything is smooth on their side. It is a problem with my Iphone. If I put my sim in another Iphone4, the smses stop. Help!!

    Hey there
    I’m sorry to hear you have been unable to text your dad! We certainly need to help get this sorted out as soon as possible. What we can do is research our systems to see if there have been any issues on our end receiving those texts. Can you please send me a private message by Clicking Here and include the following information?
    Full name
    Cell number
    Dad’s number
    Best time to reach you
    Thanks!
    Charise

  • Group by specific periods of time - group by 5 seconds

    I would like to group records for every 5 seconds
    The following query groups for every second
    select to_char(state_transition_dt, 'MM/DD HH24:MI:SS'),
    UPPER(item_type) Type, UPPER(sync_operation) operation, count(*)
    from sync_traffic_flow h
    group by to_char(state_transition_dt, 'MM/DD HH24:MI:SS'), UPPER(item_type), UPPER(sync_operation)
    order by 1
    is there any way to group it for every 5 seconds??
    I tried following options:
    on executing the following query in timesten database I am getting error
    SELECT to_char(sysdate + (10/24/60), 'HH:MI AM') FROM dual;
    Error:
    Inconsistent dataypes:(DATE,NUMBER) are not compatible in expression (SYSDATE _ 10/24/60) - file "ptDataType.c" ...
    Also I am unable to use TRUNC function of oracle database.
    Is there any way to group records by specific intervals of time??

    Hi,
    I am looking for a query where I can get rows grouped by every 5 sec
    The following query fetches data for ever second but is there any way to fetch rows grouped by 5 sec
    select
         to_char(state_transition_dt, 'MM/DD HH24:MI:SS'),
         UPPER(item_type) Type,
         UPPER(sync_operation) operation,
         count(*)
    from
         sync_traffic_flow h
    group by
         to_char(state_transition_dt, 'MM/DD HH24:MI:SS'),
         UPPER(item_type),
         UPPER(sync_operation)
    order by 1
    I tried another query;
    instead of grouping records for 5 seconds this query is adding 5 seconds to each record and giving me same information back
    any other ways to group rows for every 5 seconds?
    select
    to_char(state_transition_dt+ numtodsinterval(5, 'SECOND'), 'MM/DD HH24:MI:SS'),
    UPPER(item_type) Type,
    UPPER(sync_operation) operation,
    count(*)
    from
    sync_traffic_flow h
    group by
    to_char(state_transition_dt+ numtodsinterval(5, 'SECOND'), 'MM/DD HH24:MI:SS'),
    UPPER(item_type),
    UPPER(sync_operation)
    order by 1
    Edited by: user13280764 on 01-Sep-2010 06:53

  • Web AS restarts due to classes being loaded multiple number of times

    Hi,
    We are developing a custom application which uses Dynpro for UI and EJBs/java for business and DAO layer.
    ->The application size is very big and to make the build and deployment faster, we have split the application into multiple ears.
    ->We have made sure that none of the classes are repeated across ears.
    ->We are using Web AS 2004s SP12 on Solaris UNIX platform.
    With all the ears being deployed on the application server, we notice application server being restarted once/twice per day. We have gone through the logs etc in detail and we found that most of the application classes are being loaded multiple number of times. In some cases, same class is being loaded more than 150 times. Due to this reason, permSpace area of JVM is getting exhausted and JVM is crashing. permSpace of JVM is set to 1024M at the moment.
    Any thoughts on what could be wrong here?
    Please let me know if you need any more details on this.
    Thanks, Chandra

    Hi,
    Which JDK version is in use ?  If possible, use JDK 1.4.2.17
    Change Perm size :   -XX:PermSize=512m -XX:MaxPermSize=512m
    Check if the below mentioned JVM parameters exists in the list :
    -verbose:gc
    -Xloggc:GC.log
    //   -Xmx2048m (if -Xmx mentioned the JVM Parameter list, remove it) as you have already mentioned in the JVM Heapsize  //
    -Xms2048m
    -XX:PermSize=512m -XX:MaxPermSize=512m
    -XX:NewSize=320m -XX:MaxNewSize=320m
    -XX:SurvivorRatio=2
    -XX:TargetSurvivorRatio=90
    -XX:+PrintGCDetails
    -XX:+PrintGCTimeStamps
    -XX:+UseParNewGC
    -XX:+HandlePromotionFailure
    -XX:+PrintClassHistogram
    Regards
    Shaji

  • Avoid repeating a 'for' loop 3 times

    Any ideas how can I make my code more efficient by not
    repeating the for loop 3 times within a script? Any tutorial links
    or first hand experience – I’d be grateful for any
    pointers:
    1) First I use it to set up a drag n’ drop activity:
    for (var i:Number = 0; i<words.length; i++) {
    //set a var for the instances on stage:
    var eachWord:String = "drag"+[i+1]+"_mc";
    this[eachWord].word_txt.text = words
    [0];
    this[eachWord].onPress = function() {
    startDrag(this, false, leftLimit, topLimit, rightLimit,
    bottomLimit);
    this[eachWord].onRelease =
    this[eachWord].onReleaseOutside=function () {
    this.stopDrag();
    2) Then I use it in the part that makes it accessible by
    keyboard:
    function myOnKeyDown() {
    for (var i:Number = 0; i<words.length; i++) {
    var thisDrag:String = "drag"+[i+1]+"_mc";
    if (Key.isDown …
    ETC along with a listener object
    3) I also have to use it in another function that the user
    can call to toggle something on/off within each drag object.
    Thanks in advance if anyone can help.

    thanks for the reply! I actually figured out a different
    (although probably less efficient) way to do it. I put David's
    script just before the replay button and set it up like this:
    stop();
    gotoAndPlay(1);
    if (!loopCount) {
    var loopCount:Number = 0;
    loopCount++;
    if (loopCount >= 3) {
    this.gotoAndPlay(359);
    this was placed at frame 358, with the button placed at 359,
    so after it looped 3 times it continued on to 359, showed the
    button and stopped the movie there. again, not the most elegant but
    it did the job

Maybe you are looking for