Need help with debugging PLEASE

Hi,
I'm new to Java and was given an assignment to debug a program. I am completely lost and really havent gone over most of the stuff that is in this program. I would greatly appreciate any help with this that I can get.
Here is my code:
import java.util.*;
import javax.swing.*;
public class IndexHitFrequency
private final int NUMBER_OF_SIMULATIONS = 1000;
private int indexHit[] = new int [10];
public IndexHitFrequency()
Random generator = new Random(); // for generating random number
int array[] = {6, 2, 4, 8, 5, 0, 1, 7, 3, 9 };
//convert to ArrayList and sort it
List list = new ArrayList(Arrays.asList(array));
for (int i = 0; i < NUMBER_OF_SIMULATIONS; i++)
//generate random number
int randomNumber = generator.nextInt(array.length);
// get index hit
int index = Collections.binarySearch(list, randomNumber) ;
// save index hit to array
if(index > -1)
indexHit[index]++;
}//end for
String output = "Index\tFrequency\t\n";
//append the frequency of index hit to output
for (int i = 0; i < indexHit.length; i++)
output += i + "\t" + indexHit[i] + "\t\n";
//display result
JTextArea outputArea = new JTextArea();
outputArea.setText(output);
JOptionPane.showMessageDialog(null, outputArea, "Search random number 1000 times" ,
JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}// end constructor
public static void main (String [] args)
new IndexHitFrequency();
} // end class IndexHitFrequency
I get these errors after trying to compile:
"IndexHitFrequency.java": Error #: 300 : method asList(int[]) not found in class java.util.Arrays at line 17, column 40
"IndexHitFrequency.java": Error #: 300 : method binarySearch(java.util.List, int) not found in class java.util.Collections at line 24, column 34

C:\Java\Tutorial\rem>javac IndexHitFrequency.java
IndexHitFrequency.java:15: asList(java.lang.Object[]) in java.util.Arrays cannot
be applied to (int[])
List list = new ArrayList(Arrays.asList(array));
                                ^
IndexHitFrequency.java:22: cannot find symbol
symbol  : method binarySearch(java.util.List,int)
location: class java.util.Collections
int index = Collections.binarySearch(list, randomNumber) ;
                       ^
2 errors
C:\Java\Tutorial\rem>Copied source and compiled in DOS window ( XP's cmd.exe) and got these error messages...
I think these error are more clear than the ones you posted, so this should help you resolve the problem...
- MaxxDmg...
- ' He who never sleeps... '

Similar Messages

  • I have need help with something Please respond Quickly :)

    I have need help with something Please respond Quickly  ok so i have the linksys wrt54g Version 2.2 and i upgraded the firmware to V4.21.4 from this site http://homesupport.cisco.com/en-us/wireless/lbc/WRT54G and i clicked V2.2 for the router. So after i upgraded i lost internet ability i can't use the internet so i had to downgrade back to V4.21.1 but i want the things that newer update sloves. Please Help. Everything thing says DNS error? aka Modem.
    $$Cgibbons$$

    Ya i tried that i tried restoring and redoing everything when i downgrade back to .1 it works fine though?
    $$Cgibbons$$

  • Need help with Fancybox please

    Hola
    I need some help with Fancybox.
    I bought this template and it came without facybox, so I thought
    that this will be a great help to learn some about jQuerry, but I'm lost
    Why is NOT working on my page?
    I just cannot figure this out.
    Can you please check my page?
    http://tummytime.biz/pages/portfolio_fancy.html
    I got Windows 8, Dreamweaver CC
    Thanks a lot.

    There are a couple things that could be causing a couple browsers' collective heads to implode.
    Remove the <! right before your </head> tag...
    </script>
    <!
    </head>
    <body>
    You have two calls to the fancybox css file, you only need one.
    Aside from that I'm not seeing any code problems jump out at me.
    EDIT: Ah, didn't scroll far enough. You have more than one reference to the jquery library. Typically, only one is needed and two or more will cause them all to fail. Usually, you can use the "latest" link and cover all your bases.
    If you aren't using those referenced scripts at the bottom of your page, delete them.

  • Need Help With Home Please

    If anyone here is good with Java, I need serious help with my homework, please give me your instant messenger screen name and we can chat, thanks alot!!
    Angela

    I don't understand how people get themselves into
    these situations as school, if you don't want to learn
    it don't sign up for the class.....You never got yourself into this situation.... I think everyone has on occassion.
    My very first "serious" university program was to solve a second order, non-linear differential equation using the Runge-Kutta method. This is NOT the easy way to learn a computer language and I have to admit I did take "shortcuts" using more experienced people than me.
    That was before the web though...
    God am I really that old?

  • HT3702 need help with purchase please!!!

    My husband mistakenly hit the purchase button las night for an apple app and now it has been taken out of our account, but was deleted off the phone as soon has he realized that he hit the purchase button how do we get a refund please we need HELP!!!

    All sales are final
    You can try contacting itunes and asking for an exception

  • I need help with this please

    javax.servlet.ServletException
    at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595)
    at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537)
    at jsp.addservice._jspService(addservice.jsp:515)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:847)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:229)
    at mil.usmc.m4l.servlets.M4LServlet.forward(M4LServlet.java:34)
    at mil.usmc.m4l.servlets.EditService.doGet(EditService.java:120)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at mil.usmc.m4l.filters.M4LCMSFilter.doFilter(M4LCMSFilter.java:150)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Edited by: user11237193 on Apr 27, 2010 10:58 AM
    I am getting error and I ned help with it Thank you for your help.

    I'd enter the dell service tags in here to find out what OS the pc was designed for.
    http://www.dell.com/support/contents/us/en/19/Category/Product-Support/Self-support-Knowledgebase/locate-service-tag?~ck=mn
     For windows I'd ask over here.
    http://answers.microsoft.com/en-us/windows
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • New to itunes and need help with library please

    some of my albums have various artists. i cant get them to show up as 1 album it shows as an album for every song. can anyone help me please?
    another problem i am having is my album artwork does not show up when I insert a cd to rip. I am also having trouble with the itunes suddenly getting all garbled up so i cant even see the screen untill I close itunes and open it back up. grrrr!! i sold my Zune to get this ipod touch and am wondering if I have made a mistake.
    thanks for any help you can give me
    Carri

    according to you we are on the same page here. When you rip a regular cd into itunes, it does not have the album artwork engrained into the song file. This is just an example, Say you ripped a Metallica cd into itunes such as "Master of Puppets." The song on the album "Disposable Heroes" will not have the album artwork with it.
    You need to get an apple account, just go to the itunes store and sign up. After you do that you can click on one of the songs from the album you ripped. Right click it, and go to the choice "get album artwork". itunes will automatically modify the artwork for all the songs on that album. That is it. I may have a post later on your other problems. Ask me if you don't fully understand what i said.

  • I need help with hyperlink PLEASE!!!!!!!

    I hope somebody can help me with this question. I create some
    button in flash 8. My web page is divided in three frames( using
    the frame tag), two rows and the second row has two colums. My
    question is how can i make one of my buttons to open a new web page
    but in a different frame. The button is in column number 1 of row 2
    and when the user click this button i want that this new page open
    in column number 2 of row 2. How can ia do that? please help
    me

    valla23 wrote:
    > I hope somebody can help me with this question. I create
    some button in flash
    > 8. My web page is divided in three frames( using the
    frame tag), two rows and
    > the second row has two colums. My question is how can i
    make one of my buttons
    > to open a new web page but in a different frame. The
    button is in column number
    > 1 of row 2 and when the user click this button i want
    that this new page open
    > in column number 2 of row 2. How can ia do that? please
    help me
    Always best to google before posting, especially if you
    urgent to meet deadline.
    Forum archives:
    http://groups.google.com/advanced_group_search?q=group:macromedia.flash.*&hl=en&lr=&ie=UTF -8
    Search "flash in frames"
    the very second result, so happen to be from me, exhaling
    exactly how to set it up.
    http://groups.google.com/group/macromedia.flash/browse_thread/thread/6b0047b0a65be8a0/9f8f c0765bf2297e?lnk=st&q=&rnum=2&hl=en#9f8fc0765bf2297e
    Personally posted that couple of hundreds of times in past 8
    years.
    Please try to utilize the search before posting so we don't
    need to hammer same
    topic over and over and over and over and over .....again...
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Need help with dates  please-urgent

    Hi folks, please help me with this if you can.
    I run a weekly job, and need to have my java code create and use 2 dates to capture data for the whole week.
    begin_date mm/dd/yyyy (String) to be 7 days prior to current date
    end_date mm/dd/yyyy (String) to be the currecnt date
    Note: please take into account the cases where the CURRENT_DATE is the first week of the month. As a result the 7 days prior will fall into the previous month. i.e if end_date="06/04/2003" then the begin_date will be "05/29/2003 Thanks a bunch

    http://java.sun.com/j2se/1.4.1/docs/api/index.html
    See the Calendar and DateFormat classes.

  • Need Help with Printer Please

    I am a new MAC user. So please, if you have a solution for me, speak slowly. (LOL)
    I have the new G5. Bought the Epson printer to go with it. It's the CX4200.
    I loaded the software for it. But can't get it to print. It seems the computer won't or can't find it in their list of printers.
    Ok, so I go to a Word Doc., for example. And select print. The window says that I need to select a printer. I hit the arrow down button and there's my printer listed. So I choose that, but still won't print. Seems I have to go down to another line in the same box and find the printer in this long list. There are many Epsons listed but not mine, which is the CX4200.
    And darn-it, tech support on the phone is closed at 6pm!!!??? I sure hope to see a reply soon. I really need to print something tonight.
    Thanks for any help you can provide.
    My personal e-mail is
    [email protected]
    Thanks!
    Cary
    PS: This process asked me to choose an OS for my G5. I have no idea what my OS is. All's I know is I have a G5. Gosh, I feel soooo dumb!

    What have you done so far?
    I suggest you connect it via a usb  cable first.  Once you get the printer working, move to wifi.  You will have to use an existing printer usb cable or purchase a cable.  Be sure to get the correct cable.  Ask for help.
    The warrenty indicates there is phone support.  Give HP a call.
    Warranty
    One-year limited hardware warranty; 24-hour, 7 days a week phone support
    Robert

  • Need help with Program Please!

    // Name: John Weir 02/03/2006
    Please read the comments as they will explain what help I need.
    All help greatly appreciated! Am new to working with GUI.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class FeverDiagnosis extends JFrame
         // diagnoisis constants
         private final String MENIGITIS = "menigitis";
         private final String DIGESTIVE_TRACT_INFECTION = "digestive tract infection";
         private final String PNEUMONIA_OR_AIRWAYS_INFECTION  ="pneumonia or airways infection";
         private final String VIRAL_INFECTION = "viral infection";
         private final String THROAT_INFECTION = "throat infection";
         private final String KIDNEY_INFECTION = "kidney infection";
         private final String URINARY_INFECTION = "urinary tract infection";
         private final String SUNSTROKE_OR_HEAT_EXHAUSTION = "sunstroke or heat exhaustion";
         // symptom constants
         private final String FEVER = "fever";
         private final String COUGHING = "coughing";
         private final String HEADACHE = "headache";
         private final String BREATHING_WITH_DIFFICULTY = "shortness of breath, wheezing, or coughing up phlegm";
         private final String ACHING_BONES_JOINTS = "aching bones or joints";
         private final String RASH = "rash";
         private final String SORE_THROAT = "sore throat";
         private final String BACK_PAIN_AND_CHILLS_AND_FEVER = "back pain just above the waist with chills and fever";
         private final String URINARY_DIFFICULTY = "pain urinating or are urinating more often";
         private final String TOO_MUCH_SUN = "sun overexposure due to spending the day in the sun or in hot conditions";
         public final String VOMITING_OR_DIARRHEA = "vomitting spell or diarrhea";
         private final String MENIGITIS_POSSIBILITIES =
                          "pain when bending your head forward,\n"
                        + "    nausea or vomiting, eye ache from \n"
                        + "    bright lights, drowsiness or confusion";
         // GUI varibles
         private JTextArea textArea;
         private JFrame theFrame;
         private JLabel stuff2;
         private JButton b1;
         private JButton b2;
         // instance variable
         private String symptoms = "";
         private Scanner cin = new Scanner (System.in);
         char response;
         String input;
         public FeverDiagnosis()
              JFrame.setDefaultLookAndFeelDecorated(true);
              JFrame theFrame = new JFrame("John Weir");
              theFrame.setSize(650, 400);
              Dimension frameSize = theFrame.getSize();
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              theFrame.setLocation((screenSize.width - frameSize.width)/2,(screenSize.height - frameSize.height)/2);
              theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container contentPane = theFrame.getContentPane();
              theFrame.getContentPane().setLayout(new FlowLayout());
              JLabel stuff2 = new JLabel("Test");
              textArea = new JTextArea(12,50);
              textArea.setEditable(true);
              textArea.setBackground(Color.black);
              textArea.setForeground(Color.green);
              textArea.setFont(new Font("Serif", Font.ITALIC, 16));
              textArea.setLineWrap(true);
              textArea.setWrapStyleWord(true);
              b1 = new JButton("Yes");
              b2 = new JButton("No");
              contentPane.add(stuff2);
              contentPane.add(new JScrollPane(textArea));
              contentPane.add(b1);
              b1.setEnabled(true);
              contentPane.add(b2);
              b2.setEnabled(true);
              ActionListener l = new ActionListener()
                public void actionPerformed(ActionEvent e)
                   if((e.getSource() == b1))
                   //   HELP NEEDED
                   //   NEED BUTTON TO PASS
                   //   STRING VALUE "Y" TO
                   //   METHOD: have(String s)
                   input.equals("y");
                   else
                   if((e.getSource() == b2))
              b1.addActionListener(l);
              b2.addActionListener(l);
              theFrame.setVisible(true);
              theRules();
    public void theRules()
         displayNote();
         if (! have(FEVER) )
              displayUnsure();
         else
         if(are(COUGHING))
              if( are(BREATHING_WITH_DIFFICULTY))
                   addSymptom( PNEUMONIA_OR_AIRWAYS_INFECTION );
                   displayDiagnosis(PNEUMONIA_OR_AIRWAYS_INFECTION);
              }else
              if(have(HEADACHE))
                   addSymptom( VIRAL_INFECTION );
                   displayDiagnosis(VIRAL_INFECTION);
              }else
              if(have(ACHING_BONES_JOINTS))
                   addSymptom( VIRAL_INFECTION );
                   displayDiagnosis(VIRAL_INFECTION);
              }else
              if(have(RASH))
                   displayUnsure();
              }else
              if(have(SORE_THROAT))
                   addSymptom( THROAT_INFECTION );
                   displayDiagnosis(THROAT_INFECTION);
              }else
              if(have(BACK_PAIN_AND_CHILLS_AND_FEVER))
                   addSymptom( KIDNEY_INFECTION );
                   displayDiagnosis(KIDNEY_INFECTION);
              }else
              if(have(URINARY_DIFFICULTY))
                   addSymptom( URINARY_INFECTION );
                   displayDiagnosis(URINARY_INFECTION);
              }else
              if(have(TOO_MUCH_SUN))
                   addSymptom( SUNSTROKE_OR_HEAT_EXHAUSTION );
                   displayDiagnosis(SUNSTROKE_OR_HEAT_EXHAUSTION);
              }else
                   displayUnsure();
              else
              if(have(HEADACHE))
                   addSymptom(VIRAL_INFECTION);
                   displayDiagnosis(VIRAL_INFECTION);
              }else
              if(are(MENIGITIS_POSSIBILITIES))
                   addSymptom( MENIGITIS );
                   displayDiagnosis(MENIGITIS);
              }else
              if(are(VOMITING_OR_DIARRHEA))
                   addSymptom( DIGESTIVE_TRACT_INFECTION );
                   displayDiagnosis(DIGESTIVE_TRACT_INFECTION);
              }else
              displayUnsure();
         public void displayNote()
              textArea.append("\n\n"
                   + "Fever Diagnostic Tool\n"
                   + "---------------------\n\n"
                   + "Please note that this program performs no true diagnostic activity.\n"
                   + "No decisions should be made based upon the tool's analysis. If users\n"
                   + "have a fever, they should contact their doctor.\n\n");
         public boolean have(String s)
              // prompt and extract
              textArea.append("Do you have you " + s + " (y, n): " + "\n");
              // NEED BUTTON TO PASS STRING  FROM ActionPerformed
              // AND HAVE IT RETURNED AS A CHAR RESPONCE!
              input = cin.nextLine();
              response = (char) Character.toLowerCase(input.charAt(0));
              while ( (response != 'y') && (response != 'n') )
                   textArea.append("Are you " + s + " (y, n): " + "\n");
                   input = cin.nextLine();
                   response = (char) Character.toLowerCase(input.charAt(0));
              textArea.append("");
              return response == 'y';
         private boolean are(String s)
              textArea.append("Are you " + s + " (y, n): " + "\n");
              input = cin.nextLine();
              char response = (char) Character.toLowerCase(input.charAt(0));
              while ( (response != 'y') && (response != 'n') )
                   textArea.append("Are you " + s + " (y, n): " + "\n");
                   input = cin.nextLine();
                   response = (char) Character.toLowerCase(input.charAt(0));
              textArea.append("");
              return response == 'y';
         public void addSymptom(String s)
              symptoms += "*   " + s + "\n";
         public void displayDiagnosis(String diagnosis)
              textArea.setText("");
              textArea.append("\nSymptoms:\n" + symptoms + "\n" + "Diagnosis"
                   + "\n   Possibilities include " + diagnosis  + "\n");
              textArea.append("\n");
              //System.exit(0);
         public void displayUnsure()
              textArea.append("\nInsufficient information to make a diagnosis" + "\n");
              textArea.append("\n");
              //System.exit(0);
         public static void main(String[] args)
              new FeverDiagnosis();
    }

    If you're looking to use a JTextArea as a console you can use these two classes
    you are free to use and modify these classes but please do not change the package or take credit for it as your own work.
    TextAreaReader.java
    =================
    * Created on Jul 7, 2005 by @author Tom Jacobs
    package tjacobs;
    import java.awt.TextArea;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.event.TextEvent;
    import java.awt.event.TextListener;
    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.Reader;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    public class TextAreaReader extends Reader implements KeyListener {
         JTextArea mJArea;
         TextArea mAWTArea;
         Object mKeyLock = new Object();
         Object mLineLock = new Object();
         String mLastLine;
         int mLastKeyCode = 1;
         public TextAreaReader(JTextArea area) {
              super();
              mJArea = area;
              mJArea.addKeyListener(this);
         public TextAreaReader(TextArea area) {
              super();
              mAWTArea = area;
              mAWTArea.addKeyListener(this);
         public void keyPressed(KeyEvent ke) {
              mLastKeyCode = ke.getKeyCode();
              synchronized(mKeyLock) {
                   mKeyLock.notifyAll();
              if (ke.getKeyCode() == KeyEvent.VK_ENTER) {
                   if (mJArea != null) {
                        String txt = mJArea.getText();
                        int idx = txt.lastIndexOf('\n', mJArea.getCaretPosition() - 1);
                        mLastLine = txt.substring(idx != -1 ? idx : 0, mJArea.getCaretPosition());//txt.length());
                        synchronized(mLineLock) {
                             mLineLock.notifyAll();
                   else {
                        String txt = mAWTArea.getText();
                        int idx = txt.lastIndexOf('\n', mAWTArea.getCaretPosition() - 1);
                        mLastLine = txt.substring(idx != -1 ? idx : 0, mAWTArea.getCaretPosition());//txt.length());
                        synchronized(mLineLock) {
                             mLineLock.notifyAll();
         public void keyReleased(KeyEvent ke) {
         public void keyTyped(KeyEvent ke) {
         public int read(char[] arg0, int arg1, int arg2) throws IOException {
              throw new IOException("Not supported");
         public String readLine() {
              synchronized(mLineLock) {
                   try {
                        mLineLock.wait();
                   catch (InterruptedException ex) {
              return mLastLine;
         public int read() {
              synchronized(mKeyLock) {
                   try {
                        mKeyLock.wait();
                   catch (InterruptedException ex) {
              return mLastKeyCode;
         public void close() throws IOException {
              // TODO Auto-generated method stub
         public static void main(String args[]) {
              JFrame f = new JFrame("TextAreaInput Test");
              JTextArea area = new JTextArea();
              final TextAreaReader tar = new TextAreaReader(area);
              f.add(area);
              Runnable r1 = new Runnable() {
                   public void run() {
                        while (true) {
                             int code = tar.read();
                             System.out.println("read: " + code);
              Runnable r2 = new Runnable() {
                   public void run() {
                        while (true) {
                             String line = tar.readLine();
                             System.out.println("read line: " + line);
              Thread t1 = new Thread(r1);
              Thread t2 = new Thread(r2);
              t1.start();
              t2.start();
              f.setBounds(100, 100, 200, 200);
              f.setVisible(true);
         public InputStream toInputStream() {
              return new MyInputStream();
         private class MyInputStream extends InputStream {
              public int read() {
                   return TextAreaReader.this.read();
    ==================
    TextAreaOutputStream
    ==================
    * Created on Mar 13, 2005 by @author Tom Jacobs
    package tjacobs;
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.swing.JTextArea;
    import javax.swing.text.JTextComponent;
    public class TextAreaOutputStream extends OutputStream {
         public static final int DEFAULT_BUFFER_SIZE = 1;
         JTextArea mText;
         byte mBuf[];
         int mLocation;
         public TextAreaOutputStream(JTextArea component) {
              this(component, DEFAULT_BUFFER_SIZE);
         public TextAreaOutputStream(JTextArea component, int bufferSize) {
              mText = component;
              if (bufferSize < 1) bufferSize = 1;
              mBuf = new byte[bufferSize];
              mLocation = 0;
         @Override
         public void write(int arg0) throws IOException {
              //System.err.println("arg = "  + (char) arg0);
              mBuf[mLocation++] = (byte)arg0;
              if (mLocation == mBuf.length) {
                   flush();
         public void flush() {
              mText.append(new String(mBuf, 0, mLocation));
              mLocation = 0;
              try {
                   Thread.sleep(1);
              catch (Exception ex) {}
    }

  • AE "newbie" needs help with effect - (please!)

    Hi all:
    I'm working on a highlight video of my daughter - she's the goalie for her H.S. Lacrosse team.  I recently bought the Creative Cloud subscription. I'm editing the video in Premiere Pro CC on an iMac - OSX 10.7.5.
    I'm putting together a short intro/open, and trying to add some effect to my daughter in the clip shown below.  She is running/jumping - I want to be able to isolate just her and add some sort of color effect, a glow (or even just make everything else b&w).  Obviously, my problem is with masking or roto brushing.  I've spent many hours (probably too many!) watching tutorials and reading the help articles -- and I just can't seem to get it right.  I saw a video talking about the much anticipated October update - and wondering if the new Mask Tracker will do what I need/want?
    Here is the clip - (my daughter is #11 - the only one wearing a helmet)
    Thanks in advance for any guidance/help/suggestions you can provide,
    Kim

    Thanks again for pointing me in the direction of the Motion Tracking and Rotoscoping tutorial.
    I successfully (in my opinion, anyway!) was able to apply an effect to the moving object (my daughter ).  There are a few places that I could tighten up the mask, but it's not too bad - and I just realized I forgot to feather the mask - so that will help as well.
    I tried a bunch of different effects -- but really wasn't happy with any of them.  I went ahead and just made her B&W just for illustrative purposes.
    What I'd really like to do is make the background B&W and keep her in color.
    I tried applying the B&W effect onto the footage layer -- but it seemed to make everything b&w - including my masked/rotoscoped object. I am sure that it is very simple to do -- but haven't been able to find the right instructions.
    (I looped the clip a few times - since it is only about 1.5 seconds long)..
    So - again - thanks in advance for helping me figure out how to apply the B&W to just the background!
    Kim

  • Need help with rule, please. Want to calculate a sum of an accountlist...

    Hello all,
    i created some accountlists for accountclasses:
    "Kontenklasse_2" is one of my accountlists and it contains all accounts wich begin with a 2 or H2.
    So i have an account called "sum_kokl2" and for this i want to calculate the sum of all accounts included in my accountlist "Kontenklasse_2" but i don´t know how.
    I hope someone can help me, many thanks in advance.
    Martin
    Edited by: user7324125 on 21.01.2010 17:06

    Hello kostasn,
    thanks for you post, i tried it but it doesn´t work.
    I am sure that my memberlists are accurate, if i use one in my data grid, i gett all correct accounts which must be in the selected accountlist.
    Perhaps the difficulty is where i want to calculate the sum. I try to describe more detailed:
    I have an entity structure for our companies, for each parent of my entity structure i need a sum of all accounts which begin with a 2. So i wrote an accountlist which include all these accounts and named it "Kontenklasse_2". I try your written code and change the necessary parts. For this accountlist i only use the custom2 dimension all other is None. I don´t use ICP. The calculated account is named sum_kokl2 but neither my base entities nor the parent entities show me any values on the account sum_kokl2. So i think somewhere i forgot an important line in my rulefile.
    Perhaps do you have another idea where is my bug? I´m happy for every help and idea.
    Many thanks for every help in advance.
    Kind regards / Best wishes
    Martin
    Btw my used Version is HFM Version 11.1.1.3, i used EPMA-Applications, the Windows-Client is installed to use the rules editor and SmartView 11 is already installed.

  • I'm failing to get a Javascript to run in Firefox that runs great in IE...need help with debugging.

    I'm getting the error below but don't know what to do about it since I can't code Javascript. As I state before, IE runs this code just fine...I can't figure out why Firefox won't let it run. This cascading menu .js is just what I need for a charity website I'm helping to set up. The html portion is also shown below the .js
    Error: menu is undefined
    Source File: file:///C:/Documents%20and%20Settings/Ray/My%20Documents/ECCHS_Website/CascadeMenu.js
    Line: 8
    Here's the code for CascadeMenu.js
    <pre><nowiki> function InitMenu()
    var bar = menuBar.children
    for(var i=0;i < bar.length;i++)
    var menu=eval(bar[i].menu)
    menu.style.visibility = "hide"
    bar[i].onmouseover = new Function ("ShowMenu("+bar[i].id+")")
    var Items = menu.children
    for(var j=0; j<Items.length; j++)
    var menuItem = eval(Items[j].id)
    if(menuItem.menu != null)
    menuItem.innerHTML += "<Span Id="+menuItem.id+"_Arrow class='Arrow'>4</Span>"
    //var tmp = eval(menuItem.id+"_Arrow")
    // tmp.style.pixelLeft = menu.getBoundingClientRect().Right //- tmp.offsetWidth - 15
    FindSubMenu(menuItem.menu)}
    if(menuItem.cmd != null)
    menuItem.onclick = new Function("Do("+menuItem.id+")") }
    menuItem.onmouseover = new Function("highlight("+Items[j].id+")")
    function FindSubMenu(subMenu)
    var menu=eval(subMenu)
    var Items = menu.children
    for(var j=0; j<Items.length; j++)
    menu.style.visibility = "hidden"
    var menuItem = eval(Items[j].id)
    if(menuItem.menu!= null)
    menuItem.innerHTML += "<Span Id="+menuItem.id+"_Arrow class='Arrow'>4</Span>"
    // var tmp = eval(menuItem.id+"_Arrow")
    //tmp.style.pixelLeft = 35 //menuItem.getBoundingClientRect().right - tmp.offsetWidth - 15
    FindSubMenu(menuItem.menu)
    if(menuItem.cmd != null)
    menuItem.onclick = new Function("Do("+menuItem.id+")") }
    menuItem.onmouseover = new Function("highlight("+Items[j].id+")")
    function ShowMenu(obj)
    HideMenu(menuBar)
    var menu = eval(obj.menu)
    var bar = eval(obj.id)
    bar.className="barOver"
    menu.style.visibility = "visible"
    menu.style.pixelTop = obj.getBoundingClientRect().top + obj.offsetHeight + Bdy.scrollTop
    menu.style.pixelLeft = obj.getBoundingClientRect().left + Bdy.scrollLeft
    function highlight(obj)
    var PElement = eval(obj.parentElement.id)
    if(PElement.hasChildNodes() == true)
    { var Elements = PElement.children
    for(var i=0;i<Elements.length;i++)
    TE = eval(Elements[i].id)
    TE.className = "menuItem"
    obj.className="ItemMouseOver"
    window.defaultStatus = obj.title
    ShowSubMenu(obj)
    function Do(obj)
    var cmd = eval(obj).cmd
    window.navigate(cmd)
    function HideMenu(obj)
    if(obj.hasChildNodes()==true)
    var child = obj.children
    for(var j =0;j<child.length;j++)
    if (child[j].className=="barOver")
    {var bar = eval(child[j].id)
    bar.className="Bar"}
    if(child[j].menu != null)
    var childMenu = eval(child[j].menu)
    if(childMenu.hasChildNodes()==true)
    HideMenu(childMenu)
    childMenu.style.visibility = "hidden"
    function ShowSubMenu(obj)
    PMenu = eval(obj.parentElement.id)
    HideMenu(PMenu)
    if(obj.menu != null)
    var menu = eval(obj.menu)
    menu.style.visibility = "visible"
    menu.style.pixelTop = obj.getBoundingClientRect().top + Bdy.scrollTop
    menu.style.pixelLeft = obj.getBoundingClientRect().right + Bdy.scrollLeft
    if(menu.getBoundingClientRect().right > window.screen.availWidth )
    menu.style.pixelLeft = obj.getBoundingClientRect().left - menu.offsetWidth
    ///////////////////CascadedDropdown Menu/////////////////
    //Date : 08/09/2001 //
    //Version : 1.0 //
    //Author Mr.Arun N Kumar //
    //EMail: [email protected] //
    // Modifications on this code is not recomended
    // Suggestions are welcome
    <html>
    <head>
    <link href="CascadeMenu.css" rel="stylesheet">
    <script language="javascript" src="CascadeMenu.js">
    </script>
    </head>
    <body OnLoad="InitMenu()"
    Onclick="HideMenu(menuBar)" ID="Bdy"
    bgColor=aliceblue>
    <font color="#6B8174"><b> East Contra Costa
    Historical<br>Society Content Menus</b></font><div
    align="center">
    <DIV Id="menuBar" class="menuBar" >
    <DIV Id="Bar1" class="Bar" menu="menu1">Menu
    #1</DIV>
    <DIV Id="Bar2" class="Bar" menu="menu2">Menu
    #2</DIV>
    <DIV Id="Bar3" class="Bar" menu="menu3">Menu
    #3</DIV>
    <DIV Id="Bar4" class="Bar" menu="menu4">Menu
    #4</DIV></center>
    </DIV>
    <!--MenuItem Definition -->
    <div Id="menu1" class="menu" >
    <div Id="menuItem1_1" class="menuItem"
    menu="menu6">SubMenu
    #1</div>
    <div Id="menuItem1_2" class="menuItem"
    title="JavaScripts"
    cmd="http://javascript.internet.com/">JavaScript
    Source</div>
    <div Id="menuItem1_3" class="menuItem"
    title="WDVL"
    cmd="http://www.wdvl.com">WDVL</div>
    </div>
    <div Id="menu2" class="menu">
    <div Id="menuItem2_1" class="menuItem">Page
    #1</div>
    <div Id="menuItem2_2" class="menuItem">Page
    #2</div>
    <div Id="menuItem2_3" class="menuItem">Page
    #3</div>
    </div>
    <div Id="menu3" class="menu">
    <div Id="menuItem3_1" class="menuItem">Page
    #1</div>
    <div Id="menuItem3_2" class="menuItem">Page
    #2</div>
    <div Id="menuItem3_3" class="menuItem">Page
    #3</div>
    <div Id="menuItem3_4" class="menuItem"
    menu="menu5">SubMenu
    #4</div>
    </div>
    <div Id="menu4" class="menu">
    <div Id="menuItem4_1" class="menuItem">Page
    #1</div>
    <div Id="menuItem4_2" class="menuItem">Page
    #2</div>
    <div Id="menuItem4_3" class="menuItem">Page
    #3</div>
    <div Id="menuItem4_4" class="menuItem">Page
    #4</div>
    </div>
    <div id="menu5" class="menu">
    <div Id="menuItem5_1" class="menuItem">Page
    #4-1</div>
    <div Id="menuItem5_2" class="menuItem">Page
    #4-2</div>
    <div Id="menuItem5_3" class="menuItem">Page
    #4-3</div>
    </div>
    <div id="menu6" class="menu">
    <div Id="menuItem6_1" class="menuItem">Page
    #1-1</div>
    <div Id="menuItem6_2" class="menuItem">Page
    #1-2</div>
    <div Id="menuItem6_3" class="menuItem"
    menu="menu7">SubMenu
    #1-1</div>
    </div>
    <div id="menu7" class="menu">
    <div Id="menuItem7_1" class="menuItem">Page
    #1-1-1</div>
    <div Id="menuItem7_2" class="menuItem">Page
    #1-1-2</div>
    <div Id="menuItem7_3" class="menuItem">Page
    #1-1-3</div>
    </div><!-- End of Menu --><br>
    </body>
    </html></nowiki></pre>

    I found a download of Cascade Menu with files from 2001. I also found a discussion thread as of 2006 indicating problems with the script in Firefox as of that time ([http://www.webdeveloper.com/forum/archive/index.php/t-94019.html Menubar Script problem in FireFox [Archive] - WebDeveloper.com]). The web and web browsers have changed a lot during the past decade, so you might find it more efficient to get a new menu script than to fix this old one. (It might not even work in IE9 any more...)

  • Need help with syncing, PLEASE

    Need to sync 2 iphones (one a 4g other a 3g) each one to a separate computer (wife's desktop with win 7, I have a laptop win vista) and I have only one itune account. I would like to be able to sync all apps to each phone, BUT I only want to sync her contact/address book to hers and only my contacts /address book to my phone.
    Is it POSSIBLE?
    Any suggestion and help will be appreciated...
    Don

    Since all 3rd party apps are available in the iTunes library on your computer and you are sharing the same iTunes account, she can sync iTunes content only with iTunes on your computer - music, movies, tv shows, and 3rd party apps without syncing contacts with a supported address book application on your computer. She won't have sync contacts selected under the Info tab for her iPhone sync preferences with iTunes on your computer. She can sync contacts only with a supported address book application on her computer. She won't have Sync Music, Sync Movies, Sync TV Shows, and Sync Apps under these tabs for her iPhone sync preferences with iTunes on her computer.

Maybe you are looking for

  • E71 update firmware 400.21.013 didn't fix the came...

    I already update the firmware to 400.21.013 with hope this will fix the camera problem with purple tint and quality more better. After update i'm really disappointed because the purple tint is there and the picture quality still worst. E71-1 (26), RM

  • Rpd offline make changes and start services but subjectarea not modified

    hi im stop the services and open rpd in offline mode and make some changes and save and close start services and in analytics the values are not modified i cant open in online mode my server in linux and im using client rpd is located in clientside i

  • I believe I have a security issue with Firefox blocking a page that I need access to.

    On my laptop ONLY, I can't get access to the page on my bank's website to pay bills. It will let me log in and view the page that shows the amount in my accounts. In order to get full access, I am required to type in the answer to my "Login Security"

  • Setting the classpath

    doing a jsp page which calls for: <%@ page import="java.sql.*" %> <%@ page import="javax.sql.*" %> <%@ page import="sun.jdbc.rowset.*" %> <%@ page import="java.util.*;" %> at the top of the page , so i downloaded the jar files that i needed and set t

  • Storedge 3310 and format

    hi, i have the following problem: a storedge 3310 with raid controller. i have partitioned the volume ( which consists of 6 raid 1 logical drives) into 4 partions and assigned luns to these partitions. probe-scsi-all shows the following: /pci@1e,6000