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:

May 4 edit

How do I write this road trip? edit

On the Data Structures unit of a CodeHS course, there’s a part where I’m supposed to write a road trip in Java. The GeoLocation class was mostly autogenerated (requiring just a few additions that I already made) and most of the RoadTrip class seems simple. It wants me to store the stops on the road trip in an ArrayList, so I wrote “private ArrayList<RoadTrip> stations;”. The part where I’m having an issue is the function “public void addStop(String name, double latitude, double longitude)”. How do I write this part, and how do I add the stops to the ArrayList with “stations.add();”? ArrayLists only have one dimension, but I need to store three pieces of information about each stop. Primal Groudon (talk) 14:22, 4 May 2024 (UTC)Reply

Making RoadTrip an array implies that you are working with a bunch of road trips. It appears that you have one road trip and you want to have multiple stops. So, your road trip object/class should contain an array of stops. This is the basic concept of relationships. In your example, you claim that a road trip "is a" array of stations. But, in reality, a road trip "contains" or "has a" array of stations. The whole "is a" and "has a" relationship concept is difficult for new object-oriented developers, but it is supposed to be simplified by filling in the sentence: A road trip ____ an array of stations. 12.116.29.106 (talk) 15:54, 7 May 2024 (UTC)Reply
To add to the great comment above, you would want to have a Stop class, which contains a Stop class object with instance variables name, latitude, and longitude. Then in the RoadTrip class you could create an ArrayList named "private ArrayList<Stop> stations", which you can then use to load the aforementioned instance variables into the ArrayList with the method “public void addStop(String name, double latitude, double longitude)”. In this case, you will only need to write your method to access the Stop object at the desired index, then change the attributes of that Stop object and not the entire RoadTrip class.
Hope this is useful! Hanoi2020 (talk) 08:18, 12 May 2024 (UTC)Reply

May 5 edit

Logarathmic scale for page views edit

In page information, if you click no. of page views, you see a graph for daily page views for a period. You also get a logarithmic scale. What additional insight does it provide, and is thus helpful? ExclusiveEditor Notify Me! 10:14, 5 May 2024 (UTC)Reply

It is useful when there are large variations in the edit counts over time as a logarithmic scale expands low numbers. An illustrative example might be an article that describes a current event: As it happens and interest is high, there may be hundreds of edits per day, whereas some time after, as interest wanes or the article is reasonably complete, those numbers might decrease to a few edits per day. On a linear scale, those few edits (representing just a hundredth of the peak) tend to disappear, hardly distinguishable from zero. On a logarithmic scale they are clearly visible, making it possible to follow periods of high and low activity on the same graph. Addendum: replace "edit" by "view"... --Wrongfilter (talk) 10:55, 5 May 2024 (UTC)Reply
@ExclusiveEditor: See e.g. page views for Bernard Hill who died 5 May. Without logarithmic scale you cannot even see how many views he got before, and it was far more than most articles. PrimeHunter (talk) 08:30, 8 May 2024 (UTC)Reply

Two zeros in Ones' complement edit

Computers using ones' complement have two ways to represent zero. Back in my day, I used Fortran on such a machine. I just checked for 0. I assume that is the way it was with all high-level languages on such a machine (correct me if I'm wrong).

But in assembler or machine language, would you have to check for both forms of zero? Bubba73 You talkin' to me? 22:26, 5 May 2024 (UTC)Reply

I don't know how the different languages handled it, but the article does say [...] a side effect of negative zero is that software must test for negative zero. RudolfRed (talk) 02:13, 6 May 2024 (UTC)Reply
Some ones' complement models (e.g. the Electrologica X1) had a zero-test as part of the machine instructions (see here, section 2.4.3  Condition-setting), so one test sufficed for plus-or-minus zero. When using high-level languages such as FORTRAN or ALGOL, the issue was not visible to the user.  --Lambiam 13:38, 6 May 2024 (UTC)Reply
One's complement was used in older models (PDP, LINC) and programmers had to handle value properly. By 1985, this was codified in IEEE 754, stating that -0 and +0 are the same value and programming languages should treat them as such. You mention Fortran. Unless it is a very old version, Fortran's compiler treated zero as unsigned, so both -0 and +0 were just 0, converted as such in the compiler. 75.136.148.8 (talk) 17:31, 6 May 2024 (UTC)Reply
Thanks for the replies. You speak of early Fortran, the first Fortran I used was FORTRAN IV and it must have handled that for the programmer. Bubba73 You talkin' to me? 04:27, 7 May 2024 (UTC)Reply
You mentioned using a 1s complement machine and using Fortran. That tells me you must have been using a DEC F40 on a PDP. Fortran IV was ported to other old mainframes, primarily for education purposes, but DEC ported it (as F40) for the PDP series for business use. DEC F40's compiler handled positive/negative zero, but also gave the programmer the ability to distinguish between them if desired. If you were using a different Fortran on a different computer, I have to assume that that version of Fortran also handled positive/negative zero in the compiler in much the same way. 12.116.29.106 (talk) 12:18, 7 May 2024 (UTC)Reply
It was actually on a CDC 6400. We used a Fortran IV textbook. CDC had enhancements to Fortran IV, but I didn't know about them until I bought my own CDC Fortran manuals a few years later Bubba73 You talkin' to me? 02:08, 8 May 2024 (UTC)Reply

May 6 edit

I need some reliable sources about the history of computer startup sounds. edit

I'm trying to write an article about computer startup sounds. The draft can be found at: Draft:Startup sound. I need help finding some good sources about the history of startup sounds as well as writing the article itself. Could someone please help me with the article? Thanks! Félix An (talk) 06:53, 6 May 2024 (UTC)Reply

The thing that immediately springs to mind is Brian Eno's work on the startup sound used in Windows 95, which is discussed in his article with some sources you can peruse. Otherwise, it would likely make sense for you to investigate histories of places and people who were developing systems like Microsoft and Apple. Remsense 06:58, 6 May 2024 (UTC)Reply
Oh dear! I thought of those ancient mainframes where when one switched them on various relays would click as the different bits got poweed up and all the fans would start running and eventually it could read cards or a paper tape and run a noisy lineprinter chunk chunk chunk chunk. But if you put vintage computers into Google it comes up with ones from the 90's! I was already on my third home computer by then! NadVolum (talk) 18:19, 6 May 2024 (UTC)Reply

pdf and pictures edit

If there is a PDF novel written in a non-English language. which are mostly scanned books of old novels that have no online version. Then is there any software or online website that can lift the written text from PDF scans and write those lines? They are not original pdf files that can be edited by a pdf editor but scanned picture books by scan machine and then uploaded in Asian languages. 2409:40E1:C9:E2A:CCC2:B6C:CF71:29B3 (talk) 09:22, 6 May 2024 (UTC)Reply

Yes, it is very possible to use optical character recognition for non-Latin scripts. Specifically, Asian languages are often well-supported, including Chinese characters written both horizontally and vertically. I use a complicated command line script, but I will try looking for an easy web tool to do it. But I wanted to make it clear it's possible. Remsense 09:29, 6 May 2024 (UTC)Reply

May 7 edit

Software for generating directed graphs edit

 

Is there software that will generate a directed graph such as this one, given a list of "from" and "to" numbers? It will include a cycle. Bubba73 You talkin' to me? 02:24, 7 May 2024 (UTC)Reply

As the description says, it was created with Graphviz, which should be usable for your purpose.  --Lambiam 07:23, 7 May 2024 (UTC)Reply
You can use graphviz, mermaid, cytoscape, d3js (look up observablehq). D3Js can do almost everything svg can do, but of course you need to roll your own display algorithms. Graphviz strenghts is that you dont need to care about manual placement, but with complex graphs it will not be pretty. You can also use TikZ or CetZ 2A02:F28:F:36A0:0:0:0:100B (talk) 08:37, 7 May 2024 (UTC)Reply


May 9 edit

Are the IP addresses used by VPNs recognizable? edit

Are the IP addresses used by VPNs recognizable as such? Can sites you're accessing tell you're using a VPN? I've noticed WP does not let an anonymous user make edits if that user is using the free (fairly limited) VPN service that comes with the Microsoft Edge browser. But does Wikipedia recognize VPN users in all cases? Does it always prevent anonymous users from editing WP if WP can tell they are using a VPN? Of is it the case only for some VPNs? 178.51.93.5 (talk) 01:08, 9 May 2024 (UTC)Reply

They are not generally recognizable per se as such. The policy against open proxies does not apply to private VPNs. IPs from public VPNs may be blocked on sight. This requires identifying them as a public VPN service, which AFAIK is not automatic.  --Lambiam 09:22, 9 May 2024 (UTC)Reply

May 10 edit

Windows 10 vs Windows 11. edit

I have dealt with computers and their OSs for many years, but I never had anything more inconvenient than the newest Windows 11, I am used to work with file trees and file folders, but here I cannot find the "C" folder. The impression I have is that such a chaotic system was made deliberately but why? Suggestions will be appreciated. I plugged Inyo the computer an external hard drive but how to find it in the software? It is all total absurd 107.191.2.10 (talk)a 107.191.2.10 (talk) 23:39, 10 May 2024 (UTC)Reply

Open File Explorer on your machine. On the left side there should be a navigation pane. Click on the "This PC" button, after which a selection of connected drives and partitions will appear, which will definitely include your OS drive (C:)
Alternatively, you could hit the Windows key and type in "Disk Management" and click on "Create and format hard disk partitions." Afterwards, a much more familiar interface will open (I am pretty sure this is lifted straight from Windows 7), allowing you to open all folders by right clicking on them and selecting "Explore."
Hope this helps. Hanoi2020 (talk) 08:26, 12 May 2024 (UTC)Reply


May 12 edit

Longest computer-chess game edit

What's the longest chess game (i.e. the one with the most moves) on record between computers, not counting moves after one side could've claimed a threefold-repetition draw? Would the answer change if known endgame solutions retroactively replaced the fifty-move rule where available? NeonMerlin 05:10, 12 May 2024 (UTC)Reply

I'm not sure there's any sensible answer to this. A poorly written program could play essentially forever. It wouldn't be hard to write a program that just makes random moves without attempting to checkmate the other side's king. Playing it against itself, it could probably play for thousands of moves before one side accidentally stumbles on a checkmate. CodeTalker (talk) 18:58, 12 May 2024 (UTC)Reply
Okay, so what if we consider only those games where both programs have beaten the World Chess Champion in a publicly recorded match without a handicap in their favor, or have beaten in such a match a program that had done so in such a match, or so on transitively? Or only those whose FIDE-equivalent Elo ratings are at least 2800 based on human-computer matches that someone's bothered to provide enough hardware for and publish the moves from? NeonMerlin 01:46, 13 May 2024 (UTC)Reply
I will see the wrong direction in there as the (poor) program will easily crumble in on itself if not designed to severely enlarge repetition paths. Prospective targeting needs to be entirely missing to not arrive early to a simple tic-tac-toe configuration, if pawns are designed to look on to always forward they are often only postponing a clear view but, related to this there's also a notable level of subjectivity. As a result, and ratings being about expectations, what could be the use trying to hardcode them? --Askedonty (talk) 01:04, 17 May 2024 (UTC)Reply

May 13 edit

Punch card loopback edit

Did any of the punch-card-based computers have a mechanism to move cards from the output deck to an input deck? Was this used for array indexing before indirect addressing was implemented? Did the cards contain the addresses or the data? NeonMerlin 20:59, 13 May 2024 (UTC)Reply

I don't believe so. However there were quite a number of places which had all their data on cards and used various arrangements of card sorters, adders, multipliers and suchlike for their computing needs. See Unit record equipment. I think loading and storing via a register were implemented fairly early on. However there were commercial machines where they for instance wrote the return address into a location where a subroutine would jump to it at the end before jumping to the subroutine. Recursive routines and stacks came later! NadVolum (talk) 21:42, 13 May 2024 (UTC)Reply
It is not clear what it means for a computer to be "punch-card-based". With very few exceptions, all mainframe computers could use punched cards for I/O until in the eighties. The readers and punches were usually separate peripheral devices but some models, such as the IBM 1442, were a combination. Each card that was read ended up in one of its two output stackers.  --Lambiam 17:08, 15 May 2024 (UTC)Reply


May 15 edit

Python pre and post for loop terminology edit

I'm having trouble finding a reference for the proper terminology of two kinds of for loops in Python. The first one is the normal: for x in a: x+4 (I know this doesn't do anything, it is for this example) The second one is kind of backwards: x+4 for x in a What is the name of the for loop when the calculation comes before the "for" keyword? 75.136.148.8 (talk) 14:15, 15 May 2024 (UTC)Reply

The second one is a list comprehension, not a for loop: https://docs.python.org/3/tutorial/datastructures.html#tut-listcomps Variouspotatoes (talk) 17:24, 15 May 2024 (UTC)Reply
Thanks. I didn't think to jump to the data structures section of the documentation to look for it. 75.136.148.8 (talk) 18:21, 15 May 2024 (UTC)Reply
It is only a list comprehension when enclosed between square brackets. Enclosed in curly braces, it becomes a set comprehension.  --Lambiam 14:08, 16 May 2024 (UTC)Reply
And in round parentheses a generator expression. --Wrongfilter (talk) 15:12, 16 May 2024 (UTC)Reply

May 16 edit

payment aggregators and payment gateways edit

Is it accurate to categorize payment aggregators and payment gateways as payment infrastructure providers or payment system providers? What distinction would be more precise in describing their role in the payment ecosystem? Grotesquetruth (talk) 05:14, 16 May 2024 (UTC)Reply

May 17 edit

I can't pass "Fundamentals of Data Structures" (FDS) and "Advanced Data Structures and Algorithm Analysis" (ADS) no matter how hard I try edit

I am having a very serious issue with the two aforementioned courses in university (for context, note that I am in university in China, and I am Canadian). I can't understand the content at all, especially when it mentions anything mathematical or mentions a complex algorithm or data structure with names that I can't even remember. (It has nothing to do with the language, since the course content of these two courses are in English, which is my native language.) FDS started out fine, with the basic lists, stacks and queues, which I am more than familiar with and can confidently answer any questions about, but when it got to various kinds of trees, I can't remember them or any of the required algorithms that are to be used on them. I already failed the FDS exam twice. On the previous attempt, I fell short of the passing grade by just ONE multiple choice question, which made me very frustrated. ADS is even harder, with mathematical formulas relating to the algorithms that I don't understand at all. What makes it worse is that although there are two opportunities to attempt the FDS exam every year (in the fall and spring semester), there is only one opportunity to attempt the ADS exam every year (in the spring semester only). I didn't have any issues with any other courses such as C, C++, web programming, computer networking, information security, large-scale databases, etc., but these two courses are giving me stress. What's worse is that there is a 6-year limit (including taking a year off), so I can't take a break from university and come back to this any time I want, and my dad, who funds my studies, is threatening to stop doing so, since he said to me (in Chinese), "If you can't pass this required course, then your entire program has no point for you, since you can't graduate without it. You'd be better off going to a [community] college back in Canada, where the content is easier, and I can stop paying rent every month and being so far away from my family, and you can be closer to your friends back in Canada [with sarcasm]." What should I do to learn the data structures and algorithms that are completely obscure to me and pass the course? This is the only course that is stopping me from studying normally, because it seems that when I even try to rewatch the course content, I still am unable to understand it.

As a little aside that is completely unrelated to the academic problems, it seems that my dad has a drinking problem. He keeps buying large packs of beer despite my requests for him to stop, using excuses like "it's on sale" (Taobao perpetually displays it as on sale) or "it's nostalgic" (since the beer is Harbin beer, the city where he grew up), and I often see large quantities of empty beer cans piling up, and because of this, he has become very short-tempered, which negatively affects my mental health. What can I do about this issue? Félix An (talk) 03:45, 17 May 2024 (UTC)Reply