Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 20: Line 20:


:Try looking at it with a text editor,and if the numbers are not there, then they were not saved. [[User:Dbfirs|<span style="font-family: verdana;"><i style="color: blue;">D</i><i style="color: #0cf;">b</i><i style="color: #4fc;">f</i><i style="color: #6f6;">i</i><i style="color: #4e4;">r</i><i style="color: #4a4">s</i></span>]] 15:02, 14 April 2019 (UTC)
:Try looking at it with a text editor,and if the numbers are not there, then they were not saved. [[User:Dbfirs|<span style="font-family: verdana;"><i style="color: blue;">D</i><i style="color: #0cf;">b</i><i style="color: #4fc;">f</i><i style="color: #6f6;">i</i><i style="color: #4e4;">r</i><i style="color: #4a4">s</i></span>]] 15:02, 14 April 2019 (UTC)
** No number at all. What to do?--[[Special:Contributions/103.231.162.134|103.231.162.134]] ([[User talk:103.231.162.134|talk]]) 12:00, 15 April 2019 (UTC)


= April 11 =
= April 11 =

Revision as of 12:00, 15 April 2019

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

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.
See also:


April 9

How to retrieve phone contacts from google drive or gmail. ?

Hello there, I had the motherboard of android phone (Huawei Y 5II) replaced by customer care technician. Before replacing, technician helped me to moved all files to google drive. I have recovered all files except contacts. I have tried to retrieve them from gmail and google drive with no results. The only thing I retrieved a excel file named, "contacts.csv". But when I opened the file there are no contacts except random words like, Name, Initials, name suffix and some other words. How can I get back contacts? Would you be open minded to help me out ? Thanks in advance. --103.231.162.134 (talk) 18:17, 9 April 2019 (UTC)[reply]

Did you import the csv into Excel? A csv file is just comma separated variables, so it should load into any text editor or word processor. If you cannot read it in a text editor then it is probably corrupt unless it was saved in some special format designed to load back into the phone. Your technician might know. Dbfirs 19:13, 9 April 2019 (UTC)[reply]
Try looking at it with a text editor,and if the numbers are not there, then they were not saved. Dbfirs 15:02, 14 April 2019 (UTC)[reply]

April 11

Closing CMD prompt while a process is running

Hello, I was just running a DISM.exe scan on Windows 8, which is done via command prompt. The percentage progress etc is shown in the cmd window. I accidentally closed the cmd window. Does that stop the process, or if not, how do I check the process’s progress? Thanks Amisom (talk) 20:48, 11 April 2019 (UTC)[reply]

Yes, when you run a program within a command prompt, note how the command prompt's title bar changes to show the name of the exe running within it. This is the same as running a dos-like exe separately and having it flash up a command prompt box then disappear as it finishes. With command prompt though, that same exe is running within the cmd.exe interpreter, but still has a path to the rest of the system. So if you close cmd.exe with a program running inside it, that program gets closed too. RegistryKey(RegEdit) 04:44, 12 April 2019 (UTC)z[reply]
I am not sure that DISM.exe is a dos-like program. It is win64 application (in 64-bit system) and it does not run within cmd. Ruslik_Zero 20:34, 12 April 2019 (UTC)[reply]
You should be able to see whether DISM is still running using Task Manager. Mitch Ames (talk) 08:25, 14 April 2019 (UTC)[reply]

April 14

lighttpd on windows

Hi, I'm trying to change html in templates but the changes have no effect when I restart lighttpd service. Maybe restarting the svc is not sufficient? Maybe the actual physical path configured is not the one I think it is? Thanks 2A01:E35:2E45:30A0:68C1:B0C3:F4ED:906A (talk) —Preceding undated comment added 14:14, 14 April 2019 (UTC)[reply]


April 15

How do you read a text file from elsewhere in a Python program?

How do you read a text file from elsewhere in a Python program? I'm talking about a Python program being in one file and having a text file from elsewhere be imported into this file. Futurist110 (talk) 00:42, 15 April 2019 (UTC)[reply]

If you are just talking about reading a text file for data into a python program, you can use the open() function. See here. 74.88.70.115 (talk) 01:12, 15 April 2019 (UTC)[reply]
OK, but I meant to retrieve a file from elsewhere and put it into a program in a different file. Is open() really the only thing that one has to do? Futurist110 (talk) 03:55, 15 April 2019 (UTC)[reply]
Oh, you mean to insert the contents of the file as part of the program, like #include in a C program? I don't know how to do it in Python, so that's the limit of my contribution. --76.69.46.228 (talk) 04:24, 15 April 2019 (UTC)[reply]
So we need to distinguish a few things here. If you have a Python program foo.py and you wish to use bar.txt as data, such as simply printing the file, you can do something like
mytext = open("./bar.txt").read()
print (mytext)
Here, mytext is a string containing the entire contents of bar.txt
However, I think what you're asking is this: In program foo.py you want to be able to import the contents of another script bar.py, which is a Python file containing some functions, :::etc. In this case, you can simply import whatever you want. For example, if bar.py contains a function baz(), and both scripts are in the same directory, you can have in foo.py :::something like this:
import baz from bar
baz()
Just to cover all the bases, if you want to execute the entire contents of bar.txt in your script, then you would write something like:
myscript = open("./bar.txt").read()
exec(myscript)
There is another function eval() which has different properties, see here for all the details :::between the two. 69.122.136.2 (talk) 04:32, 15 April 2019 (UTC)[reply]