Wikipedia:Reference desk/Archives/Computing/2012 November 3
Computing desk | ||
---|---|---|
< November 2 | << Oct | November | Dec >> | November 4 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
November 3
[edit]radio system
[edit]how a radio system works ,its components and technologies — Preceding unsigned comment added by 196.43.134.182 (talk) 06:36, 3 November 2012 (UTC)
Compatibility of MSN and Yahoo Messenger
[edit]I have an online business meeting sometime this week, and rather than using Skype as I would normally do, the other party would like to use Yahoo Messenger, which I don't have, and don't want to have. I do, however, have MSN, and I am wondering if the two are compatible? This is likely to be a video conference, so would all functionality remain if the two are indeed compatible with each other (except for the emoticons, winks, and all the other childish stuff that comes with both)? KägeTorä - (影虎) (TALK) 09:58, 3 November 2012 (UTC)
- I doubt they are, in any way. You could use a web service and theoretically not install anything extra. I believe Google, for example, has one for video conferencing. ¦ Reisio (talk) 15:57, 3 November 2012 (UTC)
- https://www.google.com/chat/video?hl=en 77.166.70.218 (talk) 08:33, 5 November 2012 (UTC)
- I don't believe you are thinking clearly. If it's a client, you must obtain and install Yahoo Messenger, at least for the duration of the meeting, because you don't want some minor glitch to occur. If you're the client, you must imperiously order the groveling supplicant to abide by your rules: viz, using MSN. This is the way of things. Tarcil (talk) 17:58, 5 November 2012 (UTC)
Voice type/range analyzer
[edit]Is there any program which is capable to determine the voice type (soprano etc.) and/or range in an mp3 file? Thanks.--93.174.25.12 (talk) 11:43, 3 November 2012 (UTC)
100 * 1.14 = 113.99999999999999 in Python 3
[edit]Why is it like that? Can someone give me a link to a resource that explains this? Comploose (talk) 12:52, 3 November 2012 (UTC)
- Floating point and What Every Computer Scientist Should Know About Floating-Point Arithmetic -- Finlay McWalterჷTalk 13:07, 3 November 2012 (UTC)
- For arbitrary precision, at the expense of performance, you can use arbitrary-precision arithmetic:
from decimal import *
Decimal(100)*(Decimal(114)/Decimal(100))
- So, answering 113.999... is actually faster than just outputting 114? I'll take a look at the resource above and try to wrap my hand around this. Comploose (talk) 13:18, 3 November 2012 (UTC)
- No, the problem is that not every number can be represented with the same number of digits in every number system - indeed, most numbers require infinite representation in any base. You might be familiar with the fact that 1/3 is 0.3333.... in decimal notation, with an infinite repetition of the digit 3. In binary notation, there are other numbers that do not have a finite representation. Most implementations of programming languages nowadays, including Python, use IEEE floating point numbers, often double-precision floating-point format, with 53 bits for the mantissa and 11 bits for the exponent. So nearly all numbers cannot be represented exactly by Python, and the set of numbers that can be represented in binary is not the same as the set of numbers that can be represented in
binarydecimal. In particular, 1.14 does have an exact finite representation in decimal, but not as a double-precision floating point number. So the computer picks the closest binary number it can represent, which, when converted back to decimal, is not exactly 1.14. Some languages perform rounding when printing numbers to users, so you do not always see the effect. For me, both Python 2 and 3 print 113.99999999999999 for 1.14*100, but Python 2 even prints 1.1399999999999999, while Python 3 prints 1.14 for 1.14. Using the decimal arithmetic suggested by Finlay does not really solve the problem in general, because even arbitrary precision arithmetic cannot represent e.g.sqrt(2)
or π. --Stephan Schulz (talk) 14:14, 3 November 2012 (UTC)
- No, the problem is that not every number can be represented with the same number of digits in every number system - indeed, most numbers require infinite representation in any base. You might be familiar with the fact that 1/3 is 0.3333.... in decimal notation, with an infinite repetition of the digit 3. In binary notation, there are other numbers that do not have a finite representation. Most implementations of programming languages nowadays, including Python, use IEEE floating point numbers, often double-precision floating-point format, with 53 bits for the mantissa and 11 bits for the exponent. So nearly all numbers cannot be represented exactly by Python, and the set of numbers that can be represented in binary is not the same as the set of numbers that can be represented in
- RE: "the set of numbers that can be represented in binary is not the same as the set of numbers that can be represented in binary"...you might want to change a "binary" to "decimal". StuRat (talk) 17:20, 3 November 2012 (UTC)
- Thanks, fixed. --Stephan Schulz (talk) 17:47, 3 November 2012 (UTC)
- You can round off the results to mask this ugliness. For example:
round(100*1.14,9)
- ...will give you the answer rounded to 9 decimal places. StuRat (talk) 17:25, 3 November 2012 (UTC)
- Ok, thank. Another thing that I find amazing is that if you transform this 13.999 into an integer, it is rounded to 13. Isn't this behavior too prone to cause huge mistakes? Comploose (talk) 19:50, 3 November 2012 (UTC)
- Historically, "int" type operations have returned "the integer part" of a floating point number, which amounts to always rounding towards 0. I vaguely remember a dual operation in UCSD Pascal (probably
frac()
) that would return the fractional part. This behaviour is known and understood, and you are responsible to handle the numerical errors. Useround()
like Stu recommended if you want rounding with less average error. --Stephan Schulz (talk) 20:04, 3 November 2012 (UTC)
- Historically, "int" type operations have returned "the integer part" of a floating point number, which amounts to always rounding towards 0. I vaguely remember a dual operation in UCSD Pascal (probably
- Ok, thank. Another thing that I find amazing is that if you transform this 13.999 into an integer, it is rounded to 13. Isn't this behavior too prone to cause huge mistakes? Comploose (talk) 19:50, 3 November 2012 (UTC)
- Perhaps so; whenever one converts something of one type into another, there can be issues unless one really understands what's going on. There are three main ways in which to convert a float to an int: math.trunc(), math.floor(), and math.ceil(). Floor and trunc might seem to do the same, but look at how they differ when given a -ve argument:
print int(math.floor(-13.999)), math.trunc(-13.999)
- -- Finlay McWalterჷTalk 20:00, 3 November 2012 (UTC)
- And there are plenty of other complicated conventions for rounding: schemes that round different numbers up or down. A program that is calculating financial data has certain specific needs when converting real numbers to fixed-point representation; a numerical algorithm for modeling certain mathematical equations may have different needs. Programmers should know enough math to make the correct choice for their program. Nimur (talk) 11:38, 4 November 2012 (UTC)
- -- Finlay McWalterჷTalk 20:00, 3 November 2012 (UTC)
Win8 problem
[edit]I tried to install virtually windows 8 and I got this error. Hardware:intel 2 pentium, motherboard:Asus(I can't remember the model)
http://i45.tinypic.com/izt3ya.png — Preceding unsigned comment added by Exx8 (talk • contribs) 17:38, 3 November 2012 (UTC)
- You can find the answer here. Ruslik_Zero 19:22, 3 November 2012 (UTC)
- I do it through a virtual machine.
20:20, 3 November 2012 (UTC) — Preceding unsigned comment added by Exx8 (talk • contribs)
- Real or virtual, PII is not supported by W8. Ruslik_Zero 18:41, 4 November 2012 (UTC)
- Here are Microsoft's requirements for Windows 8. Hint: Whenever Microsoft gives a minimum RAM for Windows - double it (at least). If you have a Pentium II it is time to get a new computer. Bubba73 You talkin' to me? 19:48, 4 November 2012 (UTC)
Comma and dot in programming
[edit]I am a amateur coder that only coded for myself/school and I have a question. There is a game called aurora that has a bug that if you are in a place that use comma for decimals, you need to change in windows to make your system use dot for decimals or the game will show some bugs.
This made me think about something and I have a question about it.
When coding something, if I will do calculations stuff, I will need to create codes to handle this decimal/dot problems (a thing that the developer of aurora didnt one [well i am assuming]) if I dont want that some players experience bugs or make the players need to change their windows settings to not experience bugs? — Preceding unsigned comment added by 177.179.73.100 (talk) 20:11, 3 November 2012 (UTC)
- When you're writing the actual program itself, when decimals are expressed I think you'll always find that the decimal separator in the program's text itself is a period (.). But you're quite right that some places use a comma instead, and a program that takes input from a user (like the game you're talking about, or like a spreadsheet program) should indeed handle the specific locale's convention for writing numbers. Handling this is part of the internationalization and localization process, which is needed to make a program work well for people around the world (there are all kinds of other things to worry about too, in general, not just decimal separators). This can be a lot of work, as there are so many locales around the world, each of which do different things, and you'd have very broad knowledge to be able to get things working everywhere. A saving grace is that many modern languages and software libraries have extensive knowledge about different locales and their many foibles. Here's a simple example, using the Java programming language. I first get a hold of a number formatter which knows about the rules that apply in Italy (one of the comma-decimal countries). Then I use that formatter to parse a comma-separated number string - and the string has been interpreted as 123.4567. But then I load the formatter for the UK locale, where commas are used as thousands separators, and parse the same string - there the number reported is 1234567.
import java.text.*;
import java.util.Locale;
public class num {
public static final void main(String [] args) throws ParseException {
NumberFormat fmt_it = NumberFormat.getInstance(Locale.ITALY);
System.out.println(fmt_it.parse("123,4567")); // prints 123.4567
NumberFormat fmt_uk = NumberFormat.getInstance(Locale.UK);
System.out.println(fmt_uk.parse("123,4567")); // prints 1234567
}
}
- I was not exactly talking about creating some code that would be needed if guys from countries wants to use comma instead of dot in the game/program. Many users are ok with just using (and seeing) dots in the games/programs.
- I was asking if some sort of code would be needed even if dot users will not be able to use/see dot in their game/program, even if they would just see/work with comma in the game, to so, not make bugs happens. — Preceding unsigned comment added by 177.179.73.100 (talk) 21:27, 3 November 2012 (UTC)
- I find your question still a bit confusing, but what I believe you are asking is, will a given program automatically take Windows' localization settings and use them as the default, and will this cause bugs if so? I'm unsure on the answer, but does that clarify the question? --Mr.98 (talk) 01:17, 4 November 2012 (UTC)
- I am sure if that's what you are asking, but ir is very important that you keep things consistent. There are basically three choices: use a period, use a comma or use what Windows tells you to use. The problem is that a program might do different things in different places. Some wrong combinations are easy to spot because they never work, but some are slightly harder to catch. For example, if a program always uses the appropriate separator according to the Windows settings while it comes with data files that are fixed one way or the other, then you have a problem. It will run just fine with the country settings used when it was written and will break as soon as you try to use it with different settings. Of course developers should be aware of things like that, but in the real world they aren't always. KarlLohmann (talk) 05:02, 4 November 2012 (UTC)
Question about LinkedIn
[edit]How to contact someone on LinkedIn without having to register and have to pay a membership? How to invite someone or contact them without having to do so? (payment) Thank you. Netwwork (talk) 22:36, 3 November 2012 (UTC)
- The basic LinkedIn membership is free, so you don't need to pay to join. You can then invite someone to be in your network by providing their e-mail address. RudolfRed (talk) 23:15, 3 November 2012 (UTC)
- Figure out what company they are at, find the company's phone number, and call it and ask for the person. 67.119.3.105 (talk) 15:18, 4 November 2012 (UTC)