Wikipedia:Reference desk/Computing
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information – it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
June 1
Two programs having the same name in Windows
I've got two versions of the Python interpreter (2.4 and 3.6). Both are called "python" but are in different directories. To execute a script (just a text file) with Python 3.6 I go: right-click the script, "Open with...", "Choose default program", "Browse", get to Python 3.6 and click "Open". But the script gets executed with Python 2.4. Now if I rename the Python 3.6 executable to "python36" then the script gets executed with Python 3.6 as I want. Why? Does anyone understand what's going on? Thanks. Basemetal 13:33, 1 June 2018 (UTC)
- You should search the internet for how to run two versions of Python simultaneously. Ruslik_Zero 19:43, 2 June 2018 (UTC)
- Install the version you'll really use as the last one. It seems to be a problem in your PATH. You probably have PATH=c:\python\2.4;c:\python\3.6. Windows picks the first python it finds. --Doroletho (talk) 00:00, 3 June 2018 (UTC)
- What you say is no doubt true but is still no explanation of what's going on in this case, because, rememeber, I said I use "browse" and then explicitly open the version I want and Windows still manages to pick the other one. Your advice to just ditch one Python version is good except I can't for the moment as one version is used by GNUSolfège and the other is the one I use. Once I can get rid of GNUSolfège, which I only have in order to find out how to access my sound module from Python, then "uninstalling" GNUSolfège will automatically get rid of that version of Python. I do for the moment get by with the workaround of renaming one of the two Python executables, but I do find the question itself ("theoretically") interesting so I was curious. Basemetal 15:47, 3 June 2018 (UTC)
- I have no serious idea what causes the described behaviour. I can speculate that when you do "open
foo
with/some/dir/stuff.exe
", what really happens behind the scenes iscd /some/dir; stuff foo
and then thestuff
is taken from the path rather than from the current directory, but that would mean (1) that the path comes before the current dir in the priority order and (2) that "open with..." does not use the natural implementation/some/dir/stuff foo
, both of which seem improbable.
- However, instead of manually browsing to the Python version you want... The "good" solution is a shebang line at the start of the script to tell the OS which of the Python versions to use. That is not available on Windows, but there are ways to make it work (assuming you have admin rights, at least). TigraanClick here to contact me 07:45, 5 June 2018 (UTC)
- You probably launch not a python executable by a python launcher ('py'). It can launch any version of python if configured appropriately. See this. Ruslik_Zero 09:19, 6 June 2018 (UTC)
- Not clear who you're replying here but your link is useful, so thanks. Are you an experienced Python programmer? Basemetal 16:33, 6 June 2018 (UTC)
- And by the way, thanks also to the other respondents namely Doroletho and especially Tigraan. Basemetal 16:35, 6 June 2018 (UTC)
June 2
Workspaces, virtual desktops in Windows (or the lack thereof)
Why hasn't Microsoft integrated workspaces earlier on in their OS? After all, it's a pretty cool feature, and MS has a long track record of copying cool stuff from other OS. It just appear as 'Task View' in Windows 10. There was also Windows XP PowerToy, but this was not really a central aspect of the OS.--Doroletho (talk) 23:58, 2 June 2018 (UTC)
Windows Error (Major)
My PC ran into an error along the lines of "Windows ran into a problem, we will collect error info then you can restart" after I restarted there is literally nothing on the hard drive anymore (not even the OS or partitions. I would be very grateful if anyone can tell me if they have experienced this before or how to help. Thank you in advance! — Preceding unsigned comment added by 185.222.216.187 (talk) 23:59, 2 June 2018 (UTC)
- This sounds like a serious problem with your hard drive. I suppose it could be malware, but I'd try booting from a CD or thumb drive, then examining the hard drive. Perhaps someone here can recommend the best recovery software to use, but don't write anything to your hard drive in case it overwrites important files. Normally, windows will run checking and repair software, but if it cannot load the system, then it is not able to do this. I hope you have a backup of your data. Dbfirs 06:54, 3 June 2018 (UTC)
June 3
qq mail and idiotic downloading behaviour
Hi all, at work, the people at the front desk use qq mail as a mail program. I have no real choice in this. So when I send an attachment to the front desk at work, it downloads with the filename, and appends the number " (1)" at the end. If you download again, it will append a " (2)", etc. So if I send a file called "Hello.txt", it will get saved as "Hello (1)".txt. Worse, there seems to be no way to stop this, so if you manually edit and delete the (1) before saving, it makes no difference. It still saves with the (1) for some reason, because apparently deleting the (1) only changes the record of the download, not the name it ultimately saves to. I find this a kind of preternatural stupidity. Does anyone know what is going on, and how to stop it? I get that not many people use qq mail (it's a Chinese thing), but someone might have, or someone might have seen something similar, and know what is going on anyway. IBE (talk) 10:28, 3 June 2018 (UTC)
- If you try to save a file named "Hello.txt" in your Downloads folder and there is already a file with that name, it will save it as "Hello(1).txt", to avoid overwriting the existing file. If both "Hello.txt" and "Hello(1).txt" already exist, it will name the new file "Hello(2).txt", and so on. If you want to save the file as "Hello.txt" you need to move, remove or rename the existing "Hello.txt" file first. Generally it's good practice not to keep files in your Downloads folder; rather you should move the file to a more permanent location if you need to keep it, or just delete it after viewing it if you don't need to keep it. CodeTalker (talk) 15:55, 3 June 2018 (UTC)
- I see, thanks. My computer doesn't do this. Is this because I've set it to ask me every time where to put something? So it doesn't send to downloads folder, and lets me choose (and then accepts my choice of folder, with my choice of filename)? Because if so, the simple solution is just to set the thing not to go to Downloads, but to just ask which folder. IBE (talk) 16:36, 3 June 2018 (UTC)
- It doesn't matter which folder you save to. If there is already a file with the same name in the folder, the same thing will happen. Of course if you're given a choice of destinations, you can choose a folder which you know does not contain a file with that name. Whether you're given that choice or not may be a setting inside qq mail -- I've never used that program so I don't know for sure. CodeTalker (talk) 02:02, 4 June 2018 (UTC)
June 6
youtube-disputes+3ncfuutagcay804
I'm currently in a dispute with YouTube and the email confirmation of receipt of my complaint came from outlandish youtube-disputes+3ncfuutagcay804(at)google.com (naturally not mentioned anywhere). I suspect it to be automated, but 1) it isn't marked as such; 2) there's no notice advising against replying and 3) my reply to that email was not rejected. So is this address a thing worth of waiting for? Brandmeistertalk 20:03, 6 June 2018 (UTC)
- My guess is that "+3ncfuutagcay804" is a way for whoever is monitoring that address to track your case. Gmail will ignore the plus sign and everything after it and deliver the email as if it weren't there, which allows the user to filter emails based on the additional string [1]. I would assume Google's in-house email system works similarly. clpo13(talk) 20:20, 6 June 2018 (UTC)
- The trick with the plus sign and the label is actually broader than gmail, it's a standard defined by RFC5233, see Email_address#Subaddressing for more details. Jahoe (talk) 09:49, 8 June 2018 (UTC)
June 8
Bluetooth Issue and Voice on GPS
I am using a Samsung Galaxy J7, with the Android version 10 operating system, using Google Maps for GPS. (I know that there may be better apps for navigation. That is not this question.) What I seem to have observed is that if I have Bluetooth turned on on the smartphone, and turned off on the Chevy, there are no voice commands from navigation, only map instructions. I don’t want to turn Bluetooth on on the car, because that will use Bluetooth in place of AM/FM/satellite radio. Is the phone just sending the voice commands to the car and having them fall into a bit bucket? Is this just the way it is, or can I do something? Robert McClenon (talk) 17:01, 8 June 2018 (UTC)
Hi,
The article should include the meaning for the green and red triangles in the list. I have no clue what they mean. Thanks a lot! Ericdec85 (talk) 17:12, 8 June 2018 (UTC)
- It does explain with mouseover text that green up arrow is an increase from previous ranking and red down arrow is a decrease from previous ranking. 209.149.113.5 (talk) 18:56, 8 June 2018 (UTC)
- No, actually, it just says "Increase" and "Decrease" (and "Steady" for the blue dash). It doesn't say what the number means. It doesn't say if "Increase" means a change to a higher ranking or a higher-numbered (i.e. lower) ranking, and it doesn't say what the number means. I can guess but I shouldn't have to guess. As it stands, the table is using a shorthand notation appropriate for people already familiar with it, but that is not all readers. It needs an explanation in words (or a link to some other article where such notation is explained), probably at the top of the table where it talks about changes in ranking. Similarly the column headings should mention that they are showing a ranking and change. I'd do something myself but the article is semi-protected. --76.69.118.94 (talk) 22:55, 8 June 2018 (UTC)
June 9
Semantic hierarchy principle?
Is there a name for the following principle in programming language design?
- Each node in the abstract syntax tree should correspond to a substring of the program text, with each node's substring being disjoint from its siblings' and contained by its parent's.
- The node's semantic meaning should be determined principally (if not entirely) by its substring and lookup of any names therein.
An example discouraged by this principle is the compound comparison in Inform 6: x > 3 or y
means , whereas x == 3 or y
means . This makes it difficult to assign any meaningful semantics to the 3 or y
AST node: it is treated as an _instruction_ to generate code to repeatedly apply the nearby operator. (One can salvage the situation by deeming it to represent a lazy sequence over which comparisons are mapped, but having such an entity appear in place of an expression is strange since it cannot appear in any other context where an expression is allowed.) In Haskell, by contrast, one could create a saturating monad from (x >)
or (x ==)
and apply it to each element of a list [3,y]
but that list has a fixed set of semantics independent of the tests performed on its members.
The second point is related to the idea of using context-free grammars for programming languages, but differs in two ways:
- The concern is with the (human-centric) semantics of a construct, not its initial parsing.
- A CFG says that what may mean some fixed thing (what may be reduced to a given non-terminal) does not depend on context, whereas #2 says that what some fixed thing means (to what a substring may be reduced) does not depend on context.
I think I've seen something written about it, maybe even on Wikipedia, but my searching has been unsuccessful. Thanks for any pointers. --Tardis (talk) 04:03, 9 June 2018 (UTC)