Musical Rubiks Cube

Can anyone pose the solution to this problem:
I am composing a piece synced to picture that consists of 1musical note for 1 shot. there are 14 shots. i am tempo mapping everything and my 14 note melody is finished.
the kicker is it "rewinds", then plays again faster, then again faster, until you realize that the 14 shots creates a flip book type of sequence. so consequently the music - originally synced to each shots first frame - needs to flip as well until you hear the melody at a consitant tempo - the same tempo as when the "flip book" is in full effect.
any ideas on how to do this in a way that is NOT visually cuting and pasting the midi notes to each shot for each varisped sequence?

if the cycle area is unhighlighted, detect cuts should detect every cut.
If the cycle is highlighted then it only detects the cut in that selection.
I'm not sure how it knows where the cuts are....so it could be hit or miss depending on the movie.
find the edit points manually, zoom in to increase the resolution and then use control to get off grid. When you've found the edit, highlight the note and use command J to pickup clock and move the note to the SPL position.
I'd still talk to the editor and see if there isn't a way to add the notes at his end.
I was kidding about asking for more money, but I bet you'll keep that in mind next time!

Similar Messages

  • Reorganize records in table?

    PartyID PartyFunctionTypeID Surname FirstName MiddleName MiddleName2 DisplayName
    1 4 Yudin Michael NULL NULL Michael Yudin
    2 4 Diggins Ben NULL NULL Ben Diggins
    3 4 Strait Derrick NULL NULL Derrick Strait
    4 4 Mazur Michelle NULL NULL Michelle Mazur
    5 4 Paluga Nicki NULL NULL Nicki Paluga
    6 4 Penny Kirk NULL NULL Kirk Penny
    7 5 Prefab Sprout NULL NULL NULL Prefab Sprout
    8 4 Sandino Moreno Catalina NULL NULL Catalina Sandino Moreno
    9 4 Pyne Dan NULL NULL Dan Pyne
    10 4 iShine Auge NULL NULL NULL iShine Auge
    11 4 Esposito Mike NULL NULL Mike Esposito
    12 4 Eason Eric NULL NULL Eric Eason
    13 4 Lee Kristy NULL NULL Kristy Lee
    14 5 Rubiks' Cube NULL NULL NULL Rubiks' Cube
    15 4 Funk Matthew C. NULL Matthew C. Funk
    16 4 Qin Haiyan NULL NULL Haiyan Qin
    17 4 Borman Arthur NULL NULL Arthur Borman
    18 4 Tinker Mark NULL NULL Mark Tinker
    19 4 McKeand Carol Evan NULL Carol Evan McKeand
    20 4 Willis Patrick NULL NULL Patrick Willis
    21 5 Every Avenue NULL NULL NULL Every Avenue
    This is the party table in database. party id is primary key column, records which has party function type 5 or else not required to touch. I am dealing with only partyfunction type = 4 only, partyid upto 6 is perfect. On partyid 8 sandino must be on middle
    name column but that one null. Another things to fix is in partyID 10 both first name and surname on same column surname should be Augue not null. One way to fix this is manually but I have thousands of record and trying to write script to fix this scenario
    any Idea?

    Hi Arjunji, Pls take a look and tweak accordingly.
    The assumption is display name is accurate in the form of firstName+'  '+MiddleName+'  '+MiddleName2+'  '+SurName. It looks like some of the columns are not accurately parsed and populated and you would like to fix those for
    PartyFunctionTypeID=4.
    Best of luck !
    declare @party as table (
    PartyID int ,
    PartyFunctionTypeID tinyint,
    Surname varchar(25),
    FirstName varchar(25),
    MiddleName varchar(25),
    MiddleName2 varchar(25),
    DisplayName varchar(100)
    insert into @party
    values (
    1, 4, 'Yudin', 'Michael', NULL, NULL, 'Michael Yudin'),
    (2, 4, 'Diggins', 'Ben', NULL, NULL, 'Ben Diggins'),
    (3, 4, 'Strait', 'Derrick', NULL, NULL, 'Derrick Strait'),
    (4, 4, 'Mazur', 'Michelle', NULL, NULL, 'Michelle Mazur'),
    (5, 4, 'Paluga', 'Nicki', NULL, NULL, 'Nicki Paluga'),
    (6, 4, 'Penny', 'Kirk', NULL, NULL, 'Kirk Penny'),
    (7, 5, 'Prefab Sprout', NULL, NULL, NULL, 'Prefab Sprout'),
    (8, 4, 'Sandino Moreno','Catalina',NULL, NULL, 'Catalina Sandino Moreno'),
    (9, 4, 'Pyne', 'Dan', NULL, NULL, 'Dan Pyne'),
    (10, 4, 'iShine Auge', NULL, NULL, NULL, 'iShine Auge'),
    (11, 4, 'Esposito', 'Mike', NULL, NULL, 'Mike Esposito'),
    (12, 4, 'Eason', 'Eric', NULL, NULL, 'Eric Eason'),
    (13, 4, 'Lee', 'Kristy', NULL, NULL, 'Kristy Lee'),
    (14, 5, 'Rubiks'''' Cube', NULL, NULL, NULL, 'Rubiks'''' Cube'),
    (15, 4, 'Funk', 'Matthew', 'C.', NULL, 'Matthew C. Funk'),
    (16, 4, 'Qin', 'Haiyan', NULL, NULL, 'Haiyan Qin'),
    (17, 4, 'Borman', 'Arthur', NULL, NULL, 'Arthur Borman'),
    (18, 4, 'Tinker', 'Mark', NULL, NULL, 'Mark Tinker'),
    (19, 4, 'McKeand', 'Carol', 'Evan', NULL, 'Carol Evan McKeand'),
    (20, 4, 'Willis', 'Patrick', NULL, NULL, 'Patrick Willis'),
    (21, 5, 'Every Avenue', NULL, NULL, NULL, 'Every Avenue'),
    (210, 4, 'Robert', NULL, NULL, NULL, 'Robert God Father Deniro') ---//test record
    UPDATE t4
    SET t4.Surname = t4.Surname2,
    t4.FirstName = t4.FirstName2,
    t4.MiddleName = t4.MiddleName21,
    t4.MiddleName2 = t4.MiddleName22
    FROM
    select PartyID,
    PartyFunctionTypeID ,
    FirstName ,
    MiddleName ,
    MiddleName2 ,
    Surname ,
    DisplayName,
    name1 AS Surname2 ,
    coalesce( name4,name3,name2) as firstname2,
    case
    when name3 is not null and name2 is not null and name1 is not null then name2
    else null
    end as middlename21,
    case
    when name4 is not null and name3 is not null and name2 is not null and name1 is not null then name3
    else null
    end as middlename22
    from (
    select PartyID,
    PartyFunctionTypeID ,
    FirstName ,
    MiddleName ,
    MiddleName2 ,
    Surname ,
    DisplayName,
    replace(PARSENAME( (replace(replace(DisplayName,'.','*'),' ','.')),1 ),'*','.') AS name1 ,
    replace(PARSENAME( (replace(replace(DisplayName,'.','*'),' ','.')),2 ),'*','.') AS name2,
    replace(PARSENAME( (replace(replace(DisplayName,'.','*'),' ','.')),3 ),'*','.') AS name3,
    replace(PARSENAME( (replace(replace(DisplayName,'.','*'),' ','.')),4 ),'*','.') AS name4
    from @party
    where PartyFunctionTypeID = 4
    ) as t2
    where Surname<>name1
    ) as t4 ;
    select * from @party
    where PartyFunctionTypeID=4;

  • Variant Configuration Design

    Guys,
    Does any one know how to design the variant cofiguration data all the to bring from the R/3 to BW Reporting.
    If any one did or knows pls send me the documents of the design.
    Thanks,
    Rahul K

    1. Resize columns as required.
    2. Click on the "Change layout" button. (the Rubik cube button)
    3. Click on the Display tab.
    4. Uncheck box "With optimum column width".
    4. Save as default display variant.

  • AS3 depth management issue

    Hello folks! Looking for a little technical advice - let me
    explain:
    I'm converting a small flash game that I had built in flash 8
    with as2 to flash 9 with as3 and have hit a snag. The visible
    object on the stage in that application is simialr to a rubiks cube
    as seen from an upper corner (sort of an isometric view). There are
    mutliple rows and columns and levels...lets just say it's a 3x3x3
    cube. Through gameplay various cubes are moved around, added and
    removed from the grid, sometimes a slot is empty sometimes full. In
    order to track this and make sure that the cubes stay at the proper
    depth relative to each other I had assigned each slot in the full
    grid a grid number incremented by 10's for rowsand 100's for layers
    and stored the numbers in an array. Then when I added a cube to the
    stage I just looked up its depth value from the array, attached it
    and appended its number to it's instance name and set it's depth to
    the same number . Nothing ever got at an improper depth becuase
    every slot had a fixed absolute number that could be pulled from
    the array. My problem is that the new depth manager won't allow
    gaps - each depth needs to be used before the next one can be used,
    and that when you insert someting at an occupied depth everything
    above it is pushed up by one so I can't track any of my cubes depth
    as I had been becuase they keep changing.
    Example: I'm my old system if I needed to move the first row
    of cubes from the 3rd layer (cubes 310, 320, 330) straight down
    into the second layer I would simply move them then swapdepth to
    210, 220, 230. In the new system since i cant reserve a depth for
    an empty slot I never know what number to move the cube to without
    a convoluted lookup process, and once I do move it...every single
    depth after it gets altered (which seems like a lot of extra work
    for the system by the way)
    So...anyone know a better way to manage depths of a 3
    dimensional grid in as3?

    Personally, I think the new depth system introduces more
    problems than it fixes.
    One advantage in AS3, though, is that you can move a
    DisplayObject from one DisplayObjectContainer to another.
    [edit] Oops, GWD already mentioned this, so I'm basically
    re-iterating what he said [/edit]
    So based on your setup, it might be helpful to make different
    container clips for each "layer" as you described it. Then you can
    simply move the rows into the different containers, and the
    containers are at different depths.

  • Hardware requirements for JavaFx 2.1.1

    Hello there,
    I've built a JavaFx application (Rubiks Cube type game), it runs fine on:
    My desktop (Win7 64bit, has GTX560TI graphics card)
    My laptop (Win7 bit, has ATI5470 card)
    But not on netbook (Win7 Starter, Intel Atom N450), the 3D effect doesn't show, and the images just appear in the corner of screen.
    Is this because it has no graphics card, and uses cpu for graphics?
    Or is it something software related that netbook can't handle?
    Thanks for any advice, I'm just trying to make it clear for the various users using the product.

    Is this because it has no graphics card?likely
    Or is it something software related that netbook can't handle?unlikely
    I'm just trying to make it clear for the various users using the product.Check the Scene3D conditional feature and provide a graceful fallback scenario for users for which this flag returns false.
    For example, show an error info message or a 2D tic tac toe game instead.
    http://docs.oracle.com/javafx/2/api/javafx/application/ConditionalFeature.html#SCENE3D
    See the Graphics section of the JavaFX 2.1 System Requirements document for more info:
    http://docs.oracle.com/javafx/2/system_requirements_2-1/jfxpub-system_requirements_2-1.htm

  • How to make two signals separated

    Now I'm using NI 9215 with BNC to acquire the data. I have two channels come in, but the problem is when I using DAQ Assistant.vi, there is only one channel output, I want the two signals can be separated(Two channels output).
    Anybody can help me?
    Solved!
    Go to Solution.

    In the functions group, under "express" it is under the signal manipulation (looks like a rubiks cube icon)  it is the one called "split signal" I have used it with the Daq Assist.
    Alan

  • Tile Sliding Web App

    Essentially this is the watered down version of a mock up for a web app.
    I want to be able to slide the coloms and rows seperatly in almost a rubiks cube fashion.
    Would this be possible to build in edge animate?

    You can do it using JavaScript and jQuery within Animate.  There's a lot of fancy data structures work you would need to do to store and shift each square, but once you have that all sorted, it's fairly trivial to actually move the squares.  I know this is a very vague answer, but it's a very code-centric solution.  Hope that points you in the right direction.
    -Elaine

  • 3D Game   help needed

    Latelly I have been working on many 3d games such as a rubiks cube and 3d chess game using a 3d class i made that uses a 2d graphing plane but i wanted to start making some more complex games. I have 3d rotation and other basic tasks working but i was wondering if someone could explain how to make basic movement where objects get bigger as they get closer to a focal point and tasks similar to that. If anyone has any idea of how to do this or info on 3d it would be very helpful to me. I have a setup that somewhat works for this but i can tell it doesnt work that well.

    goddard wrote:
    try this one:
    http://www.amazon.com/Developing-Games-Java-New-Riders/dp/1592730051/ref=sr_1_1?ie=UTF8&s=books&qid=1211721081&sr=1-1
    It's bit older (the author uses JDK 1.4.2 I think), but it covers a lot of concepts including how to create 3D sofware renderer in Java.i would definitely vouch for [Developing Games in Java|http://www.amazon.com/Developing-Games-Java-New-Riders/dp/1592730051/ref=sr_1_1?ie=UTF8&s=books&qid=1211721081&sr=1-1].
    i read it years ago when it came out and despite its size (1,000 pages) its an easy cover to cover read.
    i already had the math background but for people who dont i can say i liked how he teaches the concepts.
    plus its very robust. he covers threads, 2d, networking/multiplayer, audio, 3d, ai.

  • Pixels showing through

    I'm building a rubiks cube, it has images on the outsides, and rectangles inside.
    The inner rectangles have a tiny gap so they dont touch the back of the images.
    But still, half a dozen pixels will show through, I'm wondering if there is anyway round this.
    I'm thinking repaint order, but not sure how I can change it exactly.
    There is basically the Cube(Group), which contains 27 Cubelets(Group) added via its getChildren().
    Each cubelet has 6 faces which are added via its getChildren() method
    Any ideas?

    Its difficult to say without actually seeing it, but Apple have a policy when it comes to [*pixel anomalies*|http://support.apple.com/kb/HT1721].

  • 3D Snapshot Images are incomplete

    The 3d models captured by the Sprout are full of holes and incomplete.  This is a Rubics Cube that I put on my mat.  The camera ran through its calibration beforehand.
    Any suggestions?
    Thanks,
    Michael

    Yeah, I have a lot of trouble also.  Clean the glass on the head unit.
    Try adjusting the lamp brightness.  That adjustment is on the Windows Control Panel under a "Sprout" heading.  The Rubik cube is no doubt a problem child: it has some very dark colors and its reflective, the worst of all possible worlds.  Try increasing the brightness: some of the missing dark sections may appear.
    On the other hand, decreasing brightness may get rid of some of the splatter you see.
    Let us know what you find.  Thanks.

  • DWM and xwinwrap

    Hello there.
    I am using xwinwrap to run a video as my wallpaper, but dwm keep showing it in the pager and the video only runs on one desktop.
    I have no idea how to show the same  video on all desktops.
    Any help?

    Ah, the desktop-tag-thing.
    So i must edit this?
    static const Rule rules[] = {
    /* class instance title tags mask isfloating monitor */
    { "Gimp", NULL, NULL, 0, True, -1 },
    { "Firefox", NULL, NULL, 1 << 8, False, -1 },
    I moved to dwm recently, so i am dont know exactly how it works.
    xwinwrap puts a window as wallpaper, something like that, or just leave the specified window borderless, sticky, unmovable, something like that. I use mplayer to run the video and xwinwrap puts it as wallpaper.
    @ Off topic.
    Do you solve rubiks cube?
    Last edited by granada (2013-02-01 19:10:43)

  • Peut on charger des modeles pour le menu new mesh for layer

    bonjour
    je cherche a charger des nouveaux modeles pour le new mess for layer dans l onglet 3d
    il y a deja le cube , l anneau , la bouteille etc . je voudrais savoir si il est possible d avoir un modele pour un rubik cube sur lequel pour chaque face visible du petit cube on pourrait y mettre une photo
    merci de votre aide
    cordialement

    bonjour
    je cherche a charger des nouveaux modeles pour le new mess for layer dans l onglet 3d
    il y a deja le cube , l anneau , la bouteille etc . je voudrais savoir si il est possible d avoir un modele pour un rubik cube sur lequel pour chaque face visible du petit cube on pourrait y mettre une photo
    merci de votre aide
    cordialement

  • MouseListener Problems - need code solution

    I've been banging my head against the wall the past month or so on this assignment of mine - i've come to the stage where i really some help from a person that really know the java - i have a due date coming up and i really need to output this program.
    I've been thru event handling, but the majority of the code i didnt even have to look at it - im very new to java -doing it for about 6 months or less - did C so that helped a bit. But i can;t make head or tails about mousepressed,mouse pressed,mouse realsed,mouse entered and mouse exited - my code my out put is also blank...
    Can somebody, anybody help me with this coding - im sorry i dont have any dukes, but i promise as soon as i get i will remember the person and give as much as he or she wants.
    im gona paste my entire code assignment here...sorry for this...
    This is my main class : javac ShowRubik.java and java ShowRubik
    please let me know.
    Regards
    RAfiek
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ShowRubik extends JApplet implements MouseListener {
       Rubik cube;
       private int width = 300, height = 300;
       int count = 0;
       public void init()
         cube = new Rubik(width, height);
         cube.addMouseListener(this); 
         // get content pane and set its layout
         Container container = getContentPane();
         container.setLayout( new BorderLayout() );
         container.add(cube, BorderLayout.CENTER);
       // execute application
       public static void main( String args[] )
          int width=300, height=300;
          if (args.length !=2) {
         width = 300;
         height = 300;
          JFrame applicationWindow = new JFrame("Rubik's Cube Demo");
          applicationWindow.setDefaultCloseOperation(
             JFrame.EXIT_ON_CLOSE );
          ShowRubik appletObject = new ShowRubik();
          appletObject.setWidth(width);
          appletObject.setHeight(height);
          appletObject.init();
          appletObject.start();
          applicationWindow.getContentPane().add(appletObject);
          applicationWindow.setSize(width,height);
          applicationWindow.setVisible(true);
          applicationWindow.show();
       // enables application to specify width of drawing area
       public void setWidth( int newWidth )
          width = newWidth;
       // enables application to specify height of drawing area
       public void setHeight( int newHeight )
          height = newHeight;
    // MouseListener event handlers
       // handle event when mouse released immediately after press
       public void mouseClicked( MouseEvent event )
         if (count == 0){
         cube.Turn(Rubik.LEFT);
         if (count == 1){
         cube.Turn(Rubik.RIGHT);
         if (count == 2){
         cube.Turn(Rubik.UP);
         if (count == 3){
         cube.Turn(Rubik.DOWN);
         if (count == 4){
         cube.Twist(Rubik.LEFT,0);
         if (count == 5){
         cube.Twist(Rubik.RIGHT,1);
         if (count == 6){
         cube.Twist(Rubik.UP,2);
         if (count == 7){
         cube.Twist(Rubik.DOWN,0);
         if (count == 8){
         cube.Twist(Rubik.LEFT,2);
         if (count == 9){
         cube.Twist(Rubik.RIGHT,2);
         if (count == 10){
         cube.Twist(Rubik.UP,0);
         if (count == 11){
         cube.Twist(Rubik.DOWN,1);
         if (count == 12){
         cube.Twist(Rubik.LEFT,2);
         if (count == 13){
         cube.Twist(Rubik.RIGHT,0);
         if (count == 14){
         cube.Twist(Rubik.UP,1);
         if (count == 15){
         cube.Twist(Rubik.DOWN,2);
         if (count == 16){
         cube.Reset();   
         if (count == 17){
         cube.Scramble();
         if (count == 18){
         cube.Reset();   
         count++;
       // handle event when mouse pressed
       public void mousePressed( MouseEvent event )
         repaint();
         show();
       // handle event when mouse released after dragging
       public void mouseReleased( MouseEvent event )
         cube.repaint();
       // handle event when mouse enters area
       public void mouseEntered( MouseEvent event )
         cube.repaint();
       // handle event when mouse exits area
       public void mouseExited( MouseEvent event )
         cube.repaint();
    }My Rubik class
    * Rubik.java
    * Created on 10 May 2004, 01:50
    * @author  Rafiek Buffkins
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JApplet;
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    public class Rubik extends JPanel
    public static int UP =0;
    public static int DOWN = 1;
    public static int TOP = 0;
    public static int BOTTOM = 1;
    public static int LEFT = 2;
    public static int RIGHT = 3;
    public static int BACK = 4;
    public static int FRONT = 5;
    private Face[] faces = new Face[6];
    private Color[] colorList = new Color[] { Color.YELLOW, Color.BLUE, Color.GREEN, Color.WHITE, Color.ORANGE, Color.RED};
    private int current = 0;
    private int top = 4;
    private int height, width;
    //[6][6][4]
    private int[][][] neighbors = {
                   {     {-1,-1,-1,-1}, {2,0,4,5}, {-1,-1,-1,-1}, {2,0,5,4}, {2,0,1,3}, {2,0,3,1}     },
                   {     {3,0,4,5}, {-1,-1,-1,-1}, {3,0,5,4}, {-1,-1,-1,-1}, {3,0,1,2}, {3,0,2,1}     },
                   {     {-1,-1,-1,-1}, {0,2,5,4}, {-1,-1,-1,-1}, {0,2,4,5}, {0,3,2,1}, {0,3,1,2}     },
                   {     {1,3,4,5}, {-1,-1,-1,-1}, {1,3,5,4}, {-1,-1,-1,-1}, {1,3,2,0}, {1,3,0,2}     },
                   {     {5,4,1,3}, {5,4,2,0}, {5,4,3,1}, {5,4,0,2}, {-1,-1,-1,-1}, {-1,-1,-1,-1}     },
                   {     {4,5,3,1}, {4,5,0,2}, {4,5,1,3}, {4,5,2,0}, {-1,-1,-1,-1}, {-1,-1,-1,-1}     },
    Rubik(int w, int h)
      width = w;
        height = h;
    public void Reset()
        for (int i=0; i<6; i++)
         faces[i] = new Face(i);
        current = 0;
        top = 4;
        repaint();
    public void Turn(int direction)
        for (int i=0; i<3; i++)
         Twist(direction,i);
          repaint();
    public void Twist(int direction, int rowOrCol)
         int front_face = current;
         int top_face = top;
         int left_face = neighbors[top][current][RIGHT];
         int right_face = neighbors[top][current][LEFT];
         int bottom_face = neighbors[top][current][UP];
                 int back_face = neighbors[current][bottom_face][UP];     //trying to create and store faces into arrays and then
                                       //and then change them accordingly
         int face1, face2, face3, face4;
         if((direction==LEFT)||(direction==RIGHT))               //row twisting
              int[] rowCopy = new int[3];
              face1 = current;
              face2 = neighbors[top][face1][direction];          //trying to determine which faces are involved...
              face3 = neighbors[top][face2][direction];          //not sure....
              face4 = neighbors[top][face3][direction];
              rowCopy[0] = faces[face1].getBlocks(rowOrCol,0);     //copy face1
              rowCopy[1] = faces[face1].getBlocks(rowOrCol,1);
              rowCopy[2] = faces[face1].getBlocks(rowOrCol,2);
              for(int j = 0; j<3 ;j++)                    //twisting
                faces[face1].setBlocks(rowOrCol, j, faces[face2].getBlocks(rowOrCol,j));
              for(int j = 0; j<3; j++)
                faces[face2].setBlocks(rowOrCol, j, faces[face3].getBlocks(rowOrCol,j));
              for(int j = 0; j<3; j++)
                faces[face3].setBlocks(rowOrCol, j, faces[face4].getBlocks(rowOrCol,j));
              for(int j = 0; j<3; j++)
                faces[face4].setBlocks(rowOrCol, j, rowCopy[j]);
                                          //if twisting up :
                                       // back become reverse(top)
                                       // bottom become reverse(back)
                                       // front become bottom
                                       // top become front
         else if((direction==UP)||(direction==DOWN))          //trying column twist
           int[] colCopy = new int[3];
           int x, y, i;
         if(direction==UP)                         //twist up
           colCopy[0] = faces[front_face].getBlocks(0,rowOrCol);
           colCopy[1] = faces[front_face].getBlocks(1,rowOrCol);
           colCopy[2] = faces[front_face].getBlocks(2,rowOrCol);
         //front become bottom or bottom changes to front?
         for( i = 0; i<3; i++)
           faces[front_face].setBlocks(i, rowOrCol, faces[bottom_face].getBlocks(i, rowOrCol));
         //bottom become reverse(back)
         y = Math.abs(2 - rowOrCol);
         for( i = 0; i<3; i++)
         x = Math.abs(2-i);
           faces[bottom_face].setBlocks(i, rowOrCol, faces[back_face].getBlocks(x, y));
         //back become reverse(top)
         y = Math.abs(2 - rowOrCol);
         for( i = 0; i<3; i++)
         x = Math.abs(2-i);
           faces[back_face].setBlocks(x, y, faces[top_face].getBlocks(i, rowOrCol));
         // top become front or front become top
         for(i = 0; i<3; i++)
           faces[top_face].setBlocks(i, rowOrCol, colCopy);
                                       //when twisting down
                                       //top become reverse(back)
                                       //back become reverse(bottom)
                                       //bottom become front
                                       //front become top
         if(direction==DOWN)     
         //copy front
         for(i=0; i<3; i++)
         colCopy[i] = faces[front_face].getBlocks(i, rowOrCol);
         //front become top
         for(i = 0; i<3; i++)
         faces[front_face].setBlocks(i, rowOrCol, faces[top_face].getBlocks(i, rowOrCol));
         //top become reverse(back)
         y = Math.abs(2 - rowOrCol);
         for(i = 0; i<3; i++)
         x = Math.abs(2 - i);
         faces[top_face].setBlocks(i, rowOrCol, faces[top_face].getBlocks(x, y));
         //back become reverse(bottom)
         y = Math.abs(2 - rowOrCol);
         for(i = 0; i<3; i++)
         x = Math.abs(2 - i);
         faces[back_face].setBlocks(x, y, faces[bottom_face].getBlocks(i, rowOrCol));
         //bottom become front
         for(i = 0; i<3; i++)
         faces[bottom_face].setBlocks(i, rowOrCol, colCopy[i]);
         //if not middle row or colomn, twist the attached faces of the cube
         if(rowOrCol != 1)
         //row twisting
         //top row
         if((rowOrCol==0)&&(direction==RIGHT))
         faces[top].Rotate(Face.COUNTER);
         if((rowOrCol==0)&&(direction==LEFT))
         faces[top].Rotate(Face.CLOCK);
         //bottom row
         if((rowOrCol==2)&&(direction==RIGHT))
         faces[bottom_face].Rotate(Face.CLOCK);
         if((rowOrCol==2)&&(direction==LEFT))
         faces[bottom_face].Rotate(Face.COUNTER);
         //column twisting
         //left column
         if((rowOrCol==0)&&(direction==UP))
         faces[left_face].Rotate(Face.COUNTER);
         if((rowOrCol==0)&&(direction==DOWN))
         faces[left_face].Rotate(Face.CLOCK);
         //right column
         if((rowOrCol==2)&&(direction==UP))
         faces[right_face].Rotate(Face.CLOCK);
         if((rowOrCol==2)&&(direction==DOWN))
         faces[right_face].Rotate(Face.COUNTER);
         repaint();
    }//close public void twist...
    public void Scramble()
    int dir, slice;
    for (int i=0; i< 1000; i++)
    dir = (int) (Math.random() * 4);
    slice = (int) (Math.random() * 3);
    Twist(dir,slice);
    repaint();
         protected void paintComponent(Graphics g)
         super.paintComponent(g);
         for (int i=0; i<3; i++)
         for (int j=0; j<3; j++)
              g.setColor(getColor(faces[current].getBlocks(i,j)));
              g.fillRect(j*55,i*55,50,50);
         protected Color getColor(int index)
         return colorList[index];
         protected Face getFace(int which)
         int front_face = current;
         int top_face = top;
         int left_face = neighbors[top][current][RIGHT];
         int right_face = neighbors[top][current][LEFT];
         int bottom_face = neighbors[top][current][UP];
         int back_face = neighbors[current][bottom_face][UP];
         if (which == FRONT)
         return faces[front_face];
         else if (which == TOP)
         return faces[top_face];
         else if (which == LEFT)
         return faces[left_face];
         else if (which == RIGHT)
         return faces[right_face];
         else if (which == BOTTOM)
         return faces[bottom_face];
         else /* (which == BACK) */
         return faces[back_face];
    }//close of rubik class
    My face class
    public class Face
      private int side;
      private int[][] blocks = new int[3][3];
      public static int CLOCK = 0;
      public static int COUNTER = 1; 
         public Face(int sideOfCube)
           side = sideOfCube;
           for(int i=0; i<3; i++)
             for(int j=0; j<3; j++)
               blocks[i][j] = sideOfCube;     //Not sure about this....
    public int getBlocks(int i, int j)
       return blocks[i][j];
    public int setBlocks(int i, int j, int colorNum)
         return blocks[i][j] = colorNum;
       public void Rotate(int direction)
         int[][] blocks_old = new int[3][3];
         int x, y;
         for(int i = 0; i<3; i++)
            for(int j = 0;j<3; j++)
              blocks_old[i][j] = blocks[i][j];               //blocks = old_blocks???
            }                              //or blocks_new = blocks??
         if(direction==0)
           for(int i=0; i<3; i++)
               for(int j=0; j<3; j++)
              y = i;
              x = Math.abs(2-j);
              blocks[i][j] = blocks_old[x][y];
         if(direction==1)
            for(int i = 0; i<3; i++)
               for(int j = 0; j<3; j++)
              x = j;
              y = Math.abs(2-i);
              blocks[i][j] = blocks_old[x][y];

    What is your problem here?
    What are the different methods doing:
    mouseEntered(MouseEvent e) is being fired, when the mousepointer entered the current component.
    mouseExited(MouseEvent e) is being fired, when the mousepointer left the current component.
    mousePressed(MouseEvent e) is being fired, when the user presses any of the mousebuttons over the current component
    mouseReleased(MouseEvent e) is being fired, when the user releases the pressed button and
    mouseClicked(MouseEvent e) is being fired, when the user presses and releases any of the mousebuttons.
    the current component in this case is the component, where the mouseListener is registered to.
    Your code throws a NullPointerException, since the array faces is not initialized. "Reset" is missing in the constructor of Rubik.
    when you click the mouse (press and release), the colors changes 18 times, because what is missing in mouseClicked(...) is:
           if (count == 19){
                   count = 0;
           }for your example the Methods mousePressed to mouseExited are not nessessary and could be implemented empty:
         // handle event when mouse pressed
         public void mousePressed( MouseEvent event ) {}So: why are you bangig your head? What do you expect?
    Michael

  • Running this Shell file

    Hello, I was wondering how to run this Shell file I cant get it to work.
    #!/bin/bash
    cd bin && java -Xmx1024M server
    It opens in textedit by the way.
    Thanks for your help.
    Also, Ive dragged the file to terminal and hit enter I get the message
    -bash: /Users/Steven/Desktop/run.sh: /bin/bash^M: bad interpreter: No such file or directory
    Should the file be in the folder that it came downloaded in?
    Message was edited by: Cant Solve Rubiks Cubes

    -bash: /Users/Steven/Desktop/run.sh: /bin/bash^M: bad interpreter: No such file or directory
    I am concerned about the ^M which generally indicates that the script file is using either Mac <CR> line terminators, or Windows <CR><LF> terminators.
    However, a Unix script need to have Unix <LF> line terminators.
    You can use the file command to find out how your file's lines are terminated:
    echo -e "
    c" >tmp.cr
    echo -e "
    c" >tmp.crlf
    echo -e "
    c" >tmp.lf
    file tmp.cr tmp.crlf tmp.lf
    tmp.cr: ASCII text, with CR line terminators
    tmp.crlf: ASCII text, with CRLF line terminators
    tmp.lf: ASCII text
    You want to see *ASCII text*
    Generally getting <CR> terminated lines comes from using a Mac text editor or Mac word processor to create the script.
    A <CR><LF> terminated file is generally one that came from a Windows system.

  • Scaling Falling off artboard

    Hi all
    lokking for a little input for a problem I have come across, I have found a get around but wondering why...
    Size of clipped objects 288mm x 450mm approx
    Unclipped 1497mm x 1848mm approx
    when I try to right clip & scale 400% I get a message saying unable to continue as falls of the artboard ( clipped elements not seen )
    But when I put *4 after the size in the transform window This allows the scaling enough if the clipped objects are now falling off the artboard..
    Why if it allows it one way won't allow it the other ?..
    cheers for any eye opening stories

    Could your reference point (looks like a rubiks cube) be set to something different than center.
    5779.55 mm is max artbaord size, I suspect this is somehow reacting with this and the unmasked size when using transform, possibly not when using scale.

Maybe you are looking for

  • Using fonts which aren't "installed"

    According to a Java2D book I have you can definitely load Type 1 fonts and TrueType fonts (and any other type that java supports) from some location other than the defaults by setting the java.awt.fonts command line option like so: java -Djava.awt.fo

  • Is there any way i can transfer all my SMS messages from my 3GS to my 4 ?

    is there any way i can transfer all my SMS messages from my 3GS to my 4 ?

  • After Effects

    I am using Final Cut Studio. FCP7, Motion 4 etc. etc. I want to also use the latest After Effects software without installing the entire CS5 package. As I want to continue my workflow with FCP. I am somewhat aware of Automatic Duck as a plugin so as

  • How can I buy a film from an ohter store?

    How can I buy a film from an ohter iTunes store? I have an Austrian Apple ID and want to buy something from Germany iTunes Store because in the Austrian store you won't get it. I look forward to hearing from someone!

  • Error in internet account preferences - mail accounts inactive

    My mail accounts have been inactive for a few weeks now. I have tried deleting them from system preferences but it won't do it. Not sure if this has been caused by a recent upgrade or not. iCloud account won't launch at all. Any assistance would be a