Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 260: Line 260:


This is over ten years old. Any newer technology out there? Any hints where to look, please? I am not very experienced with hardware or the current market. --[[User:Gryllida|Gryllida]] ([[User talk:Gryllida|talk]]) 10:11, 17 February 2021 (UTC)
This is over ten years old. Any newer technology out there? Any hints where to look, please? I am not very experienced with hardware or the current market. --[[User:Gryllida|Gryllida]] ([[User talk:Gryllida|talk]]) 10:11, 17 February 2021 (UTC)

== Ms-Access, to pass a query row to some function ==

Hi, in any SQL query I can pass any field to some external function: <I>SELECT myFunct(myField1, myField2) AS myResult ..</I><br>
Now I'd like to pass the whole row to some function. <br>
If it were a recordset it would be easy: <I>set myRS = CorrentDB.openrecordset("myTble")</I> and then in a loop <I>myResult = myFunct(myRS)</I><br>
Is there some way to do this in an SQL query? <I>SELECT myFunct(*) AS myResult .. </I> as it were. Thank you <br>
(Of course I can put all fields in the parameter list, but if there are a lot of fields a more general approach would be welcome) [[Special:Contributions/194.174.73.80|194.174.73.80]] ([[User talk:194.174.73.80|talk]]) 11:55, 17 February 2021 (UTC) Marco PB

Revision as of 11:55, 17 February 2021

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:

February 10

Rt domain

From what I've found, after Pornhub had been blocked in Russia, its Russian version seemingly switched to rt.pornhub.com (and when I visit it, I'm automatically redirected to the rt address). However, there's no .rt country domain, so is this sort of a made-up backup domain? Thanks. 212.180.235.46 (talk) 16:22, 10 February 2021 (UTC)[reply]

the leading rt is just the name of the system that PornHub is using for the Russian version of the site, it is not a top level domain. It is the same as the en in front of wikipedia.org for the english version of Wikipedia. top-level domains always come at the end of the address, not at the beginning. RudolfRed (talk) 16:28, 10 February 2021 (UTC)[reply]
Thanks, though I still wonder why rt and not ru is used per widely accepted ISO 639 and similar language codes. 212.180.235.46 (talk) 19:36, 10 February 2021 (UTC)[reply]
The choice of subdomains under a foo.com domain is entirely up to the owner of foo.com; there is no standard to conform to. --142.112.149.107 (talk) 05:19, 11 February 2021 (UTC)[reply]
If they are blocked in Russia, they possibly don't want to wake every dog up with "RUSSIAN VERSION HERE" as it were. 194.174.73.80 (talk) 11:27, 17 February 2021 (UTC) Marco PB[reply]

February 11

NIMCET preparation

please suggest me some good book preparation for nimcet — Preceding unsigned comment added by 43.248.152.171 (talk) 15:42, 11 February 2021 (UTC)[reply]

Here is a list of "Best Books for NIMCET 2021". This webpage also lists a few recommended books. I have no way of evaluating if these recommendations are any good.  --Lambiam 01:37, 12 February 2021 (UTC)[reply]

Lua

Hello fellow Wikipedians. I have a question about Wikimedia software and Wikitext. I was wondering if anyone knows if the Lua script works on Miraheeze? And if so, how can it be imported? Any help is much appreciated. Thanks and Happy Early Lunar New Year! Herbfur (Eric, He/Him) (talk) 19:33, 11 February 2021 (UTC)[reply]

You should address your question to Miraheze. Ruslik_Zero 20:00, 11 February 2021 (UTC)[reply]
The pages in their Module namespace, such as Module:Hatnote, look very much like ours, such as Module:Hatnote. In fact, the code of these two is identical. You could ask User:Dmehus if they have a special method for transwikiing, but copy–paste should do the job.  --Lambiam 01:22, 12 February 2021 (UTC)[reply]

February 12

USB keyboard suddenly dead

Last night my USB keyboard (a fairly nice Kensington one, not a piece of junk) suddenly stopped working. It might have gotten jostled or something but it wasn't dropped on the floor or anything like that. It just seems dead: typing does nothing, caps and num lock LED's don't light, switching from one USB port to another doesn't help. I had another, less-nice keyboard around so am using that one now. I haven't done any electrical tests on the old keyboard. I do have a voltmeter so I guess I could open it up and test the cable connections, but the connector :::and strain reliefs look fine visually. Any idea what the typical failure modes are for something like that, and any troubleshooting tips? Thanks. 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 22:14, 12 February 2021 (UTC)[reply]

At least try unplugging other USB things, as perhaps another ting is causing a problem. And then also powering the computer off and on might reset something to make it work. Graeme Bartlett (talk) 00:14, 13 February 2021 (UTC)[reply]
Hmm, the only other usb device plugged in is a mouse, and I did unplug that. I rebooted the computer but I don't think I fully power cycled it. I guess I should do that. I don't have another working computer to try the keyboard on, but I can plug it into a usb power bank and see whether the leds flash. Thanks. 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 08:05, 13 February 2021 (UTC)[reply]
Have you inspected and cleaned the inside of the USB plug? A slim pencil eraser can clean corrosion (be careful of schmutz) and a cotton swab with isopropyl (not rubbing) alcohol can also make a clean sweep of it. This is more common for mobile devices and those which are frequently unplugged and plugged back in, but it's at least worth a try here. Elizium23 (talk) 08:32, 13 February 2021 (UTC)[reply]
It looked fine, though I can check again. It is a full sized USB-A plug and it was plugged into the computer when the keyboard stopped working. I'm a bit more suspicious of the wire inside the cable: maybe something came loose under the strain relief or something. Checking it with a continuity tester will require opening up the keyboard so I'll have to get it together to do that. 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 09:21, 13 February 2021 (UTC)[reply]
You do not say what kind of computer or OS you have, so we are guessing a lot here.
When you boot the computer, assuming you have a PC-type thing, it has a UEFI screen. Can you pause booting and enter the Setup utility, and then plug/unplug/replug the keyboard to see if it has any life?
Needless to say, have you tried it in another different host device??? Elizium23 (talk) 10:04, 13 February 2021 (UTC)[reply]
You can try fiddling with the cable around where it enters the keyboard. I've definitely had that work for mice, but also I think at least one keyboard. I think pushing the cable towards the keyboards may be most likely to help, but this is obviously pure anecdotal with no attempts to test what works. Nil Einne (talk) 13:53, 13 February 2021 (UTC)[reply]

February 13

Python library lost, or not, in Big Sur

I recently updated MacOS to Big Sur. In some of my Python programs that contain the line

import Image

I now get

ImportError: No module named Image

... but at least one program is not affected. The 'surviving' program is ~/bin/dragon, while all those that fail are ~/some_other_directory/*.py; perhaps this is coincidence, perhaps not. (Each begins with #!/usr/local/bin/python.)

Any idea what's going on? —Tamfang (talk) 02:11, 13 February 2021 (UTC)[reply]

Tamfang, what python version is used by your programs, and what python version is invoked by that path? Is there a /usr/local/bin/python3 or anywhere else on the system? Is your python interpreter installed by homebrew or is it a stock system? Elizium23 (talk) 08:35, 13 February 2021 (UTC)[reply]
I believe my python (2.7) is "stock", but the Image library isn't (I do not recall how I installed it). —Tamfang (talk) 16:09, 13 February 2021 (UTC)[reply]
/usr/bin/python3 exists but trying to run it gives xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrunTamfang (talk) 16:09, 13 February 2021 (UTC)[reply]
What do you see when you issue the command ls -l /usr/local/bin/python? Is it a link to another executable?  --Lambiam 11:47, 13 February 2021 (UTC)[reply]
link to /Library/Frameworks/Python.framework/Versions/2.7/bin/pythonTamfang (talk) 16:09, 13 February 2021 (UTC)[reply]
Image isn't a module in PyPi or builtins, so it came from somewhere else. from the naming convention, it's likely a class from a module, so maybe this is from PIL or some library that handles images? In your /~/bin/dragon, make it
print(Image.__file__)
if that fails, use .__dir__ instead. ~/bin might have an Image.py that's being imported instead.
As for your python3 path problem, I'm sure this SE answer can solve it; this has nothing to do with python probably, just your terminal. WhoAteMyButter (📨📝) 07:00, 14 February 2021 (UTC)[reply]
The command you suggest results in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.pyc. (I first ran some old code that had import PIL; when that failed I looked at dragon and copied over import Image.) — I apparently acquired PIL/Image in 2009. Will have a look at its README when time allows. —Tamfang (talk) 01:56, 17 February 2021 (UTC)[reply]

February 14

Stop Google Chrome from scrolling the editing box when I press enter

I have tried asking this all over the place, and never gotten much of a response. When I am editing Wikipedia, Chrome has some weird annoying feature that is horrendously annoying. This happens with any multiline text box that has enough text to generate a scroll bar on the right side. Usually, but not always, when I press the enter key, the textbox will scroll so that the new line is at the very top of the text box, rather than the text box staying where it is and the new line pushing the text down under it (as is the behaviour of every single other text box ever in the history of computing).

I've used Chrome for years, but this behaviour has only been happening on my computer and only with Chrome for several months. How do I stop text boxes from scrolling when I press enter? Pretty sure I'm up to date with v88.0.4324.150 - Floydian τ ¢ 16:09, 14 February 2021 (UTC)[reply]

Floydian, are you using the WP:Visual editor? If not, have you tried it?
Does the behavior occur on other computers you use? Elizium23 (talk) 04:35, 15 February 2021 (UTC)[reply]
Also, for clarity, it only happens on Wikipedia? Not text boxes on other sites? Try opening an incognito window and editing a Wikipedia page. Does it still happen? --47.152.93.24 (talk) 15:01, 15 February 2021 (UTC)[reply]
We concur with the incognito suggestion, and we will take it one step further by suggesting you disable any "Gadgets" in your preferences, and erase your common.js of user scripts. Elizium23 (talk) 15:44, 15 February 2021 (UTC)[reply]
Alright, so I've tried incognito and the problem persists. It also happens on my girlfriends computer, logged in or out. The issue goes away if I enable New wikitext mode in beta features, or if I use the visual editor. However, I've got nearly two decades of using the plaintext editor to code non-breaking spaces and links, and both get rid of the CharInsert extension that I use often.
I'm trying to find a website with a similar plain multiline text box to Wikipedia. Most websites seem to use something similar to the visual editor that is script based and exhibits different behaviour... so at this point, for me, the problem is confined to Wikipedia, but not necessarily inherent to Wikipedia. - Floydian τ ¢ 21:01, 15 February 2021 (UTC)[reply]
Actually, you can insert special characters in the Visual Editor and wikitext mode alike. Pull down the menu marked with "Ω". I think it's an improvement.
Have you tried the WP:Reply-link extension? It has simple text boxes. Elizium23 (talk) 01:32, 16 February 2021 (UTC)[reply]
Floydian, I would advise a couple other places you could post and receive more help. @WhatamIdoing: is WMF and a technical guy, knows lots of stuff. Also, the Village Pump (technical) is a good central place where people know stuff on enwiki. Beyond that even, there must be someplace on meta.wiki that you could post a question. I know they have a Visual Editor help forum there. I don't know if they care too much about supporting the legacy textbox editor. Your mileage may vary. Elizium23 (talk) 01:36, 16 February 2021 (UTC)[reply]
@Floydian, does this still happen in mw:safemode? If so, then it's probably not a problem in your account, and I think I'd check your browser extensions next. (Please ping me.) Whatamidoing (WMF) (talk) 22:59, 16 February 2021 (UTC)[reply]
@Whatamidoing (WMF): - No change in safe mode, no change after disabling all my extensions. I'm pretty sure that if I load up a page to edit in incognito mode, I'm no longer dealing with monobook or the legacy editor, but what any IP editor would see... yet it still happens. - Floydian τ ¢ 04:48, 17 February 2021 (UTC)[reply]

Technical differences between Hulu/Netflix and Youtube/Vimeo

I'm trying to understand the difference between "streaming", DRM-protected services like Hulu or Netflix, that won't let you download+save their stuff easily on the one hand. And, on the other hand, Youtube or Vimeo where you download to view and can create a link (with an appropriate tool) to download the video. What makes the first two so difficult to save into a file? Is the difference streaming vs downloading just a fancy way of referring to images coming your way? Could Youtube/Vimeo DRM-protect their videos, but still let anonymous user view them? Do they buffer/cache in a different way/ --Bumptump (talk) 21:05, 14 February 2021 (UTC)[reply]

Look into Widevine, High-bandwidth_Digital_Content_Protection, and Digital rights management. Youtube streams the video to you in chunks like Netflix, but doesn't use DRM. WhoAteMyButter (📨📝) 05:48, 15 February 2021 (UTC)[reply]
YouTube relies on its Terms of Service to prohibit people from using third-party software to download the streaming-only videos.
Some YouTube videos are available as a free download. Many others are available to download when you subscribe to a paid YouTube service. I think that's more than fair. Elizium23 (talk) 06:13, 15 February 2021 (UTC)[reply]
And Netflix (and Disney+) do let you save some of their shows on their apps. In fact, I think all the stuff on Disney+ is downloadable. Not as freely moveable files on your computer, though; more like locally cached files that you can watch later if your connection is slow or whatever. Matt Deres (talk) 01:49, 16 February 2021 (UTC)[reply]

February 15

Advantage of one search engine versus another?

Is there a reliable source that can explain what the difference is in searching for something on Google versus Yahoo versus Bing versus whatever else is out there?

Personal preferences aside, is there really an advantage of one service over another? PandaBasura (talk) 21:35, 15 February 2021 (UTC)[reply]

According to Duckduckgo this SE "emphasizes protecting searchers' privacy and avoiding the filter bubble of personalized search results. Both issues seem like an advantage to me. Bumptump (talk) 21:44, 15 February 2021 (UTC)[reply]
Wikipedia has an article Comparison of web search engines which may answer your question.--Shantavira|feed me 09:15, 16 February 2021 (UTC)[reply]

February 16

C++

I wrote the following code in order to conform to the requirement. Although the code appears to have met the requirement, I feel it inefficient because I don't expect to write a lot of case when the array size grows to 100 or more, i.e. storage[100]. So I would like to ask if any Wikipedian knows about the more efficient way to approach such requirement? Thanks a lot! :D Stringent Checker (talk) 14:49, 16 February 2021 (UTC)[reply]

/*
 Write a program that searches an array of ten integers for duplicate values. 
 Have the program display each duplicate found.
*/

#include <iostream>
#include <cstring>
using namespace std;

int main() {

	int input;

	int storage[10];

	cout << "Insert 10 integers and the program will check if there are duplicate integers in the array. \n";

	for (int i = 0; i < 10; i++)
	{
		switch (i) {
		
		case 0:
			cout << "Now, insert the first number.\n";
			cin >> input;
			storage[0] = input;
			break;
		case 1:
			cout << "Now, insert the No." << i + 1 << " number.\n" ;
			cin >> input;
			storage[1] = input;
			break;
		case 2:
			cout << "Now insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;
		case 3: 
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;
		case 4:
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;
		case 5:
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;
		case 6: 
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input; 
			storage[i] = input; 
			break;
		case 7:
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;
		case 8: 
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;
		case 9:
			cout << "Now, insert the No." << i + 1 << " number.\n";
			cin >> input;
			storage[i] = input;
			break;		
		}

	}

	for (int i = 0; i < 10; i++)
	{
		for (int j = 10 - 1; j >= 0; j--) {

			if (j == i) continue;

			if (storage[i] == storage[j] && i < j) cout << "Duplicate found: " << storage[i] << "\n";
		}
	}

	cout << "The 10 numbers you inserted: ";
	for (int i = 0; i < 10; i++)
	{
		cout << storage[i];
	}

	return 0;

}
The simplest improvement would be to replace the whole switch statement with a simple if statement that asks if (i > 0) do your current case 2 ( ask for number i+1 and store it as storage[i] ) else do your current case 0 — GhostInTheMachine talk to me 16:53, 16 February 2021 (UTC)[reply]
Another option would be to keep the switch and maybe have case 1: say cout << "Now, insert the second number.\n" ;, then replace all cases from 2 to the end with a single defaultGhostInTheMachine talk to me 16:53, 16 February 2021 (UTC)[reply]
Note that the assignment does not ask for coding the process of interactively inputting the numbers, and also not for displaying all values afterwards. My general advice is not to code more than explicitly required – except perhaps for such things as input validation or catching exceptions. As to the core of the code, if you let index j run up instead of down, starting from j = i+1, you can omit the two tests j == i (always false) and i < j (always true); moreover, you more than halve the number of comparisons storage[i] == storage[j]. Note that if all 10 numbers are the same, the code will produce 45 lines of found duplicates.  --Lambiam 18:27, 16 February 2021 (UTC)[reply]

Data recovery service for Nosql databases.

There are a lot of data recovery services for things like damaged hard drives or tape or flash storage.
But in my case, I got a software fault in my RocksDB database which corrupted data or it’s masked crc32 checsum on a single key (less than 1 Mb) thereby preventing the built in Snappy compression (managed by Rocksdb libraries) from decompressing.

While the data is public and available through many third party services for free, it’s access as a database is not, and rebulding it using OpenEthereum (full archival node) is a year long operation (using the current cpu providing the best per thread performance because otherwise it can be way longer) because of single thread performance constraints (OpenEthereum suffer from synchronisation issues which limits the overall number of threads which can work at the same time and the required work around increasing io worker threads parallelism was never attempted so far). This also mean that I’m not interested in extracting the damaged data, but instead really need the database to no longer crash OpenEthereum instead.
Of course, from the around 2000 OpenEtherem full archival node in the world, I did not find a company willing to share a backup for fixing the broken part of my database or I didn’t received an answer.

This also means that it should be possible to delete all the blocs which where added at the end after the broken block (since data are stored in block based sst) along their matching data inside the 6 other columns. This can be done using the DeleteRange function provided by RocksDB, but requires a deep understanding of the binary format used for key numbers. So a data recovery service with knowlwedgde about database repair is enough and there’s no need of Rocksdb specification though it might be a safer to replace the damaged key manually as attempting to rebuild the file through OpenEthereum might results in a 64Mb sst file not containing the same number of blocks as the original one. 2A01:CB05:8FEA:C600:D2E9:BABF:3376:10BD (talk) 19:14, 16 February 2021 (UTC)[reply]

I know it might be off topic to ask that here but I’ve really no idea about where to ask for a recovery company which might help me in that kind of case.

Outlook is bleak

I have a Hotmail account, but decided to create an Outlook one. However, whenever I try to log into Outlook, it automatically opens my Hotmail account. How can I access my new email account? Clarityfiend (talk) 20:25, 16 February 2021 (UTC)[reply]

If you log into Outlook using your *****@outlook.com address and send an email, does the message identify your *****@hotmail.com address as the sender's?  --Lambiam 05:35, 17 February 2021 (UTC)[reply]

February 17

Modern Quiet PCs

Quote from Quiet PC:

"A number of laptops and netbooks however do not use cooling fans at all.[51][52][53][54]
Nadel, Brian (2005-04-28). "Dell Latitude X1 Laptop Reviews". CNET. Retrieved 2008-10-10.
"Panasonic CF-W5 Specification Sheet" (PDF). EU: Toughbook. Archived from the original (PDF) on February 24, 2007. Retrieved 2008-10-10.
"Panasonic CF-T5 Specification Sheet" (PDF). EU: Toughbook. Archived from the original (PDF) on February 16, 2007. Retrieved 2008-10-10.
Beeler, Brian (2006-01-03). "Fujitsu P7120 (P7120D)". Notebook Review. Retrieved 2008-10-10."

This is over ten years old. Any newer technology out there? Any hints where to look, please? I am not very experienced with hardware or the current market. --Gryllida (talk) 10:11, 17 February 2021 (UTC)[reply]

Ms-Access, to pass a query row to some function

Hi, in any SQL query I can pass any field to some external function: SELECT myFunct(myField1, myField2) AS myResult ..
Now I'd like to pass the whole row to some function.
If it were a recordset it would be easy: set myRS = CorrentDB.openrecordset("myTble") and then in a loop myResult = myFunct(myRS)
Is there some way to do this in an SQL query? SELECT myFunct(*) AS myResult .. as it were. Thank you
(Of course I can put all fields in the parameter list, but if there are a lot of fields a more general approach would be welcome) 194.174.73.80 (talk) 11:55, 17 February 2021 (UTC) Marco PB[reply]