Cryptography: strange msdn sample code, help please....

Apparently that line of code does nothing, to continue the discussion
I would like to know your guys opinion of MS and the level of security they provide, I assumed everything was top-notch, but looking through their usage of their own libraries it appears they are incompetent.
Can I get some opinions on this, I have updated the question to a discussion
ORIGINAL QUESTION - EVERYTHING BELOW (irrelevant):
I have been able to create a complete class for network server and client TCP/IP unlimited secure data transmission using RSA/AES (.NET framework cryptography only), and am implementing an EC/DH version  (.NET framework cryptography only). Everything
is working ok, I was just curious: on the VB example on this page:
https://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdiffiehellmancng.aspx
What is the purpose of this line:
Dim k As CngKey = CngKey.Import(bob.bobPublicKey, CngKeyBlobFormat.EccPublicBlob)
On this page in the VB example??
EDIT reason: forum bug correction
EDIT2: I have noticed that the people writing the msdn samples do not understand the underlying cryptography, mostly based on their naming of variables. For the most part their usage follows the federal standards. Should I be worried that MS might not be
properly implementing the .NET cryptography algorithms?

You have completed the class and everything seems fine, you sent several GB of data through the class and it appears to be as secure as the RSA version. However, you found a line in a sample that isn't needed so you are concerned that they may be incompetent
and the .NET crypto libraries may not be secure. Is that an accurate description ?
I listed a single example, I have found dozens of them - including many examples which break the security rules and no information is given that it is doing such.
Did you have any opinion or you just want to stir up arguments???
I think the code is fine. I programmed a windows phone application myself and the samples are okay but most of the Microsoft samples are starter points and in some they clearly state that and not to use the code in production machines (if you have not noticed
that in the MSDN programmer documentation you probably are new to Microsoft programming or have only been programming a few years on their platforms). This excludes the GUI controls included with some of the samples for windows application which
are expected to work. They are one of the few and only rare exceptions to this rule. vb.NET 0.0 is right Microsoft is slow sometimes to stay modern but the libraries are effective.
Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
- Yoda. Blog - http://www.computerprofessions.co.nr
BTW, COM is still a pain and the device drivers/kernel components are becoming better in Microsoft software but its a good progression right now.
Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to
suffering - Yoda. Blog - http://www.computerprofessions.co.nr

Similar Messages

  • HT5622 I have set up my ipad but cant remember the 4 digit code I put in . I cloud does not seem to have any record of me and the ipad mini keeps locking me out as i try different codes - help please

    Help please I have just got my Ipad Mini and set it up but cant remember the code I put in. I cant access settings or anything else as it has locked me out. Ive treid Icloud but it doesnt recognise tht I have registered. Can anyone give me straightforward instructions on how to start again please

    This is the guidance from Apple:
    http://support.apple.com/kb/HT1212
    Barry

  • Sample code help

    Hi All!
    I am getting a .txt file from legacy systems.Now i have to read that file and put the values into internal tables using datasets for further processing.
    Can anybody give me sample code on this.
    Regards
    Pavan

    Hi pavan,
    Code like this...
    <b>data : begin of file occurs 0,
             v_mara(255),
           end of file.
    call function 'GUI_UPLOAD'
      exporting
        filename                      = 'C:\legacy.TXT'
       filetype                      = 'ASC'
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = file
            loop at file.
             write : file-v_mara.
              endloop</b>.

  • PHP/mySQL code help please

    Hi all,
    Thanks to David Powers fab tutorial I am now well on my way to competeing my first dynamique website using PHP/mySQL, (thanks David ), however I am stuck on one particular area....can anyone please help?
    I know that the mySQL database uses the format YYYY/MM/DD for dates, and that is fine. I've sorted out how to display in a more regular format (eg. 1st September 2011) for my application, but I am stuck on how to convert a more regular formatted date entered by the site user into the mySQL format.
    Ideally I would like for the users entry or say either 1/9/11 or 1-9-11 (or something along those lines, to be recognised and displayed on the entry form, but to have a backend function that converts the data to mySQL format. I seem to be reading plenty of forum posts which say this can be done, but unfortunately I can't quite seem to fathom how, or where the code should sit. Would someone mind taking a look at my code page to actually identify what I need to insert, and equally as importantly...where!!!
    Along these lines...is it possible to have a mini-calendar date picker that could be embedded next to the date entry field to ensure that a valid date is entered and in the correct format? Where could this be sourced?
    Thanks in advance of some much needed help
    Mark

    This is becoming really frustrating for me (so god knows how I am to you!!!!), but I usually pick things up so fast and yet this whole PHP/SQL thing is eluding me!!
    I can see (I think) how the code would work, but am struggling to see where it fits into place with my own Dreamweaver 'Update Record' code, as follows. I have spent a couple of days trawling through PHP.net and various other sites and forums before bringing my stupidity to the public domain, but I just can't seem to crack it.
    This one last time then i'll leave you in peace??????
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
        $updateSQL = sprintf("UPDATE gig_guide SET `date`=%s, town=%s, venue=%s, private_or_public=%s, start_time=%s WHERE `index`=%s",
                           GetSQLValueString($_POST['date'], "date"),
                           GetSQLValueString($_POST['town'], "text"),
                           GetSQLValueString($_POST['venue'], "text"),
                           GetSQLValueString($_POST['type'], "text"),
                           GetSQLValueString($_POST['start_time'], "text"),
                           GetSQLValueString($_POST['index'], "int"));
      mysql_select_db($database_online, $online);
      $Result1 = mysql_query($updateSQL, $online) or die(mysql_error());
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_updatePost = "-1";
    if (isset($_GET['index'])) {
      $colname_updatePost = $_GET['index'];

  • Iframe shows only code - Help, please!

    I'm on OS X 10.4.5 and have designed a website that uses iframes (this is a must as there is a lot of content and I do not want the page bigger than the set size, so I need a way to scroll the content within the page size (955x600). I use Firefox for myself (and it looks great) but the person I'm doing the site for uses Safari. When he sees it, needless to say, it isn't going to look right. All it's displaying is the code for the iframe page as if I'm viewing the source for the page (within the iframe on the main page). Have they fixed the problem with iframes in Safari? And if so, what do I need to make it work in both browsers? Or is there another design tactic I can use instead of iframes?
    Any help or suggestions are very appreciated.
    Thanks!
    Mac mini   Mac OS X (10.4.5)  

    I actually found my error. It wasn't code within the file but I had saved it as a .php file (based on a file I found at another website that used it for their iframe) and when I changed it to .html it worked! But thanks, again, for your advice because it caused me to research iframes and I found they were all using .html/.htm files to call on.

  • Bar Codes(Help Please)

    Hi,
    I want my application to read bar codes of items and to store them to my database.Please, can you tell me if it is possible with Forms6 or Forms6; if so, please explain me the procedure even I want to insert records or I want to make updates(for example the quantity of an item with its bar code).
    Thank you to answer me.Regards.

    You mean store the image of the bar code ? Why do you want to do that ? A bar code is just the graphical representation of a number. Use a bar code scanner to translate the bar code to a number and store that. It will be much better. At least then you will be able to search for your product by that number and update the record with the qty as and when you wish.

  • HT4623 icant get ipod touch to turn on. the picture says to connect to itunes. when i connect to computer it says to enter pass code but will not gog to screen to enter code.help please

    i can not get ipod touch to turn on.  it shows picture to  connect to itunes but it says to enter  pass code but will not gogto screen to enter code.  HELP PLEASE

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...

  • Need a little code help please

    I am writing a program that shows a house with some clouds moving a the top. I have all the class compiling correctly, when it runs the clouds and background are painted over the house. I think I am just missing something small here. Can someone help me please. Thanks.
    public class BallApp extends javax.swing.JFrame {
      public BallApp (String title) {
        super(title);
        this.setSize(600, 450);
        this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
        this.add(new BallPanel());
        this.setVisible(true);
        this.add(new LinePanel());
        this.setVisible(true);
      public static void main (String [ ] args) {
        BallApp app = new BallApp ("Chapter 7: BallApp");
    public class LinePanel extends javax.swing.JPanel
       private SmartLine _myLine, _myLine2, _myLine3;          //instance variables for lines
       private SmartLine _myLine4, _myLine5;
       public LinePanel()
         super();
         _myLine = new SmartLine(210, 290, 210, 365, java.awt.Color.BLACK);  //creates lines sets position/color
         _myLine2 = new SmartLine(290, 290, 290, 365, java.awt.Color.BLACK);
            _myLine3 = new SmartLine (210, 365, 290, 365, java.awt.Color.BLACK);
         _myLine4 = new SmartLine (200, 300, 250, 245, java.awt.Color.BLACK);     
         _myLine5 = new SmartLine (250, 245, 300, 300, java.awt.Color.BLACK);
         this.setBackground(java.awt.Color.BLUE);     //sets background color
       public void paintComponent (java.awt.Graphics aBrush)
         super.paintComponent(aBrush);          //method paints lines on to panel
         java.awt.Graphics2D betterBrush = (java.awt.Graphics2D) aBrush;
         _myLine.draw(betterBrush);
         _myLine2.draw(betterBrush);
         _myLine3.draw(betterBrush);
         _myLine4.draw(betterBrush);
         _myLine5.draw(betterBrush);
    } //end of class
    public class BallPanel extends javax.swing.JPanel implements Mover {
        private final int INIT_X = 75; // attributes
        private final int INIT_Y = 75;
        private final int INIT_X1 = 0;
        private final int INIT_Y1 = 0;
        private final int DIAMETER = 60;
        private final int INTERVAL = 100;
        private BouncingBall _ball, _ball2; // components
        private MoveTimer _timer;
        public BallPanel () {
         super();
         _ball = new BouncingBall (java.awt.Color.white, this); 
         _ball2 = new BouncingBall (java.awt.Color.white, this);
         _timer = new MoveTimer(INTERVAL, this);
         //this.setBackground(java.awt.Color.blue);
         _ball.setLocation(INIT_X, INIT_Y);
         _ball.setSize(DIAMETER, DIAMETER);
         _ball2.setLocation(INIT_X1, INIT_Y1);
         _ball2.setSize(DIAMETER, DIAMETER);
         _timer.start();
        public void move() {
         _ball.move();
         _ball2.move();
         this.repaint();
        public void paintComponent (java.awt.Graphics aBrush) {
         super.paintComponent(aBrush);
         java.awt.Graphics2D betterBrush =
             (java.awt.Graphics2D) aBrush;
         _ball.fill(betterBrush);
         _ball2.fill(betterBrush);
    }

    ok.
    public interface Mover {
        public void move();
    public class BouncingBall extends SmartEllipse implements Mover {
        private int _changeX, _changeY; // attributes
        private final int MOVE_LEN = 5;
        private javax.swing.JPanel _panel; // peer object (and container)
        private javax.swing.Timer _timer;
        private double nextY;
        public BouncingBall (java.awt.Color aColor,
                             javax.swing.JPanel aPanel){
         super(aColor);
         _changeX = MOVE_LEN;
         _changeY = MOVE_LEN;
         _panel = aPanel; nextY=75;
        public void move() {
         int nextX = (int)this.getX() + _changeX;
         if (nextX <= this.getMinBoundX()) {
             _changeX *= -1;
             nextX = this.getMinBoundX();
         else if (nextX >= this.getMaxBoundX()) {
             _changeX *= -1;
             nextX = this.getMaxBoundX();
         this.setLocation(nextX, nextY);
        public int getMinBoundX() {
         return (int) _panel.getX();
        public int getMaxBoundX() {
              return (int) (_panel.getX() + _panel.getWidth()
                    - this.getWidth());
    public class MoveTimer extends javax.swing.Timer {
        private Mover _mover; // peer object
       public MoveTimer (int anInterval, Mover aMover) {
          super(anInterval, null);
          _mover = aMover;
          this.addActionListener(new MoveListener());
       private class MoveListener implements java.awt.event.ActionListener {
         public void actionPerformed(java.awt.event.ActionEvent e){
            _mover.move();
    public class SmartLine extends java.awt.geom.Line2D.Double
       private java.awt.Color _lineColor;
       private final int STROKE_WIDTH = 2;          //makes width of line constant
       private double X1, Y1, X2, Y2;          //set as instance variables that are doubles
       public SmartLine (double X1, double Y1, double X2, double Y2, java.awt.Color aColor)
         _lineColor = aColor;          //constructor
         setLine(X1,Y1,X2,Y2);
         X1 = 0;                    //sets intial positions to 0
         Y1 = 0;
         X2 = 0;
         Y2 = 0;
       public void setLineColor (java.awt.Color aColor)
         _lineColor = aColor;          //method for setting the color of the lines
       public void setLocation (double X1, double X2, double Y1, double Y2)
         this.setLine (getP1(), getP2()); //method for setting location of lines             
       public void draw (java.awt.Graphics2D aBrush)
         java.awt.Color savedColor = aBrush.getColor();        //method draws the line with color set
         aBrush.setColor(_lineColor);
         java.awt.Stroke savedStroke = aBrush.getStroke();
         aBrush.setStroke(new java.awt.BasicStroke(STROKE_WIDTH));
         aBrush.draw(this);
         aBrush.setStroke(savedStroke);
         aBrush.setColor(savedColor);
    } //end of class

  • Code Help Please.

    I am havong trouble getting equations to work on my calculator.
    I have the basic going, but as soon as I try to add any more to it at this point it will not compute.
    I need to add commission to the 20% and 5% based on the T1 and T2 x $25.00.
    Can a figure only be used once in any equations?
    I need to use the input for T1 to generate different #'s in 2 other fields.
    Here is a link to it,
    www.thepowderzone.com/Calculator.htm
    Could someone please help?

    Bump!!

  • Trouble with some code  help please

    i need help with this program i have to do a webclient in java i will put here the instructions that were given to me and then the work i have been doing so you can have an idea of what i'm doing any help you give me i will be very thankful thanks.
    Here are the instructions
    The class WebClient will represent a simple web client. This class must provide the following functions:
    1. connect to a web page using a URL
    2. obtain or get the response from a server
    This funcionality will be provided by the public interface of the class:
    - WebClient( )
    Creates a new object of the class
    - void setURL(String url)
    Used to indicate the URL of the web page
    - String getResponse()
    Gets the response of the server to the page who's URL was indicated(Example of a response: HTTP/1.0 200 OK)
    You have to implement the following:
    1. The class WebClient with an public interface that Includes the methods specified upwards, in a file called WebClient.java
    2.A class WebClientTester, in a file called WebClientTester.java, with a main program that minimun have to:
    a) Create a instance of WebClient
    b) Using 3 valid URL's
    - Invoque setURL to indicate the URL of the server
    - Invoque getResponse to get the response of the server
    - display in the console the response of the server
    c) Using 3 invalid URL's (this is the correct server but the page does not are on the server)
    - Invoque setURL to indicate the URL of the server
    - Invoque getResponse to get the response of the server
    - display in the console the response of the server
    As a tip they give me that i can use the clases HttpURLConnection and URL to implement WebClient. It is recommended to save the URL in an instance field of WebClient.
    Those are the instructions now i will write here what i have do until now
    This is the WebClient Class:
    public class WebClient
         public String Wecli;
         public WebClient()
              Wecli = new String();
         public void setURL(String url)
         /** need code here */     
         public String getResponse()
         /** need code here */     
         public void display()
              System.out.println(Wecli);
    what i need there is the methods constructors or whatever are so that setURL and getResponse work and do what are suposed to do.
    Here is The WebClientTester class
    public class WebClientTester
         public static void main(String[] args)
              WebClient wbcl = new WebClient();
              wbcl.setURL(http://www.nba.com);
              wbcl.getResponse();
              wbcl.display();
              wbcl.setURL(http://www.mlb.com);
              wbcl.getResponse();
              wbcl.display();
              wbcl.setURL(http://www.msn.com);
              wbcl.getResponse();
              wbcl.display();
         wbcl.setURL(http://www.nba.com/baseball.html);
              wbcl.getResponse();
              wbcl.display();
         wbcl.setURL(http://www.mlb.com/basketball.html);
              wbcl.getResponse();
              wbcl.display();
         wbcl.setURL(http://www.msn.com/practice.html);
              wbcl.getResponse();
              wbcl.display();
    that is basically what i think i need so that the program works any other help you can give me will be very useful thanks for reding it and give your opinions.

    Those are the instructions now i will write here what i have do until nowLooks like you've posted your homework instructions, done less than the bare minimum to make it look like you thought about this problem, and now you want strangers to help you cheat by giving you the code that does the work so you can hand it in as your own.
    %

  • Need code help, please

    I am making a program where there are 3 ellipses. For two of the ellipses I want they to be able to be dragged across the screen when the mouse is pressed on them, they will also change color. For the third ellipse I want all three ellipses to move and change color when I click on it. I have the two ellipses doing what I want but I cant get a third move them all. Thanks.
    public interface Draggable
       public void setColor      (java.awt.Color aColor);
       public void setLocation   (int x, int y);
       public void mousePressed  (java.awt.event.MouseEvent XX);
       public void mouseDragged  (java.awt.event.MouseEvent XY);
       public void mouseReleased (java.awt.event.MouseEvent XZ);
    import wheels.users.*;
    public class DraggableSun extends Ellipse implements Draggable
       private java.awt.Point _lastMousePosition;
       public DraggableSun (int x, int y)
          super (java.awt.Color.YELLOW);
          _lastMousePosition = new java.awt.Point ();
          this.setLocation (x, y);
       public void mousePressed  (java.awt.event.MouseEvent mouseEvent)
          _lastMousePosition = mouseEvent.getPoint ();
          this.setColor (java.awt.Color.BLUE);
       public void mouseDragged  (java.awt.event.MouseEvent me)
          java.awt.Point currentPoint;
          int diffX, diffY;
          currentPoint = me.getPoint ();
          diffX = currentPoint.x - _lastMousePosition.x;
          diffY = currentPoint.y - _lastMousePosition.y;
          this.setLocation
             this.getXLocation() + diffX,
             this.getYLocation() + diffY
          _lastMousePosition = currentPoint;
       public void mouseReleased (java.awt.event.MouseEvent me)
          this.setColor (java.awt.Color.YELLOW);
    import wheels.users.*;
    public class Leader extends DraggableSun
       private MovableSun follower1;
       private MovableSun follower2;
       public Leader(int x, int y, MovableSun follower1, MovableSun follower2)
         super(x,y);
         this.follower1 = follower1;
         this.follower2 = follower2;
       public void mousePressed (java.awt.event.MouseEvent e)
         super.mousePressed (e);
         this.setFillColor (java.awt.Color.BLUE);
         //follower1.setFillColor (java.awt.Color.BLUE);
         //follower2.setFillColor (java.awt.Color.BLUE);
      // public void mouseDragged (java.awt.event.MouseEvent e)
         //super.mouseDragged(e);
       }Not sure if mouseDragged method in last class should be the same as the 2nd class, last class isnt finished, got lost.

    sorry, but I have gotten this far in the Leader class. It complies but all three don't move when drag the one. Any help would and I would be grateful.
    import wheels.users.*;
    public class Leader extends DraggableSun
       private DraggableSun _sun;
       private DraggableSun _sun1;
       private java.awt.Point _lastMousePosition;
       public Leader(int x, int y, MovableSun follower1, MovableSun follower2)
         super(x,y);
         this._sun = _sun;
         this._sun1 = _sun1;
       public void mousePressed (java.awt.event.MouseEvent e)
         super.mousePressed (e);
         this.setFillColor (java.awt.Color.BLUE);
         _sun.setFillColor (java.awt.Color.BLUE);
         _sun1.setFillColor (java.awt.Color.BLUE);
       public void mouseDragged (java.awt.event.MouseEvent e)
         super.mouseDragged(e);
         java.awt.Point currentPoint;
            int diffX, diffY;
            currentPoint = e.getPoint ();
            diffX = currentPoint.x - _lastMousePosition.x;
            diffY = currentPoint.y - _lastMousePosition.y;
            this.setLocation
             this.getXLocation() + diffX,
             this.getYLocation() + diffY
         _sun.setLocation
               _sun.getXLocation() + diffX,
            _sun.getYLocation() + diffY
            _sun1.setLocation
               _sun1.getXLocation() + diffX,
               _sun1.getYLocation() + diffY
         _lastMousePosition = currentPoint;
       }

  • Need some code help please

    I am trying to make a sun and planet with the planet orbiting the sun. It is all working but the complier is having a problem with the instance variable _ball in the programs.  Can anyone help me fix this, I think I'm almost there.
    public class MovingBall extends javax.swing.JPanel
        int X0 = 100, Y0 = 100;
        double X2, Y2;
        double r = 10;
        double a = 0;
        double da = .04;
        double ecc = 1;
        double TWOPI = 2 * Math.PI;
        private javax.swing.JPanel _panel;
        public MovingBall (java.awt.Color aColor, javax.swing.JPanel aPanel)
         super();
         _panel = aPanel;
         X2 = X0 + r * Math.cos(a);
         Y2 = Y0 + r * Math.sin(a);
         //this.setLocation(X2, Y2);
        public void move()
         a = a + da;
         a = a % TWOPI;
         X2 = X0 + r * ecc * Math.sin(a);
         Y2 = Y0 + r * ecc * Math.sin(a);
         //this.setLocation (X2, Y2);
        public boolean inFront()
         return (a <= Math.PI);
        public void SetCircle(int x, int y)
         X0 = x;
         Y0 = y;
         //ecc = 1.0 - (double)pct/100;
    public class MovingBallPanel extends javax.swing.JPanel implements Mover, Controller
        private final int INIT_X = 250;
        private final int INIT_Y = 200;
        private SmartEllipse _sun;
        private Sky _sky;
        private final int SUN_DIAMETER = 60;
        //private MovingBall _ball;
        private final int PLANET_DIAMETER = 35;
        private final int ORBIT_DIAMETER = 185;
        int _da = 1;
        int _ecc = 1;
        private final int INTERVAL = 100;
        private MoveTimer _timer;
        public MovingBallPanel()
         super();
         this.setBackground(java.awt.Color.BLACK);
         _sun = new SmartEllipse(java.awt.Color.YELLOW);
         _sun.setSize(SUN_DIAMETER, SUN_DIAMETER);
         _sun.setLocation(INIT_X - SUN_DIAMETER/2, INIT_Y - SUN_DIAMETER/2);
         //_ball = new MovingBall();
         //_ball.setCenter((INIT_X - PLANET_DIAMETER)/2, (INIT_Y - PLANET_DIAMETER)/2);
         //_ball.setAngleIncrement(_da);
         _sky = new Sky();
         _timer = new MoveTimer(INTERVAL, this);
         _timer.start();
        public void move()
            //_ball.move();
            this.repaint();
        public void go (boolean g)
         //if (g) _ball.setAngleIncrement(_da);
            //else _ball.setAngleIncrement(0);
        public void setSpeed(int degrees)
         _da = 2 * degrees;
         //_ball.setAngleIncrement(_da);
        public void setEccentricity(int pct)
         _ecc = pct;
         //_ball.setEccentricity(_ecc);
        public void paintComponent(java.awt.Graphics aBrush)
         super.paintComponent (aBrush);
         java.awt.Graphics2D betterBrush = (java.awt.Graphics2D) aBrush;
         _sky.paintSky(betterBrush);
         _sun.draw(betterBrush);
         _sun.fill(betterBrush);
         //_ball.fill(betterBrush);
    }I think only those classes affect the problem. Thanks.

    They all complie separately, but when I complie PlanetApp which creates the frame it has the problem. It says it can't find the symbol for ball for all the methods that I call with it, such as ball.setEccentricity(...) or _ball.fill(...).  Here is the PlanetApp class.  Thanks.
    public class PlanetApp extends javax.swing.JFrame
        ControlPanel _controlPanel;
        MovingBallPanel _movingBallPanel;
        public PlanetApp (String title)
         super(title);
         this.setSize(600,500);
         this.setBackground(java.awt.Color.BLACK);
         this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
         _movingBallPanel = new MovingBallPanel();
         _controlPanel = new ControlPanel(_movingBallPanel);
         this.add(_movingBallPanel, java.awt.BorderLayout.CENTER);
         this.add(_controlPanel, java.awt.BorderLayout.SOUTH);
         this.setVisible(true);
        public static void main (String [] args)
         PlanetApp app =  new PlanetApp("Lab 7");
    }

  • Need a little beginner code help, please

    How do I modify the following code so that a different button
    (like btnAbout) can use the same function?
    btnHome.addEventListener(MouseEvent.ROLL_OVER, over);
    btnHome.addEventListener(MouseEvent.ROLL_OUT, out);
    function over(event:MouseEvent)):void {
    btnHome.gotoAndPlay(2);
    function out(event:MouseEvent):void {
    btnHome.gotoAndPlay(7);
    }

    use the attach code option to display code in this forum:

  • Cant acess the sample code

    I am not able to acess the sourcefiles on the page
    http://otn.oracle.com/sample_code/tech/java/jsp/htdocs/jspdemo/jspdemosrc.html
    Any help on this would be appreciated.
    Thanks

    Hi Asha,
    The page you are referring to was with respect to a older version of the JSP sample code. Please refer to the updated samples at the location: http://otn.oracle.com/sample_code/tech/java/jsps/ojsp/content.html
    These samples are certified against Oracle9iAS Containers for J2EE(OC4J). You can download the JAR file(OjspSamples.jar) from this page and deploy the EAR file in it with OC4J. The Install.html file in the JAR file has instructions to setup the samples with OC4J. Once setup, all the source files can be accessed through the application pages itself. Hope that helps.
    Regards,
    Srinivas
    OTN Team.

  • Survey creation abap code help needed

    hello experts,
    I need to create a survey in crm, by taking values from end-user from a webpage
    A sample code help is needed.
    Thanks in advance

    Take a look at this SAP note - It does a pretty good job of detailing the steps for you.  No coding necessary, it worked out of the box for us after patching this note.
    https://service.sap.com/sap/support/notes/638320

Maybe you are looking for

  • IS-U contract account field under R/3 quotation side

    Dear Friend, As I have a requirement called IS-U contract account field should be available in R/3 quotation side. what is the configuration for this, and I did the config for IS-U and SD side integration(reference field under FPP1), but the contact

  • Trying to update my ipod touch. What am I doing wrong?

    I have updated itunes to the current version but it still won't let me update my ipod touch. Itunes says I am running the latest version 4.1.0.  But my ipod says I can't download apps unless I upgrade to iso6.0. What am I doing wrong? I've looked at

  • Speeding up the upgrade

    i am upgrading from 4.7 enterprise to ecc6 we are using resource time minimized and it takes forever. I know there are a couple of parameters during the upgrade that canbe increased to speed up the upgrade. Is it the maximum number of batch processes

  • How to register macbook, i skip this step first time?

    when i turn on my macbook for the first time in registration chapter i cant use @ for my mail, so i skip this chapter, and now i want to finish registration , how to go back to registration step?

  • Dropped frames (tearing me apart)

    I recently began to use FC 5.0 on my MAC BOOK PRO. I'm new to the program. During playback, I'm getting the dropped frames warning when I try to insert a transition such as fade in, etc, or even music...everytime. I messed w/ the RT settings, but tha