For loop inside  a while loop, what order is that in big o??

If say I have a for loop inside a while loop, then is that suppose to be in the order of O(n^2) right?? Is there any possibilities to change this into the order of O(n)??

the other size and the temp size is abstact, which can be defined. This is actually for my union method, my teacher asks me to write this method using the order of O(n) which I think it is not possible. What do you guys think??
Below is the code I have made:
public Set<E> union(Set<E> other) {
          int count = 0;
          Iterator<E> iterator1 = other.iterator();
          while (iterator1.hasNext())
               count++;
          Object[] temp = new Object [data.length+count];
          n = data.length+count;
          for (int i = 0; i<count; i++)
               temp[i] = data;
          for (int j = count; j<temp.length; j++)
               temp[j] = iterator1.next();
          data = temp;
          return null;
but it still has same elements on it and I am thinking of a way on how to remove those same elements

Similar Messages

  • Open qty errin Selection list For Ref Doc. screen while converting to order

    Hi SAP Gurus,
    For one of my materials, the open quantity is not updating in the Selection list For Ref Doc. screen while converting to sales order.
    Can you please help me?
    Thanks,
    Ketan

    Hi Senthilkumar,
    I really appreciate for your kind Hint of SEL ID.
    I created and assigned new 'Sel Priority' to the SEL ID same as for Routing.
    Now while converting Planned order to Production order system is asking for Reference operation set as there is no such need of Routing as I already mentioned in previous post.
    Regards,

  • Asking for purchasing reqistioner no. while making production order

    dear all
    asking for purchasing reqistioner no. while making production order.how do get rid of this reqisitioner no. option from production order.
    regards
    manish sharma

    Hi,
    Chcek the BOM copied to the order or the items that you are entering while creating the order, if item categories are N, purchse requisitions are automatically created and related info is queried from the user. Change item categories to L, stock items if external procurement is not relevant.

  • "Procurement Wizard"  window opens for a particular warehouse while saving Sales Order

    Hello All,
    We have upgraded SAP B1 8.8 to SAP B1 9.0
    My client is facing one of problem while saving Sales order using particular warehouse.
    Actually client is having 4 warehouses (A,B,C,D) in which if they use one particular warehouse "A" for saving Sales order they are facing a issue. The scenario is here below:
    1. Client selects all required details of sales order with along with particular warehouse "A".
    2. On saving SO "Procurement Wizard" is automatically triggered even if procurement document field is unchecked in logistic tab of SO.
    3. This is happening only for a particular warehouse "A". Whereas if I select other 3 warehouses (B,C,D) the system saves SO without trigerring "Procurement Wizard".
    Client is using SAP B1 9.0 PL 08 
    We don't want this  "Procurement Wizard" window to open for this. As we haven't selected any check box for  "Procurement Wizard" so it should not open for a particular warehouse "A".
    Do you think any issue with my warehouse or system settings? Please let me know.
    Please refer screen shots.
    Thanks in advance.

    Hi Saurabh,
    As per your Screen Shot, I think you have Add-on.
    Please stop that Add-on and then check above Scenario.
    Thanks
    Regards::::
    Atul Chakraborty

  • Error: Validation failed for the field - Status While creating Sales Order

    Hi,
    I am getting an error while trying to create sales order header.
    I have tried using provided in the metalink as well but it still doesn't seem to work.
    I am on R12.1.1
    Can somebody help me out on this?
    The code is
    set serveroutput on
    DECLARE
    l_header_rec OE_ORDER_PUB.Header_Rec_Type;
    l_header_rec1 OE_ORDER_PUB.Header_Rec_Type;
    l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
    l_line_tbl1 OE_ORDER_PUB.Line_Tbl_Type;
    l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;
    l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
    l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type;
    l_header_scr_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
    l_line_scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
    l_request_rec OE_ORDER_PUB.Request_Rec_Type ;
    l_return_status VARCHAR2(1000);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(1000);
    p_api_version_number NUMBER :=1.0;
    p_init_msg_list VARCHAR2(10) := FND_API.G_FALSE;
    p_return_values VARCHAR2(10) := FND_API.G_FALSE;
    p_action_commit VARCHAR2(10) := FND_API.G_FALSE;
    x_return_status VARCHAR2(1);
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(100);
    p_header_rec OE_ORDER_PUB.Header_Rec_Type := OE_ORDER_PUB.G_MISS_HEADER_REC; 
    p_old_header_rec OE_ORDER_PUB.Header_Rec_Type := OE_ORDER_PUB.G_MISS_HEADER_REC;
    p_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type := OE_ORDER_PUB.G_MISS_HEADER_VAL_REC;
    p_old_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type := OE_ORDER_PUB.G_MISS_HEADER_VAL_REC;
    p_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_TBL;
    p_old_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_TBL;
    p_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_VAL_TBL;
    p_old_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_VAL_TBL;
    p_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_PRICE_ATT_TBL;
    p_old_Header_Price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_PRICE_ATT_TBL;
    p_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_ATT_TBL;
    p_old_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_ATT_TBL;
    p_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_ASSOC_TBL;
    p_old_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_ADJ_ASSOC_TBL;
    p_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_SCREDIT_TBL;
    p_old_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_SCREDIT_TBL;
    p_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_SCREDIT_VAL_TBL;
    p_old_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_HEADER_SCREDIT_VAL_TBL;
    p_line_tbl OE_ORDER_PUB.Line_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_TBL;
    p_old_line_tbl OE_ORDER_PUB.Line_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_TBL;
    p_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_VAL_TBL;
    p_old_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_VAL_TBL;
    p_Line_Adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_TBL;
    p_old_Line_Adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_TBL;
    p_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_VAL_TBL;
    p_old_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_VAL_TBL;
    p_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_PRICE_ATT_TBL;
    p_old_Line_Price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_PRICE_ATT_TBL;
    p_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_ATT_TBL;
    p_old_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_ATT_TBL;
    p_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_ASSOC_TBL;
    p_old_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_ADJ_ASSOC_TBL;
    p_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_TBL;
    p_old_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_TBL;
    p_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_VAL_TBL;
    p_old_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_VAL_TBL;
    p_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type := OE_ORDER_PUB.G_MISS_LOT_SERIAL_TBL;
    p_old_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type := OE_ORDER_PUB.G_MISS_LOT_SERIAL_TBL;
    p_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LOT_SERIAL_VAL_TBL;
    p_old_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type := OE_ORDER_PUB.G_MISS_LOT_SERIAL_VAL_TBL;
    p_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type := OE_ORDER_PUB.G_MISS_REQUEST_TBL;
    x_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type;
    x_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
    x_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
    x_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
    x_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
    x_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
    x_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
    x_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type; 
    x_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
    x_Line_Adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
    x_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
    x_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
    x_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
    x_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
    x_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
    x_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
    x_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type;
    x_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
    x_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type; 
    X_DEBUG_FILE VARCHAR2(100);
    l_line_tbl_index NUMBER;
    l_msg_index_out NUMBER(10);
    BEGIN
    oe_debug_pub.debug_on;
    DBMS_APPLICATION_INFO.set_client_info (121);
    dbms_output.enable(1000000);
    fnd_global.apps_initialize(2787,50703,660); -- pass in user_id, responsibility_id, and application_id
    oe_msg_pub.initialize;
    oe_debug_pub.initialize;
    MO_GLOBAL.init('ONT');
    X_DEBUG_FILE := OE_DEBUG_PUB.Set_Debug_Mode('FILE');
    oe_debug_pub.SetDebugLevel(5); -- Use 5 for the most debuging output, I warn you its a lot of data
    dbms_output.put_line('START OF NEW DEBUG');
    --This is to CREATE an order header and an order line
    --Create Header record
    --Initialize header record to missing
    l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    l_header_rec.pricing_date := SYSDATE;
    l_header_rec.sold_to_org_id := 2096;
    l_header_rec.ordered_date := SYSDATE;
    l_header_rec.sold_from_org_id := 121     ;
    l_header_rec.salesrep_id := -3;
    l_header_rec.order_type_id := 1003;
    l_header_rec.operation := OE_GLOBALS.G_OPR_CREATE;
    l_line_tbl_index :=1;
    -- FIRST LINE RECORD
    -- Initialize record to missing
    l_line_tbl(l_line_tbl_index) := OE_ORDER_PUB.G_MISS_LINE_REC;
    -- Line attributes
    l_line_tbl(l_line_tbl_index).inventory_item_id := 124516;
    l_line_tbl(l_line_tbl_index).ordered_quantity := 500;
    l_line_tbl(l_line_tbl_index).ship_from_org_id := 563;
    l_line_tbl(l_line_tbl_index).operation := OE_GLOBALS.G_OPR_CREATE;
    -- CALL TO PROCESS ORDER Check the return status and then commit.
    OE_ORDER_PUB.process_order (
      p_api_version_number => 1.0
      , p_init_msg_list => fnd_api.g_false
      , p_return_values => fnd_api.g_false
      , p_action_commit => fnd_api.g_false
      , x_return_status => l_return_status
      , x_msg_count => l_msg_count
      , x_msg_data => l_msg_data
      , p_header_rec => l_header_rec
      , p_line_tbl => l_line_tbl
      , p_action_request_tbl => l_action_request_tbl
       -- OUT PARAMETERS
      , x_header_rec => l_header_rec1
      , x_header_val_rec => x_header_val_rec
      , x_Header_Adj_tbl => x_Header_Adj_tbl
      , x_Header_Adj_val_tbl => x_Header_Adj_val_tbl
      , x_Header_price_Att_tbl => x_Header_price_Att_tbl
      , x_Header_Adj_Att_tbl => x_Header_Adj_Att_tbl
      , x_Header_Adj_Assoc_tbl => x_Header_Adj_Assoc_tbl
      , x_Header_Scredit_tbl => x_Header_Scredit_tbl
      , x_Header_Scredit_val_tbl => x_Header_Scredit_val_tbl
      , x_line_tbl => l_line_tbl1
      , x_line_val_tbl => x_line_val_tbl
      , x_Line_Adj_tbl => x_Line_Adj_tbl
      , x_Line_Adj_val_tbl => x_Line_Adj_val_tbl
      , x_Line_price_Att_tbl => x_Line_price_Att_tbl
      , x_Line_Adj_Att_tbl => x_Line_Adj_Att_tbl
      , x_Line_Adj_Assoc_tbl => x_Line_Adj_Assoc_tbl
      , x_Line_Scredit_tbl => x_Line_Scredit_tbl
      , x_Line_Scredit_val_tbl => x_Line_Scredit_val_tbl
      , x_Lot_Serial_tbl => x_Lot_Serial_tbl
      , x_Lot_Serial_val_tbl => x_Lot_Serial_val_tbl
      , x_action_request_tbl => l_action_request_tbl
      dbms_output.put_line('OM Debug file: ' ||oe_debug_pub.G_DIR||'/'||oe_debug_pub.G_FILE); 
      oe_debug_pub.debug_off;
      -- Retrieve messages
      FOR i IN 1 .. l_msg_count
      LOOP
       Oe_Msg_Pub.get( p_msg_index => i
        , p_encoded => Fnd_Api.G_FALSE
        , p_data => l_msg_data
        , p_msg_index_out => l_msg_index_out);
       DBMS_OUTPUT.PUT_LINE('message is: ' || l_msg_data);
       DBMS_OUTPUT.PUT_LINE('message index is: ' || l_msg_index_out);
      END LOOP;
    -- Check the return status
    IF l_return_status = FND_API.G_RET_STS_SUCCESS
    THEN
      dbms_output.put_line('Process Order Sucess');
      dbms_output.put_line('new Header id:' || l_header_rec1.header_id);
    ELSE
      dbms_output.put_line('Failed');
    END IF;
    Commit;
    END; Regards
    knick

    Kinck
    The same script worked for me in vision (R12.1). You may have issues with your defaulting of a number of attributes that you are not passing in the API (like price list, line type and so on). You may want to check them.
    Thanks
    Nagamohan

  • User Exit for maintaining Checking Rule while creating Sales Order

    Hi Gurus,
    I have a requirement where I need to assign a particular value to Checking Rule (VA02 -> Display Availability Button -> Checking Rule field (beside Checking Group field)) while creating a Sales Order in SD (via. IDOC's).
    In my requirement, within one Checking Group there are multiple checking rules assigned. When I am trying to assign the checking group in userexit_move_field_to_vbap (include MV45AFZZ), it is picking up the default checking rule ('A') and not the customized one defined for our requirement.
    Is there any other user exit within which I can directly assign the Checking Group and Checking Rule while creating the sales order, please suggest.
    Regards,
    Arvind.

    You can use userexit 'USEREXIT_MOVE_FIELD_TO_VBAP' in include MV45AFZZ. This is executed every time a user changes anything on a material (e.g. put in a material number) and hits return. Just raise your pop-up window there if the user puts in the particular material you are talking about. The material number is available in xvbap-matnr.
    Hope that helps,
    Michael

  • BOM not exploding for CR doc. type while creating sales order.

    Hi Experts,
    I have a problem in BOM. When created the BOM with sales doc. type OR, then BOM exploding as usual and picking pricing for main item.. But when I tried for sales doc. type CR, then the BOM is not being exploding and also pricing is also not picking. Can any one help me for this problem.
    Thanks in advance,
    Raksha.

    Hi,
    Go to VTAF billing to sales document copy control and check below settings:
    Header:
    Data Transfer -052 Billing doc header  
    Data Transfer Buis - 103 Billing bus header data
    Data Transfer Part - Billing Header Partner
    Copying requirements - 021 Billing Header
    Check Copy item number
    Uncheck complete reference
    Item:
    Item Cat proposal G2N Request
    Item TAN - Standard item
    Data Transfer -153 item from Billing doc
    Data Transfer Buis - 104 Billing bus Item data
    Data Transfer Part - 004 Billing Item Partner
    bl.pl - Leave it blank
    Copying requirements - 303 Billing Header
    uncheck copy schedule lines and do not copy batch
    check update document flow
    Pricing type - D
    Leave blank - Campaign Deter.
    Points to add: If you create without reference to an invoice then it would not explode BOM in RE return order because the configuration not set in REN item category.
    As a standard business process return orders always create with reference to invoice.
    regards
    rc gopi

  • Change in logic for selecting the Bin while creating Transfer Order

    Hi ,
    Currently the system follows SAP process of BIN selection which is as mentioned-
    With stock removal strategy Partial Pallet Quantity (A), system follows  below  steps to find the storage bin:
    1.SAP always compares the requested amount from the Transfer Order with the largest bin amount available in the stock.
    2.If the requested quantity of the transfer order is the same as or larger, the system removes the material from the largest bin amount first.
    3.If the requested quantity is smaller, the system removes the material from a storage unit for partial quantities in ascending order.
    Now the customer has requested a change which is -
    It wants to take in BIN in the FIFO order followed by partial pallet .
    Question is - Is this possible ?
    Cheers
    Disha

    Hello,
    May I add something to the discussion.
    If you are calling "OMLJ", you see on the left side the secion "Transfer requirements". If the box for "Manual TO creation not allowed" is ticked, you are not able to create the TO's by the manual transactions. Then only the system is allowed to create the TO's, for instance with the report RLAUTA10.
    I hope this anweres your question.
    Best regards
    Uwe Neuman

  • Creating an array in a 'for' loop (resetting loop count)

    Hi,
    I am trying to integrate an acceleration signal coming from a CRIO analogue input to obtain the speed and then further integrate to get the displacement of a vibration system.
    I understand that in order to perform the integration, an array has to be fed in. My problem is that I could not buffer the signal in a buffer block as I couldn't find any buffer blocks. so I decided to create my an array of data using a 'for' loop. The 'for' loop nests inside a timed loop. The problem that I got stuck at is how to reset the 'for' loop in order to refill the buffer again at every iteration of the outer timed loop.
    I have attached the code if that helps. Note that I am using labview 2013.
    I would be gratefull if someone who had encountered a similar issue before can help me.
    Regards
    Ali
    Solved!
    Go to Solution.
    Attachments:
    acc_test.vi ‏42 KB

    Dear Altenbach,
    Many thanks for your reply.
    I need to make it clear that I have not had enough hands-on with labview, I have only used it for sometime in the past and now I have to in order to perform some active damping on a 50Hz running machine. I must stress the fact that what i find more intuitive to do in a different programming language (matlab or C) is not as straightforward in labview. so please bear with me if my code has basic mistakes .
    All what i am trying to do is obtain the speed and position from an acclerometer signal. unfortunately i dont have a position sensor so i have to measure acceleration then perform time integrations in order to obtain the speed and position respectively. I am using a compact Rio (later in FPGA mode) to take physical measurements of acceleration from the vibratory machine and where i managed to do this bit successfully. when it came to performing the integration, i had to create an array inside my timed loop since i couldn't find a buffer block. I implemented a 'for' loop inside a timed loop in order to build the array. however i got stuck at resetting the count of the 'for' loop in order to refill the array with new values at every new iteration of the outer timed loop. unfortunately, even a sensible answer has been suggested before, i dont seem to have been capable of doing it yet. I really spent all my day trying to figure a way out but not achieved it yet, nevertheless I have learnt many many things by playing around.
    I would be gratefull if you could comment on a possible way of doing what i am trying to do.
    Kind Regards
    Ali

  • Restarting a elapsed time function in a for loop

    Hello,
    I am having an issue while using an elasped time function inside of a while loop (I wire the Time has elapsed? boolean to the stop function of the while loop), that is consequently inside of a for loop.  The elapsed time function works correctly on its own in a while loop, but when added to a for loop will not reset for each iteration of the for loop.  I can post an example if it is needed, but has anyone run into this problem before?  I have tried wiring all the reset boolean's but I cannot get the timer to reset untill the for loop has finished.
    Any suggestions on how to achieve this another way are welcome.
    Thanks,
    Andrew

    I found the issue, I was using 2 timers inside of the for loop on the assumption that they are completely independant of one another....they are not.  if time has elapsed on one timer then it uses that time to start off the next timer, kind of a wierd behaviour but I guess I am not really using the timer in a normal manner.
    Andrew

  • Why are date and time strings lost when indexing an array in a for loop

    Hi, 
    I have an application where i'm reformatting data from a spreadsheet for graphical display on a LabVIEW dashboard.
    the original spreadsheet has date and time values in separate columns, and i'm merging them and converting to a timestamp value.  But something's not working.  Does anyone know why the string value is lost when the array indexes into this for loop?
    Attachments:
    failed array index.png ‏142 KB

    Can you attach your VI with some typical values? (e.g. create in indicator on the 2D array, run your VI, then turn the indicator (now containing data) into a diagram constant). Place the FOR loop related code and that diagram constant into a new VI and attach it here.
    How many times does the FOR loop run? Could it be that the last element of each 1D array is an empty string? (unless you put a wait inside the FOR loop, you'll never see the other elements in the probe)
    LabVIEW Champion . Do more with less code and in less time .

  • Making JButton name a varible for use in for loops

    Ok I've got some 98 buttons which are laid out in a grid, and a for loop would work to make thing easier when it came time to make adjustments or changes. Therefore, I would only have to make changes once instead of editing some 196 lines (Making the button, then adding for each button) Both the button names are incremental and their lables
    Here is what I got:
    // for loops to do the increase of Char Letter and Int Number
    String buttonName = "rowButton" + Letter + "" + Number;
    JButton buttonName = new JButton( Letter + " " + Number);
    // closing of for loop
    What do I need to do to make a string value to be the new button's name?

    String buttonName = "rowButton" + Letter + "" + Number;
    JButton buttonName = new JButton( Letter + " " + Number);
    What language allows this? There has to be some language that allows >this, otherwise why do so many people think you can do it in java. Uhmm, actually it works fine in Java. One method to convert an integer to a string is to do:
    int i = 10;
    String new_string = "" +i;
    //new_string == "10"

  • Synchronisation of two for loops...

    hii....
    i am using two for loops and i want that each iteration for both for loops start at same time..
    actually i want synchronisation between these two loops..
    so when the each iteration of both loops will start at same time then these will be synchronised..
    also if one loop take more time in one iteration then the other loop should pause until the other's iteration completes..
    please hlp me...thanks... 
    thanks
    do not hesitate to give kudos
    Solved!
    Go to Solution.

    hiii
    you are right thatthe loops will be synhronised as Labview executes code via data flow. 
    here i mean of synchronisation is that i want each iteration to be started at same time only... 
     this is what i am not getting..
     i have tried it to b done by defining a local variable in one loop and using its value in the other but it did not work.. 
     i hav tried some more methods but in vain...
     so i am here...
     thanks..
    thanks
    do not hesitate to give kudos

  • Arrays dimension changed by "for loop"

    When using a two(multi)-dimension array as input to a "for loop", the connection
    changes inside the loop to a 1D array automatically. Why?!?
    I want to perform the same procedure on each subarray of the basic two-dimension
    array, by specifing an index. The second dimension I disable indexing. The
    index itself can be the for loop index. The problem is the change in connection
    between out and in of the for loop.

    The question is that you have indexing enabled in the for
    loop entry, and the for loop will convert your 2D array in
    the necessary number of 1D arrays to be completed in the
    for loop. This is good when you don't know how long the
    array is going to be, but if you don't like it, you can
    right click on the input tunnel and disable indexing.
    Hope this helps.
    * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful

  • Cursor For loop question

    Hi,
    I have a cursor in my plsql and I am trying to get the record through a FOR loop. I know that for loop will take care of opening, fetching and closing the cursor implicitly.
    Ex.
    declare
    cursor c1 is
    select * from emp;
    begin
    for l_rec in c1 loop
    end loop;
    My question is i want to check whether the cursor in the for loop is returning any record or not using IF condition.
    where and how i will find that?
    Can anyone help how to do that.
    Rds,
    Nag

    without using boolean variables.Obvious question, WHY?
    If you are so particular..
    SQL> declare
      2   cursor c1 is
      3        select empno, ename, job
      4        from emp
      5        where empno = 7839123;
      6   ex exception;
      7   rec c1%rowtype;
      8  begin
      9   open c1;
    10   fetch c1 into rec;
    11   if c1%notfound then
    12    raise ex;
    13   end if;
    14   loop
    15    dbms_output.put_line(rec.empno||'-->'||rec.ename||'-->'||rec.job);
    16    fetch c1 into rec;
    17    exit when c1%notfound;
    18   end loop;
    19  exception
    20   when ex then
    21    dbms_output.put_line('cur not found');
    22  end;
    23  /
    cur not found
    PL/SQL procedure successfully completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • User Presets not saved correctly

    I am trying to set up specific 3 User Presets to export files to a given file location. But when I return to user presets LR only shows *one* of the 3 locations used and that is set against each of the 3 presets. Q: This looks like a bug, as I cannot

  • What does a blinking folder icon with a question mark mean when turning on computer?

    When I turn on my Mac Book Pro all I get is a blinking forder icon with a question mark in it in the middle of the screen. What does this mean and how can I fix it?

  • When playing angry birds the screen freezes

    When playing angry birds the screen freezes

  • Report Script x Range

    Hi! Is there any way to use RSiblings/Range (or something like that to use with Time dimension) at a report script?? Like we use at Calc Scripts Jan:Dec Thanks!

  • Focus problem Lumia 720

    Hi, I'm brazilian, and brazilian people cant help me. Anyway, I have a Lumia 720... I can use any app, but focus don't work! Auto focus or manual. You can see an example, (picture att). Left picture (it's my street), 2 months ago. Right picture, now.