Wikipedia:Reference desk/Archives/Computing/2022 December 14
Computing desk | ||
---|---|---|
< December 13 | << Nov | December | Jan >> | December 15 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
December 14
[edit]What is thirtylone?
[edit]- Transferred to Science desk
Any way to get smartphones to view images to screen width?
[edit]When I view websites, smartphones shrinks some images to only 70% or even 50% of the window width. In HTML or JavaScript coding, is it possible to tell smartphones to stretch images to the screen width size? Thanks. 67.165.185.178 (talk) 03:57, 14 December 2022 (UTC).
- What phone are you using (Android or OIS?) and with what browser? What happens when you tap on the image? Shantavira|feed me 09:34, 14 December 2022 (UTC)
- For if (/mobile/i.test(navigator.userAgent)) { //user is using a smartphone } else { //user is not using a smartphone } And nothing happens when tapping on the image. 67.165.185.178 (talk) 12:59, 14 December 2022 (UTC).
- Have you tried pinch-and-zoom with two fingers? Most websites allow you to zoom. Chrome has a setting to override websites that try to block zooming. Also, you can turn on triple-tap screen zooming in the accessibility settings of Android. 97.82.165.112 (talk) 13:55, 14 December 2022 (UTC)
- Despite the OP's reference to "viewing some websites" they appear to be asking how to program a website. Elizium23 (talk) 16:23, 14 December 2022 (UTC)
- If that is the case, setting the viewport will almost always tell the phone to stop messing with the layout. It is rather easy. In the head, add <meta name='viewport' content='width=device-width, initial-scale=1'> to say that you want it scaled normal, not "phonified". 97.82.165.112 (talk) 19:09, 14 December 2022 (UTC)
- Hey @97.82.165.112: thank you for that, my last question is. When smartphones display paragraphs, with the <P> tag in HTML, where computers view them 1 line apart, smartphones view them half-a-line apart. Is there any to make them as 1 line apart? Thanks. 67.165.185.178 (talk) 15:00, 17 December 2022 (UTC).
- If you don't want the web browser to choose how to style something like a P tag, you have to define it in CSS. For example, if you want one font-size gap below each P block, define it in css with p { margin-bottom:1em; }. If you don't declare a style, each web browser is allowed to use whatever style they like. 97.82.165.112 (talk) 12:51, 19 December 2022 (UTC)
- Hey @97.82.165.112: thank you for that, my last question is. When smartphones display paragraphs, with the <P> tag in HTML, where computers view them 1 line apart, smartphones view them half-a-line apart. Is there any to make them as 1 line apart? Thanks. 67.165.185.178 (talk) 15:00, 17 December 2022 (UTC).
- If that is the case, setting the viewport will almost always tell the phone to stop messing with the layout. It is rather easy. In the head, add <meta name='viewport' content='width=device-width, initial-scale=1'> to say that you want it scaled normal, not "phonified". 97.82.165.112 (talk) 19:09, 14 December 2022 (UTC)
- Despite the OP's reference to "viewing some websites" they appear to be asking how to program a website. Elizium23 (talk) 16:23, 14 December 2022 (UTC)
How do GUI users work with lists of filenames?
[edit]This question may seem too abstruse or philosophical to be answerable, but I assure you, it is quite real and practical for me.
If I'm in a command-line environment, and I want to work with the names (as opposed to the contents) of one or more files, that's easy. I'm a Unix geek, so I'm always typing things like
ls >filename
or
ls | grep
Or, if I'm in what you might call a semi-graphical environment, meaning that I'm in what looks like a "proper" GUI, with windows and menus and a pointing device and everything, but (as is certainly my habit) some or many of the windows are "Terminal windows" with an old-fashioned CLI-based shell running in them, I can type plain ls
and then select and copy ls
's output with the mouse, and paste it somewhere else. Easy peasy. It may seem like an odd mixture of CLI and GUI styles, but I do it all the time.
My question is, how do "normal" users do this sort of thing? A list of files in a "folder window", even if in a list-based view, is not typically a context where you can freely copy the text you can see. In Windows, at least, selecting a filename in a folder view, and then copying, puts a copy of the whole file on the clipboard, not just the filename. If you can do that thing with your mouse that makes the filename editable (so that you can rename it right there in the GUI), the name becomes text you can copy to the clipboard, but it's a nuisance, and it only works for a single file. There's no way, that I know of, to copy the names of several files.
And the particular instance of the problem I had just now (the one that prompted me to post this question) was even worse. I wasn't in the OS's normal "folder window"; I was in a browser, pointing at SharePoint or something like it, i.e. one of those web-based collaborative sites that allegedly makes working on shared documents easier and more productive. Again, there's a list of "files", and they all have names, and their names are text, and I want to do something with that text, but selecting and copying and pasting is more or less out of the question, so I'm sunk, unless I want to use my eyeballs and manually retype all the filenames, which is also out of the question, because there are too many of them and they're too long and complicated.
So my question is: If a "normal" computer user is looking at a window full of icons, and the icons all have names, how do you get that list of names as plain, fungible text? Or is this such an obscure thing to want to do that no one does, so it's not a problem that there's simply no way to do it?
(I'm not intending this as a flame; I'm not trying to start an argument or debate. I'm honestly curious.)
—scs (talk) 22:37, 14 December 2022 (UTC)
- The GUI is suitable for certain things, and the CLI is suitable for other things. Why wouldn't a "normal" computer user launch a shell, such as PowerShell or Bash, and obtain that list in the shell? Use the right tool for the job. Elizium23 (talk) 22:40, 14 December 2022 (UTC)
- I have a "copy as path" command in Windows 11 (Maybe on other windowses one has to hold down Shift?) There also must be programs that install themselves in the context menu and add this functionality (I dimly remember, in Windows 95, that I had a "powertoy" that added "copy to..." and "move to..." commands to the context menu.) Some places on the internet also suggest opening the folder in a web browser (file://c:/...) and copying the names from there (which is messy because it's multi-column, so one will also need something like
awk
.) So, there are ways. I think that's what a non-console-using user would do - look if windows does something and if not, look for and install a 3rd-party tool with that functionality Aecho6Ee (talk) 18:32, 15 December 2022 (UTC) - this is ancedotal, but I find myself using the console (terminal) in Windows less that in Linux and don't feel any less of a power user for it:). So, if it's something with disks, I go straight for the GUI disk manager, ditto network, processes etc. First, unlike in Linux, the GUI tools are just there and an integral part of the system, and second, I find M$ command-line tools kinda clunky (many "long" options), many times I don't know if there even is a command line tool (what's Windows-ese for "lvm", say?), and they are hard to get documentation on (no "man"), so I can't be bothered to learn them. Aecho6Ee (talk) 18:47, 15 December 2022 (UTC)
- @Aecho6Ee: Ah, yes. The question of which UI idioms are or aren't befitting of a power user, and whether Windows, Linux, or MacOs do better at catering to such, is a fascinating question on which I definitely have strong opinions, but which I am most certainly not going to try to start exploring here, now! :-) —scs (talk) 15:47, 16 December 2022 (UTC)
- When a Mac user (normal or otherwise), using the standard GUI interface of macOS, selects and copies the contents of a Finder window (which presents a view on a folder) and then pastes it into a plain text document window (such as of MacVim, TextEdit, or the edit window of a Wikipedia page), the result is that just the textual filenames get pasted. 18:45, 15 December 2022 (UTC)
- Interestingly, on both systems what you get on the clipboard is full pathnames for each file, not just the filenames. (Not saying this is right or wrong, just interesting.)
- Perhaps, in the fullness of time, the web-based file managers (SharePoint and the like) will get the memo and add such a feature, given that they've implicitly committed to reinventing every wheel. (I'm not going to hold my breath, though.) —scs (talk) 15:47, 16 December 2022 (UTC)
- @Scs: Maybe the button "Export to Excel" in SharePoint toolbar could help you (here it's explained). Alexcalamaro (talk) 08:16, 17 December 2022 (UTC)
- Perhaps, in the fullness of time, the web-based file managers (SharePoint and the like) will get the memo and add such a feature, given that they've implicitly committed to reinventing every wheel. (I'm not going to hold my breath, though.) —scs (talk) 15:47, 16 December 2022 (UTC)