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 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)
Thanks, all. Joseph A. Spadaro (talk) 16:15, 8 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)
- Start button on the lower left --> Windows security --> Virus & Threat protection --> Quick scan
- Start button on the lower left --> Windows security --> Virus & Threat protection --> Scan Options --> Windows defender offline scan
I performed a Malwarebytes brief scan -- not sure if that was what you meant. --Halcatalyst (talk) 03:24, 9 July 2020 (UTC)
- Good enough. The above tells you how to use Microsoft's scanner, but Malwarebytes is a fine product. It is doubtful that you have malware that escaped detection.
- I am out of ideas. This is all I have: [ https://theoatmeal.com/blog/fix_computer ]. :( --Guy Macon (talk) 07:06, 9 July 2020 (UTC)
You know what, given that the manifestation of the "problem" is no more than what you get from Windows/L, maybe it really isn't a problem at all. Sounds good to me. Thank you for your help. --Halcatalyst (talk) 17:09, 9 July 2020 (UTC)
P.S. How to Fix Any Computer is hilarious!
July 8
Bluetooth heartbeat / spo2 sensors
I see there are a lot of Fitbit-like gadgets out there that monitor your heartbeat, motion etc. This includes a lot of cheap "smartwatches" from places like aliexpress. They generally communicate with accompanying mobile apps but 1) I wouldn't trust a crazy app from one of those places, and 2) I want to use the data for my own purposes rather than using the app's built-in functions.
Does anyone know if the protocols for these things are reasonably standard, or at least reverse-engineerable? I'm aware of some finger clamp sensor boards that would do what I want, but it's sure a lot easier if I can use an off-the-shelf wristwatch instead of building electronics. Thanks. 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 20:20, 8 July 2020 (UTC)
- If they're talking to an ordinary phones, it's either ANT+ or Bluetooth (I'd guess BT, because pretty much all phones have that, whereas ANT+ isn't ubiquitous). For BT, there's two heartrate profiles (HRP and HRS), and the possibility that they're doing plain data and running their own proprietary protocol layer on top of that. The trouble with mystery meat unbranded stuff off Aliexpress is that they're happy to do weird stuff, and happy to change what they're doing without advertising what it is (which is a problem because lots of Aliexpress stuff doesn't have a stable brand or model number. I'd probably start with a USB bluetooth dongle on linux and run btmon to trace what's received from the HRM once it's paired. Sounds like a fun project, if nothing else. -- Finlay McWalter··–·Talk 21:46, 8 July 2020 (UTC)
- Ah thanks, I didn't know about the HRP/HRS profiles. I had figured cheap stuff was more likely to do something generic and standard than a name brand like Fitbit, which would be more proprietary and obnoxious. At least that's how things were in the PC world. I don't have a device right now but might get a cheap one and try btmon per your suggestion. Yes these things are all bluetooth. I want to actually detect the heartbeats rather than just measure the heart rate, so hopefully the BT profiles let me do that. 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 00:47, 9 July 2020 (UTC)