Wikipedia:Reference desk/Archives/Computing/2015 September 15

= September 15 =

problems with two browsers
In both cases I have the latest version of the browser, which I installed after the problems occurred, but the problems persisted.

1. The first issue is probably virus-caused. In Chrome only (not Firefox), when I typed in en.wikipedia.org, a red screen came up screaming I was going to a page with malware! It was clearly malware itself, and it wouldn't let me cancel it, so I stopped Chrome using Task Manager. Note that I could load other pages into Chrome, but when I tried en.wikipedia.org again I got yet a DIFFERENT warning screen. One was trying to emulate the old Windows blue screens. Trying again, I got redirected to various (what I think of as) adware sites. I didn't click on any of them but kept on using Task Manager. I trying re-downloading Chrome but the same thing keeps happening. Any ideas?

2. With Firefox I think I may have received an automatic update that hides the upper control lines unless you pass the cursor over them. Is it true that Firefox now works like this? I could live with that, but it also hides the system tray below, thus keeping me from other programs I'm running. No amount of probing and clicking in the lower part of the screen has allowed me to see the system tray. Is that normal? I can get around using ALT-ESC, but that is obviously not acceptable.

3. Also, earlier, Firefox lost my saved tabs and apologetically offered to restore them. This has happened before and the tabs were restored without problem, but now it is unable to do it. Could Firefox be corrupted? If so,is there anything I can do?

Can you help? Thanks, --Halcatalyst (talk) 00:52, 15 September 2015 (UTC)


 * I numbered your problems. Number 2 is probably Firefox being in full-screen mode. Try pressing F11. For number 1, I would try deleting your Chrome profile if there's nothing in it that you care about saving (stored passwords, browser history, etc.). On Vista and above, press Win+R to bring up the Run dialog, type "%LOCALAPPDATA%\Google\Chrome", and delete the "User Data" folder. -- BenRG (talk) 17:41, 15 September 2015 (UTC)


 * Firefox works now, but Chrome still delivers the malware. --Halcatalyst (talk) 03:55, 16 September 2015 (UTC)


 * Given what is happening with Chrome, is it safe for me to run? --Halcatalyst (talk) 12:48, 16 September 2015 (UTC)


 * You need to find the malware that is acting as a Chrome plugin and remove it. Chrome isn't the malware, so reinstalling that won't help. You've installed malware separately that is working with Chrome. 209.149.113.66 (talk) 14:41, 16 September 2015 (UTC)


 * I reset to the factory settings and the malware is gone. Thanks, all. --Halcatalyst (talk) 21:06, 16 September 2015 (UTC)


 * I wonder how the malware was able to target Wikipedia specifically? Also, sometimes it put up the phony security alerts and sometimes links to apparently real buy sites. What was going on? --Halcatalyst (talk) 21:38, 16 September 2015 (UTC)


 * I'm not a huge expert old boy, but I believe certain viruses and malware can play silly buggers with something called the HOSTS file in Windows - this is something your browser looks at when you type in a web address and go to it and malicious software can put a line in the file redirecting you from your desired destination to a different page. Since we're so a dashed popular site, it would make sense for them to redirect you to where THEY wanted you to go - they often also redirect you away from known anti-virus and anti-malware sites. I strongly advise you to run a full system scan for viruses and malware old bean - MalwareBytes is good for malware and AVG or Avira are good against viruses. Chin chin! Quintessential British Gentleman (talk) 18:42, 18 September 2015 (UTC)


 * The hosts is a part of the TCP/IP stack. If it had been compromised, it would affect all web traffic.  Since Halcatalyst only reported the first issue with Chrome, it's unlikely that this was the problem  But the hosts file is a plain text file.  If you want to know if it has been compromised, you can just open it up and take a look.  By default, it should be empty (save comments), at least it is on Windows.  A Quest For Knowledge (talk) 14:06, 20 September 2015 (UTC)

Image difference between photographing instead of scanning
Can the recipient of some images notice whether they were scanned or photographed? He expects scanned images of some documents.

The photos would be taken placing the documents below a glass plate and the camera attached to a tripod. --Scicurious (talk) 08:04, 15 September 2015 (UTC)


 * I can only guess but I think reflections off the glass plate could reveal that the image was not created using a scanner. The plane of the document would also have to be parallel to the plane of the light-collecting element of the camera to prevent the document from appearing tapered. Bus stop (talk) 08:18, 15 September 2015 (UTC)


 * He should be able to tell the difference simple by looking at the EXIF incorporated into the image file. The recipient may well have asked for scanned images just as a convenient turn of phase, so just ask  if photographed copies are acceptable -as that is all you can supply. Remember that you may have to crop and reduce the image to a size suitable for emailing.--Aspro (talk) 13:38, 15 September 2015 (UTC)


 * "Not photographed" commonly means "we won't accept a photo from your phone." Technically, a scan is a very slow progressive photograph. There is no reason a scanner couldn't just snap a single photo. It just isn't how they are designed. 209.149.113.66 (talk) 14:50, 15 September 2015 (UTC)


 * A digital camera of 2 Mega pixels can take a readable picure of a letter or DIN A4 size paper when fitting zoom or distance to small borders on the picture. Scanners for home usage might be slower. In history Germany enforced the scanners to be slower that needed by law due an controversal argumentation about copyright. While the flat scanner returns a proper and consistant image in measure and brightness, the camera does anything. When trying to process OCR form cameras picture, it may fail due light conditions. -- Hans Haase (有问题吗) 16:49, 15 September 2015 (UTC)


 * It is quite difficult to take a camera picture of a document, and maintain exact aspect ratios and right angle corners. You may need to adjust using image processing software that can make the adjustments, and then crop. As others have mentioned, uneven lighting is also a giveaway. If you really want to fake it, you'll need to fiddle with the EXIF data. Exiftool should be able to do that. --NorwegianBluetalk 21:28, 17 September 2015 (UTC)

Underscore as (not) a word separator
Is there any technical or historical background why underscore is treated like a letter but not as a typographic symbol and word separator? E.g. foo-bar, foo.bar, foo&bar, foo!bar, foo"bar etc. are two words but foo_bar is always one.--Lüboslóv Yęzýkin (talk) 11:32, 15 September 2015 (UTC)


 * Not always two words: foo-bar is a single word e.g. for LISP programming language (see spinal-case / kebab-case in Letter case) and foo.bar is a single word e.g. for XQuery. --CiaPan (talk) 12:44, 15 September 2015 (UTC)


 * Treated by what? It depends which application and operation you're using. If you open the edit window on this section and move the cursor forward word by word (CTRL->) you will find ALL those symbols are treated as word separators.--Shantavira|feed me 13:12, 15 September 2015 (UTC)


 * Treated by their respective interpreters/compilers. --CiaPan (talk) 13:46, 15 September 2015 (UTC)


 * I think you have it backwards. In English, the hyphen is used in compound words, but not the underscore. StuRat (talk) 13:42, 15 September 2015 (UTC)
 * This is the computing desk so I assume the poster has computing in mind, especially Identifier. foobar examples is also mainly used in computing. PrimeHunter (talk) 13:53, 15 September 2015 (UTC)
 * Well, in the 1970s when I was using COBOL, hyphens were used within identifiers, in keeping with the idea that the syntax of the language would resemble English. We didn't have underscores on our keypunches anyway (see Asmrulz's item below).  You would write things like    The hyphen was also used as a minus sign if you used the   keyword, but in this case you had to set it off with spaces:  . (I forget whether you used   or the   sign with   in order to tell it where to store the result.) --65.95.178.150 (talk) 00:04, 16 September 2015 (UTC)


 * Just an observation: in MATLAB, '-' is reserved for subtraction, so "foo-bar" is interpreted as the difference between two variables, while "foo_bar" is a single name. I have no ref, but this seems to be a reasonable approach and good technical reason: many (most? all?) of your other examples have prior restricted use in at least some contexts, while '_' was still fairly free. When designing a new language/parser, etc., my understanding is that some Operator_overloading is tolerable, but most people agree it's best to avoid it when possible. SemanticMantis (talk) 14:38, 15 September 2015 (UTC)


 * Ken Thompson used regular expressions before and during development of Unix. His personal taste is to make compound words using underscores, not camel-case. So, when we used the "word character" option in regex, he included the underscore. In his use, the underscore was part of a word. Regular expressions, in common use, are descendant from Ken Thompson's implementation. The two main variations we see are POSIX (Thompson's format) and Perl - which also treats _ as a word character. 209.149.113.66 (talk) 14:39, 15 September 2015 (UTC)


 * "The common punched-card character sets of the early 1960s had no lower-case letters and no special character that would be adequate as a word separator in identifiers.[citation needed] IBM's EBCDIC character-coding system, introduced in 1964 at the same time as the IBM System/360 computer series, uses 8 bits per byte. A modest increase in the character set size over earlier character sets added a few punctuation characters, including the underscore, which IBM referred to as the break character, but not lower case (later editions of EBCDIC added lower case). IBM's report on NPL (the early name of what is now called PL/I) leaves the character set undefined, but specifically mentions the break character, and gives RATE_OF_PAY as an example identifier.[1]"


 * I'd speculate the underscore was chosen as an intra-word separator simply because it looks like a blank without being a blank and (due to its recent history) without having the cognitive baggage as carried by the dash and other punctuation (or, as has been mentioned, some prior use, e.g. "-" as the minus operator, "." to access struct members, "&" for bitwise and, etc) Asmrulz (talk) 21:05, 15 September 2015 (UTC)
 * So if I understood right from 209.149.113.66's comment it was intentional, so if one wants to make one word from two or more but does avoid camelCase then one uses underscore. To be clear, I asked myself this question after having read articles (like that) that Google does not interpret foo_bar as two words. Also I saw other symbols in the place of blanks (namely dot and plus sign) in file names, though I'm not sure why such is being done.--Lüboslóv Yęzýkin (talk) 05:45, 20 September 2015 (UTC)

Troubleshooting an LCD Display
I have a DCM16433 16x4 LCD display that, for the life of me, I cannot interface with my Arduino. Right now, I have removed the Arduino from the equation, to see if the LCD works by itself. I have it wired to +5 DCV and ground, and the contrast pin wired to a 10k pot. When I turn on the power, I get nothing "onscreen", no matter what position the pot is in. I swapped the LCD out for another one, and I saw the underscore character onscreen, which means it works. Is there anything else I can do to verify the LCD just doesn't work before I order another one? My only concern is that the LCD I swapped in is hooked up to a 3-pin serial controller (+5, ground, and data), while the one that isn't working is on a 14-pin board. I feel like I'm missing something--in my experience, components are very rarely just bad; but I don't know what else to check. OldTimeNESter (talk) 23:13, 15 September 2015 (UTC)