How to sort the second column in descending order? I want to sort my input file on the basis of the 2nd column in descending order. I have used the following command for this:  sort -k2,2nr input.txt &gt; output.txt   However, after running the command i am getting the this output:   ENSG00000273451 2.46335345019054e-05 ENSG00000181374 1.05269640687115e-05 ENSG00000182150 1.01285751909085e-05 ENSG00000283697 1 ENSG00000283463 0.932309672567822 ENSG00000157916 0.845034568173369 ENSG00000268983 0.835243646448564 ENSG00000227251 0.834326032498057 ENSG00000140157 0.833074569385573 ENSG00000134882 0.832993129338477   And the expected output should be  ENSG00000283697 1 ENSG00000283463 0.932309673 ENSG00000157916 0.845034568 ENSG00000268983 0.835243646 ENSG00000227251 0.834326032 ENSG00000140157 0.833074569 ENSG00000134882 0.832993129 ENSG00000273451 2.46E-05 ENSG00000181374 1.05E-05 ENSG00000182150 1.01E-05
How to sort lines by float number I've such a file:  name: xxx --- time: 5.4 seconds name: yyy --- time: 3.2 seconds name: zzz --- time: 6.4 seconds ...   Now I want to sort this file by these float numbers to generate a new file as below:  name: yyy --- time: 3.2 seconds name: xxx --- time: 5.4 seconds name: zzz --- time: 6.4 seconds ...   I've tried the command awk '{print $5}' myfile | sort -g but this will show me ONLY the float numbers.
Is there a word for four times as much, analogous to once, twice, and thrice? Is there a word for 'four times as much', analogous to once, twice, and thrice? The SourceForge signon page says I can associate an OpenID with my existing SourceForge account:    I enter my currently-signed-in SourceForge account password I select the custom OpenID URL and enter https://openid.stackexchange.com I'm redirected to https://openid.stackexchange.com/account/login?&lt;session key bits&gt; I enter my openid.stackexchange.com login information there I get the error message:     Cannot Complete Login      Detected an attempt to send an assertion when the identifier () is not owned by the logged in user.    I don't understand what that means. Why does Loki look "sick" when he first arrives on Earth? In the Avengers movie, why is Loki sweating and weak when he first arrives on Earth, in the SHIELD base? Using the properties panel I can add, with "+"  button, only eight UV maps. Is it possible to have more than 8 of them? Conceptual half-life Question So I have this word problem and I’m a bit confused about it. I have the answer and explanation but I still don’t understand: The half-life of carbon-14 is approximately 5730 years, while the half-life of carbon-12 is essentially infinite. If the ratio of carbon-14 to carbon-12 in a certain sample is 25% less than the normal ratio in nature, how old is the sample?     A. Less than 5730 years      B. Approximately 5730 years      C. Significantly greater than 5730 years, but less than 11460 years      D. Approximately 11460 years  Correct Answer: A Explanation: Because the half-life of carbon-12 is essentially infinite, a 25 percent decrease in the ratio of carbon-14 to carbon-12 means the same as a 25 percent decrease in the amount of carbon-14. If less than half of the carbon-14 has deteriorated, then less than one half-life has elapsed. Therefore, the sample is less than 5730 years old. Be careful with the wording here—the question states that the ratio is 25% less than the ratio in nature, not 25% of the ratio in nature, which would correspond to choice (D). How is the ratio of the carbon isotopes relevant to half-lives? What is the purpose of saying the half-life of an isotope is infinite? What is meant by “the normal ratio in nature”? Just based on the answer, it seems like the question said “25% of a carbon sample decayed, how old is this sample?” Obviously it’s younger than 5,730 years (the time for its first half life) because if only 25% decayed that means half a half-life has passed. I don’t see how isotopes and ratios would change this problem at all. Edit: Every answer here was very informative and helpful. It was tough to pick a best answer. I picked Cosma’s because it clicked with me. If you’re reading this and want to understand radiocarbon dating, look at every answer because there is some useful information in every answer Is there a convergent, alternating series that fails the AST? The alternating series test (AST) says, briefly, that if   $a_k&gt;0$ $a_k \geq a_{k+1}$, and $a_k \to 0$ as $k \to \infty$   then $\sum_k (-1)^k a_k$ converges.  This seems to be a one-way test (that is, if an alternating series fails the test, we don't know that it diverges).   document says so explicitly. It then gives an example of an alternating series which fails the AST. That doesn't prove the series is divergent (but it turns out to be divergent, anyway, by $n$th term test).  Is there a convergent, alternating series that fails the AST?  Of course, if the series fails condition 3, then it also fails the $n$th term test, and must diverge. And if it fails the first condition, then it's not strictly alternating, anyway.  So it must be a series that is not getting smaller (condition 2), but still converges. Landscape figure in LaTeX I have a figure I'm trying to insert which is in landscape and I'm using the following (snipped) code:  \documentclass[12pt, oneside]{book} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lscape} \usepackage{rotating} \usepackage{epstopdf}  \begin{document}  \begin{figure}[ht]     \includegraphics{../figures/pics/DivLibPropProfile}     \caption{Property profile of the diverse library compared to the compound pool.}     \label{fig:PropProf} \end{figure}  \end{document}   When I compile this with pdfLaTeX the output behaves as I'd expect – page in portrait with the caption at the bottom but the figure in the "wrong" orientation.  However when I compile using LaTeX, the page is turned landscape with the figure now in the correct orientation but with the caption at what is now the left of the page rather than under the figure, which you should get using \begin{landscape}.    When I do use the landscape environment and compile with LaTeX the caption the whole page is turned upside-down and everything is wrong.  Any ideas how I can get the correct orientation of landscape figure on landscape page with the caption under the  (attached for reference)?  I also need to use LaTeX rather that pdfLaTeX for another package to function. Role of capacitors in amplifier What is the significance of a coupling capacitor in a common-emitter amplifier? What would happen if it is removed? What will be  the effect on AC amplifier gain on removing it? I have this statement and I need to say if it is true or false:  Let $\{a_n\}$ be a real sequence.  $$\lim_{n\to +\infty} a_n = 0 \quad \implies \quad \sum_{n=1}^{\infty}(-1)^na_n \quad \text{converges}$$  I know, from the Leibniz criterion that:     If $a_n \to 0$, $a_n$ is decreasing and positive then $\sum_{n=1}^{\infty}(-1)^na_n$ converges   From this fact I believe that the statement is false but I couldn't come up with an infinitesimal sequence that isn't decreasing and for that reason is divergent. I tried some function with $sin(\frac{1}{n})$ without any luck. Any help would be very appreciated, thank you! What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools) Java Hashmap: How to get key from value? What is the shortest way to compute the last 3 digits of $17^{256}$? What is the shortest way to compute the last 3 digits of $17^{256}$ ?  My solution: \begin{align} 17^{256} &amp;=289^{128} \\ &amp;=(290 - 1)^{128}\\ &amp;=\binom{128}{0}290^{128} -  ... +\binom{128}{126}290^2 - \binom{128}{127}290 + \binom{128}{128} \end{align}  Computed the last 3 terms whose last 3 digits gave the last 3 digits of $17^{256}$.  Is there any shorter method to do this(which requires much less computation) ? Limit of Multivariate Probability Density Function as one or more or all variables approach positive or negative infinity Could someone point out a good source or provide justification as to whether the limit of a multivariate probability density function, as one or more or all variables tends to positive or negative infinity, goes to zero.  $$\lim_{x_{1}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  $$\lim_{x_{1},x_{2}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  $$\lim_{x_{1},x_{2},...,x_{n}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  I have found this related question for the univariate case: How to convert sshfs command to fstab entry? From another SO , I understand I should create an entry in fstab to permanently mount an access to a virtual machine.  I am not Linux expert. The magic command which allows me to perform this from a terminal is:  sudo sshfs -o idmap=user -o allow_other -o nonempty jverstrynge@devjverstrynge:/home/httpd /home/jverstrynge/httpd   When I check the above SO question, I see an entry looking like this:  /media/mybook/laptop_backup /export/laptop_backup none bind 0 0   Can someone explain how to transform the CLI command into an entry in fstab? Prove the following integral inequality: $\int_{0}^{1}f(g(x))dx\le\int_{0}^{1}f(x)dx+\int_{0}^{1}g(x)dx$ Suppose $f(x)$ and $g(x)$ are continuous function from $[0,1]\rightarrow [0,1]$, and $f$ is monotone increasing, then how to prove the following inequality: $$\int_{0}^{1}f(g(x))dx\le\int_{0}^{1}f(x)dx+\int_{0}^{1}g(x)dx$$ How to export SVG without lines, polylines and polygons? Arriving at a different port of entry in the same state in USA? I am a girl in my early twenties traveling to USA from India and in my visa application I have provided the contact address for a relative in San Francisco, and their invitation letter. I would like to visit LA first. Will I face problems during immigration if I land in LA (with an immediate on wards ticket to SF)? I dont plan to get on the flight from LA to SFO.  Initially I was planning to fly to SFO from India and then fly to LA immediately after completing immigration at SFO airport. I want to add this iostat command to my .bashrc and create an alias for it: iostat -xk 2 $(findmnt -T ~ | awk 'END {print $2}')  I'm adding this to my .bashrc: alias ios='iostat -xk 2 $(findmnt -T ~ | awk 'END {print $2}')'  Unfortunately, it doesn't work. If I run the above iostat command in a terminal it works, but when I run the ios alias it no longer works. And yes, I restart my shell every time. How to disable requiretty for a single command in sudoers? I want to disable requiretty so that I can sudo within scripts, but I'd rather only disable it for a single command rather than everything. Is that possible within the sudoers config? Making overview with linked detailed maps in QGIS? i want to create 4-5 detailed maps, and then an overview map that has rectangles that markes the locations of the detailed maps. Best case would be if the rectangles were links to the detailed map.   I have managed to make the overview and the rectangles, and think I know how to make the detailed maps one by one. The rectangles are drawn manually on the overview map. All layers that I plan on using are in the same QGIS project.  The final product that I hope to create would be the overview map on the first page, followed by the detailed maps. The overview would have links to the detailed maps, click on the rectangles to open the right detailed map.  Is there a way to link the detailed maps to the overview in QGIS 2.8 print composer?  I'm still not sure if I'm doing something wrong, when I try to create the overview. I want it to show the extents of all of my detailed maps.   Is this possible?