Wikipedia:Reference desk/Archives/Computing/2015 August 17
Computing desk | ||
---|---|---|
< August 16 | << Jul | August | Sep >> | August 18 > |
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. |
August 17
[edit]Facebook: "Getting back onto Facebook"
[edit]I keep getting those, mostly at times that I am either asleep or away from any computer or device. Is it someone trying to get into my account? I checked the e-mail's details and they seem legit. I tried logging off and attempting to simulate someone hijacking the "I forgot my password", but instead I got a different e-mail with a 6-character code. I don't really care that much about my security being compromised (overkill 128-char random pass + two-factor auth), it's just relatively annoying. Screenshots: http://i.imgur.com/5xewZEP.jpg & http://i.imgur.com/4nNTsZQ.jpg Matt714 (talk) 01:37, 17 August 2015 (UTC)
- Apparently it's generated when too many incorrect password attempts are made. I suppose there's a bot out there somewhere that's trying to crack your password randomly, which is annoying but wouldn't be a problem with your security settings. Alternatively, it could be an attempt at phishing - can you check if the link URL a valid Facebook one (without clicking it, obviously!)? I guess the fact it's signed reduces that risk though. Anyway, all you can really do is set up a rule to put those messages in a folder you don't care about, or change the primary email address on your account. Smurrayinchester 09:15, 17 August 2015 (UTC)
Yeah, I also thought it was a bot. Thanks for your input. Matt714 (talk) 04:17, 19 August 2015 (UTC)
USB to notebook power adapter for charging
[edit]In my R.V, I have wired in a USB socket. Is there an adapter that can convert the usb to a plug that can go in my notebooks socket. Bearing in mind the rv socket is rated 5amps max. — Preceding unsigned comment added by 80.195.27.47 (talk) 13:08, 17 August 2015 (UTC)
- Nope, sorry. USB just cannot provide the power need to recharge the notebook battery. A laptop charger delivers around 19V at 5A (varies with each model). A USB port used for charging delivers 5V at 500mA up to 1000mA or 2000mA. So, the amperage is completely different. Justin15w (talk) 15:49, 17 August 2015 (UTC)
- You're right about the power, but the voltage is't that important. It matters in that you will need around 20A (to achieve 19V 5A), which is quite high, but still plausible in certain scenarios (although definitely not with USB). But the voltage itself isn't the limitations, there's no reason you can't use a boost converter to give 19V. After all, the RV probably has a 12V or 24V battery, but some RVs have inverters to give 220-240V or 100-120V sockets. And the must be using a buck converter to give the 5V for the USB, and will either need a boost or buck if you get a adaptor for the Cigarette lighter receptacle (which really is mostly used as a power outlet nowadays). Nil Einne (talk) 18:48, 17 August 2015 (UTC)
- Thank you for the clarification and explanation. I changed the word in the last sentence to "amperage." Justin15w (talk) 22:08, 17 August 2015 (UTC)
- You're right about the power, but the voltage is't that important. It matters in that you will need around 20A (to achieve 19V 5A), which is quite high, but still plausible in certain scenarios (although definitely not with USB). But the voltage itself isn't the limitations, there's no reason you can't use a boost converter to give 19V. After all, the RV probably has a 12V or 24V battery, but some RVs have inverters to give 220-240V or 100-120V sockets. And the must be using a buck converter to give the 5V for the USB, and will either need a boost or buck if you get a adaptor for the Cigarette lighter receptacle (which really is mostly used as a power outlet nowadays). Nil Einne (talk) 18:48, 17 August 2015 (UTC)
- (Edit conflict) USB is 5 volts. 5 volts * 5 amps gives you an absolute maximum of 25 watts, and most laptops would struggle to run off that. (As an aside, have you checked whether your socket is 5 amps, or 2 2.5 amp ports? Some USB sockets seem to trip when a power-hungry tablet is plugged in, even if they theoretically have enough current) Looking online, no-one actually makes a USB to laptop adapter (partly because there are too many laptop plug types, I expect, and partly due to the additional complexity of having to add a custom power-brick to transform 5 volts to the computer-standard 18 volts). You could however buy yourself a USB-charged laptop - the HP Chromebook charges off micro-USB, and "only" takes 3 amps. Smurrayinchester 15:50, 17 August 2015 (UTC)
- Your RV probably also has a cigarette lighter/utility charger, and I bet that can provide enough wattage, if you can find a converter for it. StuRat (talk) 15:54, 17 August 2015 (UTC)
- Don't RVs have standard power sockets? I don't actually know, but I would kind of expect them to, maybe outside of small low-end models. --108.38.204.15 (talk) 20:01, 17 August 2015 (UTC)
- Boost converter are avail to convert the cigarette lighters 12 volts into 19 volts to supply a notebook or similar computer. Inside these computers buck converters are installed to generate the requiered voltages in the computer for battery charging, 5 volts for USB and drives, lower voltages for chipset, memory, and cores for CPU and GPU. These converters reach an efficiency from 80 to 97 percent. Your notebook power adapter is a switching power supply. Never connect to equipment requiring a lower voltage than the atapters output is. Depending on the battery type, a charging regulator circuit is needend. Applying the output to a lead battery, it is not charging and cause a damage if the battery voltage exeeds the output specification. If the battery voltage is lower, the current is stil not limitted, causing the power supply to shut down by never reaching the output voiltage level or gets damaged itselves or a too small battery. A stepdown converter can be configured as a constant current source. When overcharing lead batteries or charing too fast, oxyhydrogen, an explosive gas mixture is generated. The voltage level needs to be limited to the needs of the battery. Automitive batteries for 12 volts charging voltage is limitted to 14.2 or 14.7 volts by the regulator inside the generator. --Hans Haase (有问题吗) 14:43, 22 August 2015 (UTC)
IPs of public Wifis in the UK
[edit]Due to a discussion in the German Wikipedia, i'd like to ask if anyone who uses the following public transport lines could note the IP he gets when using the Wifi there:
- Edinburgh Tramway
- Stagecoach regional busses around Edinburgh
- Scotrail
- East Coast trains between London and Edinburgh
- Virgin Trains between Glasgow and London
I'd be grateful if someone could post here IPs the Wifis there have. --62.109.35.148 (talk) 17:30, 17 August 2015 (UTC)
Windows 10 Update Prompts
[edit]Hi Guys, I stupidly asked Microsoft to tell me when Windows 10 was ready to be downloaded for me to upgrade. Since then I have learned a bit about Windows 10 and really do not want to upgrade. Unfortunately, I now can't see how to get rid of the upgrade icon in my system tray, nor can I see how to stop the constant reminders that I haven't upgraded. Can anyone tell me how to get rid of all that please? I am currently running Windows 7. Thank you Gurumaister (talk) 17:55, 17 August 2015 (UTC)
- See [1], found with a simple search for 'disabling windows 10 upgrade notification' Nil Einne (talk) 18:52, 17 August 2015 (UTC)
Thank you Nil Einne. I should have tried that but I think when I need expert advice, I tend to come straight here. Forgive me if I wasted your time but I am also very grateful. Gurumaister (talk) 19:09, 17 August 2015 (UTC)
Halting problem question
[edit]I have a further question about the halting problem. This has been bugging my mind for years.
Suppose we have a hypothetical function int halts(char *program)
which returns 1 if the program halts and 0 if it doesn't.
Now the reason given why such a function is impossible is that if we make another function:
void halts2(char *program) { while (halts(program)); }
Then halts2
, given itself as input, is a program that halts when it doesn't halt and doesn't halt when it halts, which is impossible. This far I understand.
But my question is, halts2
is a function taking an input. You can't just run halts2
, you have to give it some program as input. So is halts2
exactly the same program when it's run given itself as input and when given as input to itself? JIP | Talk 18:28, 17 August 2015 (UTC)
- You do have infinite recursion, which requires a lot of hand waving to ignore. What you have is halts2 taking halts2 as input. The second halts2 requires another halts2 as input. That halts2 requires another halts2 as input... on and on and on. So, the impossible outcome is based on an impossible requisite: a halts2 program that takes halts2 as input. 199.15.144.250 (talk) 18:36, 17 August 2015 (UTC)
- So do I have understood something wrong about the halting problem and have constructed the function
halts2
incorrectly or is this precisely why a function analysing whether another function halts is impossible? JIP | Talk 18:55, 17 August 2015 (UTC)- As I understand it, the problems associated with infinite recursion are not as core to the concept as the cantor diagonal argument. If you look at the proof sketched in the article, you'll see that (at least in this informal context), they don't worry about how the set of inputs x overlaps (or not) with the enumerated turing machines i. Once you get the terminology and the scoping done the right way, the actual proof is just to show that no such computable function h can exist that decides whether every program i terminates or not, and this is done in exactly in the same way as the proof that there are uncountably many real numbers in the unit interval. My point is, the real reason that the halting problem is undecidable comes down to Cantor diagonalization, not recursive definitions, and nowhere in the sketched proof does it come up that h cannot decide itself. SemanticMantis (talk) 19:54, 17 August 2015 (UTC)
- Absolutely, the key idea, from a logician's point of view, is just diagonalization. But to actually implement it requires a trick. You have to somehow create a program that's a fixed point of the operation "run
halts
on the given program and do the opposite". The recursion theorem says you can do this, but I can never remember exactly how, assuming I ever in fact knew. Update: That link is a disambig — the article on the one I mean is at Kleene's recursion theorem. - If I put on my software-developer hat instead of my logician hat, then maybe I find this "trick" to be the key, rather than the diagonalization. --Trovatore (talk) 20:03, 17 August 2015 (UTC)
- Absolutely, the key idea, from a logician's point of view, is just diagonalization. But to actually implement it requires a trick. You have to somehow create a program that's a fixed point of the operation "run
- As I understand it, the problems associated with infinite recursion are not as core to the concept as the cantor diagonal argument. If you look at the proof sketched in the article, you'll see that (at least in this informal context), they don't worry about how the set of inputs x overlaps (or not) with the enumerated turing machines i. Once you get the terminology and the scoping done the right way, the actual proof is just to show that no such computable function h can exist that decides whether every program i terminates or not, and this is done in exactly in the same way as the proof that there are uncountably many real numbers in the unit interval. My point is, the real reason that the halting problem is undecidable comes down to Cantor diagonalization, not recursive definitions, and nowhere in the sketched proof does it come up that h cannot decide itself. SemanticMantis (talk) 19:54, 17 August 2015 (UTC)
- So do I have understood something wrong about the halting problem and have constructed the function
- @JIP: You might be interested in quine (computing). Essentially,
halts2
is going to be a sort of a quine, but it doesn't just print its own source code and be done with it. Instead, it prints its own source code, feeds it in tohalts
, and based on the output, decides whether to halt or go into an infinite loop (doing the opposite of whateverhalts
predicts. --Trovatore (talk) 21:57, 17 August 2015 (UTC) - Oh, also:
halts2
is not callinghalts
as a library function. It has the source code forhalts
inline. So when it prints its own source code, it's necessarily also printing the source code forhalts
as part of that. That's why you need a differenthalts2
for each proposed implementation ofhalts
. --Trovatore (talk) 22:00, 17 August 2015 (UTC) - Computing a programs' own source code as (say) an ASCII string inside itself is actually a rather easy problem. You can see a few techniques for doing that HERE, for example. SteveBaker (talk) 22:09, 17 August 2015 (UTC)
- Normally you solve this problem by defining halts to take two arguments:
extern int halts(char *program, char *argument);
void halts2(char *argument) { while (halts(argument, argument)); }
halts2("void halts2(char *argument) { while (halts(argument, argument)); }");
- I think that's how Turing originally did it, though I can't remember if I ever actually read the original paper.
- Another approach is, as hinted above, to write something similar to a quine, e.g.:
extern int halts(char *program);
void halts2() { char p[999], s[] = "void halts2() { char p[999], s[] = %c%s%c; sprintf(p, s, 34, s, 34); while (halts(p)); }"; sprintf(p, s, 34, s, 34); while (halts(p)); }
- (This is not portable C because it assumes that 34 is the character code for a quotation mark, which is true in ASCII but not EBCDIC.) This is more complicated for no good reason, which is why it's normally done the other way. -- BenRG (talk) 01:34, 18 August 2015 (UTC)
- I think the first way (defining
halts
to take two arguments and then callinghalts2
with its own source code as both arguments tohalts
) is the easiest and therefore the best way to go. I still have to think this through. I know intuitively that the halting problem argument is true, that such a program is impossible, I just have to get my head around the details. JIP | Talk 18:42, 18 August 2015 (UTC)- I agree that BenRG's version is easier to follow. Actually it's probably the way I learned it. I was a bit surprised that I had to resort to the quining trick to answer your version.
- However, there are a couple of things. One is that, with the "program and argument" version, you refute the existence of a halting algo for program and argument, but you need an extra step to show there's no halting algo for programs without arguments. It's an easy step, but it's there.
- More importantly, I don't agree with BenRG's choice to present
halts
as an "extern" function. It can't be a library function.halts2
actually has to depend on the source code ofhalts
. If it didn't, you could "reverse the quantifiers" in my discussion with SteveBaker above, and you can't, as I showed there. Also, if you could refute the existence of a halting decider without assuming anything about the source code (such as, there is such a thing as its source code), then you could refute the existence of an oracle machine — and if that could be done so easily, you can be sure it would have been. - You might find it instructive to work out where the argument goes wrong if
halts
is treated as a library function. --Trovatore (talk) 04:35, 19 August 2015 (UTC)
- I think the first way (defining
What are the best free text-to-speech programs these days? For Windows and for Android?
[edit]I'm getting a backlog of a lot of things to read online, so I think it's better to multitask listening to an article with anything else that I'd want to do more.
Now the TTS programs need to be free, and I don't care if it has ads in exchange for being free. So what are some good ones that are updated on a regular basis and does a pretty good job at what it's supposed to do?
And to anyone who has used them, which of them left you the most satisfied? Thanks. --66.87.73.78 (talk) 22:15, 17 August 2015 (UTC)
- There are two programs that provide this functionality. A simple text-to-speech program will read text. It is for sighted people. Then, there are screenreaders, which perform text-to-speech for the blind. Being blind, I use a screenreader. I prefer JAWS. It does a great job at handling modern computer interfaces. It can read a text document (web page, email, etc...). It can also read the title bar, menu items, pop-up menus... 209.149.114.69 (talk) 12:15, 18 August 2015 (UTC)