Wikipedia:Reference desk/Computing

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

February 24Edit

JavaScript inserted to DOM via jQuery executingEdit

Yesterday at work I was developing an ASP.NET MVC page which uses jQuery on the front end. The jQuery code sends an AJAX request to the controller, which then returns a piece of HTML code, which jQuery then inserts directly to the DOM on the browser.

Now this HTML code includes a <script> node containing JavaScript code, which includes a document.ready() call. To my surprise, this JavaScript code executed as it got placed into the DOM. I was under the impression that JavaScript code in the DOM is only executed when the a full page request is done and the DOM is built up in the first place.

This is so much the better, as it's the behaviour I was intending, but my question is: Is this standard or somehow browser-specific (I was using Firefox 84 on Windows 10)? JIP | Talk 00:13, 24 February 2021 (UTC)

If you do it properly, the script will be a script and can be executed. You need to create a script node, populate the node, and append it to the DOM. I've seen programmers try to cram a script into innerHTML attributes. That won't work. It isn't a proper script node. (talk) 12:02, 24 February 2021 (UTC)
JIP, yes this is standard, and actually one of the more dangerous parts of jquery, which doesn't protect you from unintentionally inserting scripts this way. As such, it is always advised to use jQuery.parseHTML to preprocess any HTML fragments and allows you to make this choice of keeping scripts or filtering them out explicit, before adding them to the DOM. —TheDJ (talkcontribs) 09:54, 25 February 2021 (UTC)
Thank you for the answer, this was what I was hoping for. I don't think it's really that dangerous in this particular context, because the jQuery code is downloading HTML from the exact same web application where the jQuery code itself came from, and this application has complete control over the contents of the HTML. Of course I understand that if the jQuery code were to just download HTML from some random place on the Internet it would open the application to all sorts of dangers. JIP | Talk 01:07, 28 February 2021 (UTC)

Free pdf readerEdit

My Adobe Acrobat pdf reader has begun to show weird things. I haven't updated it for years, so perhaps it shows its age. I decided to upgrade it, checked with the Google and lo and behold there is no free Acrobat anymore. This software which I may use once in two months will cost me $13 a month. My daughter said - there are no more free things anymore. I recall that there have been pdf readers made by other developers and they had been available for downloading.

Is there a way to get a free pdf reader somewhere? Thanks, - AboutFace 22 (talk) 17:27, 24 February 2021 (UTC)

@AboutFace 22: There is still a free version of Acrobat Reader [1]. There is also a "pro" version which has a cost and is likely what you found first, as did I. Another free reader is Foxit [2]. RudolfRed (talk) 17:46, 24 February 2021 (UTC)

@RudolfRed thank you. I did find the correct "free" version of Acrobat previously too, but when I began installing it it first installed McAfee Security Suite. McAfee is not free and I don't want it to mess with my Spy Bot Search and Destroy that has been working well in my machine for years. I did not ask Adobe to install McAfee. The whole experience was just weird. In the end I "installed" Acrobat and immediately uninstalled McAfee. Will see how it is going to work out. Thanks, AboutFace 22 (talk) 19:40, 24 February 2021 (UTC)

If you don't want McAfee Security Suite then choose the option not to install it. (Deselect the relevant tick boxes before downloading.) You should always pay attention when downloading and installing software especially free (as in gratis) software nowadays since plenty of software now includes such optout components. Nil Einne (talk) 19:50, 24 February 2021 (UTC)

Linux systems may have okular or evince. I don't know if either is available for other computers. Of the two I prefer okular. -- (talk) 21:27, 24 February 2021 (UTC)

AboutFace 22. There are loads of free PDF readers. See List of PDF software. For what it's worth, I use Sumatra PDF.--Shantavira|feed me 08:45, 25 February 2021 (UTC)

Many thanks to everyone who contributed. AboutFace 22 (talk) 21:29, 25 February 2021 (UTC)

Free alternative to MS Office for MacBook Pro 2020Edit

My Dad's just upgraded to a MacBook Pro 2020. His old installation of MS Office can't be transferred over to it. He doesn't need all the latest whistles and bells. Could anyone recommend a decent free alternative for domestic use? Thanks, DuncanHill (talk) 20:36, 24 February 2021 (UTC)

@DuncanHill: There is Apache OpenOffice and LibreOffice. There is also a list at Comparison_of_word_processors, but not all will be free. It's also possible the new computer came with Pages (word processor) from Apple. RudolfRed (talk) 20:47, 24 February 2021 (UTC)
MS Office doesn't run well on a Mac. It's not properly designed to do so and there are several features missing. I recommend you use Pages.--Shantavira|feed me 08:56, 25 February 2021 (UTC)

February 27Edit

Tab SnoozingEdit

I have recently begun to notice that a web browser is displaying a message of "The tab was snoozed to save memory". I have been able to locate only a little information, not much, about tab snoozing. I infer that this means that, if I have multiple tabs open in an instance of the web browser, the ones that are snoozed are no longer kept in memory. Is the tab written out to the swap file, or just released? If I click on the tab again, is the tab refreshed from secondary storage (swap file) on my machine, or is the tab refreshed by reading it from the remote web server? Is this a relatively new feature of web browsers, or is this something that I haven't noticed until now? If Wikipedia has an article on this feature, then it isn't in an obvious place, because snoozing takes me to sleep without a hatnote. If there is an article, where is it? If there isn't an article, maybe a WikiProject needs to develop it. The obvious advantage of snoozing is that it saves memory, and so reduces the hard faults. The obvious disadvantage is that the tab has to be reloaded if it is clicked on. Are there any unobvious advantages or disadvantages that I ought to know about? I see that Opera under Windows 10 does snoozing. Do Firefox, Chrome, and Edge (under Windows 10) support snoozing? Where is there more information about it? Robert McClenon (talk) 03:39, 27 February 2021 (UTC)

Edge: Yes, and it was recent. — Preceding unsigned comment added by (talk) 04:31, 27 February 2021 (UTC)
AFAIK, Chromium based browsers have always done it if memory is running low or it's more economical to not render the tab. I think only now they're letting you know they're doing it. ✨ Ed talk! ✨ 05:27, 27 February 2021 (UTC)

Animation of Web PagesEdit

How do I turn off the animation of web pages, either in the options for a web browser, or on a page-by-page basis? Sometimes it is useful, but it has disadvantages. On a laptop running on battery, it is a current hog. Also, it prevents the system from turning off the screen. Robert McClenon (talk) 03:39, 27 February 2021 (UTC)

For starters, what browser are you using? I know how to do it in Firefox, but... -- (talk) 03:57, 27 February 2021 (UTC)
Sometimes I use Firefox. Sometimes I use Opera. Sometimes I use Chrome. So I would like to know how to turn off the animation with each of these three browsers. Robert McClenon (talk) 17:38, 27 February 2021 (UTC)
Okay, in Firefox you go to pseudo-URL about:config and you want to set the image.animation_mode parameter. (Type part of its name in the blank at the top to bring it onto your screen.) If you set it to none, animation is turned off. If you set it to once, as I usually have, an animation will play once through and then stop. -- (talk) 21:48, 27 February 2021 (UTC)
Occasionally the animation has explanatory value, but often it is just there because it seems technically neat, e.g., to show that the programmer knows how to do animation. Robert McClenon (talk) 17:38, 27 February 2021 (UTC)

Can Facial recognition system identify a person before and after cosmetics?Edit

Please glimpse the thread at Wikipedia:Reference_desk/Entertainment § Who. My question is that can modern Facial recognition system tell if File:Kim Tae-yeon at Incheon Airport on August 29, 2019.png was falsely named to Kim_Tae-yeon or not? Thanks. Stringent Checker (talk) 13:36, 27 February 2021 (UTC)

Yes, facial recognition system are easily fooled. Cosmetic would suffice in many cases. Just look at the Anti-facial recognition systems section of the article you linked to. Humans are, obviously, way better than any ML algo.--Bumptump (talk) 16:32, 28 February 2021 (UTC)
Ahh, I see! Thank you so much for joining the discussion! ^__^ --Stringent Checker [bargaining] 03:24, 1 March 2021 (UTC)

February 28Edit

Algorithm to find largest complete subgraphEdit

Given a connected graph, I need to find the largest subgraph that is complete (i.e. in the subgraph, each vertex is connected to each other vertex). There is one vertex, I'll call the origin, that is connected to all other vertices in the graph. Otherwise, the adjacency matrix is less than half full. I need to find the largest complete subgraph that contains the origin vertex.

I've thought of taking, in turn, each vertex, v, that is connected to the origin and do a depth-first search (DFS) from there. Doing the DFS, keep track of the connected subgraph. When visiting each new vertex, see if it is connected to all of the other members found in the complete subgraph. If it is connected to all of them, add it; otherwise, mark it as visited.

The problem, though, is that it seems to me that there could be other paths that involve points that have been visited but not in the complete subgraph that was found, but could be part of a larger complete subgraph. Of course, after finishing the DFS, you could mark all vertices as not visited and start down a different path from the vertex that is connected to the origin. But is doing this for every point that is connected to the current vertex v, but is that sufficient to guarantee that the largest complete subgraph is found? (It doesn't seem sufficient to me.) Bubba73 You talkin' to me? 04:11, 28 February 2021 (UTC)

It just occurred to me that it might be better to take each vertex, v, that is connected to the origin vertex and do a breadth-first search from each v. I haven't had time to think it through. Bubba73 You talkin' to me? 05:02, 28 February 2021 (UTC)
See clique problem. (talk) 09:19, 28 February 2021 (UTC)
In particular, Clique problem § Finding maximum cliques in arbitrary graphs.  --Lambiam 12:24, 28 February 2021 (UTC)
Thank you, I will look into that. Bubba73 You talkin' to me? 17:51, 28 February 2021 (UTC)

Windows 10 resolutionEdit

My Windows 10 PC occasionally switched the graphic resolution by itself. Every time before, I just rebooted and got back to normal. This time it didn't work. I'm currently at 1440 x 900. All of the other settings I've tried don't look right. When I boot up, the password field is off-center, and once I'm in, a few of the icons on the bottom bar aren't visible because they're too far to the right. Help! Clarityfiend (talk) 20:28, 28 February 2021 (UTC)

The current highest resolution offered in 1600 x 1200. Not only does that one not work, it's still a lower resolution than what I had before (1900 x nnn, I think). My monitor is 24"? Clarityfiend (talk) 21:18, 28 February 2021 (UTC)

Windows 10 resolution problemEdit

My Windows 10 PC occasionally switched the graphic resolution by itself. Every time before, I just rebooted and got back to normal. This time it didn't work. I'm currently at 1440 x 900. All of the other settings I've tried don't look right. When I boot up, the password field is off-center, and once I'm in, a few of the icons on the bottom bar aren't visible because they're too far to the right. Help! Clarityfiend (talk) 20:28, 28 February 2021 (UTC)

I had an edit conflict ... with myself. Clarityfiend (talk) 20:29, 28 February 2021 (UTC)

March 1Edit