Need Help: Query Designer

Hi experts,
In Query designer, is it possible to create an IF statement for "IRRATIONAL NUMBERS"?
Lets say 10.03, 1.26, 3.1 and so on...
The statement would be as follow:
If Val1==N.x then 0 else Val1.
To summary, if the value is N.x (N for rational numbers 1,2,3,... and .x for decimal values like .23, .44, .01 and so on...),
then the value N.x will be changed or converted into "0".
Example: If the value of FieldA on the report is 10.3, it then should be converted into Zero "0".
another is if value is 1.03, then the report should show 0 instead of 1.03
I arrived to a solution wherein I have to create three logic expression.
First is to convert first the Irrational Number into Zero "0".
Second is to create new selection in KF wherein it will pull the data containing the converted "N.x to Zero".
And third is to create the IF statement logic that will satisfy my expected value.
I'm having this problem on the first one as I have no idea how to convert irrational number into zero "0" value.
the second and the last part would be fine as my main problem here is how can I convert the irrational number in to zero?
Any suggestions?

Hi,
Please try the below.. Hope this will solve your issue
Eg. of data
Dist. Channel  -
Value
Dom1----100.5
exp1----200.4
dom2---50
exp2---75
Expected out put
Dist. Channel  -
Value
Dom1----0
exp1----0
dom2---50
exp2---75
Steps1
Drag and drop Dist.Channel in row and value in colum
create a formula1 using ur kf value 
      CEIL(value)    --- which will provide us integior part with out decimal
Steps2
create another fomula2
using boolean operator compare the value
(formula2==value)*value
this formula compare our two values and will produce a boolean value ie 1 or 0
    :  Eg 100.5  ceil(100.5) = 100  Now in our formula1 we are comparing these two values are equal or not ie 100.5 - 100 so out come will be 0 then 0100.5 = 0 always if our condition is true then 1100 = 100
Related Links :
Boolean Operator
http://help.sap.com/saphelp_nw04/helpdata/EN/71/0aec3b6e011341e10000000a114084/frameset.htm
Thanks
BVR

Similar Messages

  • Need help in design/framework of a project requirements

    Hi there.
    I need some input/design suggestion and/or comments regarding 2 projects that I'm undertaking currently. The project duration is 8 weeks starting now.
    Some background information of the current technology we are using right now. We are using weblogic 7.0 SP2 and our database is ms sqlserver 2000 and/or mysql. The persistance layer/framework we are using is a home grown JDBC framework. We are using only stateless session beans and our client which is a swing ui access the servers side thru webservices via a session facade. We use also Transfer objects on the client and our own DataObjects on the server side. Current consideration is that we can not upgrade to the current weblogic version at this time and can only use java 1.4 and use existing persistence framework we have. I've considered using Spring/Hibernate but it will involve major refactoring on our existing system, which we can not afford right now. But we can augment or add new framework to handle this 2 projects.
    1. The first project is a mass update/creation of orders and order items. In our system the update and creation of order and order items are complicated and perform several validations (e.g. vendor/client is valid; item are valid and have enough to on-hand, etc.) and lookups before we can create/update an order and it's order items. We estimated that process to be around 1.5 - 3.0 secs and typically we will be processing between a few hundreds to about 5000. The max ceiling we put is 10,000.
    Now the requirements are:
    a. Ensure that the process will be completed and in the event of failure (physical or network or power) and recovery to start where it failed and start processing from that point of failure.
    b. The transaction should be atomic on per order basis and not on whole process - meaning we will commit all changes for an order and start a new transaction on the next order. This will ensure that we have a complete order committed.
    c. Don't tie the client from this process and when the process is finished give a feedback to the client who invoke the process.
    2. The second project is related to the first, is that before they post the process above, the user will look at the set of data and do some editing and then post the data. So this project is on the UI side and would present the user a table/grid view of the data and since data set could be large, we want our swing ui to fetch only a set of rows/data so that it does not take so long to load all the data or run out of memory. A button or by the user scrolling on the scrollbar would fetch the next succeeding rows/data. The problem we have as stated on the first paragraph is these- we are using webservices and stateless session beans and there is no way that the server can recognized who the user is when that user request the next set of row/data set without querying the database again.
    So your input and help is very much appreciated and if you know an existing framework that would help me is most welcome.
    Have a blessed day.
    Jun Victorio

    Take the statistics of the tables and check again.
    begin
    DBMS_STATS.gather_table_stats(ownname=>'syslog',tabname=>'logs');
    end;
    Regards
    Asif Kabir

  • New here and need help with design

    Hello all, I am working on my son's first birthday thank you cards.  I need help removing the line in between the blue and green background.  Thanks. Stacey

    You also have a narrow black line on the lower left side.
    Increase the the magnification to 500% and select the black and the white lines with the Magic Wand (Continuous checked).  Feather by one pixel.  Sample the green right under the white line, make it the Foreground Color and fill the selection with it.
    Juergen

  • Help needed in Query design

    Hello Query experts,
    I have the following data in my DSO.
    Char1      date                      Kf1     KF2
    a           01.01.2011              10       20
    a           03.01.2011              50       70
    a           05.01.2011                5       10
    b           02.01.2011              20        25
    b           05.01.2011              10        15
    b           06.01.2011               5         15
    Now, I need to design a query to produce the following result:
    Char1      date                      Kf1     KF2     KF3(KF2-KF1)        KF4
    a           01.01.2011              10       20             10                     10
    a           03.01.2011              50       70             20                     30 [KF3+Prev(KF4)]
    a           05.01.2011                5       10              5                      35
    b           02.01.2011              20       25              5                       5
    b           05.01.2011              10       15              5                      10
    b           06.01.2011               5        15             10                     20
    Can anybody help me achieve this through a BI Query?
    Thanks and regards,
    Jashua

    HI,
    I think kf3 can easily be created at query level itself without writing complex logic..As far as i understand your requirement kf3 is a differnce of kf2 and kf1.
    so jst make local formula and in that put kf2-kf1.it will give you the desired output for kf3.
    Kf4 i need to think,i will update you soon

  • Need help about designing a query.

    Dear All,
    I have the following table structure
    Fields: issue_id, event_id, event_date
    One or more events are related to each issue and each event is associated with a date.
    There is a huge data in the table and I want to access the last event date of each date.
    The resultant table/view should have following fields:
    issue_id, last_event_date
    Is this possible using a single/multiple queries or I have to do PL/SQL coding?
    Please help.
    -Sameer

    If you are looking for last event date of an issue then a simple group by query should do it.
    SELECT issue_id,max(event_date) last_event_date
    FROM my_table
    GROUP BY issue_id

  • Need help with designing form for exports

    Hi
    I am pretty new to designing form in adobe acrobat.
    I have adobe acrobat 9 standard with Adobe liveCycle Designer installed.
    There are couple of things I want to do.
    1.
    I would like to add a box where I can change the number (default is 1), and when I increase it, (for instance to two)
    then
    it will postulate the particular sections twice.
    For instance, I am taking two drugs right now, then I would like to increase the number of drugs to 2, so then for each drug
    I would enter appropriate information such as drug name, drug form, route of drug administration etcs
    I hope this is clear
    2.
    I am trying to export this in xml format so that only the ones where the user fills in in pdf form gets exported to xml format.
    I would like the boxes to have its own tag, for instance the drug name mentioned above can have a tag of <drugname></drugname>
    I know this is possible through changing the box's name in binding tab.
    What I am interested in is to add a tag for the section, like a header.
    For example, if I were to enter two drug information I want the first drug information to be exported to be
    <drug>
    <drugname>blah</drugname><drugform>1</drugform><drugroute>oral</drugroute>
    </drug>
    <drug>
    <drugname>drug2</drugname><drugform>1</drugform>
    <drugroute>ophthalmic</drugroute>
    </drug>
    how would I add <drug> </drug> for each drug?
    also, can I change the order of the tags??
    in the pdf form, if the drugname box is displayed later than drugroute box, then when I export it, it will display as
    <drugroute>oral</drugroute><drugname>blah</drugname>
    but I want to manually set the order of tags when exported.
    Sorry I asked so many questions
    I hope it is clear enough for you to visualize what I am trying to do
    Thank you so much

    1. You can certainly add sections for the number of drugs that the user specifies pr
    ovided that the form is set up the correct way to begin with. The drug information section must be wrapped in a subform (usually Poistioned) and that in turn must be wrapped in a flowed subform. Then the form must be saved as dynamic. If this information is all that is on the form then that shoudl be all you need to do. If th edrug section is in the middle of the form then you need to wrap the other parts of the form in a subform so they can be pushed down when we add the drug subforms. It can get confusing ...seeing the form amnd its structure would help to clarify.
    2. You canbnot change the names of tags on the fly but you can change their values. AS mentioned above, when you wrap the Drug information in a subform that subform name can be used as a tag in the XML. Then you could have a node with the tag (or an attribute) that names the drug in question. Something like this:
    <Drug Section>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug Subform>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug>
    </Drug Section>
    As mentioned earlier this is always easier to explain when you see it in context of your form.....if you want to send it to me at [email protected] I can get you started at least. Please include a description of your issue in the email
    Paul

  • Building a house... need help on design!

    Hi! I'm kind of new to Java3D, and I'm sure someone asked this in this forum alread,y but...what the heck.
    I have a project in school where we need to make a model of a house, and allow the user to navigate through it. I know that I'll be using KeyNavigator here; I got that part already. But I AM having trouble with the whole designing part altogether. The house I'm making is rather detailed (as in I have to include the chairs, tables, bookshelves, posters, etc.). Some of the items need to be clickable, as well.
    I already made walls, and I can navigate through the room, but now that I'm putting textures in (and textures in almost each wall need to be different), I'm having trouble! And don't know how to make irregularly-shaped things... Can anyone help me? Like, can someone show me code of even a small room, with (preferably clickable) objects lying around and each wall having posters and stuff on them? Or even programs that can help me? I'm using JCreator now, which, of course, everyone knows, is originally for plain ol' Java.
    Oh, and I have no idea how to keep the user from going through walls...
    I need to finish this by mid-February, and I'm about ready to tear my hair out. I've got tutorials here...but I'm stuck. Maybe I just didn't explore the API enough, but...ARGH. I'm still stuck.
    If you can help me (or even point me to a tutorial that can quickly help me) I will love you forever. Thanks!

    http://dmoz.org/Computers/Software/Graphics/3D/Models/
    might be a good resource
    http://escience.anu.edu.au/lecture/cg/TextureJ3D/printNotes.en.html
    is a tute on texturing
    http://java3d.j3d.org/implementation/collision.html
    are tutes on collisions
    here is code to make a textured plane, you pass the path to the texture in the constructor.
    *      @(#)TexturedPlane.java 1.0 99/08/02 16:06:00
    * Copyright (c) 1996-1999 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
       A class to create a simple textured plane.
    import com.sun.j3d.utils.image.TextureLoader;
    import NewTextureLoader;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    * TexturedPlane creates a single plane with texture mapping.
      public class TexturedPlane extends Shape3D {
        TexturedPlane(String filename) {
            if (NewTextureLoader.getImageObserver() == null)
                System.out.println("call NewTextureLoader.setImageObserver()");
            this.setGeometry(createGeometry());
            if(filename != "")
                    this.setAppearance(createAppearance(filename));
        Geometry createGeometry(){
            QuadArray plane = new QuadArray(4, GeometryArray.COORDINATES
                                               | GeometryArray.TEXTURE_COORDINATE_2
            Point3f p = new Point3f(-1.0f,  1.0f,  0.0f);
            plane.setCoordinate(0, p);
            p.set(-1.0f, -1.0f,  0.0f);
            plane.setCoordinate(1, p);
            p.set(1.0f, -1.0f,  0.0f);
            plane.setCoordinate(2, p);
            p.set(1.0f,  1.0f,  0.0f);
            plane.setCoordinate(3, p);
            Point2f q = new Point2f( 0.0f,  1.0f);
            plane.setTextureCoordinate(0, q);
            q.set(0.0f, 0.0f);
            plane.setTextureCoordinate(1, q);
            q.set(1.0f, 0.0f);
            plane.setTextureCoordinate(2, q);
            q.set(1.0f, 1.0f);
            plane.setTextureCoordinate(3, q);
            return plane;
        Appearance createAppearance(String filename) {
            Appearance appear = new Appearance();
            System.out.println("TexturedPlane attempt to load file: "+filename);
            TextureLoader loader = new NewTextureLoader(filename);
            ImageComponent2D image = loader.getImage();
            if(image == null) {
                    System.out.println("load failed for texture: "+filename);
            System.out.println("Image width  = " + image.getWidth());
            System.out.println("Image height = " + image.getHeight());
            // can't use parameterless constuctor
            Texture2D texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,
                                              image.getWidth(), image.getHeight());
            texture.setImage(0, image);
            texture.setEnable(true);
            texture.setMagFilter(Texture.NICEST);
            appear.setTexture(texture);
            appear.setTransparencyAttributes(
               new TransparencyAttributes(TransparencyAttributes.FASTEST, 0.1f));
            return appear;
      } // end of TexturedPlane classregards

  • Need help in designing a shopping cart mall

    Hi guys,
    Can any one help out me in designing the shopping cart mall in servlets, jsp and oracle database. If so reply to me at this id "[email protected]"
    Thanks and Regards
    Madhu Kiran
    9866764834

    MadhuKiran wrote:
    Hi guys,
    Can any one help out me in designing the shopping cart mall in servlets, jsp and oracle database. Nope. And nobody wants to. That's because a few million have already been designed and you're likely not going to improve upon existing shopping cart technology.
    If so reply to me at this id "[email protected]"
    I hope you're prepared for lots and lots of spam!
    Thanks and Regards
    Madhu Kiran
    9866764834Is that your phone number? OMG did you really just post your phone number?! If so, I think that's a first.

  • Need help in designing an  ATM simulation in java

    Hi,
    I've got to design a simulation of an ATM in java(client/server) and if anyone can help me with some coding, it would be nice :)
    I've got to design the interface on the client side and connect it to a database on a remote server. Any codings of an ATM program will be of great help to me. so please give me a little help.. I'm really stuck and it's the first time I'm doing programming in Java.
    Regards
    Roubin.

    go to google.com and type in "ATM simulation in java." There are a number of example of this type of project.

  • Need help in designing VLANS for 20 dept

    I have 1000 nodes for which i am planning a Campus wide network , with 1 Layer three switch, some 15 L2 switches . I have some 20 different departments and need different ip schemes for all of them. I need this with security enabled so that the departments resources are safe. Please do suggest me how can i go for it . . .
    Do suggest what IP scheme i can allot , if one dept is having 60 users and another is having 490 users .
    Thanks in Advance,
    Max

    Hello Sai Krishna,
    first of all you need a classless routing protocol like RIPV2, EIGRP or OSPF so that you can use different subnet masks as needed without wasting ip addresses.
    Then you need to create an address plan that fits all your needs and leave space to grow.
    Likely you will be using private ip addresses as described in RFC 1918.
    For example you can use:
    172.20.0.0/20
    first you divide this space in /23 subnets that are good to host 490 users
    172.20.0.0/23
    172.20.2.0/23
    172.20.14.0/23
    for vlans with 60 users it is wise to leave space for additional hosts if needed in the future so I would use a /25 for them
    let's take
    172.20.12.0/23 further subnetting this with a /25 means moving to the right of two bits and gives four subnets:
    172.20.12.0/25
    172.20.12.128/25
    172.20.13.0/25
    172.20.13.128/25
    this can accomodate 4 subnets/departments.
    I wouldn't use subnets bigger then a /23 because otherwise the broadcast overhead becomes very great.
    Having a multilayer switch you can also think to put the 490 users in two vlans/subnets.
    About the security this depends on the security levels you want to build:
    complete segregation of departments can be achieved with VRF lite (actullay different routing tables for each department).
    Some level of control can be achieved by using ACLs applied on the SVI logical vlans interfaces on the L3 switch.
    Hope to help
    Giuseppe

  • Need help in design login page in struts

    Friends. I am new to struts. I am designing one Login page which works fine. Now i want to add Remember Me option to login page. Help me to do this. Thanks in Advance.

    Try this,
    Action class
    if(event check blah blah) {
                             Cookie usernameCookie = new Cookie("Username", strUserId);
                             usernameCookie.setMaxAge(60 * 60 * 24 * 30);
                             response.addCookie(usernameCookie);
                             Cookie passwordCookie = new Cookie("Password", strPassword);
                             passwordCookie.setMaxAge(60 * 60 * 24 * 30);
                             response.addCookie(passwordCookie);
                             Cookie checkCookie = new Cookie("Check", strCheck);
                             checkCookie.setMaxAge(60 * 60 * 24 * 30);
                             response.addCookie(checkCookie);
                        }else {
                             Cookie usernameCookie = new Cookie("Username", "");
                             response.addCookie(usernameCookie);
                             Cookie passwordCookie = new Cookie("Password", "");
                             response.addCookie(passwordCookie);
                             Cookie checkCookie = new Cookie("Check", eventname);
                             response.addCookie(checkCookie);
                        }in jsp
    <bean:cookie id="uname" name="Username" value=""/>
    <bean:cookie id="pword" name="Password" value=""/>
         <html:text property="UserId" value="<%=uname.getValue() %>"/>
         <html:password property="Password" value="<%=pword.getValue() %>"/>
         <logic:equal value="on" cookie="Check">
              <input type="checkbox" name="CheckBox" checked="checked" >
         </logic:equal>
         <logic:notEqual value="on" cookie="Check">
              <input type="checkbox" name="CheckBox">
         </logic:notEqual>
    <html:submit property="" styleClass="button" ><bean:message key="button.login" /></html:submit>- vignesh

  • Need help with design decision: JavaEE or JavaSE

    Hello folks,
    We are developing an application that has the following requirements:
    - Client will be a desktop client developed in Swing
    - JPA will be used for ORM modelling on server-side
    - MySQL will be used as the DB
    - JMS will be used for client-server event communication (since we need a robust event communication mechanism)
    Given the above, we are not able to decide whether to stick to Java SE or to use Java EE.
    I understand that if we decide to stick to Java SE, JPA can be used but what about JMS?
    Is there a way to use JMS without an application server?
    If not, would it be appropriate to use an App Server just for the sake of JMS?
    (We don't want to go with a third-party framework like Spring just for using JMS.
    For us, the choice is between Java SE or Java EE.)
    What do you people suggest would be better?
    Your inputs will be of great help.
    Thanks much,
    Sandeep

    Here is one way to approach this:
    I would first write the use cases like:
    GeneralUser -> (maintain local data)
    AdminUser    -> (maintain local data)
    GeneralUser -> (export to central data)
    AdminUser    -> (export to central data)
    GeneralUser -> (view common data)
    AdminUser    -> (view common data)
    AdminUser    -> (manage users) << include >> (add user), (delete user)then I would apply the pattern (http://www.theserverside.com/patterns/thread.tss?thread_id=17595)
    and identify the following three apps and the components that they depend on:
    LocalDataApp    { AuthenticationMgr, LocalDataMgr }
    CentralDataApp { AuthenticationMgr, ExportMgr, CentralDataMgr }
    UserAdminApp  { UserMgr }where the AuthenticationMgr component invokes the UserAdminApp to get the user info for authorization,
    the ExportMgr invokes the LocalDataApp to get the local data so the CentralDataApp can use CentralDataMgr to persist it in the central store.
    LocalDataApp and CentralDataApp could have one web front end and UserAdminApp could have another web front end. The communication between AuthenticationMgr and UserAdminApp could be via JNDI.
    Hope that helps,
    Nalla

  • Need help in designing prompts

    Hi All,
    I have three columns in dimension 1. is organization 2. asset 3. production .Organization has lot of assets which can be production or non production.If asset is production then production column will have Y otherwise N.My requirement is to have organization and asset in prompt but asset should be constrained to organization(depending on the org selected it should give list of assets) and assets displayed should be only which have value y in production column.I tried to design the prompt when I select all value for asset then only constrain option comes otherwise its not coming.If I select all value and constrain I am not able to filter the asset which have only Y in production column.Can someone please help.
    Thanks in advance

    Hi Everyone,
    Thanks for your help and inputs.
    Prasanna,
    I want to see only those Assests where Production_Equipment='Y' .With constrain I am not able to use sql results in show values.Is there a way to hide column in prompts?Then I can use Asset with constrain and also add production equipment column and add condition to this column.
    Regarding the suggestion of adding teh condition to the reposrt itself this is not required becoz in dashbaord we have 2 tabs 1 production and 1 non production we wnaqt only produtcion assets to be shown in production tab and non production in non production tab

  • I need help with designing a page with footnotes

    I would like to place a one or two word translation in a narrow column alongside a main text. There are many translations in this text, about one every two lines. The footnote function simply creates a long list at the bottom of the page. This creates some design challanges. Does anyone have any suggestions of what I can do to design a page where these one or two word translations appear in a column next to the text or somewhere other than a single column list at the bottom of the page. Thank you!

    I used an anchored object to create my sidebars, and use an object style for the text box. The settings below (ignore the X and Y offset will let it go from the left to the right if there's a lot of page shifting, and it will keep it on the page. It'll take some fiddling around to get it to work the way you want. The only thing I need to do is type in the width of the anchored box. Everything else is automated.

  • RE: Need Help with Designing a game of  "GO"

    I have got the GUI sorted thanks to some source code supplied by Noah.W. I wish to add animation to the program below.
    Can someone please help me with the capture methods in the below code. I basically need it to capture all pieces that have been surrounded by opposing pieces. This may be one piece or a whole group captured.
    At the moment it only does it for one piece.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class GoGame extends JFrame
    public GoGame()
         getContentPane().setLayout(null);
         setBounds(10,10,510,520);
         getContentPane().add(new TheTable());
         setVisible(true);
    public class TheTable extends JPanel
         int[][]points  = new int[19][19];
         boolean black  = true;
    public TheTable()
         setBounds(20,20,453,453);
         addMouseListener(new MouseAdapter()
              public void mouseReleased(MouseEvent m)
                   Point p = clickOnIntersection(m.getPoint());
                   if (p != null && points[p.x/25][p.y/25] == 0)
                        int x = p.x/25;
                        int y = p.y/25;
                        if (black)
                             points[x][y] = 1;
                             black = false;
                             capture(x,y,2,1);
                             capture(x,y,1,2);
                        else
                             points[x][y] = 2;
                             black = true;
                             capture(x,y,1,2);
                             capture(x,y,2,1);
                        repaint();
    private Point clickOnIntersection(Point p)
         Rectangle rh = new Rectangle(0,0,getWidth(),5);
         Rectangle rv = new Rectangle(0,0,5,getHeight());
         for (int h=0; h < 19; h++)
              rh.setLocation(0,h*25-2);
              if (rh.contains(p))
                   for (int v=0; v < 19; v++)
                        rv.setLocation(v*25-2,0);
                        if (rv.contains(p)) return(new Point(v*25+1,h*25+1));
         return(null);
    private void capture(int x1, int y1, int col0, int col1)
         for (int x=Math.max(0,x1-2); x < Math.min(19,x1+2); x++)
              for (int y=Math.max(0,y1-2); y < Math.min(19,y1+2); y++)
                   if (points[x][y] == col0) capture(x,y,col1);
    private void capture(int x, int y, int col)
         if (x > 0  && points[x-1][y] != col) return;
         if (x < 18 && points[x+1][y] != col) return;
         if (y > 0  && points[x][y-1] != col) return;
           if (y < 18 && points[x][y+1] != col) return;
         points[x][y] = 0;
    public void paintComponent(Graphics g)
         super.paintComponent(g);
         Graphics2D g2 = (Graphics2D)g;
         g2.setPaint(new GradientPaint(getWidth(),getHeight(),Color.yellow,0,0,Color.red,true));
         g2.fillRect(0,0,getWidth(),getHeight());
         g2.setColor(Color.black);
         for (int n=0; n < 19; n++)
              g2.fillRect(0,n*25,getWidth(),3);
              g2.fillRect(n*25,0,3,getHeight());
         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);          
         g2.setColor(Color.green) ;
         for (int n=0; n < 3; n++)
              g2.fillOval(25*3-1,n*150+74,5,5);
              g2.fillOval(25*9-1,n*150+74,5,5);
              g2.fillOval(25*15-1,n*150+74,5,5);
         for (int x=0; x < 19; x++)
              for (int y=0; y < 19; y++)
                   if (points[x][y] != 0)
                        if (points[x][y] == 1) g.setColor(Color.black);     
                        if (points[x][y] == 2) g.setColor(Color.white);     
                        g2.fillOval(x*25-9,y*25-9,20,20);
    public static void main(String[] args)
         GoGame game = new GoGame();
         game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    I am also willing to reward �20 via Paypal for the complete solution to the game of "GO", excluding the animation element. Half can be emailed first, then the rest after payment.

Maybe you are looking for

  • 32bit java on 64bit arch

    Hi, I have 64bit archlinux. I have installed eclipse and openjdk from repository so both are 64bit version. But I need 32bit version of java for actual job. So i downloaded it from oracle's web. Now I have two java on my arch (./usr/lib/jvm/java-6-op

  • MIRO - Credit Memo- Unable to match

    Hi Gurus, One  of our supplier issued a credit memo which relates to two POs. One is a return PO(credit note) and other a normal PO. Vendor has issued credit note with Net figure. Both POs are not related. Normal PO ( GR)   100 Return PO(GR)      (-2

  • Screen sharing Lion- Lion problem

    I am trying to set up screen sharing in my local network. I am using a MacBook with latest Lion as server to which I am trying to connect. I am connecting with a Powerbook 12" 10.5.8 without problems and controlling the MacBook via Screen Sharing. I

  • Mac OSX Leopard 10.5.2

    Hello I need to know in which apple desktop can be use " osx leopard 10.5.2 " . I got this 2 cd" install and restore disc" when I bought mac mini on 2005/06. Can be these cd be install for example on a Imac or power mac? or they only made to be insta

  • Ringtone problems. help!

    hi i just upgraded to the iphone 5s and when i restored the new phone non of the rigntones which i purchased from itunes are no where to be found. is there anyway i could get those ringtones back since i purchased them? can someone help me please!!