Strange Logic problem

Hi folks,
I seem to having a problem with my FX Trans logic that I can't fix, and I'm hoping someone else has seen this problem.
My FX Trans script is simply calling the MULTICURRENCYTRANS.LGL file, but when I validate the logic I get this error:
"No match defined for lookup dimension CATEGORY"
I've checked my system_library.lgl file, to make sure the dimension names are correct (they are non-standard), and they are fine, so I can't understand what is causing this problem.
Please can someone help? I'm running BPC for MS 7 SP4, and the FX Trans seems to work fine on other apps in my appset.
Thanks a lot!
Jason

Hi Jason,
I would recommend several things:
1) Re-Validate and Re-save your Default Logic from the Administration Console
2) Check the "System_Constants.lgl" file under AdminApp folder on the server. In this file, make sure that you have correctly mapped your dimensions.
3) Save your application from the Administration console ("Modify Application" link with both "Re-Assign SQL index" and "Process Application" options checked).
4) Try to revalidate your FX trans logic  then, and see the result.
Hope it will help.
Kind Regards,
Patrick

Similar Messages

  • Very strange power problem...

    Hey guys (and girls ofcourse),
    I'm having a very strange power problem with my late 2007 2.2Ghz santa rosa macbook.
    Can you guys help me determine what the problem could be?
    Here's what happened prior, when the macbook was still working. I got home from work, plugged my adapter into the wall, and it started charging. I left it on the table, and when I came back from the diner table I continued working, but suddenly noticed my macbook wasn't charging anymore. (the orange/green led wasn't lighting up but i was able to work on battery power)
    I thought it was the poweradapter, so I went to the apple store the next day to lend one to test it. That didn't work, so it's not the adapter.
    So then I started thinking it must be the magnetic DC connector. So I ordered that from the guys at ifixit, (since it's out of warranty) but I replaced it and it's not working.
    I don't think it's the logic board, because I was able to continue working until I ran out of battery power. And I also don't think it's the battery connector, because if i'm not mistaking, the macbook can run without battery as well, but mine can't anymore.
    Now I can't get any life out of my mac anymore...
    Might there be something I overlooked?
    Any suggestions are definately welcome!
    Thanks a lot.
    Timo from Belgium.

    Hi Timo,
    I think i have the same problem, my mac is not working without battery in it. and it wont charge it.
    i wrote a post here http://discussions.apple.com/thread.jspa?threadID=2105648&tstart=0
    let me know if you have fixed the problem
    thanks

  • Very very strange backflush problem during CO11N?????

    Hi Experts,
    I find a strange backflush problem during production order confirmation by CO11N,described as follows:
    When I create a production order for material A ,total order quantity is 2,means to produce 2 material A. For produce 2 material A, we need 10 material B.That means in the component view of this produciton order ,there is item material B, and the requirement quantity is 10.
    After release the production order,when doing order confirmation by CO11N,I enter 1 for material A in the "Yield to Be Confirmed" ,that means to confirm 1 material A and having done a partial confirmation (Beacause the production order quantity for A is 2) .Because 2 material A need 10 material B,so the system will post goods movement for 5 material B.
    After that ,confirm 1 material A, I change the production order,change the requirement quantity of material B from 10 to 5,and the quantity withdrawn of B is aslo 5 because backflush of confirmation 1 material A.
    And after changing the production order ,when again doing order confirmation by CO11N,I aslo enter 1 for material A in the "Yield to Be Confirmed" ,that means to confirm 1(the last material A to be produced) material A.But because I have already change the BOM of produciton order,2 material A only need 5 material B now,and the quantity withdrawn of B is 5 now.So I think the system should not backflush material B      by this order confirmation.
    But the system aslo backflush material B by this order confirmation,and the backflush quantity is 3 ,not 5,that means system automatic post 3 material B goods movement.
    Very strange, I don't undrestand why?
    I don't konw why system still automatic post goods movement backflush although I have changed the requirement quantity of one material and the Quantity withdrawn is equal to the requirement quantity?
    What is the automatic goods movement logic by production order confiramtion ,especially the backflush quantity logic?
    I aslo want to konw how I can set the backflush component quantity when doing order confirmation by CO11N in customzing through IMG?
    Where can I customzing backflush quantity in IMG?
    Edited by: Fei Liu on Apr 1, 2009 12:11 PM

    duffymo's right (but a little terse in explaining).
    Your "urgent problem" is that your SQL query is unorderd. However duffymo is also pointing out that a little additionaly work can make your code be more standard and work better/faster.
    Instead of doing what you're doing (bouncing to the end of the result set end, getting the number of messages, then walking through the result set backwards), retrieve the data in the order you want to display, using an "ORDER BY x" or "ORDER BY x DESC" clause. Use rs.next() to walk through the records and count them as you do so.
    no_of_mail = 0;
    while (rs.next())
       no_of_mail =  no_of_mail + 1;
        // process here.
    }Many drivers and DBs are designed to be much much more efficient when ResultSets are accessed "in order"; since that's the normal case, that's what is optimized the most.

  • Strange wifi problem on a brand-new MacBook Pro

    Hey there, I'm new here. Desperation has got the better of me, and I hope I can get some advice.
    So, last sunday I bought a brand new 13" MacBookPro with 2.8g i7 processor and 10.7.2 OS (I can't update to 10.7.4 because System Update tells me the download has been tampered with or corrupted after I waited 2 hours for it to finish, but I'm trying a direct download from the website). Here's the exact product: http://www.amazon.com/Apple-MacBook-MD314LL-13-3-Inch-VERSION/dp/B005CWIZ4O/ref= sr_1_5?ie=UTF8&qid=1340301247&sr=8-5&keywords=macbook+pro+13
    Everything is all perfect except for a strange wifi problem. Note that the wifi does not turn-on or off, it doesn't disconnect after 'sleep', it doesn't get less speed, it doesn't constantly leave a preferred connection (once I chose my home wifi it always connects to it no problem). The wifi bar is always full. What is wrong is that the internet is kinda 'glitchy'. The best metaphor I can think of is that it's like a car that has to be pushed down the road before the engine can start. Please, bear with me because this is kinda hard to explain and I'm not good at tech lingos.
    One of the symptoms is browsing can get really slow and inconsistent, almost as if the wifi gets turned off in the middle of browsing. For example: if I look something up on Google and then open 5 new tabs, probably only 2 or 3 of those tabs will eventually load while the other two will not get past the long 'http:.......google.....etc etc' address and will eventually show one of those 'error loading page because there's no Internet connection' notice. This happens a lot. Sometimes I have to refresh/retry loading a page a couple of times before it finally loads, then usually everything will get back to normal and I will be able to open multiple tabs with no problem, but in a couple of minutes I would try to open another site and the problem will start again.
    So I tried to see how it does with downloading using iGetter. Fortunately I also have a Macbook (white-plastic casing one) and my brother has an old 2006 MacbookPro so I can compare. With those two older Apples iGetter starts receiving data in less than 8 seconds after I click Start, while my brand-new Macbook Pro can take up to 15-20 seconds, sometimes it doesn't even start at all and I have to re-click the start button. But once the download actually starts (on my new MacBook Pro), it downloads like normal, it doesn't stop and the speed is also as good as I can get. Strange huh? Hence, like a car that has to be pushed before the engine starts.
    I also tried 'speed testing' from a website with all 3 laptops. On my old MacBook and my brother's MacBook pro, once I click 'begin test' it takes only a couple of seconds of 'ping' before the download/upload speed measurements start, but with my new MacBook Pro (just like with iGetter) it takes up to almost a minute before the measurements start, sometimes it won't start at all and I have to re-start the test.
    Well, thanks for reading. And hope you can help me shed some light into this. Because it is really preventing me from really enjoying my new MacBook Pro. And if this is most likely a hardware problem, I'd better get back to the store and try to get it replace or something while it's only been 5 days. *cheers*

    Hey guys.. Thanks for the replies. Unfortunately, I bought the MacBook in Indonesia where there are no such thing as an AppleCare. The only option is to leave the Apple product to one of the 'Authorized Apple care centre' and have whoever do whatever to it without guarantee of success. As for returning it and getting a brand new one, I also don't know if there is such a deal here, but that's actually a good idea, will try to go to the store tomorrow. Although, I'm worried that the problem might be with OSX Lion or something and getting a new one won't help.
    mark75090, I've tried resetting the router when I first noticed te problem, didn't work though. I've checked my new MacBook's wi-fi (option+click wifi bar) and it says 'PHY Mode: 802.11g', so does my MacBook and the old MacBook Pro. I don't know what those mean though, and I don't know whether or not my router is an N., can you tell me more please.. I have tried with the other two turned off, and only the new MacBook using the wi-fi but the problem persists. I have also tried connecting directly to the router, but as I described, the problem is too subtle for me to notice the difference.
    Also, if I create a brand new Wi-Fi connection in network preferences and connect to my router through the new Wi-Fi profile, the problem seems to be gone for an hour or so, then it always comes back though. I have also just finally installed 10.7.4, but it doesn't help either.

  • The logical problem in turnover in  for ?

    Welcome
    wrote this code, everything is true but there is a logical problem to be solved first idea of this program is a moving train to the contrary, it can stop and operated once again and that can add cars and locomotives and can delete it but there is a problem when adding that the train carriages have remained stable cart after the first turnover Thus ...
    THAT shows us the error ..
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Train extends JFrame implements ActionListener{
        private boolean check = false;
        private boolean stopped = true;
        private boolean add = false;
        private int trainPlace = 0;
        private int INDEX_START = 0;
        public int speed = 300;
        private ImageIcon CurrentImage ;
        private boolean front=true, back=false ;
        private int carrNum = 0 ;
        private JPanel screen, area , controlroom;
        private JButton[][] street;
        public JButton[] keybord;
        private String s[] = {"Start","Back","Fast","Slow","Add Carriage","Delete Carriage","Rest","Check","Desiners"};
        private ImageIcon images[][] ={{
                        new ImageIcon("images/UpRight.jpg"),
                        new ImageIcon("images/RightDown.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        {new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/DownRight.jpg"),
                        new ImageIcon("images/Horiz.jpg"),
                        new ImageIcon("images/RightDown.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/UpRight.jpg"),
                        new ImageIcon("images/Horiz.jpg"),
                        new ImageIcon("images/RightUp.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/DownRight.jpg"),
                        new ImageIcon("images/RightUp.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg")}};
        private ImageIcon frontImagesTrain[]={
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainRight.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainRight.jpg"),
                        new ImageIcon("images/TrainDown.jpg")};
            private ImageIcon trackImagesTrain[]={
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/RightUp.jpg"),
                    new ImageIcon("images/Horiz.jpg"),
                    new ImageIcon("images/UpRight.jpg"),
                    new ImageIcon("images/RightUp.jpg"),
                    new ImageIcon("images/DownRight.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/UpRight.jpg"),
                    new ImageIcon("images/RightDown.jpg"),
                    new ImageIcon("images/DownRight.jpg"),
                    new ImageIcon("images/Horiz.jpg"),
                    new ImageIcon("images/RightDown.jpg")};
              private ImageIcon carrinImagesTrain[]={
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Right.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Right.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg")};
        private int[]frontPath={13, 18,17,16,21,20,15,10,5,0,1,6,7,8};
      private int[]frontPath2={8, 13,18,17,16,21,20,15,10,5,0,1,6,7};  
        private ImageIcon icon;
        private JLabel labelInfo;
        public Train () {  
           screen = new JPanel(new GridLayout(1,1));
           Font f =new Font ("Sanserif",Font.BOLD,18);
           labelInfo = new JLabel("WELCOM" ,JLabel.CENTER);
           labelInfo.setFont(f);
           screen.setBackground(Color.red);
           screen.add(labelInfo);
           getContentPane().add(BorderLayout.NORTH,screen );
            street = new JButton[5][5];
            area = new JPanel (new GridLayout(5,5));
            for(int r=0; r<5; r++) 
                for (int c=0; c<5; c++){
                    street[r][c] = new JButton("", images[r][c]);
                    area.add(street[r][c]);
            getContentPane().add(BorderLayout.CENTER,area );   
            keybord = new JButton[9];
            controlroom = new JPanel(new GridLayout(5,2));   
    //        ActionHandler handler = new ActionHandler();
            for (int i=0; i <9; i++)
                keybord[i] = new JButton(s);
    keybord[i].addActionListener(this);
    controlroom.add(keybord[i]);
              keybord[i].setEnabled(false);
              keybord[7].setEnabled(true);
    getContentPane().add(BorderLayout.SOUTH,controlroom );
    public void moveTrainFront(){
    int trainPlace1 = trainPlace;
    try{
    if (trainPlace == frontPath.length-1) trainPlace = 0;
    else trainPlace ++;
                   if (carrNum == 0 )
         int i = frontPath[trainPlace]/5;
         int j = frontPath[trainPlace] - i * 5;
         int r = frontPath[trainPlace1]/5;
         int c = frontPath[trainPlace1] - r * 5;
         street[i][j].setIcon(frontImagesTrain[trainPlace]);
         street[r][c].setIcon(trackImagesTrain[trainPlace1]);
                   else
                        int i1 = frontPath[trainPlace]/5;
                        int j1 = frontPath[trainPlace] - i1 * 5;
                        street[i1][j1].setIcon(frontImagesTrain[trainPlace]);     
                        int trainPlace2 = trainPlace;
                        for (int z = 1; z <= carrNum; z++)
    if (trainPlace2 - z < 0) trainPlace2 = 13;
                                  int i2 = frontPath[trainPlace2 - z]/5;
                                  int j2 = frontPath[trainPlace2 - z] - i2 * 5;
                                  street[i2][j2].setIcon(carrinImagesTrain[trainPlace2 - z]);
              int r1 = frontPath[trainPlace1 - carrNum]/5;
                        int c1 = frontPath[trainPlace1 - carrNum] - r1 * 5;
                        street[r1][c1].setIcon(trackImagesTrain[trainPlace1 - carrNum]);
    }catch(ArrayIndexOutOfBoundsException aiex){System.out.println("the array out of index");}
    // Move train Back
    public void moveTrainBack(){
    int trainPlace1 = trainPlace;
    try{
    if (trainPlace == 0) trainPlace = 13;
    else trainPlace--;
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    int r = frontPath[trainPlace1]/5;
    int c = frontPath[trainPlace1] - r * 5;
    street[i][j].setIcon(frontImagesTrain[trainPlace]);
    street[r][c].setIcon(trackImagesTrain[trainPlace1]);
    }catch(ArrayIndexOutOfBoundsException aiex){System.out.println("the array out of index");}
    public void setRest(){
    setStop(true);
              setSpeed(300);
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(trackImagesTrain[trainPlace]);
    trainPlace = 0;
    i = frontPath[trainPlace]/5;
    j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(frontImagesTrain[0]);
    public void setCheck (boolean c)
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(frontImagesTrain[0]);
    check = c ;
    public boolean getCheck (){ return  check ;}
    public void setSpeed (int s){speed = s ;}
    public int getSpeed(){return  speed;}
    public void setStop(boolean s){stopped = s ;}
    public boolean getStop(){return  stopped ;}
    public void setBack(boolean s){back = s ;}
    public boolean getBack(){return  back;}
         public void setAdd(){carrNum++ ;}
    public boolean getAdd(){return  add;}
    // Action
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==keybord[0])//Start
              if (stopped)
              keybord[0].setText("Stop");
                   setStop(false);
                   labelInfo.setText("Running");
    else      
                   {    setStop(true);
                   keybord[0].setText("Start");
                        labelInfo.setText("Stop");
              if(e.getSource()==keybord[1])//Front And Back
              if (!back)
                   setBack(true);
              keybord[1].setText("Front");
                   labelInfo.setText("Back");
              else      
                   setBack(false);
              keybord[1].setText("Back");
                   labelInfo.setText("Front");
              }     else if (e.getSource()==keybord[2])//Fast
              if (speed <= 0)
              labelInfo.setText("You've arrived the maximum speed : " + getSpeed());
              else {      setSpeed(speed  - 10);
                   labelInfo.setText("The Train speed is slow down to : " + getSpeed());
         else if(e.getSource()==keybord[3])//Slow
              {setSpeed(speed + 10);
                    labelInfo.setText("The Train speed is pulled up to : "+getSpeed());
    else if(e.getSource()==keybord[4]) //ADD carrin
                        setAdd();
                        labelInfo.setText("Add Carriage");
              //setStop(false);
    else if(e.getSource()==keybord[5]) //Delete carrin
                   labelInfo.setText("Delete Carrin");
         else if(e.getSource()==keybord[6]) //Rest
                   setRest();     
              labelInfo.setText("Rest");
         else if (e.getSource()==keybord[7]) //Check
         setCheck(true);
         keybord[7].setEnabled(false);
         keybord[0].setEnabled(true);
         keybord[1].setEnabled(true);
         keybord[2].setEnabled(true);
         keybord[3].setEnabled(true);
         keybord[4].setEnabled(true);
         keybord[5].setEnabled(true);
         keybord[6].setEnabled(true);
         keybord[8].setEnabled(true);
         labelInfo.setText("The Train is Checked");
    else if(e.getSource()==keybord[8]) //desiners
         String x = "";
                   labelInfo.setText("Desiners About");
                   JOptionPane.showMessageDialog(null,"The Progect is Under The Auspices of:"
                   + "\n??" + "\n" + "\n ??" +
                   "\n ??" + "\n??" + "\n ??" + "\n" + "\n" + "\n?? " + "\n C 2007");     }     
    This main ..
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.Thread;
    public class TestTrain{     
        public static void main(String[]args){
            Train train = new Train ();
              MoveTrain mt = new MoveTrain(train);
            train.setTitle("Train");
            train.setSize(421,550);
            train.setVisible(true);
            train.addWindowListener (
            new WindowAdapter (){
                 public void windowClosing(WindowEvent e ){
                      System.exit(0);
              mt.start();
    }This Threads
    import java.lang.Thread;
    public class MoveTrain extends Thread {
         Train train ;
        public MoveTrain (Train train){
               this.train= train;
         public void run(){
               while(!train.getCheck());
               while (train.getCheck()){
                    try {sleep (train.getSpeed()); }
                    catch (InterruptedException e ){System.out.println("unknown error");}
                     if (!train.getStop())
                        if(!train.getBack())
                                {train.moveTrainFront();
                          else  train.moveTrainBack();
    }This Link image icon ..
    http://www.geocities.com/alhairan_2003/as/777/UpRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/Vert.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainUp.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainLeft.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainDown.jpg
    http://www.geocities.com/alhairan_2003/as/777/Train.jpg
    http://www.geocities.com/alhairan_2003/as/777/RightUp.jpg
    http://www.geocities.com/alhairan_2003/as/777/RightDown.jpg
    http://www.geocities.com/alhairan_2003/as/777/NoTrack.jpg
    http://www.geocities.com/alhairan_2003/as/777/Horiz.jpg
    http://www.geocities.com/alhairan_2003/as/777/DownRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Up.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Down.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Up.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Down.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Down.jpg
    thanks :)

            String[] car1Names = {
                "Carriage1Down", "Carriage1Left", "Carriage1Down", "Carriage1Right"
            };The first image name should be "Carriage1Up" but it is missing in your directory.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class MC6 implements Runnable, ActionListener {
        JLabel[] grid;
        BufferedImage[] trackImages;
        BufferedImage[] trainImages;
        BufferedImage[][] carImages;
        int[] imageKeys;
        int[] trackKeys;
        int[] forwardKeys;
        int[] reverseKeys;
        int keyIndex = 0;
        int carCount = 0;           // [0 - 3]
        boolean goingAhead = true;
        boolean changeDirections = false;
        Thread thread = null;
        boolean moving = false;
        final int DELAY = 1000;
        public MC6() {
            loadImages();
        public void actionPerformed(ActionEvent e) {
            String ac = e.getActionCommand();
            if(ac.equals("START"))
                changeDirections = false;
                start();
            if(ac.equals("STOP"))
                stop();
            if(ac.equals("FORWARD") || ac.equals("REVERSE"))
                changeDirections = true;
            if(ac.equals("ADD CARRIAGE"))
                carCount += (carCount+1 <= 3) ? 1 : 0;
            if(ac.equals("REMOVE CARRIAGE")) {
                int carIndex = getCarIndex(carCount);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = imageKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));           
                carCount -= (carCount-1 >=0 ) ? 1 : 0;
        public void run() {
            while(moving) {
                // Clear track in preparation for next advance.
                if(changeDirections) {
                    clearTrack();
                    // Adjust keyIndex by one increment in the direction of travel
                    // to allow it to return it to its current position after the
                    // next advance in position (further below).
                    advance();
                    goingAhead = !goingAhead;
                    changeDirections = false;
                } else {
                    // Replace last car with track image before train advances.
                    int carIndex = getCarIndex(carCount);
                    int trackIndex = trackKeys[carIndex];
                    int imageIndex = imageKeys[carIndex];
                    grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));
                // Move to next position on the track.
                advance();
                // Set locomotive.
                setLocomotive();
                // Set the cars following the locomotive.
                setCars();
                try {
                    Thread.sleep(DELAY);
                } catch(InterruptedException e) {
                    System.out.println("interrupted");
                    stop();
        private int getCarIndex(int carNumber) {
            int n = carNumber;
            int index;
            if(goingAhead) {
                index = keyIndex-n;
                if(index < 0)
                    index += trackKeys.length;
            } else {
                index = (keyIndex+n) % trackKeys.length;
            return index;
        private void advance() {
            keyIndex = goingAhead ?
                           (keyIndex+1 > trackKeys.length-1) ? 0 : keyIndex+1
                           (keyIndex-1 < 0) ? trackKeys.length-1 : keyIndex-1;
        private void clearTrack() {
            // Remove all cars from track before direction change.
            for(int j = 0; j < carCount; j++) {
                int carIndex = getCarIndex(j+1);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = imageKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));
        private void setLocomotive() {
            int trackIndex = trackKeys[keyIndex];
            int imageIndex = goingAhead ? forwardKeys[keyIndex]
                                        : reverseKeys[keyIndex];
            grid[trackIndex].setIcon(new ImageIcon(trainImages[imageIndex]));
        private void setCars() {
            for(int j = 0; j < carCount; j++) {
                int carIndex = getCarIndex(j+1);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = goingAhead ? forwardKeys[carIndex]
                                            : reverseKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(carImages[j][imageIndex]));
        private void start() {
            if(!moving) {
                moving = true;
                thread = new Thread(this);
                thread.setPriority(Thread.NORM_PRIORITY);
                thread.start();
        public void stop() {
            moving = false;
            if(thread != null)
                thread.interrupt();
            thread = null;
        private void loadImages() {
            String[] trackNames = {
                "UpRight", "RightDown", "Vert", "DownRight", "Horiz", "RightUp", "NoTrack"
            String[] trainNames = { "TrainUp", "TrainLeft", "TrainDown", "TrainRight" };
            String[] car1Names = {
                "Carriage1Down", "Carriage1Left", "Carriage1Down", "Carriage1Right"
            String[] car2Names = {
                "Carriage2Up", "Carriage2Left", "Carriage2Down", "Carriage2Right"
            String[] car3Names = {
                "Carriage3Up", "Carriage3Left", "Carriage3Down", "Carriage3Right"
            trackImages = getImages(trackNames);
            trainImages = getImages(trainNames);
            BufferedImage[] car1Images = getImages(car1Names);
            BufferedImage[] car2Images = getImages(car2Names);
            BufferedImage[] car3Images = getImages(car3Names);
            carImages = new BufferedImage[][]{ car1Images, car2Images, car3Images };
        private BufferedImage[] getImages(String[] ids) {
            BufferedImage[] images = new BufferedImage[ids.length];
            for(int j = 0; j < ids.length; j++) {
                String path = "images/" + ids[j] + ".jpg";
                try {
                    images[j] = ImageIO.read(new File(path));
                } catch(IOException e) {
                    System.out.println("Read error for " + path +
                                       ": " + e.getMessage());
                    images[j] = null;
            return images;
        private JPanel getCenterComponent() {
            imageKeys = new int[] {
                0, 1, 3, 4, 1,  2,  5,  4,  0,  5,  3,  2,  2, 2
            trackKeys = new int[] {
                0, 1, 6, 7, 8, 13, 18, 17, 16, 21, 20, 15, 10, 5
            forwardKeys = new int[] {
                0, 3, 2, 3, 3,  2,  2,  1,  1,  2,  1,  0,  0, 0
            reverseKeys = new int[] {
                1, 0, 1, 1, 0,  0,  3,  3,  0,  3,  2,  2,  2, 2
            grid = new JLabel[25];
            JPanel panel = new JPanel(new GridLayout(5,0));
            for(int j = 0; j < grid.length; j++) {
                ImageIcon icon;
                int index = getIndexForValue(j);
                if(index != -1) {
                    icon = new ImageIcon(trackImages[imageKeys[index]]);
                } else {
                    icon = new ImageIcon(trackImages[6]);
                grid[j] = new JLabel(icon);
                panel.add(grid[j]);
            return panel;
        private int getIndexForValue(int value) {
            for(int j = 0; j < trackKeys.length; j++) {
                if(value == trackKeys[j])
                    return j;
            return -1;
        private JPanel getControls() {
            String[] ids = {
                "Start", "Stop", "Forward", "Reverse", "Add Carriage", "Remove Carriage"
            JPanel panel = new JPanel(new GridLayout(0,2));
             for(int j = 0; j < ids.length; j++) {
                JButton button = new JButton(ids[j]);
                button.setActionCommand(ids[j].toUpperCase());
                button.addActionListener(this);
                panel.add(button);
            return panel;
        public static void main(String[] args) {
            MC6 test = new MC6();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test.getCenterComponent());
            f.getContentPane().add(test.getControls(), "Last");
            f.pack();
            f.setLocation(200,100);
            f.setVisible(true);
    }

  • Very Strange Internet Problems

    I own a MacBook Pro 15.4 Inch that I purchased about a year and a half ago. I recently upgraded to Leopard and have all the latest updates. I am from the US, and when I am home my internet works fine. However, I am on travel to Seoul, South Korea right now and am having a very strange internet problem.
    As far as I can tell, the URLs that I type in to my browser are, sparodially, not translated correctly into the webpages that they are supposed to represent. This problem is probably effective 75% of the time, and the rest of the time my internet works roughly correctly. For instance, when I enter http://www.google.com, instead of being taken to the Google homepage, I am taking to the homepage of Jammin Beats DJ Service, an obscure website about a company in northern Pennsylvania. The actual URL of this website is http://www.jamminbeats.com, but when my internet is malfunctioning, 'jamminbeats' is for all intensive purposes replaced by 'google' (that is, it applies not only to the main page, but to sub pages, so "http://www.google.com/weddings" takes you to "http://www.jamminbeats.com/weddings" and etc). For most other webpages, one of two things happens. Either I am taken to the correct page but it is displayed without any images or frames (just the html text and links), or I am taken to a blank page with the header "Under Construction", which I assume is the default for a page that doesn't exist. This is why it seems as though the URLs are simply being interpretted erroneously.
    This problem occurs when connecting both to the wireless and the wired internet at my hotel, and it occurs on both Safari and Firefox, so it is not a connection-specific or browser-specific problem. It may be a problem with the hotel's internet, and as of yet I have not had a chance to test the computer at another location. However, a colleague using an IBM computer has had no problems, and I am currently on a Samsung machine in the business center of the hotel and it is working correctly as well. I have searched extensively online for a similar problem but have come up empty handed, and more than anything, I am confused about what might be causing this problem. The strangest thing is that a fraction of the time, the internet functions normally, but it is usually roughly 15 minutes out of every hour, and eventually I am inevitably taken back to Jammin Beats.
    I am a computer science graduate but I still have no idea what would cause this problem. At first I thought it might be a hacker, but if it is, he or she has been at it consistently for 3 days now, and only seems to be targeting my computer. Any ideas or solutions would be greatly appreciated, as I have been forced to resort to the hotel's business center for checking email, doing work, etc. Thanks in advance.

    I did consider that, as I was in Beijing last week and there are a number of censored sites. However, in Korea I have had problems with very basic sites like facebook, wall street journal, google, yahoo, Korean google, my hotel's webpage, etc. Further, I have successfully gotten all of these sites to load seemingly at random, and can access them without problems on other computers. The only disconnect seems to be between my MBP and the internet, not between Korean internet and the web. I have toyed around with the network settings, and although sometimes after switching from "Automatic" to a fixed connection I get some sites to work, it usually only lasts a short time and eventually the same sites stop working. I reset my cache regularly to make sure I'm not getting sent to cached sites, but this also doesn't help. Further, my Apple Mail, Skype and AIM accounts jump between being connected and disconnected randomly as well. Again, this is isolated to my own computer, which is why I'm so confused.

  • Strange email problem; it started only loading unread emails, but from 3 months ago. It is now loading new emails too, but no emails in the past month, read or unread. It's gmail, set up through the phone, I've restarted restored

    Strange email problem; it started only loading unread emails, but from 3 months ago. It is now loading new emails too, but no emails in the past month, read or unread. It's gmail, set up through the phone, I've restarted restored and updated firmware, deleted the account, anything I could think of, but it's just not accurately downloading the most recent emails.

    The answer is very simple: You were not the original owner of the phone. Target sold you a phone that had been returned. You can verify the date of the original sale here: Apple - Support - Check Your Service and Support Coverage. I suspect you will find that the warranty expiration date is not one year from the date that you bought it.

  • Logical problem using vectors

    Hi and Happy New Year,
    I have a vector in my java application which contains a number of elements that is not fix which means each time the number of elements might change.
    I want to retrieve the elements of the vector 3 by 3 its like table records paging in jsp , asp or php
    - lets say this time i've got 10 elements in my vector , I have to JButtons previous_3 and next_3
    - The first time the program runs I want to get the first three elements of the vector (0 to 2)
    - By clicking on the next_3 button I want to get the next 3 ( 3 to 5) and so on... providing that the exist
    - By clicking on the privious_3 button I want to get the previous 3 ( 0 to 2) in this instance and so on... providing that the exist
    Can anyone give me a hint as how to solve this problem at least give me some ideas cause i am lacking of ideas my brain is frozen, I know that is it more a logical problem that a programming one
    I 've done this kind of thing in Asp and PHP but as I am new to Java
    I just can not figure out how to tackle this issue

    You may want to use the modulus function.
    lets look at an example.
    pseudo code
    vector v = new vector()
    v.size = 10; //lets say there are 10 elements in the vector
    int n = 3; // you want to jump maximum 3 elements each time
    // you can jump 3.3 times before running outide the scope
    // of the vector, well after the third time you must check
    // how many elements that is left in the vector, this is
    // done by modulus n%10 = 1, this means that the last time
    // you can not jump more than 1 element.
    I have to go now so I cant give you any code to cope with the problem, Ill be back in 3 hours, maybe I can give a good axample, but this outline is the way to go.
    TheLaw

  • Strange shutdown problem

    Hi,
    Last night, I had a strange shutdown problem on my iMac G5 (revB, 20", 2.0 Gig), with 1 Gig RAM, running 10.4.4 with all updates. I had had the computer on most of the day, using it off and on. I shut it down, and left the room. When I came back about an hour later, the fans were running (not rapidly, just at the normal speed they run when the computer is running), but the screen was blank, and the "sleep" light was not on. The computer wouldn't respond to any moving the mouse or to keyboard input. I finally shut it down by holding the power button until the fans shut down. Upon restart, everything was normal, and after using it for a few minutes, I was able to shut it down normally. Has anyone else seen this sort of behavior, and is it normal ? Or am I about to have more problems.
    Thanks in advance,
    Dave Fritzinger
    Honolulu, HI

    Hi Dave,
    By the sound of it your computer has "hung" during the shutdown process, but at a point in the process where the system's temperature control mechanisms were still operating (otherwise the fans would be running flat out). My guess in this case is that it was probably actually a finder crash.
    Various things can prevent proper shutdown. Often USB or FW devices are to blame. USB adsl modems , some scanners and hubs and the occasional printer driver seem to be common causes. Software can be responsible too, though - background virus or drive checkers are probably the most common, but far from the only possible causes ( I seem to remember "SpringCleaning" causing this problem when people moved to Tiger 10.4.2 for example) .
    New software or hardware are therefore the first things to look for.
    If you haven't installed anything completely new then one possibility may be that something you are using is not compatible with the latest OS update, and needs an upgrade to a driver. Its also possible that this is a "one off" glitch caused by a temporary problem , but if it happens again I'd be taking careful note of anything that you were using in the previous session.
    You might also want to use the Console (in Utilities folder) to look at your system and crash logs.
    Cheers
    Rod

  • Strange major problem with 975X PowerUp Intel MOBO

    I’m suddenly having a strange major problem with a MSI 975X Platinum PowerUP Edition V2.1 MS-7246 Intel socket 775 motherboard. Previously, it had given me no problems at all.
    It went like this:
    Powered on system in the morning, booting from a cold start.
    Hit DEL key to get into the BIOS.
    Missed the window and the system booted into Windows normally.
    Re-started the system from within Windows.
    Hit DEL key to get into the BIOS and was successful the second time.
    Hit the ENTER key on the first item “Standard CMOS Features”.
    The DATE, TIME and other information was displayed on the next screen, but at this point, the BIOS screen became completely unresponsive to any keyboard input.
    The only thing I could do at that point was to power off.
    Subsequent power on boot-ups resulted in the system always freezing at the BIOS splash screen after the video card sign-on.
    I have switched power supplies, hard drives, keyboards and video cards. I have disconnected everything except the video card, keyboard and one RAM module. I have switched the four RAM modules around and then reduced the RAM to one 256MB module in the proper slot. I even changed the battery on the MOBO, in case it had shorted out and removed and re-seated the BIOS chip. It still halts at the BIOS splash screen.
    The BIOS chip can’t be completely dead, because I powered off and pushed the BIOS reset button on the MOBO to reset the BIOS to the factory defaults. When I re-booted, I could tell that it had actually reset to the factory defaults because I had previously set the BIOS to reboot the system on resumption of power and the factory default was to remain off until the power button was pushed, which was now the default.
    I’m stumped! All I can think of is to get a new pre-programmed BIOS chip and see if that makes any difference, but I’m not sure this system is even worth the expense with no guarantee of success. Any suggestions on how I might get past the BIOS splash screen or do I for sure have a corrupt BIOS chip?

    System specs as per the posting guidelines -
    Board: MSI 975X Platinum PowerUP Edition V2.1 MS-7246 Intel socket 775
    Bios: Version (can’t recall & can’t check since it won’t go past the BIOS splash screen)
    VGA: ASUS EN7600GS nVidia GeForce 7600GS PCI-e 256MB DDR2 (also tried new XFX nVidia
             Geforce 210 PCI-e 2.0 512MB DDR3)
    PSU: Chiefmax 680W ATX (also tried new OCZ 700W ATX)
    CPU: Intel 2.8GHz LGA-775 Core2 Duo Dual-Core Processor
    MEM: 4 x Samsung 512MB 1Rx8 PC2-5300U (2GB total)
    HDD: Seagate Barracuda 250GB SATA2 (also tried Seagate Barracuda 500GB SATA2)
    COOLER: Intel OEM LGA 775 fan/heatsink C25897-001
    OC: No
    OS: Vista Home Premium 32-bit
    I have been through the BIOS reset procedure several times and pretty much as outlined. As I said before, I could tell that it had taken a reset to the factory defaults, because the power on option had changed.

  • Wrt54g strange signal problem

    I have a new wrt54g and I have a strange signal problem. When I am in the house close to the router I only have a good signal (3 bars) but when I take the notebook outside or all the way in the back bedroom I have a excellent signal (5 bars). I am thinking that something in the house might be interfereing with the signal but I have tried changing the channel and still have only 3 bars when in the house, and 6 bars when I take the notebook outside or to the back bedroom. I am using wap but I tried disabling it and still only 3 bars when around the router.
    Any thoughts, and thanks in advance.

    I tried it all but still the same but I did find this, when I take then computer in the back of the house or outside the signal goes up to excellent and stays there even if i take it back in the front of the house where I previously only had a good signal. But the only way to get a excellent signal is to take it far off from the router but once it does get a excellent signal it will stay there even when I take back around the router, crazy I know.
    Any more advise or thoughts?

  • Strange connection problems -- software or hardware?

    I've been experiencing some strange connectivity problems of late, and am wondering if it's a software or hardware issue. I'm running OS-X 10.4.11, and have noticed web-associated "drop-outs" occurring. When I'm browsing, any of the following will happen:
    1. the pages will periodically stop loading, or will take forever to load a few final images.
    2. the page will load with a different format (completely unformatted, like a throwback to Mosaic!).
    3. the page won't load at all, and will instead give me either a "DNS error" message, or will default to my ISP's "We couldn't resolve your page" message.
    4. Nothing out of the ordinary happens.
    Throughout this process, the connection strength is 100%.
    It seems this happens with both Firefox and Safari. Is this an issue with driver software, or is my Airport Card giving out? My computer is about 3 years old.

    I have been having intermittent connection problems on several computers over many years now. We have 12 eMacs, all purchased within a few months of each other, all with 10.4.11. Some computers have almost perfect internet connection, but some are constantly losing connection. If the user just waits a few minutes, the network just comes back or if they open system preferences and renew the DHCP lease it comes back as well. We have tried replacing cables, reloading the operating system, repairing permissions, reseting safari... We are all connecting through ethernet cables through wall jacks then to a switch that is connected to our router. Our DSL provider claims it can't be wiring or a problem on their end or they would see it and we would all have problems. I am not super computer literate... Any suggestions for what I should check on the 4 or so computers that are having lots of connection problems?
    Thanks for any words of wisdom!!!

  • Post Moved Strange-wifi-problem-laptops-work-fine...

    MOVED http://community.bt.com/t5/Other-BB-Queries/Strange-wifi-problem-laptops-work-fine-phones-dont/td-p/...
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

    Have never heard of that problem before so can only give you an idea of some things to check.
    Check in the Homehub management that it is not set to block access to the mobile devices. If you did a factory reset of the hub then it should have cleared any settings but it might be worth checking.
    Have you checked that they are connecting to your Homehub and not to BTWifi which would require further log on to get internet access.
    What exactly is happening with the devices when you try to connect to the internet. Is it all things to do with the internet or can you connect by 3g?
    Have you tried to connect using another router such as at a friends house?  

  • Strange math-problem with LabVIEW 7.1

    Hello!
    I am using LabVIEW 7.1 and I came to this strange math-problem. Could it be that it is a problem of LabVIEW 7.1?
    Ok try this with LabVIEW 7.1:
    open a new VI
    place a subtract-VI (pallet numerical) on the block diagram and try to subtract 0.2 from 1.6
    place a less-VI (pallet compare) on the block diagram and wire a numerical constant 1.4 to input x
    wire the result of the subtraction to input y of the comparison
    place an LED to the output of the comparison
    and start this.
    What does it say?
    The LED should turn on and this means here that 1.4 would be less than 1.4 .
    But I would have expected that 1.4 is not less than 1.4 .
    This works also if you add or subtract upto 0.2 to/from the values 1.4 and 1.6 (or equivalent with 0.2) .
    If you change the inputs of the comparison then the result is as expected and 1.4 is reported not to be less than 1.4 .
    If you compare two constants with the same value 1.4 you will not get the same strange result.
    Does anybody have an explanation for this?
    Espelkamper

    Hello,
    For floating point math: Rounding to multiples of 0.1 is problematic as
    those numbers are infinite fractions in base2 representation...
    So maybe you should change your numbers to integers using fixed point math. If all your input values are in the range of 1.4 to 1.8 you can multiply by 10000 and round to next integer. Then do your comparison on that integer (there's also an 'InRange' function in the comparison palette).
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Strange Surround Problem- someone please resond!

    When I switch tracks over to surround output, C, RL, RR, and LFE all work fine, but L and R stop working...
    In stereo mode L and R work perfectly...
    All siginal is routed perfectly, as far as i can see, so it must be a logic problem...
    Its probably user error, so... please help!!
    Thanks

    I have a presonus firebox - 6 channels out...
    when i have the output set to stereo, it works fine, L and R are there
    when I set the track to surround (the surround routing is set up correctly) L and R are gone... if i move the dot to the L or R, so panning the hard left or right, the sound disappears...
    if i leave the dot in the center, i only hear C, RR, RL, and Sub...

Maybe you are looking for

  • How to go one level up in xml publisher reports

    Hi Experts, I am working in XML Publisher reports; I am working Invoice report (standard report), below is my requirement. Template sample: <?for-each:G_INVOICE?> <?trx_number?> <?trx_type?> <?for-each:G_LINES?> <?LINE_NUMBER?> <?COMMODITY_CODE?> <?Q

  • XSL transformation not working

    Hi! I am having problems when trying to generate XSL transformation from XML to XML (where XML output is actually XHTML). It always fails executing <xsl:callTemplate name="something", when <xsl:callTemplate /> is executed from another <xsl:template>

  • Oracle XE connection to SQL Server 2000

    Hello everybody, I need to make a connection to a table in SQL Server 2000. I am using Oracle XE with Apex 3.0.1. SQL and XE are on the same server(windows server 2003). I need to make an application that uses some data of the SQL Server and for the

  • EHp4 NEw ECM Workflows not trigerring from portal

    CL_HRECM00_WORKFLOW_EVENT This is the class used to trigger the workflow and the workflow templates are WS04000022 WS04000023 WS04000024 WS04000025 and these are having only notification steps and wait for events. When we do the test Run in R/3 event

  • Re: How to Import .CSV file using Mac Desktop Manager 1.0.4?

    I am at a total loss.  I have exported my existing address book of 3100 contacts and it can be in any format -  csv or whatever.  It is from an app called NowContcat and up to date.  You would not know it. Anyway all I want to do is import to my BB B