Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

The Wikipedia Reference Desk covering the topic of computing.

Welcome to the computing reference desk.
Want a faster answer?

Main page: Help searching Wikipedia

How can I get my question answered?

  • Provide a short header that gives the general topic of the question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Post your question to only one desk.
  • Don't post personal contact information – it will be removed. All answers will be provided here.
  • Specific questions, that are likely to produce reliable sources, will tend to get clearer answers,
  • 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 are not a substitute for actually doing any original research required, or as a free source of ideas.

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.
Choose a topic:
See also:
Help desk
Village pump
Help manual

October 13

Would AT&T unlock an AT&T branded phones bought from somewhere else for free? (USA)

Turns out Cricket SIMs don't work even though they use AT&T's network. I bought it from B&H so maybe they'd do it even though I just got it since it's not discounted for the purpose of selling contracts or prepaid service? If they'd do it for free then no need to pay a phone unlocking store to do it. Also, I'm curious, why does B&H buy so many new phones that they take 2-4 years to get rid of them? Sagittarian Milky Way (talk) 06:44, 13 October 2017 (UTC)

The service providers brand their devices because they want to earn back the discount they gave you on the phone they sold you by forcing you to use their overprized service with it. Why should they unlock that trap and on top for free? Naturally they themselves get a discount on a contract to buy large quantities of Manufacturer x's Phone y#. When they start to sell off products for cheap obviously they bought more than they could sell - tho they may still making money if their own discount was big.
Check out the internet on how to unlock phones. For most popular hardware there are socalled "jailbrake" procedures to get "root" aka full access and then delete the branding. --Kharon (talk) 20:27, 13 October 2017 (UTC)
How was it discounted? It was cheaper unlocked on online stores. Not or big but not eBay either. And it came out 36 months ago, they should just let bygones be bygones :) (There's a law in America that if your contact's over they have to unlock it for free or 1 year (prepaid) but B&H doesn't have any cell service to sell) Sagittarian Milky Way (talk) 21:24, 13 October 2017 (UTC)

If it's not on contract, I think they're required to unlock it. (Thanks Obama!)
In practice, if you didn't get it from them, they'll probably make you jump through hoops to prove it's not on contract, and that it's not stolen, so bring any paperwork you have when you go.
ApLundell (talk) 22:32, 13 October 2017 (UTC)
Check the link on your response. It states that YOU can unlock your phone. It dies not require the service provider to unlock it.
The "Unlocking Consumer Choice" act repealed a Copyright Office ruling that made it illegal to unlock (aka jailbreak) a cell phone. So, AT&T is not "required" to unlock your phone for you. In fact, there is no reason that any carrier must unlock any phone ever. They aren't selling that service. You can download some virus-laden hack from India or China and unlock your own phone at your own risk and then take it to any carrier you like. That is the point of the act. While carriers can trap you with a contract, they cannot trap you with hardware. (talk) 20:19, 14 October 2017 (UTC)
You're right about the act but I'm not convinced about the "there is no reason that any carrier must unlock any phone ever" part. The CTIA (organization) Consumer Code for Wireless Service [1] does require that devices are unlocked if certain conditions are met. There's a lot of confusing statements out there about this. As I understand it, signing the code is voluntary but compliance is sort of compulsory if you sign it and all major US carriers have done so. (It's described as a voluntary commitment on the CTIA site.) I believe the FCC did push for this (and other things), so it was to some extent a case of either self-regulate or we'll do it for you, as often happens with these sort of things [2] [3] although I don't know enough about the situation in the US to say the carriers wouldn't have done it otherwise. (Of course any regulations could simply be overturned by the next administration, and it may be possible certain administrations are just going to let it be if the carriers basically ignore their voluntary commitments.) Nil Einne (talk) 05:17, 15 October 2017 (UTC)

Fairly confused by this question. If you're thinking of a specific device, is there some reason you can't just follow the instructions at the website helpful titled AT&T Wireless Consumer Device Unlock Request - If you do that on step 1 [4] there is a device eligibility requirements link (but it's JS so no direct link).

It does require that the device is out of contract etc, but I don't see that you need evidence for this. I presume AT&T data keeping isn't that crap so most of the time they can tell by the phone IMEI. (If for some reason their records disagree with what you believe, then your records may help.) It doesn't even require you're an AT&T customer although I'm pretty sure the phone must have actually been locked for AT&T (i.e. if someone else locked it to AT&T for some random reason, they probably won't be able to help). If it's a prepaid phone it does need to have been used on AT&T for 6 months. There are some other details but these seem to be the key ones, notably no where does it say you need to have directly purchased the phone from AT&T.

Technically they can "deny any unlock request that it concludes would result in an abuse of this policy" so they could just randomly deny your request, but I find it unlikely they'll consistently do this for a single person requesting their phone be unlocked. (I guess if there was something dodgy about how B&H got the phones or how they sold them or something.)

If you appear to meet the requirements and you try to use the website but it fails, then you can try and find out more. If you don't, it seems to me to be a moot point. BTW, if you are a customer with an online account other than following the above link this [5] seems to suggest you can check via your account.

Nil Einne (talk) 05:00, 15 October 2017 (UTC)

Ah, I only skimmed some page about how to unlock for each carrier and it implied you have an account with them so I wasn't too optimistic about if the link would work if you don't (not since 2009 in fact). In the end there wasn't even red tape just "AT&T Wireless customer? yes or no" I guess they might accept a photo of the receipt if they ask for proof I didn't steal it. Sorry for the sloppy grammar, fixed. Sagittarian Milky Way (talk) 18:13, 15 October 2017 (UTC)
And it's approved, yay. Sagittarian Milky Way (talk) 18:26, 15 October 2017 (UTC)

October 14

Hover over wikilinks

Recently, a new feature mysteriously appeared: when hovering cursor over a wikilink, the tooltip popup displayed a summary from the lead of the target article with an image (if available). It was a nice feature; however, just as mysteriously, that feature is now gone. I haven't done any updates (Firefox, Win7, etc.) or add/remove browser add-ons, etc. Any idea what's going on here? Is this a Wikipedia thing, or Firefox, or... (?) — 2606:A000:4C0C:E200:7595:47BF:7C36:8BA6 (talk) 06:13, 14 October 2017 (UTC)

I don't know why this feature suddenly occurred for you, but if you create an account, you'll be able to set this as a feature in your preferences. It's under Gadgets > Browsing > Navigation Popups. Rojomoke (talk) 07:19, 14 October 2017 (UTC)
Odd. I've never had an account, and this all occurred on the same computer. The only thing that I can think of that might be relevant is that this is a dynamic IP -- perhaps it happens only on certain IPs; but that doesn't make sense either. Anyway, ... thanks for the info. 2606:A000:4C0C:E200:7595:47BF:7C36:8BA6 (talk) 08:36, 14 October 2017 (UTC)
The former reply is a little inaccurate. IP's never get Navigation Popups but they can get the similar mw:Beta Features/Hovercards, called "Page previews" for registered users at Special:Preferences#mw-prefsection-betafeatures. mw:Beta Features/Hovercards#2017 A/B test on English and German Wikipedias mentions a former test where some randomly selected users get it. I guess there is also a current test. PrimeHunter (talk) 20:32, 14 October 2017 (UTC)
Unregistered users with JavaScript in their browser can see an example article with Navigation Popups here. I don't think you can see Hovercards without being randomly selected or enabling it in an account. PrimeHunter (talk) 20:47, 14 October 2017 (UTC)
[ec] I have visited German Wikipedia recently; perhaps it carried-over, or something. —2606:A000:4C0C:E200:7595:47BF:7C36:8BA6 (talk) 20:49, 14 October 2017 (UTC) -- And yes, I do see it on the page you linked, so evidently I have JavaScript in my browser (somewhere).
Okay; A/B test on English and German Wikipedias sounds like the right time period, but seemed more recent, and didn't require visiting de.wikipedia (or voodoo). So...
Resolved: 2606:A000:4C0C:E200:7595:47BF:7C36:8BA6 (talk) 21:19, 14 October 2017 (UTC)

October 15

How to download all <10 kb images (icons) from a website (website, not webpage)

Is there a way to use a browser extension such as Firefox's DownThemAll or similar to download all the icons from a website such as

Settings to limit file size or image resolution are easy to come by but figuring out how to make the extension spider its way around the folder structure to different webpages is not easy and all the help I can find on Google pertains to the simpler scenario of downloading from a single webpage rather than many webpages in an online directory (incidentally, is it correct to refer to "hitfilm-express-2017" in the above url as an online directory/folder?).

This is an example image

I'm fairly sure HTTrack can do this if you fiddle with the settings. WegianWarrior (talk) 10:18, 15 October 2017 (UTC)
  • This may be of interest. Short version: you usually cannot, because you have no way to know all valid subpages of a domain. What you can do is crawl the pages (i.e. follow the links from the home page, and the links from there etc.) and pull the images; this may be enough for your purposes. TigraanClick here to contact me 11:12, 16 October 2017 (UTC)

Google Home

Why cant it be installed it on my samsung phone? I downloaded it but it dont work. Whats wrong?-- (talk) 01:10, 15 October 2017 (UTC)

The Google Play app page[6] should tell you if it's compatible with your device.
If it is, and it still won't install, my guess would be that you don't have enough space to install it. ApLundell (talk) 16:32, 16 October 2017 (UTC)

Difference between some Adobe apps

Can someone help me in knowing the difference between - Adobe Muse, Adobe Dreamweaver, Adobe Portfolio and Adobe Behance?

Thank you (talk) 08:29, 15 October 2017 (UTC)

Have you read our articles on Adobe Muse, Adobe Dreamweaver, Adobe Portfolio and Adobe Behance?--Shantavira|feed me 09:14, 15 October 2017 (UTC)

Visual Basic's normal behavior?

I'm using Windows 7 with Visual Studio 6. When I tried a simplest problem to multiply 8778 with 9, the program told me it's "overflow". Bug of some sort or programming error on my part? The actual code is at Thanks (talk) 19:59, 15 October 2017 (UTC)

Try Print 8778.0 * 9.0
It's likely that VB is giving your values a default type of a short integer, which will of course overflow. If you make them look like floats, it will then treat them as floats and avoid the overflow. Another way would be to multiply variables of a defined (and adequately large) type, not numeric literals. Andy Dingley (talk) 11:50, 15 October 2017 (UTC)
Thanks for reply, man. Since I am a neophyte, kindly tell me what numeric literals is and how to go about it. I mean kindly be a bit more explanatory, I know it will take some of your precious time, but please oblige. (talk) 12:00, 15 October 2017 (UTC)
"8778" is a numeric literal
Dim a as Long = 8778
Is assigning its value to a variable instead. When you do that, you get to tell it what type of variable it is.
I am probably required by law to tell you that VB is an obsolete language, was never a good teaching language, and other and better languages are available for free. Python and Processing for just some. Andy Dingley (talk) 12:49, 15 October 2017 (UTC)
That's VB6? I don't think Print is what you want. Maybe this article will help. -- zzuuzz (talk) 12:20, 15 October 2017 (UTC)
See Integer_(computer_science)#Short_integer for a discussion on the limits. StuRat (talk) 22:20, 15 October 2017 (UTC)
Shouldn't the VB parser treat them as floats, though, since the OP included the radix point? I thought that was an accepted convention in programming semantics. OldTimeNESter (talk) 03:00, 16 October 2017 (UTC)
AFAIR, that's VB's behaviour. But that's not what the OP did (and it's far from obvious that such a minor change would have such an effect!), it was the first answer. Andy Dingley (talk) 11:00, 16 October 2017 (UTC)

Disk in USB floppy drive showing up as USB drive after power failure?

About an hour ago, I was imaging a set of MS-DOS 6.22 floppy disks on my Windows 7 desktop using VirtualBox (the procedure I was using was: MS-DOS 6.22 VM - pure coincidence, by the way; I use that VM for all my floppy imaging and floppy-image editing - with dual virtual floppy drives, assign the host A: drive [a USB floppy drive, in this case] to the first drive, insert an image of a blank floppy in the second, then use the VM, which sees both of these as physical floppy drives, to copy the files from the actual physical drive to the image. I'd used this setup to copy and edit preexisting floppy images before, but this was my first time using it to image floppies; as an aside, having previously worked purely with floppy images rather than the physical things, I'd forgotten how mind-numbingly slow physical floppy drives are) when the fuse powering the outlets in my bedroom blew. When I got the desktop back up and running (it took a very long time to start up compared to normal, but, then again, somehow I doubt that having its juice suddenly cut off counts as "normal"; thank goodness for NTFS journalling that it was able to start up on its own without even needing to use Startup Repair or something more drastic!), I went back into VirtualBox and fired up the VM to check the damage. Fortunately, the VM was fine (once, a VM - also MS-DOS 6.22, coincidentally - froze and I had to kill it in Task Manager, after which I was unable to ever boot said VM again and had to delete and replace it), but when I tried to access the VM's A: drive to check if the files on the floppy that had been in the drive at the time of the power loss had been corrupted or anything (fortunately, the copy was finished by the time the fuse blew, and the image was both complete and undamaged), I kept getting Abort, Retry, Fail? errors. Every single time. I ejected and reinserted the floppy to see if that would help.

At which point something very odd happened.

The floppy was showing up as a 1.38-MiB USB drive with the drive letter K:!

Naturally curious (and possibly quite stupid as well - please feel free to let me know if that was the case for what I did), I hit the "Open folder to view files" button, at which point the files on the floppy showed up. Going into "Computer" in Windows Explorer, I saw the reason the VM couldn't see the disk; the A: drive had apparently disappeared from the host system. At this point, after swearing at the computer (which did not resolve the problem, although it did make me feel a bit better), I ejected the floppy again, unplugged the floppy drive, and plugged it back in. Voilà - "Floppy Disk Drive (A:)" showed up once again in Windows Explorer, and this time, when I (re-re-)inserted the disk, the VM saw it just fine. No permanent damage to the drive (either physical or virtual), the floppy, or the VM; it looks like the only lasting damage was that the sudden power loss corrupted my Kerbal Space Program savefile on the host machine, forcing me to copy in the data from the most recent quicksave file. But does anyone have any idea why the floppy drive disappeared from the system and said system read a floppy disk as a USB drive? Whoop whoop pull up Bitching Betty | Averted crashes 14:48, 15 October 2017 (UTC)

Have you checked that usb data cable is ok? And usb connectors are ok? How USB is floppy powered? If from the usb plug then the power may be insufficient? Ruslik_Zero 19:39, 15 October 2017 (UTC)
Well, it works perfectly again now, and I've never had any other issues with it... Whoop whoop pull up Bitching Betty | Averted crashes 23:39, 15 October 2017 (UTC)
You didn't mention whether you disconnected the floppy drive before powering up again after the power cut. If you left it connected and then booted up, Windows may have read it as a USB drive. I also have a floppy drive, and always take care to connect it to the USB port after the computer has been up and running for some time. Akld guy (talk) 21:18, 16 October 2017 (UTC)
Ah, that must have been what happened. I'll be sure to disconnect it before turning the computer back on in the future. Thanx!  :-) Whoop whoop pull up Bitching Betty | Averted crashes 18:55, 18 October 2017 (UTC)

October 16

How will you describe the "presenter" in the model-view-presenter?

If the Controller is the user and it's activity manipulating the model via the view, what is the "presenter"? What will be you most short, summary (in say 8-10 words) for this term "presenter"? Thank you, Ben-Yeudith (talk) 06:36, 16 October 2017 (UTC)

We have articles on both Model–view–presenter and Model–view–controller.
The Presenter performs the same role as the Controller. The difference is really in the relationship between the View and Model in the two overall patterns. With MVC the Controller performs the "change" actions from the user upon the model, and the "display" actions are performed by the model and the view together, without the controller. This "loop" arrangement makes it harder to slice the pattern into layers, either for easier component testing or for highly laminated platforms, such as the web.
The Presenter, in contrast, forms the interface (and the only interface) between Model and View for both display and change actions. This makes the overall system easier to break down for testing and for deployment onto the web (Views can often be on the web client these days, with connectivity by JSON rather than HTML). The Model and View are both easy to implement and test too (but they were in MVC too). The downside of MVP is that he "Presenter" is often (usually?) poorly designed and instead becomes an instance of the Magic pushbutton or God object anti-patterns, where the whole functionality that ought to be in Model or View ends up in the Presenter instead. Andy Dingley (talk) 10:58, 16 October 2017 (UTC)

Dependency Inversion principle in OOP

A web programmer told me that the Dependency Inversion principle in OOP describes this:

In OOP design we usually go from outside (request) to the inside (response), from the view, to the model (by the controller CRUDing the model via view).

I have 2 questions regarding this:

1. Is this explanation of the principle accurate? Iא doesn't say why it specifically relates to the principle.

2. Why is "from the outer to the inner" is "inverted" in web?... I can't see why it would be inverted and not the other way around.


We have an article Dependency inversion principle. The description you heard doesn't sound very accurate to me, but perhaps I'm not understanding it fully. Note by the way that the word "inversion" in this phrase is somewhat of a misnomer. Our article says "Nevertheless, the "inversion" concept does not mean that lower-level layers depend on higher-level layers." CodeTalker (talk) 17:17, 17 October 2017 (UTC)
Yes, sorry not to mention, the last thing you wrote about what I can call "dependency bidirectionality" was also reminded by the programmer. Thank you. Anonynous. — Preceding unsigned comment added by (talk) 01:07, 18 October 2017 (UTC)

October 17

C structs

hello, is it allowed to cast a struct A*, say, as struct B*, and vice versa, if struct B has struct A as its very first member?
I want to do something like this:

Extended content
#include <malloc.h>

struct node_ {
        struct node_ *next;

struct my_int {
        struct node_ link;
        int data;

struct my_float {
        struct node_ link;
        float data;

struct my_int *head=NULL;
struct my_float *head2=NULL;

struct my_int *new_int(int a){
        struct my_int *p=(struct my_int*) malloc(sizeof(struct my_int));
        return p;

struct my_float *new_float(float a){
        struct my_float *p=(struct my_float*) malloc(sizeof(struct my_float));
        return p;

void insert(void *a, void *b){
        struct node_** p=(struct node_**)a;
        struct node_ *q=(struct node_*)b;

int main(void){



        for(struct my_int *p=head;p!=NULL;p=(struct my_int*)p->{
                printf("%d\n",((struct my_int*)p)->data); 

        for(struct my_float *p=head2;p!=NULL;p=(struct my_float*)p->{
                printf("%f\n",((struct my_float*)p)->data); 
        return 0;

this compiles, and works, but I'm not sure it's kosher. TIA (talk) 20:35, 17 October 2017 (UTC)

Yes, that is safe, as the first item will be aligned to the beginning of each struct. But there is another weak point in your code: you do not check if malloc() returns a valid pointer! If p becomes NULL, an assignment to p->data will most probably end with a crash. --CiaPan (talk) 20:59, 17 October 2017 (UTC)
thank you! regarding malloc(3), most I could do is print a message and exit, but when the system's at a point where it can't accomodate memory requests for 20-odd bytes, there's no guarantee it can printf() (and especially, sprintf()) either. So letting it crash with a "core dumped" message would actually be more meaningful... (talk) 09:08, 18 October 2017 (UTC)

October 18

Retrieved from ""
This content was retrieved from Wikipedia :
This page is based on the copyrighted Wikipedia article "Wikipedia:Reference desk/Computing"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA