Wikipedia:Reference desk/Archives/Computing/2014 June 27

= June 27 =

PDF
I downloaded a PDF scan of a 16th century book from Google Books. While in the site the pages were brown, in the download they were white. Why is that?--85.74.132.122 (talk) 13:36, 27 June 2014 (UTC)


 * Do you have a link to the site? If you were reading the text on the site, then it could be that a background was used, or actual images - the pdf could be a scan that used some form of Optical character recognition to get the text only - or it could just be a different version of the scan, or a scan from a different copy of the text. At any rate, without further clarification, it's not really possible to give a good answer.Phoenixia1177 (talk) 04:21, 28 June 2014 (UTC)
 * Here. And when I downloaded it, the font of the pages was white.--85.74.132.122 (talk) 10:49, 28 June 2014 (UTC)


 * A common first step in having a computer recognize the letters on a printed page is to adjust the image for maximum contrast and convert it to monochrome (shades of grey). That process would take the photograph (which probably had very dark brown lettering on a lighter orangey-brown background - and turn it first into dark grey letters on a lighter grey background - and then (in effect) plot a histogram of the resulting colors making the most common brightness level be white and the less common brightnesses black.   A more sophisticated version of this processing can also take account of the changes in brightness across the page that may have happened because of the way the photograph was taken - or because the paper aged differently from the spine to the opposite sides of the pages.


 * The result preserves the shape of the lettering but produces the effect you're seeing of utterly black letters on an utterly white page. This improves legibility for both humans and computers.  That said, if you want to preserve any pictures or (perhaps) diagrams from the original work - or keep decorative effects like illuminated letters looking good, then you need to keep the original photograph.


 * SteveBaker (talk) 13:20, 28 June 2014 (UTC)
 * And how can I download it?--85.74.132.122 (talk) 15:03, 28 June 2014 (UTC)

How to represent the dot, when you only have 0s and 1s?
How can we represent the dot in 12.34 when you only have 0s and 1s? The 12 and 34 can be converted to binary base, but how would the dot be represented to not be confused with the numeric information? OsmanRF34 (talk) 14:39, 27 June 2014 (UTC)


 * In fixed point notation we'd know where the binary point is so we don't need to record it (e.g. we'll always use n bits for the fraction.) Or we could have a place where we record the number of bits for the fraction (like floating point.)  We could also record it as a fraction; one place has the numerator and one place has the denominator so we could have [1234] and [100] and we'd know to divide them.  We could also record them as a string where we'd use 5 characters '1' '2' '.' '3' '4' (this would take more memory because we'd have 11 symbols, 10 digits and the decimal point but we could also have letters and character so we could have 'a' '=' '1' '2' '.' '3' '4' if we wanted to.)  Is there something in particular you are trying to do and I can be more specific?  RJFJR (talk) 14:55, 27 June 2014 (UTC)


 * no, just wanted to understand it. That's specific enough.OsmanRF34 (talk) 17:13, 27 June 2014 (UTC)


 * It should be added that, of the various representations that RJFJR mentions, floating point is by far the most common in practice. This is similar to the scientific notation that represents the number 12.34 as 1.234&times;101.  The 1.234 part is called the mantissa and the 1 is the exponent.  The number 12.34 converts to binary as a non-terminating decimal, 1100.0101011100001010001111010111..., but the computer will store a fixed number of bits. Say there are 32 bits for the whole number. These might be allocated, depending on the computer, as 1 sign bit and 23 other bits for the mantissa, and 1 sign bit and 7 other bits for the exponent. Then 12.34 will be viewed as equivalent to +1.10001010111000010100011&times;10+0000011 (where all of that is in binary, i.e. 10 means 2) and the computer would actually only store the bits that I have shown in boldface. Other variations have been used, but that's the idea. --70.49.171.225 (talk) 23:13, 27 June 2014 (UTC)
 * I'd also add that the bits after the dot correspond to negative powers of two, much like the digits .34 correspond to negative powers of ten. Remember that a-n=1/(an). Thus +1.10001010111000010100011&times;10+0000011 is (1+1/2+1/32+1/128 etc)*2³=(1+0.5425)*8=12.34, much like 12.34 is 12+3/10+4/100 Asmrulz (talk) 18:36, 28 June 2014 (UTC)


 * piss easy. Do this. First convert decimal to binary. Then
 * Represent a
 * 1 with '1'
 * 0 with '000'
 * DOT with '010'
 * 202.177.218.59 (talk) 03:14, 30 June 2014 (UTC)
 * IP 202.177, you might have to add an end-of-string symbol. 001 or 011 would do. If you use a fixed number of bits, you can use 1 = '10', 0 = '00', and '11' for the dot. Adding '0' bits at the "right" / "least significant" end won't change the value of the number then.
 * IP 70.49 mentioned floating-point representation, and RFJFR mentioned fixed-point. Actually, there are two ways to do fixed-point arithmetic:
 * Take the last place as the unit (i.e. 0.01 in the example) and store 1234, not 12.34. This is great for precision (it's basically the "rational" idea, with the denominator hard-wired to 100) and financial computing, but if 12.34 isn't exact, that's usually not needed.
 * When speed is more important than last-bit precision, one would pick a power of two that's sufficiently small (so 1/128 = 0.0078125 would do), and store the integer closest to 27 * 12.34 = 11000101011.10001... in binary; that would be 11000101100, or 1580 in decimal.
 * The 23 bits are the significand; a 'mantissa' is the decimals of a logarithm (if L is a logarithm, L – [L] is its mantissa).
 * As a zeroth-order approximation, the significand behaves like a mantissa; if one increases, the other will increase, too. In binary, the leading bit can be omitted, and thus, if the mantissa is zero (i.e. if the number is a power of two), the significand will be zero, too. - ¡Ouch! (hurt me / more pain) 08:28, 30 June 2014 (UTC)
 * As a zeroth-order approximation, the significand behaves like a mantissa; if one increases, the other will increase, too. In binary, the leading bit can be omitted, and thus, if the mantissa is zero (i.e. if the number is a power of two), the significand will be zero, too. - ¡Ouch! (hurt me / more pain) 08:28, 30 June 2014 (UTC)

How would a computer differentiate a baseline dot in different contexts?

 * See ASCII. A decimal point (full stop) is coded in binary as.
 * —Wavelength (talk) 18:57, 27 June 2014 (UTC)


 * How would a computer differentiate a baseline dot in different contexts?
 * a sentence:  This is 2014. 
 * a decimal fraction:  2.718281828 
 * a web address:  www.nytimes.com 
 * a string of gibberish:  zxcvbnm,./ 
 * —Wavelength (talk) 20:55, 27 June 2014 (UTC)


 * (part of this conversation is missing, this part, and is not a reply to Wavelength) Don't be a jerk about it - that you are taking the "dot", part of the string representation of the number, to actually be part of the number, based on your responses, it's not shocking that someone might think you were talking about strings as opposed to numbers - moreover, numbers are not "at a lower level" than strings, ultimately they're all just binary that the computer manipulates in a way that is meaningful on the basis of the programmer. As for the question, all data of a given type is mapped onto binary strings, this can be done in a number of ways (though, it is standardized). Finally, the decimal point, as mentioned, is not part of a number, it is part of the representation that divides the tenths and one's place (and could have been placed for any other divide, we use it where it is because integers are common enough that we divide at that point) - as for how floating point get's stored, see Floating point, IEEE floating point, , , , for the general idea of what people do/use.Phoenixia1177 (talk) 04:18, 28 June 2014 (UTC)


 * Wavelength asks some perfectly valid Q's, they just don't happen to be your Q, so I broke them off as a separate Q. StuRat (talk) 13:00, 28 June 2014 (UTC)


 * Personally, I think it's a bad idea to try to distinguish them, except perhaps for the decimal point, when coded as part of a fixed or floating point number. A similar problem comes up with all the variations on dashes (minus sign, em dash, en dash, etc.).  Where symbols look identical, or similar, if you give people the ability to specify each with a different code, you can predict that many will be coded incorrectly, and that it will be difficult to tell, precisely because they look identical or similar.  So, your database will then be full of errors, and searches for a string which contains those characters will then need to take into account all of the possible errors of that type or fail to find the search string.  This requires more sophisticated programming, testing, computing resources, etc., and all for very little benefit.  For example, if a spacecraft reads navigation coords from a file, and there's some other dash where a minus sign should be, or some other baseline dot where the decimal point should be, then the ship might end up crashing. StuRat (talk) 13:08, 28 June 2014 (UTC)

Avast advertising copyvios ... what's their game?
There's a free virus program called Avast! that is running an ad trying to get users to sign up to its VPN. Its latest hook is "Access your favorite content - surf anywhere without limitation - unblock your favorite video content - Appear as if you're somewhere else". The ad actually displays the YouTube "unhappy face" screen with "This video is not available in your country."

I have to ask - what's the game here? Everyone knows a VPN can be used to bypass certain crude access restrictions, but I thought any sane VPN vendor would steer way clear of suggesting users use it "for the purpose of circumventing copyright". So it seems like some kind of suicide play. Then again, with any free antivirus you wonder who the customer is - is it possible they are running an outright sting against the users, who will get hit up for incredibly inflated lawsuits for trying to access the banned content? Or could it be part of some sinister masterplan to get VPNs banned? (You may notice that while the Turks spun their wheels a little while, Iraq wasted absolutely no time at all recently locking down their internet against any VPN. Pity they can't lock down their territory... ) I'm totally confused - is there an actual explanation somewhere? Wnt (talk) 16:19, 27 June 2014 (UTC)


 * "We don't answer requests for opinions, predictions or debate". AndyTheGrump (talk) 16:41, 27 June 2014 (UTC)


 * I'm not sure that there are any laws against bypassing regional lockout systems. It's legal to own a region-free DVD player in the U.S., for example. -- BenRG (talk) 07:29, 28 June 2014 (UTC)


 * Unless such a system falls under the DMCA's anti-circumvention measures? See http://cyber.law.harvard.edu/openlaw/DVD/1201.html, for example. —Noiratsi (talk) 06:29, 30 June 2014 (UTC)

Recovering my XP Machine
I want and need to recover my HP computer with XP operating system. But now that any updates are no longer available, how can I download any updates that are installed on my XP machine and save them to a disc and reinstall the updates again after I finish recovering? I have the XP operating system on a disc. Yet I don't want to loose the updates are that installed up to April 14, 2014. I appreciate any one's help on this matter if this can be done.

polkateerPolkateer (talk) 22:23, 27 June 2014 (UTC)
 * This is a common misunderstanding. Microsoft is not releasing new updates with the exception of recent IE fixes. They are still activating XP and still deploying available updates. --  Gadget850talk 00:35, 28 June 2014 (UTC)


 * It's not clear that they've even stopped new updates completely either - I'm on XP and I've had at least two updates since the supposed cut off date. It could be that updates intended for Vista but which still work in XP are still being sent out. Matt Deres (talk) 15:40, 28 June 2014 (UTC)
 * In May, Microsoft issued patches for Internet Explorer for all platforms including XP. --  Gadget850talk 02:23, 29 June 2014 (UTC)