Javascript array ;Add and remove elements without using push and pop

Hi
 I need to perform add and remove  operation in Javascript with following scenarios
i) Add element, if element does not exist in array(javascript)
ii) Remove element, if element exist in array(javascript)
Without using push and pop method how to achieve this?
Regards
Siva

Completed the Scenario.

Similar Messages

  • How to get Last Year Sales and YTD Sales without using AGO and TODATE?

    Hi all,
    I have got Company and Time dimensions and Sales Fact. My requirement is to get Last Year sales for each company without using AGO function and YTD without using TODATE function. (Due to performance issue as AGO and TODATE do not insert a Cache entry).
    Can someone please help me to achieve my requirement? Thanks in advance.

    Hi Satya,
    Thanks again for your reply. To start with I don't have data for the years 2012 and 2011 to test as I am using SH sample schema from Oracle. I have applied your solution but it does not seem to be working for the previous years like 2000, 2001. My requirement is to have a dashboard prompt "YEAR" and let the user choose whatever year he wants.
    Please have a look at the column formulas of my analysis (As per your solution) :
    ***here B_YEAR is replaced by CALENDAR_YEAR.  
    Amount: "F1 Sales"."Amount"
    AmountYTD:  FILTER("F1 Sales"."Amount" USING "D1 Time"."CALENDAR_YEAR" =YEAR(CURRENT_DATE))
    Amount LY: FILTER("F1 Sales"."Amount" USING "D1 Time"."CALENDAR_YEAR" =YEAR(CURRENT_DATE)-1)and the physical query generated by BI Server: (as you can see I have got a filter CALENDAR_YEAR= 2000)
    WITH
    SAWITH0 AS (select sum(T1074.AMOUNT_SOLD) as c1,
         sum(case  when T1035.CALENDAR_YEAR = TO_NUMBER(TO_CHAR(TO_DATE('2012-05-03' , 'YYYY-MM-DD'), 'yyyy'), '9999') then T1074.AMOUNT_SOLD end ) as c2,
         sum(case  when TO_NUMBER(TO_CHAR(TO_DATE('2012-05-03' , 'YYYY-MM-DD'), 'yyyy'), '9999') - 1 = T1035.CALENDAR_YEAR then T1074.AMOUNT_SOLD end ) as c3,
         T1035.CALENDAR_MONTH_DESC as c4,
         T1035.CALENDAR_YEAR as c5,
         T1035.CALENDAR_MONTH_ID as c6
    from
         TIMES T1035 /* D1 Time */ ,
         SALES T1074 /* F1 Sales */
    where  ( T1035.CALENDAR_YEAR = 2000 and T1035.TIME_ID = T1074.TIME_ID )
    group by T1035.CALENDAR_MONTH_DESC, T1035.CALENDAR_MONTH_ID, T1035.CALENDAR_YEAR)
    select distinct 0 as c1,
         D1.c4 as c2,
         D1.c5 as c3,
         D1.c1 as c4,
         D1.c2 as c5,
         D1.c3 as c6,
         D1.c6 as c7
    from
         SAWITH0 D1
    order by c3, c2 Thanks in advance.

  • HT1296 How can I transfer my ipad calendar to my iphone and ipod touch without using gmail?

    How can I transfer the Calendar on my ipad2 to my iphone5 and ipod touch without using gmail, and keep them synced?

    You could use iCloud, or you could sync them through iTunes on a Mac or a Windows computer.

  • How to display table data without  using ALV  and table element.

    Hi,
            Its possible to display table data without using ALV  and table element.
           Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
           (every time i am fetching single row data ),
           But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
           settings and header data etc..things.
          Give solution to  display data part..
    Regards,
    Rakhi.

    Hi,
    Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
    In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
      DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
        LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
    * Standard Filter Function setting to FALSE
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
    * Standard Filter Function setting to FALSE Ends
    Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
    Hope this answers your query.
    Thanks.
    Kumar Saurav.

  • Remove duplicates without using Sort OR Script compnent OR Staging ?

    Team , Can some advise on how do we go about removing duplicates without using  either of above option quoted in the subject lines ? My source is a huge  flat file  .
    Thanks in advance !
    Rajkumar Yelugu

    I think you can do like this
    1. Add a Data Flow Task with flat file source
    2. Add a multicast to flat file source
    3. Join an output from Multicast to Aggregate transform and group by your required field and take min or max over a unique valued column(s) (id or date or primary key)
    4. Add a Merge join transform and  add the multicast output and Aggregate Transform outputs as sources. join on the group by fields from aggregate and include min/max column also in output
    5. Add a conditional split and define an output as unique valued column(s) >(<) Min/Max value from aggregate
    6. Join the defined output to your destination to get only distinct records from the duplicate sets
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Asynchronous, but need Ack without using BPM and IDocs.

    Hi Experts,
                     I would like to do a scenario i.e., "Asynchronous communication, but need Acknowledgement without using BPM and also without using IDocs whether it is sender side or receiver side". Please help me.
    Thanks in advance
    Srihari.

    Without using BPM will be little longer process. But the alternative way is to add one more receiver in the receiver determination and send some file to that location with the actual mapping getting executed for the actual receiver. and in the second interface you can get the file created at second receiver back to the source location. But this will be little long as compared to synchronous scenarios.
    Flow:
    Source
              Receiver 1--> Actual mapping as per requirement
              Receiver 2(For Ack)--> Create a mapping with blank file sent to Receiver
    Receiver 2-->File Adapter--> Source through 2nd mapping/interface and keep the File adapter pooling interval around 5 sec or less so that you can get the file back to source location.
    Regards
    Anand

  • Select an area of sound track and delete it without using the razor?

    Is there a way to select an area of sound track and delete it without using the razor please?
    Like drag and then cmd-delete or clear or something would seem intuitive?
    Thanks Steve z denver

    Set In and Out Points to define the region, then use the Lift command (Sequence>Lift). Note that the Lift command functions based on track targetting, so if the Video track is also targetted, the content will be removed there, too.

  • Remove locators without using

    Hi folks -- I'm just getting my feet wet with logic express 8 (used to video editing). I keep pointing to the top of the timeline and accidentally inserting locators for various things. I don't want the locators, but removing them without using them doesn't seem to be covered in the manual! "undo" doesn't work. Can anyone help me?
    thanks!
    EH

    You seem to be inserting markers. Just click-hold the marker and drag it down - this will delete it. Alternative way of deleting markers is to do it in the Marker list.

  • I have a macmini on order, I wonder if I can pair the wireless apple keyboard and magic touchpad without using any other input devices, especially, since everything is brand new and not yet paired.

    I have a macmini on order, I wonder if I can pair the wireless apple keyboard and magic touchpad without using any other input devices, especially, since everything is brand new and not yet paired.

    You may just want to save yourself any possible issues
    by just hooking up a wired keyboard and mouse on first
    start up.  Any USB keyboard and mouse should work.
    There have been many that have had problems on first boot
    using the Bluetooth devices. 

  • How to update and insert the records without using Table_comparison and Map_operation?

    How to update and insert the records without using Table_comparison and Map_operation?

    Use either join or MERGE see this Inserting, Updating, and Deleting Data by Using MERGE

  • Pass username and password adfs without using query string

    pass username and password ADFS without using query string, Please help.
    I used query string , but it is unsecured to pass credentials over url, with simple tool like httpwatch , anyone can easily get the password and decrypt it.

    Hello MohitJainMJ,
    You're not in the right forum. Here it's for FIM topics!
    Regards,
    Sylvain

  • Pass username and password ADFS without using query string, Please help.

    pass username and password ADFS without using query string, Please help.
    I used query string , but it is unsecured to pass credentials over url, with simple tool like httpwatch , anyone can easily get the password and decrypt it.

    Hi,
    According to your post, my understanding is that you had an issue about the ADFS.
    As this issue is related to ADFS, I recommend you post your issue to the forum for ADFS.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=Geneva
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thank you for your understanding and support.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • How can i download photoshop elements and premiere elements 10 using the serial number not the cd?

    How can i download photoshop elements and premiere elements 10 using the serial number not the cd?
    I tried downloading the trial elements 11 and entering the serial number but it wouldn't work, i cannot find a trial for elements 10.
    Thanks

    http://prodesigntools.com/photoshop-elements-10-direct-download-links-pse-premiere-pre.htm l
    Follow the instructions on that page carefully before you click the download link.

  • Why after update Iso 5 by iPhone and not open, without using Itune. Just screen keep show apple logo for few hours already.

    Why after update Iso 5 by iPhone and not open, without using Itune. Just screen keep show apple logo for few hours already.

    Try to reset - Press both the home and on/off buttons for at least 10 seconds until the Apple logo reappears.

  • Displaying X� ,X� and so on  without using graphics

    Hi I want to disply X� X� and so on without using graphics.
    Is it possible if yes how.
    thanks
    dharmendra

    answered in http://forum.java.sun.com/thread.jsp?forum=31&thread=354790

Maybe you are looking for

  • A doubt in mutilthreading behaviour

    Dear experts, I have created a multithreading program in java.When i click a start button,i see helicopter moving across the sky.I click another button and a new thread get created and this time i see two helicopters flying.In this way as i keep pres

  • Create a user profile Flash SWF with a database?

    I have a project to create a SWF game, that requires registered users pegged to a database (eg: student ID and class) to logon to the SWF and play the game, and then they can save their progress and continue it next time. Below is just a sample that

  • Recalculation in excel thru java

    Hi, Thru java program i can able to read and write the values into the excel sheet. but...Latest re calculating values are not available to read Example, for the following situation i am not getting right values In worksheet1 cell A1 = 10 (writing th

  • My Nokia 701 cannot share photo using NFC to C7

    My 701 used to be able to share photo from gallery to my wife's C7 Anna. Strangely, when i tried to send few marked photos, the sending process was taking forever and i had to cancel it. After that, when i tried to share even one photo at a time, the

  • SAP IdM 7.2 - enhancement UI

    Hi all, I have this specific request from our customer: 1. They want to reset the passwords for a list of users in their IC. For that, we thought that it should be possible to create a new UI screen, that displays the list and an extra  button to res