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 2298 points

?

Favorite Answers25%
Answers63
  • Projectile motion given velocity, angle of launch, distance, height?

    Here's the problem:

    Some birds keep of throwing themselves as a projectile to a tower containing pigs (Angry Birds). You are given the velocity v (in m/s, meters per second) of the birds thrown as a projectile to a stick tower, and the angle θ (in degrees) of launch relative to the ground, the distance d (in meters) from the point of launch to the stick tower, and the height h (in meters) of the stick tower. Your task is to check if the thrown bird hits the tower or not. The position of a bird t seconds after being thrown from its origin on the ground is (x, y) = (vt cos(θ), vt sin(θ) - 0.5 gt2) where g = 9.81 meters per seconds squared. All birds are thrown as projectiles from the same origin. How do you determine if the tower was hit by the bird or not?

    **The formula is given together with some necessary values to compute for the coordinates (x,y). My problem is, I can't find a way to determine if the tower was hit by the bird or not with the (x,y) coordinates already known. How do I relate the x and y positions as to whether the tower was hit or not?

    For example, given are the following values

    velocity = 30 m/s

    angle = 30 degrees

    distance = 30 meters

    height of tower = 6 meters

    Was the tower hit or missed?

    2 AnswersPhysics9 years ago
  • Projectile motion given velocity, angle of launch, distance, height?

    Here's the problem:

    Some birds keep of throwing themselves as a projectile to a tower containing pigs (Angry Birds). You are given the velocity v (in m/s, meters per second) of the birds thrown as a projectile to a stick tower, and the angle θ (in degrees) of launch relative to the ground, the distance d (in meters) from the point of launch to the stick tower, and the height h (in meters) of the stick tower. Your task is to check if the thrown bird hits the tower or not. The position of a bird t seconds after being thrown from its origin on the ground is (x, y) = (vt cos(θ), vt sin(θ) - 0.5 gt2) where g = 9.81 meters per seconds squared. All birds are thrown as projectiles from the same origin. How do you determine if the tower was hit by the bird or not?

    **The formula is given together with some necessary values to compute for the coordinates (x,y). My problem is, I can't find a way to determine if the tower was hit by the bird or not with the (x,y) coordinates already known. How do I relate the x and y positions as to whether the tower was hit or not?

    For example, given are the following values

    velocity = 30 m/s

    angle = 30 degrees

    distance = 30 meters

    height of tower = 6 meters

    Was the tower hit or missed?

    1 AnswerPhysics9 years ago
  • Reverse and Add problem at programming-challenges.com?

    I tried to solve the reverse and add problem at programming-challenges.com (see here: http://www.programming-challenges.com/pg.php?page=...

    When i tried the sample input, it produced correct results. But then, when I tried submitting it, the judge said "Wrong Answer". Here's my code:

    //begin code

    #include <iostream>

    #include <algorithm>

    using namespace std;

    unsigned long long reverseNumber( int number ) {

    unsigned long reverseN = 0, n;

    while ( number != 0 ) {

    n = number % 10;

    reverseN = reverseN * 10 + n;

    number /= 10;

    }

    return reverseN;

    }

    bool palindrome( int sum ) {

    int j = 0, digitSet[20], digit;

    while ( sum != 0 ) {

    digit = sum % 10;

    digitSet[j] = digit;

    j++;

    sum /= 10;

    }

    reverse( digitSet, digitSet+j );

    for ( int x = 0; x < j / 2; x++ ) {

    if ( digitSet[ x ] != digitSet[ j - x - 1 ] )

    return false;

    }

    return true;

    }

    int main() {

    int n, i = 0, ctr, n;

    unsigned long long num, sum;

    cin >> n;

    while ( i < n ) {

    cin >> num;

    ctr = 0;

    do {

    sum = num + reverseNumber( num );

    ctr++;

    num = sum;

    } while ( !palindrome( num ) );

    cout << ctr << " " << sum << endl;

    i++;

    }

    return 0;

    }

    //End of code

    What's wrong with my code? Anyone who can point it out? Thanks a lot!

    2 AnswersProgramming & Design9 years ago
  • Java error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 30?

    When I run my program below, I get correct results but at the end of the output an error appears saying:

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 30

    at Pro.executeCommands(Pro.java:194)

    at Pro.main(Pro.java:108)

    Based from the error message, there's something wrong with line 194 and 108. Line 108 of the code simply calls the method executeCommands();

    Line 194 (found inside method executeCommands) contains this: command = commandArray[ ++commandNum ][ 0 ];

    The "30" in the error is possibly the constant I declared at the start of the class which has the value of 30. So the error may be because of my inclusion of maxCommands in some statements. IDK

    So here's the code snippet so you can figure out (I deleted a couple of methods, some are called inside the main method, which I know has nothing to do with the error) :

    public class Pro {

    static final int maxCommands = 30;

    static final int size = 20;

    static int floor[][];

    static int commandArray[][];

    static int command, distance, direction, count, xPos, yPos;

    static boolean penDown;

    static String prompt;

    public static void main ( String args[] ) {

    int inputCommand = 0;

    int spaces;

    Scanner in = new Scanner ( System.in );

    initialize();

    displayMenu();

    System.out.println ( prompt );

    while ( inputCommand != 9 ) {

    inputCommand = in.nextInt();

    // execute commands if command is 9

    if ( inputCommand == 9 || count == maxCommands )

    executeCommands();

    else {

    if ( count < maxCommands ) {

    commandArray[ count ] [ 0 ] = inputCommand;

    if ( inputCommand == 5 ) {

    spaces = in.nextInt();

    commandArray[ count ][ 1 ] = spaces;

    }

    }

    }

    count++;

    }

    }

    public static void initialize () {

    direction = 0;

    count = 0;

    xPos = 0;

    yPos = 0;

    penDown = false;

    floor = new int[ size ][ size ];

    commandArray = new int[ maxCommands ][ 2 ];

    for (int i = 0; i < floor.length; i++) {

    for (int j = 0; j < floor[i].length; j++) {

    floor[i][j] = 0;

    }

    }

    prompt = "\nEnter below your set of commands: ";

    }

    public static void executeCommands () {

    int commandNum = 0;

    command = commandArray[ commandNum ][ 0 ];

    // continue executing commands until either reach the end

    // or reach the max commands

    while ( command < 9 ) {

    // determine what command was entered

    // and perform desired action

    switch ( command ) {

    case 1:

    penDown = false;

    break;

    case 2:

    penDown = true;

    break;

    case 3:

    direction = rightTurn( direction );

    break;

    case 4:

    direction = leftTurn( direction );

    break;

    case 5:

    distance = commandArray[ commandNum ][ 1 ];

    moveForward( penDown, floor, direction, distance );

    break;

    case 6:

    System.out.println( "+=+=+=+=+=+=+=+=+=+=+\nYour computerized sketchpad: \n" );

    printFloor( floor );

    break;

    } // end switch

    command = commandArray[ ++commandNum ][ 0 ];

    } // end while

    } // end method executeCommands

    public static void moveForward( boolean down, int a[][], int dir, int dist ) {

    int j; // looping variable

    // determine which way to move pen

    switch ( dir ) {

    case 0: // move to right

    for ( j = 1; j <= dist && yPos + j < size; ++j )

    if ( down )

    a[ xPos ][ yPos + j ] = 1;

    yPos += j - 1;

    break;

    case 1: // move down

    for ( j = 1; j <= dist && xPos + j < size; ++j )

    if ( down )

    a[ xPos + j ][ yPos ] = 1;

    xPos += j - 1;

    break;

    case 2: // move to left

    for ( j = 1; j <= dist && yPos - j >= 0; ++j )

    if ( down )

    a[ xPos ][ yPos - j ] = 1;

    yPos -= j - 1;

    break;

    case 3: // move up

    for ( j = 1; j <= dist && xPos - j >= 0; ++j )

    if ( down )

    a[ xPos - j ][ yPos ] = 1;

    xPos -= j - 1;

    break;

    } // end switch

    } // end method movePen

    }// end of class Pro

    -> Any suggestions on how I can solve this? Any form of help always appreciated. Thanks in advance.

    1 AnswerProgramming & Design9 years ago
  • How would you distribute resources if everyone were equally talented and worked hard?

    A goal for a society is to distribute resources equitably or fairly. How would you distribute resources if everyone will equally talented and worked equally hard? What if people had different talents and some people worked hard while others did not?

    I think this has something to do with the 10 basic principles of economics, but I can't determine which. Any ideas there?

    1 AnswerEconomics10 years ago
  • Java Development Kit download: Which is the proper file to download?

    Here's the link:

    http://www.oracle.com/technetwork/java/javase/down...

    I am using a Windows 32-bit computer. Among two options, I downloaded the Windows x86 (I don't know what these names mean) but after running it, it says the installer "is not a valid Win32 application". Does this mean the file I downloaded is not compatible with my PC and I have to download the other one (Windows x64)? Or is there just something wrong with my download and the file is perfectly good with my PC?

    Any advices guys?

    One more question: if I download the JDK and install it, can I develop Java using Notepad++ text editor and compile it thru the Command Prompt? I am not much sure about this. I've downloaded GNU compiler for C++ before, installed it and been able to compile C++ codes through C Prompt. Does the JDK work the same? If it does, do I have to configure stuff or copy files to certain locations so that it will work?

    Sorry guys, noob here. I would appreciate your help on this. I just want to clear things out.

    2 AnswersProgramming & Design10 years ago
  • Difficulty running SQL script Oracle XE 10g, error message says "unknown command beginning in CONSTRAINT"?

    So I have this script which you can download in this link:

    http://www.mediafire.com/?7f8s1rv7hrp9kyf

    I am using Oracle XE 10g and tried to run it in SQL command line (the one outside oracle itself, command prompt-looking). I have my existing empty schema and connected to it through the command line. Then I entered the path of the script using "@path.txt".

    I assumed everything was going right with my script since I tried to run each fragment of it in the SQL Command Line of my schema itself. But I was surprised to see series of error messages that says:

    SP2-0734: unknown command beginning "CONSTRAINT..." - rest of line ignored.

    SP2-0734: unknown command beginning "REFERENCES..." - rest of line ignored.

    I removed indentations after that to make sure that it will run smoothly but still same results.

    How do I fix this one guys? Is there something wrong with my code or does it have to do with the configuration of my Oracle? I badly need assistance. Thanks much for any help!

    3 AnswersProgramming & Design10 years ago
  • Physics True or False questions about machine efficiency, fluid pressure, displacement?

    1. A machine’s efficiency is always less than 100 %.

    2. The work input is always greater than the work output in a machine.

    3. Fluids only exert upward pressure on objects.

    4. As a fluid’s speed increases, its pressure also increases.

    5. A machine always increases force exerted to make work easier.

    6. A machine always changes the direction of force exerted to make work easier.

    7. Objects experience the same pressure from all sides when immersed in a fluid.

    8. An object floating in water has displaced water equal to its own volume.

    Short explanations please :)

    3 AnswersPhysics10 years ago
  • Oracle query using group function, determining minimum value in a table?

    How do I display the minimum value among a column in a table together with the other columns attributed to it?

    For example, I have a table called products and I want to display the price of the cheapest among these products. I also would like to add the description of that certain product. I tried but it seems that a subquery doesn't allow to have group functions in it. Here were my attempts:

    SELECT MIN(standard_price), (SELECT description

    FROM products

    WHERE standard_price = MIN(standard_price))

    FROM products

    GROUP BY description;

    SELECT MIN(standard_price), description

    FROM products

    WHERE description = (SELECT description

    FROM products

    WHERE standard_price = MIN(standard_price));

    Any tips? I'm just new in SQL. Would appreciate any help :D

    2 AnswersProgramming & Design10 years ago
  • How many valence electrons are shared by N2 atoms? and what are the name of these compounds?

    36. How many electrons are shared by the atoms in the compound N2?

    A. 2

    B. 6

    C. 4

    D. 8

    E. None of the Above

    //I'm guessing it's 6 but I'm not sure. Any answer and brief explanation?

    What is the correct name for the following?

    P4O5

    A. potassium (IV) pentoxide

    B. tetraphosphorus pentoxide

    C. diphosphorus tetroxide

    D. phosphorus pentoxide

    E. None of the Above

    Al2O3

    A. aluminide oxide

    B. aluminum oxide

    C. aluminum trioxide

    D. aluminum (III) oxide

    E. None of the Above

    //Quite confused with the roman numerals inside the parenthesis. Which ones are correct?

    Any help appreciated :)

    2 AnswersChemistry10 years ago
  • Which of these imaginary globe lines is the longest?

    A. 90° longitude

    B. prime meridian

    C. 90° south latitude

    D. international dateline

    I guess the international dateline is quite longer because it is a bit jagged but I'm not sure. 90° S latitude is relatively small so i'm sure it's not the answer.

    2 AnswersGeography10 years ago
  • Oracle error: "inconsistent datatypes: expected DATE got NUMBER", what to do?

    I was trying to insert rows for a table in my oracle schema using INSERT ALL INTO clause. One column in my table is of type DATE. I tried to run this code below but I arrived at an error message that says "ORA-00932: inconsistent datatypes: expected DATE got NUMBER". Here's the script i ran:

    INSERT ALL

    INTO orders VALUES(180100, TO_DATE('05-MAY-2011','DD-MON-YYYY'), 201000, 100)

    INTO orders VALUES(180101, TO_DATE('06-MAY-2011','DD-MON-YYYY'), 201001, 102)

    SELECT * FROM dual;

    I'm pretty sure the order of putting the values in the parenthesis was correct. You can see this screenshot from my object browser: http://i56.tinypic.com/15i7nna.jpg

    The data type is DATE and I etered values in TO_DATE function. I just don't get why it says inconsistent data types.

    I also tried, in desperation, removing the TO_DATE and date format and retaining just the date, something like this:

    INTO orders VALUES(180100, '05-MAY-2011', 201000, 100)

    but still, the same error occurs. I also tried replacing the date inside the parenthesis with SYSDATE for testing purposes but still the same error appeared.

    What's wrong with the code? Could you tell me how I can fix it? If there's nothing wrong with the code, it must be the configuration of my account. But I also granted DBA to my account. What to do? Any form of help is appreciated! :)

    3 AnswersProgramming & Design10 years ago
  • Oracle query to display all dates between two dates: What's wrong with my code?

    I'm trying to write a query that will display the hiring dates of different employees that were hired between June 30, 1997 to February 1, 1998. Here's the code I arrived at:

    SELECT last_name, job_id, hire_date

    FROM employees

    WHERE hire_date BETWEEN TO_DATE('20-FEB-98','DD-MON-YY') AND TO_DATE('1-MAY-98','DD-MON-YY')

    ORDER BY hire_date DESC;

    The code above yields the output "no data found". I can't find any flaw in my BETWEEN clause. I am also sure there are employees in my schema that were hired between the said dates, so there must be some results displayed. As an evidence, you can see this screenshot from a previous query: http://i52.tinypic.com/qycln8.jpg

    I'm using Oracle XE, BTW.

    So, what's wrong with this? Why are results not displayed? If there is some flaw, please point it out. Thank you!

    2 AnswersProgramming & Design10 years ago
  • Naming some compounds and giving fomula for compound names..?

    1. Thomson’s model of the atom included all of these except:

    A. atoms are mostly positively charged

    B. some parts of the atom are positively charged

    C. atoms will deflect most alpha rays

    D. atoms are mostly empty space

    E. None of the Above

    Write the correct name for 3 and 4.

    3. Al2O3

    A. aluminide oxide

    B. dialuminum trioxide

    C. aluminum trioxide

    D. aluminum (III) oxide

    E. None of the Above

    4. CaBr2

    A. calcium (I) bromide B. calcium (II) bromide C. calcium bromine D. calcium bromide E. None of the Above

    Write the correct formula for 5.

    5. copper (II) carbide

    A. Cu2C4

    B. Cu4C2

    C. Cu2C

    D. CuC

    E. None of the Above

    2 AnswersChemistry10 years ago
  • How to partition my Drive C: by increasing its size and decreasing the size of D:?

    Okay, my C: is running out of disk space left (1.26GB) and my D: still has some more free space (22GB). I'm installing a 1gb+ software and it won't fit my C: anymore. Wish I can pass on some 10GB from D: to C:.

    I heard that I can partition my disks by decreasing the size of one drive (the one with more free space) and adding more space to the other drive. I'm not a computer geek so I don't know a lot about partitioning. I don't even know what partition really is. LOL

    After consulting Google, I saw some Partition Manager Softwares. I also saw this video that gave some easy steps on partitioning: http://www.youtube.com/watch?v=q6_wwuBp0iI

    I was about to try what the video said but I was unsure if it'll work. I don't know what drive in my case should be shrinked and I'm not exactly sure how much memory space I should shrink. I don't also know what that resulting 'unallocated space' means. I guess it means that you can create another drive, and I'm willing to, as long as I can still install that 1GB+ software.

    So, can you give me some tips on what I should do with my drive without putting everything in it to risk? What's the best and most effective way? Should I go for the software or just follow the one in that video? If I must go for the software, then what software do you recommend I should use? And how do I use it? If you think I have to follow the one in the vid, what drive should I shrink? And will it free up my C:?

    Storage safety is my top priority here. I don't want to lose any of my files. Additional suggestions, advice, tips, etc. needed. I need some enlightenment here about this stuff :)

    Sorry, poor inexperienced computer user here. :)

    7 AnswersDesktops10 years ago
  • How do I convert a Hexadecimal value into its Decimal form in C++?

    Okay, so I'm having trouble creating a program that converts Hexadecimal to Decimal. I'm pretty sure I'm going to input the Hex value as string then convert it to integer, most probably using the atoi function similar to this one:

    string num = "1234";

    int n = atoi(num.c_str());

    Problem is, Hex includes letters from A down to F with their corresponding numerical equivalents. Now, how do I convert these characters to their integer equivalents so that I could do the conversion part? Or if not, how do I assign integer values as equivalents of these letters?

    BTW, I used this code below to convert other base forms into decimal. I used a conventional formula that gets the summation of individual digits multiplied by the base raised to the positional place of that digit.

    if (base != 16){

    cin >> num;

    n = num;

    for (i = 0; n != 0; i++){

    A = n%10;

    decimal += A*pow(base, i);

    n /= 10;

    }

    Now, how can I apply the same formula to hex values? Any ideas? I'll appreciate any form of help :)

    1 AnswerProgramming & Design10 years ago
  • Is there a closed form notation in this sequence?

    {bn} = 4, 9, 13, 18...

    and how can I find the 75th term or 129th term of the formula? is there an easy way?

    Thanks a lot for any help

    1 AnswerMathematics10 years ago
  • Can I create something like this in excel?

    Here's the table: http://i53.tinypic.com/118ogg1.png

    How do I create glossy cell background in Excel similar to that? I've tried exploring solutions but I can't find one. If it's not possible, could you recommend me to an ONLINE tool that can make one? Or if not, just a tool that can make my table look slick and sharp. Thank you!

    4 AnswersSoftware10 years ago
  • How can I solve the missing values in this Series-Parallel circuit?

    Here's the circuit:

    http://i52.tinypic.com/vwwt29.png

    The asked values is the RT, IT, V1, V2, V3, V4, V5, V6, I1, I2, I3, I4, I5, and I6.

    T means total by the way.

    I have actually solved the RT, which is 300Ω.

    But I'm having difficulty solving different unknowns when the circuit splits up into R6 into R2 and R4&R5.

    Also, since the R4&R5 is parallel, they have a constant applied voltage and individual currents. What amount of current will enter R3? Is it the sum of I4&I5? And since the R4-R5 bank is in series with R3, what what will I use to compute for their total voltage? What will end up as values that will reach R1 since it is again in series with every part?

    There will be unknowns that will have the same value with others since parallel has 1 applied voltage and series has 1 current. So what are they?

    I hope I am coming across on what difficulty I am having with this one. I am just really confused because of the different rules applied for the series part and the parallel. I have tried the assistance of online resources but I can't still figure it out.

    Anyone can solve this? And explain it a bit, if its not too much? :)) Thanks for any help!

    3 AnswersEngineering10 years ago
  • What software/online tool can I use to create a table similar to this?

    Here's what the table looks like: http://i53.tinypic.com/118ogg1.png

    I created it using SmartDraw VP. But my trial version has already expired. I know Excel can create this but as far as I know, it can't provide the same glossy slick design. I am not actually looking for a software that can do exactly the same. Any tool that can have a similar good-looking design will do.

    Any recommendations? :)

    Also, do you know of other softwares or online tools that can create ER Diagrams and flowcharts the easy way? I find SmartDraw best but unfortunately its not free.

    Thank you for any help! :)

    1 AnswerSoftware10 years ago