Wikipedia:Reference desk/Computing

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:


June 1

edit

C++ array initialization

edit

Let's say I allocate a new array

std::array<int,10> *x = new std::array<int,10>;

Considerable head scratching at cppreference.com doesn't tell me whether this array's elements are guaranteed to be initialized to 0. Experimentally they do seem to be, but that could be accidental. In C, of course, int x[10]; makes an array that is uninitialized. Does anyone know? Thanks. 2601:644:8501:AAF0:0:0:0:1ECE (talk) 05:14, 1 June 2024 (UTC)Reply

Cplusplus.com says By default, regular arrays of local scope (for example, those declared within a function) are left uninitialized. This means that none of its elements are set to any particular value. I don't know what happens in a global scope. ―Panamitsu (talk) 06:33, 1 June 2024 (UTC)Reply
In C, a global array is initialized to zero. (Reference: K&R, or the latest C standard.) I think C++ works the same way: this page from learncpp.com says "Global variables have static duration" and, later, "Unlike local variables, which are uninitialized by default, variables with static duration are zero-initialized by default." This is not very official C++ reference, but has the advantage of actually telling us the answer. And our compatibility of C and C++ article says various things about arrays, but nothing to contradict that the languages work the same in this respect.  Card Zero  (talk) 07:44, 1 June 2024 (UTC)Reply
A std::array is not a C-style array. It acts similarly in many ways but has some differences.
The std::array constructor follows the rules of aggregate initialization. But if there is no initializer list (in braces), default initialization is used. The std::array constructor reference linked above says "note that default initialization may result in indeterminate values for non-class T", and the default initialization reference linked above clarifies that POD types ("plain old data", like int) are uninitialized by default initialization. So for a std::array<T> created without an initialization list, the elements are uninitialized if T is a POD type. If T is a non-POD class, the elements would be initialized with their default constructor. CodeTalker (talk) 05:53, 2 June 2024 (UTC)Reply
But are you disagreeing, or agreeing? We've all agreed the array would be uninitialized if it has local scope. But do you think an int array with global scope (or "static duration" perhaps more relevantly), with default initialization, is uninitialized? Your links led me to zero initialization, but I still don't see a definitive answer on this site. Presumably it is telling us, in its way.

Zero-initialization is performed in the following situations: 1) For every named variable with static or thread-local(since C++11) storage duration that is not subject to constant initialization, before any other initialization.

Maybe that means global arrays are initialized to zero, but due to uncertainties about what very formally specified thing in the reference relates to what familiar thing in practice, I can't be sure. Is a global array a variable? Does it have static storage? Fairly sure of the latter, less certain of the former.
Perhaps you weren't disagreeing, but just elaborating: we have the new wrinkle that uninitialized non-POD types get a default initialization, even at local scope.  Card Zero  (talk) 08:22, 2 June 2024 (UTC)Reply
As I read it, the elements are not guaranteed to be initialized. For reference, I'm using final C++23 draft; the numbers in parentheses are the relevant locations in the draft.
First off, only the pointer has static storage. The array has dynamic storage, having been created by a new-expression (7.6.2.8 (9)). What happens from there is, well, complicated.
  • An allocation function may be called to obtain storage (7.6.2.8 (11-13)); if so, the state of the memory thus returned is unspecified (6.7.5.5.2 (2)).
  • Now, the expression has no new-initializer, so the result is default-initialized (7.6.2.8 (23.1)).
  • Default-initialization means that the best applicable constructor for the initializer () (chosen via overload resolution) is called with an empty argument list to initialize the class (9.4.1 (7.1)).
  • The array class is an aggregate, and uses the implicitly-declared default constructor (24.3.7.2 (1)).
  • This performs whatever initializations that would be performed by a user-written default constructor with no ctor-initializer and an empty compound-statement (basically, a constructor that doesn't specify anything) (11.4.5.2 (4)).
Not actually knowing precisely what the data members contained are or how they are specified, we are stuck here. There is nothing preventing an implementation from, for instance, storing the data in an array specified with a default member initializer (see 11.9.3 (9.1)) of {142857, -32768}. IF one assumes that the class holds an array of 10 ints with no initializer specified (which seems more likely), that array is itself default-initialized (11.9.3 (9.3)); each element thereof is then also default-initialized (9.4.1 (7.2)). For an int, default-initialization performs no initialization (9.4.1 (7.3)), and we are left with whatever was in the memory we were allocated.
BentSm (talk) 14:01, 2 June 2024 (UTC)Reply
There are many cases: heap/local/static, POD/non-POD, and created with or without an initializer. The OP was asking about a std::array<int> (POD) on the heap with no initializer. Such a variable is not guaranteed to be zero-initialized. The same is true if local rather than heap but a static would be zero-initialized. In all these cases, non-PODs would be initialized
by the class's default constructor. Heap variables may be default initialized if no initializer is given (uninitialized if POD or default constructed if non-POD) as in the OP's example, or value initialized if given an empty initializer (zero if POD or default constructed if non-POD).
So, to enumerate the cases:

// --- static; no initializer
static std::array<int,10> a; // initialized to 0
static std::array<MyClass,10> a; // initialized by MyClass::MyClass()
// --- static; empty initializer (same as previous case)
static std::array<int,10> a{}; // initialized to 0
static std::array<MyClass,10> a{}; // initialized by MyClass::MyClass()
// --- local; no initializer
std::array<int,10> a; // uninitialized
std::array<MyClass,10> a; // initialized by MyClass::MyClass()
// --- local; empty initializer
std::array<int,10> a{}; // initialized to 0
std::array<MyClass,10> a{}; // initialized by MyClass::MyClass()
// --- heap; no initializer
std::array<int,10> *a = new std::array<int,10>; // default initialized (uninitialized)
std::array<MyClass,10> *a = new std::array<MyClass,10>; // default initialized: initialized by MyClass::MyClass();
// --- heap; empty initializer
std::array<int,10> *a = new std::array<int,10>(); // value initialized (set to zero)
std::array<MyClass,10> *a = new std::array<MyClass,10>(); // value initialized: also initialized by MyClass::MyClass();
BTW, the "experiment" by which the OP found their array to be set to zero would be better done by deliberately unzeroing the heap first, by something like

std::array<int,100> *z = new std::array<int,100>;
for (int i = 0; i < 100; ++i) (*z)[i] = 0xffffffff;
delete z;

This is not definitive but it makes it more likely that the next thing allocated from the heap doesn't use fresh system-allocated memory, which might indeed be all zeros. CodeTalker (talk) 17:37, 2 June 2024 (UTC)Reply

June 2

edit

Fingerprint, Identification key, Recipe, Answer file, INI file, Bibliographic Record

edit

A couple of examples for context:

  1. ccache "caches compilations so that ... the same compilation can be avoided and the results can be taken from the cache... by hashing different kinds of information that should be unique for the compilation and then using the hash sum to identify the cached output."
  2. Saving a copy of an online webpage from within a Web Browser (File > Save Page As...)


What is the word for a set of parameters which attribute to an instance/snapshot the information required for it's reproduction?
In the examples above, ccache utilises "different kinds of information that should be unique for the compilation", similarly if I save a webpage from within a Web Browser, the only way for someone to be guaranteed to independently replicate the same file would be for the same URI to be accessed by the same version of the Web Browser with the same configuration (e.g. javascript enabled/disabled, identical installation+configuration of extensions which affect page retrieval/rendering) on the same Operating System with the same configuration.

In the case of ccache, the compiler version and flags are some factors of the "information that should be unique for the compilation", and during recompilation inputting the same selection of information results in an identical hash and therefore a cache match.
But what is the word to describe the information being input?
I'm not looking for a generic word like "metadata".

Some words I thought of which seemed to be candidate answers were:

  • Fingerprint (computing) - However fingerprint refers to an algorithmic output (e.g. ccache 'hash') whereas I am wanting to refer to the inputs, which the article simply defines as "a procedure that maps an arbitrarily large data item (such as a computer file) to a much shorter bit string, its fingerprint".
  • Key (cryptography) - This seemed very close, except that in the case of cryptography it is described as "a piece of information" whereas I am looking for a word to refer to a "set of information".
  • Identification key - "aids the identification of biological entities", rather than describing the parameters of the entities creation.
  • INI file - "a text-based content with a structure and syntax comprising key–value pairs for properties, and sections that organize the properties", so what would be the name of the section?
  • Answer file - Contains the data that is essentially what I am describing, except that an answer file is context-specific to computer program installation.
  • Recipe - Are configurations equivalent to 'ingredients'? I would have thought a recipe would include much more detail that just application version numbers and parameters.
  • Bibliographic record - This seems the most relevant as a name for the set of reproduction parameters, except that it is context-specific to library science.
  • Exif - Again, very similar, but the set of parameters is just referred to as EXIF metadata or tags.
  • User Agent/Generator - This is part of the information which would be included in the set.
  • Finite-state machine/Combinational logic - Wouldn't this be referring to the method/logic, rather than the input parameters?
  • Artifact - This refers to the File, rather than the attributes which contain the information required for the File's reproduction.
  • Snapshot (computer storage) - Again the File, rather than the attributes.

Mattmill30 (talk) 16:16, 2 June 2024 (UTC)Reply

Would the correct generic word for "a set of parameters which attribute to an instance/snapshot" be the 'profile', which is then qualified with the context-specific word 'generator'?
Therefore making the "set of parameters which attribute to an instance/snapshot the information required for it's reproduction" the 'generator profile'?
If so, what would be the "different kinds of information that should be unique for the compilation" used by ccache? the 'compilation profile'?
So then the ccache article would be appropriately updated with "the next time compilation of the same project using the same compiler with the same compilation profile is attempted, the same compilation can be avoided and the results can be taken from the cache. Mattmill30 (talk) 17:27, 2 June 2024 (UTC)Reply
The examples you give don't (as far as I understand the issue) help to reproduce an item. Is Unique identifier what you mean? It is a generic term; depending on the use, various types of unique identifiers have more specific names, such as the International mobile subscriber identity and International Standard Book Number.  --Lambiam 17:41, 2 June 2024 (UTC)Reply
In the case of saving a copy of the same Webpage from multiple Web Browsers, a Unique identifier would be necessary in distinguishing between the multiple copies.
e.g. you could append the name of the Web Browser to the filename, or in the case of multiple copies of a webpage from different versions of the same Web Browser then using the Installation GUID, etc.
However, that wouldn't provide information specific enough to facilitate reproduction, or enable identification of other copies/instances of a particular resource which was generated using an identical system configuration.
Did my earlier response to myself provide clarity to my question?
If my question is still unclear, I can construct an example "solution" which may provide clarity Mattmill30 (talk) 18:19, 2 June 2024 (UTC)Reply
Wikipedia pages have a revision ID. That of the version of this page, after you posted your question, is 1226936970 Can I use it to reconstruct a screenshot of what you saw? No. I don't know if you used a laptop or a smartphone. Suppose I know you used a MacBook. Which type of many types? Which size of screen? Produced in which year? (This makes a differences for some types.) Which release of macOS were you using, and which version of that release? Likewise, not only which browser, but also which version? Did your browser have customizations? Was the window full-screen? If not, what were its sizes? How far up or down was the page scrolled, and at which zoom level was it being viewed? Did you watch in dark mode? Knowing all this may still not be enough for a faithful reconstruction of what you saw. Only a screenshot will do.  --Lambiam 06:08, 3 June 2024 (UTC)Reply
One distinction I do want to make is that in my examples I didn't go as far as "reconstructing a screenshot", though the word I am trying to obtain should be capable of also labeling the set of attributes which would be required in reconstructing a screenshot.

For example, if a Web Browser saves the Webpage of a URI to a file, and then that file is reopened in the same Web Browser, with the same configuration, and a screenshot is taken, then the set of metadata attributed to the screenshot file would include:

?label profile? = ('HTTP response','Web Browser "save as" filename+parameters {User-Agent+about:plugins+env+profile_config_diff}','Web Browser+Operating System "screenprint" filename+parameters [e.g. screen resolution, window size, etc]')
With the inputs+metadata for each step in the processing sequence, it would be possible to faithfully reconstruct a screenshot.

However, my question isn't specifically about reconstruction, it's about reproducibility using "a set of parameters which attribute to an instance/snapshot the information required for it's reproduction".
So the assumption is that the file is available, and I am asking what the correct label would be for a complete set of metadata that would enable reproduction (essentially a proof? - I'm not a mathematician). Mattmill30 (talk) 12:21, 3 June 2024 (UTC)Reply
Can you clarify the difference between reconstructibility and reproducibility? In which aspects is a reproduced item allowed to differ from the original?  --Lambiam 15:35, 3 June 2024 (UTC)Reply
Reproduction vs Reconstruction
Reproduction Reconstruction
A copy of something, as in a piece of art; a duplicate A thing that has been reconstructed or restored to an earlier state
(computing) A method for reproducing a bug or problem A result of an attempt to understand in detail how a certain result or event occurred
In reproduction the existence of the original production isn't necessary if a method for reproduction is known. Whereas in reconstruction, the original thing must exist in order for it to be reconstructed.

For example, let's say I and many others have archives of Webpages produced from a variety of time periods and Web Browser versions, but the file contents of my archive becomes corrupted.
I could "reproduce" my archive from the archives of others if they held copies of the same webpages with same "Last-Modified" or "ETag" HTTP headers, saved from the same Web Browser version, which completely satisfies my set of reproduction metadata; but I could only "reconstruct" my archive if I had taken a backup of my archive in advance.
Mattmill30 (talk) 18:33, 3 June 2024‎ (UTC)Reply
Not everyone makes the distinction you make. For example, one of the senses Merriam–Webster gives for reconstruct is "to re-create or reimagine (something from the past)", offering this example: "reconstructing a lost civilization".[1] A civilization that is lost has ceased to exist.
The web pages of many websites do not have enough meta information in their URI + embedded in the file itself to enable unique identification of an archived version. If they do, the combined meta information forms a unique identifier. Without knowing the operational procedures of the people putting content on these pages and assuming they adhere to them, it is not possible to be certain of the uniqueness, though. They might for example fix an obvious spelling mistake while not changing the meta information.  --Lambiam 21:24, 3 June 2024 (UTC)Reply
I agree that combined meta information potentially forms a unique identifier. But "I'm not looking for a generic word like 'metadata'", and as you have acknowledged "[Unique identifier] is a generic term; depending on the use, various types of unique identifiers have more specific names".
I am looking for a specific term.

I've given the two examples of a fully-automated cache and a semi-automated saving of a downloaded webpage, which have varied inherent terminology.
For example, the set of attributes which ccache utilises are called options, arguments, information and mode, because of it's command-line context.
ccache hashes "different kinds of information that should be unique for the compilation" and if the cache doesn't already hold a file named with the uniquely identifying BLAKE3 hash, then it completes the compilation and the output file is named "using the hash sum to identify the cached output"[2].
In this example the term 'unique identifier' is already used and more appropriately applies to the hash rather than the ccache-input-* information[3]. If the information were then attributed to the cached output file, the files now have a set of attributes containing production metadata (I previously considered a context-specific label of "compilation profile"), which would vary from the webpage archive example because, in addition to facilitating identification of other copies/instances of a particular resource which was generated using an identical system configuration, the production metadata would be of debug-quality and so also enable verification and validation.

I would expect the term for referring to the varied set of attributes to either be an umbrella term or have context-specific variability, in order to accommodate the nuances of different production procedures.

I'm unsure whether 'profile' would be an appropriate term, given it's definition: A summary or collection of information. Unless it was perhaps used as the umbrella term for all the various sets of context-specific attributes, referred to as the production profile. Mattmill30 (talk) 16:57, 4 June 2024 (UTC)Reply
Given the focus of my question is metadata to facilitate reproduction, which is broadly covered by the fields of Science and Business, I've realised that the stages of an assembly line are co-ordinate to steps within a job stream, which appear to be forms of Workflow.

Since Workflow is a management term, it seems my original question imports the concepts of sequential sets of metadata, which I recognised in mentioning 'INI file' as one of my candidate answers, and hierarchy, which is inherent (URI) to the HTTP cookie variant of Magic cookies.
My reservation with the use of the word cookie, is that magic cookies are "used to identify a particular event or transaction; the data is typically not meaningful to the recipient program and not usually interpreted until the recipient passes the data back to the sender or another program at a later time"[4], whereas metadata to facilitate reproduction would have to record a particular event or transaction.
Therefore, although I recognise file metadata would likely be attributed by way of either Property Handlers/Alternate Data Streams or similar technologies, I think the universality of the INI format makes it suitable at this time to explore a solution to the concept of production workflow metadata, in order to realise the various elements.

Therefore, would the following definitions satisfy as terms for a "set of parameters which attribute to an instance/snapshot the information required for it's reproduction"?
Section = Profile (i.e. Production)
Key = Event (timestamped production job/event identifier [e.g. Firefox 125.0.3-1, 'Save Page As...'])
Value = Attributes presented in name/value pairs from the production event parameters (e.g. HTTP-response= ; User-Agent= & about:plugins= & env= & profile_config_diff= ;)

Mattmill30 (talk) 17:05, 4 June 2024 (UTC)Reply
Do you want to coin a term, or are you looking for an existing term of art that covers whatever it is you are trying to describe? Inasmuch as I get what it is (hardly, I must confess), it seems a pretty generic concept, so a term covering it should be expected to have a pretty generic coverage. I mean, do we have a name for, "an information record that describes something"? Yes, it is a descriptor, which is a generic term because it is a term for a generic concept. It is also not too clear to me what the issue has to do with computing; it seems perhaps more related to information science. A few well-chosen realistic use cases might (perhaps) clarify the issue. The reproduction of archived web pages seems a less realistic use case, for the reasons I have given.  --Lambiam 18:57, 4 June 2024 (UTC)Reply
Ideally, I am hoping to find an existing term, and not necessarily a term of art. But in the case that neither a general term can be contextualised, or a term of art doesn't exist, such that a new one must be coined, then I am trying to define the scope that the term should encompass.
I agree that my question is multi-disciplinary, but I have raised it in computing because I am looking for an answer which applies to computer processes and files, rather than, for example, bibliographic records in library science. It seems to be within the vein of Version control

The concept has general and specific elements. Similar to how MusicXML has a specific utility (Western musical notation) written in a general markup language (XML).
My question is both general, in that I am discussing standard File System and Operating System features, metadata constructs and a framework for measuring completeness of the metadata for enabling reproducibility, and specific, in that the context is specifically for the recording of production processes and parameters which contributed to be current state of a file/resource.

I will attempt to flesh out a more comprehensive solution than my INI example, and some realistic use cases. But I am still only asking for words which appropriately label the elements/fields for storing and identifying production metadata, within the Computing vocabulary or domain of discourse. Mattmill30 (talk) 06:18, 5 June 2024 (UTC)Reply
I'm thinking environment parameters. (I'm also thinking about epigenetics, but that's the wrong domain, and I may have failed to understand your concept anyway. Still, epi- is a nice prefix.)  Card Zero  (talk) 10:17, 5 June 2024 (UTC)Reply
Google Gemini suggested 'identical execution environment'. You can abbreviate it to iEE. manya (talk) 07:17, 7 June 2024 (UTC)Reply


June 6

edit

Pdf

edit

Ho! If I shrink a pdf with Acrobat say I can get it down by 60% say but if I then want to OCR it the size goes up to be even more massive than it was before. Is there a way to avoid this, say, keeping it smallish but also with text recognition? Thank you 2.28.124.7 (talk) 10:40, 6 June 2024 (UTC)Reply

I am not familiar with the use of Acrobat and am not sure what you mean by "shrinking" a pdf with Acrobat.
Some apps, such as PDFpen, can OCR a bitmap and turn it into a searchable pdf.[5] The output is not much larger than the input – the blow-up in size occurs in the other direction, when a pdf produced by a word processing app is converted into a bitmap. PDFpen is not free; I do not know if there are free apps for this.  --Lambiam 19:35, 6 June 2024 (UTC)Reply
A scanned PDF is, in essence, a PDF container with a series of high-resolution bitmaps (JPEGs) for each page. A typical OCR-annotation program extracts each JPEG, does optical recognition, and then adds PDF text objects behind the JPEGs (so they're selectable and copyable, but not visible). Those text additions are trivial - typically a few KB at most, per page.
Your problem is twofold - you want to a) downscale the JPEGS and b) add the OCR annotations. These are effectively orthogonal tasks. I've no idea how you're getting the poor results you are, with the Acrobat workflow. But I can do what you want with ghostscript and then ocrmypdf (which uses Tesseract). All of this is free software. For me, in Linux, it's as easy as:
QUALITY=/ebook  # use one one of /screen /ebook /printer /prepress /default  # /screen is very low resolution, /prepress is the highest

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=$QUALITY -dNOPAUSE -dBATCH  -dQUIET -sOutputFile=scaled.pdf test.pdf

ocrmypdf scaled.pdf ocred.pdf
For me, this takes a 2.5Mb scanned pdf test.pdf and the GhostScript (gs) line scales it down to 178Kb. The ocrmypdf command takes that and produces a 181Kb file (a modest addition consistent with the text on that page).
I've no idea how do to any of this with Acrobat. -- Finlay McWalter··–·Talk 20:20, 6 June 2024 (UTC)Reply
@Finlay McWalter: Cheers! When I said shrink, yeah,, I meant 'compress'. I'll try copying what you've put up here into GS for Win and then stare blankly when, of course, nothing will happen except little squares appear. H'mmm. Your code above, are there meant to be 2X 'one' in the first line? Thanks again! ——Serial Number 54129 13:26, 10 June 2024 (UTC)Reply
Yes, I should have only one one. I've no idea about GhostScript on Windows, I'm afraid. -- Finlay McWalter··–·Talk 14:53, 10 June 2024 (UTC)Reply

June 8

edit

Windows 11 Storage Capacity Issue, maybe

edit

I am using Windows 11, and I have a 216 GB C: drive. When I view the "This PC" window, it shows that I have 14.3 Gb free, and shows a red bar, which may mean that I have less than 10% free storage on the drive.

When I last restarted the computer, it showed that I had more than 10% free. Looking at the C: drive, what I see is:

I see that the pagefile is now 26Gb. It was 12 Gb when I restarted the computer, so the expansion of the pagefile is why I have less free storage available. My question is whether I should in any way be concerned that I have less than 10% free storage. I have 14 Gb of free storage, and of the storage in use, 26 Gb is being used for paging, and 14 Gb was a lot in any decade that I was paid to use computing equipment. So am I correct in assuming that the red highlighting of the bar is a silly non-warning warning? Robert McClenon (talk) 19:26, 8 June 2024 (UTC)Reply

Windows' paging almost doubling from 12 to 26 is a bit concerning. 18.3 GiB free (in my opinion) is fine & workable. Windows will always make the bar red when there is less than 10% free space left (and it is quite intimidating). If you want, you can manually limit the pagefile size, but I think 18 GiB is enough for short/medium-term. Of course, the more space, the merrier.
Also, side note, keep in mind that screenshots of File Explorer aren't free (no DW permitted) so they can't be uploaded to Commons. WhoAteMyButter (🌷talk│🌻contribs) 23:38, 8 June 2024 (UTC)Reply
You are experiencing exactly the same symptoms which have plagued Windows users since Win 95. I am still using Windows XP on my main machine, so cannot offer any up-to-date solutions with any confidence, but:
1. There will be an app/utility which will find your biggest files. These could be films (avi, mp4 etc.), .pdfs etc. Do you need them? I would suggest all files with 0 bytes can be deleted as well.
2. Empty your Temp folder. Click on the Start menu. Choose All Programs then Accessories, followed by System Tools. Select Disk Cleanup. Under Files to delete, choose the files you want to get rid of. Once you’ve selected the file types to delete, click Ok. Another method: Quit all applications. Press WinKey + R. Type %temp% In the folder that opens, drag all the files to the recycle bin or select them (Ctrl+A) and click/press Delete. It won't delete temp files which are being used in the current session. Pressing Shift+Delete will bypass your Recycle bin and permanently delete these files, so beware.
3. Almost any file with a .tmp extension can be deleted as well. Use Windows Search or a dedicated file search utility. If Windows complains, it means it's being used in the current session.
3. Empty your Recycle Bin anyway.
4. Quite frankly, 12 gigabytes for a paging file is an outrageous size. Excuse me while I delete some expletives. OK, I'm still running XP designed around 25 years ago, but I have a mere 4GB of RAM, and my paging file is 200 MB, ie 5% of RAM, and Windows rarely complains. Your Hibernation file (hiberfil.sys) is 4GB anyway, so that's equvalent to your installed RAM. If your motherboard can cope, I would double that. M$ fanboys can shoot me down, and I expect the specs have changed. Nevertheless, you should definitely place a manual limit to your paging file: hunt around for 'Win 11 fixed size paging file'. You could start with 8192 MB initial and 8192 MB maximum. Unless you are heavily into gaming or video editing, and you only use your PC for browsing, document editing etc., I suspect this should be enough. BTW, I created a Ramdisk in memory (RAM) and keep my paging file on it. This saves endless thrashing on my hard disk.
5. Empty your browser cache frequently: with Firefox, press Ctrl-Shift + Delete, and select Cache only. Dunno about other browsers, a quick search should find the answer.
6. I'm sure others will have different ideas. mine may be entirely wrong. MinorProphet (talk) 16:49, 9 June 2024 (UTC)Reply
It may be easier, if you never hibernate your computer, to turn it off, which will save you another 4GB.To do this:
1. open a command prompt as administrator
2. enter powercfg -h off
3. enter powercfg -hibernate off
Note: some sources mention needing powercfg.exe /hibernate off for the second step. It should be the same effect imho.
To undo this, replace the "off" in the command with "on".
14GB of free space should be sufficient for most stuff anyway, but storage has become significantly cheaper in recent years. A quick look on a (dutch) price-watch shows me that a 512 GB SSD from a non-budget brand is ~55 euro for an M2 type, and ~70 for a 1TB 2.5" (I can't find 512GB drives from the non-budget brands I've selected). I seem to recall from earlier questions that you're on a laptop, so adding drives might be difficult, but I suppose the better computer shops will still do this for you (or buy an external SSD-housing for ~20 euro if you know how to do so). Rmvandijk (talk) 14:05, 10 June 2024 (UTC)Reply
Please upgrade SSD to 12 terabytes . System 4TB data 8 terabyte making fattest ever also Roblox support 2001:44C8:4145:4A1E:85B5:4782:3DD3:7CD6 (talk) 11:31, 11 June 2024 (UTC)Reply
M$ fanboy attempts to shoot me down. Ha ha, missed both my legs. MinorProphet (talk) 02:49, 12 June 2024 (UTC)Reply

June 9

edit

Windows RT not come with 128 GB of SSD and 4 GB of RAM

edit

Because Windows RT are low end tablet are only came out 32 and 64 gigs the Windows RT tablet system 32 or 64 gigs data storage removable storage only comes with full Microsoft Office 2013 for RT because Microsoft Surface tablet running Windows 8 RT (not NT) Windows 8 tablets do not have 128 gigs after a Surface Pro 1 released more storage than Windows RT . 2001:44C8:4225:785C:85A3:DE11:52D5:1869 (talk) 00:37, 9 June 2024 (UTC)Reply

Do you have a question? Shantavira|feed me 08:41, 9 June 2024 (UTC)Reply

Windows Security warning about pure text file

edit

I just wanted to unzip a simple text file from the zip file created by WhatsApp pure text export. Then the following message popped up:

Windows Security
(big "❢" in a shield) These files might be harmful to your computer
Your Internet security settings suggest that one or more files may be harmful. Do you want to use it anyway?
Show details      OK      Cancel
How do I decide whether to unblock these files?

Notes:

  1. Despite the plural in the fat text, there is only one file.
  2. There is no link behind "Your Internet security settings", so the dialog does not offer me a way to check these. (I certainly have not changed any security setting to consider pure text files as potentially harmful.)
  3. The text "Show details" is underlined; clicking on it displays no other "details" than my target folder name.
  4. "How do I decide ..." is underlined; but clicking on it doesn't even try answering the question, but only calls the very general page ‘https://support.microsoft.com/en-us/windows’, which contains no informative text (only advertisements for MS's latest products).

So, is Windows Security just crying wolf or is there a real danger from a simple .txt file? ◅ Sebastian Helm 🗨 17:16, 9 June 2024 (UTC)Reply

How are you unzipping it? Just double clicking on it? Have you unzipped zip files on this computer previously without this error popping up? I would create a small text file, manually zip it (right click -> Send to -> Compressed (zipped) folder) and then try to unzip it and see if you get the error. If you do, the error message is spurious. If not, then there's something specific to the WhatsApp file that is triggering the error, which is more concerning, but still could be a false positive. CodeTalker (talk) 18:06, 9 June 2024 (UTC)Reply
It's not the .txt file, it's the containing .zip file which raises Windows security concerns. If you're only using Windows security, I'm fairly it sure won't be able to make a scan of a specific file. A dedicated AV/Malware app would. From a paranoid point of view, theoretically just opening a .zip file without even viewing/extracting the contents can cause malicious code to be executed. Do you know/trust the person it came from? Did you create it yourself? If so, there should be no problem. Simple .txt files do not contain code, and it's highly unlikely that they would cause a problem. If you want to be ultra-security conscious, if someone has sent you the .zip, ask them to extract it themselves and send it to you as a plain .txt file via email etc. There are online scanners, which may or not work, eg https://www.fortiguard.com/faq/onlinescanner , but I haven't tested it with a file containing known malware. MinorProphet (talk) 21:55, 9 June 2024 (UTC)Reply
Thanks to both of you for your replies. I created the file through WhatsApp's export feature, as I've done previously without this error popping up. (The only difference is that this time I exported text only.) So I now tried to reproduce it in other ways, up to zipping the same file on my cell phone directly, and it never reproduces. MinorProphet: It's an interesting idea that it could be the zip file, but then I'd expect the error to occur when I open the zip file. Still, software doesn't always behave logical. ◅ Sebastian Helm 🗨 06:13, 10 June 2024 (UTC)Reply
Windows Security includes Microsoft Defender Antivirus, which scans whole files proactively ("real-time protection"). Any binary pattern can show up in the zip of a plain ASCII text file, also patterns that happen to be on an antivirus blacklist.  --Lambiam 07:51, 10 June 2024 (UTC)Reply
Thanks, learn something every day. So, a false positive, it would seem. Re binary patterns: back in the day, I installed Skype when it was all the rage: and whenever I was attempting to recover a customer's precious data after a disk crash using Norton Utilities when it actually did something useful, Skype would highlight what it assumed were UK telephone numbers (01234 567890) and invite me to ring them, although it was more likely to have been just a corrupt Word file. MinorProphet (talk) 12:59, 10 June 2024 (UTC)Reply
Thanks, Lambiam. Yes, “Any binary pattern can show up in the zip”. But then I would expect the OS warning to come up when downloading the zip file. On unpacking, it should check the result of unpacking, i.e., the text file, shouldn't it? ◅ Sebastian Helm 🗨 16:03, 10 June 2024 (UTC)Reply
My guess is that the creators of Microsoft Defender Antivirus, originally a free anti-spyware program developed by another company, did not make special provisions for special file types. I don't know how this program works, but in general antivirus software scans files that are about to be opened.[6][7][8] After unzipping, you still need to open the unzipped file, and then that file is also checked.  --Lambiam 16:33, 10 June 2024 (UTC)Reply
Thanks, that explanation makes sense: It's probably not necessary to check a file as soon as possible; it's probably good enough to check a zip file on unpacking, rather than on downloading - although that's less "proactive". ◅ Sebastian Helm 🗨 21:03, 10 June 2024 (UTC)Reply

June 10

edit

Convenient way to use dd to flash a new firmware image

edit

Hi. In embedded system development, it is common to use the dd (Unix) command to flash a new firmware onto a disk:

xzcat /media/ubuntu/ubuntu-core-24-amd64.img.xz | \
sudo dd of=/dev/<target disk device> bs=32M status=progress; sync[9]

Currently I am doing the following:

1. Create a bootable live Ubuntu USB drive

2. Plug this drive onto the system I want to flash, and wait for it to boot up (~3 minutes)

3. After it's fully booted up, I am now in a full Ubuntu desktop environment. Now I launch the terminal and run the above dd (Unix) command

Is there a more convenient way to do this?

It occurred to me that most of step #2 and #3 are not necessary. I don't need a full desktop environment. All that really needs to happen is for the Linux kernel to load, then the command is ran (every component of the command is known before hand).

I am guessing that there is already some open source solution for this on Github, but I tried various different search terms and couldn't find it. 99% of what I found was for the use case where you have a Linux distribution ISO (Ubuntu 24.04 LTS.iso, let's say), and you want to write that image onto a blank USB drive. This use case is extremely frequent so many projects and sites are dedicated to it, eclipsing the niche use-case that I am looking for. 17:32, 10 June 2024 (UTC) OptoFidelty (talk) 17:32, 10 June 2024 (UTC)Reply

Why don't you dd from the machine that you're developing the software on? Why is the Linux livecd step necessary? -- Finlay McWalter··–·Talk 20:37, 10 June 2024 (UTC)Reply
The development machine is a desktop workstation with sufficient RAM and storage space for development work.
The target machine is a development board with 2GB RAM and 8GB eMMC storage, making it not suitable for development work.
Since these are two separate computers, I cannot think of an easier way to perform the flashing with my very limited linux knowledge. OptoFidelty (talk) 23:13, 10 June 2024 (UTC)Reply
I'm beginning to understand. So you want to flash the internal disk on the target board. You've not said, but I guess the target board is x86 and runs a conventional UEFI bootrom. And you're flashing a normal x86 ubuntu image onto it. So it seems you'd want the target machine to flash itself and then reboot. If that's all the case, then I think you can have the target machine itself read the image to flash over the network and dd its own disk. Normally this is a rather fragile process, but netcat and dd are tiny programs that will fit in ram easily (as will the kernel and the relevant network and disk drivefs), and so won't be upset when the underlying storage is being messed with. Things will break (necessitating a boot from a usb) if the process is interrupted (so this is a fragile hack that obviously isn't suitable for field or production use). To do this, on the development machine:
      dd bs=16M if=image.iso | bzip2 -c | nc targetmachineip 19000
and on the target machine, a suid-root script does:
      nc -l 19000 | bzip2 -d | dd bs=16M of=/dev/THEDISK
      reboot
And that should do it. I've done this before without issue. To refresh my brain, I cribbed the command lines from this posting (when I did it, I didn't think to zip the stream, but that's probably a smart idea. -- Finlay McWalter··–·Talk 08:14, 11 June 2024 (UTC)Reply
Simpler yet - on the target machine:
         nc -v -l 19000 > /dev/THEDISK
         reboot
and then on the dev machine:
         nc -v -q 0 targetmachineip 19000 < image.iso
That -q 0 makes the sending party close the socket and exit once it's done (otherwise you have to ctrl-c it). That's for traditional/openBSD netcat; if you're using gnu netcat, I believe you replace -q 0 with -c
You don't need dd at all, and I've omitted bzip2 for clarity (it might help, depending on the speed of the network vs that of the disk). -- Finlay McWalter··–·Talk 15:34, 11 June 2024 (UTC)Reply
Thank you very much!
(Yes, it's x86 and runs a conventional UEFI. It's not the usual platform so I can see why most guides don't cover it.) OptoFidelty (talk) 18:15, 11 June 2024 (UTC)Reply
If you want something safer, you could instead:
  1. Partition the target machine's disk in two, with a small partition and a bigger one.
  2. In the small partition, install a minimal linux like Tiny Core Linux's no-gui version
  3. In the larger, place in your actual test product (as you would with dd, before)
  4. Configure GNU GRUB to offer to boot either partition
  5. When you need to update the software under test, you book into tinycore and do the same netcat procedure as above, sending the iso to the large partition (e.g. /dev/sda2)
But I'm no expert at GRUB. Other than that, it should be straightforward. -- Finlay McWalter··–·Talk 12:58, 12 June 2024 (UTC)Reply

June 11

edit

Cloud-client interfacing problems with Linux configured router

edit

Hi all, I’m having problems properly interfacing cloud-client over bidirectional user protocols on Linux. Obviously I tried running a virtual network to reduce cloud interference over the router framework, but I think there is a problem with modem RAM that’s preventing me from accessing a more compatible data relay. I’m using a 327 GHz processor configured to a nested cloud-client interface utilizing firewall encryption. Camuscurve (talk) 00:28, 11 June 2024 (UTC)Reply

I'm pretty sure this is trolling, but on the off chance that it isn't, can you explain in more detail what your problem is? What is "a more compatible data relay" and what does modem RAM have to do with it? And please tell the aliens from whom you obtained a 327 GHz processor that I want one too. CodeTalker (talk) 01:42, 12 June 2024 (UTC)Reply
There is no chance (check out their posting history), and please do not feed the trolls. Assume good faith? I used to, but trit-trot, trit-trot over the bridge is more and more prevalent these days. Please, nurse, Camuscurve hasn't been taking their medication, best prepare the straightjacket and alert the white-coated assistants. MinorProphet (talk) 02:19, 12 June 2024 (UTC)Reply
Unsurprisingly, OP has been indefinitely blocked as a sockpuppet. CodeTalker (talk) 05:28, 12 June 2024 (UTC)Reply

June 12

edit

Any recent usage statistics on the .zip top-level domain?

edit

 Â Courtesy link: Draft:.zip

Hi, are there any sources or recent publications that show how the TLD is being used, or by whom its being registered (i.e.: percentage of personal vs registered corporations, or location of registration according to WHOIS information)? There was of course a lot of ink spilled regarding the potential for misuse when the registry was created, but I'm looking to see if anyone came back and did a study or research after the fact.

Thanks, microbiologyMarcus [petri dish¡growths] 15:47, 12 June 2024 (UTC)Reply

Easy way of generating "mylist.txt" files from a folder?

edit

I have a bunch of folders consisting of mp3 files, which I would like to concatenate via ffmpeg. I am using the method described here, in which the full paths of all the files one wishes to concatenate are named in a text folder using the format of file '[file path]'. It's very tedious having to copy and paste the paths of every single file in a folder, so I'm wondering if there's any program that can scan a folder and output this kind of text file. Cheers, Mach61 17:07, 12 June 2024 (UTC)Reply

On what system? On Windows, taking a lazy approach (rather than writing a script), you could open a command prompt in the folder (right-click somewhere that isn't on a file and choose "open in terminal"), and then dir/B gives you all the file names. Since they're all in the same folder, copy and paste the list to a text editor and paste file ' and the path of the folder in front of each line, then put ' after each line. Repeat with next folder. Still effort, but less effort, and gets the job done.  Card Zero  (talk) 19:39, 12 June 2024 (UTC)Reply
When I required a list of all files within a folder structure, I found that doing it with DOS ("Command Prompt" these days) was the simplest, though there was a bit of work to deal with the resultant file. In DOS, I went to the base folder I wanted to harvest and used DIR to fetch the filenames and paths. Something like DIR /S >OUTPUT.TXT (The /s command tells it to bring back the sub-directories and the > tells it to input to a (text) file. I then imported the result into Excel and was able to get what I wanted. Matt Deres (talk) 19:40, 12 June 2024 (UTC)Reply
Just to build on that a bit: the trickiest part was getting the pathways to correctly get matched up with the filenames. Most of the problem came from the way Excel would split the text into columns: the rules for what you want it to do for the files is not the same as what you want it to do with the folder information. There's probably a clever way around that, but I ended up using some really kludge-y formulas and then correcting. It's not something I'd want to have to do every day, but as a one-time thing it was okay. Matt Deres (talk) 19:46, 12 June 2024 (UTC)Reply
Try https://www.karenware.com/powertools/karens-directory-printer and then running a macro or using search&replace in Notepad++ Polygnotus (talk) 02:32, 13 June 2024 (UTC)Reply
On Linux I do ls -1 | awk '{ print("file \x27"ENVIRON["PWD"]"/"$0"\x27")}' > /tmp/mylist.txt You might be able to do the same on Windows using Cygwin. You will need to rename if the filename has a single quote in it, eg Return to Castle De'ath Track 01.mp3 which I had to deal with recently. TrogWoolley (talk) 08:35, 13 June 2024 (UTC)Reply

~

June 13

edit

Microsoft Word: page numbering folios

edit

Hello. Is there a way to get Microsoft Word to number pages not 1, 2, 3, 4, 5... but instead 1r, 1v, 2r, 2v, 3r...? As in folio numbering? Thanks Amisom (talk) 13:46, 13 June 2024 (UTC)Reply

I don't believe that's possible, at least as of Office 2016. There's no option anything like that as far as I can tell. It's hard to prove a negative from Google, but nothing useful is coming up when I search for word page numbering "folio". Keep in mind, Word is a word processing program; it has only rudimentary printing capabilities. What you likely need is Microsoft Publisher, which is a desktop publisher. From our article: "Microsoft Publisher is a desktop publishing application from Microsoft, differing from Microsoft Word in that the emphasis is placed on page layout and graphic design rather than text composition and proofreading. It's going to be discontinued in a few years, with its functionality moved to other applications in the 365 suite. Matt Deres (talk) 14:51, 13 June 2024 (UTC)Reply

why North American smile zemi upload picture doesn't have web browser?

edit

Because the tablet doesn't have:

  • web browsers
  • video sharing
  • gaming service
  • social media

Okay we need to question....... The North American smile zemi requires upload plug to PC. The Japanese smile zemi requires replacement OS to Android. For North American only educational use. For Japanese with entertainment content. The tablet they use close systems . See www.smile-zemi.com.

2001:44C8:4145:4A1E:85B5:4782:3DD3:7CD6 (talk) 16:04, 13 June 2024 (UTC)Reply

Redirect

edit

I’m using Firefox, and after the last upgrade, I get the message below when I click a bookmark. Not all bookmarks, but almost all. Any ideas how to get rid of it? “The previous page is sending you to http://www … (the url where I want to go). If you do not want to visit that page, you can return to the previous page.” (the last five words are a url back to where I was.). DOR (ex-HK) (talk) 16:26, 13 June 2024 (UTC)Reply

Is that the exact phrasing, or is it this message?

Redirect Notice

The page you were on is trying to send you to [...].

If you do not want to visit that page, you can return to the previous page.

I found it on a thread on Mozilla support, where a moderator thinks Firefox is not responsible for the notice and that it's "likely a feature of the website that redirect[ed] the link you entered". But this is a typical software support reaction. I saw nothing on Bugzilla under bookmarks though it might be under some other component. You could open a ticket if you feel public-spirited.
What distinguishes the bookmarks that do load? Is this perhaps an issue about http vs. https? If you create new bookmarks, do those work OK?  Card Zero  (talk) 18:12, 13 June 2024 (UTC)Reply
Does the bookmarked URL look like, say,
https://www.google.com/imgres?⁠q=%22Zeng%20Shan%22&imgurl=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F9%2F9d%2FZeng_Shan.jpg&imgrefurl=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FZeng_Shan&docid=Harrumph666oid&tbnid=qWeRtY_uIoP&vet=1L1k3_8008s ,
instead of just
https://upload.wikimedia.org/wikipedia/commons/9/9d/Zeng_Shan.jpg ?
Google is tracking when its search results are followed.  --Lambiam 18:26, 13 June 2024 (UTC)Reply

Follow-Up on Windows Storage Questions

edit

Thank you for the various advice on my Windows storage question. Here are some follow-up comments and a follow-up question.

The Pagefile and other things

edit

I think I know why the pagefile is starting at 12 Gb and expanding to up to 26 Gb, and it is all right with me. I am keeping an enormous number of tabs open in multiple windows with both Chrome and Firefox. I know that it is using a lot of RAM, and then using a lot of paging storage, and Windows 11 handles it fine as long as it has the disk storage to page to. That doesn't bother me, and is fine with me, as long as I am not about to run out of storage (secondary memory).

So what I want is to be sure that I have enough free space on my C: drive to accommodate the growth of my pagefile. That gets me to the question.

Utility to display disk usage

edit

The comment was made that: There will be an app/utility which will find your biggest files.. Yes. What I specifically want is a utility that will show the total disk utilization of each directory on a drive, or each subdirectory in a directory. I can sort a listing of files by size, but File Explorer doesn't show the size of each of the directories in a directory. I can query the size of a directory manually from the Properties command, but that is time-consuming. Is there a utility on Windows 11 (not an older version of Windows) that displays the disk utilization of each directory? Robert McClenon (talk) 20:38, 13 June 2024 (UTC)Reply

By the way, if I have any MP4 files or other three-dimensional monsters, I would like to be able to see and unload them. So a utility that searches for particular extensions such as .mp4 would also be useful. I know that video clips are three-dimensional and so are larger than two-dimensional things like .PDFs. I know that. Robert McClenon (talk) 20:38, 13 June 2024 (UTC)Reply

The Unix utility 'du' will do this, and there are Windows versions of it (to be run on the command line). I use cygwin, which includes many such Unix programmes, but there's a standalone version produced by Microsoft available at https://learn.microsoft.com/en-us/sysinternals/downloads/du.-Gadfium (talk) 20:58, 13 June 2024 (UTC)Reply
Produced by Sysinternals really, along with other handy utilities such as Autoruns. Microsoft's role in this was to buy them.  Card Zero  (talk) 21:45, 13 June 2024 (UTC)Reply
I use WinDirStat do to this. It shows the amount of storage each subdirectory uses, and what percentage this is of the parent directory. It also has a really cool treemap to represent a drive, with rectangles representing each file with the size depending on how much storage it uses, which are colour coded by file type. I'm not sure if it works for Windows 11, but it works fine for Windows 10. ―Panamitsu (talk) 23:28, 13 June 2024 (UTC)Reply

June 14

edit