How to reorder sequence

Hi,
how to reorder a sequence? Lets say I have a sequence:
var s1 = [10,20,30,40,50];and I would like to reorder the sequence by index (the 1st element goes to 2nd position...)
var s2 = s1[3,1,2,5,4];to get
s2 = 30 10 20 50 40Is there any simple way to do that? I know I can do s1[1..2] but that's for ranges. Instead I would like to directly specify ordering of the new sequence
Thanks for you help ;)
Best regards,
Oldrich Svec

Thank you for your quick answer. But unfortunately it looks like you copy all elements of the array which is not necessary as I would like to change the sequence (pointer array), not the array elements themselves.
I have read about sequences that when adding elements to already existing sequence (or changing sequence any other way), new sequence (array of pointers?) is created consisting of old array elements + new element. So you do not actually touch the old elements at all. And I would like to do the same. Leave old array as it is and just to change sequence (array of pointers)
Try to run this code:
var s1 = [1..100000];
for(i in [0..10000]) {
  s1 = for (idx in [1..100000]) s1[idx - 1];
}I get out of memory. and my question is why? I would like to have 1 array only and just to change sequence pointing to it...
Thanks for help
Oldrich

Similar Messages

  • How to export sequence to P2 card?

    Hi everybody
    I saw a tutorial in Adobe webpage explaining how to export sequence back to P2 Card, as Premiere CS3.2 (updated) is able to recreate, from a edited timeline, all the folder and file system needed to be read on a P2 card under mxf format.
    This can be a great way to export full resolution HD edited footage from one PC to another.
    Unfortunately, I cannot find "export to P2" choice in my menu. I get export to Encore, to Tape, but no "P2" mention. But this mention appear in the Adobe tutorial... concernig any version from Premiere CS3.1
    How comes this feature doesn't appear anywhere into the menu of my Premiere pro CS3, version 3.2?
    Any clue?
    Thanks

    I found the link explaining how to do it.
    http://livedocs.adobe.com/en_US/PremierePro/3.0/help.html?content=WSE32B8568-2904-4e95-861 A-F09F75AA6C7B.html
    Here is what they say:
    "Select the sequence or clip in the Timeline panel or Project panel.
    (Optional) If exporting from the Timeline, set a timeline marker, numbered 0 on the frame you want used as the P2 icon for the exported.
    If you do not set this marker, the first frame of the sequence will appear as the P2 icon by default.
    Choose File > Export > Export To P2."
    Problem is that: I don't get any "export to P2" at this place in my Premiere CS3.2

  • HT201317 how can i sequence photos in photo stream for a slideshow

    How can i sequence photos which have been taken over a period of months and exported to photo stream in no order for a slide show which must have the photos ordered manually?
    thanks

    You can't resequence the order in photo stream if that's what you are asking.  You say you've been taking photos over a period of months - I hope these are not just in photo stream, because photos stay in the stream for up to 30 days (and only a max of 1000 pictures).  You need to copy the photos [once they've been synced by the stream to a computer] to an album (on a mac) to folder (PC) were you can organize them any way you want.
    Always sync photos to a computer (either by USB or iCloud) as you would with a digital camera.  Never trust them to iCloud alone - too many users have lost most/all their photos when performing restores or whatever.

  • How to get Sequence File Name ?

    Hello everybody !!
    I'm using TestStand 3.1 and i would like to get sequence file name. I've tried to use NameOf() function, but without success.
    Of course, I've searched previous posts about the same question, but nothing works.
    Is there someone able to tell me how to get sequence file name ?
    Thanks a lot.
    MrOrange

    MrOrange,
    first of all, the solution i will present only works for saved sequence files.
    you got all information you need within TestStand itself, just browse for RunState.SequenceFile.Path. here you can find the filename. but the path of the file is also included in the string, so this is a part you have to get rid off.
    you can use statements to extract the filename from the path. just search the string for the last occurence of "\\" (searchinreverse!) and then you can retrieve the right() part of the path. beware that right() needs the number of characters you want to extract, not the startindex!!
    hope this helps,
    Norbert B.
    NI Germany
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to unlock sequence if I forgot the password?

    how to unlock sequence if I forgot the password?
    I set the password a few years ago and have forgot it ,but now I want to edit it,how can I do?

    Duplicate - http://forums.ni.com/ni/board/message?board.id=330&message.id=25631#M25631
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How do I sequence pictures in slideshow or movie

    how do I sequence pictures in slideshow or movie
    1. I tried to drag in thumbnail pictures but can't get the page to move where I want to place the pic
    2. Tried to move pictures in movie project, but they are so small on the bottom and seem to come up in threes when I just want to move one picture at a time.
    Thanks! Newbee

    If delivering your content from an LMS, there should be an option to play the content in a separate browser window...without toolbars.  This makes it a lot easier to predict what size you need to build your course.
    After factoring in all the variables and using trial and error on a number of systems, with and without LMSs, I've found a size of 995x627 to be almost ideal.  It's big enough to display most software apps and websites, but small enough to be viewable by users on 1024x768 systems.
    You have to remember that if you have a significant number of end-users on 1024x768 and that's the lowest common resolution you need to build for, then you CANNOT make your screen size 1024x768.  You have to build smaller to allow for toolbars, browser chrome, etc.
    One of the first things any wise elearning developer does when they begin a project, before they start creating content, is to survey their user base and find out what constraints are imposed within which they need to work.  Things like monitor resolution, Flash-player version, LMS, bandwidth all play a part in the success or failure of your project.  Find out early rather than later.

  • How to create sequence

    How to create sequence(Auto generated no in oralce) with out using Triggers?
    If i create trigger sequence of numbers are getting generated but in case if i want to include explicit sequence no at the end of the table say like '9999'...it is not getting updated
    Pls help very urgent..

    user2134711 wrote:
    How to create sequence(Auto generated no in oralce) with out using Triggers? Sequence is an oracle object used to create unique number sequence. It has no connection with trigger.
    Generally Sequence is used in a Trigger to generate some column value automatically. Something like the IDENTITY column used in SQL Server.
    If i create trigger sequence of numbers are getting generated but in case if i want to include explicit sequence no at the end of the table say like '9999'...it is not getting updated This totally depends on how you have written the trigger. If you can show your trigger code we can help you out.

  • How to read sequence numbers from RTP packets

    hi everyone.
    i want to know how to read sequence numbers of RTP packets. I will need that to reconstruct my stream from packet losses.
    URGENT Help needed!!

    The StreamTokenizer parses all numbers into only one type of value, a double. If you know that all the numeric values in the file will be integers, you could just cast the nval double field to an int and the toString() method will format it correctly.
    If you want to have different tokens and value types for different kinds of numbers, you will have to sub-class StreamTokenizer and add these capabilities yourself. You can add the type constant TT_INT, and provide an int field named ival. The toString() method would then format the value in the correct manner.
    If, on the other hand, you are actually looking for the exact text that was parsed, you could add code that collects the characters as they are parsed for any token type into the sval field in the nextToken() method, just like it already does when the token is a TT_WORD. In this manner sval is always valid for any token type.
    I hope you find this of some help.

  • How to alter sequence?

    hello gurus,
    i have a sequence like this
    CREATE SEQUENCE  seq_idea
      START WITH 6
      MAXVALUE 9999999999
      MINVALUE 1
      NOCYCLE
      NOCACHE
      NOORDER;i want to change the start with as 100 ,can any one tell me how to alter sequence
    regards,
    friend

    most wanted!!!! wrote:
    hello gurus,
    i have a sequence like this
    CREATE SEQUENCE  seq_idea
    START WITH 6
    MAXVALUE 9999999999
    MINVALUE 1
    NOCYCLE
    NOCACHE
    NOORDER;i want to change the start with as 100 ,can any one tell me how to alter sequence
    regards,
    friendDrop it and recreate it with the appropriate start with value.

  • How to generate sequence in grid

    I have 1 page
    and order like this
    level 0 MYHeader_table
    level1 scroll area MYHeader_table
    level2 grid MYDetail_table
    How i gerenate sequence to MYDetail_table.seq in RowInsert

    you would add code to your rowinsert peoplecode.
    example:
    MyDetail_table.seq.value=MyDetail_table.seq.value+1;
    also why do you have myheader_table in both level0 and level1, thats a bad design.

  • How to generate sequence lile -1, 1, -1, 1, ...

    How to generate sequence lile -1, 1, -1, 1, ...

    Hi,
    If you can generate a sequence like 1, 2, 3, 4, ... then you can get the results you want by saying
    CASE
        WHEN  MOD (x, 2) = 0
        THEN  1
        ELSE  -1
    ENDTo generate the sequence 1, 2, 3, 4, ... you can use CREATE SEQUENCE and NEXTVAL, or ROW_NUMBER, or ROWNUM, or CONNECT BY and LEVEL, depending on what you want.
    Edited by: Frank Kulash on Jan 27, 2012 6:31 AM

  • How to design sequence number and sub sequence number

    Hi
    I am creating DMEE for bank file, there is sequence number and sub sequence numbers in the file.
    File structure
    Aaa name 0001 tax id amount
    Bbb name 00010001 dnum amt
    Bbb name 00010002
    Bbb name 00010003
    Aaa name 0001 tax id amount
    Bbb name 00020001
    Bbb name 00020002
    Could you please help me on how to design sequence and sub sequence number in DMEE structure.
    Regards,
    Guna

    Hi,
    please find seqence number and sub sequence number in below file structure.
    Aaa name 0001(Seq. num) tax id amount   -------------------------------------header
    Bbb name 0001(Seq.num)0001(sub seq num) dnum amt---------------- item
    Bbb name 0001(Seq.num)0002 (sub seq num) ---------------- item
    Bbb name 0001(Seq. num) 0003(sub seq num) ---------------- item
    Aaa name 0001(Seq. num) tax id amount                  --header
    Bbb name 0002(Seq. num)0001(sub seq num)---------------- item
    Bbb name 0002(Seq. num)0002(sub seq num)---------------- item
    TRL
    Please help me to design sub sequence number and sequnce number again in the item details.
    Best regards,
    Anji

  • How to print sequence number for a text item in a oracle reports

    Hi
    I have text item which repets for every round,if i have 3 or 4 rounds i should number the text item as 1,2,3,4 etc.... in a report.
    Can anybody help me
    Thanks in advance

    Hi Bob
    Thank you for your reply.
    Here is the data for example:
    Jobxxxx
    Round
    assembly for 3d $200 1 $200.00
    proof for 3d $10 3 $30.00
    Round
    plate for 3d $200 1 $200.00
    image for 3d $10 3 $30.00
    Job yyyy
    Round
    assembly for 3d $100 1 $100.00
    proof for 3d $50 3 $150.00
    So Bob everything is comming from tables except round.
    My question is how to add sequence number to round adn the result should be like this:
    Jobxxxx
    Round 1
    assembly for 3d $200 1 $200.00
    proof for 3d $10 3 $30.00
    Round 2
    plate for 3d $200 1 $200.00
    image for 3d $10 3 $30.00
    Job yyyy
    Round 1
    assembly for 3d $100 1 $100.00
    proof for 3d $50 3 $150.00
    Thank you in advance

  • How to trigger Sequence of processes in BPM

    Hi!  I am trying to implement process sequencing with BPM.Its like i have to trigger a set of processes(say 1,2 &3 ) if certain flag in input msg is set.If the flag is not set then processes (1,2&4 ).
          the procecess should occur in a sequence like ..if 1 is completed then it should send ackgmnt and start the 2nd process.
    If any body has worked on similar scenario , please reply :).
    Srinivas
    Edited by: Srinivas Subramanyam Karnam on Jul 4, 2008 2:16 PM

    I tried using switch control to check the condition (particular element(say JV) in the input msg is 0or 1 ) .But donno how to get ack and based on ack how to start other process.
                 Let me take an example to make things clear.
    say  1st process is creation of batch No.
           2nd  -
    do -
    of sales order.
           3rd -
    do----
    of STO.
           4th -
    do----
    of SOD(SO dispatch).
    If JV element in input msg is 1 ...flow should be like(1->2->4) 
    create BatchNo-> get ack->
    if ack positive(:if ack Negative->end.)->create SO
    ->get ack->if ack positive(:if ack Negative->end.)->create SOD.End.
    If JV =0 say...then similarly 1->2->3 end.
    Not sure if i have to use  while loop .. new to bpm :).Request  to Reply with what controls to be used .
    with due thanks srinivas.:)

  • How to avoid Sequence Gapping in ODI Interface

    I have an employee table and a job map table in oracle based on the employee type/group and job type/group I need to pick up the sequence, generate id
    and update employee id of employee table using ODI
    employee table job table
    name type group id type group sequencename seqmin seqmax
    pat 1 1 1 1 seq1 1 10
    dan 1 2 1 2 seq2 30 40
    john 1 3 1 3 seq3 20 100
    when I select the sequence using if condition or case statement or decode and call the sequence <%=snpRef.getObjectName( "L" , "My_SEQ" , "D" )%>.nextval
    the sequences are creating gaps for every call.as the sequence is incrementing internally for every wrong mapping. How should I get rid of these gaps.
    In oracle database we call functions in the case condition.These functions consists of the seq.nextval code and the unwanted incremental gapping is avoided.
    But in the case of ODI how can we get this.
    Thanks,
    Vikram

    I am facing this issue when I execute on the source or staging area.When I try toexecute on the target,the ODI
    doesn't allow me to execute and gives the following warning
    "A mapping executed on the target cannot reference source columns. Move this mapping on the source or the staging area.     Target Column Employeeid"
    In my case I am using IKM Oracle Incremental update
    the source datastore is employee table, job table and target is copy of employee table(as i need to update the employee id column with sequence numbers by picking the right sequence from job table,sequence name column)

Maybe you are looking for

  • Can not install itunes on window 7 64 bit

    When ever I try to install itunes 10.6.3, I receive a message "the installer encountered errors before itunes could be configured....errors occured during installation".  I have attempted to install itunes using the "download only" method.  I have al

  • I want to sign out of current apple id and into another one but I no longer have access to my current email address so I cannot log out

    I want to sign out of current apple id and into another one that I own but I no longer have access to my current email address so I cannot log out (It is with an internet provider who I have just unsubscribed with)  This is on an iPhone 5S, on iOS 8.

  • Flash Video / XHTML

    When I use the Insert > Media > Flash Video function in Dreamweaver CS3, the code that is automatically generated does not validate as XHTML. The errors are mainly in the code I have copied below. Here are some of the errors I get when I try to valid

  • Can't import Cr2 files from my Canon 60D into LR5

    I took a trip to New Zealand and I shot in Raw +low res jpeg.  I uploaded the files to my little Asus tablet I had purchased right before my trip because I was running out of SD cards.  This is the only place I have quite a few images as I formatted

  • Decode does not work for line breaks

    Hi experts, In a BLS, I am decoding a string which I output .  It decodes the spaces but not for linea breaks.  What is wrong ¡? Thanks and best regards, Antonio Rodriguez  Rubalcaba