How to organize these code(about event drive)

The subject: In my Swing class, I create a TextArea object for displaying the content received from a socket. When my socket received some data, I want to show it in the TextArea immediately. But how do I organize the code to realize this function? I need the standard java solution. Who can give me some advice?
//bow
Sirius

You can merge Events by simply dragging one to another
You can move photos from one Event to another by flagging them, then selecting the target Event and going Events menu -> Add Photos to selected Events
You can create Events by flagging the photos and simply going Events -> Create Event Flagged Photos.
If you want to maintain your existing groupings them import each group, one at a time.
iPhoto Menu -> Preferences -> general: What have you chosen for 'Autosplit Events'
Other possibilities for using iphoto:
I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums extensively. I title the pics broadly.
I keyword on a
Who
What
Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
Using this system I can find pretty much find any pic in my 50k library in a couple of seconds.
So, for example, I have a batch of pics titled 'Seattle 08' and a  typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
File -> New Smart Album
set it to 'All"
title contains Seattle
keyword is mountain
keyword is snow
rating is 5 stars
Or, want a chronological album of John from birth to today?
New Smart Album
Keyword is John
Set the View options to Sort By Date Ascending
Want only the best pics?
add Rating is greater than 4 stars
The best thing about this system is that it's dynamic. If I add 50 more pics of John  to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me.

Similar Messages

  • How to reduce these code using oop in AS3

    i have 8 movie clip and i use it as a navigation buttons and when clicked it should go to different links. i use these codes but i think these codes are not pure oop so can any one help me to reduce programming using oop but works in same way as it is doing right now.
    the codes are follows
    function buttonmode(link:MovieClip):void{
    link.buttonMode = true;
    buttonmode(rec1_mc);
    buttonmode(rec2_mc);
    buttonmode(rec3_mc);
    buttonmode(rec4_mc);
    buttonmode(rec5_mc);
    buttonmode(rec6_mc);
    buttonmode(rec7_mc);
    buttonmode(rec8_mc);
    function navigate1(e:MouseEvent):void{
    navigateToURL(new URLRequest("http://www.ebpearls.com" ),"_self");
    function navigate2(e:MouseEvent):void{
    trace("Button 2 is Clicked");
    function navigate3(e:MouseEvent):void{
    trace("Button 3 is Clicked");
    function navigate4(e:MouseEvent):void{
    trace("Button 4 is Clicked");
    function navigate5(e:MouseEvent):void{
    trace("Button 5 is Clicked");
    function navigate6(e:MouseEvent):void{
    trace("Button 6 is Clicked");
    function navigate7(e:MouseEvent):void{
    trace("Button 7 is Clicked");
    function navigate8(e:MouseEvent):void{
    trace("Button 8 is Clicked");
    rec1_mc.addEventListener(MouseEvent.CLICK,navigate1);
    rec2_mc.addEventListener(MouseEvent.CLICK,navigate2);
    rec3_mc.addEventListener(MouseEvent.CLICK,navigate3);
    rec4_mc.addEventListener(MouseEvent.CLICK,navigate4);
    rec5_mc.addEventListener(MouseEvent.CLICK,navigate5);
    rec6_mc.addEventListener(MouseEvent.CLICK,navigate6);
    rec7_mc.addEventListener(MouseEvent.CLICK,navigate7);
    rec8_mc.addEventListener(MouseEvent.CLICK,navigate8);

    I think the more OO way is like this:
    1. Create AbstractButton class and save it in a file called AbstractButton.as in the same folder the FLA file resides:
    package
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        public class AbstractButton extends MovieClip
            public function AbstractButton()
                super();
                this.stop();
                this.buttonMode = true;
                this.addEventListener(MouseEvent.ROLL_OVER, onRollOver);
                this.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
                this.addEventListener(MouseEvent.CLICK, onClick);
            protected function onRollOver(e:MouseEvent):void
                // rollOver behaviour, e.g. this.gotoAndStop(2);
            protected function onRollOut(e:MouseEvent):void
                 // rollOut behaviour, e.g.  this.gotoAndStop(1);
            protected function onClick(e:MouseEvent = null):void
                var data:Object = new Object();
                data.id = this.name;
                var evt:NavEvent = new NavEvent(data, NavEvent.NAV_EVENT, true, true);
                dispatchEvent(evt);           
    2. Link button symbol in your library to the AbstractButton class: right click on it (in library), click Properties, in Linkage section mark Export for ActionScript box and put AbstractButton as Class, Base class field leave empty. If you use more than one button symbols form your library, do the same thing with them.
    3. Create NavEvent class, save it in NavEvent.as file in the same  folder:
    package
         import flash.events.Event;
        public class NavEvent extends Event
             public static const NAV_EVENT:String = "NavEvent";
             public var data:Object;
             public function NavEvent(data:Object, type:String,  bubbles:Boolean, cancelable:Boolean)
                 this.data = data;
                 super(NAV_EVENT, true, true);
    4. Drag your buttons on the stage, give them instance names as you did.
    5. On your main timeline (or in document class if you're using it) use the following code to controll button clicks. Here e.data.id carries the instance name of clicked button.
    this.root.addEventListener(NavEvent.NAV_EVENT, handleNavEvent);
    function handleNavEvent(e:NavEvent):void
        switch (e.data.id)
            case "rec1_mc":          
                navigateToURL(new URLRequest("http://www.ebpearls.com" ),"_self");
                break;
            case "rec2_mc":
                trace("2 clicked");
                break;
            case "rec3_mc":
                trace("3 clicked");
                break;
              // and so on       

  • How to apply some code to event?

    Hello Experts,
    My BI consultant has cretaed one event. I need to apply my logic(abap code), when this event ger trigger.
    So where can I write my code in event? Please provide some document if anyone have...
    Thanks,
    Regards,
    Sagar

    Hi Sagar,
    There might be some other steps. Generally, what I do in BI is follows.
    1. Create the event.
    2. Have my logic in an ABAP program and assign it a program name.
    3. Using SM36, I will define a new background job. Give your job name and job class accordingly.
    4. Click on start condition and give your event name in the space provided for 'After Event'.
    5. Now click on 'Step'. In the 'ABAP Program' section give your program name. Give variant name if any.
    Finally, you will see this method is more flexible than any.
    Assign points if useful as this is the only way to say thanks.
    Regards,
    Srinivas

  • How to expose and code the event handlers of a base class?

    I have created a class that inherits NumericUpDown. When I instantiate an object from that class, I can make it visible and have it appear on my form just like any other NUD. How can I get that instantiated object to expose the event handlers of its base
    class, the NUD in this case, so that, for example, I can tell the client what action to take when the value of the instantiated object changes?
    Thanks for your help.

    I am not sure exactly what you mean.  Are you adding your NUD controls to the Form at design time from the toolbox or adding them in code at run time?  If you are adding them to the form from the toolbox then you access the events the same way
    you would a standart NUD control.   If it is at runtime and you have a fixed amount of them you are going to add then you can declare them Class Scoped using the
    WithEvents keyword which will let you access all their events.
    Public Class Form1
    Private WithEvents Nud1 As New NUD
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Controls.Add(Nud1)
    End Sub
    Private Sub Nud1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Nud1.ValueChanged
    Me.Text = Nud1.Value.ToString
    End Sub
    End Class
    Public Class NUD
    Inherits NumericUpDown
    'Your custom code to make it work how you want...
    End Class
     If this is not what you are doing then you may need to explain a bit more and show the code you are using so we understand better.
    If you say it can`t be done then i`ll try it

  • How do I find out about the driver letter of a usb drive by script, given the DeviceID

    Hi all,
    I am wondering if it is possible by script to find out what the drive letter of a usb drive might be.
    I have just inserted my USB stick into a socked and the operating system displays that the drive was recognized and that the drive letter is F:.
    I already know, how USB devices can be listed by WMI script, but how do I extract the drive letter of a USB storage device.
    The DeviceID is known, where do I find the drive letter given the DeviceID ?
    Disk drive
    DeviceID:
    USBSTOR\DISK&VEN_SAMSUNG&PROD_YP-U2&REV_0100\4002FDCCE0E4D094&0
    Service: disk
    Status: OK
    SystemName: MEINER
    Caption: Samsung YP-U2 USB Device
    All help is welcome

    @echo off  
    :: GetLetterOFmyUSBstick.cmd  
    :: Bye Gastone Canali  
    ::DeviceID: USBSTOR\DISK&VEN_SAMSUNG&PROD_YP-U2&REV_0100\4002FDCCE0E4D094&0  
    setlocal EnableDelayedExpansion  
    set PNPDeviceID=4002FDCCE0E4D094 
    set Q='wmic  diskdrive where "interfacetype="USB" and PNPDeviceID like "%%%PNPDeviceID%%%""    assoc /assocclass:Win32_DiskDriveToDiskPartition' 
    echo %Q%  
    for /f "tokens=2,3,4,5 delims=,= " %%a in (%Q%) do (  
      set hd=%%a %%b, %%c %%d  
      call :_LIST_LETTER !hd!)  
    goto :_END  
    :_LIST_LETTER  
    (echo %1 |find  "Disk ") >nul|| goto :_EOF   
    for /f "tokens=3 delims==" %%a in ('WMIC Path Win32_LogicalDiskToPartition  ^|find %1') do set TMP_letter=%%a  
    set Part_letter=%TMP_letter:~1,2%   
    echo %Part_letter% %1  
    goto :_EOF  
    :_END  
    :_EOF  
    ' ' GetLetterOFmyUSBstick.vbs
    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")  
    strPnPdevID = "USBSTOR\DISK&VEN_SAMSUNG&PROD_YP-U2&REV_0100\4002FDCCE0E4D094&0" 
    strPnPdevID = Replace(strPnPdevID, "\", "\\")  
    Set colDiskDrives = objWMIService.ExecQuery ("SELECT * FROM Win32_DiskDrive where PNPDeviceID like '"& strPnPdevID &"' ")  
    For Each objDrive In colDiskDrives  
        Wscript.Echo "Physical Disk: " & objDrive.Caption & " -- " & objDrive.DeviceID   
        strDeviceID = Replace(objDrive.DeviceID, "\", "\\")  
        Set colPartitions = objWMIService.ExecQuery _  
            ("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & _  
                strDeviceID & """} WHERE AssocClass = " & _  
                    "Win32_DiskDriveToDiskPartition")  
        For Each objPartition In colPartitions  
            Wscript.Echo "Disk Partition: " & objPartition.DeviceID  
            Set colLogicalDisks = objWMIService.ExecQuery _  
                ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _  
                    objPartition.DeviceID & """} WHERE AssocClass = " & _  
                        "Win32_LogicalDiskToPartition")  
            For Each objLogicalDisk In colLogicalDisks  
                Wscript.Echo "Logical Disk: " & objLogicalDisk.DeviceID  
            Next 
            Wscript.Echo  
        Next 
        Wscript.Echo  
    Next 

  • Inner join with if statement , how to combine these code ?

    Hello everyone, I have 2 group of code here. This 2 group of code is working without error. But I face a problem , I need to group up this 2 group of code. Please take a look, thank you This is the first code i create.
    SELECT r.Name , r.Restaurant_ID, f.feature, r.Price_Range, r.Cuisine_ID, c.Cuisine,
        s.State_ID, s.State, l.Location_ID, l.Area, l.State_ID, r.Name, r.Location_ID
    FROM Restaurants r, Bridge1_Restaurant_Features b, Features f, Cuisine c, State s, Location l
            where 0=0
            AND b.Feature_ID = f.Feature_ID
            AND b.Restaurant_ID = r.Restaurant_ID
            AND r.Cuisine_ID = c.Cuisine_ID
            AND r.Location_ID = l.Location_ID
            AND l.State_ID = s.State_ID
            <cfif ARGUMENTS.Feature_ID IS NOT "">
            AND b.Feature_ID IN (#ARGUMENTS.Feature_ID#)
            </cfif>
            <cfif ARGUMENTS.Price_Range IS NOT "">
            AND r.Price_Range IN (#ARGUMENTS.Price_Range#)
            </cfif>
            <cfif ARGUMENTS.Cuisine IS NOT "">
            AND r.Cuisine_ID = (#ARGUMENTS.Cuisine#)
            </cfif>
            <cfif val(ARGUMENTS.LocationID2) IS #val(ARGUMENTS.StateID)#>
            AND l.State_ID = #val(ARGUMENTS.LocationID2)#
            <cfelse>
                AND l.Location_ID = #val(ARGUMENTS.LocationID2)#
            </cfif>
    Then, I notice the feature_ID i need to use another logic to show the result. The code is like this
    SELECT r.Restaurant_ID, r.Name, f.Feature
    FROM   Restaurants r
    INNER JOIN Bridge1_Restaurant_Features b ON b.Restaurant_ID = r.Restaurant_ID
    INNER JOIN Features f ON b.Feature_ID = f.Feature_ID
    INNER JOIN
         SELECT Restaurant_ID, COUNT(Feature_ID) AS FeatureCount
         FROM   Bridge1_Restaurant_Features
         <!--- find matching features --->
         WHERE  Feature_ID IN ( <cfqueryparam value="#ARGUMENTS.Feature_ID#" cfsqltype="cf_sql_integer" list="true"> )
        GROUP BY Restaurant_ID
        <!--- having ALL of the requested features --->
         HAVING COUNT(Feature_ID) = <cfqueryparam value="#listLen(ARGUMENTS.Feature_ID)#" cfsqltype="cf_sql_integer">
    ) ck ON ck.Restaurant_ID = r.Restaurant_Id
    I want combine this 2 group together. The second group have to replace
    <cfif ARGUMENTS.Feature_ID IS NOT "">
        AND f.Feature_ID IN (#ARGUMENTS.Feature_ID#)
    </cfif>
    I try few way to group this 2 code, but fail to make it. The code i try is on below, it get error.
    SELECT r.Name , r.Restaurant_ID, f.feature, r.Price_Range, r.Cuisine_ID, c.Cuisine,
            s.State_ID, s.State, l.Location_ID, l.Area, l.State_ID,  r.Location_ID
            FROM Restaurants r, Features f, Cuisine c, State s, Location l
            INNER JOIN Bridge1_Restaurant_Features b ON b.Restaurant_ID = r.Restaurant_ID
            INNER JOIN Features f ON b.Feature_ID = f.Feature_ID
            AND r.Cuisine_ID = c.Cuisine_ID
            AND r.Location_ID = l.Location_ID
            AND l.State_ID = s.State_ID
            <cfif ARGUMENTS.Feature_ID IS NOT "">
            INNER JOIN
                 SELECT Restaurant_ID, COUNT(Feature_ID) AS FeatureCount
                 FROM   Bridge1_Restaurant_Features
                 <!--- find matching features --->
                 WHERE  Feature_ID IN ( <cfqueryparam value="#ARGUMENTS.Feature_ID#" cfsqltype="cf_sql_integer" list="true"> )
                GROUP BY Restaurant_ID
                <!--- having ALL of the requested features --->
                 HAVING COUNT(Feature_ID) = <cfqueryparam value="#listLen(ARGUMENTS.Feature_ID)#" cfsqltype="cf_sql_integer">
            ) ck ON ck.Restaurant_ID = r.Restaurant_Id
            </cfif>
            <cfif ARGUMENTS.Price_Range IS NOT "">
            AND r.Price_Range IN (#ARGUMENTS.Price_Range#)
            </cfif>
            <cfif ARGUMENTS.Cuisine IS NOT "">
            AND r.Cuisine_ID = (#ARGUMENTS.Cuisine#)
            </cfif>
            <cfif val(ARGUMENTS.LocationID2) IS #val(ARGUMENTS.StateID)#>
            AND l.State_ID = #val(ARGUMENTS.LocationID2)#
            <cfelse>
                AND l.Location_ID = #val(ARGUMENTS.LocationID2)#
            </cfif>

    Yeah Adam I am listen to you ! But Finally i solve it.
    This is the code i solve .
    SELECT r.Restaurant_ID, r.Name, f.Feature, r.Price_Range, r.Cuisine_ID, c.Cuisine,
                        l.Location_ID, l.Area, s.State
              FROM   Restaurants r
              <cfif ARGUMENTS.Feature_ID IS NOT "">
              INNER JOIN
                   SELECT Restaurant_ID, COUNT(Feature_ID) AS FeatureCount
                   FROM   Bridge1_Restaurant_Features
                   <!--- find matching features --->
                   WHERE  Feature_ID IN ( <cfqueryparam value="#ARGUMENTS.Feature_ID#" cfsqltype="cf_sql_integer" list="true"> )
                  GROUP BY Restaurant_ID
                  <!--- having ALL of the requested features --->
                   HAVING COUNT(Feature_ID) = <cfqueryparam value="#listLen(ARGUMENTS.Feature_ID)#" cfsqltype="cf_sql_integer">
              ) ck ON ck.Restaurant_ID = r.Restaurant_Id
              </cfif>
              INNER JOIN Location l ON r.Location_ID = l.Location_ID
              INNER JOIN State s ON l.State_ID = s.State_ID
              INNER JOIN Cuisine c ON r.Cuisine_ID = c.Cuisine_ID
              INNER JOIN Bridge1_Restaurant_Features b ON b.Restaurant_ID = r.Restaurant_ID
              INNER JOIN Features f ON b.Feature_ID = f.Feature_ID
              <cfif ARGUMENTS.Cuisine IS NOT "">
              AND r.Cuisine_ID = (#ARGUMENTS.Cuisine#)
              </cfif>
              <cfif ARGUMENTS.Price_Range IS NOT "">
              AND r.Price_Range IN (#ARGUMENTS.Price_Range#)
              </cfif>
              <cfif val(ARGUMENTS.LocationID2) IS #val(ARGUMENTS.StateID)#>
              AND l.State_ID = #val(ARGUMENTS.LocationID2)#
              <cfelse>
                   AND l.Location_ID = #val(ARGUMENTS.LocationID2)#
              </cfif>
    Is it the code can be improve more ?

  • How to organize events that repeat every year with iphoto

    Dear Communitie,
    y
    How can i organize events that repeat every year with iphoto. For example, if i make picrues every year or 1 time a month, of my doughter, for example:
    Playing with our dog in the garden january 2012
    Playing with our dog in the garden march 2012
    Playing with our dog in the garden October 2012
    Playing with our dog in the garden december 2012
    Playing with our dog in the garden march 2013
    I don't know, what is the intelligent type of eventname.
    If i made "Playing with our dog in the garden", than i cant see the difference of growing (3 Month old chilren is completle different of a 5 Month old children)
    If i made "Playing with our dog in the garden Month Year" then the events are hundrets in 5 Year.
    I think, i don't understand, how to organize the contents with events. Is thera a whitepaer, a guide or somethink like that to take the DB organized how Apple iPhoto is meaning?
    Thanks a lot!
    Daniel

    The Trick is to create an Album
    Playing with Dog in Garden
    Drag the images you want from the Events to the Album. Sort the Album on Date. Now you have a chronological view of your daughter playing in the garden with the Dog.
    Albums are similar to playlists in iTunes. The contain pointers to files in the Library, so they use no disk space. An shot therefore can be in as many albums as you want.
    Some of the organisational possibilities of iPhoto"
    I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums extensively. I title the pics broadly.
    I keyword on a
    Who
    What
    Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
    Using this system I can find pretty much find any pic in my 50k library in a couple of seconds.
    So, for example, I have a batch of pics titled 'Seattle 08' and a  typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
    File -> New Smart Album
    set it to 'All"
    title contains Seattle
    keyword is mountain
    keyword is snow
    rating is 5 stars
    Or, want a chronological album of John from birth to today?
    New Smart Album
    Keyword is John
    Set the View options to Sort By Date Ascending
    Want only the best pics?
    add Rating is greater than 4 stars
    The best thing about this system is that it's dynamic. If I add 50 more pics of John  to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
    In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me.

  • Need help to explain these codes!!! Urgently!!!

    Hi anyone who's here to help...I am doing my Final year project report now...i dunno how to explain these codes in word...can anyone tell me what it means? what are these codes for...? what does each paragraph indicate?
    thanks.
    sorry, maybe i only insert pieces of the codes and its vague...ok, in this source code...what i dun understand is....i have cut and paste the sections of codes which i dun understand as below..
    bcoz this codes are passed down from my seniors who had graduated...and my task is to explain these codes in the form of a report without me having any background on programming...i tried asking some frens...its either they dunno or forgotten...this is my last hope...thanks again...thanks..
    * new added code */
         Thread scroller;     //for looping purpose
         int loopcounter,count;
         // thread is to allow the program to be called every and then.
         public void init()
              /*new added code */
              loopcounter=0;[list]
    **like whats does "thread scroller" means? Looping purpose? what's looping then?
    **also, i've tried on changing the "Loopcounter = 0" to other numbers like 2 and 5...and when i run it on the appletviewer..my image simply runs out of my page...
    [list]
    *And this part...what does it mean?
    /*new added code*/                                      
                public void start() {                    
                if (scroller == null) {               
                scroller = new Thread(this);         
                scroller.start();                          
        } [list]
    for this section here, i really dunno what it says.. "public void start"--start what? scroller again? new Thread(this)?
    [list]
        public void stop() {    
            if (scroller != null) { 
                scroller.stop();   
                scroller = null; 
        } [list]
    I dunno about this section also.. stops wat??
    [list]
        public void run() {                                                           
              try {Thread.currentThread().sleep(100);}                
                catch (InterruptedException e){}
            for (count=0; count <= 400; ) {  
              try {Thread.currentThread().sleep(20);} 
                catch (InterruptedException e){}  
              rm.load();       
        } [list]
    wat is it runing here? try? catch? for? wat does it mean?????
    [list]
        public void destroy(){;}                  
        public void update(Graphics g){paint(g);}
    }[list]
    now this.. wat is it destroying?? updateing wat???
    [list]
    this is my whole program like...
    import java.awt.*;     /*Contains all of the classes for creating user
                   interfaces and for painting graphics and images.*/
    import java.applet.*;     /*Provides the classes necessary to create an applet and the
                   classes an applet uses to communicate with its applet context.*/
    /* Loadable is required for RealMedia so that it know that this code
    can load images and sounds and has the startUp() method
    /* HotSpotListener is required to let HotSpot call hotSpotEvent(HotSpot) when it
    has been clicked
    //runnable is for looping purpose ....to animate the text or images.
    public class LibraryTest extends Applet implements Loadable, HotSpotListener, Runnable
         // RealMedia will load and save images and sounds.
         // It will also give information on the loading process.     
         RealMedia rm;
         // Four buttons that can be clicked on.
         HotSpot hs1,hs2,hs3,hs4;
         // 1 will show image 0 and 1 will show image 1.
         int x =0;
    /* new added code */
         Thread scroller;     //for looping purpose
         int loopcounter,count;
         // thread is to allow the program to be called every and then.
         public void init()
              /*new added code */
              loopcounter=0;
              // We'll place the buttons ourselves.
              setLayout(null);
              setBackground(Color.white);
              // create the RealMedia object
              rm = new RealMedia(this);
              //Start adding all image files you will use
              // image0 called pic_black
              rm.add("pic_black.jpg","image0");
              rm.add("EG3165 Tutorial 1.jpg","image0_1");
              rm.add("Question.jpg","image0_2");
              rm.add("Solution.jpg","image0_3");
              rm.add("Exercise.jpg","image0_4");
              //rm.add("cute.gif","image0_5");
              rm.add("mac-win.gif","image0_6");
              rm.add("walking-floppy.gif","image0_7");
              rm.add("eg3165_t001ver03_00.gif","image1");
              rm.add("eg3165_t001ver03_01.gif","image2");
              rm.add("eg3165_t001ver03_02.gif","image3");
              rm.add("eg3165_t001ver03_03.gif","image4");
              rm.add("eg3165_t001ver03_04.gif","image5");
              rm.add("eg3165_t001ver03_05.gif","image6");
              rm.add("eg3165_t001ver03_06.gif","image7");
              rm.add("eg3165_t001ver03_07.gif","image8");
              rm.add("eg3165_t001ver03_08.gif","image9");
              // Start button with 4 images
              // 1 Default state, mouseOver and mouseClick state.
              rm.add("1st.gif");
              rm.add("1st.gif");
              rm.add("1st.gif");
              // 2 Other button
              rm.add("prev.gif");
              rm.add("prev.gif");
              rm.add("prev.gif");
              // 3
              rm.add("next.gif");
              rm.add("next.gif");
              rm.add("next.gif");
              // 4
              rm.add("last.gif");
              rm.add("last.gif");
              rm.add("last.gif");
              // load the images now
              rm.load();
         public void startUp()
              // button 1
              hs1 = new HotSpot(this);
              hs1.setImage(rm.get("1st.gif"),1);
              hs1.setImage(rm.get("1st.gif"),2);
              hs1.setImage(rm.get("1st.gif"),3);
              hs1.setBounds(200,515,40,38);
              // same for button 2
              hs2 = new HotSpot(this);
              hs2.setImage(rm.get("prev.gif"),1);
              hs2.setImage(rm.get("prev.gif"),2);
              hs2.setImage(rm.get("prev.gif"),3);
              hs2.setBounds(250,515,40,38);
              // same for button 3
              hs3 = new HotSpot(this);
              hs3.setImage(rm.get("next.gif"),1);
              hs3.setImage(rm.get("next.gif"),2);
              hs3.setImage(rm.get("next.gif"),3);
              hs3.setBounds(300,515,40,38);
              // same for button 4
              hs4 = new HotSpot(this);
              hs4.setImage(rm.get("last.gif"),1);
              hs4.setImage(rm.get("last.gif"),2);
              hs4.setImage(rm.get("last.gif"),3);
              hs4.setBounds(350,515,40,38);
              // Place them
              add(hs1);
              add(hs2);
              add(hs3);
              add(hs4);
              // Repaint makes sure they are immediately visible.
              hs1.repaint();
              hs2.repaint();
              hs3.repaint();
              hs4.repaint();
         // Here the images are drawn.
         public void paint(Graphics g)
              g.setColor(Color.white);
              // When it is still loading show a loading message.
              if (!rm.isLoaded())
                   g.drawString("loading file "+rm.getCurrent(),20,20);
                   g.drawString("of "+rm.getTotalFiles(),20,40);
                   g.drawString("Percent: "+rm.getPercent(),20,60);
                   g.fillRect(20,80,rm.getPercent(),20);
              // Otherwise draw image1 or 2
              else
                   if (x == 0)
                        //place images using x-coordinates, y-coordinates.
                        g.drawImage(rm.get("image0"),20,20,this);
                        g.drawImage(rm.get("image0_1"),80+loopcounter,100+loopcounter,this);
                        g.drawImage(rm.get("image0_2"),190+loopcounter,175+loopcounter,this);
                        g.drawImage(rm.get("image0_3"),240+loopcounter,220+loopcounter,this);
                        g.drawImage(rm.get("image0_4"),290+loopcounter,265+loopcounter,this);
                        //g.drawImage(rm.get("image0_5"),150+loopcounter,285+loopcounter,this);
                        g.drawImage(rm.get("image0_6"),400,370,200,100,this);
                        g.drawImage(rm.get("image0_7"),100,300,this);
                        loopcounter+=2;
                        if (loopcounter == 50)
                        loopcounter = 0;
         // if loopcounter+=2, coordinate=x+loopcounter, y+loopcounter.
         /* e.g. round 1, loopcounter=0, coordinate=1,3 */
         /* e.g. round 2, loopcounter=2, coordinate=3,5 */
         /* e.g. round 3, loopcounter=4, coordinate=7,9 */
                   else if (x == 1)
                        g.drawImage(rm.get("image1"),20,20,this);
                   else if (x == 2)
                        g.drawImage(rm.get("image2"),20,20,this);
                   else if (x == 3)
                        g.drawImage(rm.get("image3"),20,20,this);
                   else if (x == 4)
                        g.drawImage(rm.get("image4"),20,20,this);
                   else if (x == 5)
                        g.drawImage(rm.get("image5"),20,20,this);
                   else if (x == 6)
                        g.drawImage(rm.get("image6"),20,20,this);
                   else if (x == 7)
                        g.drawImage(rm.get("image7"),20,20,this);
                   else if (x == 8)
                        g.drawImage(rm.get("image8"),20,20,this);
                   else if (x == 9)
                        g.drawImage(rm.get("image9"),20,20,this);
         // This method is called when a button has been clicked.
         public void hotSpotEvent(HotSpot hs)
              // if it was button 1 show image1.
              if (hs == hs1)
                   x = 1;
              // else show image2
              else if (hs == hs2)
                   {x = x - 1;
                   if ( x <= 1 ) x = 1;
              else if (hs == hs3)
                   {x = x + 1;
                   if ( x >= 9 ) x = 9;
              else
                   x = 9;
              // and repaint to show them.
              repaint();
         // Necessary for RealMedia to load your images
         public Image loadImage(String file)
              return getImage(getCodeBase(),file);
         // Also required but not used this time.
         public AudioClip loadAudio(String file)
              return getAudioClip(getDocumentBase(),file);
    /*new added code*/
         public void start() {
                if (scroller == null) {
                scroller = new Thread(this);
                scroller.start();
        public void stop() {
            if (scroller != null) {
                scroller.stop();
                scroller = null;
        public void run() {
              try {Thread.currentThread().sleep(100);}
                catch (InterruptedException e){}
            for (count=0; count <= 400; ) {
              try {Thread.currentThread().sleep(20);}
                catch (InterruptedException e){}
              rm.load();
        public void destroy(){;}
        public void update(Graphics g){paint(g);}
    }

    Thread scroller;//for looping purpose
    **like whats does "thread scroller" means? Looping purpose? what's looping then?So, you don't know what a variable declaration is, and you don't know what looping is, and you're unable to find out other than by having somebody here tell you (your school has no library, no bookstore, and no access to google--only to the Java forums).
    Either your school is absolutely backwards and useless, or you're a stupid lazy git who deserves to fail the course. Either way, somebody here posting an answer for you is not going to help you.
    The following might.
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.

  • Color code calendar events

    How can I color code calendar events in Calendar (iPhone 4S)?  I have it synced to Exchange.  So if this is the case should calendar events come over as color coded from Exchange?

    Not sure about adding color to the calendar as I have never done it. However, I assume it can be done based on the way the Calendar is set up in this TribeVita template. This may also be another great option for you other than colors.
    http://templatetheotherchildusstandard.businesscatalyst.com/events

  • How to organize "updated projects"

    I have a lot of Imovie 9 projects that were put in the "Updated Projects" folder when importing to imovie 10.  They are all sort of in a jumbled mess in that folder. Is there anyway to organize these projects and events into some way using the date they were created? All of these projects seem to have the same date in that Updated projects folder.
    My imovie 9 does still exist and everything is organized there but i would like to use imovie 10 from now on if possible.
    Thanks so much
    Ross

    With the fundamental chage in the way stuff is stored in iMovie 10, there is no automatic way to organise but you can move projects and clips between events and you can move events between libraries.  You might want to move each of your updated projects into the event it belongs to.  You can create as many libraries as you want and can choose to open only those containing projects you are currently working on. 
    See:  http://help.apple.com/imovie/mac/10.0/#mov3fa25bae7
    To organize by date you can of course include the date in event and library names.  Within events clips appear according to their timestamp and you can choose to group clips by date within an event.  (View - Show Separate Days in Events). 
    Its a very flexible system but a bit of a pain for people who have a lot of stuff organized the 'old' way.
    Note:  Some people are reporting problems with wrong timestamps - but AVOID using the Modify - Adjust Clip Date and Time function since there is currently a nasty bug which can cause adjusted clips to disappear.
    I hope this helps.
    Geoff.
    Geoff.

  • I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am warned that I will not be able to use this video in existing projects   How do I point iMovie to events in my external  hard drive so I can pl

    I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am woarned that I will not be able to use this video in existing projects
    How do I point iMovie to events in my external  hard drive so I can play projects which use them?
    MacBook, iMovie 9.0.4

    Hi
    You can do this - by not doing it the way You describe as it will not work.
    a. the external hard disk - MUST BE - Mac OS extended (hfs) formatted -
    UNIX/DOS/FAT32/Mac OS Exchange - will work for most things - BUT NOT FOR VIDEO (iMovie, iDVD or FinalCut doesn't matter)
    b. Do not alter or move any folder named
    • iMovie Event's - or -
    • iMovie Project's
    on DeskTop/Finder - at all
    All moving's of Events and Projects must be done within the iMovie Application - then connections will not break.
    (move them back and see if iMovie remembers them - then do move as described above)
    Yours Bengt W

  • All of my imovie events are stored on an external hard drive.  How do I backup this external hard drive? If the external hard drive crashes, how do retrieve the imovie events?

    I have all of my imovie events stored on an external hard drive in order to save space on my MacBook Pro's internal drive.  I currently back up both my MacBook Pro and the external hard drive  using a second external hard drive via Time Machine. I have a few questions:
    1. How can I be sure that the external drive is actually being backed up.
    2. How do I retrieve the imovie events if the 1st external hard drive crashes?
    Thank for your help!

    Let me give you some thoughts. I can tell you my plan, but ultimately you will need your own plan that makes sense for you.
    I do not think that your idea of having two separate Time Machine destinations will work. You can have two external drives as Time Machine volumes, but they will both back up the same data set. You cannot dedicate one to iMovie and one to everything else. They will both have everything, so you may still have a space problem.
    One way to overcome this is to back up the iMovie volume by using a tool like SuperDuper! or Carbon Copy Cloner. The good news is that your Event files should be pretty stable and there is no need to back them up every 15 minutes. So something like SuperDuper, which you can set to automatically backup once a day, for example, is probably fine. I am pretty sure that this would work if you kept the Projects on the same external drive. As long as Projects and Events are on the same drive, then the cloning stragy should work (but you should always test.)
    Because projects change more often than events, and projects can become corrupted, I would definitely back up the Project Library to Time Machine. You can do this even though it is on an external drive. (And even though you may be periodically backing up the entire drive that contains the projects.)
    Here are some thoughts on how I approach backup, copied from an earlier answer...
    ============================================================
    Great question. I think the issue of backup is a important one, and one I always worry about since I have a lot of video footage that is irreplaceable.
    For back-up, it is helpful to define the risk you are trying to protect from.
    For example,
    1) risk of corruption in iMovie --> I  use Time Machine
    2) risk of hard drive failure --> I use SuperDuper! nightly for bootable backup) and Time Machine all the time
    3) Risk of theft or fire --> offsite backup
    Here is what I do...
    1) I back up my boot disk with SuperDuper automatically each night so I always have a bootable system.
    2) I back up my original video files. For my Motion JPEG, VHS-->AIC, DV, and 8MM to DV, the EVENT is the copy I back up. (I keep the tapes, but I never want to have to import the tapes again.)
    For my AVCHD high def video, I back up the camera archive of the AVCHD, but I am not currently backing up the Event files, because I would need from 4 to 8 TB to back up these events depending on whether I made one copy or two. I can always re-create the Event from the camera archive.
    3) I use CrashPlan for my offsite backup. It costs less than $4 per month, and I seeded the initial backup to an external drive to minimize having to transfer video files over the Internet. I currently have over 2TB of data backed up to CrashPlan, which includes my entire boot drive, and the files described in #2.
    4) All of the above is automated, so I don't have to think about it too much. If I have to manually do stuff, I tend to get behind.
    You have to consider the value of total multiple redundancy vs. the likelihood that 2 or three unlikely events would all happen at once. For example, CrashPlan could lose my data. My hard disk could fail. I could lose everything in a fire. But it is unlikely that they would all happen at once, except in nuclear war, in which case, who cares?

  • How do I use an external hard drive for Organizer

    I have backed up 60,000 from Organizer to an external hard-drive.  I have installed Elements on another laptop and wonder how if and how I can connect Organizer to this external hard-drive, so I do not have to put the pictures into this secondary laptop's C drive.  Thanks.

    I don't know why the restore to 'original' location did not work.
    IAN JULIAN wrote:
    I am nort sure whaat you mean by a 'Custom location'.
    When you restore, you are asked if you want to restore to original location or somewhere else. If you choose original location, the catalog itself will be restored in the default location -- the catalog is a whole folder containing the database : catalog.psexxdb and other files and subfolders -- whereas if you choose another location, for instance a new master folder, the catalog will be restored there together with the restored pictures files. To find this catalog in the catalog manager, you'll have to choose the option 'custom location' and browse to the restored catalog folder.
    When you want to restore to a new location, create the master folder (give it a new name which will be the new catalog name). Then be sure to give access to all users so that you have no problem with read/write permissions. You can choose to keep the original folder structure or not -- I would keep it myself.
    Once the catalog is restored, you can choose to move it back to the default location instead of custom location, that moves only the catalog, not the picture files. To move a catalog, it must not be active, so select another one or create an empty new one.
    By the way, which is your version of PSE ?

  • I get nothing but error messages, -"Your IMAP server wants to alert you to the following: 113 that mail is not available" or 364? there are hundreds stacked up.You must give answers to how to fix these when we do "search" add the error code number

    I get nothing but error messages, -
    "Your IMAP server wants to alert you to the following: 113 that mail is not available"  or  the same with:  364? 
    Now there are hundreds stacked up on my desktop.
    I cannot find the answer anywhere. You need to  give answers to how to fix these errors because when I  "search" "error code" or the number there is NOTHING. NOTHING!  Yet you give us these stupid error codes
    then you do not give us ANYTHING on how to fix these. These error codes make me so mad it makes me hate outlook, and hate the developers and hate microsoft.  How in the world can you give us ERROR codes without the explanation of what
    to do or how to fix it. You need to  add each  error code number in your "search" then explain what it is and how to fix it.  I am not a tech. I am a lawyer. I have googled the entire string of error code and nothing is clear.
    So, for the last several years, I get these error codes. Also, there is another error code that won't go away--it is the password error code that asks if I want to store the password. Yes, so I say YES. but it pops back. I am sick of this. This is the reason
    I hate Microsoft and I love google. #1 they respond to error, #2 them try to fix them you do not. I paid the full price to buy the OUtlook 2010, almost $500 just to get outlook, and all I got was error codes. I could not even open it because all I would get
    was that error codes and NO ONE knew how to fix them. WHAT IS YOUR PROBLEM that you cannot fix the stupid error codes that you imbed? PLEASE HELP

    Hi,
    I understand how frustrated you are when facing such an issue, maybe I can provide some suggestions on the problem.
    Based on the description, you should be using an IMAP account setup in Outlook. As for the error message, usually it's caused by a corrupted message on the Server. I suggest you logon the Webmail site, check if sending/receiving emails works well.
    If you find any unusual emails that cannot be read or sent, try deleting them to try again.
    I also suggest you create a new profile to setup the IMAP account:
    http://support.microsoft.com/kb/829918/en-us
    Contact your Email Service Provider to get the correct and latest account settings, since you have been using Outlook for years, some settings may have been changed while you haven't been informed.
    For the steps to setup an account in Outlook 2010, please refer to:
    http://office.microsoft.com/en-001/outlook-help/add-or-remove-an-email-account-HA010354414.aspx
    I hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • How to add invitees to an event through code?

    How to add invitees to an event through code? Attendees property in EKCalendarItem is readonly, is there any way to do it?

    Sorry by email only iCloud: Share a calendar with others

Maybe you are looking for

  • Problem with display of ampersand in reports

    I enter the following text into a "notes" item on a page: Send request to AT&T. When I use this notes item in a report the following is displayed: Send request to AT Note the ampersand and the T are missing. If I remove the period at the end of the n

  • Upgrade Error in HR module

    HI friends,                while upgrading we testing one report IN HR module im getting below error and schema is Z schema.              An error has occurred during schema generation! Call the schema editor to analyze errors*             Check the

  • Newsletter help!

    Hello, I am creating a newsletter that has 3 columns and I am trying to make the text lines up at the bottom of each column, so that it is a straight line across and looks neat. Does anyone know how to do that? Thanks, Molly

  • AutoSuggest behavior not always working

    Hi everyone, JDeveloper 11.1.1.5.0 I know how vague the title sounds, sorry for that :-) We want to implement autosuggest behavior on a simple input text. While this simple task seems to work on a normal page, it doesn't so with the structure of page

  • Changing admin name

    my laptop recently needed fixed and they put in a new hardrive but when they reinstall the software etc they put in an admin of my dad since he took it 2 get fixed and i dont want him as my admin. i was going 2 use the reinstall cds 2 get new account