LR Win 1.3.1 Undo (Cntrl-Z) Broken

The last update broke the program to the point that it is unusable for me.
I usually try applying settings in develop, and Ctrl-Z if I don't like the effect. Now it's like the undo is stuck. It not only undoes the last action but all others before it, popping me to different pictures and undoing those changes as well. I'm at a loss.

Try deleting your preferences file and restarting LR. (See FAQ for location).

Similar Messages

  • Undo in Address Book?

    One of my main frustrations in Address Book is the lack of an undo feature. Sometimes while editing a contacts information, I accidentally erase the data in the notes filed. Is there any way to undo this one the deed is done (but not saved?)

    I'm still mad that single-clicking anywhere in the notes field gets it all highlighted, but lucky for me, Cmd-Z has restored it - so far.
    I'm super happy that the Cmd-Z has been fixed. Previously (about 10.4.midlife), it restored the address card to the original state when the machine was last booted.
    Now that was ugly!
    If Apple would read their info@ mail like they did when I bought my Fat Mac, I could have complained to them, directly, instead of this forum. Does Apple data-mine the forums to learn what's happening?
    Since the Cmd-Z got fixed, I've been walking on eggs for fear it would break again.
    gekkoe wrote:
    I must be doing something wrong if this is working for others. One way or another the undo seems completely broken to me.
    To reproduce crazy behavior:
    1. Make some notes of any kind on an address book entry.
    2. Exit edit mode.
    3. Re-enter edit mode and click on notes. (This will select all text.)
    4. Push space or delete, causing entire note to be deleted.
    5. Beg, plead, scream to your hearts content, but you'll never see your notes again.
    If this isn't the way of things, I'd sure love to know what I'm missing.

  • Error while accessing TE application using IE 9

    Hi Experts,
    We are getting error while trying to access Travel And Expense applications using Internet Explorer 9.
    Error description---Sorry your browser/program is not supported by web dynpro.

    Hi,
    Please refer the below links which could be helpful:
    Sorry, your browser/program is not supported by Web Dynpro -  IE 9 / Win 7
    /thread/274510 [original link is broken]
    Regards,
    Kiron Kumar T.

  • DBVERIFY - Data in bad block

    During RMAN validate structure I notice that I have plenty of files with data corruption. Then I run DBVERIFY and identify those files and database objects. I know what to do with broken tables and indexes, but 2 lines are strange for me:
    1) object with segment type "TYPE2 UNDO" on undo tablespace
    2) broken block on user datafile which is empty (without any object on it)
    Do I mange somehow those bad blocks or leave it without changes?
    My DB: 9i
    My OS: Linux x32

    During RMAN validate structure I notice that I have plenty of files with data corruption. Then I run DBVERIFY and identify those files and database objects. I know what to do with broken tables and indexes, but 2 lines are strange for me:
    1) object with segment type "TYPE2 UNDO" on undo tablespace
    2) broken block on user datafile which is empty (without any object on it)
    Do I mange somehow those bad blocks or leave it without changes?I can say it is BUG, I have seen such issues. see below.
    from 9i home/database
    idle> select file#,name from v$datafile where file#=11;
    FILE# NAME
    11 */oracle/oradata/demo92/undo2.dbf*
    idle>
    test > /home/oracle: demo92> dbv file=/oracle/oradata/demo92/undo2.dbf
    DBVERIFY: Release 9.2.0.8.0 - Production on Wed Jul 6 06:39:18 2011
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    DBVERIFY - Verification starting : FILE = /oracle/oradata/demo92/undo2.dbf
    Page 1 is marked corrupt
    Corrupt block relative dba: 0x00000001 (file 0, block 1)
    Completely zero block found during dbv:
    Page 2 is marked corrupt
    Corrupt block relative dba: 0x00000002 (file 0, block 2)
    Completely zero block found during dbv:
    Page 3 is marked corrupt
    Now i run the DBV from 11g home the same file.
    test > */oracle/11g/product/11.1.0/db1/bin*: demo92> *./dbv file=/oracle/oradata/demo92/undo2.dbf*
    DBVERIFY: Release 11.1.0.7.0 - Production on Wed Jul 6 06:40:26 2011
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    DBVERIFY - Verification starting : FILE = /oracle/oradata/demo92/undo2.dbf
    DBVERIFY - Verification complete
    Total Pages Examined : 57600
    Total Pages Processed (Data) : 0
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index): 0
    Total Pages Failing (Index): 0
    Total Pages Processed (Other): 30601
    Total Pages Processed (Seg) : 0
    Total Pages Failing (Seg) : 0
    Total Pages Empty : 26999
    Total Pages Marked Corrupt : 0
    Total Pages Influx : 0
    Message 419 not found; product=RDBMS; facility=DBV
    Message 424 not found; product=RDBMS; facility=DBV
    test > /oracle/11g/product/11.1.0/db1/bin: demo92>
    I cant see the corruption here.
    SO i prefer you to upgrade database.

  • Probook 4530s

    Hi all 
    I am using HP pro book 4530s with win 7 64 bit
    serial 
    i have broken the c partion into two partion C and D
    now i want to revert my laptop to factory default using hp recovery partition. but i am getting error after pressing f11
    "the boot selection failed because a required device is inaccessible"
    i have used the patch of sp48415

    Hi:
    If you changed the drive letter of the recovery partition from its original (it sounds like you did), the recovery manager can't find the recovery partition as it is looking for it on drive D:\.
    So, back up your files and change the drive letter of your current D:\ drive to something else down the line and change your recovery partititon drive letter back to D:\.
    Re-do the F11 after you complete this task.
    Paul

  • Firefox asks for proxy settings when utube is connected?

    Whenever u tube is connected through Firefox or chrome, it reads that proxy server is refusing connection, can anyone guide me as to what is this?

    > 1. So the GPP settings will automatically stop applying when the
    > computer is out of the IP range?
    Yes, unless it is even out of the domain. If the computer cannot reach a
    DC, it will NOT process any GPOs.
    > 2. The article on the IP range is only showing Win 8, 2008 R2, and
    > 2012.  Will that item-level targeting work correctly with Windows 7 as well?
    To be honest, it only works in Win 7. Starting with Win 8, ILT for IP
    adresses is broken...
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • How to undo Firefox 5 in Win 7 and in XP? Generally, how to stop automatic Firefox updates?

    Firefox 5 has reduced toolbar and other services on both of my 2 computers -- a Win 7 and an XP3. Would like to go back to version 4, stop automatic updates in Firefox.

    That is a message about '''IE''', not about Firefox. The Mozilla/4.0 in your UserAgent string and in that message pertains to Trident rendering engine in Internet Explorer.
    http://en.wikipedia.org/wiki/Mozilla
    http://ask.metafilter.com/12219/Why-is-it-that-Internet-Explorer-is-referred-to-as-Mozilla40-And-why-is-it-that-Safari-Opera-et-al-are-referred-to-as-Mozilla50

  • I play solitaire from the ( Game Center) I can be up 50-75 pts but opponent suddenly jumps up to 200pts.  How is that done. Opponent wins and doesn't use( undos). I want to play along but is so frustrating when they are so ahead of me HIV read everything.

    I play solitaire fr the (game center on I pad.   I can be up 75 points but suddenly opponent jumps 50-100 points ahead of me.   I tap the cards and know the original solitaire game. But ca cot understand how the win so quickly.  I hv tried reading material abt this but find no answer.  Anita

    Read the reviews for the app and see if others have the same issue. If they do, then you know it's not just you and could be something with the app or something.

  • [ID CS2 Win] Clearing the undo stack

    Has any one managed to create a command to clear the undo stack?
    I have created one my self using ICmdHistory::Discard ( theTargetRef ) passing in the doc UIDRef but nothing happens, the undo stack is still intact. Not sure if that's the right target or even if this is the right approach.
    Any help would be appreciated.

    Thanks Marco - I edited the file instead of deleting, and now have a sensible menu.
    Ian

  • Cntrl-z undid 2hrs of work

    Anyone else had this happen? I hit the undo in develop module and the scroll bars moved around for a few seconds and after it was done, over 2 hrs of photo categorization and keywording were undone.
    I think my wife had something similar happen the other afternoon but I told her it was just her imagination, must have hit a wrong key sequence or applied something after a cntr-a. - no brownie points for me that night.
    Also had the scroll bar on the film strip latch strangely so that it would scroll to the right on it's own every few seconds and change the working photo.
    Running vista-64 on a clean install of LR2.0. brand new system.

    I've had it happen in LR 1.4.1 too (Win XP). The "mouse cursor" (focus) seems to get stuck on an adjustment control in Develop module, and using CNTRL+Z sometimes undoes all current edits and also either undoes "advance to next picture" (so suddenly I'm back on my previous edited photo), or undoes the module change if I was viewing the current image in the Library and then went into Develop mod... suddenly I'm back in Library grid... and sometimes LR *only* undoes the last few, most current edits (and manages to stay on the current image in Develop module). It seems to undo up to the point that LR started getting "confused." Doing a redo rarely helps.
    To avoid this I use John's suggestion of working with History steps (if I can get my mouse "un-bound" from the control it appears stuck on). What works better, for me, is simply being slower/more patient working in the Dev module, performing adjustments more deliberately (and hitting ENTER after inputting values or using sliders) and giving LR plenty of time to catch up with itself.

  • How do I undo BC Partition repair in disk utility?

    Here's the summary:
    8-core MacPro2,1 running 10.6.8, Paragon NTFS for Mac, Bootcamp Win7.
    4 internal HDD drives: two 1.5TBs for data, one 1TB for MacOS, one 1.5TB for Win7 bootcamp.
    I mostly use the Mac side for music production (but rarely), and the Win side for business and everything else. Scores and scores of Win apps installed over the years. [4 monitor system], well over 500K files on the drive.
    I just backed up the data from the two data-only drives, and made a bootable clone of the MacOS drive (SuperDuper). I have never successfully been able to clone the Win7 Bootcamp NTFS drive (even with Winclone back in 2009) because of volume sizes (or something). I decided to try again, from WITHIN Windows this time (all other attempts were from the Mac OS side).
    I bought, downloaded, and installed Acronis True image from within the Win7 bootcamp system. [I obviously did not know that it was gonna modify my MBR, and I had no idea at the time that the GPT and MBR areas were somehow 'mingled' on a bootcamp drive.]
    So, when I performed the Acronis-requested reboot (my default boot is into the Bootcamp/Win7 drive), it failed to boot and requested some Windows recovery media or something. I was concerned that anything i put in the DVD drive would sabotage my priceless (in retrospect) stable/optimized Win7 bootcamp system. So, i just hard-powered down the Mac and tried to restart.
    I did the Alt/option key, and i was presented with the Mac or Win drive icons. I selected Win, and then I got a different boot error message--'no MBR found'.
    But this time i realized that Acronis had stepped where it shouldn't have, and I figured the Mac side could fix the boot problem (maybe with bootcamp assistant or something).
    If i had stopped THERE, and searched the forums i could have found how to fix THAT problem--that has been answered tons of times…
    But, instead, i went to Disk Utility and asked it to repair my Bootcamp partition (I have Paragon NTFS and it has worked for years, and so I did not have a reason to doubt Disk Utility's ability to Repair an NTFS volume--not that i have tried it before, of course).
    Disk Utility repair ran for about 10-15 minutes and said it fixed about 10-20 things.
    The drive information (in the side bar and below) still had the BOOTCAMP partition, reported that it was NTFS, said that there was 308 GB still available of the 1.5TB drive, and that it contained 1.19TB 'used'. Looked normal to me.
    I closed Disk Utility and then opened a Finder window to see if DU left any 'artifacts' of its 'fixes' on the BOOTCAMP partition, and all the files were gone! Even though DU said it had 1.19TB 'used', all of my files are gone. [I rebooted also, to verify that it was not some 'delayed reporting' issue.]
    When I enable 'hidden files' to show, what I get on the Bootcamp partition are these three entries:
    .DS_Store (16KB), .fseventsd folder (with a 1KB UUID file inside it), and a .Trashes folder with zero KB.
    At this point, I panic and assume the position of despair. There is no 'undo' key for the D/U that I can find. I do an orderly shut down of the system, physically remove the Win7 BC drive, and make/verify a sector-by-sector clone of the drive (on a Win7 laptop, using Acronis--22 hours).
    In Win7 Disk Management, the GPT partition (on the original drive) shows up and the BOOTCAMP partition shows up--with the proper size--but windows does NOT recognize the partition as being NTFS. It reports it as being RAW and 'urges' me to format it (yeah, right…).
    So, I place the sector-by-sector duplicate back into the Mac, boot up (only the Mac OS is given as an option), and am ready to 'work on' recovering the Win7 BC partition (if possible).
    I am avoiding trying to fix the booting problem, because recovery of the 1.2TB of a working system is much more critical for me.
    The clone HDD reports the same in DU, except now the GPT partition shows up as greyed-out 'disk1s1', right above the "BOOTCAMP" partition in the sidebar. [I understand from researching this that disk1s1 is somehow related to the bootloader for BC?]
    I used the demo version of Data Rescue 3 to scan for recoverable files from the drive, but it doesn't even report the .files. (I am running the deep scan now, but will take about another 9 hours to complete that).
    Has anybody got any suggestions on how to reclaim this partition and its system?
    Here are a couple of other details from diagnostic tools:
    Model Name:    Mac Pro
      Model Identifier:    MacPro2,1
      Processor Name:    Quad-Core Intel Xeon
      Processor Speed:    3 GHz
      Number Of Processors:    2
      Total Number Of Cores:    8
      L2 Cache (per processor):    8 MB
      Memory:    13 GB
      Bus Speed:    1.33 GHz
      Boot ROM Version:    MP21.007F.B06
    newmac:~ gmmx2$ sudo gpt -r show disk1
           start        size  index  contents
               0           1         PMBR
               1           1         Pri GPT header
               2          32         Pri GPT table
              34      262144      1  GPT part - E3C9E316-0B5C-4DB8-817D-F92DF00215AE
          262178        2014        
          264192      409600      2  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
          673792  2929602560      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
      2930276352         783        
      2930277135          32         Sec GPT table
      2930277167           1         Sec GPT header
    newmac:~ gmmx2$ diskutil list
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.5 TB     disk1
       1:         Microsoft Reserved                         134.2 MB   disk1s1
       2:                        EFI                         209.7 MB   disk1s2
       3:       Microsoft Basic Data BOOTCAMP               1.5 TB     disk1s3
    /dev/disk2
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.5 TB     disk2
       1:                        EFI                         209.7 MB   disk2s1
       2:                  Apple_HFS D3                      750.0 GB   disk2s2
       3:       Microsoft Basic Data DATA3                  749.9 GB   disk2s3
    /dev/disk3
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *1.5 TB     disk3
       1:               Windows_NTFS SSDSUB                 1.5 TB     disk3s1
    [Disk 1 is obviously the BC one]
    newmac:~ gmmx2$ sudo fdisk /dev/disk1
    Password:
    Disk: /dev/disk1    geometry: -5415437/4/63 [-1364690128 sectors]
    Signature: 0xAA55
             Starting       Ending
    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    1: EE    0   0   2 - 1023 254  63 [         1 - -1364690129] <Unknown ID>
    2: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
    3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
    4: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
    I cannot be the only one who has much such a catastrophic error, so I am hoping that there is something I have overlooked (being only a part-time Mac user) or there is some utility somewhere which can fix this--
    Or if you need more data, let me know...
    thank you for your time--gmm

    Additional information: I found the DU Repair log for that session, in case it helps:
    2013-01-28 04:31:00 -0700: Disk Utility started.
    2013-01-28 04:31:30 -0700: Verify and Repair volume “BOOTCAMP2013-01-28 04:31:30 -0700: Starting repair tool:
    2013-01-28 04:31:30 -0700: Verifying files...                                                            
    2013-01-28 04:31:57 -0700: Adjusting instance tags to prevent rollover on file 0x606f0.                  
    2013-01-28 04:31:57 -0700: Adjusting instance tags to prevent rollover on file 0x606f2.                  
    2013-01-28 04:31:57 -0700: Adjusting instance tags to prevent rollover on file 0x606f4.                  
    2013-01-28 04:32:01 -0700: Files verification completed.                                                 
    2013-01-28 04:32:01 -0700: Verifying meta files...                                                       
    2013-01-28 04:32:01 -0700: Meta files verification completed.                                            
    2013-01-28 04:32:01 -0700: Veryfing $AttrDef.                                                            
    2013-01-28 04:32:01 -0700: Veryfing $Boot.                                                               
    2013-01-28 04:32:01 -0700: Verifying $UpCase.                                                            
    2013-01-28 04:32:01 -0700: Correcting $UpCase data.                                                      
    2013-01-28 04:32:01 -0700: Verifying $LogFile.                                                           
    2013-01-28 04:32:01 -0700: Verifying $Volume.                                                            
    2013-01-28 04:32:02 -0700: Verifying files with EAs...                                                   
    2013-01-28 04:32:02 -0700: EAs verification completed.                                                   
    2013-01-28 04:32:02 -0700: Verifying folders...                                                          
    2013-01-28 04:41:54 -0700: Folders verification completed.                                               
    2013-01-28 04:41:54 -0700: Minor inconsistencies are detected on the volume.                             
    2013-01-28 04:41:54 -0700: Creating root directory                                                       
    2013-01-28 04:41:54 -0700: Verifying security descriptors...                                             
    2013-01-28 04:41:54 -0700: Clearing invalid security descriptor 0x25e                                    
    2013-01-28 04:41:54 -0700: Clearing invalid security descriptor 0x260                                    
    2013-01-28 04:41:54 -0700: Clearing invalid security descriptor 0x797                                    
    2013-01-28 04:41:54 -0700: Clearing invalid security descriptor 0x1538                                   
    2013-01-28 04:41:54 -0700: Deleting orphan $Secure::$SII entry 0x25e                                     
    2013-01-28 04:41:54 -0700: Deleting orphan $Secure::$SII entry 0x260                                     
    2013-01-28 04:41:54 -0700: Deleting orphan $Secure::$SII entry 0x797                                     
    2013-01-28 04:41:54 -0700: Deleting orphan $Secure::$SII entry 0x1538                                    
    2013-01-28 04:41:54 -0700: Deleting orphan $Secure::$SDH entry Id=0x797                                  
    2013-01-28 04:41:54 -0700: Deleting orphan $Secure::$SDH entry Id=0x25e                                  
    2013-01-28 04:41:55 -0700: Deleting orphan $Secure::$SDH entry Id=0x260                                  
    2013-01-28 04:41:55 -0700: Deleting orphan $Secure::$SDH entry Id=0x1538                                 
    2013-01-28 04:41:55 -0700: Verifying files security...                                                   
    2013-01-28 04:41:55 -0700: Record 0x97c contains invalid security Id (0x260)                             
    2013-01-28 04:41:55 -0700: Record 0x99b contains invalid security Id (0x260)                             
    2013-01-28 04:41:55 -0700: Record 0xb88 contains invalid security Id (0x260)                             
    2013-01-28 04:41:55 -0700: Record 0xb91 contains invalid security Id (0x260)                             
    2013-01-28 04:41:55 -0700: Record 0xb92 contains invalid security Id (0x260)                             
    2013-01-28 04:41:55 -0700: Record 0x5633 contains invalid security Id (0x260)                            
    2013-01-28 04:41:55 -0700: Record 0x5635 contains invalid security Id (0x260)                            
    2013-01-28 04:41:55 -0700: Record 0x5637 contains invalid security Id (0x260)                            
    2013-01-28 04:41:57 -0700: Record 0xe1d4 contains invalid security Id (0x25e)                            
    2013-01-28 04:41:57 -0700: Record 0xe1d5 contains invalid security Id (0x25e)                            
    2013-01-28 04:41:57 -0700: Record 0xe1d6 contains invalid security Id (0x260)                            
    2013-01-28 04:41:58 -0700: Record 0x111c9 contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x111ca contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x111cb contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x111dc contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x11285 contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x11297 contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x113c4 contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x113c5 contains invalid security Id (0x260)                           
    2013-01-28 04:41:58 -0700: Record 0x12528 contains invalid security Id (0x260)                           
    2013-01-28 04:42:00 -0700: Record 0x1cfe2 contains invalid security Id (0x260)                           
    2013-01-28 04:42:00 -0700: Record 0x1dce1 contains invalid security Id (0x260)                           
    2013-01-28 04:42:00 -0700: Record 0x1f6a8 contains invalid security Id (0x260)                           
    2013-01-28 04:42:00 -0700: Record 0x1f6a9 contains invalid security Id (0x260)                           
    2013-01-28 04:42:00 -0700: Record 0x1f6c4 contains invalid security Id (0x260)                           
    2013-01-28 04:42:00 -0700: Record 0x21d57 contains invalid security Id (0x797)                           
    2013-01-28 04:42:03 -0700: Record 0x3220d contains invalid security Id (0x260)                           
    2013-01-28 04:42:06 -0700: Record 0x4bc2a contains invalid security Id (0x260)                           
    2013-01-28 04:42:10 -0700: Record 0x64ff9 contains invalid security Id (0x1538)                          
    2013-01-28 04:42:11 -0700: Can't read $SDS                                                               
    2013-01-28 04:42:12 -0700: Security verification completed                                               
    2013-01-28 04:42:12 -0700: Verifying $MFT.                                                               
    2013-01-28 04:42:12 -0700: Verifying $MFTMirr.                                                           
    2013-01-28 04:42:12 -0700: Verifying $Bitmap.                                                            
    2013-01-28 04:42:18 -0700: Volume repair complete.
    2013-01-28 04:42:18 -0700: Updating boot support partitions for the volume as required.
    2013-01-28 04:42:18 -0700: Repair tool completed: 2013-01-28 04:42:18 -0700:
    2013-01-28 04:42:18 -0700:

  • Can't undo last move

    I am trying to add an undo function to this program. Here is what I have so far. I can't get the undo function to work for some reason. Any help is appreciated.
    // Five.java - main program for Five-In-A-Row Program
    import javax.swing.JFrame;
    ////////////////////////////////////////////////////// class Five
    /** Five.java - Winner is able to put 5 pieces in a row.
       The Five program consists of three files:
       Five.java      - this file with main to create window.
       FiveGUI.java   - implements the GUI interface.
       FiveLogic.java - the logical functioning.
       @author Fred Swartz
       @version 2004-05-02
    class Five {
        //================================================ method main
        public static void main(String[] args) {
            JFrame window = new JFrame("Five In A Row");
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            window.setContentPane(new FiveGUI());
            window.pack();  // finalize layout
            window.setResizable(false);
            window.show();  // make window visible
        }//end main
    }//endclass Five
    //===========================================
    // FiveGUI.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    /////////////////////////////////////////////////// class FiveGUI
    /** A Graphical User Interface for a Five-In-A-Row game.
        This implements the user interface (view and controller),
        but the logic (model) is implemented in a separate class that
        knows nothing about the user interface.
        <p>This subclasses JPanel and puts the some buttons in the north,
        a graphical display of the board in the center, and
        a status field in the south.
        </p>
        <p>Exercise: This game probably originated on a Go board where
           the pieces are placed on the intersections, not in the
           empty spaces.  Change the program to put all pieces on the
           intersections.
        </p>
        <p>Exercise: The Undo button doesn't do anything.  Fix it here
           in the GUI and in the logic.
        </p>
        <p>Exercise: Create a machine player.</p>
        @author Fred Swartz
        @version 2004-05-02 Rodenbach
    class FiveGUI extends JPanel {
        //=============================================== instance variables
        private GraphicsPanel boardDisplay_;
        private JTextField    statusField_ = new JTextField();
        private FiveLogic     gameLogic_ = new FiveLogic(9, 9);
        private boolean       gameOver_ = false;
        private static final Color[]  PLAYER_COLOR = {null, Color.black, Color.white};
        private static final String[] PLAYER_NAME  = {null, "BLACK", "WHITE"};
        //====================================================== constructor
        public FiveGUI() {
            //--- Create some buttons
            JButton newGameButton = new JButton("New Game");
            JButton undoButton = new JButton("Undo");
            //--- Create control panel
            JPanel controlPanel = new JPanel();
            controlPanel.setLayout(new FlowLayout());
            controlPanel.add(newGameButton);
            controlPanel.add(undoButton);
            //--- Create graphics panel
            boardDisplay_ = new GraphicsPanel();
            //--- Set the layout and add the components
            this.setLayout(new BorderLayout());
            this.add(controlPanel , BorderLayout.NORTH);
            this.add(boardDisplay_, BorderLayout.CENTER);
            this.add(statusField_ , BorderLayout.SOUTH);
            //-- Add action listeners
            newGameButton.addActionListener(new NewGameAction());
                undoButton.addActionListener(new UndoAction());
        }//end constructor
        //////////////////////////////////////////////// class GraphicsPanel
        // This is defined inside the outer class so that
        // it can use the game logic variable.
        class GraphicsPanel extends JPanel implements MouseListener {
            private static final int ROWS = 9;
            private static final int COLS = 9;
            private static final int CELL_SIZE = 30; // Pixels
            private static final int WIDTH  = COLS * CELL_SIZE;
            private static final int HEIGHT = ROWS * CELL_SIZE;
            //================================================== constructor
            public GraphicsPanel() {
                this.setPreferredSize(new Dimension(WIDTH, HEIGHT));
                this.setBackground(Color.gray);
                this.addMouseListener(this);  // Listen own mouse events.
            }//end constructor
            //============================================== paintComponent
            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                //-- Paint grid (could be done once and saved).
                for (int r=1; r<ROWS; r++) {  // Horizontal lines
                    g.drawLine(0, r*CELL_SIZE, WIDTH, r*CELL_SIZE);
                for (int c=1; c<COLS; c++) {
                    g.drawLine(c*CELL_SIZE, 0, c*CELL_SIZE, HEIGHT);
                //-- Draw players pieces.
                for (int r=0; r<ROWS; r++) {
                    for (int c=0; c<COLS; c++) {
                        int x = c * CELL_SIZE;
                        int y = r * CELL_SIZE;
                        int who = gameLogic_.getPlayerAt(r, c);
                        if (who != gameLogic_.EMPTY) {
                            g.setColor(PLAYER_COLOR[who]);
                            g.fillOval(x+2, y+2, CELL_SIZE-4, CELL_SIZE-4);
            }//end paintComponent
            //======================================== listener mousePressed
            public void mousePressed(MouseEvent e) {
                //--- map x,y coordinates into a row and col.
                int col = e.getX()/CELL_SIZE;
                int row = e.getY()/CELL_SIZE;
                int currentOccupant = gameLogic_.getPlayerAt(row, col);
                if (!gameOver_ && currentOccupant == gameLogic_.EMPTY) {
                    gameLogic_.move(row, col);
                    switch (gameLogic_.getGameStatus()) {
                        case 1: // Player one wins.  Game over.
                                gameOver_ = true;
                                statusField_.setText("BLACK WINS");
                                break;
                        case 2: // Player two wins.  Game over.
                                gameOver_ = true;
                                statusField_.setText("WHITE WINS");
                                break;
                        case FiveLogic.TIE:  // Tie game.  Game over.
                                gameOver_ = true;
                                statusField_.setText("TIE GAME");
                                break;
                        default: showNextPlayer();
                } else {  // Not legal
                    Toolkit.getDefaultToolkit().beep();
                this.repaint();  // Show any updates to game.
            }//end mousePressed
            //========================================== ignore these events
            public void mouseClicked (MouseEvent e) {}
            public void mouseReleased(MouseEvent e) {}
            public void mouseEntered (MouseEvent e) {}
            public void mouseExited  (MouseEvent e) {}
        }//end inner class GraphicsPanel
        //======================================= untility method showNextPlayer
        private void showNextPlayer() {
           statusField_.setText(PLAYER_NAME[gameLogic_.getNextPlayer()] + " to play");
        }//end showNextPlayer
        ///////////////////////////////////////// inner class NewGameAction
        private class NewGameAction implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                gameLogic_.reset();
                gameOver_ = false;
                showNextPlayer();
                boardDisplay_.repaint();
        }//end inner class NewGameAction
         ///////////////////////////////////////// inner class NewGameAction
        private class UndoAction implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                gameLogic_.undo();
                gameOver_ = false;
                showNextPlayer();
                boardDisplay_.repaint();
        }//end inner class NewGameAction
    }//end class FiveGUI
    //================================================
    // FiveLogic.java - Game to get 5 pieces in a row.
    ///////////////////////////////////////////////// class FiveLogic
    /** This class implements the logic (model) for the game of
        Five-In-A-Row.
        <br/>Exercise: The undo function doesn't do anything.  Fix it.
        @author Fred Swartz
        @version 2004-05-02
    class FiveLogic {
        /** Number of board rows. */
        private int maxRows_;
        /** Number of board columns. */
        private int maxCols_;
        /** The board. */
        private int[][] board_;
          /**The undo array. */
          private int[][] undoArray_;
        /** The player who moves next. */
        private int     nextPlayer_;
        /** Number of moves in the game. */
        private int     moves_ = 0;
        //-- Constants
        public  static final int EMPTY   = 0;  // The cell is empty.
        private static final int PLAYER1 = 1;
        public  static final int TIE     = -1; // Game is a tie (draw).
        //================================================== constructor
        public FiveLogic(int rows, int cols) {
            maxRows_ = rows;
            maxCols_ = cols;
            board_ = new int[maxRows_][maxCols_];
                undoArray_ = new int[maxRows_][maxCols_];
            reset();
        }//end constructor
        //================================================= getNextPlayer
        /** Returns the next player. */
        public int getNextPlayer() {
            return nextPlayer_;
        }//end getFace
        //=================================================== getPlayerAt
        /** Returns player who has played at particular row and column. */
        public int getPlayerAt(int r, int c) {
            return board_[r][c];
        }//end getPlayerAt
        //========================================================== reset
        /** Clears board to initial state. Makes first move in center. */
        public void reset() {
            for (int r=0; r<maxRows_; r++) {
                for (int c=0; c<maxCols_; c++) {
                    board_[r][c] = EMPTY;
            moves_ = 0;  // No moves so far.
            nextPlayer_ = PLAYER1; 
            //-- Make first move in center.
            move(maxCols_/2, maxRows_/2);  // First player moves to center
        }//end reset
        //=========================================================== move
        /** Play a marker on the board, record it, flip players. */
        public void move(int r, int c) {
            //assert board_[r][c] == EMPTY;
                undoArray_[r][c] = board_[r][c];
            board_[r][c] = nextPlayer_;  // Record this move.
            nextPlayer_ = 3-nextPlayer_; // Flip players
            moves_++;                    // Increment number of moves.
        }//end move
        //=========================================================== undo
        /** Undo the last move made.  Don't go beyond beginning. */
        public void undo() {
                    board_ = undoArray_;
                   moves_--;      
        }//end undo
        //========================================== utility method count5_
        /** The count5_ utility function returns true if there are five in
            a row starting at the specified r,c position and
            continuing in the dr direcection (+1, -1) and
            similarly for the column c.
        private boolean count5_(int r, int dr, int c, int dc) {
            int player = board_[r][c];  // remember the player.
            for (int i=1; i<5; i++) {
                if (board_[r+dr*i][c+dc*i] != player) return false;
            return true;  // There were 5 in a row!
        } // count5_
        //=================================================== getGameStatus
        /** -1 = game is tie, 0 = more to play,
             1 = player1 wins, 2 = player2 wins */
        public int getGameStatus() {
            int row;
            int col;
            int n_up, n_right, n_up_right, n_up_left;
            boolean at_least_one_move;   // true if game isn't a tie
            for (row = 0; row < maxRows_; row++) {
                for (col = 0; col < maxCols_; col++) {
                    int p = board_[row][col];
                    if (p != EMPTY) {
                        // look at 4 kinds of rows of 5
                        //  1. a column going up
                        //  2. a row going to the right
                        //  3. a diagonal up and to the right
                        //  4. a diagonal up and to the left
                        if (row < maxRows_-4) // Look up
                            if (count5_(row, 1, col, 0)) return p;
                        if (col < maxCols_-4) { // row to right
                            if (count5_(row, 0, col, 1))  return p;
                            if (row < maxRows_-4) { // diagonal up to right
                                if (count5_(row, 1, col, 1)) return p;
                        if (col > 3 && row < maxRows_-4) { // diagonal up left
                            if (count5_(row, 1, col, -1)) return p;
                    }//endif position wasn't empty
                }//endfor row
            }//endfor col
            // Neither player has won, it's tie if there are empty positions.
            // Game is finished if total moves equals number of positions.
            if (moves_ == maxRows_*maxCols_) {
                return TIE; // Game tied.  No more possible moves.
            } else {
                return 0;  // More to play.
        }//end getGameStatus
    }//end class FiveLogic

    Oh, oh, oh. I know why it clears the whole board. You are only saving the previous state of each square as a player moves to it. A player can only move to a square if it's empty. So you are only storing empty squares.
    Change the move method to do this:
    public void move(int r, int c) {
        //assert board_[r][c] == EMPTY;
        undoArray_ = (int[][]) board_.clone();
        board_[r][c] = nextPlayer_; // Record this move.
        nextPlayer_ = 3-nextPlayer_; // Flip players
        moves_++;  // Increment number of moves.
    }

  • How to restore, reinstall to WIN 7 vers. USB 3.0 Host Controller after driver upgrade to Win 8

    After an undate for the Intell USB 3.0 Host Controller (extensible) as a WIN 8 driver update my DynaDock does not work properly for any devices using the USB ports on the dock and connected to any USB port on the HP Envy 4-1043 laptop. Reading everywhere I can find anything it seems that there is a problem with the Microsoft or Intel driver for the USB 3.0 Host such that the USBs work find when things are plugged directly into them. BUT, when the dynadock is pluuged in and any of its 6 USB ports are used the devices either cannot be found or behavior extremely sluggishly.
    This Dynadock has worked well with my last 4 HP computers and worked fine under WIn 7 and 8 on this Envy until the last update of the driver.
    I do not know how to re-install the old driver (Hps' WIN7 version sp56724. Can someone please give me the steps or refer me to a source to do this properly?
    There is no roll back option in the device manager for this driver. It is grayed out.
    I have take pride in not experimenting with 'brihg tiddeas' of how to fix things on this machine. Not that 99% of my gut plus resources from help pages and Miscrosoft did not work before. I do not have a backup computer anymore and I cannot afford the lost of time and productive in making a mess and then spending days trying to undo and fix something that I know others have done well.

    Windows 8 has native USB 3.0 drivers which explains why you are not seeing an option to roll back. I do not believe you can make the Windows 7 driver work. Have you tried uninstalling in the device manager all usb items and then rebooting to let the drivers reload? Do that with the computer off the dock and then plug it into the dock. As a general rule you should not do driver updates to a laptop through a docking station. 

  • How to Get Proper Video Screen Captures (Screencasts) of Lightroom or Photoshop in Win?

    Hello. I would like to get proper screen captures of Lightroom on Win 7/64, showing all screen elements as you see them. I tried FastStone Capture 8 and SnagIt 11.1, but they have various differing issues. Do you have a good hint?
    In my screen capture, i want a mouse-click-sound each and every time the mouse is clicked. This is not "system audio", because the computer doesn't play a sound for every ordinary click. The capture software must add that sound. (I'm aware i can add the sound manually in post production, but want it recorded together with video.)
    Experience with Faststone Capture 8's video captures:
    I get well usable footage
    Does optionally record mouse-click-sound for each click, with adjustable volume
    Does not properly record some elements of Photoshop or Lightroom screens:
    - cursors sometimes look rough or double-sized
    - Lightrooms "TAT (Target Correction Tool)" disappears while being dragged on the image
    - the color selector box of Lightroom's Adjustment Brush is not shown, while the cursor working within that color selector box is shown
    - Lightroom's three-second-splash-message after Undo etc. is not shown
    (All these missing elements do show up in *still* captures with Faststone Capture. They also *do* show up in video captures done with SnagIt.)
    Experience with Snagit 11.1's video captures:
    Does properly capture all those elements that FastStone does *not* capture (listed above)
    Does *not* optionally include a mouse-click-sound for each and every mouse click (they record "system audio", but a sound on every click is not "system audio")
    Videos are less smooth, cursor sometimes "jumping"
    Now do you know a screen capture software for Win 7 that can
    properly record *anything* that's seen within Lightroom and Photoshop
    and automatically add a mouse-click-sound for each and every click i do
    and produce smooth footage without "jumping cursors"?
    Thanks for your real-life experiences!

    Hi, thanks for your suggestions. Now i also tried:
    Camstudio:
    - mouse click sounds very weird (my mistake?), does NOT record LR overlays like adjustment brush's colour selector
    Screen-cast-o-matic, optionally online, free:
    - DOES record overlays like adjustment brush's colour selector. Mouse-click-sound not in free version. "System audio" is promised in paid version, but that does not necessarily mean a sound for each mouse-click. Contacted support for more
    Straightforward using, lots of short video tutorials (useful for absolute beginners).
    Free downloaded program 1.4 only works on primary monitor, the online launched app also records on secondary monitor
    Don't see option to record a "window", only set resolutions
    More "jumpy" than Faststone
    More interesting pro-version seems to be rent-only-licenced, at 15 USD per year, not a one-time-buy
    Camtasia:
    DOES record overlays like adjustment brush's colour selector
    .camrec format isn't offered for recording, only .trec and .avi (on Win 7)
    Exported MP4 looks blurry and has colour blotches, that are not visible in the initial recording, only after exporting; this doesn't change at all after setting very high quality MP4 options; i guess i didn't look properly

  • How do I undo a dual boot?

    I have a machine running win 8.1. I used Keith Mayer's instructions to setup dual boot with server 2012 R2 core with Gui. I would like to undo this and return to single boot. I have tried to run Diskpart and find the Vdisk and detach it. The system
    says there is no Vdisk to detach. I can select it. but not undo it. Suggestions? How do I undo the BCDboot? or how can I replace the OS image that is being referenced?

    Hi Floyd Kershner,
    You also can refer the following related KB:
    How to delete Windows 8 in dual systems
    https://support.microsoft.com/en-us/kb/2844463/en-us?wa=wsignin1.0
    I’m glad to be of help to you!
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for

  • IPhone 4s, still on iOS 6, is slow, can't connect to the internet, and overheats a lot,

    I've have my iPhone 4s for about a year now, and up until when the iOS 7 update was released, I never had any problems with it.  I still haven't updated my phone, though. I prefer the interface that comes with iOS 6, and in my opinion it's easier to

  • Invoice Document not released to Accounting -Period was closed

    Hi, SD Invoices are not released to Accounting.Those documents are from previous period and also also those periods were already closed. Now what should i do? if i want to release the invoice documents which are created in previous periods.Kindly adv

  • Reader X - MyBrokerProcess is not accessible from particular path even after using WhiteList concept

    Hi , MyPlugin is working fine in Reader 9 and Reader X when Protected Mode is disabled.I want MyPlugin to work successfully when the Protected Mode is Enabled in Reader X. As per the suggestions in this link :http://blogs.adobe.com/pdfdevjunkie/what-

  • Safari ram

    hi to everyone. Is it possible, that safari drains my 4gb memory within not even half hour of use..? i sometimes leave my iMac on at night...and hear it all night...hard disk working?for what? like is backing up a terabyte of stuff! I just leave skyp

  • Recursive select in user_constraints

    I have 5 tables (or more) in master detail relation (five levels). Is possible to write recursive select cross user_constraints table to get all this levels from select? my wrong try: select table_name,R_CONSTRAINT_NAME,CONSTRAINT_NAME from user_cons