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.
August 22
[edit]stop cursor blink on all apps in windows 11, especially Geany
[edit]Hi, I want to know how to stop the cursor blinking across all of Windows 11. I have disabled blink in Settings, but some apps still blink, and I can't fix it. The worst case is Geany, my otherwise excellent text editor. Any suggestions? IBE (talk) 00:12, 22 August 2024 (UTC)
- Oh hey that's based on Scintilla, I use SciTE myself.
- Geany sets its own blink rate. There is some confusing discussion about how Scintilla GTK (which is what Geany is?) respects a setting for GTK blink rate "if available". On Windows, I guess it isn't.
- There's a cursor width setting in the Geany manual, which in theory will turn the cursor off entirely if set to 0. You might be satisfied with that, if it works. Card Zero (talk) 14:31, 22 August 2024 (UTC)
- This is hard, from a programmer's point of view.
- The blink setting in Windows affects the text inputs rendered by Windows' toolkit. All applications that have outsourced their text inputs to Windows' toolkit automatically follow this setting. But Windows' toolkit is only available on Windows, so if you want to create a cross-platform application (like Geany), you can (A) maintain two versions, one with Windows' toolkit, one without; (B) use a cross-platform toolkit; (C) build your own text inputs. (A) is a lot of work, as you have to maintain two versions of every graphical input/output function. Geany uses (B), in the form of the GTK toolkit. I suppose GTK's developers may try to read Windows' settings, but the interface to Windows' settings is a poorly documented moving target.
- There may be a tool on Windows to configure GTK. I haven't used Windows in ages, so I never tried this myself. That may help for the GTK-based applications, but not everything else. Some applications could have hard-coded blinking, so no way to change it. PiusImpavidus (talk) 08:25, 23 August 2024 (UTC)
- Well, in this case, poorly documented moving target is undue. It's GetCaretBlinkTime(), and that was true in 1996, which is the age of my copy of WIN32.HLP, and it's still true today. I just tried, it returned 530 milliseconds. Microsoft's online (web) help closely follows WIN32.HLP, if you can find your way into the right parts of it. (Reading an actual .hlp file in 2024 is not so simple, I must admit, since they removed the reader years ago.) I'd imagine that every Windows GTK-based application ships with its own copy of GTK, rather than attempting to use or install system-wide shared libraries. For instance I see my GIMP has a libgtk-win32-2.0-0.dll, hidden among a million other dlls, in its \bin alongside the application binary. So a system configuration for GTK on Windows is probably not an option. Card Zero (talk) 11:03, 23 August 2024 (UTC)
Thanks for those replies. Looks like I'll have to keep searching to see if there's a way around it. Sad because when I had it on Windows 10, it was all good for some reason, easy to disable the blink (I'm pretty sure there was a setting under Edit->Preferences). IBE (talk) 00:08, 24 August 2024 (UTC)
August 23
[edit]Lower half of Dos Code pages
[edit]Code page 850 cites both IBM[1][2] and the International Components for Unicode[3] in the header of the table describing the layout of the code page. IBM[1] and the article provide a table where the characters at positions 0x00–0x7F match Code page 437, but International Components for Unicode provides a mapping[3] that instead agrees with ASCII including ASCII control codes. The IBM mapping[2] agrees with the IBM table not the Unicode mapping. Is the situation here something like the whole ISO 8859-1 vs Windows-1252 thing, or is one of the sources just wrong?
Other Wikipedia articles on Dos codepages have similar issues, but some only provide a table for the upper half and state that the lower half is the same as Code page 437. What should the articles say? McYeee (talk) 20:08, 23 August 2024 (UTC)
References
- ^ a b Code Page CPGID 00850 (pdf), IBM, 1986
- ^ a b Code Page (CPGID) 00850 (txt), IBM, 1998
- ^ a b "International Components for Unicode (ICU), ibm-850_P100-1995.ucm". GitHub. 2002-12-03. Archived from the original on 2022-01-28. Retrieved 2022-01-28.
August 24
[edit]What means java
[edit]What java means 2409:4042:EBB:FC77:69FA:EA09:283C:C31A (talk) 15:18, 24 August 2024 (UTC)
- Your question is unclear. What it means will depend on the context. Is it the country or some other place? Perhaps the programming language. Or one of the many things listed at Java_(disambiguation)? RudolfRed (talk) 18:57, 24 August 2024 (UTC)
August 27
[edit]Javascript for kids
[edit]I'm pondering and thinking about buying a Javascript or coding for kids book to teach myself coding (Javascript would be particularly useful), after I learn TI Basic 83/84 Plus. However the books I see on Javascript for kids, namely JavaScript for Kids: A Playful Introduction to Programming or JavaScript For Kids For Dummies (For Dummies (Computers)) are both approaching 10 years old. How screwed would I be trying to learn Javascript from 10 year old books? What really beginner books do people recommend for Javascript? Thanks. Therapyisgood (talk) 01:36, 27 August 2024 (UTC)
- I think you'll be fine. Any enhancements that came out in the last ten years are not likely to impact a beginner. The basic core is still the same. 41.23.55.195 (talk) 05:01, 27 August 2024 (UTC)
- Finding a new book will be difficult because the popular beginner language changes over time. When I was a child, it was basic. That was eventually overtaken by Pascal and I thought all the kids learning Pascal were weird. It keeps changing. Right now, it is Python. If you look for Python Programming for Kids, you will find hundreds of books published this year alone. My opinion is that the language doesn't matter. The concepts matter. Learn what a variable is. Learn what control structures are. Learn what functions are. When you view programming as pushing values in and out of memory with functions, it doesn't matter what language you use. They all do the same thing. 12.116.29.106 (talk) 12:06, 27 August 2024 (UTC)
- What exactly are control structures, and, functions...? Are those terms used in web-programming languages? I'm familiar with terms like variabes, and while loops/for loops. Classes and objects. I feel like when you said function, Java and C++ have the same idea but as another word. 66.99.15.162 (talk) 18:00, 29 August 2024 (UTC).
- According to programming books we have: Control structures manage the program counter, affecting the flow of the program. If-else, while, for, etc... Anything that controls the program counter to do something other than flow from one line to the next is a control structure. Functions are very similar to a control structure. They are named locations in memory where you store code so you can use that name to execute the code, along with parameters and return values. It is not "web programming." It is "programming." If you are using a langage that doesn't have control structures, you are stuck writing a program that always goes from line 1 to line 2 to line 3, etc... If you don't have functions, you cannot repeat an algorithm multiple times with different parameters. 75.136.148.8 (talk) 10:49, 30 August 2024 (UTC)
- What exactly are control structures, and, functions...? Are those terms used in web-programming languages? I'm familiar with terms like variabes, and while loops/for loops. Classes and objects. I feel like when you said function, Java and C++ have the same idea but as another word. 66.99.15.162 (talk) 18:00, 29 August 2024 (UTC).
August 28
[edit]Treeified and linked-list hash bucket equivalence
[edit]A maximally-unbalanced binary search tree is the same as a sorted singly-linked list except that it has an extra null pointer per node. In hash table implementations such as OpenJDK's HashMap, where hash buckets are linked list by default but hash flooding# attacks are resisted by "treeifying" overcrowded buckets whose keys are at least partially ordered, could this equivalence be exploited to decrease the number of branch instructions further than has so far been achieved? NeonMerlin 23:35, 28 August 2024 (UTC)
August 31
[edit]Why Did Windows 11 Computer Restart Itself?
[edit]I was working at my Dell desktop computer, running Windows 11, and stepped away for a little less than an hour. When I came back, I saw that Outlook was opening all of the windows that had been open when I took my dinner break. I then observed that Word and Access had been restarted, and Word had restored two documents from Autorecovery. This wasn't in the time window that I have specified for automatic restarts. Is there a log that records why the computer was restarted? Why did the computer restart itself? Robert McClenon (talk) 02:07, 31 August 2024 (UTC)
- There's a chance your computer had a BSOD while you were away. You can verify it by checking for any
BugCheck
events in the event viewer. Ian P. Tetriss (talk) 15:29, 31 August 2024 (UTC)- Thank you, User:Ian P. Tetriss - There was a RestartManager event logged just about at the time that I went back to my computer, that said that Windows Explorer could not be shut down. I haven't gotten any more information at this time, but this confirms that there was some sort of event. Robert McClenon (talk) 19:12, 31 August 2024 (UTC)
- A cat could have pressed the power button even. Luhanopi (talk) 20:00, 31 August 2024 (UTC)
- In my cynicism, I suspect it was an update, and the designated time window was treated only as a suggestion. Card Zero (talk) 08:32, 1 September 2024 (UTC)
- The cat presses the keys on the keyboard. She doesn't press the power button. The computer is a desktop model, and the power button is facing forward about eighteen inches off the floor. That isn't where the cat would have anything to do with it. I would not be surprised if it was an update that didn't respect the time window. Robert McClenon (talk) 17:34, 1 September 2024 (UTC)
- I've had Windows updates ignore the time window before. I can't offer any technical insight into why, just confirm that it does happen. DuncanHill (talk) 17:38, 1 September 2024 (UTC)
- You can use external software to prevent automatical updates. But check them biweekly then.
- --Luhanopi (talk) 17:48, 1 September 2024 (UTC)
This answer is based on Windows 10. I don't think Microsoft has changed any of this for Windows 11 but I'm not sure.
If it was Windows update, this should show be clear in Event Viewer. E.g. Event 1074 for User32 would be something like:
As mention above, a restart due to system error should also be clear from the Event Viewer, beyond the bugcheck you'd also get a critical event from Event 41, Kernel-PowerThe process C:\Windows\system32\svchost.exe (COMPUTERNAME) has initiated the restart of computer COMPUTERNAME on behalf of user NT AUTHORITY\SYSTEM for the following reason: Operating System: Service pack (Planned)
Reason Code: 0x80020010
Shut-down Type: restart
Comment:The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
although as the event says this could also be due to a sudden power loss, so you'd want to look at other stuff like the bugcheck to try and work out what went wrong. Although you may not always be able to work out exactly what went wrong. E.g. unless you have some sort of hardware monitoring, I don't think you could tell the difference from pulling out the power cable of a system without a built in battery, and a system that died due to thermal protection, and even pushing the reset switch. For that matter, rarely you might get an error which does BSOD which I think there might not be signs of. Still, you at least have the idea it was a sudden unclean shutdown.Probably the most uninformative is the typical
This could be a simple you restarted via the GUI. It could be something else. You can look for other events which might reveal stuff, but you might not always find stuff. Note that with the majority of desktop computers, pushing the power button on the keyboard will either turn the computer off or put it to sleep. It will not restart the computer. If you push it once and the computer shutdowns then push it again later it may start back up, but this should show up as a shutdown rather than a restart in Event Viewer. Likewise if somehow you push the reset switch, as I noted above this should show up as an unclean shutdown.The process C:\Windows\System32\RuntimeBroker.exe (COMPUTERNAME) has initiated the restart of computer COMPUTERNAME on behalf of user COMPUTERNAME\USER for the following reason: Other (Unplanned)
Reason Code: 0x0
Shut-down Type: restart
Comment:I don't think it's very common for computers to have soft restart switches since it's not considered necessary. I think some variants of *nix, may show up a shutdown menu where you can chose what you want to do when you push the poweroff button or for that matter the ACPI soft-off switch. And I'm sure you could get something which would do that in Windows as well, or maybe there's even a way to change some setting somewhere to do that. But I assume you'd still need to click on restart.
Nil Einne (talk) 09:37, 2 September 2024 (UTC)
- In the future, you could consider disabling Reboot after BSOD Luhanopi (talk) 09:41, 2 September 2024 (UTC)
You could but I don't see the reason for that. AFAIK, all the details that screen provides will be in the Event 1001 BugCheck event. Also I should mention that there are variants of restarts e.g. depending on what's being installed you might get
instead of the service pack one. There's alsoThe process C:\Windows\servicing\TrustedInstaller.exe (COMPUTERNAME) has initiated the restart of computer COMPUTERNAME on behalf of user NT AUTHORITY\SYSTEM for the following reason: Operating System: Upgrade (Planned)
Reason Code: 0x80020003
Shut-down Type: restart
Comment:
I might actually be confused earlier and the TrustedInstaller ones are generally for restarts required during updates and the MusNotificationUx ones are for restarts to initiate installation, not sure. You could look more if it matters, but my main point is if it's a regular restart by the system for an update, it should be clear from the Event 1074 that this happened. If it instead shows up as an unplanned restart, this suggests something else whether a GUI initiated restart, a command line one, or something else. If you installed some weird software to manage updates, perhaps this will also show up as a simple unplanned restart.The process C:\Windows\system32\MusNotificationUx.exe (COMPUTERNAME) has initiated the restart of computer COMPUTERNAME on behalf of user COMPUTERNAME\USERNAME for the following reason: Operating System: Service pack (Planned)
Reason Code: 0x80020010
Shut-down Type: restart
Comment:Nil Einne (talk) 10:13, 2 September 2024 (UTC)
- BTW, to be clear, if you restart via the GUI even if you tell it to update, I think this will generally show up as a unplanned restart. Although you can look at the Windows update events and confirm that an update was awaiting restart and installed after you restarted. However this wasn't a force restart per se, even if you did it because you knew you'd eventually be forced. (Sort of, AFAIK, the 7 day rolling delay is technically infinite.) Nil Einne (talk) 10:16, 2 September 2024 (UTC)
- Soul it happen again, you ruled out BSOD Luhanopi (talk) 11:52, 2 September 2024 (UTC)
- In the future, you could consider disabling Reboot after BSOD Luhanopi (talk) 09:41, 2 September 2024 (UTC)
- I've had Windows updates ignore the time window before. I can't offer any technical insight into why, just confirm that it does happen. DuncanHill (talk) 17:38, 1 September 2024 (UTC)
- The cat presses the keys on the keyboard. She doesn't press the power button. The computer is a desktop model, and the power button is facing forward about eighteen inches off the floor. That isn't where the cat would have anything to do with it. I would not be surprised if it was an update that didn't respect the time window. Robert McClenon (talk) 17:34, 1 September 2024 (UTC)
- In my cynicism, I suspect it was an update, and the designated time window was treated only as a suggestion. Card Zero (talk) 08:32, 1 September 2024 (UTC)
- A cat could have pressed the power button even. Luhanopi (talk) 20:00, 31 August 2024 (UTC)
- Thank you, User:Ian P. Tetriss - There was a RestartManager event logged just about at the time that I went back to my computer, that said that Windows Explorer could not be shut down. I haven't gotten any more information at this time, but this confirms that there was some sort of event. Robert McClenon (talk) 19:12, 31 August 2024 (UTC)
Documentation for Event Viewer
[edit]Does the Event Viewer contain its own documentation? Where can I find instructions on how to use the Event Viewer? Robert McClenon (talk) 18:24, 1 September 2024 (UTC)
- [1] - Internet doc. Luhanopi (talk) 18:32, 1 September 2024 (UTC)
- At first sight. Haven't been throrugh Luhanopi (talk) 18:33, 1 September 2024 (UTC)
- Not that good. Will leave as it may be useful still. Luhanopi (talk) 18:33, 1 September 2024 (UTC)
- At first sight. Haven't been throrugh Luhanopi (talk) 18:33, 1 September 2024 (UTC)
Controlling printed page in HTML
[edit]I am developing a web application whose front end is done in plain HTML and CSS. One of the pages shows a printable page with rows of pretty much identical <div>
elements that look like rectangular text boxes of identical width and height, only the text contents of the elements vary.
Now there is a new requirement that the number of these elements that end up on each individual sheet of paper when physically printing the document should be configurable. Is there any other way to do this than fine-tuning the CSS layout of the page to get the height of these elements and the space surrounding them to match the height of the paper? JIP | Talk 11:16, 31 August 2024 (UTC)
- You can specify different CSS for different media types. For instance you can enforce page breaks in appropriate places. Ruslik_Zero 14:42, 31 August 2024 (UTC)
- Thanks, the section "Page breaks" seems to be exactly what I need to do. JIP | Talk 19:19, 31 August 2024 (UTC)
- In general, i'd say that restrictions like this are pretty unfeasible to guarantee in HTML. It is a markup language (designed for a single page medium), and not a typesetting language. You get very little control about positioning, esp wrt the concept of a 'page'. You can do some best effort with page break suggestions, but that is about it. —TheDJ (talk • contribs) 08:55, 1 September 2024 (UTC)
- I use page-break-after for elements to force them to break to a new page. The issue is setting the div height. I scanned two books on CSS and I am not sure if vh is relative to the page size when printing or not. If it is, you can easily adjust divs to a percent of print space height using vh. If it is locked to the window's viewport, that won't work. 75.136.148.8 (talk) 12:05, 2 September 2024 (UTC)
- Thanks, the section "Page breaks" seems to be exactly what I need to do. JIP | Talk 19:19, 31 August 2024 (UTC)
September 1
[edit]Why does my laptop (almost) always shut down, when running Windows Experience Index?
[edit]In the rare cases, when it doesn't shut down (as happens if it has just been turned on), the Windows Experience Index, on a scale from 1.0 to 7.9, is:
Processor: 6.9.
RAM: 6.9.
Hardisk: 5.9.
3D Graphics: 5.0.
2D Graphics: 4.2.
HOTmag (talk) 07:15, 1 September 2024 (UTC)
- In my experience, shut downs like that have three primary reasons: 1. overheating of a component (might want to check if all the fans are clean, working and freely spinning) or 2. possibly a hardware failure in one of many components, but generally gpu or cpu memory. 3. a bad driver that causes a crash with a level of randomness.
- Determining which one is the cause can be a challenge. But in the BIOS, you can generally observer temperatures and run a memory check, which might be helpful. —TheDJ (talk • contribs) 09:02, 1 September 2024 (UTC)