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.
Clare
Adding every 2 number in an array?
Hi,
I have an array of double numbers eg.
double[] myNum = {1.1, 4.3, 3.1, 6.2};
How do I add up every 2 number in the array and store it into another array so the outcome would be something like this:
double[] outC = {5.4, 9.3};
This is what I ve tried:
double outC[] = new double[2];
for (int i=0;i<myNum.length;i++)
{
outC[i] = myNum[i] + myNum[i+1];
i++;
}
But it doesn t seems to work. Thanks.
1 AnswerProgramming & Design3 years agoUsing Wolfram Mathematica to determine big-O relationship?
Hi,
Is anyone familiar using Wolfram Mathematica to determine whether a function is a big-O as per example below?
To establish a big-O relationship, find witnesses C and k such that |f (x)| ≤ C|g(x)| whenever x>k.
1. f (x) = 17x + 11
The solution should be Yes because the determining factor in f(x) is less than or equal to x2.
I would like to use Mathematica to check my answer. What should my input looks like?
Thanks!
1 AnswerMathematics4 years agoExistential quantifier question?
Hi, I have an existential quantifier question as below:
Suppose that the variable x represents students.
Let F(x) = x is a freshman.
Let A(x) = x is a part-time student.
Express the following statements in English.
1. ∃x(A(x)^~F(x))
Solution 1: Some part-time students are not freshmen.
Solution 2: Some of the students are a part-time students and not a freshman.
Referring to the 2 solution above, can they both be accepted as answer?
Thanks.
1 AnswerMathematics4 years agoSaying back and side head buzz haircut in Chinese?
Hi,
I'm currently a student in China and whenever I go to a barber for a haircut, they seem to misunderstood what I want. Specifically, how do i say I need a side and back buzz cut in Chinese?
Something like this pic: http://www.fashiongrapher.com/wp-content/uploads/2...
Thanks.
5 AnswersLanguages5 years agoCalculating mean profit and losses for the companies?
The table shows a random sample of 96 small companies which revealed the following profits and losses for the year 2014
Profit and losses.......No. of companies
-10 and up to 0...........10
0 and up to 10............12
10 and up to 20...........21
20 and up to 30----------26
30 and up to 40----------19
40 and up to 50------------8
Calculate the mean profits and losses for these company. How do I do this? thx
Not sure if what I did is right...
Mean profit: 12(5)+21(15)+26(25)+19(35)+8(45) / 96 = 21.35
Mean loss: 10(-5) / 96 = -0.521
Is it correct?
1 AnswerPersonal Finance6 years agoCalculating mean profit and losses for the companies?
The table shows a random sample of 96 small companies which revealed the following profits and losses for the year 2014
Profit and losses.......No. of companies
-10 and up to 0...........10
0 and up to 10............12
10 and up to 20...........21
20 and up to 30----------26
30 and up to 40----------19
40 and up to 50------------8
Calculate the mean profits and losses for these company. How do I do this? thx
1 AnswerCorporations6 years agoProblem with Asus Webcam after Windows 10 update + reformat?
Hi,
I've recently upgraded my OS to Windows 10. After upgrading, I noticed my webcam in inverted so I go to ASUS website to download the camera driver and it works. After encountering some problems, I do a clean installation of Windows 10 and the inverted webcam is back again. Went to download the driver but this time whenever I open the camera app, it says "Something went wrong. Make sure your camera is connected and not being used by other app". I've uninstall and reinstall several time but to no avail. The ASUS camera driver is the only driver I've downloaded. Is the Asus cam driver depends on other driver that I need to download? How do I fix it? Thanks
1 AnswerSoftware6 years agoNeed help with Two-sample Tests of Hypothesis?
From past records it is known that the average life of a battery used in a digital clock is 305 days. The lives of the batteries are normally distributed. The battery was recently modified to last longer. A sample of 20 of the modified batteries was tested. It was discovered that the mean life was 311 days, and the sample standard deviation was 12 days. At the 0.05 level of significance, did the modification increase the mean life of the battery?
1) Show the decision rule graphically
Answer: d.f = 20-1=19 ; Anyone know how to find the t-value?
1 AnswerHomework Help6 years agoHTML popup window positioning?
Hi, I have a code that will open up a pop up window. I tried to position it so that it will appear at the middle of the screen but it won't move anywhere else.
Code:
<a href="../html-link.htm" target="popup" onclick="window.open('summary.php','summary','width=400,height=300,screenX=500,screenY=500,left=500,top=500')">Summary</a>
Any idea? Thanks!
3 AnswersProgramming & Design7 years agoPHP to output only ALL UPPERCASE characters?
Hi, I have a PHP code that will displays some string. However, I only wanted ALL uppercase character (MEN,WOMEN,etc)...I tried if (strtoupper($get))...but its not working.
My code:
<?php
$dom = new DOMDocument();
@$dom->loadHTMLFile('https://www.postme.com.my/men-1.html');
$xpath = new DOMXpath($dom);
$categories = $xpath->query('//ul[@id="nav"]/li');
foreach ($categories as $category) {
$get = $xpath->query('./a/span', $category)->item(0)->nodeValue. '<br/>';
if (strtoupper($get)
{
echo $get;
}
}
?>
How do I correct it? Thanks
3 AnswersProgramming & Design7 years agoRegex Expression for VBA?
Hi, I'm trying to retrieve some information from the HTML source code of a website by using Regex expression. The information that I need is in between the "span" tag, capital letter and need to include the ampersand (&) sign...
Example:
<span>NAME</span>
<span>AGE & GENDER</span>
<span>ADDRESS<span>
This is the Regex that I use but how to modify it so that it will take in everything inside the <span> tag including the space and ampersand too?
Ex:
.Pattern = "<span>([A-Z]* [A-Z]*)</span>"
1 AnswerProgramming & Design7 years agoWhat type of system architecture should I use for my software proposal?
Hi,
I'm developing an information system for a school using Java. Basically, my software is used to enter student's information such as name, age, etc and then store it into a database (I use MySQL).
Therefore, I need to come up with a suitable system architecture for my system. Is it suitable if I use Client-server architecture since the software will only be used in a single school and there will be more than 1 computers installed with the software. The software will also be connected to the same database(all computers will connect to that 1 database). If not can anyone suggest other system architecture that is suitable for my system? If possible can u show me an example of the architecture model.
Thank you for your time.
1 AnswerProgramming & Design7 years agoCalculating Noise Power (SNR)?
How to solve this?
The SNR in a transmission media was found to be a -6dB on a stormy evening. The strength of the signal showed in the signal meter was 10mW. What is the noise power?
thx
1 AnswerComputer Networking7 years agoJava Counting Vowels in An Array of String?
I'm trying to make a code to display the total num of vowels of 5 names in a string of array but it doesnt seems to be working right.... Can anybody look into it?
Code:
import javax.swing.*;
public class FamilyVowel {
public static void main(String[] args) {
String[] Family = {"Julie","Robert","Alisha","Rick","Tom"};
for (int i = 0; i < Family.length; i++)
{
int vowelCount = 0;
char c = Family[].charAt(i);
if ( (c == 'a')
|| (c == 'e')
|| (c == 'i')
|| (c == 'o')
|| (c == 'u')
|| (c == 'A')
|| (c == 'E')
|| (c == 'I')
|| (c == 'O')
|| (c == 'U')
)
vowelCount++;
}
}
}
Thanks
3 AnswersProgramming & Design8 years agoC++ creating a dictionary using map?
Hi, I started to learn about map and I have made a program to output the meaning of any 5 words input by the user. Now, how do I search the map and output the meaning of the word input by the user?
Code:
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main()
{
map <string,string> dictionary;
string arrayDic[5] = { "tilt" , "ramp" , "mob" , "history" , "riddle" };
dictionary[" to cause to lean, incline, slope, or slant. "] = "tilt";
dictionary[" a sloping surface connecting two levels. "] = "ramp";
dictionary[" a disorderly or riotous crowd of people. "] = "mob";
dictionary[" the branch of knowledge dealing with past events. "] = "history";
dictionary[" a puzzling question "] = "riddle";
string word;
cout<<" Search the meaning of which word (tilt,ramp,mob,history,riddle)?"<<endl;
cin >> word;
...??
thx
1 AnswerProgramming & Design8 years agoHow you describe persons highly committed to serving others?
Example :
selfless because they do not just care for them self but others as well
Anymore ideas? thx 4 ur time
3 AnswersOther - Society & Culture8 years agoDiscrete Probability(expected value)?
What is the expected number of times the number 6 will come out if we roll a die 10 times?
How to solve this?
thx
3 AnswersMathematics8 years agoDiscrete Probability?
How to solve this?
What is the probability of these events when we randomly select a permutations of the 26 lowercase letters of the English alphabets?
- 'a' and 'b' are not next to each other in the permutation.
thx
1 AnswerMathematics8 years agoDiscrete Probability(expected value)?
How to solve this?
Suppose that we flip a coin until either it comes out tails twice or we have flipped it 6 times. What is the expected numbers of times we flip the coin?
thx
1 AnswerMathematics8 years agoDiscrete Probability(expected value)?
How to solve this?
Suppose that we roll a fair die until a 6 comes up or we have rolled it 10 times. What is the expected number of times we roll the die?
thx
3 AnswersMathematics8 years ago