Passing the output of a command to another in one line
Pass the output of previous command to next as an argument
Getting key with maximum value in dictionary? I have a dictionary: keys are strings, values are integers.  Example:   stats = {'a':1000, 'b':3000, 'c': 100}   I'd like to get 'b' as an answer, since it's the key with a higher value.  I did the following, using an intermediate list with reversed key-value tuples:  inverse = [(value, key) for key, value in stats.items()] print max(inverse)[1]   Is that one the better (or even more elegant) approach? What happens with the force of gravity when the distance between two objects is 0? so I had my first approximation to the gravity equation  \begin{equation} F=GmM/r^2 \end{equation} and some questions arose that my teacher couldnt respond: if r approximates to 0 with mM being constant, then the force should tend to infinity, right? so that being true, then if we would travel to the center of the earth, we would be crushed by gravity? if so, how can there be anything right in the center of the earth? wouldnt anything there be compressed and destroyed by the infinite force?  having that in mind, my next question is as gravity force is measured from the center of an object, any part of the same object which is not at the center would be affected by the same object's gravity? if so, how can we differentiate between two objects that are not in a vacuum? my question originated thinking in us standing on the earth, in contact with it, are we, in a gravitational sense, one object? this lead to the last question, if gravity is a property of matter, then how applying the same logic as before, how does it work between two neutrons?(chose neutrons because i assumed it would be more difficult obtaining gravitational force if there was electrostatic forces from charges inbetween) do two newtrons in contact count as 1 gravitational object? and how thats its own gravity affect the newtron from center and out? how to have a custom zsh auto_cd command Instead of the normal cd I've created my own function  function cd {     builtin cd "$@" &amp;&amp; ls -F }   This works great for when I use commands like cd someDir/subDir but not when I change directories via zsh's auto_cd someDir/subDir.  Is there a way to customize what command gets called for auto_cd? Explicit vs implicit SQL joins Is there any efficiency difference in an explicit vs implicit inner join? For example:  SELECT * FROM table a INNER JOIN table b ON a.id = b.id;   vs.  SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id; What's the difference between JavaScript and Java? What's the difference between JavaScript and Java? At most finitely many (Hamel) coordinate functionals are continuous - different proof Sorry if I keep asking for proof checks. I'll try to keep it to a minimum after this. I know this has a well-known proof. I understand that proof as well but I thought I'd do a proof that made sense to me and seemed, in some ways, simpler. Trouble is I'm not sure if it's totally correct. It's quite short though. I was just hoping someone could look it over and see if it is a valid proof. Thank you!  Lemma: Every Cauchy sequence is bounded.  Proof: Let $(a_{n})$ be Cauchy. We choose $ 0&lt;\epsilon_{0}$. So $ \forall \; n&gt;m\geq N_{0}$ we have that $\vert a_{n}-a_{m} \vert &lt; \epsilon_{0}$. Therefore $(a_{n})$ is bounded for all $ m \geq N_{0} $ by $ \epsilon_{0} $. Since $ \mathbb{N}_{N_{0}}$ is finite, it is bounded. So, for all $ m&lt;N_{0} $, $ (a_{n})$ is bounded. Therefore $(a_{n})$ is bounded.  I realize I haven't said what the bounds are but I think that's sort of irrelevant. So long as we know it's bounded. Any help is much appreciated! Wireless disabled by hardware switch on an Asus X550V Transitive subgroup of symmetric group $S_n$ containing an $(n-1)$-cycle and a transposition Regexp that matches valid regexps How can you move a document with its version history to a new library? Here's the scenario:  2 document libraries Both contain multiple documents The documents have multiple versions  When I copy a document from library A to Library B using the Content and Structure tool from Site Settings, my versions do not carry over. I'm trying to merge the two document libraries into one, but I want to retain the versions. Do you know of a way to complete this without third party tools or custom code? I've heard suggestions of using Explorer View copy and paste, SharePoint Designer and List Templates, but I'm not sure any of those will carry version info. Modern solution For modern SharePoint experiences, use Move To. Update 4/24/2018: There's a new solution in Office 365. You can now select a file or group of files in the modern experience in OneDrive or SharePoint and select Move to. A file or group of files moved this way will retain version history. Update 6/6/2021: As @KJH mentioned in a comment, you may not see the modern experience unless you . Also, there's more detail now in the Microsoft article . Can I acquire a Windows 8.1 licence by free upgrade from 7 to 10, then downgrading So, I have Windows 7 pro, and I'm looking to upgrade so that I can use some of the apps that are only available in Windows 8+. I considered just taking advantage of the free Windows 10 upgrade, and actually installed it at one point, but then I found out that there's forced automatic updates and decided that wasn't for me(I'm a bit paranoid after Android 4.4.4 killed Flash Player without telling me. :P). So, I did some research.   From what I read, the Windows 10 upgrade "consumes" your Windows 7 license into a Windows 10 license, and so even if you revert back after upgrading then you can still change your mind later and jump back to Windows 10. () I also read that Windows 10 has "downgrade" rights to Windows 8 and Windows 7, which to my understanding meant that if you have a Windows 10 key, you can also use it to install Windows 8 or 7 if you want. ()  My plan for the process is re-upgrade to 10, pull the license key, downgrade to 8 and use the license key, then upgrade to 8.1 via Windows Store, and end up on 8.1. So my questions are: Is this possible?  Will it wipe all my data in the process?(not a dealbreaker if it does, but I'd need to know that so I can back it up) Do I need to re-upgrade to 10 in order to downgrade to 8?  Any input is definitely appreciated. Thanks! Case insensitive 'Contains(string)' I'm playing on a Survival world with cheats on, "easy" difficulty, and at night in-game. I didn't have a sword or anything to make a sword with, and I was starving, so I switched to Creative to give myself a stack of food and a bed to set my spawn point. When I switched back to Survival, I couldn't destroy or place blocks. I'm on single player, and my Internet is fine, and I can destroy blocks still if I switch to creative. I've tried resetting the button one, and reloading the map, and it still doesn't work. I've even tried deleting everything I gave myself in Creative. This happened before on a different world and I ended up deleting it.  This only happens on this world. How do I fix it?  If I know I'm in the correct game mode, what else can cause this?  Are there different causes in multiplayer? '₴' is a currency sign used for the Ukrainian Hryvnia. It's in Unicode since 2004. I want to use it in spreadsheets as a sign for money values, but Google Spreadsheets doesn't understand it as a number if I add it after or before my value in the cell. How do I make Google Spreadsheets understand it's currency and display it as a number in my desired format? How to generate multiple maps where one highlighted attribute changes? I have a layer that contains counties within the state of Washington.    I need to build one map (jpg) for each county.  For that specific map all counties will show as light grey, but the specific county will be green, and the file name will be the county name. What is the difference between standard i386 download and the amd64 download of Ubuntu 11.04? I am currently running the i386 on an amd machine, would my system work better with the amd64 download instead? (my machine was running Windows 7 64bit, but I neglected to look at that prior to installing Ubuntu). Is it possible to use the animals that are summoned using Conjure Animals as mounts?  As an example: Summoning Giant Eagles to carry a group up the mountain or over a wall. Is there a way to get administrative access from Windows Subsystem Linux files to Windows files correctly? How to check if PHP array is associative or sequential? PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array contains only numeric keys? Basically, I want to be able to differentiate between this: $sequentialArray = [     'apple', 'orange', 'tomato', 'carrot' ];  and this: $assocArray = [     'fruit1' =&gt; 'apple',     'fruit2' =&gt; 'orange',     'veg1' =&gt; 'tomato',     'veg2' =&gt; 'carrot' ];