Wikipedia:Reference desk/Computing
of the Wikipedia reference desk.
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.
July 1
Open pdf in acrobat not in browser
When I click on a pdf link on a website, I want it to open in acrobat (reader DC) not in the browser. I have googled (and wikipedia RD searched) and all I can find is an instruction to associate pdf with acrobat. However pdf IS associated with acrobat, and if I click on a pdf in windows explorer, it does open in acrobat. To confirm this, I changed it to edge and then back to acrobat - no improvement. It only gets it wrong when launched from a browser link. The problem occurs in both Edge and Firefox (I haven't tried chrome yet). I have a laptop with Win 10. Any help gratefully received, thanks. -- SGBailey (talk) 06:37, 1 July 2020 (UTC)
- For Firefox this can be done by going to options and then the applications section. Here you can change the default (firefox) to download or to windows default.
- For Chrome I found:
- 1. Open Chrome and type "about:plugins" into the omnibox at the top.
- 2. Find Chrome PDF Viewer in the list and click the Disable link to prevent PDFs from loading within Chrome.
- for Edge:
- 1. Click on the 3 dots at the top right of Edge. (((And then select settings edit by SGB)))
- 2. Click on Site Permissions on the left.
- 3. Click on PDF documents.
- 4. Toggle on Always open PDF files externally.
- For reference, I used the search terms "disable pdf viewer" with edge/chrome/firefox behind it. Rmvandijk (talk) 08:00, 1 July 2020 (UTC)
- That worked for Edge. Thanks. Yet to try firefox & chrome. BTW, in edge it doesn't "open", it comes up with a tiny tab at the bottom left that you can click on to get it to "open" - any idea if you can make the original click "open" the document - I suspect it won't do it. -- SGBailey (talk) 09:01, 1 July 2020 (UTC)
- Hmm, I don't generally use edge and I believe it is now moving to a chromium based browser. I still have the old one so I can't check. Rmvandijk (talk) 11:57, 1 July 2020 (UTC)
- That worked for Edge. Thanks. Yet to try firefox & chrome. BTW, in edge it doesn't "open", it comes up with a tiny tab at the bottom left that you can click on to get it to "open" - any idea if you can make the original click "open" the document - I suspect it won't do it. -- SGBailey (talk) 09:01, 1 July 2020 (UTC)
IP ranges
mw:Help:Range blocks has an element that I don't understand: The first and last numbers of any block are reserved for network communication. So a 30-level block, with four addresses, has only two that aren't reserved. Take this group of addresses:
- 148.20.57.0
- 148.20.57.1
- 148.20.57.2
- 148.20.57.3
- 148.20.57.4
- 148.20.57.5
- 148.20.57.6
- 148.20.57.7
We could do two 30-level blocks (0-3 and 4-7), and only four of the addresses (1, 2, 5, and 6) would be usable. But if we do a 29-level block, encompassing all eight addresses, six of the eight will be usable, and only 0 and 7 would be unusable. Why does the availability of 3 and 4 depend on the length of the range? Why does the length of a range influence whether an IP address is reserved for network communication (maybe ICANN?) or whether it's available for normal use? Nyttend backup (talk) 14:59, 1 July 2020 (UTC)
- Nyttend backup, I assume by 'level' you mean bits, as in 148.20.57.0/30. The statement in the range blocks help is not necessarily true. There is a lot of network equipment these days that do not need broadcast or network addresses, and therefore can treat some or all of those numbers as usable for host addressing.
- The reason an all-zeroes address is historically unusable is because it is the network address itself. It is used to denote the network rather than a host on it. Network administrators would use it for such purposes.
- An all-ones address is typically unusable because it is considered a broadcast address. If you ping the all-ones address then ping would hopefully use the broadcast Ethernet address to reach all hosts on the LAN. This is not observed so much anymore, although the broadcast may still be reserved in some cases.
- As you can see, because IP addresses depend on bits set or unset in a mask, the all-ones or all-zeroes addresses can change depending on the length of the mask. In 148.20.57.0/30, that is a 2-bit host mask and so if 2 bits are both 0, or 2 bits are both 1, then that produces the "unusable" addresses, and so forth. Elizium23 (talk) 19:51, 1 July 2020 (UTC)
- Sorry, by X-level I meant an /X range, e.g. "we could do two /30 blocks..." 148.20.57.0 is 10010100.00010100.00111001.00000000. So since you're talking about all-zeroes or all-ones, does that apply only to 255.255.255.255 and 0.0.0.0? Sorry for my confusion; I've just read the rangeblocks stuff time and time again, and never understood it much. Nyttend backup (talk) 11:23, 2 July 2020 (UTC)
- The range block will block all the numbers in the subnet specified. The all zeros and all ones are within the subnet, so 10010100.00010100.00111001.00000000 is not usable for a network device, and 10010100.00010100.00111001.00000011 is not usable in that /30 subnet, as they are the first and the last in the range. You can turn that /30 into a bit mask that you "and" with the address 00000000.00000000.00000000.00000011 to get the number within the subnet, from 00 to 11. Graeme Bartlett (talk) 12:26, 2 July 2020 (UTC)
- Nyttend backup, when I say "all zeroes" or "all ones" I am referring to the host portion of the address.
- In 148.20.57.0/29, 3 bits are in the host portion, so the network address is 148.20.57.0 and the broadcast is 148.20.57.7.
- In 148.20.57.0/30, 2 bits are in the host portion, so the network address is 148.20.57.0 and the broadcast is 148.20.57.3. Elizium23 (talk) 20:47, 4 July 2020 (UTC)
- Also I am not sure why you are asking about usable addresses in the context of blocking. If you block a range, the whole range is blocked, usable and unusable alike. Elizium23 (talk) 20:50, 4 July 2020 (UTC)
- Sorry, by X-level I meant an /X range, e.g. "we could do two /30 blocks..." 148.20.57.0 is 10010100.00010100.00111001.00000000. So since you're talking about all-zeroes or all-ones, does that apply only to 255.255.255.255 and 0.0.0.0? Sorry for my confusion; I've just read the rangeblocks stuff time and time again, and never understood it much. Nyttend backup (talk) 11:23, 2 July 2020 (UTC)
July 4
Stopping Itunes from starting up when charging Iphone
Whenever I plug in my iphone to charge using a USB port on my imac, itunes starts up trying to mindmeld with my phone. Any way to stop this? Thanks.--100.2.221.47 (talk) 20:44, 4 July 2020 (UTC)
- I found these two pages that have some suggestions on settings you can change that will stop this behavior: [1] and [2]. RudolfRed (talk) 22:01, 4 July 2020 (UTC)
July 5
Java desktop application development
Briefly, what are the steps for turning a Java GUI program that only runs on my IDE into a downloadable desktop application? I know it has something to do with .jar and .exe files, JavaFX, and I’ve read this and this, but it all seems like gibberish to me. So, can someone give me a brief outline of how this works. How do I get started? --PuzzledvegetableIs it teatime already? 02:29, 5 July 2020 (UTC)
- If a desktop has a JRE installed, you can distribute your application in form of .jar file together with necessary library (in /lib folder). Ruslik_Zero 14:21, 5 July 2020 (UTC)
- Yes, but I was referring to the type of desktop application that someone might download off the internet. Usually, they are in the form of .exe files and don't require having a JRE pre-installed. I think I read somewhere that you can bundle an ad-hoc JRE with the download, but I have no idea how that works. --PuzzledvegetableIs it teatime already? 15:02, 5 July 2020 (UTC)
Android problem
Hi guys,
I wrote a Android app aiming to read and output Sensor readings. Whereas, the following part keeps throwing me "NullPointerException"
try {
writer.write(String.format("%d; ACC; %f; %f; %f; %f; %f; %f\n", sensorEvent.timestamp, sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2], 0.f, 0.f, 0.f));
Do you have any idea about solving this? Thank you!
--Deep humility (talk) 08:00, 5 July 2020 (UTC)
- Something is null. If it happens on that line (as opposed to inside a function called from that line), candidates are the three pointers that are dereferenced on that line: writer, sensorEvent, and sensorEvent.values. Immediately before that line, print them out to see which one. Since the function seems to use two of those earlier, I'm guessing writer. 85.76.78.189 (talk) 10:10, 5 July 2020 (UTC)
- Thank you so much for the clue!! --Deep humility (talk) 09:03, 6 July 2020 (UTC)
- @Deep humility: You could also split the formatting action into four real steps plus one trivial (which formats zeros) and see which will throw the exception. --CiaPan (talk) 12:30, 6 July 2020 (UTC)
- Ahh, thank you so much. Gonna do it! --Deep humility (talk) 04:42, 7 July 2020 (UTC)
another GNU emacs isearch mystery
There's a classic old Firesign Theater line, "Then, in the late Devouring period, fish became obnoxious." My problem is that today, in GNU emacs, incremental searches became caseful. I don't know how I did this, and I don't know how to turn it off.
I was probably doing an incremental search, and I probably hit some control key by accident.
According to the manual, I can use M-c to toggle case folding on or off during an incremental search. But that couldn't have been it, because in my emacs now, M-c during an isearch does indeed make that isearch caseless, but the next isearch starts out caseful again. Somehow I've changed the default.
According to that same page, the variable case-fold-search controls the default, but I don't know what key combination I might have hit to turn that variable off, nor have I figured out a way to set it to t again.
I'm probably going to have to exit and restart emacs to fix this (a stinging and ignominious defeat), which would certainly be much more expedient than figuring this out or asking about it here, but my fear is that, whatever I accidentally did, I might do it again, and if I don't notice right away I could make arbitrarily many serious mistakes, searching for strings and concluding they're not there (a technique I use all the time), only to reach a wrong conclusion because of not realizing that isearches had surreptitiously become caseful again.
So, does anyone know how to figure out what key combination might be configured to clear or toggle the value of case-fold-search? —Steve Summit (talk) 13:45, 5 July 2020 (UTC)
[Footnote: Just before posting this, I discovered an entire "customization" subsystem within GNU emacs which I'd never even heard of, and after playing around a bit within it it looks like I've successfully erased a customization and reverted case-fold-search to its former state. But the question remains, what might I have done to accidentally customize it in the first place?
July 6
I'm wondering if anyone knows how to find the scenes just prior to where Doris Day caused absolute chaos in her new job, and what is supposed to be happening. It appears there is a logical process going on when things work as they should, but the writers might have just made something up that looked good. Somehow, different colors of cards are being printed and sorted into categories, and this process took place long before my days of learning about computers. We didn't do anything like this. In my classes we had two types of output: a sheet that was printed, or information on our screen. No cards as output. My only hints as to what the company was doing were Day's character's comment about having to learn codes, and the boss saying someone got a bill for $128,000 for a very small purchase after Day made a mess.— Vchimpanzee • talk • contributions • 15:29, 6 July 2020 (UTC)
- Sounds like a Hollerith card 41.165.67.114 (talk) 06:17, 7 July 2020 (UTC)
- In the scene staring around 1:16 the sign on the wall says UNIVAC but the machines are Remington Rand Hollerith card sorters (Holerith was IBM. Univac used a different kind of card.) Colored cards were common. The studio probably just bought a bunch of different colors because it looked better.
- The Master Control panel Doris Day hits appears to be some sort of control for a paper tape reader/puncher. --Guy Macon (talk) 06:45, 7 July 2020 (UTC)
- Punch cards certainly were used as output, in situations where they would later become inputs again. I dimly remember (into the 1970s) receiving bills from one or other utility company that were on punch cards, which would show my account number and the amount owing -- presumably when I returned them with my payment, someone would put the card back into a keypunch machine, punch onto the card (at some specific position) the amount of my check, and then the card would go back into the computer as an input. I also once wrote COBOL programs for a compiler that produced a deck of binary punch cards containing the executable code, which was then fed into a smaller computer that did not have a compiler of its own.
- As I recall, Remington and UNIVAC punch cards were the same size as IBM cards, but used a different data format, with round holes... right, that's covered in the article already linked. --174.89.49.204 (talk) 23:02, 7 July 2020 (UTC)
- It was actually quite easy to mess up. Some cards were used often and they would become "floppy" and get mangled in the feeder. You would then take a blank card and manually reconstruct the hole pattern with a special punch. $12.80 could easily come $128,000.00. Even new cards could cause problems if the initial punch did not eject the cutout piece correctly. There was a very real reason for "Do not fold, spindle or mutilate." Staples were a nightmare. 41.165.67.114 (talk) 09:40, 7 July 2020 (UTC)
Old laptop - can barely hear volume, even when the volume level is 100
I have an old laptop, laying around. In good condition. Never used it all that much. Right now, I need it for a very limited purpose only ... to log onto You Tube and play You Tube videos. Here and there, occasionally. That's it. So, I did not want to go out and buy a new laptop, nor do I want to pour a lot of money into this old laptop. Here's the problem and my question. Even when I put the volume on the highest level (100), I can still barely hear it. I went to some website that says "increase volume by downloading this app". Here: [3]. I tried that. It increased the volume ever so slightly ... but basically it's difficult to hear the You Tube video playing. What can I do? What should I do? Any comments, thoughts, suggestions, ideas? Thanks. Joseph A. Spadaro (talk) 16:30, 6 July 2020 (UTC)
- It may be the speakers failing with age. I'd recommend trying a pair of cheap external speakers, bluetooth if your laptop supports it, externally powered ones run off a line to the headphone jack if it doesn't. (On many laptops the headphone jack and the internal speaker share the same amp, so if that's the culprit you might have problems with unpowered headphones too.) 100.2.177.152 (talk) 18:41, 6 July 2020 (UTC)
- 1) You can use a Youtube downloader and play it back in a program like VLC which supports >100% volume. 2) Check that both your system volume and the volume on the YouTube interface are up to 100%. 3) Your speakers could've become filled with fluff and dust over time. I suppose that could affect the sound too, I don't know. 93.136.52.139 (talk) 22:08, 6 July 2020 (UTC)
Lambda expressions for JavaFX event handler
The following code can be used to create a javafx.scene.control.Button that reacts to the user clicking it in JavaFX.
Button b = new Button(); b.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent actionEvent) { // Code to execute goes here } });
However, I have seen it simplified as this:
b.setOnAction(actionEvent -> /*Code to execute goes here*/);
Why does the second option work? The source code for the setOnAction() method looks like this:
public final void setOnAction(EventHandler<ActionEvent> var1) { this.onActionProperty().set(var1); }
The method clearly takes an EventHandler<> as a method, not a Consumer, which is what that lambda expression appears to be. --PuzzledvegetableIs it teatime already? 22:47, 6 July 2020 (UTC)
- EventHandler is annotated as a functional interface, which is explained a bit better here. -- Finlay McWalter··–·Talk 12:59, 7 July 2020 (UTC)
July 7
sudden black screen
When I am working normally with my laptop, suddenly the screen on my Microsoft Surface 3, Windows 10, will go black and remain that way for a few to maybe 20 seconds. Then the logon screen will come on and the system will immediately recognize my face. After this, everything proceeds normally. Nothing is lost. Any idea what is happening, and what I can do about it? --Halcatalyst (talk) 20:42, 7 July 2020 (UTC)
- Halcatalyst, thank you for your system information and complete description of the problem.
- This could be a result of Windows locking the screen for some reason:
- Windows+L
- Ctrl+Alt+Del
- Screen saver timeout unusually low
- A background task or service may be interfering.
- Remote desktop, remote assistance, or some other desktop sharing software is kicking in. Elizium23 (talk) 22:08, 7 July 2020 (UTC)
- It could also be due to a spurious sleep signal being received. Check the power saving settings and the timeouts before the device is put to sleep, or other mechanism that might cause it to sleep (suspend). Elizium23 (talk) 22:09, 7 July 2020 (UTC)
- Avoid having your screen saver and your
"turn of display""turn off display" using the same delay. Put at least 5 minutes between them. Otherwise they try to access the same resources at the same time and one of them has to wait. --Guy Macon (talk) 22:52, 7 July 2020 (UTC)
- Avoid having your screen saver and your
I didn’t know about Windows/L, but that is exactly what happens. Don’t know why you mentioned Ctrl-Alt-Del, but I am familiar with Task Manager. Should I be looking for something specific there?
I have no screen saver. As far as I can tell, there is no background task or service which could be interfering. This is my home computer, so there is no remote desktop, remote assistance, or other desktop sharing software in play.
Sleep settings are: one hour when on battery, never when plugged in. I am plugged in almost all the time. The power plan is “balanced.”
I don’t know what "turn of display" is.
I’ve always tried to avoid sleep mode. This may be irrational, but I’ve always worried the computer would never wake up. In any case, I don’t have any need for it, since as I said I’m usually on power and I have a very good battery. --Halcatalyst (talk) 01:04, 8 July 2020 (UTC)
- Sorry. "Turn Off Display". It's part of power and sleep, but you aren't telling it to sleep so that's not it. This next bit is most likely not it either, but go to Windows Security and do a quick scan then an offline scan. Unlikely to fix the described problem but easy to do just in case I am wrong. --Guy Macon (talk) 01:39, 8 July 2020 (UTC)
I used Windows Settings search to find Device Security. It had information about Core Isolation, Security Processor, and Secure Boot. I must have been in the wrong place. --Halcatalyst (talk) 13:34, 8 July 2020 (UTC)