Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 176.248.159.54 (talk) at 16:17, 29 November 2016 (Bandwidth costs). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


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:


November 25

Anatomy of a programming language

Oh computer gurus,

I've made a first attempt at a list of common features of a programming language, but I believe it is woefully inadequate.

What is missing?

What else is wrong with it?

I look forward to learning what only your expert eyes can see. The Transhumanist 19:54, 25 November 2016 (UTC)[reply]

You haven't included Remarks. I see that you may have meant the 'Semicolon' entry for remarks, but some languages may not use semicolons, or may include other characters in addition to them. I think you need to change Semicolons to Remarks and have Semicolons as a subcategory of it. Akld guy (talk) 22:25, 25 November 2016 (UTC)[reply]
Wow. What an oversight. What else did I miss? The Transhumanist 00:58, 26 November 2016 (UTC)[reply]
Do loops; Flags; Registers; Stacks; Interrupts; Bit masking and flipping; Branching (conditional jumps); Strings; Macros. Akld guy (talk) 01:19, 26 November 2016 (UTC)[reply]
One omission from the list is exception handling (the try-catch block or its equivalent). Tevildo (talk) 09:40, 26 November 2016 (UTC)[reply]
Comments. But then again lots of people think their code is so obvious it doesn't need any comments :) Dmcq (talk) 11:23, 27 November 2016 (UTC)[reply]
Comments=Remarks. Akld guy (talk) 23:00, 27 November 2016 (UTC)[reply]
Sorry I'd forgotton about BASIC. I took it as being the way some language I don't know of talked about things like metadata or annotations. Dmcq (talk) 09:18, 28 November 2016 (UTC)[reply]
The outline doesn't seem to describe languages like the Forth (programming language) and other Incremental compilers very well. See http://galileo.phys.virginia.edu/classes/551.jvn.fall01/primer.htm --Guy Macon (talk) 12:17, 27 November 2016 (UTC)[reply]
And how about modules for inter-working and hiding irrelevant details? Dmcq (talk) 14:24, 27 November 2016 (UTC)[reply]
And for a bunch of other stuff pattern matching would I guess cover templates and macros and string matching and list matching as in Prolog and a lot of declarative or database programming. And then there reflection features where on can inquire about or generate code. Which also gets on to debugging and monitoring features. And then there's security features as in Java or C#. And garbage collection and pointers or references of course. Dmcq (talk) 14:35, 27 November 2016 (UTC)[reply]

November 26

Grouping Points of A Partial Grid Into Squares

For a problem I am working on I need to the following: given an m by n array of 1's and 0's, partition the 1's into squares. In other words, I need to group the entries that are 1 into squares. My current method is to start at the upper left corner, find the first 1, then find the biggest square containing it, then find the next 1 not in it, do the same - moving across to the right, then down. This works fairly well for my purposes, but on certain arrays I'm getting a large number of squares that are 1x1, I would prefer a method that can find a more optimal partition (my arrays are not very "jagged", the boundaries between 1's and 0's are almost always vertical or horizontal segments, so I feel that a better solution should be possible). Thank you for any help.24.3.9.16 (talk) 07:01, 26 November 2016 (UTC)[reply]


Changes due to Crystal Oscillator

Is it possible to change a simple D.C. circuit (say 12 volts), to an A.C. circuit (frequency whatever) using this thing shown in the picture along ?

210.56.127.82 (talk) 18:03, 26 November 2016 (UTC)[reply]

No. If you have a DC circuit that you want to run off an AC supply, you'll need a rectifier - a single diode might be enough, or more sophisticated designs are available. If you want to generate AC from a DC supply, you'll need to build an oscillator - the crystal can be part of this, but it'll need several more components, including an amplifier of some sort. Tevildo (talk) 19:08, 26 November 2016 (UTC)[reply]
Yes, it's possible to derive an AC signal from a DC supply using the crystal device shown. Such devices may produce AC waveforms in the spectrum from 32.768 KHz (used in clocks and watches) or even lower, to hundreds of Megahertz. You haven't stated what frequency you want to obtain, so I'm loosely using AC to refer to any repetitive signal in that range. By dividing or multiplying the resultant signal, you can obtain the frequency you want. For example, you could divide a 3.93216 MHz crystal controlled device by 65,536 (216) in digital circuitry to obtain 60Hz, the US mains frequency. This is a trivial task for digital division chips and is frequently employed in consumer electronic devices and industrial systems. Akld guy (talk) 00:00, 27 November 2016 (UTC)[reply]
Just to clarify, I interpreted "along" in the OP's question as a typo for "alone", so they'll need some additional components, not just the crystal, to make an oscillator. Applying DC to the crystal will not produce a waveform. Tevildo (talk) 10:36, 27 November 2016 (UTC)[reply]

Windows Equivalent of Android's Flud

Flud, available as an app for Android systems, is today most fast, easy to use and reliable Torrent agent. Is there any such application in Windows (using 7) that is worthy of such commendation ? 210.56.127.82 (talk) 18:30, 26 November 2016 (UTC)[reply]

https://alternativeto.net/software/flud/
I would skip the first one listed (µTorrent). It used to be good but became evil. qBittorrent is excellent.--Guy Macon (talk) 19:27, 26 November 2016 (UTC)[reply]
We have Comparison of BitTorrent clients. --47.138.163.230 (talk) 02:19, 27 November 2016 (UTC)[reply]


November 27

Logon to yahoo mail

For the last week I haven't been able to read my yahoo mail. I have tried with the yahoo mail app on Android, EMail app on Andriod, Mail on MacOS and through uk.yahoo.com in Safari and FireFox. On the yahoo home page I can hover over the mail link and it brings up the 5 most recent e-mails I've received and the subject, but when I click to read the message it takes me to the login page. I enter my username and password and then it just loops round. I've tried to reset the account and yahoo send a recovery code which I enter and then it takes me bacl to the login screen and the whole thing starts again. I cannot access yahoo forms as I need to login before I can post anything. I have also tried clearing the cookies from my browsers and tried other peoples computer using macOS, Ubuntu, and Windows 8. I do have other e-mail accounts so can tell people to use that but I've had my yahoo account for 19 years so don't want to loose it. Does anyone have an idea on how I can read my e-mail?Dja1979 (talk) 16:18, 27 November 2016 (UTC)[reply]

What you stated was unclear; are you successfully logging in on the other computers you've tried? If not, then it sounds like the problem is on Yahoo's end. You'll probably need to contact their support. --47.138.163.230 (talk) 10:09, 28 November 2016 (UTC)[reply]
I cannot log into mail on any computer. Their support requires me to login. Dja1979 (talk) 14:30, 28 November 2016 (UTC)[reply]

Sorting algorithm

Is there a name for this (extremely inefficient) sorting algorithm?

dThisMinimum = 9E99
For i = 0 to Count - 1
    For j = 0 To Count - 1
        If adInput(j) < dThisMinimum Then
            dThisMinimum = adInput(j)
        End If
    Next j
    adOutput(i) = dThisMinimum
Next i

Just asking out of curiosity, of course. Tevildo (talk) 19:34, 27 November 2016 (UTC)[reply]

That looks like a select sort implantation. LongHairedFop (talk) 19:52, 27 November 2016 (UTC)[reply]
Well, it's an incorrect implementation of selection sort. It fills the output array with repetitions of the lowest value in the input. --76.71.5.45 (talk) 20:51, 27 November 2016 (UTC)[reply]
That's true, of course - this (fortunately) doesn't represent any real code. But the select sort is what I was looking for, thanks. Tevildo (talk) 21:07, 27 November 2016 (UTC)[reply]

Red USB port

Is it considered USB 2.0 or 3.0? 103.230.104.4 (talk) 20:54, 27 November 2016 (UTC)[reply]

USB3 is labelled blue. Graeme Bartlett (talk) 21:18, 27 November 2016 (UTC)[reply]

I'm guessing the three IQ ports of this hub is the red colour one, question is:

1) Is it USB 3.0?

2) Can you use it normally, or is it just for charging?

103.230.106.16 (talk) 12:08, 28 November 2016 (UTC)[reply]

  • Did you even read the page from which the image you linked to is located? There are blue and black ports, no red, on this image, and the text says "It has seven USB 3.0 data ports that offer transfer speeds of 5Gbps, so all your connections are as fast as possible. Plus, it also has three dedicated ports for charging..." TigraanClick here to contact me 15:30, 28 November 2016 (UTC)[reply]
I did. Other researches (and the english) are confusing.
I'm looking for USB 3.0 ports, along with dedicated ports for charging (which I'm guessing now that, you can also use normally just like the other available ports in a hub) - all USB 3.0 ports. Any example would be of help. 103.230.105.7 (talk) 19:03, 28 November 2016 (UTC)[reply]
The 3 charging ports labelled IQ would only be for charging, and not for connecting to the hub. Use the blue ports if you want USB 3.0 connection to the hub. Graeme Bartlett (talk) 21:51, 28 November 2016 (UTC)[reply]

November 28

ATM PIN security

Strong computer passwords should have letters numbers and symbols. The longer the better. ATM PIN protects life savings. More important than computer accounts. So why ATM PIN can only 4 to 6 numbers? Should be easy for smart people to hack. But never see ATM PIN hacking case in the news. PIN is stored in the card or the ATM server? --Curious Cat On Her Last Life (talk) 02:35, 28 November 2016 (UTC)[reply]

First, to steal someone's savings through an ATM, a crook needs their card (or a copy of it) and their PIN. That's two-factor authentication and explains why the precautions for a strong password are not so important with an ATM PIN.
Second, even if they have both the PIN and the card, the banks will limit the amount of money that can be withdrawn in per day. This means that the crook does not have access to the victim's whole "life savings", unless the victim remains unaware of the crime for an extended period (or doesn't have much money to steal anyway), or unless the crook also is able to use a method of hacking that works around the limit, as Andrew Stone did.
And no, the PIN is not stored on the card.
--76.71.5.45 (talk) 05:04, 28 November 2016 (UTC)[reply]
Also I believe it's standard practice to lock out the card after a certain number of failed PIN entries, to deter brute-forcing. Another dimension to the issue: though it varies, a fraudulent transaction will often be reversed by a financial institution if it's reported by the account holder in due time. Financial institutions carry insurance against losses, including fraudulent transactions. If there were a huge problem with fraudulent use of PINs, financial institutions would have already done something about it, because it would result in costs to them. Really, every security measure is about a balance of trade-offs: increased security versus the costs associated with the measure ("cost" in this sense meaning not just financial costs, but things like inconvenience). --47.138.163.230 (talk) 09:58, 28 November 2016 (UTC)[reply]
With Chip and PIN the PIN is stored in encrypted form on the card. See this for one example saying this.--Phil Holmes (talk) 11:33, 28 November 2016 (UTC)[reply]
Where does it say that? I see an answer that says "It also stores the card number and a hash of the PIN." -- Finlay McWalter··–·Talk 12:33, 28 November 2016 (UTC)[reply]
Is a hash of the PIN not the PIN in an encrypted form? I also only gave this as one example of where it is said that the PIN is stored on the card. Other places say that this also allows C&P verification to be performed offline.--Phil Holmes (talk) 13:55, 28 November 2016 (UTC)[reply]
Calling it "encryption" is at best an unfortunate wording, implying there could be "decryption", which there can't. What they surely store is a hash of the (PIN+unique salt), to prevent someone who had extracted the hash data from the chip from using a rainbow table to brute-force the clear PIN. An offline reader can read the salt (which isn't secret), compose it with the PIN, and calculate the hash. If the hashes compare, the PIN is correct - but, because the card doesn't really store the PIN, there is no way a reader could know, for example, which digit was mistyped. Given the tiny size of the PIN keyspace, surely the salt is much bigger than the PIN. -- Finlay McWalter··–·Talk 14:18, 28 November 2016 (UTC)[reply]
Actually, I should correct that - the PIN verification is done by the crypto processor on the card itself - the terminal sends it the PIN and the card itself does the hash verification and simply returns a success/fail code to the terminal. I think that the exchange of the PIN between the terminal and the card is encrypted (on a session created with public key cryptography between the card and the terminal) so the clear PIN isn't transmitted in plain between the two (over the relatively vulnerable ISO/IEC 7816 physical connector). -- Finlay McWalter··–·Talk 14:26, 28 November 2016 (UTC)[reply]
What they surely store is a hash of the (PIN+unique salt)... An offline reader can read the salt (which isn't secret)... - Huh? If Mallory can read and offline, and the hash function is a (known) part of the protocol, they can easily brute-force the pin since the search space is so small. I am not sure, even having read the links, but I suspect either (1) there is another ingredient in the hash, for example a public cryptographic key whose private counterpart is in the bank's servers a second salt that is stored in the bank's server but not in the card, or (2) hardware security prevents direct access to those (i.e. the chip requires you to follow the interrogation protocol, which fries the card at 3 unsuccessful attempts). My money would be on option #1. TigraanClick here to contact me 15:27, 28 November 2016 (UTC)[reply]
(2) is certainly true - the card will lock itself if multiple tries are attempted. And it has various layers of tamper-resistance, wherein attempts to debond it or drill into it will cause it to destroy itself permanently. -- Finlay McWalter··–·Talk 15:42, 28 November 2016 (UTC)[reply]
The links say that the card should suicide if accessed improperly, so in that sense, (2) is true; in the context here, I meant "effectively, the pin is stored, but there are physical protections around it". I hope this is not the only line of defense (especially since there is an easy cryptographic way to add a bit of security; I simplified my proposition above). Of course, that is by no way a proof and security has been botched numerous times, but still. TigraanClick here to contact me 15:55, 28 November 2016 (UTC)[reply]
On 47's point, the fraudulent transactions are a problem, but not in the form the OP envisages. The biggest problem is skimming, where the card is read and PIN entry recorded and a cloned card is used. This causes problems for financial institutions so there are efforts to counter it but increasing PIN length isn't one thing that's going to help. While it can be annoying to some customers and can cause some temporarily loss of money and the effects thereof, it doesn't generally result in the loss of life savings even for very poor people for the simple reason the money will be returned by the financial institution. Less common but with stolen wallets etc, there can be a problem with people writing down their PINs and storing this with the card. However increasing PIN length is if anything going to make this more likely. There are also cases where people are forced to give up the PIN, PIN length isedit: isn't going to help here. Finally you have the small number of cases where the PIN is simply guessed due to some knowledge of what the person is likely to choose. Increasing length may help with this but since it's such a minor concern (remember brute forcing is limited to very few tries) edit: it's not likely to be forced. Nil Einne (talk) 12:30, 28 November 2016 (UTC)[reply]
So why ATM PIN can only 4 to 6 numbers?
From the Personal identification number article: "The inventor of the ATM ... had at first envisioned a six-digit numeric code, but his wife could only remember four digits, and that has become the most commonly used length...". The PIN management standard ISO 9564-1 allows for up to 12 digits (noting that longer PINs are more secure but harder to use), but I don't know if any bank actually allows that many. Mitch Ames (talk) 11:46, 28 November 2016 (UTC)[reply]
An observation: Some friends were discussing this very topic a couple of years ago, and we all had 4 digit PINs, comprised of 3 different digits. I received a new PIN last week and there is still a repeated digit. I don't know how that affects security. --TrogWoolley (talk) 12:13, 28 November 2016 (UTC)[reply]
Some banks allow you to change your PIN to be longer than the typical 4 digits. One of my friends did this several years ago. At the time, I was surprised that it was even possible, but apparently it is an option. For what it is worth, my bank now defaults to a 6-digit PIN. Dragons flight (talk) 12:33, 28 November 2016 (UTC)[reply]
Some friends were discussing this very topic ... we all had 4 digit PINs, comprised of 3 different digits. ... I don't know how that affects security
Disclosing some information about your PIN to your friends (or anyone else) increases the probability that they could guess or shoulder surf your PIN, so it decreases your security. Mitch Ames (talk) 13:04, 28 November 2016 (UTC)[reply]
4 digit PINs, comprised of 3 different digits. ... a repeated digit.
Given a random 4-digit PIN there's about a 50% probability of it having at least one duplicate digit, ie not 4 different digits. Four digits gives 10,000 total combinations. There are only 10*9*8*7 = 5,040 combinations with all 4 digits different. (10 possible values for 1st digit, 9 possible values for 2nd because you can't re-use the first, 8 for 3rd digit because you can't re-use the first 2, ...) Mitch Ames (talk) 13:24, 28 November 2016 (UTC)[reply]

November 29

Bandwidth costs

I have been asked to do an editorial for the Signpost, and I am doing research for it. Specifically, in 2005 Jimmy Wales told a TED audience the following:

"So, we’re doing around 1.4 billion page views monthly. So, it’s really gotten to be a huge thing. And everything is managed by the volunteers and the total monthly cost for our bandwidth is about 5,000 dollars, and that’s essentially our main cost. We could actually do without the employee … We actually hired Brion because he was working part-time for two years and full-time at Wikipedia so we actually hired him so he could get a life and go to the movies sometimes."

Question: is there any reason to believe that bandwidth costs per page view have gone way up or way down in the last ten years?

Related (and a bit off topic) question: how many page views per month are we seeing ten years later?

For those interested in what I am working on here, see Wikipedia talk:Wikipedia Signpost/2016-11-26/Op-ed. --Guy Macon (talk) 10:19, 29 November 2016 (UTC)[reply]

Erik's stats page has page-views per month per wiki - https://stats.wikimedia.org/EN/Sitemap.htm -- Finlay McWalter··–·Talk 10:38, 29 November 2016 (UTC)[reply]
Thanks! https://stats.wikimedia.org/EN/TablesPageViewsMonthlyCombined.htm says it's about 16 million page views per month, so unless I made a silly mistake that's roughly ten times more pages we are serving since ten years ago. --Guy Macon (talk) 15:42, 29 November 2016 (UTC)[reply]
Presumably you mis-typed, and meant "about 16 billion page views per month", Guy? {The poster formerly known as 87.81.230.195} 176.248.159.54 (talk) 16:17, 29 November 2016 (UTC)[reply]

Wikipedia Blocked

How do I get a trusted certificate so that Wikipedia is not blocked? I cannot tell from the globalsign website what certificate goes with Wikipedia. Can you help me out with getting a valid certificate for your site? — Preceding unsigned comment added by 131.92.140.225 (talk) 12:40, 29 November 2016 (UTC)[reply]

Hmm. The fact that you're posting here suggests that Wikipedia can't be totally blocked. Can you clarify what it is you're trying to do (e.g. register for an account, view an article, etc) and what error message, if any, you are seeing? A screenshot or the exact text of the error would help enormously. - Cucumber Mike (talk) 15:12, 29 November 2016 (UTC)[reply]

How can I offer an online course?

It is more than lectures (actually lectures are a minor part). It's basically a series of texts and exercises. What software would it run on? I heard about moodle but do not know how to get started with it. Do I need my own server, domain, and hosting plant to upload an online course using it? What are other options? Hofhof (talk) 12:43, 29 November 2016 (UTC)[reply]

A good place to start your research is Learning management system. --Jayron32 13:03, 29 November 2016 (UTC)[reply]