Error with instance variable and constructor of base class

I am getting the error on the following statement "protected Point apoint" of by base class. What is causing this problem? See my code:
package Shapes;
public abstract class Shapes
     protected Point apoint; / ****error at this line****/
     public void move(double xdelta, double ydelta)
          apoint.x += xdelta;
          apoint.y += ydelta;
public abstract void distance();
public abstract void show();
public String toString()
return "\nThe starting point is at coordinates ("+x+","+y+")";
package Shapes;
public class Lines extends Shapes
protected Point start;
protected Point end;
     protected double x;
     protected double y;
     double delta;
     public Lines( final Point apoint, final Point bpoint)
start.x = apoint.x;
          start.y = apoint.y;
          end.x = bpoint.x;
          end.y = bpoint.y;
public Lines(double xstart, double ystart, double xend, double yend)
this.xstart = xstart;
          this.ystart = ystart;
          this.xend = xend;
          this.yend = yend;
     public Lines(double x, double y)
          this.x = x;
          this.y = y;
               public void distance(final Lines start, final Lines end)
                    delta = abs(Math.sqrt (super.x - start.x) * (super.x - end.x) +
                    (super.y - start.y) * (super.y - end.y));
               Lines move(Point start, double delta)
                    end.x += delta;
                    end.y += delta;
                    return new Point(end);
public Lines show()
g.drawLine( start.x, start.y, end.x, end.y);
public String toString()
return super.toString()+ "\n moved distance is("
               + start + ") : (" + end + ")"
               +" \n to position(" + start + " ) : (" + end + ")";
package Shapes;
public class Rectangle extends Lines
     double delta;
public Rectangle (Point top_lft_pt, Point bottom_rght_pt)
super(top_lft_pt, bottom_rght_pt);
public Rectangle(double x_top_lft, double y_top_lft, double x_bottom_rght, double y_bottom_rght)
super(x_top_lft, y_top_lft, x_bottom_rght, y_bottom_rght);
     public Rectantgle is_it_diagonal()
          if(top_lft.x > bottom_rght.x && bottom_rght.x < top_lft.x)
               System.out.println("Point are Not Diagonal");
               public void distance(double delta)
                    delta = abs(Math.sqrt (top_lft.x - bottom_rght.x) * (top_lft.x - botton_rght.x) +
                    (top_lft.y - bottom_rght.y) * (top_lft.y - bottom_rght.y));
               public Rectangle move(final Point top_lft_pt, double delta)
                    bottom_rght.x += delta;
                    bottom_rght.y += delta;
                    return new Point(bottom_rght_pt);
               public void get_top_rght_coords()
                    Point top_rght = new Point();
                    top_rght.x = bottom_rght.x;
                    top_rght.y = top_lft.y;
               public void get_bottom_left_coords()
                    Point bottom_lft = new Point();
                    bottom_lft.x = top_lft.x;
                    bottom_lft.y = bottom_rght.y;
     public Rectangle show()
                    g.drawLine(top_lft.x, top_lft.y, top_rght_x, top_rght_y);
                    g.drawLine(bottom_lft.x, bottom_lft.y, bottom_rght.x, bottom_rght.y);
                    g.drawLine(top_lft.x, top_lft.y, bottom_lft.x, bottom_lft.y);
                    g.drawLine(top_rght.x, top_rght.y, bottom_rght.x, bottom_rght.y);
package Shapes;
public class Circles extends Lines
protected double radius;
     public double delta;
     protected Point center;
public Circles(double x, double y, double radians)
super(x, y);
          radius = radians;
     public Circles(Point acenter)
          center.x = acenter.x;
          center.y = acenter.y;
public void distance()
delta = abs(Math.sqrt(super.x - x) * (super.x - x) + (super.y - y) * (super.y -y));
     public Circles move(final Point Circles, double delta)
          return new Point(Circles);
public void show()
g.drawOval(Circles.x, Circles.y, radius, radius);
package Shapes;
import java .math .*;
import java.util .Random ;
public class ShapesDriver
Shapes[] aShape = new Shapes[10];
static double range = 101.0;
static Random r1 = new Random();
public static void main(String [] args)
double[][] coords = new double[10][10];
double[] radians = new double [10];
Shapes anyShape = {
new Circles(radians),
new Lines(coords),
new Rectangle(coords)
Shapes aShape; /***error at this line***/
          for(int i = 1; i <= coords.length; i++)
for(int j = 1; j <= coords.length; j++)
                                                  coords[i][j] = r1.nextDouble () * range;
                                                  radians[j] = r1.nextDouble () * range;
aShape[i] = anyShape[r1.nextInt(aShape.length)];
System.exit(1);

Thanks for your help with this problem. Now I have another problem that I am having a hard time figuring out. My program is using inheritance and polymorphism. I trying to use only one version of methods in the superclass points which extends the shapes class which is the abstract superclass vs. repeating the implementation of the methods (move, show, etc.) in each of the subclasses. The error I am getting is this "declare the class abstract, or implement abstract member 'Point Shapes.move()'. As you see, move is declared abstract and of type point in the Shapes superclass and it's behavior is implemented in the subclass Points extending Shapes. The other subclasses, circle, rectangle and lines will invoke the move method from Points and return a new point object. Why I am I getting the error to declare or implement move when the implementation is in Point?
Below is code, please help?
import java .awt .Point ;
public class ShapesDriver
     public static void main(String args[])
          int count = 0;
          int choice;
          Point start = null;
          Point end = null;
          System.out .println(" 1 i am here");
          start = new Point((int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
          end = new Point((int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
     System.out .println(" 2 i am here");     
     System.out.println (start);
     System.out.println(end);                         
     for(int i = 0; i <= count; i++)
          System.out .println(" 3 i am here");
          choice = (int)(4.0 * Math.random());
          System.out .println(" 4 i am here");
          System.out.println (choice);     
     switch(choice)
          case 0: //Lines
          System.out .println(" 5 i am here");
          Lines apoint = new Lines((int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                              (int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
          Point coords = new Point((int)(Math.random()* 10.0),
                         (int)(Math.random()* 10.0));
          new Point((int)(Math.random()* 10.0),
                         (int)(Math.random()* 10.0));
          break;
          case 1: //Circles
          System.out .println(" 6 i am here");
          Circles center = new Circles((double)(Math.random()* 10.0),
          (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
          (double)(Math.random()* 10.0),(double)(Math.random()* 10.0));
          Circles centerpt = new Circles((int)(Math.random()* 10.0),
          (int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
          (int)(Math.random()* 10.0), (double)(Math.random()* 10.0));
     break;
          case 2: //Rectangles
     System.out .println(" 7 i am here");
          Rectangle top_lft_pt = new Rectangle ((double)(Math.random()* 10.0),
                         (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
                         (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
                         (double)(Math.random()* 10.0));
          Rectangle bottom_rgt_pt = new Rectangle ((double)(Math.random()* 10.0),
               (double)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                         (int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                         (int)(Math.random()* 10.0));
     break;
     default:
     System.out .println(" 9 i am here");
     System.out.println("\nInvalid shape choice =" + choice);
     System.exit(0);
     break;
     try
               System.in.read();
               catch(java.io.IOException ioe)
import java .awt .Point ;
public abstract class Shapes
     private String shape;
     public Shapes(String ashape)
          shape = new String(ashape);
     public abstract Point move();
     public double distance()
          return 0.0;
     public abstract void show();
     public String toString()
          return "\nThis shape is a" + shape;
import java .awt .Point ;
public class Rectangle extends Points
     protected Point top_lft;
     protected Point top_rgt;
     protected Point bottom_lft;
     protected double top_lft_x;
     protected double top_lft_y;
     protected double bottom_rgt_x;
     protected double bottom_rgt_y;
     protected Point bottom_rgt;
     protected double delta = 0;
     protected String shape = "Rectangle";
     public Rectangle(double x, double y, double top_lft_x,
                         double top_lft_y, double bottom_rgt_x,
                         double bottom_rgt_y)
          super(x, y);
          top_lft_x = top_lft_x;
          top_lft_y = top_lft_y;
          bottom_rgt_x = bottom_rgt_x;
          bottom_rgt_y = bottom_rgt_y;
     public Rectangle( double x, double y, Point bottom_rgt, Point top_lft)
          super(x, y);
          bottom_rgt_x = bottom_rgt.x;
          bottom_rgt_y = bottom_rgt.y;
          top_lft_x = top_lft.x;
          top_lft_y = top_lft.y;
     public String toString()
          return super.toString() + " coordinates top left= " + top_lft_x + "," + top_lft_y + "and bottom right" +
               bottom_rgt_x + "," + bottom_rgt_y + ")";
     public void is_it_diagonal()
          if(top_lft_x < bottom_rgt_x && bottom_rgt_x > top_lft_x)
               System.out.println("Points are Not Diagonal");
          public double distance()
               distance ();
               return delta;
          public Point move(Point top_lft)
               move();
               bottom_rgt_x += delta;
               bottom_rgt_y += delta;
               return top_lft;
          public void get_other_coords()
               top_rgt.x = bottom_rgt.x;
          top_rgt.y = top_lft.y;
               bottom_lft.x = top_lft.x;
               bottom_lft.y = bottom_rgt.y;
          public void show()
               super.show();
               System.out.println("new coords are :");
               System.out .println ("(" + top_lft_x + "," + top_lft_y + ")");
               System.out .println ("top right(" + top_rgt + ")");
               System.out .println ("(" + bottom_rgt_x + "," + bottom_rgt_y + ")");
               System.out .println ("bottom right(" + bottom_rgt + ")");
import java .awt .Point ;
public class Points extends Shapes
     protected double delta = 0.0;
     protected double x;
     protected double y;
     protected String ashape = "Points";
     public Points( double x, double y)
          super("Points");
          x = x;
          y = y;
     public Points( Point start)
          super("Points");
          x = start.x;
          y = start.y;          
     public String toString()
          return super.toString() + "References coordinates(" + x + y + ")";
     public double distance(double x1, double y1 )
          return delta =(Math.sqrt(x - x1) * (x - x1) + (y - y1) *
          (y - y1));
     public Point move(Point pts)
          pts.x += delta;
          pts.y += delta;
          return pts;
     public void show()
          System.out.println("This shape is a" + ashape + "(" +
                              "(" + x+ "," + y + ")");
import java .awt .Point ;
public class Lines extends Points
     double delta = 0;
     protected double x;
     protected double y;
     protected String ashape = "Lines";
     public Lines( double x1, double y1, double x, double y)
          super(x1,y1);
          x = x;
          y = y;
     public Lines(Point start, Point end)
          super(start);
          x = end.x;
          y = end.y;
     public String toString(Point end)
          return super.toString() + "line points = (" + x + "," + y +
               "(" + end + ")";
     public double distance()
          distance ();
          return delta;
     public Point move(Point lines)
          move ();
          return lines;
     public void show()
          System.out.println("This shape is a" + ashape + "(" +
                              "(" + x + "," + y + ")");
import java .awt .Point ;
public class Circles extends Points
protected double radius;
protected double xcenter;
protected double ycenter;
protected String ashape = "Circle";
     public Circles( double x, double y, double cx, double cy, double radians)
          super(x, y);
          xcenter = cx;
          ycenter = cy;
          radius = radians;
     public Circles( Point acenter, Point ref, double radians)
          super(ref);
          xcenter = acenter.x;
          ycenter = acenter.y;
          radius = radians;
     public String toString(Point ref)
          return super.toString() + " reference points (" +
               ref + ")" +
               "center coordinates (" + xcenter + "," + ycenter + ")";
          public double distance(Point ref)
               return (Math.sqrt(ref.x - xcenter) * (ref.x - xcenter)
                         + (ref.y - ycenter) *
          (ref.y - ycenter));
          public Point move(Point center)
               move();
               return center;
          public void show()
               System.out.println("This shape is a" + ashape + "(" +
                              "(" + xcenter + "," + ycenter + ")");

Similar Messages

  • About "method", "instance variable" and "constructor"

    Does a method need to be initialise?? if yes, how to write the code?
    for example,is it:
    public String mymethod( String args[]); ?
    public double mymethod2 (); ?
    what is the meaning of "instance variable" and "constructor"?
    Please help.....THANKS!

    Previously posted to this OP:
    Read the Java Tutorial: Learning the Java Language.
    http://java.sun.com/docs/books/tutorial/java/index.html
    � {�                                                                                                                                                                                                                                                                                                   

  • I am unable to burn any info-photo ect on to a disk. I have a 27" I mac mid 2010 version. I put in a disk, hit burn, it runs for about 3 mins and ejects the disk sayiny there was an error with the drive and will not restart.

    am unable to burn any info-photo ect on to a disk. I have a 27" I mac mid 2010 version. I put in a disk, hit burn, it runs for about 3 mins and ejects the disk sayiny there was an error with the drive and will not restart.

    The optical drive has probably failed. It's a fairly common thing with these slim SuperDrives. Does it read any discs you put into it? You can try resetting the SMC and pram but I'll be surprised if it helps.
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on
    Resetting PRAM and NVRAM
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • I was downloading the software update for ipod touch 2gen and after it was done downloading it showed that there was an error with my ipod and when i saw it was on the lockscreen loading. its been like this for 4 hours already

    I was downloading the software update for ipod touch 2gen and after it was done downloading it showed that there was an error with my ipod and when i saw it was on the lockscreen loading. its been like this for 4 hours already

    What did the error message say?
    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • What is the difference between Instance variable and Global variable?

    Hi folks,
    Could you please explain me, "what is the difference between Instance variable and Global variable?"
    Are they really same or not?
    --Subbu                                                                                                                                                                                                                                                                                                               

    Hi flounder,
    I too know that there is no such a term GLOBAL in java.
    generally people use to say a variable which is accessible throught out the class or file has global access
    and that will be called as a global variable...
    my point is very much similar to what Looce said.
    In simple that is not a technical term, but just a causual term.
    In technically my question is, "What is the difference between a instance variable and public variable?".
    Hi looce,
    Thanks for the reply. even thats what my understanding too....in order to confirm that i raised this question..
    Your reply has given a clear answer...... thanks again.
    --Subbu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with final variables and inner classes (JDK1.1.8)

    When using JDK1.1.8, I came up with following:
    public class Outer
        protected final int i;
        protected Inner inner = null;
        public Outer(int value)
            i = value;
            inner = new Inner();
            inner.foo();
        protected class Inner
            public void foo()
                System.out.println(i);
    }causing this:
    Outer.java:6: Blank final variable 'i' may not have been initialized. It must be assigned a value in an initializer, or in every constructor.
    public Outer(int value)
    ^
    1 error
    With JDK 1.3 this works just fine, as it does with 1.1.8 if
    1) I don't use inner class, or
    2) I assign the value in initializer, or
    3) I leave the keyword final away.
    and none of these is actually an option for me, neither using a newer JDK, if only there is another way to solve this.
    Reasons why I am trying to do this:
    1) I can't use a newer JDK
    2) I want to be able to assign the variables value in constructor
    3) I want to prevent anyone (including myself ;)) from changing the value in other parts of the class (yes, the code above is just to give you the idea, not the whole code)
    4) I must be able to use inner classes
    So, does anyone have a suggestion how to solve this problem of mine? Or can someone say that this is a JDK 1.1.8 feature, and that I just have to live with it? In that case, sticking to solution 3 is probably the best alternative here, at least for me (and hope that no-one will change the variables value). Or is it crappy planning..?

    You cannot use a final field if you do not
    initialize it at the time of declaration. So yes,
    your design is invalid.Sorry if I am being a bit too stubborn or something. :) I am just honestly a bit puzzled, since... If I cannot use a final field in an aforementioned situation, why does following work? (JDK 1.3.1 on Linux)
    public class Outer {
            protected final String str;
            public Outer(String paramStr) {
                    str = paramStr;
                    Inner in = new Inner();
                    in.foo();
            public void foo() {
                    System.out.println("Outer.foo(): " + str);
            public static void main( String args[] ) {
                    String param = new String("This is test.");
                    Outer outer = new Outer(param);
                    outer.foo();
            protected class Inner {
                    public void foo() {
                            System.out.println("Inner.foo(): " + str);
    } producing the following:
    [1:39] % javac Outer.java
    [1:39] % java Outer
    Inner.foo(): This is test.
    Outer.foo(): This is test.
    Is this then an "undocumented feature", working even though it shouldn't work?
    However, I assume you could
    get by with eliminating the final field and simply
    passing the value directly to the Inner class's
    constructor. if not, you'll have to rethink larger
    aspects of your design.I guess this is the way it must be done.
    Jussi

  • ADF Groovy Expression with bind variable and ResourceBundle

    Now I have ViewObject which have WHERE clause with bind variable.
    This bind variable is for language. Within bind variable I can change Value Type to Expression and into Value: I put +(ResourceBundle.getBundle("model.ModelBundle")).getString("language")+.
    Now if I run Oracle Business Component Browser (on AppModule) this works. In my ModelBundle.properties there is language=1 name-value pair. And with different locale I have different language number.
    Now if I put that ViewObject on one JSF, this bind variable expression does not work any more. Error:
    *oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find bundle for base name model.ModelBundle, locale my_locale*
    Any ideas?
    10x
    Zmeda

    The most wierd thing is that, if I make ViewObjectImpl and insert this method
    public String getLanguage() {
    return (ResourceBundle.getBundle("model.ModelBundle")).getString("language");
    and call it in Bind Variable Expression Value: viewObject.getLanguage()
    IT WORKS!
    But why with groovy expression it does not work?
    Zmeda

  • Analysis Service Execute DDL Task throwing error with SourceType Variable

    Hi,
    I have Configuring Analysis Services Execute DDL Task to use Variable and Process Data(xmla Script) like below:
    When I execute this task I get the below error message:
    [Analysis Services Execute DDL Task] Error: The -->
    text node at line 23, column 3 cannot appear inside the DataSource element (namespace http://schemas.microsoft.com/analysisservices/2003/engine) under Envelope/Body/Execute/Command/Batch/Parallel/Process. This element can
    only have text nodes containing white-space characters.
    Can anyone please let me know how to resolve this.

    If I run using the sourceType "Direct Input", the Analysis Execute DDL Task runs fine, but if I use the sourcetype as variable its throws the error. And below is the xmla script
    Here is my Package look and the xmla script; its failing at "ProcessAdd" Analysis Execute DDL task:
    "SELECT '<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
    <ErrorConfiguration xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">
    <KeyNotFound>IgnoreError</KeyNotFound>
    </ErrorConfiguration>
    <Parallel>
    <Process xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">
    <Object>
    <DatabaseID>IIS_Version2</DatabaseID>
    <DimensionID>Application</DimensionID>
    </Object>
    <Type>ProcessAdd</Type>
    <DataSource xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" xsi:type=\"RelationalDataSource\" dwd:design-time-name=\"1a3cb292-9bce-4c59-a182-177d6b3506ff\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
    <ID>IISDW</ID>
    <Name>IISDW</Name>
    <ConnectionString>Provider=SQLNCLI11.1;Data Source=CO1MSFTSQLHKT02;Integrated Security=SSPI;Initial Catalog=IISDW</ConnectionString>
    <Timeout>PT0S</Timeout>-->
    </DataSource>
    <DataSourceView xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" dwd:design-time-name=\"b0b61205-c64d-4e34-afae-6d4d48b93fb3\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
    <ID>IISDW</ID>
    <Name>IISDW</Name>
    <DataSourceID>IISDW</DataSourceID>
    <Schema>
    <xs:schema id=\"IISDW_x0020_1\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:msprop=\"urn:schemas-microsoft-com:xml-msprop\">
    <xs:element name=\"IISDW_x0020_1\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\" msprop:design-time-name=\"72037318-e316-469d-9a45-a10c77709b39\">
    <xs:complexType>
    <xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">
    <xs:element name=\"Application\" msprop:design-time-name=\"7f579e7e-e8b7-4a9d-8a93-a255fccbbfbe\" msprop:IsLogical=\"True\" msprop:FriendlyName=\"Application\" msprop:DbTableName=\"Application\" msprop:TableType=\"View\" msprop:Description=\"\" msprop:QueryDefinition=\"SELECT a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS [Timestamp], a.ServerName, CAST(a.ServerName AS char(3)) AS DataCenter, a.CS_URI_Stem, CAST(HashBytes(''MD5'', &#xD;&#xA; a.Application + a.ServerName + a.CS_URI_Stem + CAST(DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS varchar(24))) AS uniqueidentifier) AS Server_URI_Identity&#xD;&#xA;FROM IIS_6_OLD AS a LEFT OUTER JOIN&#xD;&#xA; Dimension_Pointer AS b ON a.Application = b.Application&#xD;&#xA;WHERE (b.ProcessedFlag = 0) AND (a.Application IN ("+(DT_WSTR,100) @[User::strDistinctApplication]+"))&#xD;&#xA;GROUP BY a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0), a.ServerName, a.CS_URI_Stem\" msprop:QueryBuilder=\"SpecificQueryBuilder\">
    <xs:complexType>
    <xs:sequence>
    <xs:element name=\"Application\" msprop:design-time-name=\"f3074e98-4a82-4bc5-a818-916203f7758b\" msprop:DbColumnName=\"Application\" msprop:FriendlyName=\"Application\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"255\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"Timestamp\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"2662e3a8-8b1a-4d77-aecb-575329b84dc1\" msprop:DbColumnName=\"Timestamp\" msprop:FriendlyName=\"Timestamp\" type=\"xs:dateTime\" />
    <xs:element name=\"ServerName\" msprop:design-time-name=\"ced26d49-cd6e-4073-a40c-ff5ef70e4ef1\" msprop:DbColumnName=\"ServerName\" msprop:FriendlyName=\"ServerName\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"255\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"DataCenter\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"4583e15a-dcf1-45a2-a30b-bd142ca8b778\" msprop:DbColumnName=\"DataCenter\" msprop:FriendlyName=\"DataCenter\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"3\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"CS_URI_Stem\" msprop:design-time-name=\"10db5a79-8d50-49d2-9376-a3b4d19864b9\" msprop:DbColumnName=\"CS_URI_Stem\" msprop:FriendlyName=\"CS_URI_Stem\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"4000\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"Server_URI_Identity\" msdata:DataType=\"System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"018ede0a-e15e-47c2-851b-f4431e8c839c\" msprop:DbColumnName=\"Server_URI_Identity\" msprop:FriendlyName=\"Server_URI_Identity\" type=\"xs:string\" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    <xs:unique name=\"Constraint1\" msprop:IsLogical=\"True\" msdata:PrimaryKey=\"true\">
    <xs:selector xpath=\".//Application\" />
    <xs:field xpath=\"Server_URI_Identity\" />
    <xs:field xpath=\"Timestamp\" />
    </xs:unique>
    </xs:element>
    </xs:schema>
    <IISDW_x0020_1 xmlns=\"\" />
    </Schema>
    </DataSourceView>
    <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
    </Process>
    </Parallel>
    </Batch>' as XMLAScript_ProcessData"

  • Performance with globle variable and local var.

    hi anyone
    i just have one performance question about the globle var and local. is having a globle var that is initialized with 'new' at one place better than having local var that is initialzed with 'new' in several places? for example, i have a access var that is initialzed with DB connection. should i have it as a globle var? or put it in the functions where it is needed, and initialize it with DB connection? in both cases, i need to use new operator.
    thanks in advance.

    First , don't use the term "global variable". It is misleading and not an official part of the Java nomenclature. I think the term used should be ( and correct me if I'm wrong ) instance variable. In C and C++ globale variables really are global - they can be accessed by any and all classes which include the header file.
    OK, having got that out of my system, back to the question. The value is gotten from a database, right? Whether you make it an instance variable or not depends on you design and whether the value in the database is likely to change during the lifetime of the instance.
    For example, if this class is a superclass of another, and the cild needs to know the value of the variable, it is often convenient to make it an instance variable so the subclass can access it directly.
    But if the value is likely to change, then you may want to have a getter method which returns the current value in the database.
    The latter will clearly have more overhead associated with it since you would need to get the value each time, but it is probably safer than having an instance variable.

  • How to change value of instance variable and local variable at run time?

    As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
    Suppose I have a class, say employee like -
    class employee {
    public String name;
    employee(String name){
    this.name = name;
    public int showSalary(){
    int salary = 10000;
    return salary;
    public String showName()
    return name;
    i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
    My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
    Can someone tell me how to change these value?
    Please help
    Regards,
    Sujeet Sharma

    This is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • PI Control Error Between Process Variable and Set Point

    I've developed a PI program that uses measurements from a pressure transducer as the process variable to control air pressure released from a motorized valve. The program works great at lower pressures, but as the set point pressure increases the error between the process variable and set point increases. I've tried several things....adjusting the P seems to initially increase the overshoot but the process variable always settles down below the set point....tried adjusting the EGU min and max values but no real pattern develops with this. It appears as the process variable get closer to the max EGU value of 70000 pascals the error increases.
    I've attached three screen shots showing the process variable curve and setpoint value. The graph of interest is the one in the upper right hand corner.
    Any recommendation or advice would be appreciated.
    tks, Terry
    Attachments:
    Low Pressure.JPG ‏267 KB
    High Pressure.JPG ‏398 KB
    Mid Pressure.JPG ‏266 KB

    Kyle,
    First off....I appreciate your comments. No...there is no value is system represented as U16.
    Actually errors start to develop quite a bit before the maximum. If you look at the mid pressure.jpg file you'll notice that the set point (~28125 Pascals) and process variable (~25625 Pascals) are roughly off by about 2500 Pascals. Then if you look at the high pressure.jpg file you'll notice that the set point (~53000 Pascals) and process variable (~45500 Pascals) are roughly off by about 7500 Pascals. Therefore it appears as the setpoint pressure increases towards maximum the error tends to increase.
    I was curious about something....the set point value I'm inputting into the PID.VI , shown in the high pressure.jpg file, is from EGU to percent.VI. It would look exactly like the EGU to percent VI feeding the process variable input of the PID.VI with the set point value feeding the EGU to percent.VI input. Would I be better off feeding the actual set point value to the PID.VI input instead of percentage?
    Thanks, Terry

  • What is the difference between instance variable and class variable?

    i've looked it up on a few pages and i'm still struggling a bit maybe one of you guys could "dumb" it down for me or give and example of how their uses differ.
    thanks a lot

    Instance is variable, class is an object.What? "Instance" doesn't necessarily refer to variables, and although it's true that instances of Class are objects, it's not clear if that's what you meant, or how it's relevant.
    if you declare one instance in a class that instance
    should be sharing within that class only.Sharing with what? Non-static fields are not shared at all. Sharing which instance? What are you talking about?
    if you declare one class object it will share
    anywhere in the current program.Err...you can create global variables in Java, more or less, by making them static fields. If that's what you meant. It's not a very good practice though.
    Static fields, methods, and classes are not necessarily object types. One can have a static primitive field.

  • Full Export/Import Errors with Queue tables and ApEx

    I'm trying to take a full export of an existing database in order to build an identical copy in another database instance, but the import is failing each time and causing problems with queue tables and Apex tables.
    I have used both the export utility and Data Pump (both with partial and full exports) and the same problems are occurring.
    After import, queue tables in my schema are unstable. They cannot be dropped using the queue admin packages as they throw ORA-24002: QUEUE_TABLE <table> does not exist exceptions. Trying to drop the tables causes the ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables error
    As a result, the schema cannot be dropped at all unless manual data dictionary clean up steps (as per metalink) are done.
    The Apex import fails when creating foreign keys to WWV_FLOW_FILE_OBJECTS$PART. It creates the table ok, but for some reason the characters after the $ are missing so the referencing tables try to refer to WWV_FLOW_FILE_OBJECTS$ only.
    I am exporting from Enterprise Edition 10.2.0.1 and importing into Standard edition 10.2.0.1, but we are not using any of the features not available in standard, and I doubt this would cause the issues I'm getting.
    Can anyone offer any advice on how I can resolve these problems so a full import will work reliably?

    Thanks for the lead!
    After digging around MetaLink some more, it sounds like I'm running into Bug 5875568 (MetaLink Note:5875568.8) which is in fact related to the multibyte character set. The bug is fixed in the server patch set 10.2.0.4 or release 11.1.0.6.

  • Need a little help with instance variables

    I'm still pretty new to this, but what I have here is some instance
    variables that I need to constuct a record from. This keeps track of a
    sorting process. In the public Sortable getRecord() method is where
    I need to construct that record, which is where I'm lost.
    I look at the tutorials on this site but still can't seem to find what I'm looking for.
    What's giving me so much trouble is that I have variables of different types
    and I can't out how to group them togther without getting some wierd error.
    public class SortableSpy implements Sortable {
        public Sortable a; // Sortable is an interface that this class inplements
        public int swaps;
        public int compares;
        public SortEvent events [];
        public int nevents;
        public SortableSpy(Sortable arr) {
                a = arr;              // These are
                swaps = 0;
                compares = 0;  // the variables I need
                nevents = 0;
                events = new SortEvent[1000];  // to use
        public Sortable getRecord() {
             // and this is where I need the record to be constructed
           // then another class will call this record which will keep track
          // of compares and swaps
              return ;
         Thanks for any help anybody can give me

    Why do you have a field that's the same type
    (implements the same interface) as the class itself?
    This is possible, of course, but what are you hoping
    to achieve by doing so?The interface was pre set-up by my professer. Here is the interface
    public interface Sortable  extends Stringable {
        public int size(); // Number of objects to sort
        public boolean inOrder(int i, int j); // are objs i and j in order?
        public void swap(int i, int j); // Swap objects at i and j
        public Stringable getS(int i);  // For debugging - make an
                                      // object being sorted stringable
    }>
    Your code would be easier to read, both for the
    person grading your homework and for anyone who wants
    to help you here, if you chose variable names that
    have meaning. "a" doesn't qualify.What "a" is suppose to be is an object that is sortable. So when I use a sorting
    algorithim it will sort "a". This part was also setup by my proffeser.
    >
    Where do you expect to get all the data that will go
    into those fields?I should've put the entire class here before, instead of just the constuctor
    here it is:
    public class SortableSpy implements Sortable {
        public int t;
        public Sortable a;
        public int swaps;
        public int compares;
        public SortEvent events [];
        public int nevents;
        public SortableSpy(Sortable arr) {
                a = arr;
                swaps = 0;
                compares = 0;
                nevents = 0;
                events = new SortEvent[1000];
        public Sortable getRecord() {
              return a;
         // ** construct a SortRecord from the instance variables
        public String brief() { // or here
                return "Number Of Events" + this.hashCode() + " (" + nevents + ")";
        public String verbose( ) {
              return "Number Of Compares" + this.hashCode() + " (" + compares + ")" +
              "Number Of swaps" + " (" + swaps + ")";
        public boolean inOrder(int i, int j) {
            compares++;
            SortEvent ev = new SortEvent();
            ev.i = i;
            ev.j = j;
            ev.e = EventType.Compare;
            events[nevents] = ev;
            nevents++;
         return a.inOrder(i,j);
        public void swap(int i, int j) {
                int temp = i;
                i = j;
                j = temp;
        public int size() { return nevents;};
        public enum EventType {compare, swap;
         public static Event Compare;}
        private class si implements Stringable {
                private int i;
                public si (int j) { i = j; };
                public String brief() { return " " + i;}
                public String verbose() { return this.brief();}
        public Stringable getS(int i) {
                return  a;
    }>
    getRecord may be better named "createRecord", if I
    understand what you're trying to do (I may not). But
    it sounds like this name may have been specified by
    your professor.
    Yeah get record is supose to return the number of times an
    algorithm swaps and compares objects during the sorting process
    sort of like spying in, as he described
    I get the impression that you've misunderstood a
    homework assignment.Unfortunaty I'm starting to think so myself, but thanks to both of you guys
    for the help you've giving me so far.

Maybe you are looking for

  • Yoga 2 Pro - Keyboard Not Working

    My issue is that the keyboard of my Lenovo Yoga 2 Pro disables itself intermittently in Laptop Mode. I purchased this laptop (i7 cpu, 256GB SSD, 8GB memory) from BB a week ago and get it replaced twice (3 different units) and all had the same issue.

  • The server was unable to save the form at this time. Please try again

    Having created a new custom list (even with only a text field) I am unable add new items to the list - the error message is Unexpected response from server. The status code of response is '0'. The status text of response is ''. when in 'quick edit'.

  • Extend Material by Plant

    Hi Gurus, I need to extend large no of materials to other plant in the same sales org and distribution channel. If I have few materials can be extended to other plant each one  by going thru MM01, copy material from plant, sales org, dist channel. Ki

  • How to make "SQLPLUS" show me the Brazilian accented characters correctly?

    Hi, I have a Oracle9i instance, with this configurations. PARAMETER VALUE NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET WE8MSWIN1252 NLS_CALENDAR GREGORIAN NLS_DATE_FORM

  • Couldn't resolve the host name (AGAIN!!!!​)

    I get this error alot! I've searched all kinds of forums and tried so many things that sometimes work (e.g., clear cache, restart). This is a common problem that renders the Playbook useless. It's so frustrating when you need to quickly jump online t