Allow redirection for a user
How to run a command that involves redirecting or piping with sudo?
Proof of $a^{\phi (n) +1} \equiv a \pmod{\! n} $ Carmichael generalization of Fermat-Euler's theorem. In-universe, a lightsaber is basically a controlled, fixed-length plasma stream that can be used as a sword. As such, the blade wouldn't have any mass (or infinitesimal mass if you want to get technical about E=mc2).  Anyone familiar with fencing or swordplay knows that the weight of the handle and blade, and thus the overall balance of the weapon, is critically important while fighting. A sword that is too blade-heavy is unwieldy; it is difficult to start, stop, and change the path of the blade as it's swung, which is vital to outmaneuvering your opponent in a duel. Conversely, a sword with too light a blade (equivalently, too heavy a hilt) is too easy to swing around. it's hard to "feel" where the blade is, and thus to make the minute changes needed to block a blow or land one. It can also be just as exhausting, in a different way, to wield such a sword; because most of the mass is behind your hand, it takes muscle power to point the blade forward instead of upward, while a balanced weapon would point directly forward from the user's hands. You also get no mechanical advantage while swinging it.  Obviously, out-of-universe the props were full "swords" that were then rotoscoped to paint the beam blade over the white wooden (later plastic) dowel that protruded from the saber. This gives the actual prop used by the actors a more realistic weight and balance, which can be seen in the duels (Darth Maul has to heave a bit to get that double-saber staff moving, and you can see the effort behind a full baseball swing of the sword by Luke or Vader in the original trilogy).  Was there any attempt in-universe to explain the weight and balance that an active lightsaber seemed to possess? In , the votes clearly show that the os.path.splitext function is preferred over the simple .split('.')[-1] string manipulation. Does anyone have a moment to explain exactly why that is? Is it faster, or more accurate, or what? I'm willing to accept that there's something better about it, but I can't immediately see what it might be. Might importing a whole module to do this be overkill, at least in simple cases?  EDIT: The OS specificity is a big win that's not immediately obvious; but even I should've seen the "what if there isn't a dot" case! And thanks to everybody for the general comments on library usage. Random bits of my chat die and come back to life during the day I'm searching for a word to indicate something that was current at some time in the past, but not necessarily now.    For example:       The doctor's report of June 2008 set forth the patient's ?{then-current} complaints. Is there a quick way to reset a .blend files windows and settings to default Do the predictions of a Random Forest model have a prediction interval? My awk program to change spaces into tabs doesn't work How to write a shell script which uses awk to read in the data file students.txt and output the data in the tabbed format as shown:  Surname Forename MSc Stream Date of Birth Smith John IT 15.01.1986 Taylor Susan IT 04.05.1987 Thomas Steve MIT 19.04.1986    Do not worry if tabbed columns don’t line up. The distance between each of (Surname, Forename, MSc Stream and Date of Birth) column is one tab.   Question:  Why this bellow code doesn't work for me?  awk 'BEGIN {IFS=" "} {OFS="\t"} {print $1,$2,$3,$4}' students.txt Finding the Public IP address in a shell script I can find my IP address using ifconfig or hostname -i command.  But how do I find my Public IP?  (I have a static public IP but I want to find it out using unix command) let's imagine i am at school with an android phone. I have a computer at home and that computer has a virtual machine working on it. here is the scenario, client and virtual client has ssh-client and ssh-server both and they can communicate each other in the local network.  when i want to connect to my virtual client from school by android phone through internet there must be an ip address.  the problem is virtual machine and client has the same public ip. so how do i connect one of the two machines? By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux? Commas with "so" I am confused with the usage of so.  Consider some examples from Oxford and Meriam-webster        It was still painful so I went to see a doctor (Oxford).   We were bored with the movie, so we left (MW).   There are no more chairs available, so you'll have to stand (MW).      So is a conjunction in all the above sentences. But I don't understand when to place a comma before it. So is one of FANBOYS. Thus, we have use a comma when it connects two independent clauses, which I think contradict the first sentence.  Is the placement of comma before so depends on a style guide? For example, Americans prefer a comma while the British doesn't. A murder of crows? I love the subset of collective nouns known as the terms of venery. These are collective nouns specific to a particular group of animals. Some of the more inventive examples are: a murder of crows, a crash of rhinos, a mischief of mice, and a puddling of ducks (specifically swimming ducks).  Is there a standard for these group names and is there a central reference for them as with other zoological taxonomy?  I can see in the Wikipedia articles that the practice has its origins in Medieval Hunting tradition, but the Kangaroo (Mob), for instance would have been unknown at that time, so how do new collections come into being? Transforming Differential Equation to a Kummer's Equation I'm trying to transform an equation of the form $$ yw^{\prime\prime}(y) - [b - ay] w^\prime(y) - [d + ey]w(y) = 0 $$ into the form of a Kummer's or confluent hypergeometric differential equation: $$ y w^{\prime\prime}(y) + [f - y] w^\prime(y) + g w(y)  = 0 $$ I know it may have something to do with merging two of the singularities of the original equation, and maybe doing something with $y$, making it $\frac{y}{b}$ and taking b to infinity, but I don't know and can't find the details for this process, and for my equation specifically. There's not too much difference between the two but just enough so that I can't get it. Thanks in advance for any help! When should I load assets for optimal performance? I'm writing a game using LWJGL and Java, and was wondering if there were best practices for when to load resources.  I have seen examples that load all resources when initializing the game (XNA), ones that load the new resources needed for each level while referencing the already loaded assets again. What are the general rules regarding when can you refreeze food that was frozen and then thawed in the fridge? and what are the reasons behind them? (Hygiene? Food quality?). Let's assume for the sake of the argument that the items were in a non-frozen state only a few hours.  To be more specific, I'm interested in the application of these rules for  - Ginger garlic paste - Dough - Indian Curries - Green Chilly paste - Frozen green peas Occasionally, the Unicode character sequence U+200C U+200B (ZWNJ ZWSP) is inserted into comments In     ... the number "5000" does not paste as such but instead as  5 0 U+200C U+200B 0 0   The HTML source looks like this:  perhaps the easiest would be &lt;code&gt;\edef\tmp{\everypar{\widowpenalty\the\widowpenalty\relax}}\tmp\widowpenalty=-50&amp;zwnj;&amp;#8203;00&lt;/code&gt; that may reset   Or (smaller snippet):  \widowpenalty=-50&amp;zwnj;&amp;#8203;00&lt;/code&gt; that   So in the HTML, we have extraneous &amp;zwnj; and &amp;#8203; in between the two middle digits of 5000.  Upon pasting and trying out this code, this first led to a mysterious compiler error. The same issue happened within a (now deleted) comment thread below ; there, these or similar two characters were inserted after the letter "r" within the string \ref ("\ref").  Note that not all browsers wrap the same way. The above screenshot was for Firefox 19.0.2, in which it breaks between \relax}} and \tmp, with 5000 insidiously left intact on the second line but with the two special characters remaining in the middle. So that is why this took me completely by surprise. Other browsers might indeed only break on the invisible Unicode characters, such as Chrome 25:    Or on a smaller screen with the mobile site, multiple line breaks might show, possibly still leaving the Unicode characters unused: What is a simple way to create a binary relation symbol on top of another? What is a simple way to have \ll on top of \gg with equal size and vertically center aligned and have them work as a binary relation symbol like \lessgtr? The commands \underset and \overset cannot be used because they do not treat the two symbols equally, and they do not vertically center. Let $(\Omega, \mathcal F,P)$ be a probability spaces and $H$ be a Hilbert space. By a random operator $A$ from $H$ to $H$ we mean a linear continuous mapping from $H$ into the Frechet space $L_0^H (\Omega, \mathcal F,P)$ of all $H$-valued random variables. My question is: How Can we define $|A|$ and the adjoint $A^*$? Is history expansion disabled in scripts? I understand the following error is due to ! used for history expansion:  $ echo "Hello!Tim" bash: !Tim: event not found   However if I put the command into a script and run the script, there is no problem:  $ cat myscript echo "Hello!Tim" $ bash myscript  Hello!Tim   Why is that? Does the bash manual mention the reason?