How do I delete the last n lines of an ascii file using shell commands?
Is there a way to head/tail a document and get the reverse output; because you don't know how many lines there are in a document?  I.e. I just want to get everything but the first 2 lines of foo.txt to append to another document.
I am trying to define an rgb color. More specifically I want to create this color    which in rgb mode it's (98,190,177).  I tried to define this color using the following code  \documentclass{standalone}  \usepackage{tikz}  \begin{document}  \definecolor{tank}{rgb}{0.098,0.190,0.177}  %\definecolor{tank}{rgb}{98,190,177}  \begin{tikzpicture}   \coordinate (tank) at (0,0);   \draw[red, fill=tank] (-2,0.5)--(-0.5,1)--(0.5,1)--(2,0.5)--(2,-0.5)--(0.5,-1)--(-0.5,-1)--(-2,-0.5)--cycle;  \end{tikzpicture} \end{document}   but the output is totally different from what I am trying to achieve    I also tried to use \definecolor{tank}{rgb}{98,190,177} but I get no color at all. How to properly define an rgb color? Efficiently reverse the order of the words (not characters) in an array of characters My 2nd great-grandmother, Margaret Elizabeth Armegust or Arbingast, was born 22 Sept 1837 in Ohio and died 24 July 1929 at the Richmond State Hospital, Wayne, Indiana, United States.  She lived for a time in Sparta, Noble, Indiana and Stock, Harrison, Ohio. She was married to John B. Miller on 22 Oct 1859 in Noble and they had at least five children: James, Samuel, Elias, Julia, and John.  I am searching for records from the State Hospital to learn of her diagnosis and treatment. How do I figure out if someone is a first cousin, second cousin, cousin once-removed, etc? Where can I get the original Unix? Where can I get the original Unix (from the year 1969)? I would like to look at the source code of the original Unix. Choosing variables to include in a multiple linear regression model "NG NS" on ticket after airport security I went through security at the Sacramento Airport with a friend. He got something written on his boarding pass "NG NS". I didn't have that. We both went through the same metal detector, neither beeped nor had random checks. Flying to Edmonton through Seattle connection. Early for flight.  I have tried searching for "what is tsa ng ns" on Google but nothing useful came up. Any ideas? what is the total number of distinct arrangements of $n$ oranges and $n$ apples around a round table? I have no idea how to go about. I was trying to do some of these questions to check my understanding about the topic, but I'm not sure if they're correct. Here are my answers.   1) Suppose $f$ is continuous on $[0,1]$. Must there be a nondegenerate closed subinterval $[a,b]$ of $[0,1]$ for which the restriction of $f$ to $[a,b]$ is of bounded variation?   No, because $f(x)$ might be a constant function. In this case, $f(x)$ will not be the difference of two increasing functions...and so will not be of bounded variation.  2) Let $f$ be the Dirichlet function, the characteristic function of the rationals in $[0,1]$. Is $f$ of bounded variation on $[0,1]$?   No, because we cannot express it as the difference of two increasing functions.  3) Let $f$ be a step function on $[a,b]$. Find a formula for its total variation.  If we partition $[a,b]$ in such a way that for each $[x_{i-1}, x_i]$ (which is part of the partition), $x_{i-1}$ and $x_i$ each correspond to the midpoint of a step. I know this is not a formal answer, but I'm just trying to check my understanding. Is there a word for two persons dodging each other on the street? Prove that for all non-negative integers $m,n$, $\frac{(2m)!(2n)!}{m!n!(m + n)!}$ is an integer. Prove that for all non-negative integers $m,n$, $\frac{(2m)!(2n)!}{m!n!(m + n)!}$ is an integer.   I'm not familiar to factorial and I don't have much idea, can someone show me how to prove this? Thank you. Integer squares of the form $x^4+x^3+x^2+x+1$ I want to solve ${y^2}=x^4+x^3+x^2+x+1$ in $\mathbb{Z}$.    I can find four solutions. Is there another solution? I know that there are six solutions. $$(-1, \pm 1)\;,\;(0, \pm 1).$$  My try: \begin{align}   &amp; x^4+x^3+x^2+x+1=0\quad \Rightarrow \underbrace{\left( x+\frac{1}{x} \right)^2}_{t^2}+\underbrace{\left( x+\frac{1}{x} \right)}_{t}-1=0\,\Rightarrow t\notin \mathbb{Z} \\   &amp; x^4+x^3+x^2+x+1={\pm 1}^2\quad\Rightarrow \,x=-1\,\,,\,x=0.\\  \end{align}   Thanks. Getting a FILE* from a std::fstream Is there a (cross-platform) way to get a C FILE* handle from a C++ std::fstream ?  The reason I ask is because my C++ library accepts fstreams and in one particular function I'd like to use a C library that accepts a FILE*. I found "A sledgehammer to crack a nut" as one example. What are some others? Can I visit other Schengen countries on a long-term Schengen visa or residency permit? Python/Matplotlib - Is there a way to make a discontinuous axis? relative polar coordinates for TikZ elements in axis environment I would like to annotate a patch plot with lines whose start and end points are given in absolute polar and relative polar coordinates, respectively.  The patch plot, based on cartesian data, comes out as a circular shape centred around the origin (0,0) and shall be simulated here by a plain circle.  Lines should start at the circumference of the shape and point away from the shape under a given angle and have a well defined length. Therefore, the use of relative polar coordinates for the line's end point.  What seems to be straightforward with TikZ (left) fails inside the axis environment of pgfplots (right): neither the inclination angle nor the length of the line are correct if relative polar coordinates are used.    What is wrong with the rel. polar coordinates here?  The code:  \documentclass{standalone}  \usepackage{pgfplots} \pgfplotsset{compat=1.13}  \begin{document}  \begin{tikzpicture}   \draw(0,0) circle[radius=0.01];   \draw[blue] (0,0) circle[radius=1];   \draw[thick] (45:1) -- ++(45:0.5); \end{tikzpicture}  \begin{tikzpicture}   \begin{axis}[tiny,enlargelimits,   axis equal,   xmin=-2,xmax=2,   ymin=-1,ymax=1,   xtick={-2,-1,0,1,2},   ytick={-2,-1,0,1,2},   grid=major,   ]   \draw[blue] (0,0) circle[radius=1];   \draw[blue, dashdotted] (0,0) -- (45:2);   \draw[thick] (45:1) -- ++(45:0.5); %  \draw[thick] (45:1) -- (45:1.5); %absolute coordinates do work   \end{axis} \end{tikzpicture}  \end{document} Some mesh-edges in object-mode aren't displayed So I have been extruding a cube to make a low poly banana and when I go from edit to object mode half the edges don't appear as well as half is dark.      I tried looking for an solution couldn't find one and its making me feel like I am doing something wrong so I decided to come here. Is it possible to have the dock in different positions in different desktop? Is it possible to have the dock in different positions in different desktops? In particular I'd like to change the settings between a normal desktop and a desktop where there's an app at full screen. In this way I'd keep the dock in lower side of the desktop when there's an app at full screen and vertically on the left side during normal use.  I have this problem that, sicne I usually have the dock vertically on the left, it pops out everytime i go to the far left in an app I'm using with full screen, and using this app I have to move the mouse to the left quite often. What is $n!$ when $n=0$?