Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 44,683 points

mchl_the_citizen

Favorite Answers22%
Answers786

M.Ed., MSCIS, A+ Certification

  • I can t get the following code to show anything after inputting and clicking the button that appears.I can t find a reason why. Any help?

    Here is part one of the code. It sets up the website and asks for Javascript to enact.

    <!DOOCTYPE HTML>

    <HTML lang="en">

    <HEAD>

    <TITLE>Webville Tunes</TITLE>

    <meta charset = "utf-8">

    <script src="playlist.js"></script>

    <link rel="stylesheet" type="text/css" href="playlist.css">

    </HEAD>

    <BODY>

    <form>

    <input type="text" id="songTextInput" size="40" placeholder="Song name">

    <input type="button" id="addButton" value="Add Song">

    </form>

    <ul id="playlist">

    </ul>

    </BODY>

    </HTML>

    Here is the JavaScript on a second page:

    window.onload = init;

    function init() {

    var button = document.getElementById("addButton");

    button.onclick = handleButtonClick;

    }

    function handleButtonClick() (

    var textInput = documentgetElementByID("songTextInput");

    var songName = textInput.value;

    var node = document.createElement("LI");

    var textnode = document.createTextNode("Blue Suede Shoes");

    node.appendChild(textnode);

    document.getElementByID("playlist").appendChild(node);

    li.innerHTML = songName;

    var ul = document.getElementById("playlist");

    ul.appendChild(li);

    }

    Any help would be great!

    2 AnswersProgramming & Design4 years ago
  • I need to create a business card for teaching technical ESL as well as presentations for people. What would be some good business names?

    I have Masters degrees in both areas and have experience in both computer science and teaching technical English as a second language. Any suggestions for a company name?

    1 AnswerOther - Business & Finance6 years ago
  • What is wrong with my Toshiba refrigerator?

    I have a 3-year-old french-styled Toshiba refrigerator that leaks water on the front left corner, but only occasionally. I have checked all seals, wiped them down, but still can't find the source of the problem. Any suggestions?

    4 AnswersMaintenance & Repairs8 years ago
  • What are the best Twitter abbreviations and what do they mean?

    When you 'tweet' someone, what hieroglyphic tools are at your disposal to use? When do you use them and why?

    1 AnswerOther - Computers9 years ago
  • What gadgets do you think will be most popular in 2013?

    I am researching new market trends that are likely to produce more gadgets in 2013. Efficiency, especially in terms of how we run our daily lives, is essential here. I have looked at websites such as Kickstart.com and have gotten a few good ideas, but would like any more suggestions. This is NOT a homework assignment. I am looking for investmentts.

    1 AnswerOther - Business & Finance9 years ago
  • I am confused about the "toBinaryString()" method in Java.?

    Here is an example of some simple code:

    import static java.lang.Integer.toBinaryString;

    public class BitwiseOps {

    public static void main(String[] args){

    int indicators = 0b1111_0000_0010_1111;

    int selectBit3 = 0b000_0011_1111_1110;

    // Try the bitwise AND to select the third bit in indicators

    System.out.println("indicators = " + toBinaryString(indicators));

    System.out.println("selectBit3 =" + toBinaryString(selectBit3));

    indicators &= selectBit3;

    System.out.println("indicators & selectBit3 = " + toBinaryString(indicators));

    // Try the biwise OR to switch the third bit

    int indicators = 0b1111_0000_0010_1111;

    System.out.println("\nindicators = " + toBinaryString(indicators));

    System.out.println("selectBit3 = " + toBinaryString(selectBit3));

    // Try the bitwise OR to switch the third bit on

    indicators |= selectBit3;

    System.out.println("indicators | selectBit3 = " + toBinaryString(selectBit3));

    // Now switch the third bit off again

    indicators &= -selectBit3;

    System.out.println("\nThe third bit in the previous value of integraters has been turned"

    + "off = " + toBinaryString(indicators));

    System.out.println("indicators | selectBit3 = " + toBinaryString(selectBit3));

    }

    }

    I always get an error with the original declaration of "int indicators". Netbeans 7.2, which I have used to run this code, says that it does not support this type of declaration. Is there any type of workaround or solution? What am I doing wrong?

    2 AnswersProgramming & Design9 years ago
  • What are the best dog foods (kibble)?

    I have a Shetland Sheepdog that we have been feeding Hills' Science Diet to since he was a puppy. He has a pedigree and is naturally over-sized. He is also 5 years and six months old. He has grown tired of Science Diet and we can't afford canned or straight meat for him. What do you suggest?

    12 AnswersDogs9 years ago
  • Where can I get drivers for an outdated NEC computer?

    I just finished a clean installation of a LaVie LL350/9 computer from Windows XP Home (Japanese) to Windows XP Professional English with Service Pack 3. However, I have misplaced the original installation CD and need to find drivers for the VGA monitor and Ethernet Controller. Can anyone help me with this problem? I have checked several NEC Japanese websites to no avail. There has to be a solution. Can anyone help?

    1 AnswerLaptops & Notebooks9 years ago
  • What am I doing wrong with this Java program?

    I need to generate a series of random capital characters that are not vowels. I have created the following code but the compiler (Netbeans 6.9) always gives me the following error:

    Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - illegal start of expression

    This error refers the first 'if' statement in the code. The rest of it appears to be OK. Here is the code:

    public class RandomStringGenerator {

    public static void main(String[] args) {

    char symbol = 'A';

    symbol = (char)(128.0*Math.random());

    if (symbol > 'A' ?? symbol <= 'D' ) {

    System.out.println("Here is the letter: " + symbol);

    } else if (symbol>= 'F' && symbol <= 'H'){

    System.out.println("Here is the letter: " + symbol);

    } else if (symbol >= 'J' && symbol <= 'N') {

    System.out.println("Here is the letter: " + symbol);

    } else if (symbol >= 'P' && symbol <= 'D') {

    System.out.println("Here is the letter: " + symbol);

    } else if (symbol>= 'B' && symbol <= 'D') {

    System.out.println("Here is the letter: " + symbol);

    } else {

    System.out.println("The program only generated a vowels. Please try again.");

    }

    }

    }

    Can anyone tell me what I am doing wrong?

    3 AnswersProgramming & Design1 decade ago
  • I need to make a graph in Java that will output data about book sales on Amazon. Help, please!?

    I have found the following base program from Ian Darwin:

    package org.me.mylib;

    /**

    *

    * @author Ian Darwin

    */

    import java.awt.Dimension;

    import java.awt.Graphics;

    import java.awt.geom.Point2D;

    import java.io.IOException;

    import java.io.InputStreamReader;

    import java.util.ArrayList;

    import java.util.List;

    import javax.swing.JFrame;

    import javax.swing.JPanel;

    //import com.darwinsys.util.Debug;

    /** Simple Graphing program.

    * @author Ian F. Darwin, http://www.darwinsys.com/

    * @version $Id: Grapher.java,v 1.20 2008/10/06 15:44:34 ian Exp $

    */

    public class Grapher extends JPanel {

    private static final long serialVersionUID = -1813143391310613248L;

    /** Multiplier for range to allow room for a border */

    public final static double BORDERFACTOR = 1.1f;

    /** The list of Point points. */

    protected List<Point2D> data;

    /** The minimum and maximum X values */

    protected double minx = Integer.MAX_VALUE, maxx = Integer.MIN_VALUE;

    /** The minimum and maximum Y values */

    protected double miny = Integer.MAX_VALUE, maxy = Integer.MIN_VALUE;

    /** The range of X and Y values */

    protected double xrange, yrange;

    public Grapher() {

    data = new ArrayList<Point2D>();

    figure();

    }

    /** Set the list data from a list of Strings, where the

    * x coordinate is incremented automatically, and the y coordinate

    * is made from the String in the list.

    */

    public void setListDataFromYStrings(List<String> newData) {

    data.clear();

    for (int i=0; i < newData.size(); i++) {

    Point2D p = new Point2D.Double();

    p.setLocation(i, java.lang.Double.parseDouble(newData.get(i)));

    data.add(p);

    }

    figure();

    }

    /** Set the list from an existing List, as from GraphReader.read() */

    public void setListData(List<Point2D> newData) {

    data = newData;

    figure();

    }

    /** Compute new data when list changes */

    private void figure() {

    // find min & max

    for (int i=0 ; i < data.size(); i++) {

    Point2D d = (Point2D)data.get(i);

    if (d.getX() < minx) minx = d.getX();

    if (d.getX() > maxx) maxx = d.getX();

    if (d.getY() < miny) miny = d.getY();

    if (d.getY() > maxy) maxy = d.getY();

    }

    // Compute ranges

    xrange = (maxx - minx) * BORDERFACTOR;

    yrange = (maxy - miny) * BORDERFACTOR;

    //Debug.println("range", "minx,x,r = " + minx +' '+ maxx +' '+ xrange);

    //Debug.println("range", "miny,y,r = " + miny +' '+ maxy +' '+ yrange);

    }

    /** Called when the window needs painting.

    * Computes X and Y range, scales.

    */

    @Override

    public void paintComponent(Graphics g) {

    super.paintComponent(g);

    Dimension s = getSize();

    if (data.size() < 2) {

    g.drawString("Insufficient data: " + data.size(), 10, 40);

    return;

    }

    // Compute scale factors

    double xfact = s.width / xrange;

    double yfact = s.height / yrange;

    // Scale and plot the data

    for (int i=0 ; i < data.size(); i++) {

    Point2D d = (Point2D)data.get(i);

    double x = (d.getX() - minx) * xfact;

    double y = (d.getY() - miny) * yfact;

    Debug.println("point", "AT " + i + " " + d + "; " +

    "x = " + x + "; y = " + y);

    // Draw a 5-pixel rectangle centered, so -2 both x and y.

    // AWT numbers Y from 0 down, so invert:

    g.drawRect(((int)x)-2, s.height-2-(int)y, 5, 5);

    }

    }

    @Override

    public Dimension getPreferredSize() {

    return new Dimension(150, 150);

    }

    public static void main(String[] args) throws IOException {

    final JFrame f = new JFrame("Grapher");

    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    Grapher grapher = new Grapher();

    f.setContentPane(grapher);

    f.setLocation(100, 100);

    f.pack();

    List<Point2D> data = null;

    if (args.length == 0)

    data = org.me.mylib.Grapher.class.getName();

    else {

    String fileName = args[0];

    if ("-".equals(fileName)) {

    data = GraphReader.read(new InputStreamReader(System.in), "System.in");

    } else {

    org.me.mylib.Grapher.class.getField(fileName);

    }

    }

    grapher.setListData(data);

    f.setVisible(true);

    }

    }

    I need to add more detail to get it to show lines and there are some mistakes because of my changes in the program. Can anybody help me?

    2 AnswersProgramming & Design1 decade ago
  • What is the relationship, if any, between Dystonia and Epilepsy?

    Dystonia is a movement disorder that causes the muscles in the body to expand and contract involuntarily. This movement disorder may, in some cases be confused with seizures. However, can there be a primary causal relationship between the two? If so, what would that be? Any help would be greatly appreciated.

    1 AnswerOther - Diseases1 decade ago
  • How did the US and the UK provoke Japan to take over Sakhalin in the Russo-Japanese War?

    The textbooks in Japan teach that the US and the UK provoked Japan into this war. Has anybody else heard about this hypothesis? What can you tell me?

    3 AnswersHistory1 decade ago