Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Ajax-x86 (talk | contribs) at 15:12, 16 August 2019 (→‎Google Fuchsia embedded device requirements.: new section). 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:


August 9

Follow-up to database operation question

You might remember this question I asked back in late June about which way to handle a mass update in a database would be more efficient, when there are some rows that already have the values they are supposed to be updated with.

I just tested it at work with a mass of about one million rows, where only about one thousand rows would actually change their values.

It turns out it's much faster to first find out the rows that don't need updating and exclude them from the update, than to just update everything. I don't have any exact numbers, but the impression I got the time taken is in the order of tens of seconds vs. several hours. JIP | Talk 20:29, 9 August 2019 (UTC)[reply]

Wow, that's an impressive difference. But it's possible a future update of the DBMS may make that disappear, if they add a feature to "only do updates that result in a change". (I'm actually surprised they haven't optimized that aspect already.) Also, if others are accessing the table to be updated at the same time, then table locking could cause the time delays, since it could only lock the table when nobody else has a transaction pending. The smaller number of updates might only have to lock those records instead of the entire table. SinisterLefty (talk) 20:47, 9 August 2019 (UTC)[reply]
It is necessary to look at the plan to see what is taking time. It is very likely that indexing is taking a very long time. If you update a value to the same value, the DBMS knows it has been updated. The row is kicked to a heap of some kind and then reinserted into the index tree (the specifics depend on the actual DBMS). In doing that, you may need to rebalance your index. That takes time. You can avoid all that indexing stuff if you add to your where clause. Instead of "update mytable set x=5 where id=100", add "update mytable set x=5 where id=100 and x!=5". Now, it will be processed, but it won't be updated and it won't be reindexed. 199.164.8.1 (talk) 13:30, 12 August 2019 (UTC)[reply]
There could also be a flag to set, something like FORCE_UPDATE = false, which will tell it not to force an update where no change occurs. SinisterLefty (talk) 15:26, 13 August 2019 (UTC)[reply]

August 10

HTML tables

Some time ago I spent a lot of time updating {{Routemap}}, but there's still an issue which has been irritating me for a while.

In HTML, is there a way to put a bunch of divs containing images in a row without allowing any line breaks between or within the divs, if the size of the content of the divs and the number of divs cannot be used?

Currently the Lua module uses nested tables for aligning images and preventing rows from wrapping. This is not very good for accessibility, though it's not that big of an issue (yet) since there are still various other ways that the diagrams are inaccessible. Jc86035 (talk) 17:23, 10 August 2019 (UTC)[reply]

Did you try to set "display:inline-block"? Ruslik_Zero 09:36, 11 August 2019 (UTC)[reply]
@Ruslik0: I've just tested that. While this does seem to work for the images, the main issue seems to be that text placement within diagrams seems to be consistently off and messes with the alignment of the images; you can see the effects in Template:Routemap/testcases (as well as the example diagrams in Template:Routemap/sandbox). Jc86035 (talk) 11:06, 11 August 2019 (UTC)[reply]
There's also a strange (and seemingly unrelated) alignment issue for the infobox diagram between Mong Kok East and Hung Hom stations. Jc86035 (talk) 11:08, 11 August 2019 (UTC)[reply]
Looking at the testcases I do not see anything wrong in them. You would better ask at Wikipedia:Village pump (technical). Ruslik_Zero 10:05, 14 August 2019 (UTC)[reply]

August 12

Excel queries and pivot tables

I frequently write queries to our database by way of the MS query function in Excel. When I've done my thing and am ready to bring the data back, I'm given three main options: to dump the result into a table, into a PivotTable, or into a PivotChart. I usually use one of the first two, depending on what I want to do next. At the bottom of the dialog box is the option to import the data into the Data Model version of a pivot table, but it's greyed out, which is the problem. Searching online finds people with a similar situation, but they are in relation to creating a Pivot Table from an existing table, while I am coming at the problem from a different source. Any thoughts as to why the option is greyed out for me and how I can get around this? Perhaps alternatively, is there any way to convert a "normal" pivot table into a Data Model one after said PT is in existence? Searching online finds this unanswered question on Mr Excel from two years ago. Matt Deres (talk) 15:23, 12 August 2019 (UTC)[reply]

jQuery interpreting widths wrongly

I've encountered a strange problem at work. The code uses jQuery to interpret the widths of elements and set child elements styles accordingly.

The problem is, jQuery interprets the widths wrongly. No matter what the actual widths are, the jQuery function width() always returns 100. This happens even if I only call the function from within $(document).ready() and $(window).load().

What is strange here is that the jQuery code works perfectly OK for elements written directly on the page. But it fails on elements that are only rendered via an @await Component.InvokeAsync() call, even though the actual jQuery code is still within $(document).ready() and $(window).load().

Why is this happening? Could it be because the jQuery code is executed before @await Component.InvokeAsync()? JIP | Talk 23:10, 12 August 2019 (UTC)[reply]

One thought is that it's returning the allocated length rather than the actual length. I have no idea why, however. SinisterLefty (talk) 02:49, 13 August 2019 (UTC)[reply]
It's hard to diagnose this without seeing it in action: can you make a small example that shows the behaviour and put it on CodePen or JSFiddle? AndrewWTaylor (talk) 06:26, 13 August 2019 (UTC)[reply]
I found out what was causing this. The elements that jQuery was failing at were inside a <div> that had a CSS class causing an animation lasting 0.15 seconds. That was apparently enough time for $(document).ready() and $(window).load() to fire before the elements had been fully rendered, causing jQuery to fail to find their exact widths. When I took the CSS class away the code started working. JIP | Talk 14:57, 13 August 2019 (UTC)[reply]
Glad you found it. SinisterLefty (talk) 15:23, 13 August 2019 (UTC)[reply]
Resolved

SinisterLefty (talk) 15:23, 13 August 2019 (UTC)[reply]


August 13

Unable to open a website

My colleague along with me run the Sherlock Holmes of India Website. I am unable to access it as it repeatedly says "www.sherlockholmessociety.in’s server IP address could not be found". I am not technically proficient. Can esteemed members suggest what should be done to get the site up and running?Sumalsn (talk) 07:52, 13 August 2019 (UTC)[reply]

The domain name www.sherlockholmessociety.in is registered at www.godaddy.com with Domain ID: D7108653-IN. You need the service of an ISP (Internet service provider - see article) to host your website. Free ISPs exist but cannot be relied on. DroneB (talk) 09:58, 13 August 2019 (UTC)[reply]

Thanks for your assistance. I am deeply obliged. Can you please tell me how I can recover that website now? Sumalsn (talk) 07:39, 14 August 2019 (UTC)[reply]

It appears that you do not understand the difference between a website and a domain name. The domain name "sherlockholmessociety.in" is a convenience service. It maps the words to a computer name, which is a number. Right now, as I type this, sherlockholessociety.in is being managed by INRegistry, but the service has lapsed. It is a yearly service to map the domain name to the computer's number. If you don't pay, the service is canceled and anyone in the world can take over use of the domain name. But, none of that has anything to do with the website. The website is a collection of files sitting on a server somewhere. The problem is that we have no means of identifying what the computer's number was. So, we can't go directly to the computer. At some point, someone created the website. That person SHOULD have kept a backup copy of the website. But, in the real world, nobody makes backups. So, you are left with two needs: First, register the domain name again and make sure you keep paying for it. Then, recreate the website. If you get the original person to remake it, tell him or her to make a backup. 135.84.167.41 (talk) 12:03, 14 August 2019 (UTC)[reply]
According to the last surviving copy of the website in archive dot com, the site looks like it's hosted by Blogger.
If you still have access to the Blogger account and you still own the domain, it may be a simple matter of making sure the domain is configured properly.
here is one of many guides on pointing your domain at a Blogger blog.
Hope this helps. ApLundell (talk) 17:20, 14 August 2019 (UTC)[reply]

August 14

Safe?

Is this website safe to use? I'm trying to convert a pdf file on my computer to html so I can put it on a webpage. --PuzzledvegetableIs it teatime already? 15:18, 14 August 2019 (UTC)[reply]

Do you actually need to convert? I've just dropped a PDF in my DOCROOT and it was immediately readable. Web server: Apache/2.4.6, browser: Firefox Quantum 60.8.0esr. Regards, Martin of Sheffield (talk) 17:10, 14 August 2019 (UTC)[reply]
There are lots of website safety checkers (just Google website safe checker). Norton Safe Web found no issues with the site you mention.--Shantavira|feed me 07:46, 15 August 2019 (UTC)[reply]

Upload pdf

I have a pdf stored as a file on my computer, and I would like to display it on a github page. How do I do this? Also note, I'm not that tech savvy so try to dumb it down for me. Thanks. --PuzzledvegetableIs it teatime already? 21:44, 14 August 2019 (UTC)[reply]

If not very large, one option would be to do a screen grab (using the Print Screen button on keyboard, possibly with SHIFT, CTRL, or ALT), paste it (Edit + Paste ?) and trim the image with something like MS Paint, Save As a JPG image file, GIF, etc. (but not as a bitmap), and display that using HTML (presumably GitHub can help you upload an image and display it on the page). Exactly how large of an image you can grab depends on the screen resolution you can display. This could also be done if there are convenient page-sized chunks to break it into. Disadvantages include the difficulty in making modifications (you would need to modify the PDF and repeat the process), larger disk space used than text, and inability to make it sharper by zooming in beyond 100%. One possible advantage is that it makes it harder for others to copy and then modify the data.
Note that PDFs include both text and images, so the data you want may be in either form initially. If it is stored as text internally, it may also be possible to extract that text, while if it is already an image, then converting it to text would require OCR.
It would help if you could describe the contents you want to grab from the PDF. Try zooming way in to tell if it is actual text, or an image of text. (If it gets sharper with every further zoom, then it is actual text.) Also, if you can highlight the text a character at a time with mouse, then it is actual text and you may be able to just cut and paste it directly to any text editor, but likely losing any formatting in the process. SinisterLefty (talk) 00:22, 15 August 2019 (UTC)[reply]

August 16

Comparing computers

I was planning to improve (rewrite) Shakuntala Devi and landed upon this news-piece which documents her battle with an UNIVAC-1108. The latter took more than a minute to calculate the 23rd root of a random 201 digit number, thus losing to Devi, who took ~50 seconds.

My question is that, if an Apple II were used (which launched the same year), what would have been the time taken by it? Any approximation? WBGconverse 13:45, 16 August 2019 (UTC)[reply]

P.S:- The model number has been also reported to be UNIVAC 1110 in some media. At any case, how did these compare to other popular models of those days? Any model, which might have beaten Devi comfortably? WBGconverse 13:50, 16 August 2019 (UTC)[reply]
One issue in answering this question is that standard computers can't process 201-digit numbers natively, so they need to use bignum software to do this sort of calculation. It's possible that different versions of the software exist, or that they may be configured to store different numbers of digits, which would affect the time. (The number of digits matters because "the 23rd root of a random 201-digit number" would be irrational, so it must be computed to a certain number of decimal places.) --76.69.116.4 (talk) 14:57, 16 August 2019 (UTC)[reply]

Google Fuchsia embedded device requirements.

What are the minimum requirements for smartphones (such as RAM etc..)?Ajax-x86 (talk) 15:12, 16 August 2019 (UTC)[reply]