Using OOP across multiple platforms – how to manage platform-specific functions

I am writing OOP software that acquires data from many cRIO chassis and transmits that information to a remote machine. For testing purposes, we want some of the cRIO chassis to be “Real” and the rest “Simulated”. My project consists of a Parent cRIO chassis class, along with two child classes (Real cRIO and Simulated cRIO). There is also a Parent cRIO method, along with numerous subVI parent and child methods (all with Dynamic object inputs/outputs).  Each instance of a cRIO object is created by taking the Parent cRIO method and wiring into it either a Real or a Simulated class. Real instances use child methods that call RT functions, and Simulated instances use functionally-equivalent child methods that avoid RT function calls.
The software is fine as long as the real and simulation instances are directed to RT targets. However, I would like to direct the simulation instances to a Windows target; when I do so, I get complaints about RT functions being called on the Windows target. Is there a way to configure my Project so that the compiler will allow my Simulation instances to run on a Windows machine?
Thank you for any assistance you can offer.

Just throwing this out there, not sure, but have you tried "disable autodeploy variables" on the crio units within the project?  
 Also, another thing you could try is wrapping your cRIO functions in a conditional structure and check for a targettype== RT.   I'm not sure if this helps but two thoughts i had.
G/L  

Similar Messages

  • What's the best way to upgrade FF 3.6.16 to FF 4 and begin using Sync across multiple platforms?

    I love the look and features of FF 4. I recently bought a new laptop for the road and would like to have my FF environment on it --without recreating all of my bookmarks and passwords on it; so it looks like FF4 is the way to go.
    Seems like there are two ways to do this...
    1) Download FF4 to my desktop (curr. running 3.6.16) and hope that it keeps all my personal browsing info as past FF upgrades have, then add-on Sync, create an account, which I can then use on my new laptop w/o having to re-save a lot of bookmarks and organize a bunch of folders.
    -or-
    2) Start using Sync ( or Xmarks? in 3.6.16) on my desktop, create the account and then access that browsing environment on my laptop (running FF4) then upgrade my desktop to FF4.
    Any recommendation as to which works better, or is less painful?
    Anything to watch out for? or steps I've missed?

    When you upgrade it will use your existing user data including bookmarks, passwords, cookies and browsing history.
    I have been using Firefox Sync since it was in an early development stage about 2 years ago. I have gone through a few upgrades to Firefox since then with no problems during the upgrades. I recommend going to Firefox 4 first because Firefox Sync is built into it so there will be no need to install the add-on.
    If required you can downgrade to Firefox 3.6.16

  • I want to set up a home network to be able to watch my movies and litsen to music across multiple platforms without keeping my laptop connected.

    I want to set up a home network to be able to watch my movies and litsen to music across multiple platforms.  I have movies purchased from itunes as well as movies from my DVD collection that i converted to an .m4v format.  I currently have these movies stored on an external harddrive. To watch a movie on my apple tv I have to ensure my external hard drive is connected to my macbook pro, then play the movie on my macbook pro and "mirror" it to my apple tv.
    Ideally I would like to be able to watch movies from my collection without having to have my laptop on and work from that.  Is it possible to navigate my collection from my Apple TV and play it on my Apple TV.  My macbook pro is the machine I primarily use for work and school it is quite the protological nuissance to have to hook all that up everytime I want to watch a movie.
    My thoughts are that I could take my old dekstop pc, attach an external hard drive to that and make that my "media storage".  If I were to do that would I then be able to watch movies as well as select which movie I want to watch from my library through my apple TV without my macbook pro being in the equation?  Or if I should desire to watch a movie from my library through my Macbook Pro, Iphone 4s, and ipad is that possible?  I basically want to set up my library to be accessible from any of my devices.
    My devices are; the previously mentioned Apple Tv, macbook pro, iphone 4s, ipad 3. I also have a desktop PC running windows 7, xbox 360 and playstation 3 (the xbox and PS3 would be nice if they could too but wouldnt break my heart as they are my roommate's and not mine so I rarely use them.)
    Thank you for any help/advice you guys may have!

    atv's can only access media from
    1. a computer which is turned on running itunes
    2. the internet
    no other options
    and NAS's which say they can work as itunes libs don't work

  • Use LR Across Multiple Drives

    Hi,
    I'm curious to know if LR will support my current image collection, which resides on 2 separate external firewire 800 hard drives. I read somewhere that LR 1.0 would still require a library file to be housed in a single location, and that you could only have a single LR library.
    I would like to work with LR using referenced files, rather than importing my images into the database.
    Thanks!

    Thanks for your quick reply Don. Yes, I have been using LR Beta for awhile now, but I had read that 1.0 did away with having multiple libraries (MacWorld article, I believe).
    Good to know when LR 1.0 ships I can use it across multiple drives.
    Follow up question for you: You mention it works with files stored on or offline. How do you handle moving files from online to offline storage? Is LR "smart" in that it can detect changes in file locations or does it prompt you the item has been moved?
    Thanks!
    Tim

  • I recently purchased the newest nano. I have 3 other nano's and iPad   iPhone, oh and iPod touch. When I plug in nano to my mac I get the message "iPod cannot update because it contains files that are used by another application. How can manage this?

    I recently purchased the newest nano. I have 3 other nano's and iPad   iPhone, oh and iPod touch. When I plug in nano to my mac I get the message "iPod cannot update because it contains files that are used by another application. How can manage this?

    dedonred wrote:
    "iPod cannot update because it contains files that are used by another application.
    It means that nano was used on a third-party software or synced from different computer to sync music. Does that nano show in iTunes? If yes, then restore completely. If not, then you may need to head to Apple Store and see what they can do.

  • How to manage Customer Specific Labelling in SAP?

    Hi there - hope you can help.
    I am looking for some advice on managing Customer specific labelling in SAP.
    Details:
    Each product we sell gets labelled.
    The labels are material and customer specific.
    We currently manage labels (1/ Label Codes and 2/ Label Stock) in an excel spreadsheet - but I am hoping to incorporate it into SAP.
    Looking at the CMIR, I can list the label code in the Customer Description field or in the Search Term field (customer material is already used) - but this doesn't feel correct and would only solve part of the issue.
    Other companies may have a similar requirement - so my question is, how can I manage the customer / material specific labelling in SAP (both codes
    and stock)?
    Many thanks
    Mada

    If EHS is integrated at your clients' place, then I think, you can achieve this requirement as per the below documentation
    Customer-Specific Label - Product Safety (EHS-SAF) - SAP Library
    G. Lakshmipathi

  • How to find a specific function's description?

    Hi,
    I'm now looking at xperf stack trace, I would like to know the description of a specific function. For example, I don't know what does RtlUserThreadStart() function do. How to find such information. I tried to search the function name on MSDN, but nothing
    came up.
    thank you!
    Ah_Chao|| MCSE,VCP,EMCSAe

    could anyone show me some lights on this?
    thanks in advanced!
    Ah_Chao|| MCSE,VCP,EMCSAe

  • How have folks resolved synch across multiple platforms?

    I have a PC for work (Outlook), an MacBook Pro for personal use, and an iPhone.  I am trying to find a way to synch calendars on all devices.  Any suggestions??

    Use a web based service like from google
    https://discussions.apple.com/community/notebooks/macbook_pro?view=documents

  • Executible Jar Across multiple platforms

    Hey All,
    I'm in an Intro-to-Java class and for my final project I created a BreakOut game. I'm hyperlinking to the Jar file here: http://ihoyasaxa.com/breakoutBreakout . The file works fine in my Ubuntu 7.10 system and my Vista RC1 system but when I send it to others who have Mac's, and XP it only shows the frame I initialize and a black background. I have a feeling it has to do with my FileLoad class, but I am not sure.
    I am not sure how you guys feel about downloading the executable jar so I can post the code to the program but it is split across several class files.
    Anyways, any advice is great.
    I added the code:
    package cosc175.Sessa.Final;
    public class BreakOut {
         BreakOutGUI gui = null;
         BreakOutPaint bop = null;
         Blocks blocks = null;
         Pad pad = null;
         public BreakOut(){
              bop = new BreakOutPaint();
              gui = new BreakOutGUI(bop);
              gui.setupFrame();
              blocks = new Blocks(bop);
              //ball = new Ball(gui, bop);
         //     bos = new BreakOutScore();
              //ball = new Ball(gui);
              pad = new Pad(bop, gui);
          * @param args
         public static void main(String[] args) {
              new BreakOut();
    package cosc175.Sessa.Final;
    import javax.swing.*;
    import javax.swing.border.LineBorder;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.net.*;
    import java.text.*;
    import java.util.StringTokenizer;
    public class BreakOutGUI extends JPanel   {
         private static final long serialVersionUID = 1L;
         JFrame f = null;
         JPanel startMenu = null;
         JTextPane tp  = new JTextPane();
         JLabel finalScore = new JLabel();
         BreakOutPaint bop;
         Graphics g;
         Container c;
         Ball ball;
         int checkGame = 0;
         int holdGame = 0;
         int score;
         String [] lineRead = new String[11];
         JPanel [] row = new JPanel[13];
         BufferedWriter saveFile;
         String nameOfHS;
         JButton newGame;
         JButton instructions;
         JButton exitInstructions;
         JButton highScores;
         JButton exitBTN;
         public void btnFormat(JComponent x){
              x.setBorder(new LineBorder(Color.white, 2));
              x.setMinimumSize(new Dimension(300, 50));
              x.setMaximumSize(new Dimension(300, 50));
              x.setPreferredSize(new Dimension(300, 50));
             x.setForeground(Color.orange);
             x.setBackground(Color.GRAY);
             x.setFont(new Font("Arial", Font.BOLD, 18));
    //     FileLoad fl = new FileLoad();
         Label lscore = new Label("TES");
         JTextArea ta = new JTextArea();
         String newLine = "\n";
         Blocks b;
         int countScore = 0;
         int ballX = 10;
         int ballY = 800;
         int startNewGame = 0;
         int padX = 160;
         int padY = 440;
         public BreakOutGUI(BreakOutPaint bop2){
              bop = bop2;
              g = getGraphics();
              ball = new Ball(this, bop);
              newGame = new JButton("New Game");
              instructions = new JButton("How To Play");
              exitInstructions = new JButton("Back To Start Menu");
              exitBTN = new JButton("Back To Start Menu");
              highScores = new JButton("High Scores");
              btnFormat(newGame);
              btnFormat(instructions);
              btnFormat(exitInstructions);
              btnFormat(exitBTN);
              btnFormat(highScores);
         public void setupFrame(){
              f = new JFrame();
              f.setSize(400, 520);
              f.setBackground(Color.black);
              JPanel game = new JPanel();
              //f.add(new BreakOutPaint());
              f.setResizable(false);
              f.setVisible(true);
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              c = f.getContentPane();
              c.setLayout(new BoxLayout(c, BoxLayout.PAGE_AXIS));
              c.setBackground(Color.black);
              addStartMenu();
         public void addStartMenu(){
              JPanel row1 = new JPanel();
              row1.setLayout(new BoxLayout(row1, BoxLayout.LINE_AXIS));
              newGame.addActionListener(new  ActionListener(){
                    public void actionPerformed(ActionEvent ae){
                         if((bop.getStartGame() == 0) && (checkGame == 0))
                             bop.startGame(1);
                         else if(checkGame != 0)
                              bop.startGame(2);
                         holdGame = 0;
                   System.out.println("ButtonClick");
                   c.removeAll();
                   //c.setLayout(new BoxLayout(c, BoxLayout.PAGE_AXIS));
                   tp.setMaximumSize(new Dimension(400, 20));
                   tp.setText("Score: " + countScore + "     Balls Left: 3");
                 tp.setEditable(false);
                 ta.setMaximumSize(new Dimension(400, 20));
                 ta.setEditable(false);
                 c.add(ta);
                      lscore.setMaximumSize(new Dimension(400, 20));
                   lscore.setText("test");
                   c.add(lscore);
                   c.add(tp);
                   c.add(bop);
                   c.validate();
                   c.repaint();
                   if(bop.getStartGame()==0){
                        bop.startGame(1);
                        ball.setThreadRun(1);
                        System.out.println("BOP START GAME 1");
                   else{
                        bop.startGame(2);
                        ball.setThreadRun(1);
                        System.out.println("BOP START GAME 2");
              instructions.addActionListener(new  ActionListener(){
                    public void actionPerformed(ActionEvent ae){
                   System.out.println("ButtonClick");
                   c.removeAll();
                   c.setLayout(new BoxLayout(c, BoxLayout.PAGE_AXIS));
                   JLabel title = new JLabel("How To Play");
                   title.setForeground(Color.red);
                   title.setFont(new Font("Arial", Font.BOLD, 40));
                   title.setMinimumSize(new Dimension(500,500));
                   JTextArea instructions = new JTextArea(
                             "Use the mouse to move the paddle." + newLine +
                             "Use the paddle to stop the ball from hitting" + newLine + "the bottom." + newLine + newLine +
                             "Click to release the ball." + newLine + "You get 3 balls." + newLine +
                             "The score increments every 10 blocks." + newLine + newLine + "When all the blocks are gone a new set is" +
                             newLine  + "generated and the speed of the ball" + newLine +  "increases." );
                   instructions.setEditable(false);
                   instructions.setForeground(Color.white);
                   instructions.setBackground(Color.black);
                   instructions.setFont(new Font("Arial", Font.BOLD, 18));
                   JPanel row1 = new JPanel();
                   row1.setLayout(new BoxLayout(row1, BoxLayout.LINE_AXIS));
                   row1.setBackground(Color.black);
                   row1.setAlignmentY(SwingConstants.CENTER);
                   row1.add(title);
                   JPanel row2 = new JPanel();
                   row2.setLayout(new BoxLayout(row2, BoxLayout.LINE_AXIS));
                   row2.setBackground(Color.black);
                   row2.setAlignmentY(SwingConstants.CENTER);
                   row2.add(instructions);
                   JPanel row3 = new JPanel();
                   row3.setLayout(new BoxLayout(row3, BoxLayout.LINE_AXIS));
                   row3.setBackground(Color.black);
                   row3.setAlignmentY(SwingConstants.CENTER);
                   row3.add(instructions);
                   exitInstructions.addActionListener(new  ActionListener(){
                         public void actionPerformed(ActionEvent ae){
                        c.removeAll();
                        addStartMenu();
                        if(bop.getStartGame() == 0)
                             checkGame = 0;
                      ball.reset();
                        c.validate();
                        c.repaint();
                   JPanel row4 = new JPanel();
                   row4.setLayout(new BoxLayout(row4, BoxLayout.LINE_AXIS));
                   row4.setBackground(Color.black);
                   row4.setAlignmentY(SwingConstants.CENTER);
                   row4.add(exitInstructions);
                   c.add(row1);
                   c.add(row2);
                   c.add(row3);
                   c.add(row4);
                   c.validate();
                   c.repaint();
              highScores.addActionListener(new  ActionListener(){
                    public void actionPerformed(ActionEvent ae){
              addHighScores();
              JLabel title = new JLabel("BreakOUT!");
              title.setForeground(Color.green);
              title.setFont(new Font("Arial", Font.BOLD, 70));
              startMenu.add(title);
              startMenu.add(newGame);
              row1.add(title);
              row1.setBackground(Color.black);
              row1.setAlignmentY(SwingConstants.CENTER);
              JPanel row2 = new JPanel();
              row2.setLayout(new BoxLayout(row2, BoxLayout.LINE_AXIS));
              row2.add(newGame);
              row2.setBackground(Color.black);
              row2.setAlignmentY(SwingConstants.CENTER);
              JPanel row3 = new JPanel();
              row3.setLayout(new BoxLayout(row3, BoxLayout.LINE_AXIS));
              row3.add(instructions);
              row3.setBackground(Color.black);
              row3.setAlignmentY(SwingConstants.CENTER);
              JPanel row4 = new JPanel();
              row4.setLayout(new BoxLayout(row4, BoxLayout.LINE_AXIS));
              row4.add(highScores);
              row4.setBackground(Color.black);
              row4.setAlignmentY(SwingConstants.CENTER);
              c.add(row1);
              c.add(Box.createRigidArea(new Dimension(0,5)));
              c.add(row2);
              c.add(Box.createRigidArea(new Dimension(0,5)));
              c.add(row3);
              c.add(Box.createRigidArea(new Dimension(0,5)));
              c.add(row4);
         public void addHighScores(){ //TODO addHighScores
              c.removeAll();
              //c.setLayout(new BoxLayout(c, BoxLayout.PAGE_AXIS));
              System.out.println("SCOREEE" + ball.getScore());
              finalScore.setFont(new Font("Arial", Font.BOLD, 20));
              finalScore.setText("Final Score: " + Integer.toString(score));
              finalScore.setForeground(Color.green);
              for(int i = 0; i < row.length; i++){
                   row[i] = new JPanel();
              //     row.setLayout(new BoxLayout(row[i], BoxLayout.LINE_AXIS));
                   row[i].setBackground(Color.black);
              //     row[i].add(Box.createHorizontalGlue());
                   row[i].setAlignmentY(SwingConstants.CENTER);
              //FileLoad fl = new FileLoad();
              //System.out.println(fl.loadFile());
              FileLoad fl = new FileLoad();
              fl.loadFile();
              InetAddress addr;
              try {
                   addr = java.net.InetAddress.getLocalHost();
                   nameOfHS = addr.getHostName();
              } catch (UnknownHostException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              boolean highScoreCheck = true;
              for(int x = 0; x < lineRead.length; x++){
                   if(x > 0){
                        StringTokenizer st = new StringTokenizer(lineRead[x]);
                        //lineRead[x] = getNumbers(lineRead[x]).replaceAll(" ", "");
                        lineRead[x] = st.nextToken();
                        int tempScore = Integer.parseInt(lineRead[x]);
                        if((score >= tempScore) && highScoreCheck){
                             System.out.println("Higher");
                             lineRead[x] = (Integer.toString(score) + " " + nameOfHS);
                             highScoreCheck = false;
                        } else {
                             lineRead[x] = (lineRead[x] + " " + st.nextToken());
                   JLabel scores = new JLabel(lineRead[x]);
                   scores.setForeground(Color.white);
                   scores.setFont(new Font("Arial", Font.BOLD, 20));
                   FileSave fs = new FileSave();
                   fs.saveFile();
                   row[x].add(scores);
                   c.add(row[x]);
              exitBTN.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent ae){
                   c.removeAll();
                   addStartMenu();
                   c.validate();
                   c.repaint();
              row[11].add(finalScore);
              row[12].add(exitBTN);
              c.add(row[11]);
              c.add(row[12]);
              c.validate();
              c.repaint();
         public void setBallPos(int x, int y){
              ballX = x;
              ballY = y;
         public void setPadPos(int x, int y){
              padX = x;
              padY = y;
         public int getPadX(){
              int x = padX;
              return x;
         public void setScore(int x){
              score = x;
         public class FileLoad {
              public String [] loadFile(){
              File loadFile = new File("HighScores.txt");
              System.out.println("FILE Load");
              if(loadFile.exists()){
                        System.out.println("FILE HERE");
                   try {
                   //FileReader input = new FileReader(AddressBook.class.getResource("AddressBook.txt").getPath().replaceAll("%20", " "));
                        FileReader input = new FileReader("HighScores.txt");
                        BufferedReader loadedFile = new BufferedReader(input);
                        while(true){
                             if(!loadedFile.ready()) break;
                             for(int x = 0; x < lineRead.length; x++)
                                  lineRead[x] = loadedFile.readLine();
                   } catch (Exception e){}
              }else {
                   FileSave fs = new FileSave();
                   fs.createNewFile();
                   System.out.println("CREATE");
                   try {
                        FileReader input = new FileReader("HighScores.txt");
                        BufferedReader loadedFile = new BufferedReader(input);
                             for(int x = 0; x < lineRead.length; x++)
                                  lineRead[x] = loadedFile.readLine();
                   } catch (Exception e){}
              return lineRead;
              public String [] getLine(){
                   return lineRead;
         }//class FileLoad
         public class FileSave{
              public void saveFile(){
              try{
              FileWriter output = new FileWriter("HighScores.txt");
              BufferedWriter saveFile = new BufferedWriter(output);
              for(int x = 0; x < lineRead.length; x++){
                   saveFile.write(lineRead[x]);
                   saveFile.newLine();
              saveFile.close();
              }catch(Exception e){
              public void createNewFile(){
                   System.out.println("CREATE NEW");
                   try{
                   FileWriter output = new FileWriter("HighScores.txt");
                   BufferedWriter saveFile = new BufferedWriter(output);
                   saveFile.write("High Scores");
                   saveFile.newLine();
                   int y = 10000;
                   for(int x = 0; x < lineRead.length; x++){
                        saveFile.write(Integer.toString(y) + " UserName");
                        saveFile.newLine();
                        y = y - 1000;
                   saveFile.close();
                   }catch(Exception e){
         public void setCheckGame(int x){
              checkGame = x;
         public void setHoldGame(int x){
              holdGame = x;
         public int getHoldGame(){
              return holdGame;
    } // end BreakOutGUi
    package cosc175.Sessa.Final;
    import javax.swing.*;
    import java.awt.*;
    public class Ball extends JPanel implements Runnable {
         private static final long serialVersionUID = -8053071209498647015L;
    BreakOutGUI gui;
    BreakOutPaint bop;
    int ballX, ballDX;
    int ballY, ballDY;
    int padX;
    int speed = 11;
    int ballsLeft = 3;
    int threadRun = 0;
    int lost = 0;
    int score = 0;
    int sleep = 40;
    int levelCount = 0;
    int holdGame = 0;
    int deleteCount;
    Thread t = new Thread(this);
         public Ball(BreakOutGUI gui2, BreakOutPaint bop2){
              gui = gui2;
              bop = bop2;
              ballX = 10;
              ballY = 500;
              ballDX = speed;
              ballDY = speed;
         public void setPositionVelocity(int x, int y, int dx, int dy) {
              ballX = x;
              ballY = y;
              ballDX = dx;
              ballDY = dy;
         public void run(){
              while(true){
                   if(threadRun == 1){
                   gui.setCheckGame(1);
                   //System.out.println("true");
                   //System.out.println("TR: " +threadRun);
                   //System.out.println("Ball Left: "+ ballsLeft);
                   if((threadRun == 1) && (ballsLeft != 0)){
                   //     System.out.println("run");
                   ballX = ballX + ballDX;
                   ballY = ballY + ballDY;
                   try{
                        Thread.sleep(sleep);
                   } catch (Exception e){}
              //System.out.println(ballX);
              if(ballX <= 1 || ballX >= 380){
                   ballDX = -ballDX;
              padX = bop.getPadX();
              //System.out.println("padx " + padX);
              if((ballY >= 425) && (ballX <= (padX +80) && (ballX >= padX))){
                        ballDY = -ballDY;
                   if(((ballX >= (padX)) && (ballX <= (padX +10))))
                        ballDX = -(10);
                   else if(ballDX > 0 && ((ballX >= (padX +11)) && (ballX <= (padX +20))))
                        ballDX = -(7);
                   else if(((ballX >= (padX +21)) && (ballX <= (padX +30))))
                        ballDX = -(4);
                   else if(((ballX >= (padX +31)) && (ballX <= (padX +40))))
                        ballDX = -1;
                   // Seperator
                   if(((ballX >= (padX+41)) && (ballX <= (padX +50))))
                        ballDX = 1;
                   else if(((ballX >= (padX+51)) && (ballX <= (padX +60))))
                        ballDX = 4;
                   else if(((ballX >= (padX+61)) && (ballX <= (padX +70))))
                        ballDX = 7;
                   else if(((ballX >= (padX+71)) && (ballX <= (padX +80))))
                        ballDX = 10;
              //System.out.println("Ball DX " + ballDX);
         //     bop.setBallPos(ballX, ballY);
         if(ballDY > 0){
              if((ballY >= 35) && (ballY <= 105)){
                   int blockX =(int)Math.floor(ballX / 38);
                   int blockY = (int)((ballY - (35)) / 15);
                   if(blockX == 10)
                        blockX = 9;
                   System.out.println("blockx " + blockX + " y " + blockY);
                   System.out.println("ballx " + ballX + " y " + ballY);
                   if(bop.b.blockCount[blockX][blockY] != 0){
                        ballDY = -ballDY;
                        bop.b.deleteBlock(blockX, blockY);
                        deleteCount++;
                        System.out.println("Ball X " + ballX + " Ball y: " + ballY);
                        if(deleteCount <10)
                             updateScore(100);
                        else if((deleteCount >= 10) && (deleteCount < 20))
                             updateScore(300);
                        else if((deleteCount >= 20) && (deleteCount < 30))
                             updateScore(500);
                        else if((deleteCount >= 31) && (deleteCount < 40))
                             updateScore(700);
                        else if(deleteCount >= 41)
                             updateScore(1000);
              }else if((ballY >= 45) && (ballY <= 116)){
                   //System.out.println("down");
                   int blockX =(int)Math.floor(ballX / 38);
                   int blockY = (int)Math.floor((ballY - (45)) / 16);
                   System.out.println("blockx " + blockX + " y " + blockY);
                   if(blockX == 10)
                        blockX = 9;
                   if(bop.b.blockCount[blockX][blockY] != 0){
                        ballDY = -ballDY;
                        bop.b.deleteBlock(blockX, blockY);
                        deleteCount++;
                        System.out.println("Ball X " + ballX + " Ball y: " + ballY);
                        if(deleteCount <10)
                             updateScore(100);
                        else if((deleteCount >= 10) && (deleteCount < 20))
                             updateScore(300);
                        else if((deleteCount >= 20) && (deleteCount < 30))
                             updateScore(500);
                        else if((deleteCount >= 31) && (deleteCount < 40))
                             updateScore(700);
                        else if(deleteCount >= 41)
                             updateScore(1000);
              } //else if
              if(ballY < 15) {
                        ballDY = -ballDY;
              } else if (ballY > 480) {
                   ballDY = 0;
                   ballDX = 0;
                   ballsLeft--;
                   deleteBall(ballsLeft);
                   threadRun = 0;
              bop.setBallPos(ballX, ballY);
              if(ballsLeft == 0){
                   threadRun = 0;
                   System.out.println("YOU LOSE");
                   gui.tp.setText("You Lose! Final Score: " + Integer.toString(score));
                   gui.setScore(score);
                   //bop.startGame(-1);
                   gui.addHighScores();
                   this.reset();
                   JLabel finalScore = new JLabel("Final Score: " + Integer.toString(score));
                   finalScore.setForeground(Color.white);
                   gui.add(finalScore);
                   revalidate();
                   gui.c.repaint();
                   if(deleteCount == 50){
                        for(int x = 0; x<10; x++)
                             for(int y = 0; y < 5; y++)
                                  bop.b.blockCount[x][y] = 1;
                        if(sleep >= 20)
                             sleep-= 5;
                        //if((levelCount / 2 >= 1) && (levelCount % 2 == 0))
                        //     speed+=1;
                        levelCount++;
                        deleteCount = 0;
                        this.setPositionVelocity((bop.getPadX() + 40), 420, 4, this.getSpeed());
              }// While(true)
         } // public void run()
         public void setDeltaXY(int x, int y){
              ballDX = x;
              ballDY = y;
         public void updateScore(int x){
              score = score + x;
              System.out.println(score);
                   gui.tp.setText("Score: " + Integer.toString(score) + " Balls Left: " + Integer.toString(ballsLeft));
         public void deleteBall(int x){
              int tempBalls = x;
                   gui.tp.setText("Score: " + Integer.toString(score) + " Balls Left: " + Integer.toString(tempBalls));
         public int getThreadRun(){
              return threadRun;
         public void setThreadRun(int x){
              threadRun = x;
         public int getDeltaX(){
              return ballDX;
         public int getDeltaY(){
              return ballDY;
         public int getScore(){
              return score;
         public void setBallsLeft(int x){
              ballsLeft = x;
         public int getSpeed(){
              return speed;
         public void resetScore(){
              score = 0;
         public void reset(){
              System.out.println("RESET GAME");
              score = 0;
              ballsLeft = 3;
              deleteCount = 0;
              threadRun = 0;
              gui.setHoldGame(1);
              for(int x = 0; x<10; x++)
                   for(int y = 0; y < 5; y++)
                        bop.b.blockCount[x][y] = 1;
    package cosc175.Sessa.Final;
    import java.awt.Color;
    import java.awt.*;
    public class Blocks {
         int deleteCount = 0;
         int blockCount[][] = new int[10][5];
         BreakOutGUI gui;
         BreakOutPaint bop;
         public Blocks(BreakOutPaint bop2){
              bop = bop2;
              for(int x = 0; x<10; x++)
                   for(int y = 0; y < 5; y++)
                        blockCount[x][y] = 1;
    public void makeBlocks(){
              for(int x = 0; x<10; x++)
                   for(int y = 0; y < 5; y++){
                        if(blockCount[x][y] != 0){
                             bop.g.setColor(Color.green);
                             int z = 45 + y * 15;
                             //System.out.println("z: " + z);
                             bop.g.fillRect(10 + x * 38, z, 30, 10);
                        }else{
                             bop.g.setColor(Color.black);
                             int z = 45 + y * 15;
                             bop.g.fillRect(10 + x * 38, z, 30, 10);
         public void deleteBlock(int x, int y){
              blockCount[x][y] = 0;
              System.out.println("DELETE: " + x + " " + y);
              deleteCount++;
         public int getDeleteCount(){
              return deleteCount;
    package cosc175.Sessa.Final;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import javax.swing.*;
    public class BreakOutPaint extends JPanel {
         private static final long serialVersionUID = -4400301164637088912L;
    int startNewGame = 0;
    int ballX = 10;
    int ballY = 800;
    int countScore = 0;
    int ballCheck = 0;
    Blocks b;
    int padX = 160;
    int padY = 440;
    Graphics g;
    JTextPane tp = new JTextPane();
         public BreakOutPaint(){
              b = new Blocks(this);
         public void startGame(int x){
              startNewGame = x;
              System.out.println("SNG" + startNewGame);
         public void paintComponent(Graphics g2){
              Graphics2D aag = (Graphics2D)g2;
              g = g2;
              //aag.setBackground(Color.black);
              if(startNewGame > 0){
         //          System.out.println("paiting" + " ballx " + ballX + " bally " + ballY);
                   //aag.setRenderingHint(RenderingHints.KEY_ANTIALIASING, // Anti-alias!
                   // RenderingHints.VALUE_ANTIALIAS_ON);
              g.setColor(Color.black);
              g.fillRect(0, 0, 500, 600);
              g.setColor(Color.blue);
              //g.fillRect(padX, padY, 80, 15);
              g.fillRoundRect(padX, padY, 80, 15, 80, 15);
              b.makeBlocks();
              g.setColor(Color.white);
              g.fillOval(ballX, ballY, 12, 12);
         public void setBallPos(int x, int y){
              repaint();
              ballX = x;
              ballY = y;
              this.validate();
              repaint();
         public int getBallX(){
              return ballX;
         public int getBallY(){
              return ballY;
         public void setPadPos(int x, int y){
              padX = x;
              padY = y;
              this.repaint();
         public int getPadX(){
              int x = padX;
              this.repaint();
              return x;
         public int getStartGame(){
              return startNewGame;
         public void setBallCheck(int x){
              ballCheck = x;
         public int getBallCheck(){
              return ballCheck;
    package cosc175.Sessa.Final;
    import java.awt.event.*;
    public class Pad implements MouseListener, MouseMotionListener, KeyListener {
         BreakOutGUI gui;
         BreakOutPaint bop;
         Ball ball = new Ball(gui, bop);
         int ballCheck = 0;
         int threadRunning = 0;
         int tempDX, tempDY, tempPadX;
         int speed = 15;
    //     Thread t = new Thread(new Ball(gui));
         public Pad(BreakOutPaint bop2, BreakOutGUI gui2){
              bop = bop2;
              gui = gui2;
              gui.f.addMouseMotionListener(this);     
              gui.f.addMouseListener(this);
              gui.f.setFocusable(true);
              gui.f.addKeyListener(this);
         //     ball = b;
         public void mouseMoved (MouseEvent e) {
                   int x = e.getX();
                   int y = e.getY();
                   //System.out.println("x " + x + " y " + y);
                   if(x<400)
                        bop.setPadPos(x-40, bop.padY);
                   //System.out.println("MouseMoved");
              public void mouseReleased (MouseEvent e) {
                   System.out.println("RESET");
                   if(gui.getHoldGame() == 0){
                   if(bop.getStartGame() == 1 && bop.getBallCheck() == 0 && ball.getThreadRun() == 0) {
                        System.out.println("GAME START");
                        new Thread( ball = new Ball(gui, bop)).start();
                        bop.setBallCheck(1);
                        threadRunning = 1;
                   ball.setPositionVelocity((bop.getPadX() + 40), 420, 4, ball.getSpeed());
                   else if (ball.getThreadRun() == 0 && bop.getStartGame() == 1){
                        ball.setPositionVelocity((bop.getPadX() + 40), 420, 4, ball.getSpeed());
                        ball.setThreadRun(1);
                        threadRunning = 1;
                        System.out.println("RESET1");
                   else if(bop.getStartGame() == 2 && ball.getThreadRun() == 0){
                        bop.setBallCheck(1);
                        bop.startGame(1);
                        ball.resetScore();
                        ball.setBallsLeft(3);
                        // bop.setBallPos(bop.getPadX() + 40, 420);
                   ball.setPositionVelocity((bop.getPadX() + 40), 420, 4, ball.getSpeed());
                        ball.setThreadRun(1);
                        // bop.setBallPos(100, 100);
                        threadRunning = 1;
                        System.out.println("RESET2");
              public void keyReleased (KeyEvent e){
                   System.out.println(e.getKeyChar());
                   if((threadRunning == 1) && (e.getKeyChar() == 'p') || (e.getKeyChar() == 'P')){
                        System.out.println("reach here");
                        tempDX = ball.getDeltaX();
                        tempDY = ball.getDeltaY();
                   //     tempPadX = bop.getPadX();
                   //     bop.setPadPos(100, bop.padY);
                        ball.setDeltaXY(0, 0);
                        gui.tp.setText("PAUSED: PRESS R TO RESUME");
                   if((threadRunning == 1) && (e.getKeyChar() == 'r') || (e.getKeyChar() == 'r')){
                        System.out.println("reach here");
                        ball.setDeltaXY(tempDX, tempDY);
                   //     bop.setPadPos(bop.getPadX(), bop.padY);
                        gui.tp.setText("Resumed");
              public void setSpeed(int x){
                   speed = speed + x;
              public void keyPressed (KeyEvent e) { }
              public void keyTyped (KeyEvent e) { }
              public void mouseDragged (MouseEvent e) {}
              public void mouseEntered (MouseEvent e) {}
              public void mouseExited (MouseEvent e) {}
              public void mouseClicked (MouseEvent e) {}
              public void mousePressed (MouseEvent e) {}
    Edited by: gazotem on Dec 8, 2007 4:34 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Don't post a long production code. Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html
    It seems that your problem is cause by difference of Java versions.

  • Using fill across multiple pages

    How do you use the same fill on multiple pages in iBooks Author? For example, say you want all pages in a section to have the same background.

    Seen these?
    http://www.youtube.com/watch?v=dxG2ZtlueGg (2013)
    https://discussions.apple.com/thread/3671451?start=0&tstart=0 (2012)

  • (Not) synchronizing apps across multiple devices; how to?

    Sorry if this sounds like a dumb question, but I would like to sync an iPhone and iPod touch with iTunes but do not want the same apps and content on both devices. I know I can set what to sync individually when it comes to movies, music and photos.
    When I transferred my apps from iPod to iPhone (the iPod prior to this did not sync apps), all I did was press sync, then connected the iPhone and pressed sync and all (well, almost. 12 went missing, including two paid ones) went over. So it seems that whatever apps synchronized to iTunes will sync across all devices connected to it.
    Which is good when I want to transfer but I don't want it now. I try to stop app sync between iPod and iTunes and it tells me "all existing applications and data will be erased". How do I manage apps on each device individually?
    Cheerio,
    Nicholas.

    Sign into iCloud with the same Apple ID on all your devices:
    Settings > iCloud

  • Skype History Across Across Multiple Platforms

    I need to get acess to my entire Skype history from both of my platforms: Computer and iPhone. My iPhone one just displays my iPhone-based calls, and my computer displays the computer ones.
    I need to be able to print this call log for government purposes (visa). I have used software to extract call logs from my computer, but I can't locate one for my iPhone or one that combines the two.
    Can anyone please help me? Thank you.
    Josh

    The only centralized Call history for all telephone calls made by the same Skype name from any computer/device is located in your Account page. Please click the "Account" link at the top of this page and logon using the Skype name in question. Then click on "View Call History, you can also download a .csv formatted file and call history from your account page is only stored for a 6 month period. Call History there is diplayed month by month and the call history .csv files are month by month as well.
    Note, there is no centralized history for Skype To Skype calls, or inbound calls, that data is stored only locally on the computer/device where those types of calls were made or received.
    About Me You can also use a IP Camera as your camera for Skype video Example Instructions

  • Use daq across multiple Labview applicatio​ns

    Is it possible to have daq handoff data to multiple Labview applications running at the same time?  Each application is specific to a certain test setup, but each test setup has its channels run into a couple of scxi cards in one computer/daq card.  One application may access channels 0,1,9,10 on scxi module 1 and channels 1,2,3 on scxi module 2; another application accesses channels 2-7 on scxi module 1 and channels 4,5,6 on scxi module 2; etc. (get the picture?).  I want to turn each of these little applications into executables.  Is it possible to have multiple sessions of daq running at the same time for the same card?  Is this the idea behid tasks with daqmx?  If not, can I create a small daq application that runs independently of my actual test apps, and somehow have one executable talk to another executable?

    True enough, but I think it could work if you program it correctly. I am mainly thinking, have the daq application configure the channels no matter which application wants them. Have it also set the scan rate and other details based on the most critical channel. Have the daq application continously reading channels into a 2-d array, and buffer the data into a shift register. Then when one of the other applications wants data, it dumps whichever channels that app is asking for. None of the actual test application would ever request 'daq', but they would request data that has been stored from daq. I guess one thing I want to know is can I request data (such as a 2D array of dbls) across totally seperate executables?
    It almost sounds like the perfect job for the new 'shared' variable type in Labview 8, but I am not familiar enough with its ins-&-outs.

  • Using variables across multiple pages...

    Hello all,
    I may have forgotten something very basic in my time away from php and MySQL, so please keep that in mind when reading this question.
    I have a page that has 5 links on it. Selecting one of the links would open a new page, which makes an SQL query to summon data specific to the link that was chosen.
    Instead of creating 5 succeeding pages, one for each link, I'd like to use one page. Based on the variable generated/created/assigned when a given link on the previous page is selected (for simplicity, clicking the first link would generate a 1...clicking the fifth link would generate a 5) the query will look for specific data in the database, likely this will be accomplished by making 5 seperate includes files with specific commands or array structures to acheive this. Simplicity.
    Simplicity except I'm not yet certain as to how this is accomplished.
    Here's where someone's going to throw the book at my head...can I generate a variable that can be stored for use on another page?
    I never ask easy questions...sorry about that.
    Thanks to any and all in advance for your help!
    Sincerely,
    wordman

    http://forums.adobe.com/thread/426785

  • Multiple WLC redundancy using flexconnect across multiple branches.

    Hi
    I'm wondering if someone could give me a hint please.
    I have two WLC 5508s in two different branches/countries. 
    They have APs configured as Flexconnect with local routing.
    However all the APs are only on the first controller as the controller IP was manually entered before deployment.
    (I'm guessing this will need to be changed to DNS resolution?)
    1. I would like to load balance  APs that are in more contries/branches across Europe between the two WLCs
    2. and/or if one of the controllers go down, the APs would automatically move onto the other one.
    I'm just not sure if both can be done if the APs are on flexconnect.
    Thanks in advance for any replies.

    Hi,
    1. I would like to load balance  APs that are in more contries/branches across Europe between the two WLCs
    It can work, If you have configured the both WLC with excatly same way(same wlan id, same wlan name.....etc)
    2. and/or if one of the controllers go down, the APs would automatically move onto the other one.
    If the configuration for both wlc is same then primary fails then secondary will take place. Make sure WLAN ID order has to be consistent.
    Regards

Maybe you are looking for

  • Error while Creating a basic portal application using JDeveloper

    Hi, I am trying to build a portal application using the following tutorial on JDeveloper 11.1.1.5.0 on Windows XP. [http://download.oracle.com/docs/cd/E17904_01/webcenter.1111/e10273/createapp.htm#CCHEGDIC|http://download.oracle.com/docs/cd/E17904_01

  • External Hardrives - Can they be switched from PC to Mac?

    Hi- I'm a poor grad student which means I have a hand-me-down PC, and I hate it. But dollars to buy a new Mac won't come for another few months at least so I am stuck with this piece of crap. For my research I am taking scads of photos (many gigabyte

  • Blackberry wireless headset HS-500

    could some one please please please let me know where I can get a replacement ear loop for  my HS-500 headset David Black

  • Oracle.apps.fnd.cache.CacheException

    Hi, I am getting following exception while I m running auto generated reports in server. But its working fine in local machine. oracle.apps.fnd.cache.CacheException at oracle.apps.fnd.cache.AppsCache.get(AppsCache.java:228) at oracle.apps.fnd.profile

  • Audio gone after saving

    I made a movie with a audio file. I saved it as a flv and the audio saved fine. I couldn't figure out how to post that to my facebook so I saved it as a MPEG. The MPEG file has no audio at all. What;s the deal with that? Not the first time it's happe