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.

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

  • 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'];

  • 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.
    %

  • Menu Bar Code Help

    I am new to Java and am trying to make a menu bar applet for a web page. I think i have the majority of it finished there are three things i could not figure out and i was wondering if someone might be able to help. The things are: Opening Urls in the browser, the color of the highlighter on menu won't change, i want the menu to automatically pop down when the mouse is over the buttons.
    Here is my code so far:
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.JComponent.*;
    public class MenuApplet extends JApplet implements ActionListener, MouseListener
         public void init()
              /* builds menus */
              JMenuBar WebMenuBar;
              JMenu menu, FinanceSubMenu;
              JMenuItem item1, MenuChoice;
              WebMenuBar = new JMenuBar();
              WebMenuBar.setBackground(Color.RED);
              WebMenuBar.setFont(new Font("SanSerif", Font.BOLD, 14));
              WebMenuBar.setForeground(Color.WHITE);
              WebMenuBar.setBorder(BorderFactory.createRaisedBevelBorder());
              menu = new JMenu();
              menu = createMenu("Finance");
              WebMenuBar.add(menu);
              item1 = new JMenuItem();
                   item1 = createItem("Graphs");
                   menu.add(item1);
                   item1 = createItem("Policies");
                   menu.add(item1);
              FinanceSubMenu = new JMenu("37 Key Exp ");
              FinanceSubMenu.setFont(new Font("SanSerif", Font.BOLD, 14));
              FinanceSubMenu.setForeground(Color.WHITE);
    FinanceSubMenu.setBackground(Color.RED);
                   item1 = createItem("Banbury Raw Exp");
                   FinanceSubMenu.add(item1);
                   item1 = createItem("Curing Raw Exp");
                   FinanceSubMenu.add(item1);
                   item1 = createItem("Waste Disposal");
                   FinanceSubMenu.add(item1);
                   menu.add(FinanceSubMenu);
              menu = createMenu("Engineering");
              WebMenuBar.add(menu);
              menu.getPopupMenu();
              item1 = createItem("Reports");
              menu.add(item1);
              item1 = createItem("Travel");
              menu.add(item1);
              getContentPane().add(WebMenuBar);
         public JMenu createMenu (String name)
              /* creates menus */
              JMenu menu;
              menu = new JMenu(name);
              menu.setBorder(BorderFactory.createRaisedBevelBorder());
              menu.setFont(new Font("SanSerif", Font.BOLD, 16));
              menu.setForeground(Color.WHITE);
              menu.setBackground(Color.RED);
              menu.addMouseListener(this);
              return menu;
         public JMenuItem createItem (String name)
              /*creates menu items */
              JMenuItem MenuChoice;
              MenuChoice = new JMenuItem(name);
         MenuChoice.addActionListener(this);
         MenuChoice.setActionCommand(name);
         /* MenuChoice.setColor; - this also does not work - i want to be able to change the color that
                                                 comes up when the item is highlighted currently it is an ugly gray like color,
                                                 which i know can be done because other
                                                 web pages have it, could not find a method relating to this.
         MenuChoice.setBackground(Color.RED);
         MenuChoice.setFont(new Font("SanSerif", Font.BOLD, 14));
         MenuChoice.setForeground(Color.WHITE);
         return MenuChoice;
         /*processes actions*/
    public void actionPerformed(ActionEvent e)
    if (e.getActionCommand().equals("Graphs"))
                        try
                             URL url = new URL(getDocumentBase(), "http://www.Yahoo.com/");//just to test the URL
                             MenuApplet.getAppletContext().showDocument(url);
                        } catch (MalformedURLException e)
                        /*try
                             URL home = new URL("http://app7-ok-plt/left.htm");
                        URLConnection homeConnection = home.openConnection();
                        } catch (IOException err)
                        System.err.println("Couldn't get I/O for the connection to: home.");
                   System.exit(1);
         else
              if (e.getActionCommand().equals("Policies"))
                        System.out.println("good boy");
         else System.out.println("Not so good");
         public void mousePressed(MouseEvent e)
         /* Empty method definition. */
         public void mouseReleased(MouseEvent e)
         public void mouseEntered(MouseEvent e)
              Object source;
              String test;
              source = e.getSource();
              test = source.toString();
         if(test.endsWith("Engineering]"))
                   System.out.println(e.getSource());
         else if (test.endsWith("Finance]"))
                   System.out.println("well click or something");
         /* Empty method definition. */
         public void mouseExited(MouseEvent e)
         public void mouseClicked(MouseEvent e)
    and here is the html to run it in case you need that:
    <html>
    <head>
    <meta name="GENERATOR" content="Me">
    <meta name="ProgId" content="Stuff">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>top page</title>
    <base target="contents">
    </head>
    <body bgcolor="#FF0000">
    <p>
    <applet code="menuapplet.class" width="80%" height="30">
    </applet>
    </p>
    </body>
    </html>
    Thanks in Advance.

    a scroll bar is not appearing on the left Remove line 11 of stylesheet.css (position:fixed)
    my spry menu is right justified instead of left
    Change line 96 of stylesheet.css to read float:left
    Gramps

  • 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.

  • 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!!

  • Remove partial colour cast caused by out of focus bars? help please!!!

    I have several lovely images with a partial green horizontal colour cast caused by very out of focus bars, can anyone help me remove these? (without cloning!)
    as shown here, across tigers head!
    Thanks so much
    Emma

    why no cloning? they're an endangered species, do you want them to die out?
    On a more serious note, you can fix this with a Curves adjustment layer with a Layer Mask made with the Gradient Tool set to Reflected. Set two sample points in the tiger's head, one in a white part of his fur and one in a black stripe and then modify the channels in those two points while looking at the Info panel to make sure that you get those two points neutral. After that you will need to modify the RGB "channel" to get it to blend in with the rest of the image. It should look something like this:
    And here's my result:

  • How can I reduce the size of the new io7 safari search bar? Help please!

    Hi,
    The new layout means the Safari search bar is takIng up about an inch and a half of my screen! The old io6 search bar was more slimline. Is there any way to go back to the old layout? As it is, my viewing of web pages is limited by having so much space taken up by the search bar.
    Any advice much appreciated!

    Feedback to Apple
    http://www.apple.com/feedback

  • 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;
       }

  • 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

  • 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:

Maybe you are looking for

  • PDF file VIEW & PRINT differences: Preview 4.2 & Acrobat 9.3

    My original two-page OpenOffice document (.odt file extension) exported to PDF file format (.pdf file extension). I used Acrobat 9.3 to force the document to display both pages as continuous facing - so far, so good. I've found two issues - neither o

  • Adobeform

    Hi, I had created a smartform and converted into adobe form. While activating the adobe form I had a error "SOAP Framework Error : SOAP Runtime Exception : CSoapExceptionTransport : HTTP receive failed with exception communication_failure" Please hel

  • Windows Search Not Working

    Hi, Windows search (Windows Explorer) does not return anything everytime i am looking up for some files that i know exists in my laptop. Could anyone help me with this please? Thx. Youjine Config : Fujitsu LifeBook S752 OS : Windows 7 SP1

  • How to read RMAN data into an ORACLE Table?

    Hallo, With regards to RMAN, how should we store the data into a database table, from the commands which can run only on RMAN prompt without using Recovery Catalog? For Example: RMAN> Report need backup days 3; RMAN DATA: RMAN-03022: compiling comman

  • 2 Airport Expresses, only one can connect

    Have 2 airport expresses....if I turn off password protection on the router, I can connect them both with zero issues through the airport utility.  As soon as I change back to password protection, I can only get one to be "seen" by the airport utilit