Can somebody help me find a bug in my applet?

Hi,
I am in the process of creating a RPG program using Java. I am not very experienced with java, however the problem i am currently facing is something i can't seem to figure out. I would like to draw a simple grid where a character (indicated by a filled circle) moves around this grid collecting items (indicated by a red rectangle). When the character moves on top of the grid with the item, i would like it to disappear. Right now i am not worrying about the fact that the item will reappear after the character moves away again, because sometimes, when the character moves over the item, nothing happens/another item disappears. i have been at this for 4 days and still cannot figure out what is goign on. can somebody please help me? it would be most appreciated.
Thanks

State is the key. Here the rects array keeps track of things. Of course, there are lots of ways to put these things together. Use the arrow keys to move the token and the x key to reset the rectangles.
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
public class RPG extends JApplet
    public void init()
       RPGPanel rpgPanel = new RPGPanel();
       Container cp = getContentPane();
       cp.setLayout(new BorderLayout());
       cp.add(rpgPanel);
    public static void main(String[] args)
        JApplet applet = new RPG();
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(applet);
        f.setSize(400,400);
        f.setLocation(200,200);
        applet.init();
        f.setVisible(true);
class RPGPanel extends JPanel
    final int
        GRID_SIZE = 8,
        PAD       = 20;
    Rectangle[] rects;
    int rectSize;
    Ellipse2D.Double token;
    int dx, dy;
    public RPGPanel()
        TokenController controller = new TokenController(this);
        dx = 2;
        dy = 2;
        requestFocusInWindow();
    protected void paintComponent(Graphics g)
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        drawGrid(g2);
        drawRects(g2);
        g2.setPaint(Color.red);
        g2.fill(token);
    public void moveToken(int horiz, int vert)
        int x = dx * horiz;
        int y = dy * vert;
        if(isWithinBounds(x, y))
            token.x += x;
            token.y += y;
            repaint((int)(token.x - dx), (int)(token.y - dy),
                    (int)(token.x + token.width + dx),
                    (int)(token.y + token.height + dy));
        else
            Toolkit.getDefaultToolkit().beep();
        // check for contact with rects
        checkForContact();
    public void reset()
        for(int j = 0; j < rects.length; j++)
            if(rects[j].width == 0)
                rects[j].width = rectSize;
        token.x = getWidth()/2 - token.width/2;
        token.y = getHeight()/2 - token.height/2;
        repaint();
    private boolean isWithinBounds(int x, int y)
        int w = getWidth();
        int h = getHeight();
        Rectangle r = token.getBounds();
        if(r.x + x < 0 || r.x + r.width + x > w)
            return false;
        if(r.y + y < 0 || r.y + r.height + y > h)
            return false;
        return true;
    private void checkForContact()
        for(int j = 0; j < rects.length; j++)
            Rectangle r = rects[j];
            if(token.intersects(r.x, r.y, r.width, r.height))
                r.width = 0;
        repaint();
    private void drawGrid(Graphics2D g2)
        int w = getWidth();
        int h = getHeight();
        double xInc = (double)(w - 2*PAD) / GRID_SIZE;
        double yInc = (double)(h - 2*PAD) / GRID_SIZE;
        double x1 = PAD, y1 = PAD, x2 = w - PAD, y2;
        // horizontal lines
        for(int j = 0; j <= GRID_SIZE; j++)
            g2.draw(new Line2D.Double(x1, y1, x2, y1));
            y1 += yInc;
        // vertical lines
        y1 = PAD; y2 = h - PAD;
        for(int j = 0; j <= GRID_SIZE; j++)
            g2.draw(new Line2D.Double(x1, y1, x1, y2));
            x1 += xInc;
    private void drawRects(Graphics2D g2)
        if(rects == null)
            initRectsAndToken();
        g2.setPaint(Color.blue);
        for(int row = 0; row < GRID_SIZE; row++)
            for(int col = 0; col < GRID_SIZE; col++)
                int index = row * GRID_SIZE + col;
                g2.fill(rects[index]);
    private void initRectsAndToken()
        int w = getWidth();
        int h = getHeight();
        double xInc = (double)(w - 2*PAD) / GRID_SIZE;
        double yInc = (double)(h - 2*PAD) / GRID_SIZE;
        rectSize = (int)(0.3 * Math.min(xInc, yInc));
        rects = new Rectangle[GRID_SIZE * GRID_SIZE];
        double x0 = PAD + (xInc - rectSize)/2 + 1;
        double y0 = PAD + (yInc - rectSize)/2 + 1;
        double x = x0, y = y0;
        for(int row = 0; row < GRID_SIZE; row++)
            for(int col = 0; col < GRID_SIZE; col++)
                int index = row * GRID_SIZE + col;
                rects[index] = new Rectangle((int)x, (int)y, rectSize, rectSize);
                x += xInc;
            x = x0;
            y += yInc;
        // token
        int d = (int)(0.8 * Math.min(w, h) - 2*PAD) / GRID_SIZE;
        token = new Ellipse2D.Double(w/2 - d/2, h/2 - d/2, d, d);
class TokenController
    RPGPanel rpgPanel;
    public TokenController(RPGPanel rpgp)
        rpgPanel = rpgp;
        registerKeys();
    private Action up = new AbstractAction()
        public void actionPerformed(ActionEvent e)
            rpgPanel.moveToken(0, -1);
    private Action left = new AbstractAction()
        public void actionPerformed(ActionEvent e)
            rpgPanel.moveToken(-1, 0);
    private Action down = new AbstractAction()
        public void actionPerformed(ActionEvent e)
            rpgPanel.moveToken(0, 1);
    private Action right = new AbstractAction()
        public void actionPerformed(ActionEvent e)
            rpgPanel.moveToken(1, 0);
    private Action reset = new AbstractAction()
        public void actionPerformed(ActionEvent e)
           rpgPanel.reset();
    private void registerKeys()
        rpgPanel.getInputMap().put(KeyStroke.getKeyStroke("UP"), "UP");
        rpgPanel.getActionMap().put("UP", up);
        rpgPanel.getInputMap().put(KeyStroke.getKeyStroke("LEFT"), "LEFT");
        rpgPanel.getActionMap().put("LEFT", left);
        rpgPanel.getInputMap().put(KeyStroke.getKeyStroke("DOWN"), "DOWN");
        rpgPanel.getActionMap().put("DOWN", down);
        rpgPanel.getInputMap().put(KeyStroke.getKeyStroke("RIGHT"), "RIGHT");
        rpgPanel.getActionMap().put("RIGHT", right);
        rpgPanel.getInputMap().put(KeyStroke.getKeyStroke("X"), "X");
        rpgPanel.getActionMap().put("X", reset);
}

Similar Messages

  • Missing Library. Can somebody help me find it?

    I'm sure this has been addressed before, but bare with me. I recently had to take my comuter into the shop and get a new hard drive. Luckily, when I registered with Itunes, I registered everything to an external hard drive. So nothing, absolutely nothing, was on the hard drive that had to be replaced. The other day, when I got my computer back, I tried accessing my tunes and it gave me an error message that said something to the extent of, "Some required files are missing. You must reinstall itunes. So i did. Well, now I have an empty library. I realize that I can still get my purchases. I figured out how to do that, but what about all the other music I had in there? How, or can I get that back? That was hours and days of dowloading!! Does anyone know what I can do? Help if you do....

    im afraid to tell u , i think u might need to reinstall all ur songs again. they must be redownloaded back to itunes. if u purchased them u can get them back, but u might need to reauthorise ur coimputer. i think apple advises u to deauthorise ur computer before u take it for repairs. i think there is a relationship between a missing itunes files and non deathaurise computer before repairs. .for the purchased songs u might need to speak 2 itunes store, maybe they will help u. but they specifically tells u to deauthorise ur computer before repairs. talk to them maybe they can help. but as far as ur other songs that is non itunes songs, i tink they are gone u might need to try reinstalling itunes and try searching ur computer folders for them, u can do this via itunes by clicking on and clicking on export library or other buttons. try to look for ur oroginal music folder. if this dont work im afraid u will have to reimport all ur songs u did not buy from itunes via ur oroginal disks.

  • Can somebody help me find the FCE 4.0.1 upgrade?

    I'm about to  install Final Cut Express 4 in a Mac Book Pro running OS 10.8.2. Based on what I've read, it looks like I'll have to upgrade the software to 4.0.1 before Final Cut Express will run on my computer. Does anyone know if it's still available through Apple's Software Upgrades? If so, where is it located? If not, is there another site that might still have it available? Thanks!

    Use Software Update started by clicking the Apple icon at the top of the screen and selecting Software Update from the menu.
    FCE needs to be installed at the default top level of your Applications folder for SU to see FCE.
    Al

  • Can somebody help me in finding a solution or an explanation to the problem I am currently experiencing as well as others wherein we cannot connect to the iTunes store (iTunes could not connect to the store. An unknown error occurred (0x80096004))?

    Can somebody help me in finding a solution or an explanation to the problem I am currently experiencing as well as others wherein we cannot connect to the iTunes store. An error message appears and either says "iTunes could not connect to the store. An unknown error occurred (0x80096004). Make sure your network connection is active and try again" or "iTunes could not connect to the store.Make sure your network connection is active and try again." Despite the fact that my network connection is working quite fine, this problem still persists. I can say that my connection is fine because I can surf the internet and furthermore, I used to connect to the iTunes store just before this incident happened which started from April 17, 2014 and persists until today. I tried to solve the problem by following the troubleshoot procedures given in the support section of this site but it really did not solve the problem. I believe that others are experiencing this situation as well very similar to mine when it comes to the time of occurrence as I have read in the discussions in this site. Even though we have different network connections, operating systems and other specifications, we still experience the same problem, so is there really a problem with our computers or is it with the iTunes? And by the way, my computer works under Windows XP. Thanks a lot. God bless.

    Try this...
    Triple click anywhere in the line below to select it and press Ctrl+C to copy it.
    cmd /k netsh winsock reset
    Press the WinLogoKey+R to open the run dialog, then Ctrl+V to paste, then press enter/return.
    You should get something similar to this:
    Reboot the computer and the problem should be resolved.
    If it doesn't work then perhaps a full tear down and rebuild of iTunes will fix things. See Troubleshooting issues with iTunes for Windows updates for details.
    tt2

  • I am new with iMac and I am trying to copy some file from my external HDD but it does not let me also I can't delete anything from this HDD using the finder. Can somebody help me , please?

    I am new with iMac and I am trying to copy some file from my external HDD that a used with my PC but it does not let me also I can't delete anything from this HDD using the finder. Can somebody help me , please?

    No, unfortunately, when you format a drive, it will erase all the contents. So you will need to find a temporary "storage" place to put the stuff using a PC so you have access to it. Then reformat using Disk Utility (Applications > Utilities). If only using with mac, format Mac OS Extended (Journaled) and use GUID Partition scheme under Partitions/Options. After formatting, you can drag the files back.

  • Can I put taks in my ical.  They talk about a pin but I cannot find one on my application on my ipad and on my computer.  Can somebody help me.  Thanks.

    can I put taks in my ical.  They talk about a pin but I cannot find one on my application on my ipad and on my computer.  Can somebody help me.  Thanks.

    re-post in the iMovie forum: https://discussions.apple.com/community/ilife/imovie.  Good luck.

  • I couldnt find call forwarding options in the settings, can somebody help me to rectify it

    i couldnt find call forwarding options in the settings, can somebody help me to rectify it

    Call forwarding is a carrier feature. Contact your carrier to see if such is available, & if so have such provisioned on your account.
    Note: If a CDMA iPhone, you won't have a setting for call forwarding, even if provisioned on your account.

  • My i tunes don't find disc recording, can somebody help me ?

    my i tunes don't find "disc recording", can somebody help me ?

    Could you post your diagnostics for us please?
    In iTunes, go "Help > Run Diagnostics". Uncheck the boxes other than DVD/CD tests, as per the following screenshot:
    ... and click "Next".
    When you get through to the final screen:
    ... click the "Copy to Clipboard" button and paste the diagnostics into a reply here.

  • Please can somebody help, my imac will not start up, just chimes, apple sign then spinning cog. I have tried many key codes, no success, would really like to talk to someone.

    please can somebody help, my imac will not start up, just chimes, apple sign then spinning cog. I have tried many key codes, no success, would really like to talk to someone.

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.
    You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.
    In this case, however, there are a couple of ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone with the necessary skill can verify what it does.
    You may not be able to understand the script yourself. But variations of the script have been posted on this website thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message.
    Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.
    4. Here's a summary of what you need to do, if you choose to proceed:
    ☞ Copy a line of text in this window to the Clipboard.
    ☞ Paste into the window of another application.
    ☞ Wait for the test to run. It usually takes a few minutes.
    ☞ Paste the results, which will have been copied automatically, back into a reply on this page.
    The sequence is: copy, paste, wait, paste again. You don't need to copy a second time. Details follow.
    5. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode, under the conditions in which the problem is reproduced. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    6. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    7. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, though you may not see all of it in the browser window, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/libexec;clear;cd;p=(Software Hardware Memory Diagnostics Power FireWire Thunderbolt USB Fonts SerialATA 4 1000 25 5120 KiB/s 1024 85 \\b%% 20480 1 MB/s 25000 ports ' com.clark.\* \*dropbox \*genieo\* \*GoogleDr\* \*k.AutoCAD\* \*k.Maya\* vidinst\* ' DYLD_INSERT_LIBRARIES\ DYLD_LIBRARY_PATH -86 "` route -n get default|awk '/e:/{print $2}' `" 25 N\\/A down up 102400 25600 recvfrom sendto CFBundleIdentifier 25 25 25 1000 MB ' com.adobe.fpsaud com.apple.AirPortBaseStationAgent com.apple.installer.osmessagetracing ' ' 1274181950 464843899 1233118628 ' 51 5120 files );N5=${#p[@]};p[N5]=` networksetup -listnetworkserviceorder|awk ' NR>1 { sub(/^\([0-9]+\) /,"");n=$0;getline;} $NF=="'${p[26]}')" { sub(/.$/,"",$NF);print n;exit;} ' `;f=('\n%s: %s\n' '\n%s\n\n%s\n' '\nRAM details\n%s\n' %s\ %s '%s\n-\t%s\n' );S0() { echo ' { q=$NF+0;$NF="";u=$(NF-1);$(NF-1)="";gsub(/^ +| +$/,"");if(q>='${p[$1]}') printf("%s (UID %s) is using %s '${p[$2]}'",$0,u,q);} ';};s=(' s/[0-9A-Za-z._]+@[0-9A-Za-z.]+\.[0-9A-Za-z]{2,4}/EMAIL/g;/\/Shared/!s/(\/Users\/)[^ /]+/\1USER/g;s/[-0-9A-Fa-f]{22,}/UUID/g;' ' s/^ +//;/de: S|[nst]:/p;' ' {sub(/^ +/,"")};/er:/;/y:/&&$2<'${p[10]} ' 1s/://;3,6d;/[my].+:/d;s/^ {4}//;H;${ g;s/\n$//;/s: [^EO]|x([^08]|02[^F]|8[^0])/p;} ' ' 5h;6{ H;g;/P/!p;} ' ' ($1~/^Cy/&&$3>'${p[11]}')||($1~/^Cond/&&$2!~/^N/) ' ' /:$/{ N;/:.+:/d;s/ *://;b0'$'\n'' };/^ *(V.+ [0N]|Man).+ /{ s/ 0x.... //;s/[()]//g;s/(.+: )(.+)/ (\2)/;H;};$b0'$'\n'' d;:0'$'\n'' x;s/\n\n//;/Apple[ ,]|Genesy|Intel|SMSC/d;s/\n.*//;/\)$/p;' ' s/^.*C/C/;H;${ g;/No th|pms/!p;} ' '/= [^GO]/p' '{$1=""};1' ' /Of/!{ s/^.+is |\.//g;p;} ' ' $0&&!/ / { n++;print;} END { split("'"${p[41]}"'",b);for(i in b) print b[i];if(n<200) print "com.apple.";} ' ' $3~/[0-9]:[0-9]{2}$/ { gsub(/:[0-9:a-f]{14}/,"");} { print|"tail -n'${p[12]}'";} ' ' NR==2&&$4<='${p[13]}' { print $4;} ' ' END { $2/=256;if($2>='${p[15]}') print int($2) } ' ' NR!=13{next};{sub(/[+-]$/,"",$NF)};'"`S0 21 22`" 'NR!=2{next}'"`S0 37 17`" ' NR!=5||$8!~/[RW]/{next};{ $(NF-1)=$1;$NF=int($NF/10000000);for(i=1;i<=3;i++){$i="";$(NF-1-i)="";};};'"`S0 19 20`" 's:^:/:p' '/\.kext\/(Contents\/)?Info\.plist$/p' 's/^.{52}(.+) <.+/\1/p' ' /Launch[AD].+\.plist$/ { n++;print;} END { split("'"${p[41]}"'",b);for(i in b) print b[i]".plist";if(n<200) print "/System/";} ' '/\.xpc\/(Contents\/)?Info\.plist$/p' ' NR>1&&!/0x|\.[0-9]+$|com\.apple\.launchctl\.(Aqua|Background|System)$/ { print $3;} ' ' /\.(framew|lproj)|\):/d;/plist:|:.+(Mach|scrip)/s/:[^:]+//p ' '/^root$/p' ' !/\/Contents\/.+\/Contents|Applic|Autom|Frameworks/&&/Lib.+\/Info.plist$/ { n++;print;} END { if(n<1100) print "/System/";} ' '/^\/usr\/lib\/.+dylib$/p' ' /Temp|emac/{next};/(etc|Preferences|Launch[AD].+)\// { sub(".(/private)?","");n++;print;} END { split("'"${p[41]}"'",b);split("'"${p[42]}"'",c);for(i in b) print b[i]".plist\t"c[i];if(n<500) print "Launch";} ' ' /\/(Contents\/.+\/Contents|Frameworks)\/|\.wdgt\/.+\.([bw]|plu)/d;p;' 's/\/(Contents\/)?Info.plist$//;p' ' { gsub("^| |\n","\\|\\|kMDItem'${p[35]}'=");sub("^...."," ") };1 ' p '{print $3"\t"$1}' 's/\'$'\t''.+//p' 's/1/On/p' '/Prox.+: [^0]/p' '$2>'${p[43]}'{$2=$2-1;print}' ' BEGIN { i="'${p[26]}'";M1='${p[16]}';M2='${p[18]}';M3='${p[31]}';M4='${p[32]}';} !/^A/{next};/%/ { getline;if($5<M1) a="user "$2"%, system "$4"%";} /disk0/&&$4>M2 { b=$3" ops/s, "$4" blocks/s";} $2==i { if(c) { d=$3+$4+$5+$6;next;};if($4>M3||$6>M4) c=int($4/1024)" in, "int($6/1024)" out";} END { if(a) print "CPU: "a;if(b) print "I/O: "b;if(c) print "Net: "c" (KiB/s)";if(d) print "Net errors: "d" packets/s";} ' ' /r\[0\] /&&$NF!~/^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./ { print $NF;exit;} ' ' !/^T/ { printf "(static)";exit;} ' '/apsd|BKAg|OpenD/!s/:.+//p' ' (/k:/&&$3!~/(255\.){3}0/ )||(/v6:/&&$2!~/A/ ) ' ' $1~"lR"&&$2<='${p[25]}';$1~"li"&&$3!~"wpa2";' ' BEGIN { FS=":";p="uniq -c|sed -E '"'s/ +\\([0-9]+\\)\\(.+\\)/\\\2 x\\\1/;s/x1$//'"'";} { n=split($3,a,".");sub(/_2[01].+/,"",$3);print $2" "$3" "a[n]$1|p;b=b$1;} END { close(p);if(b) print("\n\t* Code injection");} ' ' NR!=4{next} {$NF/=10240} '"`S0 27 14`" ' END { if($3~/[0-9]/)print$3;} ' ' BEGIN { L='${p[36]}';} !/^[[:space:]]*(#.*)?$/ { l++;if(l<=L) f=f"\n   "$0;} END { F=FILENAME;if(!F) exit;if(!f) f="\n   [N/A]";"file -b "F|getline T;if(T!~/^(AS.+ (En.+ )?text$|(Bo|PO).+ sh.+ text ex)/) F=F" ("T")";printf("\nContents of %s\n%s\n",F,f);if(l>L) printf("\n   ...and %s more line(s)\n",l-L);} ' ' s/^ ?n...://p;s/^ ?p...:/-'$'\t''/p;' 's/0/Off/p' ' END{print NR} ' ' /id: N|te: Y/{i++} END{print i} ' ' / / { print "'"${p[28]}"'";exit;};1;' '/ en/!s/\.//p' ' NR!=13{next};{sub(/[+-M]$/,"",$NF)};'"`S0 39 40`" ' $10~/\(L/&&$9!~"localhost" { sub(/.+:/,"",$9);print $1": "$9;} ' '/^ +r/s/.+"(.+)".+/\1/p' 's/(.+\.wdgt)\/(Contents\/)?Info\.plist$/\1/p' 's/^.+\/(.+)\.wdgt$/\1/p' ' /l: /{ /DVD/d;s/.+: //;b0'$'\n'' };/s: /{ /V/d;s/^ */- /;H;};$b0'$'\n'' d;:0'$'\n'' x;/APPLE [^:]+$/d;p;' ' /^find: /d;p;' "`S0 44 45`" ' BEGIN{FS="= "} /Path/{print $2} ' ' /^ *$/d;s/^ */   /;' );c1=(system_profiler pmset\ -g nvram fdesetup find syslog df vm_stat sar ps sudo\ crontab sudo\ iotop top pkgutil 'PlistBuddy 2>&1 -c "Print' whoami cksum kextstat launchctl sudo\ launchctl crontab 'sudo defaults read' stat lsbom mdfind ' for i in ${p[24]};do ${c1[18]} ${c2[27]} $i;done;' defaults\ read scutil sudo\ dtrace sudo\ profiles sed\ -En awk /S*/*/P*/*/*/C*/*/airport networksetup mdutil sudo\ lsof test osascript\ -e );c2=(com.apple.loginwindow\ LoginHook '" /L*/P*/loginw*' "'tell app \"System Events\" to get properties of login items'|tr , \\\n" 'L*/Ca*/com.ap*.Saf*/E*/* -d 1 -name In*t -exec '"${c1[14]}"' :CFBundleDisplayName" {} \;|sort|uniq' '~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \)' '.??* -path .Trash -prune -o -type d -name *.app -print -prune' :${p[35]}\" :Label\" '{/,}L*/{Con,Pref}* -type f ! -size 0 -name *.plist -exec plutil -s {} \;' "-f'%N: %l' Desktop L*/Keyc*" therm sysload boot-args status " -F '\$Time \$Message' -k Sender kernel -k Message Req 'bad |Beac|caug|corru|dead[^bl]|FAIL|fail|GPU |hfs: Ru|inval|jnl:|last value [1-9]|n Cause: -|NVDA\(|pagin|proc: t|Roamed|rror|ssert|Thrott|tim(ed? ?|ing )o|WARN' -k Message Rne 'Goog|ksadm|SMC:|suhel| VALI|ver-r|xpma' -o -k Sender fseventsd -k Message Req 'SL' " '-du -n DEV -n EDEV 1 10' 'acrx -o comm,ruid,%cpu' '-t1 10 1' '-f -pfc /var/db/r*/com.apple.*.{BS,Bas,Es,J,OSXU,Rem,up}*.bom' '{/,}L*/Lo*/Diag* -type f -regex .\*[cght] ! -name .?\* ! -name \*ag \( -exec grep -lq "^Thread c" {} \; -exec printf \* \; -o -true \) -execdir stat -f:%Sc:%N -t%F {} \;|sort -t: -k2 |tail -n'${p[38]} '/S*/*/Ca*/*xpc* >&- ||echo No' '-L /{S*/,}L*/StartupItems -type f -exec file {} +' '-L /S*/L*/{C*/Sec*A,Ex}* {/,}L*/{A*d,Ca*/*/Ex,Co{mpon,reM},Ex,In{p,ter},iTu*/*P,Keyb,Mail/B,Pr*P,Qu*T,Scripti,Sec,Servi,Spo,Widg}* -path \\*s/Resources -prune -o -type f -name Info.plist' '/usr/lib -type f -name *.dylib' `awk "${s[31]}"<<<${p[23]}` "/e*/{auto,{cron,fs}tab,hosts,{[lp],sy}*.conf,mach_i*/*,pam.d/*,ssh{,d}_config,*.local} {,/usr/local}/etc/periodic/*/* /L*/P*{,/*}/com.a*.{Bo,sec*.ap}*t {/S*/,/,}L*/Lau*/*t .launchd.conf" list getenv /Library/Preferences/com.apple.alf\ globalstate --proxy '-n get default' -I --dns -getdnsservers\ "${p[N5]}" -getinfo\ "${p[N5]}" -P -m\ / '' -n1 '-R -l1 -n1 -o prt -stats command,uid,prt' '--regexp --only-files --files com.apple.pkg.*|sort|uniq' -kl -l -s\ / '-R -l1 -n1 -o mem -stats command,uid,mem' '+c0 -i4TCP:0-1023' com.apple.dashboard\ layer-gadgets '-d /L*/Mana*/$USER&&echo On' '-app Safari WebKitDNSPrefetchingEnabled' "+c0 -l|awk '{print(\$1,\$3)}'|sort|uniq -c|sort -n|tail -1|awk '{print(\$2,\$3,\$1)}'" );N1=${#c2[@]};for j in {0..9};do c2[N1+j]=SP${p[j]}DataType;done;N2=${#c2[@]};for j in 0 1;do c2[N2+j]="-n ' syscall::'${p[33+j]}':return { @out[execname,uid]=sum(arg0) } tick-10sec { trunc(@out,1);exit(0);} '";done;l=(Restricted\ files Hidden\ apps 'Elapsed time (s)' POST Battery Safari\ extensions Bad\ plists 'High file counts' User Heat System\ load boot\ args FileVault Diagnostic\ reports Log 'Free space (MiB)' 'Swap (MiB)' Activity 'CPU per process' Login\ hook 'I/O per process' Mach\ ports kexts Daemons Agents XPC\ cache Startup\ items Admin\ access Root\ access Bundles dylibs Apps Font\ issues Inserted\ dylibs Firewall Proxies DNS TCP/IP Wi-Fi Profiles Root\ crontab User\ crontab 'Global login items' 'User login items' Spotlight Memory Listeners Widgets Parental\ Controls Prefetching SATA Descriptors );N3=${#l[@]};for i in 0 1 2;do l[N3+i]=${p[5+i]};done;N4=${#l[@]};for j in 0 1;do l[N4+j]="Current ${p[29+j]}stream data";done;A0() { id -G|grep -qw 80;v[1]=$?;((v[1]==0))&&sudo true;v[2]=$?;v[3]=`date +%s`;clear >&-;date '+Start time: %T %D%n';};for i in 0 1;do eval ' A'$((1+i))'() { v=` eval "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};A'$((3+i))'() { v=` while read i;do [[ "$i" ]]&&eval "${c1[$1]} ${c2[$2]}" \"$i\"|'${c1[30+i]}' "${s[$3]}";done<<<"${v[$4]}" `;[[ "$v" ]];};A'$((5+i))'() { v=` while read i;do '${c1[30+i]}' "${s[$1]}" "$i";done<<<"${v[$2]}" `;[[ "$v" ]];};';done;A7(){ v=$((`date +%s`-v[3]));};B2(){ v[$1]="$v";};for i in 0 1;do eval ' B'$i'() { v=;((v['$((i+1))']==0))||{ v=No;false;};};B'$((3+i))'() { v[$2]=`'${c1[30+i]}' "${s[$3]}"<<<"${v[$1]}"`;} ';done;B5(){ v[$1]="${v[$1]}"$'\n'"${v[$2]}";};B6() { v=` paste -d: <(printf "${v[$1]}") <(printf "${v[$2]}")|awk -F: ' {printf("'"${f[$3]}"'",$1,$2)} ' `;};B7(){ v=`grep -Fv "${v[$1]}"<<<"$v"`;};C0() { [[ "$v" ]]&&sed -E "$s"<<<"$v";};C1() { [[ "$v" ]]&&printf "${f[$1]}" "${l[$2]}" "$v"|sed -E "$s";};C2() { v=`echo $v`;[[ "$v" != 0 ]]&&C1 0 $1;};C3() { v=`sed -E "${s[63]}"<<<"$v"`&&C1 1 $1;};for i in 1 2;do for j in 0 2 3;do eval D$i$j'(){ A'$i' $1 $2 $3; C'$j' $4;};';done;done;{ A0;D20 0 $((N1+1)) 2;D10 0 $N1 1;B0;C2 27;B0&&! B1&&C2 28;D12 15 37 25 8;A1 0 $((N1+2)) 3;C0;D13 0 $((N1+3)) 4 3;D23 0 $((N1+4)) 5 4;D13 0 $((N1+9)) 59 50;for i in 0 1 2;do D13 0 $((N1+5+i)) 6 $((N3+i));done;D13 1 10 7 9;D13 1 11 8 10;D22 2 12 9 11;D12 3 13 10 12;D23 4 19 44 13;D23 5 14 12 14;D22 6 36 13 15;D22 7 37 14 16;D23 8 15 38 17;D22 9 16 16 18;B1&&{ D22 35 49 61 51;D22 11 17 17 20;for i in 0 1;do D22 28 $((N2+i)) 45 $((N4+i));done;};D22 12 44 54 45;D22 12 39 15 21;A1 13 40 18;B2 4;B3 4 0 19;A3 14 6 32 0;B4 0 5 11;A1 17 41 20;B7 5;C3 22;B4 4 6 21;A3 14 7 32 6;B4 0 7 11;B3 4 0 22;A3 14 6 32 0;B4 0 8 11;B5 7 8;B1&&{ A2 19 26 23;B7 7;C3 23;};A2 18 26 23;B7 7;C3 24;D13 4 21 24 26;B4 4 12 26;B3 4 13 27;A1 4 22 29;B7 12;B2 14;A4 14 6 52 14;B2 15;B6 14 15 4;B3 0 0 30;C3 29;A1 4 23 27;B7 13;C3 30;D13 24 24 32 31;D13 25 37 32 33;A2 23 18 28;B2 16;A2 16 25 33;B7 16;B3 0 0 34;B2 21;A6 47 21&&C0;B1&&{ D13 21 0 32 19;D13 10 42 32 40;D22 29 35 46 39;};D23 14 1 62 42;D12 34 43 53 44;D12 22 20 32 25;D22 0 $((N1+8)) 51 32;D13 4 8 41 6;D12 26 28 35 34;D13 27 29 36 35;A2 27 32 39&&{ B2 19;A2 33 33 40;B2 20;B6 19 20 3;};C2 36;D23 33 34 42 37;B1&&D23 35 45 55 46;D23 32 31 43 38;D12 36 47 32 48;D13 20 42 32 41;D13 37 2 48 43;D13 4 5 32 1;D13 4 3 60 5;D12 26 48 49 49;B3 4 22 57;A1 26 46 56;B7 22;B3 0 0 58;C3 47;D22 4 4 50 0;D23 22 9 37 7;A7;C2 2;} 2>/dev/null|pbcopy;exit 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    8. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Click anywhere in the Terminal window and paste by pressing command-V. The text you pasted should vanish immediately. If it doesn't, press the return key.
    9. If you see an error message in the Terminal window such as "Syntax error" or "Event not found," enter
    exec bash
    and press return. Then paste the script again.
    10. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know the password, or if you prefer not to enter it, press the key combination control-C or just press return  three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    11. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be nothing in the Terminal window and no indication of progress. Wait for the line
    [Process completed]
    to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report what happened. No harm will be done.
    12. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    13. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "You are not authorized to post." That's a bug in the forum software. Please post the test results on Pastebin, then post a link here to the page you created.
    14. This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 by Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • I have an external hard drive, from Iomega. However, I cannot copy or save any file to it. On my PC it says that is possible to read and write in it, but in my Mac, it says I can only read. can somebody help me?

    I have an external hard drive, from Iomega. that I can open and see my files. However, I cannot copy or save any file to it. On my PC I have it says that is possible to read and write in it, but in my Mac, it says I can only read. can somebody help me?
    Also, Im a photographer, so I like to name a lot of files at the same time (used to do in on PC and it was very usefull.) cannot find out how to do it on my Mac. Really appretiate if some one can give me a solution! Thanx

    Your drive is formatted with the NTFS file system.  OS X can read but not write to the NTFS file system.  There are third party drivers available that claim to add the ability to OS X to write to an NTFS partition.  I have not tried them and don't know if they work.
    The only file system that OS X and Windows can both write to natively is the FAT32 file system.

  • Can somebody help me with Siebel and Fusion Integration

    Hi,
    I want to integrate Siebel with BPEL.
    I can't use the Oracle AS adapter available for Siebel for integration purpose.
    I have to integrate using web services.
    Can somebody help me out with any document of integration BPEL with Siebel using WebServices??

    Hi,
    Find attached the link/note for integration of BPEL with Siebel, hope this will be useful
    http://download-east.oracle.com/docs/cd/B31017_01/integrate.1013/b28999/intro.htm
    Oracle® Application Server
    Adapter for Siebel User's Guide
    10g Release 3 (10.1.3.1.0)
    B28999-01
    Rgds,
    Muru

  • Can somebody help me with these errors??

    Can somebody help me get rid of these errors as it is driving me mad trying to solve it lol:
    package site;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class myBean extends HttpServlet {
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
         Connection conn = null;
          String Category;
         String Price;
         try{
             Class.forName("com.mysql.jdbc.Driver").newInstance();
         } catch(Exception e) {
             System.out.println(e);
         try{
             conn = DriverManager.getConnection
            ("jdbc:myaddress goes in here ");
           catch(SQLException se) {
             System.out.println(se);
         try{
              // Get the infor from REGISTER html from the input form
                 Category = request.getParameter("Category");
               Price = request.getParameter("MaxPrice");
    String selectSQL = "Select recording_id,artist_name, title" +  /////////////////put rest in later!!!!!!!!!!
                        "from music_recordings" + "where category = " + Category +" and Price <= " + price +";";
             Statement stmt0 = conn.createStatement();
             ResultSet rs0 = stmt0.executeQuery(selectSQL);
              List<VidBean> videos = new ArrayList<VidBean>();
    while(rs0.next()) {
        VidBean video = new VidBean();
        video.setRecId(rs0.getInd("recording_id"));
        video.setArtist(rs0.getString("artist_name"));
        video.setCategory(rs0.getString("category"));
        // ... will put the rest in here and in dql statment
    // Close the stament and database connection
             stmt.close(); }
    conn.close();
         } catch(SQLException se) {
             System.out.println(se);
    }The errors are:
    site/myBean.java:69: '(' or '[' expected
                    List<VidBean> videos = new ArrayList<VidBean>(); /// can i put t
    his as a array whats <> for??
                                                        ^
    site/myBean.java:56: 'try' without 'catch' or 'finally'
            try{
            ^
    site/myBean.java:89: illegal start of type
            } catch(SQLException se) {
              ^
    site/myBean.java:92: <identifier> expected
    ^
    site/myBean.java:97: 'class' or 'interface' expected
    ^
    site/myBean.java:98: 'class' or 'interface' expected
    ^
    6 errors

    package site;
    import java.io.*;
    import java.util.*; // added this line
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class myBean extends HttpServlet {
        public void doGet(HttpServletRequest request,
        HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            Connection conn = null;
            String Category;
            String Price;
            try{
                Class.forName("com.mysql.jdbc.Driver").newInstance();
            } catch(Exception e) {
                System.out.println(e);
            try{
                conn = DriverManager.getConnection
                ("my address goes here");
            catch(SQLException se) {
                System.out.println(se);
            try{
                Category = request.getParameter("Category");
                Price = request.getParameter("MaxPrice");
                String selectSQL = "Select recording_id,artist_name, title" +  /////////////////put rest in later!!!!!!!!!!
                "from music_recordings" + "where category = " + Category +" and Price <= " + Price +";";
                Statement stmt0 = conn.createStatement();
                ResultSet rs0 = stmt0.executeQuery(selectSQL);
                List<VidBean> videos = new ArrayList<VidBean>(); // look at finding another method instead of generic
                while(rs0.next()) {
                    VidBean video = new VidBean();
                    video.setRecId(rs0.getInd("recording_id"));
                    video.setArtist(rs0.getString("artist_name"));
                    video.setCategory(rs0.getString("category"));
                    // ... will put the rest in here and in dql statment
            } catch(SQLException se) {
                System.out.println(se);
            stmt.close();
            conn.close();
    }I tried javac -version but it just said it was an invalid option and give me the list of the possible options i could pick. using java -version it says:
    java version "1.5.0_07"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)

  • Can somebody help me on how to create Search help exit?

    I have requirement where in i have to use search help exit in search help .Based on the value in the GET parameter id i have to extract the value in the search help can somebody help me in this.

    HI
    In order to offer a meaningful input help for as many screen fields as possible, the R/3 System uses a number of mechanisms. If there is more than one such mechanism available for a field, the one that is furthest left or at the top of the above hierarchy is used.
    In addition to the options described above for defining the input help of a field in the ABAP Dictionary, you can also define it in the screen field. The disadvantage, however, is that there is no automatic reuse.
    With the screen event POV, you can program the input help of a field by yourself. You can adjust the design of the help to the standard help using the function modules F4IF_FIELD_VALUE_REQUEST or F4IF_INT_TABLE_VALUE_REQUEST. However, you should check to see if the part of the input help that you programmed yourself should be implemented as a search help exit instead (see Appendix).
    You can also attach a search help to a screen field in the Screen Painter (Module Pool programming). There are some functional restrictions on this kind of attachment as compared with attachment in the Dictionary.
    You should no longer use the input checks defined directly in the flow logic of the screen, from which it is also possible to derive input helps.
    The function Technical info is offered in the hit list in the menu of the right mouse key. It can be used to find out which of the specified mechanisms is being used.
    Check these links
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
    https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818
    check out this link, it gives step by step example of implementing search help exit.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/implementing%2bsearch%2bhelp%2bexits

  • Only the player come up when I lauch the Itunes aplication. can somebody help ?

    only the player come up when I lauch the Itunes aplication. can somebody help

    I'm not sure if the Get Album Artwork feature finds and "adds" artwork to WAV files, but if it does work, the difference is that getting artwork from the Store doesn't embed the artwork into your song file (which is what happens when you manually copy and paste artwork to the file). WAV files do not support embedded artwork.
    More here:
    http://support.apple.com/kb/TA27633?viewlocale=en_US

  • Hi, my illustrator CS5 freezes at startup. It was working properly till last friday, now i cannot open it. ¿can somebody help me?

    Hi, my illustrator CS5 freezes at startup. It was working properly till last friday, now i cannot open it. ¿can somebody help me?

    Leo,
    You may try the list (5) being less likely).
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

Maybe you are looking for