There are a few fields that uses public upload destination. I changed it globally right now, as far as I know it uses private upload destination from now. But how can I change previously uploaded files' upload destination (programmatically)?
Let's say I have a node type "Article" which has a field "File" which is set to handle public files. A lot of articles and files get added.  Now the specs suddenly change and the "Article" will move behind a login and therefore also the attached files must be changed to be not publicly accessible anymore.  I already found out  pretty easily by reimporting the manually updated field.storage.node.field_file.yml config. But: this only affects new files that will be added after the switch. It doesn't work for existing files. They still are accessible publicly. Many thousand existing files would need to be manually reuploaded to also make them private.  Does anybody of you have solved that in D8 before? If so, then how?  As all I can think of right now is to programmatically query all "Article" nodes, then foreach through all nodes, get the files, temporarily store them somewhere else, empty the field out, then try to reupload the files programmatically (probably my next question) and then resave each node.  Does that sound reasonable? Or can you think of any other approach that might work here (in D8)?
I do love to listen to music while watching text YouTube videos, but I can't because YouTube can't be muted.  I use the respect audio focus in  Music Player.  I have tried App Volume Control but it did nothing! I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.  I want a history that:   Remembers everything from every terminal Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up) Doesn't forget command if there are spaces at the front of the command.   Anything I can do to make bash work more like that? Note: the eventual outcome of this discussion involved dropping this particular off-topic reason, along with other changes. See:  &nbsp; &mdash;Shog     I was using the reason "demonstrate a minimal understanding" myself quite frequently, but the more I review, the more I have doubts about it and I think this reason can either be dropped entirely or at least rephrased, so I started to use "problems with code you've written must describe the specific problem" instead:     Questions asking for code must demonstrate a minimal understanding of the problem being solved.   So the poster has posted some description, maybe even a snippet of code and in his mind that already proves that he has that minimal understanding required. After all he described the problem and what he tried to solve. So telling him that he lacks that understanding is rather rude, and from the posters point of view doesn't even apply. What both version of the reason not emphasize is that a description of a problem is not various versions of     it doesn't work   but that we rather mean really specific details (see below). I can often see in the reopen review queue that the "improved" version just includes a more verbatim description, while what usually would be expected is some specific error message, a trace or a log, or whatever applies.  Then it continues with:     Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist   comparing it to:     problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.   Which says essentially the same, only in more detail.   So the "minimum understanding" reason is IMO a more rude version of the reason telling the user that an SSCCE is missing.  The intent of giving this reason is to tell the user that he needs to give exact details to be able to help him, so IMO a checklist would be much better. Something like:     Your question was closed because it may not provide enough details. Things you can do to improve your question to get an answer include:         Format the code in a way that makes it readable and easily understandable.   Provide the smallest working sample of code demonstrating the problem (link to SSCCE)   Include your input and output.   If applicable provide logs (i.e. Android debugging log, stack trace, etc.).   If applicable provide the exact error messages (compiler, etc.).      And something like this should be best included already in the banner that appears when a question is closed instead of being hidden in some pages you often enough have to actively looking for.  It might be helpful to adjust this, based on the tags or close reason, as I realize that I'm more focused on the programming area, and the above list may not apply to other areas of SO.  Update  Another thing I forgot to mention (but wanted to) is this:     Questions asking for code   Is IMO essentially an invitation of the type of questions     I have a problem, can you provide the solution? (with an optional please)   while     Questions concerning problems with code you've written   puts at least some emphasis on the fact that the poster has to put some effort himself in trying to solve the problem by providing the code which he used to attempt the solution. Given any $10$ consecutive positive  integers , does there exist one integer which is relatively prime to the product of the rest ? Ubuntu 14.04 multi touch screen support Just installed 14.04. It seems to be converting all my screen touch gestures to mouse gestures. And it only supports one point touch. It is supposed to support ten touch points (tested with windows 8.1).  Am I missing something here? Do I have to install some kind of package? Or is it just not supported?  Test - being able to draw here: Why doesn't matter pass through other matter if atoms are 99.999% empty space? The ghostly passage of one body through another is obviously out of the question if the continuum assumption were valid, but we know that at the micro, nano, pico levels (and beyond) this is not even remotely the case. My understanding is that the volume of the average atom actually occupied by matter is a vanishingly small fraction of the atom's volume as a whole. If this is the case, why can't matter simply pass through other matter? Are the atom's electrons so nearly omnipresent that they can simultaneously prevent collisions/intersections from all possible directions? Can an inanimate thing lift Mjolnir? Can an inanimate thing can lift Mjolnir without the help of a living being (unworthy)  Scenario 1  Mjolnir in a very light car with a sail attached to it, then a very strong wind blew and moved the car uphill.  It is possible or not?  Scenario 2  Can upward wind alone lift the Mjolnir? How to run scripts on start up? How can I run scripts automatically when Ubuntu starts up so I don't have to run them manually after startup? Can I Create a Dictionary of Generic Types? According to the well ordering theorem "". Whenever we have a well ordering on a set, it is not difficult to construct a new well ordering with a largest element. My question is:     For a given infinite set, can we find a well ordering on it such that there is no largest element? How to convert Wubi install into regular install? I have installed Ubuntu on my D: partition using Wubi. Is there any way in which I can remove my Windows from C: drive and move my existing Ubuntu installation to C: drive and make it a regular install. I'm looking for the best / friendliest way to reboot my rooted android 4.1.1 device. I found these solutions so far:   su -c "reboot" - Causes problems with wifi after restart on my device... I read that this can cause a currupt file system in some cases... Doesn't work via ssh for me. toolbox reboot - Same concerns here, but works via ssh. reboot -d 8 -f - causes problems after restart e.g. some apps wont start busybox killall system_server - "Hot Reboot" (not really a system restart) start|stop - Starts/stops Android Runtime (not really a system restart)   What is the device doing exactly when I'm pushing the (hardware) power button? I guess that's the most friendly way. I just downloaded a DVD which is for a movie. After uncompressing the DVD file I see .VOB, .IFO and .BUP files. If I open the first .VOB file it shows me the DVD menu but I can't interact with it. So, my question is... is Totem able to play those kind of files? If so, how can I achieve that? What other app could I use in order to reproduce those files?  Edit  Using VLC didn't work neither. I forgot to mention I have already tried that. Let me rephrase: if I open the first video file it shows the DVD menu, BUT I can't interact with it. Bring Debian to second Position in the GRUB Menu at startup Blowing your own sail? Should searching by default be AND or OR? On my website I have a search bar.  It's powered by Lucene.net.  I have a requirement to make search be a substring case insensitive search, with direct hits appearing before substrings.  What I don't know, however, is when a user searches for a multi-word item--say "Chocolate Milk"--should that be treated under the hood as an AND or OR search?  As an example:  *chocolate* AND *milk*   vs  *chocolate* OR *milk*   The requirement right now is to treat this as an AND, but I'm not sure if that's the right way to go about it.  What would be the best in terms of UX?  I would think the best thing to do would be an OR search, with items containing both keywords appearing before items containing only one of the keywords.  Thoughts?  EDIT: The types of items being searched are medical supplies, with very cryptic names. How to update the PATH user environment variable from command-line "Happen to know" meaning "Do you happen to know is if she has a boyfriend?"   What does the above sentence means . I heard those line in the movie 'the social network' and I would like to know when do we use this phrase "happen to know" . How to create an Event Notification that runs a Job/procedure when mirroring state changes Deriving the Lagrangian for a free particle I'm a newbie in physics. Sorry, if the following questions are dumb. I began reading &quot;Mechanics&quot; by Landau and Lifshitz recently and hit a few roadblocks right away.  Proving that a free particle moves with a constant velocity in an inertial frame of reference ($\S$3. Galileo's relativity principle). The proof begins with explaining that the Lagrangian must only depend on the speed of the particle ($v^2={\bf v}^2$): $$L=L(v^2).$$ Hence the Lagrance's equations will be $$\frac{d}{dt}\left(\frac{\partial L}{\partial {\bf v}}\right)=0,$$ so $$\frac{\partial L}{\partial {\bf v}}=\text{constant}.$$ And this is where the authors say   Since $\partial L/\partial \bf v$ is a function of the velocity only, it follows that $${\bf v}=\text{constant}.$$  Why so? I can put $L=\|{\bf v}\|=\sqrt{v^2_x+v^2_y+v^2_z}$. Then $$\frac{\partial L}{\partial {\bf v}}=\frac{2}{\sqrt{v^2_x+v^2_y+v^2_z}}\begin{pmatrix} v_x \\ v_y \\ v_z \end{pmatrix},$$ which will remain a constant vector $\begin{pmatrix} 2 \\ 0 \\ 0 \end{pmatrix}$ as the particle moves with an arbitrary non-constant positive $v_x$ and $v_y=v_z=0$. Where am I wrong here? If I am, how does one prove the quoted statement?  Proving that $L=\frac{m v^2}2$ ($\S$4. The Lagrangian for a free particle). The authors consider an inertial frame of reference $K$ moving with a velocity ${\bf\epsilon}$ relative to another frame of reference $K'$, so ${\bf v'=v+\epsilon}$. Here is what troubles me:   Since the equations of motion must have same form in every frame, the Lagrangian $L(v^2)$ must be converted by this transformation into a function $L'$ which differs from $L(v^2)$, if at all, only by the total time derivative of a function of coordinates and time (see the end of $\S$2).  First of all, what does same form mean? I think the equations should be the same, but if I'm right, why wouldn't the authors write so? Second, it was shown in $\S$2 that adding a total derivative will not change the equations. There was nothing about total derivatives of time and coordinates being the only functions, adding which does not change the equations (or their form, whatever it means). Where am I wrong now? If I'm not, how does one prove the quoted statement and why haven't the authors done it?