I have a scenario where i want to calculate the sum of below data set   V1|V2|V3   "1.1"|"1.2"|"A" "1.1"|"1.2"|"B" "1.1"|"1.2"|"C"   sum of V1 V2 ?  how to that   output :  3.3 3.6
I have a scenario where i want to calculate sum of column   SAL|CAL|TAG|VAL 12.11"|"1.1"|"2.1"|"1.1 13.11"|"1.1"|"2.2"|"2.2 14.11"|"1.1"|"2.4"|"2.4   My below code not giving output giving output as 0.00  I need output for this column CAL VAL  awk -F'|' '{T+=$2} END { printf "%.2f\n", T }' demo.txt   output :  6.7 5.7
"dev/sda1: clean, ..." This message appears after I startup my laptop, then it won't continue booting Computing the $n^{\textrm{th}}$ permutation of bits. I've seen  post about the $n^{\textrm{th}}$ permutation of a set but that is not what I need. If you have a bit string (ones and zeros only) there are  to quickly permute the NEXT lexicographically ordered bit permutation. For example take $$000111 \rightarrow 001011 \rightarrow 001101\rightarrow\cdots$$ etc. If the string is long then there are going to be approximately one Bajillion of these things. And I want to know how to compute the $n^{\textrm{th}}$ guy without doing the exhaust.  Backgound: This is for a parallel computing job where I need to farm out the search space of elements of a set.  Foreground: I own a copy of Knuth's 4th volume of "The Art of Computer Programming" and I think the answer is in there but I can't seem to find it. (It's like 900 pages).  I'm posting here in the hopes that someone has knowledge of this (obviously). Even if you can point me to a source, say the part in Knuth's book where he describes this problem I would be most grateful. How many injective functions $f:[1,...,m]\to{[1,...,n]}$ has no fixed point? $(m\le n)$ Is the sign of principal components meaningless? Ubuntu 15.10 is not in Boot Manager I have a problem with Ubuntu 15.10  I have in my computer windows 10. Some days ago i decided to install Ubuntu in partition so i can have both in the same hard drive. The problem is that i cant get into ubuntu, i dont have the grub up so i always go to Windows in default mode. The only way to go into ubuntu is with the CD of installation, when im on the grub of the cd i press Esc, then i text exit in command lines and i go to a boot manager in which i can choose the ubuntu system. Its a strange think because it is the only way i can get into ubuntu, i will like to solve this problem. I try many tutorials already of solving this problem. I didnt get any solution so i will like to ask u before doing another tutorial. Thank u I'm using Ubuntu 16.04 and there's no fglrx! I'm using Ubuntu 16.04 and there's no fglrx! What happened? Here is a fun integral I am trying to evaluate:  $$\int_{0}^{\infty}\frac{\sin^{2n+1}(x)}{x} \ dx=\frac{\pi \binom{2n}{n}}{2^{2n+1}}.$$  I thought about integrating by parts $2n$ times and then using the binomial theorem for $\sin(x)$, that is, using $\dfrac{e^{ix}-e^{-ix}}{2i}$ form in the binomial series.  But, I am having a rough time getting it set up correctly. Then, again, there is probably a better approach.   $$\frac{1}{(2n)!}\int_{0}^{\infty}\frac{1}{(2i)^{2n}}\sum_{k=0}^{n}(-1)^{2n+1-k}\binom{2n}{k}\frac{d^{2n}}{dx^{2n}}(e^{i(2k-2n-1)x})\frac{dx}{x^{1-2n}}$$  or something like that. I doubt if that is anywhere close, but is my initial idea of using the binomial series for sin valid or is there a better way?.  Thanks everyone. Can you explain Parzen window (kernel) density estimation in layman's terms? Representative point of a cluster with L1 distance The representative point of a cluster or cluster center for the k-means algorithm is the component-wise mean of the points in its cluster. The mean is chosen because it helps to minimize the within cluster variances (which is to say that it is minimizing within cluster squared Euclidean distance, since its the same). Now, when I want to use a different distance metric, like L1 (Manhattan distance), I would be minimizing the within cluster absolute deviations (if I choose to). I was looking at what the centers calculation would be like, because the mean won't reduce the new objective function, and I found this on the Matlab documentation of their kmeans function for the distance parameter     cityblock - Sum of absolute differences, i.e., the L1 distance. Each centroid is the component-wise median of the points in that cluster.   Now, how did they come up with the component-wise median? How does a median minimize absolute deviations? Could someone please tell me what the symbol ringed in red represents?     I know it has ON Switch pointing to it, but the symbol has other lables in different parts of the document. Suppose $f(x)$ is an irreducible polynomial over $\mathbb Z$ of degree $n$. Is it always the case that there exist distinct $x_1,\ldots,x_{2n+1}\in \mathbb Z$ such that $f(x_1),\ldots,f(x_{2n+1})$ are all prime?  So far I've tested a few irreducible polynomials using mathematica, and this has held. The motivation is to use this as a test for irreducibility, as if $f(x)$ is not irreducible then it takes on at most $2n$ prime values, as either factor takes on $1$ or $-1$ at most $2n$ times. (I'd also be interested in learning if this bound can be improved).  This could potentially be expended to other rings of integers, i.e. $\mathbb Z[i]$, but in that case the minimal number of primes needed to certify that $f(x)$ is irreducible would increase as more units appear. Why is ScreenToWorldPoint always giving same coordinates with mouse position? Whenever I use ScreenToWorldPoint(Input.mousePosition) and display the output in console this always gives me the same coordinates. MyCode: Vector3 screenToWorld;  void Update() {     screenToWorld = Camera.main.ScreenToWorldPoint(Input.mousePosition);     Debug.Log(screenToWorld); } Can you 'exit' a loop in PHP? How to layout irregular paragraph shape I have found this in the cover of seminar(one tool to make slide) document.  The final result I have captured below:    The complete document can download .  I wonder how to make this. Is there any easy way? Grub rescue - error: unknown filesystem I have a multiboot system set up. The system has three drives. Multiboot is configured with Windows XP, Windows 7, and Ubuntu - all on the first drive. I had a lot of unpartitioned space left on the drive and was reserving it for adding other OSes and for storing files there in the future.  One day I went ahead and downloaded Partition Wizard and created a logical NTFS partition from within Windows 7, still some unpartitioned space left over. Everything worked fine, until I rebooted the computer a few days later.  Now I'm getting:    error: unknown filesystem.   grub rescue&gt;   First of all I was surprised not to find any kind of help command, by trying:    help, ?, man, --help, -h, bash, cmd, etc.  Now I'm stuck with non-bootable system. I have started researching the issue and finding that people usually recommend to boot to a Live CD and fix the issue from there. Is there a way to fix this issue from within grub rescue without the need for Live CD?  UPDATE  By following the steps from , I was able to boot to initramfs prompt. But not anywhere further than that.  So far from reading the manual on , I was able to see my drives and partitions using ls command. For the first hard drive I see the following: (hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)  I now know that (hd0,msdos6) contains Linux on it, since ls (hd0,msdos6)/ lists directories. Others will give "error: unknown filesystem."  UPDATE 2  After the following commands I am now getting to the boot menu and can boot into Windows 7 and Ubuntu, but upon reboot I have to repeat these steps.    ls ls (hd0,msdos6)/ set root=(hd0,msdos6) ls / set prefix=(hd0,msdos6)/boot/grub insmod /boot/grub/linux.mod normal   UPDATE 3  Thanks Shashank Singh, with your instructions I have simplified my steps to the following. I have learned from you that I can replace msdos6 with just a 6 and that I can just do insmod normal instead of insmod /boot/grub/linux.mod. Now I just need to figure out how to save this settings from within grub itself, without booting into any OS.  set root=(hd0,6) set prefix=(hd0,6)/boot/grub insmod normal normal   UPDATE 4  Well, it seems like it is a requirement to boot into Linux. After booting into Ubuntu I have performed the following steps described in the :  sudo update-grub sudo grub-install /dev/sda   This did not resolve the issue. I still get the grub rescue prompt. What do I need to do to permanently fix it?  I have also learned that drive numbers as in hd0 need to be translated to drive letters as in /dev/sda for some commands. hd1 would be sdb, hd2 would be sdc, and so on. Partitions listed in grub as (hd0,msdos6) would be translated to /dev/sda6.  UPDATE 5  I could not figure out why the following did not fix grub:  sudo update-grub sudo grub-install /dev/sda   So I downloaded  based on an answer from  post. That seemed to do the trick after I picked the "Recommended Repair (repairs most frequent problems)" option. Prove $x^3 + 3 =4y(y+1)$ has no integer solutions Proof by contradiction:  1. Suppose  $x^3 + 3 =4y(y+1)$ has an integer solution   Then  $x^3 + 3 =4y^2+4y$ Then  $x^3 + 3 + 4 = 4y^2 + 4y + 4$ Then $x^3 + 7  = (2y + 2)^2$   Not sure how to simplify it further... I have been trying to solve this problems for hours, but there is no solution in sight.  Until a few weeks ago, my biblatex-apa style was working like a charm. Although, after installing the updates and Biber, the reference section became a problem. It should display a journal article by two authors with a comma after the first author, but it doesn't:     Weber, M. &amp; Ruch, W. (2012). The role of character strengths in adolescent romantic relationships: An initial study on partner selection and mates’ life satisfaction. Journal of adolescence, 35(6), 1537–1546. doi:10.1016/j.adolescence.2012.06.002   it should look like this:     Weber, M., &amp; Ruch, W. (2012). The role of character strengths in adolescent romantic relationships: An initial study on partner selection and mates’ life satisfaction. Journal of adolescence, 35(6), 1537–1546. doi:10.1016/j.adolescence.2012.06.002   This is how my document looks like:   \documentclass[12pt, onecolumn]{apa6}   \usepackage[utf8]{inputenc} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[style= apa, backend=biber]{biblatex} \bibliography{testbib} \DeclareLanguageMapping{american}{american-apa}   \begin{document}  Some text \parencite{Weber2012}.  \printbibliography \end{document}   And the BibTeX file:  @article{Weber2012, abstract = {}, author = {Weber, M. and Ruch, W.}, doi = {10.1016/j.adolescence.2012.06.002}, file = {}, issn = {1095-9254}, journal = {Journal of adolescence}, number = {6}, pages = {1537--1546}, pmid = {22749517}, publisher = {Elsevier Ltd}, title = {{The role of character strengths in adolescent romantic relationships: An initial        study on partner selection and mates' life satisfaction.}}, url = {http://www.ncbi.nlm.nih.gov/pubmed/22749517}, volume = {35}, year = {2012} }    I have tried various things so far, but none of it helped: e.g,   \renewcommand*{\finalnamedelim}{ \finalandcomma}   or  \renewcommand\finalandcomma{\addcomma}   Even in the biblatex manual, the reference examples of two authors is without the comma (it works for three or more authors). There should be a comma, according to . Why is that comma not there? And how could I insert that into my references? How to get a drive formatted with exfat working? In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support? Delete all files to which no corresponding file with another extension exists My goal is to find a Linux command sequence, which deletes some files if a special condition is fulfilled:  All files with the extensions .cut or .cut.bak in the current directory shall be removed, IF there is no file having the same name, but extension .rec or .mpg in the current directory.  Background: I am developing a tool for a Linux-based PVR, that allows cutting of recorded programs. For each recording (extension .rec or .mpg) the segment markers are stored in a .cut-file with the same name. When some recording gets moved/renamed/deleted, then the corresponding cut-file remains orphaned and shall be deleted. I already have implemented the removing of those useless cut-files in C. But I am wondering, whether there may be a (simple) system based solution. In this case it could be run via 'system' and &amp; in the background, which would make my application more responsive...  I already asked a similar question for the recursive case (browsing also into subdirectories), . There has been a (nearly) perfect answer by kos - but unfortunately it removes too many files, so it is not usable, and I was not able to figure it out... But the same idea can be used here, IF it is possible to parse and pipe the result of 'ls' linewise... Crop a big picture into several small size pictures Is there a a way with GIMP editor to crop a big picture into several small equal sized pictures? So when all those small pictures connected in order would make a big picture.