I have two files:  file 1:  a,txt1,v1 b,txt2,v2 c,txt3,v1 d,txt4,v2   file2:  a,txt5,v2 b,txt6,v1 xc,txt7,v1 xd,txt8,v2   I want to refine the files. I only need the lines where the 1st column in file1 has match in file2.   The new file1 should contain:  a,txt1,v1 b,txt2,v2   Similarly, file2 should be refined to contain only lines where there is a match in the 1st column with file1. So file2 should be:  a,txt5,v2 b,txt6,v1
I use Ubuntu 18 and have little experience with Linux commands. I have two files:  file 1:  a,txt1,v1 b,txt2,v2 c,txt3,v1 d,txt4,v2   file2:  a,txt5,v2 b,txt6,v1 c,txt7,v1 d,txt8,v2   I want to print the 1st and 3rd column values where the the 1st column value is identical and the 3rd column value has changed from v1 to v2. So my expected output should be:  a   The second query is for the 3rd column values that has changed from v2 to v1. So my expected outcome:  b
Hypothetically, should I pay off the smaller + higher interest rate loan first, or the larger + higher absolute interest cost? I have this hypothetical situation on my mind and I am not sure which is the best solution. Given:  Loan 1: $340,000 at an interest rate of 1.69% per year Loan 2: $40,000 at an interest rate of  3.6% per year  I have a fixed amount available to pay these, let's say, $1,500 monthly and I can decide how much I want to pay each one (I could pay 750/750, 1000/500, 1500/0 for instance). I do not have a time limit to pay these. My question: What is the optimal way to pay these? What I always heard is: pay the debt that has the highest interest first. This would lead me to a solution: pay loan 2 as fast as possible. But the total amount of interest on 340,000 is higher (in this case, $5780 annually) than the amount over $40,000 (1440, in this case), so, to me, it feels I should pay the Loan 1 first. I would love to run some simulations, but I have no idea how to calculate these things (I don't even have a clue on how to research it). ps: this is really a hypothetical situation, I am not getting such loans without being able to calculate it, don't worry ;) How do I test a private function or a class that has private methods, fields or inner classes? How to add horizontal cylinder at end of cube Does JPA support mapping to sql views? I'm currently using Eclipselink, but I know now days most JPA implementations have been pretty standardized. Is there a native way to map a JPA entity to a view? I am not looking to insert/update, but the question is really how to handle the @Id annotation. Every entity in the JPA world must have an ID field, but many of the views I have created do not conform to this. Is there native support for this in the JPA or do I need to use hacks to get it to work? I've searched a lot and found very little information about doing this. I am aware that, to use a Spell Scroll, you must have the related spell on (at least one of) your spell list(s). Then, if you have the spell slot to cast it, you succeed automatically; else, you must make an ability check in order to cast it (failure resulting in the scroll being wasted).  Consider this example : A Cleric 5 / Wizard 4 finds a Raise Dead Spell Scroll. The spell is on the Cleric List, but is a fifth level spell. Considering that the cleric-wizard has fifth level slots, but can only pick up to third level cleric spells, would he have to make the ability check to successfully cast the Raise Dead in the Spell Scroll, or would he succeed automatically ? When is it a good idea to let an academic department (or a professor) know that I have Asperger's (or ADD)? With Asperger's, the trick is always when to explain it (in a non-awkward situation). I'd like to avoid mentioning it if possible, but it has gotten to the point that I only mention it after committing a major social faux pas, in which case it might be seen as an excuse.  With ADD, this is an issue that happens when people explain things to me. I often don't parse things very well when they're communicated to me verbally since I do have attention lapses. That's the major issue, anyways.   With that said, I do (indirectly) imply that I have both diagnoses on my personal website. How do I create a Java string from the contents of a file? Let $f:\mathbb R \to \mathbb R$ be a continuous function such that $f(f(f(x)))=x,\forall x \in \mathbb R$ , then is it true that $f(x)=x , \forall x \in \mathbb R$ ? I can see that $f$ is bijective , hence strictly monotone . But I cannot progress further . Please help. Thanks in advance I would like to remove selected commit log entries from a linear commit tree, so that the entries do not show in the commit log.  My commit tree looks something like:  R--A--B--C--D--E--HEAD   I would like to remove the B and C entries so that they do not show in the commit log, but changes from A to D should be preserved. Maybe by introducing a single commit, so that B and C become BC and the tree looks like.  R--A--BC--D--E--HEAD   Or, ideally, after A comes D directly. D' representing changes from A to B, B to C and C to D.  R--A--D'--E--HEAD   Is this possible? if yes, how?  This is a fairly new project so has no branches as of now, hence no merges as well. How to detect end of line with sed I'm looking for a way to only execute replacement when the last character is a newline, using sed.  For instance:  lettersAtEndOfLine   is replaced, but this is not:  lettersWithCharacterAfter&amp;   Since sed does not work well with newlines, it is not as simple as  $ sed -E "s/[a-zA-Z]*\n/replace/" file.txt   How can this be accomplished? Suppose $f(x)$ is linear i.e. $f(x + y) = f(x) +f(y) $ and monotone on $[-\infty, +\infty]$, then $f(x) = ax$, a real. Suppose $f(x)$ is linear i.e. $f(x + y) = f(x) +f(y) $ and monotone on $[-\infty, +\infty]$, then $f(x) = ax$, a real.  We know $f(0)=0$, and if one assumes differentiability it is quite easy.      But how does monotone make up for differentiability? Footnotes layout in multicols environment I am using the package multicol to typeset a one-column (spanning the entire text width) heading and a two-column main text block. In order to do so, I begin the multicols environment along with the start of the text block. The one-column heading spans a small fraction of the text height in the front page and I need to set a footnote there, before starting the two-column environment. I'd like to have that footnote typeset under the first column in the two-column running text. How could I possibly do this?   Moreover, I'd like to have the footnotes typeset in a single column under one of the text columns -- I don't even mind having them as two-column footnotes, but what I do not want is a footnotes layout spanning the entire text width. I have tried with the command \twocolumnfootnotes from the class memoir, with the packages ledmac, dblfnote, and even with ftnright (the latter complains about its being used in a single-column document, due to that one-column heading). None has proved useful in this setting. As a less than MWE, just to convey a more concrete depiction of my scenario, let us consider:  \documentclass{memoir}  \usepackage{multicol}  \begin{document}  A single-column heading\footnote{Here I have my footnote.}  \begin{multicols}{2} Here I am in the two-column environment, and I want my footnotes being set in accordance with the document's ``columnwidth''.\footnote{A footnote in the two-column environment.} \end{multicols}   \end{document} Divergent or not series? How tipe are this series?  $$\sum_{n=2}^\infty \frac 1 {n^2\ln n}$$ But $$\sum_{n=2}^\infty \frac 1 {n\ln n\ln(\ln n)}$$ I used Condensation Test, but I stack after that. Thanks! How to disable the "Your site has updated to WordPress x.y.z" admin email? Using the automatic update of my self-hosted WordPress blogs, I configured automatic updates of both the WordPress core as well as WordPress plugins and themes ().  Whenever a core update occurs, I get an email like:     Your site has updated to WordPress 3.9.2      Howdy! Your site at  has been updated automatically   to WordPress 3.9.2.      No further action is needed on your part. For more on version 3.9.2,   see the About WordPress screen:       If you experience any issues or need support, the volunteers in the   WordPress.org support forums may be able to help.         The WordPress Team   I understand that I can  but I would prefer to only disable the above notification.  Therefore my question is:  How to disable update notification emails in WordPress? Is there any formula for number of divisors of $a \times b$? Let $a$ and $b$ be two numbers,    Number of divisors of $a$ is $n_1$; Number of divisors of $b$ is $n_2$;    How to find the number of divisors $N$ of product $a \times b$ by using known number of divisors of factors $n_1$ and $n_2$?  If $a = 20$ and $b = 21$, then $n_1 = 6$ (number of divisors of $a$), $n_2 = 4$ (number of divisors of $b$. Then $a \times b = 420$ and $N = 32$ (number of divisors of $a \times b$).  Is there a formula to find $N$ in terms of $n_1$ and $n_2$? Can negative levels get rid of racial HD? What happens when one is affected by something such as energy drain, and permanently loses levels when one only has racial HD? Does the victim of the spell die? Or do they permanently lose racial HD? Can't install apps from App Store on iPhone with iOS 7 Windows 7 sleeping during operations I've got Windows 7 set up on my media box.  It's set to sleep after 30 mins of inactivity, but it doesn't seem to work as advertised. In the last two weeks it's gone to sleep during a file copy operation and again while encoding an MP4 file.  Is there any way to get Windows to realise that it's actually busy? Prove that $z^2 \equiv ab\pmod p$ is solvable if and only if both or neither of $x^2 \equiv a \pmod p$, $x^2 \equiv b \pmod p$ are solvable. Suppose the $p$ is an odd prime not dividing $ab$.  Prove that $z^2 \equiv ab \pmod p$ is solvable if and only if both or neither of $x^2\equiv a\pmod{p}$ and $x^2 \equiv b \pmod p$ are solvable. Get week of year in JavaScript like in PHP