I am working on a script that contains a line similar to  "command /path/to/directory/*example*"  If the directory contains files that are named 1example.txt, example.tmp, example.war it will run the command on all of them. I would like for the command to be run on all of them except for the .war.  Is there some way of doing this cleanly?  The "/path/to/directory/*example*" is a string that is passed through.
I have several files with the same base filename. I'd like to remove all but one  foo.org #keep foo.tex #delete foo.fls #delete foo.bib #delete etc   If I didn't need to keep one, I know I could use rm foo.*.    demonstrates ^ to negate a match. Through trial and error, I was able to find that  rm foo.*[^org]   does what I need, but I don't really understand the syntax.   Also, while not a limitation in my use case, I think this pattern also ignores foo.o and foo.or. How does this pattern work, and what would a glob that ignores only foo.org look like?
Load R package from character string An irreducible polynomial in a subfield of $\mathbb{C}$ has no multiple roots in $\mathbb{C}$ Is the change in the Lagrangian always a total derivative for symmetry transformations of the action? Let $\Omega\subset\mathbb R^n$ and consider an arbitrary functional $$ S\colon C^k(\Omega)\to\mathbb R $$ that is local, $$ \phi\overset S\mapsto \int_\Omega L(\phi,D\phi,\dots,D^k\phi) $$ for $L$ some $n$-form taking values in the $k$-jet space $J^k\phi$. We may call $S$ the action functional, and $L$ its associated Lagrangian (although we do not assume that $\delta S[\phi]=0$, i.e., we work off-shell).  There are two notions of a symmetry that are typically discussed:   Lagrangian symmetries, that is, transformations of the form $\phi\to\phi'$ that satisfy $$ L-L'=\mathrm d\Theta $$ for some $(n-1)$-form $\Theta$, and where $L'(J^k\phi)=L(J^k\phi')$. Action symmetries, that is, transformations of the form $\phi\to\phi'$ that satisfy $$ S-S'=0 $$ where $S'[\phi]=S[\phi']$.   If we assume that the boundary conditions are such that $\Theta|_{\partial\Omega}=0$, then it is clear that Lagrangian symmetries are also action symmetries.  If we assume that $\Omega$ is "nice-enough" (e.g. star-shaped) then I believe that any action symmetry is also a Lagrangian symmetry, although I would like to have a more precise statement about this fact. In other words, my question is     Are these two notions of symmetry equivalent? Under what conditions?   Moreover, how much can we weaken the assumptions? For example, can we take $\Omega$ to be simply-connected instead of star-shaped? Can we take $\phi$ to only have weak derivatives instead of strong derivatives? How to get rid of OTA software update notification? I upgraded my Nexus 4 to Lollipop a few days ago but I don't like it. I'll leave out my reasons because they're not relevant here. I wiped my phone and installed a clean stock 4.2.2 version instead. I'm happy with this.  Not long after, Android automatically downloaded the 4.3 upgrade and notifies me with the choices "Later" and "Install". I don't want to do this upgrade.  How do I:   get rid of the notification, and  remove the downloaded update (to free up precious storage space).     I have already tried choosing "Later" but the same notification immediately reappears.    Based on Google search results, I also tried going to Settings &gt; Apps &gt; All &gt; Google Services Framework and unticked "show notifications" but it still appears. Force stop or disable also doesn't seem to help, so I've re-enabled the service including notifications. I didn't see any other apps in this list that sounded relevant - did I just not see it? Help with null hypothesis Let $\mathbf A, \mathbf B$ be Hermitian matrices of the same size. What is the characterization of $\mathbf A, \mathbf B$ such that $p(\lambda)=\det(\mathbf A-\lambda\mathbf B)=0$ has only real roots?   If $\mathbf B$ is positive definite (I corrected this), it is easy to see $p(\lambda)$ has only real roots. I wanted to upgrade to 14.04.2 point release from 14.04.  What I did was:  sudo apt-get update &amp;&amp; sudo apt-get upgrade &amp;&amp;  sudo apt-get dist-upgrade -y   Then I wanted to upgrade to 3.16 kernel, since it wasn't done with the the above command, so what I did was:  sudo apt-get install linux-generic-lts-utopic xserver-xorg-lts-utopic libegl1-mesa-drivers-lts-utopic xserver-xorg-video-all-lts-utopic xserver-xorg-input-all-lts-utopic sudo apt-get install linux-signed-generic-lts-utopic   Now when I do:   uname -a I get   Linux Y500 3.16.0-33-generic #44~14.04.1-Ubuntu SMP Fri Mar 13 10:33:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux  cat /etc/os-release | grep VERSION= I get  VERSION="14.04.2 LTS, Trusty Tahr"   And when I do lsb_release -a I get  Distributor ID: Ubuntu Description:    Ubuntu 14.04.2 LTS Release:    14.04 Codename:   trusty   I know that uname -a and lsb_release -a both refer to different info, but why does  cat /etc/os-release | grep VERSION= show different version? “Fire” a weapon before firearms existed? Did the verb “fire a weapon” exist before the actual introduction of firearms on battlefields?  More specifically, does it make sense for a creative work to have archers (or whatever ranged weaponry) be told to “fire!”, when the world they live in has not yet seen firearms?  It seems some kind of an anachronism to me, since before firearms, “fire” would never propel any projectile...  I've seen several movies do it; I can't remember them all, but for instance I verified it in The Lord of the Rings trilogy (left), Kingdom of Heaven (top right), and more recently Frozen (bottom right):    The first two do it several times (with Kingdom of Heaven also using it on ballistae, and The Return of the King even having Aragorn ask Legolas to ), whereas firearms never appear on the battlefields they feature (Kingdom of Heaven is set in the 12th century; as for The Lord of the Rings, apart from one occurrence of a witchcraft-ish bomb, it's archery and medieval siege engines all the way).  Frozen may be debatable, happening probably somewhere in the 18th or 19th century, but since we only see swords, spears and the like, it made me flinch to hear crossbowmen use “fire!”.  I've also noticed other movies avoiding this, using “loose!” instead, such as Troy (left) and Gladiator (right):    This makes me think it would be the right thing to say instead... although I'm still wondering why not use “shoot”, which seems simpler to me. Redirecting stdout to a file you don't have write permission on When you attempt to modify a file without having write permissions on it, you get an error:  &gt; touch /tmp/foo &amp;&amp; sudo chown root /tmp/foo &gt; echo test &gt; /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  &gt; sudo echo test &gt; /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  &gt; sudo su # echo test &gt; /tmp/foo Stop all active ajax requests in jQuery Using divisibility theorems, prove that if $\gcd(a,b)=1$ and $a|c$ and $b|c$, then $ab|c$.   This is pretty clear by UPF, but I'm having some trouble proving it using divisibility theorems. I was looking at , and if this could be proven, then the solution would follow immediately. Algorithms for automatic model selection I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression. Toy Line (Production) Run I am not sure about the meaning of this:          Transformers: Generation 1 (also known as Generation One or G1) was a children's toy line that ran from 1984 to 1991 and was produced by Hasbro.     Would the following rewrite be better?        Transformers: Generation 1 (also known as Generation One or G1) was a children's toy line the production of which ran from 1984 to 1991 and was produced by Hasbro. Read MIME data using PHP I posted a question which was closed as off-topic and it seems like it could fit on another site in the network. How can I go about moving it there?   What is migration? When can a question be migrated, and who can migrate it? When should I consider migration, and when is it inappropriate? What causes a migration to be blocked and what happens after? What causes a migration to be rejected and what happens after? Anything else I should know about migration? I was having a look at an old question of mine when I browsed the  from the timeline. I scrolled downwards and realized the Review completed panel comes along for the ride. While that might be , tags flowing over top of it as pictured below probably isn't.  Here's a .gif of the Question and Duplicate tabs flowing over it as well. Note that the timeline button also flows over. If vote buttons are present, they will also flow over it.  Reproduced on Chrome and Microsoft Edge. Update Per  by Tiago Martins Peres, this issue also happens in other Review types, namely Late Answers, First Posts and Low Quality Posts. In addition to that, it is causing the action buttons on reviews to become unclickable if you scroll low enough.  As a temporary workaround, you can use 's , which  this issue. Prove that $\lim_{n\to\infty}a_n\le \lim_{n\to\infty}b_n$ Theorem  Let $\{a_n\}$ and $\{b_n\}$ be convergent real sequences. Assume that there exists a $N\in\mathbb{N}$ so  $a_n\le b_n$ (eq. 1)  for all $n\ge N$. Then  $\lim_{n\to\infty}a_n\le \lim_{n\to\infty}b_n$.  My attempt at proving  Let $a=\lim_{n\to\infty}a_n$ and $b=\lim_{n\to\infty}b_n$. $a$ and $b$ are real numbers because the limit of a sequence of real numbers is a real number (which is a corollary in my textbook). For proof by contradiction, assume  $b&lt;a$.  Let $\epsilon=\frac{a-b}{2}$. Then we can find $N_a,N_b\in\mathbb{N}$ so  $|a-a_n|\le\frac{\epsilon}{2}$ when $n\ge N_a$, (eq. 2)  $|b-b_n|\le\frac{\epsilon}{2}$ when $n\ge N_b$. (eq. 3)  In a textbook I found that I should do the following:  Choose a $n$ so $n\ge\max(N,N_a,N_b$), then eqs. (1-3) are satisfied. Then  $a-\epsilon\le a_n+\frac{\epsilon}{2}-\epsilon$  How do I get that last thing? Is it necessary to do a proof by contradiction or can one do a direct proof? php sort associative arrays by keys that those keys exist in other array Express solutions of equation $ \tan x= x $ in closed form I know that the equation $$ \tan(x) = x $$ can be solved using numerical methods, but I’m looking for a closed form of the solutions. In my opinion, having only numerical solutions means that we don’t know the problem, and sooner or later, we’ll be able to find a closed-form solution or at least a power-series solution. I’m looking for an explicit form of a sequence $ (x_{n})_{n \in \mathbb{Z}} $ in $ \mathbb{R} $ such that  $ 0 &lt; x_{0} &lt; \dfrac{\pi}{2} $, $ \tan(x_{n}) = x_{n} $ for all $ n \in \mathbb{Z} $, and $ (2 n - 1) \dfrac{\pi}{2} &lt; x_{n} &lt; (2 n + 1) \dfrac{\pi}{2} $ for all $ n \in \mathbb{Z} \setminus \{ 0 \} $.  The existence of such a sequence follows from the continuity of $ x \mapsto \tan(x) - x $ over its domain. Its uniqueness follows from the monotonicity of $ \tan(x) - x $ over the intervals $$ \left( (2 n - 1) \frac{\pi}{2},(2 n + 1) \frac{\pi}{2} \right), \quad n \in \mathbb{Z}. $$ Too many requests? I went to stackexchange.com and clicked on SO.  After a few minutes I got a message saying "We have detected too many requests from this IP.  If this is an error contact us."  That was the second SE page I tried to visit.  Second only to SE.com  I moved to another machine and it's working now.  The first machine usually works, I don't know if a got assigned a blacklisted IP or what.  Anyone know what's going on?  EDIT: I would really rather not post my IP on the web, but if a diamond or dev asks I'll email it.  EDIT 2: I looked at badp's dupe suggestion and can verify that I have no scripts frequently calling SO.