Multiple shift registers in For loop

I'm using multiple shift registers to find the number of different string in a string array. However, the shift register got refreshed every time it finds a different string and returns back to 0. How can I have the register remember its previous value after it encounters a new string value?
Solved!
Go to Solution.
Attachments:
count.vi ‏19 KB

You should think about making your code scalable. At the moment, you need to re-architect the VI from scratch whenever the sensor names or their number changes. If you suddenly have 1000 sensor names, the code would be unmamangeable because the sheer number of cases and shift registers!
Attached is an simple alternative. As you can see, the code remains the same, even if the number of sensors or their names changes in the future. See if it makes sense. (You can easily modify it to also count unrecognized names, for example).
Modify as needed.
Some other possible bugs in your VI:
You should initialize the shift register with zero, not one. Right now the results are one too high.
Case "B" is actually "B." and the count is only accidentally correct because it is also the default case and there are no other sensor names (e.g. F) in the input array.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
CountMOD.png ‏19 KB
countMOD.vi ‏19 KB

Similar Messages

  • Create multiple VIs using a for loop

    Hi,
    I'm still pretty new to LabVIEW, so this question might be easy for you guys here..
    I'll simplify what I'm trying to do.
    I've got two numeric controllers that act as the rows and columns of a matrix.
    I'd like to take those numbers from these two controllers and use them to create a matrix of a certain picture.
    Example:
    The rows controller is given 3, and the columns controller is given 4.
    Using these numbers I would like the end result to show a certain image (let's say, a cube) multiplied on a 3 by 4 matrix.
    Let's say the picture is an X, then the end result should be:
    XXXX
    XXXX
    XXXX 
    I think I should be using a double for loop (one inside the other obviously), and I should also create the "position" property in order to display each picture of the cube in it's right place.
    The problem is that I don't know how to CREATE the pictures over and over again, while being able to control each one's position property.
    Any help would be GREATLY appreciated!
    Solved!
    Go to Solution.

    1) By "multiple VIs" I meant that I think that I need to create express VIs on the fly while running the for loop. I might be totally wrong here.
    2) Yes, by "numeric controllers" I meant numeric controls in the front panel.
    3) The matrix I'm referring too isn't an object nor a VI in LabVIEW but a virtual matrix that is the end result. I used the term "matrix" because the end result is actually a matrix (of rows and columns) of pictures..
    I'll try to elaborate and even simplify it more:
    Let's say I want to display one picture. That's easy, no problem there.
    Now let's say that I'd like to display n pictures on a one dimensional array. Just one row.
    What I think I need to do is to read from the numeric control in the front panel the number (n) of pictures, and then create them in a for loop, while using the "position" property to set the distance between each picture (using coordinates).
    My original question was just like the above, but for a two dimensional matrix/array. So I guess we can even simplify it even more, by saying it's only one dimensional.
    My way of action here might be totally wrong, and there might be an easier way or another way to go about this...
    Thanks for the quick answer!!  

  • Returning multiple values with SELECT FOR LOOP

    Oracle EE 11gR1
    PL/SQL
    OEL 5.8
    ===========
    Would like to know how to do the following?
    for x, y in (select name, street
    from employees
    where hire_date < sysdate - 100)
    loop
    In other words, is there a way to handle 2 (or more) values in a SELECT FOR LOOP structure? If not, then how to accomplish the same task.
    The above does not work of course. :-)
    Appreciate any and all advice.

    Yes, just have one name in your for loop and that becomes the equivalent of a table name and reference the columns as that name.column name
    for t in (select name, street
       from employees
      where hire_date < sysdate - 100)
    loop
      dbms_output.put_line('name = '||t.name);
      dbms_output.put_line('street = '||t.street);
    end loop;

  • How to call two variable which are hold multiple value  in to for loop

    hi,
    i have 4 item ,Two Select List And Two Check Box .Class id And Section are select list and student id and subject id are check box .i want to insert More then one subject id in to table corresponding to more then one student id .
    eg. when i select class id 1 and section A then student id of class 1 and section A comes into Student id(check box item ) and all subject corresponding to class 1 comes into subject id( check box item).
    now i want to insert multiple selected subjects with respect to selected multiple student id in to table when i press submit Button.
    My table is
    CREATE TABLE "STUDENT_SUBJECT_DETAIL"
    (     "S_NO" NUMBER,
         "STUDENT_ID" NUMBER,
         "SUBJECT_ID" VARCHAR2(50),
         "SESION" VARCHAR2(50)
    i am using this Code
    DECLARE
    STU wwv_flow_global.vc_arr2;
    SUB wwv_flow_global.vc_arr2;
    begin
    STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
    SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
    for i in 1..STU.count loop
    for i in 1..SUB.count loop
    insert into STUDENT_SUBJECT_DETAIL
    values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
    end loop;
    end loop;
    END;
    Edited by: Manoj Kaushik on Nov 20, 2009 10:10 PM

    DECLARE
        STU wwv_flow_global.vc_arr2;
        SUB wwv_flow_global.vc_arr2;
    BEGIN
        STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
        SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
        FOR i in 1..STU.count LOOP
            FOR i in 1..SUB.count LOOP
                insert into STUDENT_SUBJECT_DETAIL
                values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
            end loop;
        end loop;
    END;This doesn't look right to me:
    1. You have 2 loops, and they are both using the variable i as a counter.
    2. Your insert needs to be in the form: insert into table (column names) values (values to insert)
    3. Why not use a trigger to get the nextval from the sequence?
    Trent
    Edited by: tr3nton on Nov 21, 2009 4:16 PM

  • Having trouble sizing multiple graphs using a For Loop in Excel.

    I am creating multiple graphs in Excel using LabVIEW but I can only set the size for the first graph.  The others are ignored.  I am using the Excel Insert Graph Vi.  I can change the position of al 4 graphs and i can change the size of the first graph created but not the others.  Simply create and save a blank Excel workbook and use it when it prompts for the file.  Here is my my code.  Will someone please let me know what is going on.  Thanks.
    Attachments:
    Excel Graph Test.vi ‏88 KB

    If anyone is still following this thread, I have discovered a solution to the problem of resizing multiple graphs in Excel with the Report Generation Toolkit.  The problem seems to occur because subsequent graphs that are added to the report are configured to "Lock Aspect Ratio", which means you cannot assign a width and height to the graph that would violate its initial width/height proportions.  I was able to get around this behavior by defining the object's position and dimensions after creating the object, as opposed to defining them at the same time the object was created.  This problem will be fixed in a future release of the Report Generation Toolkit.  For now, you can fix the problem yourself by modifying vi.lib\addons\_office\excel.llb\Excel Insert Graph.vi.  Here is a screenshot of the affected area of code as it is currently implemented:
    And here is a screenshot of what the code looks like after my modifications that fix the problem:
    By assigning the dimensions after turning off the "Lock Aspect Ratio" feature, we see that all the subsequent graphs are sized correctly.
    Please let me know if you have any questions on this fix.
    -D
    Message Edited by Darren on 07-06-2006 04:48 PM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    Add_Chart_AFTER.jpg ‏91 KB
    Add_Chart_BEFORE.jpg ‏53 KB

  • Multiple HTTP Requests in for loop response handling

    i am working on stock market portfolio. a user saves his stock name , buy price ,etc .i've added this details in database.but while viewing his portfolio he should even get the current price of d stocks he has added. while retrieving i fetch all data from database set them in a bean and for each stock i make a HTTP Request. in result handler i event set the current price into the bean. Problem is my entire application is displayed with all the CurrentPrice fields with null.
    private function selectContacts():void
        trace("select before");
        stmt.sqlConnection = this.isDbConnected(conn);
        stmt.text = "SELECT * FROM stocks_t";
        stmt.addEventListener(SQLErrorEvent.ERROR, sqlError);
        stmt.addEventListener(SQLEvent.RESULT, sqlResult);
        stmt.execute();
        trace("select after");
    private function sqlResult(res:SQLEvent):void{
        httpServ = new HTTPService();
        data1 = stmt.getResult().data;
        stockList = new ArrayCollection();   
        for(var d:int=0;d<=data1.length-1;d++)
            myPortfolioBean = new MyProtfolioBean();
            httpServ.url = 'http://quote.yahoo.com/d/quotes.csv?s='+data1[d].stockName+'&f=snl1a';
            httpServ.method = 'GET';
            httpServ.addEventListener(ResultEvent.RESULT,yDataResult);
            httpServ.addEventListener(FaultEvent.FAULT,yDataFault);
            httpServ.showBusyCursor= true;
            httpServ.send();
            myPortfolioBean.stockNameB = data1[d].stockName;
            myPortfolioBean.buyB = data1[d].buy;
            myPortfolioBean.quantityB = data1[d].quantity;
            myPortfolioBean.totalQuantityAmountB = data1[d].totalQuantityAmount;
            myPortfolioBean.profitB = data1[d].profit;
            stockList.addItem(myPortfolioBean);
    public function yDataResult(evt:ResultEvent):void
        var s:String = evt.result as String;
        var a:Array = s.split(",");
        //To add to a form or individual fields
        lastTraded =  a[2].toString();
        lastTradedFloat = parseFloat(lastTraded);
        myPortfolioBean.currentB = lastTradedFloat;
        stockList.addItem(myPortfolioBean);
        //stockList.addItem({current:lastTradedFloat});
    the yDataResult() is called after the entire datagrid is displayed on screen as a result of which the CurrentPrice in datagrid column in null. Eg: user has added google ,yahoo,apple( CurrentPrice  is null for all three values) after some time three more rows (as a result of call to yDataResult) with CurrentPrice xx.xx displayed. I want merged results.

    hello ,
    "CurrentPrice" is "lastTradedFloat" sorry for the ambiguity.
    and u got my problem but there is an issue ..
    all the results are set using "sqlResult" except the "lastTradedFloat" which is set in "ydataResult".
    but i confused with HTTP ResultEvent Execution.
    first "sqlResult" method is called arrayCollection is populated. then result is displayed on screen.( lastTraded value is null then)
    then "ydataResult" executes again manipulating data in arraycollection.
    what i want is data in "sqlResult" and "ydataResult" to be set sequentially then callin my display page . such that display is correct.

  • How to generate pseudo random noise(PRN) binary sequence using shift registers?

    what is the block diagram to generate pseudo random noise (PRN) binary sequence of 1's and 0's using shift registers
    please help
     i need 2 submit this project in this week

    This is a fairly simple homework problem. My hints (on the LabVIEW side):
    1- look at while loops
    2- look at shift registers on while loops with multiple input elements
    3-look at the logic components, AND, OR XOR
    Look at this wiki article: http://en.wikipedia.org/wiki/Linear_feedback_shift_register
    Do the work, you won't learn if someone shows you how it is done! The palette that the previous post points to are of PRN and other "noise generators" but I suspect that is not what you are after.
    Know that creating a PRN with a reasonable number of shift register taps produces very pseudo results, as the "random" pattern begins to repeat pretty quickly, thereby making it not a truly random number. 
    When you have an attempt that is sort of working and want additional suggestions, post the code here. We won't do your work, we will help you try to do it, and learn it, yourself.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Number of Stacked Shift Registers based on Control

    Hello,
    I'm using stacked shifts in my code and I would like the number of stack shifts to correspond to a number from a control. Is there a way to do this? Thanks!

    I'm trying to average numbers and doing so by using stacked shift registers in a loop. The only issue is the number of numbers being averaged is not constant and I don't want it to average the last x amount of numbers. I will look into using an Action Engine.

  • Bypassing shift registers

    Being a beginner, I was experimenting with loops and shift registers. Originally I had an add operation that added 1 each time and the results passed back around via a shift register. Maybe I was thinking of op amps at the time but I thought why not just loop the output back to the input instead of going thru the shift register. Seems to work, is it a reliable design?
    thanx,
    jh 
    Solved!
    Go to Solution.
    Attachments:
    feedback.vi ‏19 KB

    jvh75021 wrote:
    Maybe I was thinking of op amps at the time but I thought why not just loop the output back to the input instead of going thru the shift register. 
     Your shift register has absolutely no function here, because you never even use its output anywhere. Click on the shift register and delete it. Run the VI again. Notice no real difference! Now you could right-click the feedback node and "replace it with shift register and still retain about the same functionality. Shift registers and feedback nodes are interchangeable to some degree.
    Important Details: Shift registers and feedback nodes are not completely equivalent. Notable differences exists in the way they can be initialized. A feedback node does not require the presence of a loop (at least in newer LabVIEW versions) and shift registers cannot be globally initialized. Feedback nodes can exist entirely inside a single case of a case structure. Shift registers require a loop on the same subdiagram. Shift registers can be resized on the left to access earlier histories. Feedback nodes can only access one history (selectable in newer versions).
    Shift registers and feedback nodes are central to elegant and efficient code, so make sure to become completely familiar with them. New users often do ugly local variable hacks to approach some of their functionality.
    LabVIEW Champion . Do more with less code and in less time .

  • Is there and alternativ​e to shift registers for saving data across iterations in a subVI operating inside a loop?

    I am creating a subVI state machine (case structure) which will run inside a while loop which will be executing every 250ms. The reason I wanted to make the state machine case structure into a subVI is because I want to execute 64 of the machines within the same loop. The goal is to monitor certain types of voltage changes on 64 I/O channels on a FP2200 RT module and report periodic details about state changes to a database. My thinking was that by executing each independent machine in the same loop structure, I will only worry about one thread. It seems that the alternative of having one state machine thread per I/O channel is probably more than the RT module can handle. Please correct me if I am wrong on that.
    The issue I'm now having is as I'm creating the state machine, I am finding that I need to keep track of some pieces of data from one loop iteration to the next. This is easy enough to do with shift registers but in order to use them, I have to create additional input nodes to my SubVI as well as output nodes. For example, I want to use a queue to buffer some I/O data but as of now, I have to create this queue outside the loop, pull it into the loop across a shift register, feed it to the subVI, and output it to the out Shift register. It would be better if I didn't have to output this queue because there's no reason for anything to have access to it outside the subVI. It just creates an extra set of wires to look at and makes me worry a bit about maintainability. 
    Is there a better way to approach this problem? 

    You could place a while loop inside your sub vi that has a true constant wired to the stop condition. Then add unitialized shift registers to that while loop to keep data between iterations.
    or you could use a feedback node inside the sub vi

  • For Loop exits prematurel​y - Arrays and Shift Registers

    I have attached some preliminary code (work in progress) for the RC4 encryption algorithm. For some reason the middle for loop exits prematurely. In other words it exits after 2 iterations instead of the 256 iterations that N is set to.
    I thought this was not possible and therefore I am presuming I have made some not so obvious error in attempting to use a shift register with an array.
    Please have a look. Thanks.
    Attachments:
    RC4 Encryption beta.vi ‏78 KB

    You misunderstand how a for loop operates. You can either wire a number to the N terminal or you can wire an array into it with auto-indexing turned on. With an array input, the for loop will iterate equal to the size of the array. When you wire both (a practice I do not recomend), the for loop will iterate to whichever is smaller - the array size or the N terminal. Both of your for loops on the left side is creating arrays with only two elements. I suspect that what you need in both of them is a shift register instead of exiting the for loop with auto-indexing turned off.

  • Any way to sample segment length longer than loop iterations w/o shift registers?

    Hi all,
    My loop iterates approx every 0.06s and now i've been asked to add to the program a function which will sample the most recent 3s of data and return the max/min value for two of the signals.  I can think of a programmatically clumsy way to do this with shift registers- take the max/min for each iteration, save-repeat-compare until you have enough iterations to fill 3s of time.  But I can't help but think there has to be a cleaner(better?) way to do this. 
    Any help?
    Thanks
    Solved!
    Go to Solution.

    Hi there,
    Try looking into a circular buffer.  
    http://zone.ni.com/devzone/cda/tut/p/id/7188
    Once you've determined how often you're putting entries into the buffer, you'll know exactly how big of an array to grab and do the Min/Max on.  
    Another option is to use a circular array.  
    http://decibel.ni.com/content/docs/DOC-3414
    I would set this up to function a little like a Functional Global or an Action Engine.   The subVI would then be used in your DAQ loop to "stack" new data.   And then called in another loop or part of your code to be read every three seconds.  
    Patrick Allen

  • How to use for loops with Multiple Initializers and Incrementers

    I found that my for loop is printing out wrong, because I am using two for loops. I have searched but all I can find out is you can't use multiple inializers and increments, does anyone know how to get around this? How would I use an array for this?
    Thanks very much for your help.
    import java.util.Random;
    import java.util.Arrays;
    /** Generate numnodes value for random integers in the range 0..499. */
    public final class RandomInteger {
    public static final void main(String... aArgs){
    log("Generating 6 random integers in range 0..499.");
    int numnodes = 6;
    //Randomly generate a number between 0 and 499 for the x and y coordinates for the nodes
    Random randomGenerator = new Random();
    for (int x = 0; x < numnodes; ++x) {
    int randomInt = randomGenerator.nextInt(500);
    Random randomGenerator2 = new Random();
    for (int y = 0;y < numnodes; ++y) {
    int randomInt2 = randomGenerator2.nextInt(500);
    log("Generated : " + randomInt + " " + randomInt2);
    log("Done.");
    }

    Sorry that code works, but I want to use both my x and y coordinates to get a random number from 0 to 499 in both of them, then I want to do some comparisons of the values, then return it to another function. As it stands now, I get the wrong results when I run it, as you can see at the bottom.
    Thanks very much for your help. I have been stumped all mornign on this and have looked everywhere trying to find an example. I don't won't to use math random. I am on a tight deadline to finish and at the rate I am going, I will not complete it.
    /** Generate numnodes value for random integers in
    the range 0..499. */
    public final class RandomInteger {
    public static final void main(String... aArgs){
    log("Generating 6 random integers in range
    0..499.");
    int numnodes = 6;
    //Randomly generate a number between 0 and 499 for
    the x and y coordinates for the nodes
    Random randomGenerator = new Random();
    for (int x = 0; x < numnodes; ++x) {
    int randomInt = randomGenerator.nextInt(500);
    Random randomGenerator2 = new Random();
    for (int y = 0;y < numnodes; ++y) {
    int randomInt2 = randomGenerator2.nextInt(500);
    log("Generated : " + randomInt + " " + randomInt2);
    log("Done.");
    private static void log(String aMessage){
    System.out.println(aMessage);
    Output:
    --------------------Configuration:
    <Default>--------------------
    Generating 6 random integers in range 0..499.
    Generated : 98 254
    Generated : 98 347
    Generated : 98 359
    Generated : 98 25
    Generated : 98 277
    Generated : 98 148
    Generated : 416 401
    Generated : 416 165
    Generated : 416 354
    Generated : 416 169
    Generated : 416 144
    Generated : 416 354
    Generated : 295 158
    Generated : 295 138
    Generated : 295 349
    Generated : 295 324
    Generated : 295 18
    Generated : 295 193
    Generated : 197 451
    Generated : 197 416
    Generated : 197 480
    Generated : 197 33
    Generated : 197 490
    Generated : 197 494
    Generated : 324 412
    Generated : 324 490
    Generated : 324 213
    Generated : 324 386
    Generated : 324 467
    Generated : 324 163
    Generated : 379 180
    Generated : 379 446
    Generated : 379 314
    Generated : 379 52
    Generated : 379 113
    Generated : 379 271
    Done.
    Process completed.

  • How to return multiple tags (based on different checks) in a for loop?

    Hi,
    I'm trying to return multiple elements, based on different checks that are done in the XQuery, within a for loop. But I'm getting syntax errors at any attempt to do this.
    This is the structure of what I'm trying to do:
              <ActionList>
         <ACtion>
    let $total := count(...)
    for $x in (1 to $total)
         let $lineItems := $someVariable/*:Items/*:Item[$x]
         return
              if(...)
                        <Qty1>{...}</Qty1>
                             else     ""
                        if(...)
                        <Qty2>{...}</Qty2>
                             else ""
                   {                                       if(...)
              <Qty3>{...}</Qty3>
                             else ""
              <LinesList>
                             let $totalcount(...)
                             for $y in (1 to $totalcount(...)
                                  let $DTL := $someVariable*:DTL[$y]
                             return
                             <Line>
                                  <Carrier>{...}</Carrier>
                                  <Path>{...}</Path>
                                  <CA>{
                                       if(...)
                                            data($$someVariable/*:CA)
                                       else
                                  }</CA>
                                  <RE>{
                                       if(...)
                                            data($someVariable*:CA[@XX="RG"])
                                       else
                                  }</RE>
                                  <Time>{
                                       if(...)
                                            data($someVariable*:CA[@XX="BN"])
                                       else
                                                                     </Time>
                                  </Line>
                        </LinesList>
                                                 </ACtion>
                                                 </ActionList>
    I'm not able to return elements without having their father being returned as well, I just want to iterate over those fields and, based on that verification, decide whether they should be returned or not.
    Can someone please advise?

    An example anyway...
    Input document ($d) :
    <ns0:Items xmlns:ns0="http://my.company.org/my-namespace">
      <ns0:Item type="A">
        <ns0:Qty>2</ns0:Qty>
        <ns0:UnitPrice>10.00</ns0:UnitPrice>
        <ns0:DTL>
          <ns0:Article>ART001</ns0:Article>
          <ns0:DispatchDate>2012-01-20</ns0:DispatchDate>
          <ns0:Destination direct="1">Location1</ns0:Destination>
        </ns0:DTL>
        <ns0:DTL>
          <ns0:Article>ART002</ns0:Article>
          <ns0:DispatchDate>2012-01-21</ns0:DispatchDate>
          <ns0:Destination direct="1">Location2</ns0:Destination>
        </ns0:DTL>
      </ns0:Item>
      <ns0:Item type="B">
        <ns0:Mass>5</ns0:Mass>
        <ns0:Unit>kg</ns0:Unit>
        <ns0:DTL>
          <ns0:Article>ART003</ns0:Article>
          <ns0:DispatchDate>2012-01-20</ns0:DispatchDate>
          <ns0:Destination direct="1">Location3</ns0:Destination>
        </ns0:DTL>
        <ns0:DTL>
          <ns0:Article>ART004</ns0:Article>
          <ns0:DispatchDate>2012-01-21</ns0:DispatchDate>
          <ns0:Destination direct="1">Location4</ns0:Destination>
        </ns0:DTL>
        <ns0:DTL>
          <ns0:Article>ART005</ns0:Article>
          <ns0:DispatchDate>2012-01-22</ns0:DispatchDate>
          <ns0:Destination direct="2">Location5</ns0:Destination>
        </ns0:DTL>
      </ns0:Item>
    </ns0:Items>XQuery :
    declare namespace ns0 = "http://my.company.org/my-namespace";
    <DispatchInfo>
      for $i in $d/ns0:Items/ns0:Item
      return
      <Parcel>
        if ($i/@type = "A")
          then <Amount>{xs:decimal($i/ns0:Qty * $i/ns0:UnitPrice)}</Amount>
          else <Weight>{concat($i/ns0:Mass, " ", $i/ns0:Unit)}</Weight>
      , for $j in $i/ns0:DTL
        return
        <Article>
          <Num>{data($j/ns0:Article)}</Num>
        , <Dt>{data($j/ns0:DispatchDate)}</Dt>
        , if ($j/ns0:Destination/@direct = "1")
            then <Dest>{data($j/ns0:Destination)}</Dest>
            else ()
        </Article>                 
      </Parcel>
    </DispatchInfo>Output :
    <DispatchInfo>
      <Parcel>
        <Amount>20</Amount>
        <Article>
          <Num>ART001</Num>
          <Dt>2012-01-20</Dt>
          <Dest>Location1</Dest>
        </Article>
        <Article>
          <Num>ART002</Num>
          <Dt>2012-01-21</Dt>
          <Dest>Location2</Dest>
        </Article>
      </Parcel>
      <Parcel>
        <Weight>5 kg</Weight>
        <Article>
          <Num>ART003</Num>
          <Dt>2012-01-20</Dt>
          <Dest>Location3</Dest>
        </Article>
        <Article>
          <Num>ART004</Num>
          <Dt>2012-01-21</Dt>
          <Dest>Location4</Dest>
        </Article>
        <Article>
          <Num>ART005</Num>
          <Dt>2012-01-22</Dt>
        </Article>
      </Parcel>
    </DispatchInfo>

  • Multiplication Table with Two Nested For Loops

    I am trying to code a multiplication table in which the user enters the number of rows between 2 and 10 and enters the number of columns from 2 to 10. This must be in nested for loop format somewhat like this:
    rows has been assigned the input variable for rows and columns is the name for input value for columns
    for (int i = 1; i <=rows; i++)
    for (int j = 1; j <=columns; j++)
    i * j
    i can't figure out how to get it to print out in table format or if the calculation coding is correct. can anyone help me please?
    it should look like this for rows is 4 and columns is 7
    1 2 3 4 5 6 7
    2 4 6 8 10 12 14
    3 6 9 12 15 18 21
    4 8 12 16 20 24 28
    Edited by: hatecodingsomuch on Feb 22, 2009 8:15 PM

    hatecodingsomuch wrote:
    I refuse to ask for help from people who are acting like they are all-knowing and unwilling to help someone, considering I am asking for help...to learn. Obviously I am not understanding java very well and I don't need to be ridiculed like this from members who are supposed to help "NEW TO JAVA" individuals. Get off your high horse or get off the website. I will never use this again.Good luck with that.
    You do seem to be yet another "do my homework for me" type of flunkie. I predict you'll soon have an epiphany that software development really isn't for you.
    I hope you know how to say "Do you want fries with that, sir?" better than the next guy so you can edge him out.

Maybe you are looking for

  • Can I embed Arabic text in flash?

    1. If so, how can I do this? When I cut and paste an arabic text from a notepad or photoshop, all the characters comes out wrong. 2. I believe I can use an external txt or xml file instead. But if I do this, would the user be able to get the right ch

  • Multiple cursors and xmlforest

    This is my first time working with XML in PLSQL. I'm trying to parse values from a plsql procedure into a Word document using XML. My procedure looks something like: CREATE OR REPLACE PROCEDURE GET_XML_FA (PP_ID IN VARCHAR2, PP_PERIOD IN VARCHAR2 IS

  • No speaker sound with itunes and media

    The speakers on iphone 4S work fine for all activities with the exception of itunes and video. Speaker phone works; notification works; ringer works. Everything works fine with the earplugs and bluetooth and volume can be adjusted. Speaker works just

  • No OS Found on HP Pavilion dv9700 issue....

    Hello, I'm having an issue...but first here are the specs: HP Pavilion dv9700 (2008) Vista OS Error: No OS Found No changes, has been having trouble for a few months, have done a recovery twice, it gets hot, which I understand is an issue with this m

  • Unsupported Image Format Error- Damaged files???

    I have been working a series of pictures (all .jpg) and doing some editing. Pictures were fine. I went back in today and a fair number of pictures are now indicating unsupported image format and just show red. I can see the image in the thumbnail and