Command help on linx

Dear all,
I am relatively new for linux. I am exciting about the perfomance of linux.
Please can enyone explain how to resolve command help.
eg how can i identify the arguments of commands
what meaning by [] <> [ <>  <> ]
# ifconfig --help
Usage:
ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>]
[add <address>[/<prefixlen>]]
[del <address>[/<prefixlen>]]
[[-]broadcast [<address>]] [[-]pointopoint [<address>]]
[netmask <address>] [dstaddr <address>] [tunnel <address>]
[outfill <NN>] [keepalive <NN>]
[hw <HW> <address>] [metric <NN>] [mtu <NN>]
[[-]trailers] [[-]arp] [[-]allmulti]
[multicast] [[-]promisc]
[mem_start <NN>] [io_addr <NN>] [irq <NN>] [media <type>]
[txqueuelen <NN>]
[[-]dynamic]
up ...
if i coud undestand it i can resolve the others.
Please help.
Message was edited by:
Upul Indika

If you have hard time understand the simplified help message, you can always google the whole term on internet, there's plenty of resources.
Also, man is a lot more descriptive in most cases,
for example,
man ifconfig
ifconfig(1M)                                                   ifconfig(1M)
NAME
      ifconfig - configure network interface parameters
SYNOPSIS
      ifconfig [-m mod1[,mod2]...] interface [address_family]
           [address[dest_address]] [parameters]
      ifconfig interface [address_family]
DESCRIPTION
      The first form of the ifconfig command assigns an address to a network
      interface and/or configures network interface parameters.  ifconfig
      must be used at boot time to define the network address of each
      interface present on a machine.  It can also be used at other times to
      redefine an interface's address or other operating parameters.  If the
      address_family is not specified, the address family defaults to IPv4.
      The second form of the command, without address_family, displays the
      current configuration for interface.  If address_family is not
      specified, ifconfig reports the details on all supported address
      families.  An exception is when the user has not configured any
      interface with an IPv6 address, ifconfig does not display the IPv6
      loopback interface.
      Only a user with appropriate privileges can modify the configuration
      of a network interface.  All users can run the second form of the
      command.
    Arguments
      ifconfig recognizes the following arguments:
           -m mod1[,mod2]...
                          A list of modules that can be pushed on a stream
                          associated with an interface.  The -m option can
                          be used to configure an interface manually with
                          the specified module names.  There is no space
                          between the module names and only a comma is used
                          to separate the module names.  If the -m option is
                          specified, ifconfig pushes all modules on the
                          stream associated with the interface in the
                          specified order.  For example, module mod2 is
                          pushed on top of module mod1.  The modules are
                          pushed between IP and network drivers.  If the -m
                          option is not specified, the modules (if any)
                          specified in the DEFAULT_INTERFACE_MODULES
                          variable are used for configuring the interface
                          (see netconf and netconf-ipv6 in
                          /etc/rc.config.d/).
           address        Either a host name present in the host name
                          database (see hosts(4)), or a DARPA Internet
Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Mar 2005
ifconfig(1M)                                                   ifconfig(1M)
                          address expressed in Internet standard dot
                          notation (see inet(3N)) for an IPv4 address and in
                          colon notation (see inet6(3N)) for an IPv6
                          address.
           address_family Name of protocol on which naming scheme is based.
                          An interface can receive transmissions in
                          differing protocols, each of which may require
                          separate naming schemes.  The address_family,
blah.........blah.....

Similar Messages

  • Fluke 6060B Frequency, Amplitude GPIB commands HELP!

    fluke 6060B Frequency, Amplitude GPIB commands HELP! The very old and useless scanned copy of the manual showed the GPIB commands: FR230MZ but it NEVER worked, same for amplitude, anyone can send the WORKING vi that can set any number with any significant digits for frequency and amplitude, GREATLY appreciated!

    Please don't shout.  It doesn't help at all to do that.
    When you use the driver, what VI are you using? Do you get any kind of error code back from the VI? What is it if you do? When you send your frequency command, is this with the driver of in MAX? When the frequency command does not execute, have you done an errory query of the instrument? There is a funciton in the driver for that. It would be extremely helpful to know if the instrument replies back with some error message or code. I don't know if it's related to the problem you are seeing but the driver I downloaded needs to be modified to work with newer versions of VISA. The initialize function has an 'Old' VISA Open. This should be replaced with the normal VISA Open on the palette. I modified this and the Getting Started function to be correct and attached them.
    Attachments:
    FL6060X Initialize.vi ‏79 KB
    FL6060A Getting Started.vi ‏57 KB

  • Cisco gateway telnet command help

    When our phone system was installed over a year ago the tech that was onsite used a command when after he would telnet into our voce gateway that would display informatin about every call that was going through the system.
    For the life of me I can not recall the command that he used.
    It was like a debugging tool that everytime a call was placed information about the call, source, destination, protocolots, off hook, on hook, etc...
    Can anyone please help jog my brain into remembering this cisco gateway command?
    thanks in advance

    show voice call status
    debug isdn q931 ----->(Don't forget to turn on "term mon")
    HTH
    Regards,
    Yosh

  • Does running this command helps sql server 2008 r2 for best performance

    Sir,
    1)DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR)
    2)DBCC FREESYSTEMCACHE ('ALL')
    3)DBCC FREESESSIONCACHE
    4)DBCC FREEPROCCACHE
    5)DBCC DROPCLEANBUFFERS
    If not the commands then what will be best idea to make server Retrieve data from Tables.
    And , retrieving data from stored procedures to dashboarr.
    Please , do me a need full.
    Thanks in advance....

    Sir,
    1)DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR)
    2)DBCC FREESYSTEMCACHE ('ALL')
    3)DBCC FREESESSIONCACHE
    4)DBCC FREEPROCCACHE
    5)DBCC DROPCLEANBUFFERS
    If not the commands then what will be best idea to make server Retrieve data from Tables.
    And , retrieving data from stored procedures to dashboarr.
    Above commands are no where related to retreiving data from procedure above commands will clears your waits stats information stored and also will clear cache plans which as Latheesh pointed out can cause performance issue.New plan needs to be created for each
    new query hitting the database.
    Your question seems misterious to me.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Xautolock command help [solved]

    I am running Arch with LXDE on desktop. I want the system to shutdown (poweroff) after 30 minutes of inactivity. I was searching for options and found following on pm-utils page of the wiki ( https://wiki.archlinux.org/index.php/Pm-utils ):
    Suspend on idle/inactivity:
    One method relies on xautolock program. Add following: xautolock -time 30 -locker "sudo pm-suspend" & to ~/.xinitrc. This implies that pm-suspend is called after 30 minutes of inactivity.
    I thought I can replace the command "sudo pm-suspend" with "sudo poweroff" but my doubt is will this command not ask for password?
    Thanks for your help.
    Last edited by rnarch (2012-09-02 15:42:36)

    I tried putting the command in /etc/rc.local and in ~/.config/lxsession/LXDE/autostart file. It does not work from either place.
    On checking 'ps -aux | grep xautolock', there is no entry. The other entries of autostart file are seen to be executed. Where could be the error?
    The entry in ~/.config/lxsession/LXDE/autostart file is:
    @xautolock -time 3 -locker '/sbin/poweroff' &
    and entry in visudo is:
    myusername ALL=(ALL) NOPASSWD: /sbin/shutdown -h now,/sbin/halt,/sbin/poweroff,/sbin/reboot
    The command 'sudo poweroff' does not ask for password when typed on terminal.
    The command xautolock -time 3 -locker '/sbin/poweroff' also does not work when typed from terminal.
    Last edited by rnarch (2012-09-02 15:41:48)

  • Host Command Help?

    Hi
    From client machine
    1. i going to command prompt
    2. c:\> ftp serveripaddress (connecting for file transfer from client machine to server)
    3. control move to server
    4. then im using "BIN"
    6. either get/put the file from/to client.
    Is it possiple to make this flow via "Host".
    wbr
    kanish

    hi kanish,
    To run multiple commands in one host session you would have to create a batch file, and call that file from host.
    HOST ('PutGetFileCommand.sh');{code}PutGetFileCommand would have thecommands you want to execute.
    If your requirements are dynamic then an option is, to generate the batch file using TEXT_IO and then call the generated file via HOST.
    hope that helps.
    +Have a search in the forum, you will find a lot of question on HOST+.
    Edited by: easot on Sep 12, 2008 9:41 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Batch command help ?

    Hi Guys I have this batch file called via ant build script.The batch file has 10 different function .Now i have this requirement to break it into smaller parts.
    Example the functionality should now be broken into three parts
    1)employee data processing
    2)employee working days
    3)employee salary
    4)employee promotion history
    1)employee data processing
    2)employee working days
    3)employee salary
    1)employee data processing
    2)employee working days
    4)employee promotion history
    Problem is absence of OR statment in batch file will force me to write this
    command in separate batch file.(I was trying to put it into one so that I dont have to repeat statments).Basically I was trying to execute target and target will execute the batch file with a parameter,which will then decide which functionality to execute , but in absence of OR is causing me some headache.Not able to decide the best strategy.

    help.Cut it out already.
    We've been nice considering this is a Java forum and not a
    Windows batch file forum.
    Your problem may be that you just dont know enough about
    batch files.
    http://www.robvanderwoude.com/index.html
    http://www.google.com/search?hl=en&q=batch+files+if

  • Unix command help!

    hey
         i could really use some help here! i just can't figure this out and full disclosure i'm a newbie when it comes to these things.
    here is the unix command that i am issuing through ARD
    osascript <<EndOfMyScript
    tell application "System Events"
    tell application process "loginwindow"
    key code 125
    delay .5
    key code 125
    delay 1
    keystroke return
    delay 2
    keystroke "2634"
    keystroke return
    end tell
    end tell
    delay 2
    tell application "Gaming Introduction 30m"
    activate
    end tell
    EndOfMyScript
    two problems:
    1) the application "Gaming Introduction 30m" launches fine but it doesn't come to the front and the icon bounces in the dock instead of bringing the dialogue box that is supposed to pop up to the forefront. is this a "focus issue" or something of that nature?
    2) the command never seems to finish in ARD, it never completes. it is like it is stuck on something. why doesn't the unix command finish in ARD when once the "Gaming Introduction 30m" has finished launching?
    i would really appreicate any help, advice or hints!
    thanks so much!
    peace will

    here is some additional info: here is the script code for the "Gaming Introduction 30m" application:
    delay 2
    on box()
              set done to false
              set question to display dialog "Have you been to Vantage before?" buttons {"Yes", "No"}
              set answer to button returned of question
              if answer is equal to "No" then
                        tell application "QuickTime Player"
      activate
                                  open "/Gaming Introduction.mp4"
      present document 1
                                  delay 2
                                  tell application "System Events"
      keystroke " "
                                  end tell
                        end tell
                        delay 178
                        tell application "QuickTime Player"
      quit
                        end tell
      delay 1
                        tell application "Gaming Introduction" to activate
                        set question to display dialog "Do you want to watch the video again?" buttons {"Yes", "No"}
                        set answer to button returned of question
                        if answer is equal to "Yes" then
                                  tell application "QuickTime Player"
      activate
                                            open "/Gaming Introduction.mp4"
      present document 1
                                            delay 2
                                            tell application "System Events"
                                                      keystroke " "
                                            end tell
                                            delay 178
                                            tell application "QuickTime Player"
                                                      quit
                                            end tell
                                  end tell
                        end if
              end if
              tell application "Menubar Countdown"
      activate
                        delay 0.5
                        tell application "System Events"
      keystroke tab
                        end tell
                        delay 0.2
                        tell application "System Events"
      keystroke "30"
                        end tell
                        delay 0.2
                        tell application "System Events"
      keystroke tab
                        end tell
                        delay 0.2
                        tell application "System Events"
      keystroke "00"
                        end tell
                        delay 0.2
                        tell application "System Events"
      keystroke return
                        end tell
              end tell
    end box
    box()

  • I deleted my profile (the whole thing!)--can't access Profile Mgr. It is not missing or there to be recovered. Uninstall/reinstall nor terminal commands help.

    I deleted my profile. I've tried online things such as a)restarting computer b)deleting and reinstalling Firefox c)entering in command at Terminal : /Applications/Firefox.app/Contents/MacOS/firefox-bin -profilemanager and even dropping off "- bin" as also suggested. There is not profile and no profile manager. I got into this mess as Firefox had continued to open up window after window and locking up so I could not even get to Preferences without windows burying it and computer locking. After inadvertently deleting my whole profile, I now install Firefox and it doesn't open saying that Firefox is currently open.
    These were the links I checked out among a few others that said the same thing:
    http://kb.mozillazine.org/Profile_Manager#Mac_OS_X
    http://support.mozilla.org/en-US/kb/Basic%20Troubleshooting#w_7-reinstall-firefox

    Can you open [http://osxdaily.com/2010/08/15/mac-task-manager/ Activity Monitor] and look any firefox processes or plugin-manager processes and force quit them all? You said Firefox doesn't open because there's a message saying that Firefox is currently open.
    The main reason for that would be if a firefox process has been stuck in memory this entire time. Although I don't know how a running firefox process would survive a computer restart. So I'm stumped there. The parent.lock file is another file responsible for the "Firefox is currently open" message, you could try searching for it & erasing that as well.
    The very last thing we could try is installing Firefox Portable. In most crazy cases like this, that gets Firefox up and running.
    But it's stuck at Firefox version 4.0.1 which is super old.
    <br> Link: http://www.macupdate.com/app/mac/20395/portable-firefox
    But I think you can use the update feature with Firefox 4.0.1 to upgrade to Firefox 12 within the portable application. Going to '''Help > About Firefox''' should auto check for a update and download it to Firefox Portable.

  • Terminal rm command help needed

    While looking for another problem on my Mac I had the Console open.  I noticed quite a few messages involving something called Pogoplug*:
    8/28/12 5:07:49.794 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor[721]) Exited with code: 1
    8/28/12 5:07:49.794 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor) Throttling respawn: Will start in 10 seconds
    8/28/12 5:07:59.814 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor[723]) Exited with code: 1
    8/28/12 5:07:59.814 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor) Throttling respawn: Will start in 10 seconds
    8/28/12 5:08:09.832 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor[725]) Exited with code: 1
    8/28/12 5:08:09.832 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor) Throttling respawn: Will start in 10 seconds
    8/28/12 5:08:19.851 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor[728]) Exited with code: 1
    8/28/12 5:08:19.851 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor) Throttling respawn: Will start in 10 seconds
    8/28/12 5:08:29.869 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor[729]) Exited with code: 1
    8/28/12 5:08:29.869 PM com.apple.launchd.peruser.502[223]: (com.pogoplug.PogoplugMonitor) Throttling respawn: Will start in 10 seconds
    In Terminal I did a
    sudo find / | grep pogoplug
    and that returned lots of files with *pogoplug* as part of the filename.
    Now what I need to learn is how to do a mass deletion of anything pogoplug related as I do not use this anymore and it seems to be clogging my system.
    I tried a basic rm -R *pogoplug* but that didn't work.  (unsurprising)
    Please note that these files found by the find command turned up files on a couple of external drives as well, so what I'd like to do is totally delete anything with "pogoplug" in the file or directory name.
    * I used the app Pogoplug a few months ago to evaluate a NAS setup.  Pogoplug came with it.  I had thought that I had deleted everything when I dragged the app to AppCleaner but apparently not.
    Any help would be appreciated.
    -Tod

    I would absolutely not recommend trying to use the rm command to deal with this problem. It's too dangerous to mess around with unless you know exactly what you're doing.
    Things like AppCleaner aren't very reliable for uninstalling complex software. You need to use the uninstaller provided by the makers of the software. They supply an uninstall script here:
    http://support.pogoplug.com/entries/21414333-how-do-i-uninstall-and-reinstall-po goplug-companion-software-on-a-mac

  • Sql command Help from prompt

    How to invoke the online sql command syntax help from the
    sql prompt
    Regards
    RA

    I think you have posted to the wrong forum
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Get-ACL command help

    Hey all
    I am trying to use power shell to query the security permissions of all my active directory users that do not have a certain group assign to them in the security tab.  Ie Account operators.
    I can use the powershell command (Get-ACL 'AD:\CN=myuser,CN=Users,DC=mydomain,DC=com').Access | ft IdentityReference,AccessControlType
    -A to pull all the permissions for one users but i cannot see a way of filtering it for the missing group and scan on all users.
    I have tried to use dsquery and pipe the data to powershell with not much success
    Powershell is on server 2012
    Any suggestions

    Hi hellopaul,
    Please try :
    $users = (get-aduser -filter *).distinguishedname
    foreach ($user in $users){$user;(get-acl "AD:\$user").access | ft identityreference,accesscontroltype}
    Hope it helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Privilege command help

    Hi,
    I have a question on the username and privilege levels
    These are the commands
    username jason level5 password Jas0n
    enable secret ***
    privilege mode all level5 show
    Q1. Can we use different enable secret for differnet levels on the same router to give access to different users?
    Q2. When I login to the router enable mode i use the username of Jason and my password, so will that automatically out me level5 mode?
    Thx for the help
    Jason

    Jason, In your example, your Jas0n password will log you right into enable mode. The Enable secret password would be like a back door for someone who logged in with less than enable-level privileges, to be able to get to enable mode with an extra login step.
    Check out this doc and you should get it.
    http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_command_reference_chapter09186a00800ca7cd.html

  • New line command help

    How can I insert a new line wherever "<" in the following file?
    1102,1145d1101 < Mar 2 10:00:03 judas.the-ark.com root: Solstice Backup Savegroup: (info) starting Weekly Backup (with 11 client(s)) < Mar 2 10:00:03 judas.the-ark.com root: Solstice Backup Savegroup: (notice) Weekly Backup completed, 11 client(s) (All Succeeded) < Mar 2 10:00:03 judas.the-ark.com root: Start time: Fri Mar 2 10:00:01 2007 < Mar 2 10:00:03 judas.the-ark.com root: End time: Fri Mar 2 10:00:03 2007 < Mar 2 10:00:03 judas.the-ark.com root: < Mar 2 10:00:03 judas.the-ark.com root: --- Successful Save Sets
    I have tried to use this command:
    cat /tmp/vam.test | sed 's/</^M/g' but that does not work. Please help...

    I can never get that to work - but could awk help?
    timu-home ksh: cat foo
    fffFF < ffffff < < ffff <
    timu-home ksh: awk 'BEGIN{RS="<"}{print}' foo
    fffFF
    ffffff
    ffff
    not very elegant but might help
    tim

  • Missile Command- HELP!

    I'm writing a missile command program for a class. I need help getting the enemy missiles(the ones that shoot down towards the city) to recognize the user's missiles and terminate. This seems especially hard since the users missiles are ellipses and not rectanges and the Ellipse2D.Double's I use use bounding boxes. Let me know if you have any ideas (I tried the contains method, didn't really know how it works)
    Thanks!
    Borismeister
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    import java.util.ArrayList;
    import java.awt.geom.Ellipse2D;
    import java.lang.Thread;
    import javax.swing.JOptionPane;
    public class Screen extends Applet
    public void init()
    MyListener listener = new MyListener();
    addMouseListener(listener);
    level = 2;
    threads = new ArrayList(level * 10);
    shot = 0;
    for(int i = 0; i < level * 10; i++)
    threads.add(new LaserThread(1, this));
    LaserThread p = (LaserThread)threads.get(i);
    p.start();
    missiles = new ArrayList();
    public void paint(Graphics g)
    Graphics2D g2 = (Graphics2D)g;
    // tryInterrupt();
    // public void tryInterrupt()
    // for(int i = 0; i < missiles.size() + 1; i++)
    // MissileThread mis = (MissileThread)missiles.get(i);
    // Missile mos = mis.getMissile();
    // for(int j = 0; j < threads.size() + 1; j ++)
    // LaserThread thr = (LaserThread)threads.get(j);
    // Ellipse2D.Double circ = (Ellipse2D.Double)mos.getEllipse();
    // if (circ.getX() > thr.getX())
    // thr.interrupt();
    private int shots = 20;
    Applet a = this;
    private ArrayList threads;
    private int level;
    public static int shot;
    public static ArrayList missiles;
    class MyListener implements MouseListener
    public void mouseClicked(MouseEvent e) {}
    public void mousePressed(MouseEvent e)
    MissileThread mt = new MissileThread(e.getX(), e.getY(), a, threads);
    mt.start();
    missiles.add(mt);
    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mouseReleased(MouseEvent e) {}
    import java.applet.Applet;
    import java.awt.Graphics2D;
    import java.util.Random;
    import javax.swing.JOptionPane;
    import java.awt.geom.Ellipse2D;
    A thread that moves a car
    The car will run into the wall without stopping.
    public class LaserThread extends Thread
    Constructs a with a given top left corner
    @param x the x coordinate of the top left corner
    @param y the y coordinate of the top left corner
    @param speed the speed of the car
    public LaserThread(int aSpeed, Applet anApplet)
    speed = 15 - aSpeed;
    a = anApplet;
    private int toWait;
    public void run()
    Random gen = new Random();
    try
    sleep(gen.nextInt(3000));
    shot = new Laser(1, a);
    }catch(InterruptedException e) {}
    try
    while(true)
    shot.advance( (Graphics2D)a.getGraphics() );
    sleep(speed);
    catch (InterruptedException e)//SEX!!!!
    public int getX()
    return shot.getX();
    public int getY()
    return shot.getY();
    private double dx;
    private Applet a;
    private int speed; //lower values mean faster
    private Laser shot;
    import java.util.Random;
    import java.applet.Applet;
    import java.awt.Graphics2D;
    import java.awt.geom.Ellipse2D;
    import java.util.ArrayList;
    public class Laser
    public Laser(int aLevel, Applet a)
    Random generator = new Random();
    target = generator.nextInt(a.getWidth());
    xStart = generator.nextInt(a.getWidth());
    slope = (0-a.getHeight())/(xStart - target);
    public void advance(Graphics2D g2)
    y++;
    x = (int)((y + slope * xStart)/slope);
    g2.fill(new Ellipse2D.Double(x, y, 2, 2));
    public int getX()
    return x;
    public int getY()
    return y;
    private int level; //reflects the speed
    private int target; // 0 - getWidth(), thus not all will actually hit targets
    private int speed; //initialized based on the level
    private int xStart;
    private int xEnd;
    private int downSteps;
    private int sideSteps;
    private double slope;
    private int x, y;
    import java.applet.Applet;
    import java.awt.Graphics2D;
    import java.util.Random;
    import java.awt.geom.Ellipse2D;
    import java.util.ArrayList;
    A thread that moves a car
    The car will run into the wall without stopping.
    public class MissileThread extends Thread
    public MissileThread(int myX, int myY, Applet anApplet, ArrayList threads)
    x = myX;
    y = myY;
    a = anApplet;
    private int x, y;
    private Applet a;
    private Missile myMissile;
    public void run()
    myMissile = new Missile(x, y, a);
    myMissile.shoot();
    public Object getCirc()
    return myMissile.getEllipse();
    public Missile getMissile()
    return myMissile;
    import java.awt.geom.Ellipse2D;
    import java.lang.Thread;
    import java.applet.Applet;
    import java.awt.Graphics2D;
    import java.awt.Color;
    public class Missile
    public Missile(int myX, int myY, Applet anApp)
    x = myX;
    y = myY;
    a = anApp;
    private Applet a;
    private int x, y;
    public int getX()
    return x;
    public int getY()
    return y;
    public Ellipse2D.Double getEllipse()
    return circ;
    public void shoot()
    int myX = x;
    int myY = y;
    Graphics2D g2 = (Graphics2D)a.getGraphics();
    for(int i = 0; i < 60; i++)
    circ = new Ellipse2D.Double(myX, myY, 2 * i, 2 * i);
    g2.fill(circ);
    myX--;
    myY--;
    try
    Thread.sleep(40);
    catch(InterruptedException e) {}
    g2.setColor(Color.white);
    g2.fill(circ);
    Ellipse2D.Double circ;
    }

    the Ellipse2D.Double class has an intersects method, so use it on the adversary's missiles to see if you should terminate.

Maybe you are looking for

  • GPU replacement Program

    Even though I'm experiencing the exact symptom(please check the link below) with my macbook pro, the apple store refused to repair it because it passed few months more than the covered period. What am I supposed to do? It just doesn't make sense to m

  • Read shared variable using D/3 DCS

    This is a rather odd question..  I think it can be done, but I have not yet figured how. A client has a DCS System (I believe from NovaTech), which communicates with a database. They use a different PC to get data from a cFP using Shared Variables. T

  • Kernel Panic when trying to install apps.

    Everytime I try to install heavy apps like Final Cut Studio 2, Adobe CS3 och iLife 08 - I get a Kernel Panic after some installation progress (30-80%). It has something to do with "pkgextractor". It only happens on my Quad (clean Leopard install). Tu

  • After installing iOS 7.1.1 my apps fail to update.  How do I fix this?

    Every time I try to update an app it fails.  This has occurred since I updated to iOS 7.1.1.  How do I get my apps to download and update?

  • Wacom PTK-540WL Cursor Won't Move to 2nd Monitor in PS CS5

    I just installed a Wacom PTK-540WL on my Win/Vista machine. I have dual monitors. In PS CS5 the pen moves the cursor around fine on the primary monitor. However, I can't get the cursor to move to the second monitor. I can move the cursor to the secon