Divide the class into several classes (simple fix I think)

Here's the class, images and library for blueJ in a .rar file:
http://www.mediafire.com/file/467dunvcmtfd67f/Ucigame_pong.rar

If you don't use blueJ or want just the code, it's just a class:
import ucigame.*;

public class Pong extends Ucigame
{
    Sprite ball;
    Sprite paddle;

    public void setup()
    {
        window.size(250, 250);
        window.title("Pong");
        framerate(30);


        Image bkg = getImage("images/background.png");
        canvas.background(bkg);

        ball = makeSprite(getImage("images/ball.gif", 255, 0, 0));
        paddle = makeSprite(getImage("images/paddle.png"));

        ball.position(canvas.width()/2 - ball.width()/2,
                      canvas.height()/2 - ball.height()/2);
        ball.motion(6, 3);
        paddle.position(canvas.width() - paddle.width() - 10,
                       (canvas.height() - paddle.height()) / 2);
    }

    public void draw()
    {
        canvas.clear();

        ball.move();
        ball.bounceIfCollidesWith(paddle);
        ball.bounceIfCollidesWith(TOPEDGE, BOTTOMEDGE, LEFTEDGE, RIGHTEDGE);
        paddle.stopIfCollidesWith(TOPEDGE, BOTTOMEDGE, LEFTEDGE, RIGHTEDGE);

        paddle.draw();
        ball.draw();
    }

    public void onKeyPress()
    {
        // Arrow keys and WASD keys move the paddle
        if (keyboard.isDown(keyboard.UP, keyboard.W))
            paddle.nextY(paddle.y() - 2);
        if (keyboard.isDown(keyboard.DOWN, keyboard.S))
            paddle.nextY(paddle.y() + 2);
        if (keyboard.isDown(keyboard.LEFT, keyboard.A))
            paddle.nextX(paddle.x() - 2);
        if (keyboard.isDown(keyboard.RIGHT, keyboard.D))
            paddle.nextX(paddle.x() + 2);
    }
}
and the library: http://ucigame.org/ucigame-source.zip

All I want to do is have the Pong class call setup() and draw() onkeypress() of different classes. Or is it better that way? There is no main() or run() class the way ucigame makes the examples.

Thank you
Joey

This isn't necessarily the best solution because I don't know all the details of your project, but if you wanted to put methods in a separate class and call them from the main() in the class of Pong method, you might do the following

import ucigame.*;

public class Pong extends Ucigame
{
    public static voic main(String args[]){
        GameUtil gameUtilClass = New GameUtil();

        gameUtilClass.setup();
        gameUtilClass.draw();
        gameUtilClass.onKeyPress();

    }
}

// new class to hold methods
public class GameUtil
{
    Sprite ball;
    Sprite paddle;

    public void setup()
    {
        window.size(250, 250);
        window.title("Pong");
        framerate(30);

        Image bkg = getImage("images/background.png");
        canvas.background(bkg);

        ball = makeSprite(getImage("images/ball.gif", 255, 0, 0));
        paddle = makeSprite(getImage("images/paddle.png"));

        ball.position(canvas.width()/2 - ball.width()/2,
                      canvas.height()/2 - ball.height()/2);
        ball.motion(6, 3);
        paddle.position(canvas.width() - paddle.width() - 10,
                       (canvas.height() - paddle.height()) / 2);
    }

    public void draw()
    {
        canvas.clear();

        ball.move();
        ball.bounceIfCollidesWith(paddle);
        ball.bounceIfCollidesWith(TOPEDGE, BOTTOMEDGE, LEFTEDGE, RIGHTEDGE);
        paddle.stopIfCollidesWith(TOPEDGE, BOTTOMEDGE, LEFTEDGE, RIGHTEDGE);

        paddle.draw();
        ball.draw();
    }

    public void onKeyPress()
    {
        // Arrow keys and WASD keys move the paddle
        if (keyboard.isDown(keyboard.UP, keyboard.W))
            paddle.nextY(paddle.y() - 2);
        if (keyboard.isDown(keyboard.DOWN, keyboard.S))
            paddle.nextY(paddle.y() + 2);
        if (keyboard.isDown(keyboard.LEFT, keyboard.A))
            paddle.nextX(paddle.x() - 2);
        if (keyboard.isDown(keyboard.RIGHT, keyboard.D))
            paddle.nextX(paddle.x() + 2);
    }

}

Methods should not really have a class for each of them.

Published by: JDScoot on May 23, 2011 15:33

Tags: Java

Similar Questions

  • Divide the line into several columns

    Hi all

    I have a question where I want to divide the line into multiple columns based on the delimiter ' |'.

    Staging of Table structure: People_STG, I have people in it.

    Create table People_STG(col1 varchar2(4000));


    Insert into People_STG(Emp_id|) User name | FirstName. LastName. JobTitle | hire_date | Location_id)


    SELECT REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 1) EMP_ID,
           REGEXP_SUBSTR ( COL1, '[^|]+', 1, 2) USERNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 3) FIRSTNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 4) LASTNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 5) JOBTITLE,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 6) HIRE_DATE,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 7) LOCATION_ID
    FROM PEOPLE_STG
    WHERE length(regexp_replace(COL1, '[^|]', '')) = 14;
    

    But I am facing a problem here, as in some lines, function is null, but when I run the above query, it is not recognizing the empty element and inserting Hire_date values of function and location_id in Hire_date where function is null.

    for example: 1 | akash51 | Akaksh | C | 22/11/14 | 15

    Here the function is null, so when I run top to divide query it will insert 11/22/14 in the function column and 15 in Hire_Date.

    Please need help on this one.

    Oracle Version: 11.2 g

    Thanks in advance,

    Akash.

    There are different techniques to cope with this.  Is a simple...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select 1 | akash51 |) Akaksh | C | 22/11/14 | 15' as col1 of union double all the
    2 Select 2 | akash52 | Akaksh | C | Jobs jobs | 23/11/14 | 15' of the double
    3            )
    4  --
    5. end of test data
    6  --
    7 select trim (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 1)) EMP_ID,.
    8 toppings (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 2)) USERNAME,.
    9 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 3)) FIRSTNAME,
    10 pads (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 4)) LASTNAME,.
    11 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 5)) JOBTITLE,.
    12 pads (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 6)) HIRE_DATE,.
    13 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 7)) location_id
    14 * from (select replace (col1, ' |)) ',' | as col1 of t)
    SQL > /.

    EMP_ID USERNAME FIRSTNAME LASTNAME, JOBTITLE HIRE_DATE LOCATION_I
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
    1 akash51 Akaksh C 22/11/14 15
    2 akash52 Akaksh C Job 23/11/14 15

  • Divide the data into several lines in the table

    Hello

    I use apex of Oracle 10 g 3.2.

    I have a requirement like this.

    I have a table like TableA

    Col1 Col2
    90 1
    91 1:2:3
    92 3

    I want the data as

    Col1 Col2
    90 1
    91 1
    91 2
    91 3
    92 3

    How to do this?

    Thank you

    Published by: user13305573 on August 3, 2010 20:16
    with
       your_data as
    (
       select 90 as col1, '1'  as col2      from dual union all
       select 91, '1:2:3'   from dual union all
       select 92, '3'       from dual
    )
    select
       y.col1,
       regexp_substr(y.col2, '[^:]+', 1, t1.column_value) as col2
    from
       your_data y,
     13     table(cast(multiset(select level from dual connect by  level <= length (regexp_replace(y.col2, '[^:]+'))  + 1) as sys.OdciNumberList)) t1
     14  /
    
                  COL1 COL2
    ------------------ -----
                    90 1
                    91 1
                    91 2
                    91 3
                    92 3
    
    5 rows selected.
    
    Elapsed: 00:00:00.05
    ME_XE?select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    5 rows selected.
    
    Elapsed: 00:00:00.03
    ME_XE?
    
  • Divide a line into several points

    I see that I can use SDO_LRS. SPLIT_GEOM_SEGMENT to divide a line into one only point (and get 2 lines resulting).

    However, someone at - it an idea how can I split a line, at several points, in several segments? I need to do for the number of lines, so a function or procedure would be nice as appropriate.

    Thank you

    Published by: ronnie-m on April 22, 2013 04:43

    Sorry for pasting quick and dirty, was a minimum on time and problems with my dev env.

    Perhaps still not the best outline but hoping there more explanaition should be ok.

    Concerning

    Luke

    select l.line_id,                                                                                                                                         -- line line_id
            ROW_NUMBER() OVER (PARTITION BY l.line_id order by l.rowid )                                                                              -- optional sub id, to make submains unique in combination with line_id (guess this will be ordered
            sdo_lrs.CLIP_GEOM_SEGMENT(SDO_LRS.CONVERT_TO_LRS_GEOM(l.geometry ), branch_measure, branch_next_measure, 0.05)              -- actual clipping, needs convert to LRS apparently, start end end branch measure
            from
                   line l,                                                                                                                                            -- rejoin mainly to get the geometry again
                             (
                             select line_id,                                                                                             -- line_id
                                     branch_measure,                                                                                                              -- measure of the branches (from CASE WHEN
                                     LEAD(branch_measure, 1, 0) OVER (PARTITION BY line_id order by branch_measure) branch_next_measure   -- Analytical function LEAD will get the next branch measure form the following ordered records per line_id
                             from
                                  (
                                  select a.line_id,                                                                                                              -- line_id
                                          CASE when                                                                                                              -- CASE (assuming branch will touch only at one point) it will be either the start or the endpoint
                                                      sdo_lrs.find_offset(                                                                    -- of the branch that will TOUCH, we are checking this based on the offset which one is closest
                                                                               SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),                                   -- requires convert to LRS geom
                                                                               sdo_lrs.geom_segment_start_pt(b.geometry),                                   -- if it is neccessary to deal with multiple possibilities we might better use a temp table to evalute better
                                                                               0.05                                                                                -- TOLERANCE (all tolereance should be seen with respect to resolution of the data
                                                                               )                                                                   -- IF feasible, let spatial take care of the snapping
                                                      <
                                                      sdo_lrs.find_offset(
                                                                               SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),
                                                                               sdo_lrs.geom_segment_end_pt(b.geometry),
                                                                               0.05
                                                                               )
                                            THEN
                                                 sdo_lrs.find_measure(
                                                                           SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),
                                                                           sdo_lrs.geom_segment_start_pt(b.geometry),
                                                                           0.05
                                                                           )
                                            ELSE sdo_lrs.find_measure(
                                                                            SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),
                                                                            sdo_lrs.geom_segment_end_pt(b.geometry),
                                                                            0.05)
                                              END branch_measure
                                  from line a, line b                                                                                                      -- self join using main and branch that touches
                                       WHERE sdo_relate(b.geometry, a.geometry, 'mask=TOUCH') = 'TRUE'                                     -- Should be replaceable with sdo_join + self join optimsation
                                       AND a.line_type = 'main'
                                       AND b.line_type = 'branch'
                                  union all                                                                                                                        -- union all to get the 0 measure (startpoint) in the subquery as the beginning of the first clipping segment
                                       select line_id, 0 as branch_measure
                                       from line
                                  union all                                                                                                                         -- union all to get the last measure (endpoint) in the subquery as the beginning of the first clipping segment
                                       select line_id,
                                                 sdo_geom.sdo_length(geometry, 0.05) as branch_measure                                                  -- maybe better to use actual get measure form lrs endpoint but is the same if no spaecial measure are used
                                       from line
                                  )
                             ) b
                             where
                             branch_measure < branch_next_measure                                                                                          -- avoid duplicates (2 branches at same location on main (but also the last + 1 segment with last measure and default value 0 from LEAD
                             and
                             l.line_id = b.line_id                                                                                                              -- join on line-id to reuse the geom (or potential other attributes from original lines
                             ;
    
  • TB has worked fine until yesterday when I needed to send a message to more than 100. I divided the AddressBook into pieces and sent about 50 when TT502 came.

    I use TB 31.7.0, PC Windows 7. Had no problems until now. I divided the 100 addresses in groups of about 20 and sent to 3 groups. The 4th was wrong and I got the message: "too many recipients, TT502. I cut down the number of addresses, but the problem persists. I can't send all messages now, even to a single recipient. So I have a problem that does not reset when tuberculosis is turned off and restarted. Incoming is fine but I can't answer. Any ideas?

    Looks like you reach the limit of the sending of your provider. Of course sending for 1 person isn't too unless your provider has a hourly or daily limit and cut you.
    Given that the error has an associated server code the error came from your server vendors. Thunderbird would have nothing to do with it.

  • Divide the string into rows according to the space

    I'm using Oracle 11.2.0.3.  I need a faster way to divide the organization names based on space as possible just using SQL.

    with org as

    (

    Select 1 org_pk, org_nm 'ALL american, INC.' of any double union

    Select org_pk 2, org_nm "COMPANY A.G" Union double all the

    Select org_pk 3, org_nm "GROWTH FUND SPONSORS and SONS, Inc." of the double

    )

    Select * org;

    Result, I need is

    1. ALL THE

    1 american

    1, INC.

    2 A.G

    2 COMPANY

    3. THE GROWTH

    3 FUND

    3 SPONSORS

    3 and

    3 WIRES,

    3 INC.

    Thank you very much.

    You can use GROUP BY with LISTAGG or XMLAGG. And ordinalite allows to preserve order:

    with org as)

    Select 1 org_pk, org_nm 'ALL american, INC.' of any double union

    Select 2 org_pk, 'A.G COMPANY' org_nm of all the double union

    Select org_pk 3, org_nm "GROWTH FUND SPONSORS and SONS, Inc." of the double

    )

    Select org_pk,

    x.org_nm,

    x.o

    org,.

    XMLTable)

    "ora: tokenize(.,"").

    by the way ' ' | org_nm

    columns

    path of varchar2 (4000) to org_nm '.'.

    o for the ordinalite

    ) x

    where x.org_nm is not null

    /

    ORG_PK ORG_NM O
    ---------- ------------------------------ ----------
    1 ALL                                     2
    1 American 3
    1 ,INC                                    5
    2 A.G                                     2
    2 COMPANY 4
    3 GROWTH                                  2
    3 FUND                                    3
    3 4 SPONSORS
    3 and                                     5
    3 SONS,                                   6
    3 INC.                                    7

    11 selected lines.

    SQL >

    However, I would like to use SUBSTR/INSTR plain + CONNECT BY if the volumes are large or performance is important.

    SY.

  • How to divide the screen into two parts in order to see the two different parts of the same file? [Suggestion] [Android]

    I am Brazilian and I use Adobe Acrobat Reader DC a lot. I would suggest an implementation of features present in the PC, I missed a lot of things on Android, which is 'New window' or something like that, like split the screen into two parts in order to see the two different parts of the same file.

    For smartphones, its use is restricted, but for tablets, it can be really useful, because it allows the display of two distinct points of the same file,

    I have reduced considerably the use of paper using this application, however, I need to navigate the file always pick up a few points seen earlier, which causes a lot of discomfort compared to printed documents.

    This is a suggestion, but I would like it to be considered.

    Thank you for your request. We have taken note of the same and must try to integrate it into one of our future releases.

    Thank you.

  • How to divide the form into 2

    I created an interactive report and a form. By clicking on the button Edit in the report, taking me in a form with all the details of that particular line. Now I want to divide the elements in 2 forms, edit details, and update them at the same time. Pointers or suggestions is appreciated

    Published by: user739459 on August 17, 2011 12:59

    If you want to split because of the logical separation between the elements, you can create a new region and move some items to that. If you want to keep certain items on a single page and some on the other hand, you can copy the page and remove the items is not necessary two pages (except primary key point). Now, create a button on the first page to open the second page, passing the primary key and do the same on page two.

    Lavenu
    MaxApex accommodation
    http://www.maxapex.com

  • dividing the dataset into regions using sdo_relate

    Hi all

    I have difficulties subdivision my dataset in different regions. I have the data space of the city of auckland and found the coordinates of the lower left and limited right of data. What I want to do now is to break this dataset into 9 individual regions and assign a code to each region. I tried to use subsequently issue with not much luck...

    Select a.link_id in the nz_testlinks_auck where mdsys.sdo_relate (a.GEOM,
    MDSYS. SDO_GEOMETRY (2003, null, null, mdsys.) SDO_ELEM_INFO_ARRAY (1,1003,3),
    MDSYS. SDO_ORDINATE_ARRAY(174.7083,-37.0141,174.7910,-36.9544)), "mask = ANYINTERACT querytype = FENΩTRE") = "TRUE";

    When I put the output into a table data and display the data, I notice that the rectangle has chosen a lot more data than what was actually defined in the query. I have been using the model of network data and MapBuilder Editor to check the data and contact information.

    And when I try to create another rectangle for another region next to each other like that...

    Select a.link_id in the nz_testlinks_auck where mdsys.sdo_relate (a.GEOM,
    MDSYS. SDO_GEOMETRY (2003, null, null, mdsys.) SDO_ELEM_INFO_ARRAY (1,1003,3),
    MDSYS. SDO_ORDINATE_ARRAY(174.7910,-37.0141,174.8736,-36.9544)), "mask = ANYINTERACT querytype = FENΩTRE") = "TRUE";

    He again selects a rectangle more great selection of half of the data of the previous selection rectangle as well.

    Please help me solve this problem.

    Look forward to your responses.

    Avinash

    Avinash,

    Do you have geometries that cross your limit of rectangle, as a long line, or a large polygon? What rectangle you plan such a line or polygon to appear in?

    Or would you say that the geometries that are completely disjoint from your rectangle are chosen? If you think that this is the case, try the sdo_geom.relate with the mask "determine" in order to verify the relationship between your rectangle and one of the unexpected geometries.
    http://download.Oracle.com/docs/HTML/B14255_01/sdo_objgeom.htm#BGHCDIDG

    If you want to be sure that nothing is selected twice by your rectangles the ANYINTERACT mask is probably not a good choice. A = INSIDE + DOMMAGESCAUSDSPAR mask mask will be better, but you still have to decide what to do with stuff that crosses.

    Matt

  • Simple question: how to divide the string into multiple lines concatenated?

    Hi people,

    Maybe it's an easy question.

    How to split a string that is concatenated into multiple lines by using the SQL query?

    ENTRY:
    select 'AAA,BBB,CC,DDDD' as data from dual
    Delimiter = ', '.

    Expected results:
    data
    ------------
    AAA
    BBB
    CCC
    DDDD
    I'm looking for something nice to feature "an opposite to «sys_connect_by_path»»

    Thank you
    Tomas
    with t as (select 'aaaa,,bbbb,cccc,dddd,eeee,ffff' as txt from dual)
    -- end of sample data
    select REGEXP_SUBSTR (txt, '[^,]+', 1, level)
    from t
    connect by level <= length(regexp_replace(txt,'[^,]*'))+1
    
    REGEXP_SUBSTR(TXT,'[^,]+',1,LE
    ------------------------------
    aaaa
    bbbb
    cccc
    dddd
    eeee
    ffff
    
  • How to divide a line into several posts based on the period.

    Hello

    I have data from the table like this:

    Project EMP_ID Date_Assignment Date_Expiry EMP_TYP

    P001 1000 1 JUNE 2015 30 JUNE 2015 D

    P001 1001 1 JULY 2015 31 JULY 2015 D

    1002 1 AUGUST 2015 31 AUGUST P001 2015 D

    P001 2000 01 - JUN - 2015 31-DEC-9999 M

    The report of three developers to the Manager during their own lifetime. I want the corresponding duration of Manager for each of them:

    Project EMP_ID Date_Assignment Date_Expiry EMP_TYP

    P001 1000 1 JUNE 2015 30 JUNE 2015 D

    P001 1001 1 JULY 2015 31 JULY 2015 D

    1002 1 AUGUST 2015 31 AUGUST P001 2015 D

    P001 2000 1 June 2015 M June 30, 2015

    P001 2000 July 1, 2015 M July 31, 2015

    P001 2000 31 August 1, 2015-AUG - 2015 M

    P001 2000 M 01-SEP-2015 31-DEC-9999

    For the last span (01-SEPT.-15 to 31 - DEC-9999) there is no developer reporting to the Manager.

    How in Oracle 11 g?

    Post edited by: 2808486

    The date ranges developers will never overlap? If so, what would happen?

    Your desired results can be achieved like this, but I don't think it makes a lot of sense:

    SELECT emp_id, date_assignment, date_expiry, emp_typ

    WCP

    WHERE emp_typ = '

    UNION ALL

    SELECT em.emp_id, ed.date_assignment, ed.date_expiry, em.emp_typ

    Ed, em emp EMP

    WHERE ed.emp_typ = '

    AND em.emp_typ = am'

    UNION ALL

    SELECT em.emp_id, MAX (ed.date_expiry) + 1, TO_DATE (31-DEC-9999 ',' mon-dd-yyyy ""), em.emp_typ

    EMP ed, emd em

    WHERE ed.emp_typ = '

    AND em.emp_typ = am'

    GROUP BY em.emp_id

    ORDER BY 4.2

  • Divide a line into several lines based on the amount

    Dear all,

    Please provide a solution for this scenario.

    The query...

    Select line_id, component, sizes, quantity of sales_tab;

    and the result...

    LINE_IDCOMPONENTSIZESQUANTITY
    8BODYSMALL214.33
    4BODYMEDIUM187.89
    1BODYLARGE230.87
    7BODYEXTRA LARGE205.03
    3BODYXX LARGE148,52
    2SLEEVESMALL197.57
    6SLEEVEMEDIUM176.4
    5SLEEVELARGE193.8
    10SLEEVEEXTRA LARGE184.87
    9SLEEVEXX LARGE138.53

    Business rule: for all rows where the quantity is greater than 200, generate a new identical line with quantity = quantity - 200 like - we. This is the quantity of each line must not exceed 200.

    The required result is...

    LINE_IDCOMPONENTSIZESQUANTITY
    8BODYSMALL200
    8BODYSMALL14.33
    4BODYMEDIUM187.89
    1BODYLARGE200
    1BODYLARGE30,87
    7BODYEXTRA LARGE200
    7BODYEXTRA LARGE5.03
    3BODYXX LARGE148,52
    2SLEEVESMALL197.57
    6SLEEVEMEDIUM176.4
    5SLEEVELARGE193.8
    10SLEEVEEXTRA LARGE184.87
    9SLEEVEXX LARGE138.53

    Thank you

    Usman

    Use:

    Select line_id,

    component,

    sizes,

    amount of column_value

    of sales_tab.

    table)

    cast)

    MultiSet)

    Select less (200, - 200 quantity * (level - 1))

    of the double

    connect in quantity > 200 * (level - 1)

    )

    as sys. OdciNumberList

    )

    )

    order of line_id,

    amount desc

    /

    For example:

    SQL > with sales_tab like)
    2 Select line_id 8, component 'Body', 'SMALL' amount 214.33 of all sizes the double union
    3. Select 4, 'BODY', 'WAY', 187.89 double Union all
    4 Select 1, 'BODY', 'LARGE', 230.87 double Union all
    5. Select 7, 'BODY', 'EXTRA LARGE', 205.03 double Union all
    6 select 3, 'BODY', 'XX-LARGE', 148,52 of double union all
    7. Select 2, 'CHANNEL', 'SMALL', 197.57 double Union all
    8. Select 6, 'CHANNEL', 'WAY', 176.4 from dual union all
    9. Select 5, 'ROUND', 'BIG', 193.8 double Union all
    10. Select 10, 'ROUND', 'EXTRA LARGE', 184.87 double Union all
    11. Select 9, 'ROUND', 'XX-LARGE', double 138.53
    12                  )
    13. Select line_id,
    14 components,
    15 sizes,
    amount of 16 column_value
    sales_tab 17,
    Table 18)
    19 mount)
    (20) type multiset
    21 select less (200, - 200 quantity * (level - 1))
    22 double
    23 connect quantity > 200 * (level - 1)
    24                            )
    25 as sys. OdciNumberList
    26                    )
    27              )
    28 order of line_id,
    29 quantity desc
    30.

    LINE_ID COMPON QUANTITY SIZES
    ---------- ------ ----------- ----------
    1 BODY 200 GRAND
    1 BODY GRAND 30,87
    2 SLEEVES SMALL 197.57
    3 BODY XX LARGE 148,52
    4 WAY 187.89 BODY
    5 SLEEVES 193.8 GRAND
    SLEEVE 6 MEANS 176.4
    7 BODY 200 EXTRA-LARGE
    7 BODYWORK 5.03 EXTRA-LARGE
    8 200 SMALL BODY
    8 BODY SMALL 14.33

    LINE_ID COMPON QUANTITY SIZES
    ---------- ------ ----------- ----------
    CHANNEL 9 XX GRAND 138.53
    10 SLEEVES EXTRA-LARGE 184.87

    13 selected lines.

    SQL >

    SY.

  • Serialize the data into several messages from serial port

    Hello

    My current LabVIEW project, I want to read data from the serial port and store the (transformed) response in a file.

    Since my design model is based arround the Manager of messages queued waiting my serial communication is also build around that. (see this post for my original question).

    But now I have the following problem:

    In the loop 1 I put several messages in the queue of loop 2.

    Loop 2 processes these messages and sends them to the print queue of loop 1.

    Loop 1 gets several messages that need to be combined into 1 string and (with other data) in a file.

    Just to clarify:

    Loop 1, I have send 3 messages for each connected device. Even though I have a separate file for each device, the response to the messages must be in 1 result string.

    (Note on the picture: there are other loops running at the same time you will also need to access the serial port for the port for loop 1 is not an option)

    Hope you can help.

    A next attempt to download the code

    The attached Code is provided as is. It has not been tested or validated as a product for use in a deployed application or system, or for use in dangerous environments. You assume all risk for use of the Code and the use of the Code is subject to the license terms of Sample Code which can be found at: http://ni.com/samplecodelicense

  • Difficulty to use indexing to divide the data into five sets of data

    Hello

    I'm using labview to program a mass spectrometer.  I want to conduct surveillance of the multiple ion where I watch the level of five different masses over time.  The five different masses correspond to five of the tensions that are sent via the DAC to my instrument.  After sending each voltage, a voltage was then read AIN.  The help of indexation and a for loop, I can send fill this function.

    My problem is to be able to plot these data.  I need a field of tension AIN (y) and the time (x) for five tension (mass) and plots to display on a single diagram.  I don't know how to correlate data from indexing to separate into five different mass and then repeat the experience by adding data to each mass using all loop.  When I tried I just get data tracing as a straight line as a set of data when I need five sets of data.

    I enclose my vi.  Any help would be great.

    Your VI base design is incorrect:

    • There is no reason for you to have 2 while loops. One is suffient.
    • You should not open the interface in each iteration of the loop. Open outside, do your work and then close when you are finished loop.

    Regarding the map, get rid of the inner loop and eliminate this Build table you have outside the loop for. In order to have a graphic draw several lines, you have need of a 2D array. Because you use a loop for to acquire a reading at the same time, you'll need create a 2D out of the loop for. To do this, put a table to build inside the loop, then a function of 2D matrix transposes outdoors. See the attached example.

  • divide the rectangle into pieces with an inner glow

    I have a rounded rectangle that I need to divide it into 3 parts (upper, middle, lower) while applying an inner glow effect to THE ORIGINAL shape. Anyway I tried this the inner glow is applied to all parties to all parties, including the internal limits of the parties.

    Any ideas?

    1. Draw the rounded rectangle.
    2. Divide at the appropriate places.
    3. Close the top resulting and substantive way.
    4. Join the two as a result of the railways; then close them.
    5. Apply a white fill all three.
    6. Apply the line wished to all three.
    7. Select all three. Group them.
    8. Apply the inner glow effect to the selected group.

    JET

Maybe you are looking for

  • Hide the Navigation bar in userChrome.css

    I have problems to hide the Navigation bar in userChrome.css. I'm trying to achieve the same as menu click View-> toolbars-> [disable] Navigation toolbar. If I add #navigator-toolbox { display: none } to userChrome.css then everything disappears, inc

  • Slot bridge Middle 5-in-1 M70

    Hello I bought the Denmark M70 - 144. Then I formatted the hard drive and reinstalled the Chinese version of Windows XP. But when I insert an SD card into the slot average of bridge 5-in-1, there is no answer. Maybe I do not install the driver of thi

  • Cisco DPC3008 replaced by Linksys CM3008?

    I have a Linksys CM3008 DICSIS 3.0 cable modem. I understand he superceeds the Cisco/Linksys DPC3008. It sets up quickly with my Comcast/Xfinity account.  Appearently, it is already recognized by Comcast.  The technology took my Linksys CM3008 serial

  • Windows 8 and photo creations

    I just got a new computer HP with Windows 8. My last computer was XP. The CD with my new 8600 pro + included printer HP Photo Creations, I like. Now, it downloads on my computer Windows 8, and specifications for the program indicate to the amount of

  • Question of BES

    Hi I created a project with the name of the project as "my project" and in the BlackBerry_App_Descriptor.xml file, I gave the title as 'My Project', in alx file, we can see below request identification label. My project 1.0.0 .... And deployment made