\begin{tikzpicture}[scale=0.5]         \draw [&lt;-&gt;,thin] (-5,0) - - (5,0) node [right] {$x$};         \draw [&lt;-&gt;,thin] (0,-3) - - (0,3) node [above] {$y$};         \draw[color=blue]   plot (\x,{sin(\x r)})   node[right] {$f(x) = \sin x$};        \draw[color=red]   **plot (\x,{sin(\x r)})**   node[right] {$f(x) = \sin (x+2)$};               \end{tikzpicture}    how can I draw the sin2x!!!!I already draw the sinx!! please help!!!
Trying to plot the sin(x) function, I get this result:    The MWE is here:  \documentclass{standalone} \usepackage{ pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[samples=500]{sin(x)}; \end{axis} \end{tikzpicture} \end{document}   cos(x) looks like an inverted parabola and tan looks just like sin.  I'm using pdflatex and MiKTeX. Any ideas?
Why would I want to install a snap if I can install via apt instead? This is not a duplicate of the following questions     because:  My question specifically states that I am interested in end-user experience, not ease or efficiency of development, which is what the other question largely refers to.  As has been noted, development/deployment affects end-user experience, but it is not all there is to it, and neither of the referenced questions address issues that directly impact an end-user's ability to use the application (e.g. trouble accessing data on other partitions, sluggishness, etc.) Maybe &quot;compelling&quot; wasn't the right word to use; my intent was to ask about real-world, experiential consequences, i.e., things that happen or  don't happen, as opposed to theoretical/architectural statements that, while presumably accurate, don't appear to be backed up with any real-world examples to support the statement. I should have stated more directly that my intention was to get answers that consider the balance of &quot;advantages&quot; to snaps against the real-world downsides experienced by end-users. The &quot;duplicate&quot; question is largely theoretical, and doesn't discuss end-user experience at all. The &quot;duplicate&quot; question makes no mention of anything remotely similar to the example I used here, i.e., that there is an end-user downside to snaps (in this case, lack of access to data on other partitions and snap app performance) that isn't discussed in any available documentation that I can find.   While I understand that snap has a big advantage in making apps more widely available, is there any compelling reason to choose snap over apt, if the app is available for my distro/version via an apt package? I am curious because I've been doing some reading about snaps, and all the excitement about the method seems to be about things that are advantageous for app developers, but I've seen virtually nothing on how this makes life easier for end users (aside from the obvious; that they may be able to install apps that aren't otherwise available on their distro/version). I installed snapd and installed a couple of snaps and was really frustrated and disappointed.  The snap apps are slow and it's difficult, if not impossible, to access files on other partitions from within the snap. While I've seen plenty of info that says snaps are &quot;faster,&quot; &quot;easier,&quot; &quot;safer,&quot; etc., I haven't been able to find anything that explains why or how this is actually the case. Being very new to Linux, I am wondering if maybe I'm just missing something obvious? To be clear, I understand why the technology might be useful overall, but I can't find anything that explains whether/why it is a better option even when the app in question is available for install via a more traditional method, and all dependencies are met. Proving normality of affine schemes One of the exercises in Ravi Vakil's algebraic geometry notes, Ex. $5.4.$I(b), is to show that    $$ \operatorname{Spec}\left(k[x_1, \ldots, x_n]/(x_1^2 + \cdots + x_m^2)\right) $$   is normal, where $k$ is any field of $\operatorname{char}(k)\neq 2$, and $n \geq m \geq 3$.    I have absolutely no idea how to get started on this. Is there anyone that could give a hint as to how one would approach this problem? Why is it possible to get significant F statistic (p<.001) but non-significant regressor t-tests? In a multiple linear regression, why is it possible to have a highly significant F statistic (p&lt;.001) but have very high p-values on all the regressor's t tests?  In my model, there are 10 regressors. One has a p-value of 0.1 and the rest are above 0.9    For dealing with this problem see the . What is the difference between "owing to" and "due to"? Every Artinian ring is isomorphic to a direct product of Artinian local rings Proposition. Let $R$ be commutative ring with $1_R$. We assume that $R$ is an Artinian ring and $M_1,\dots,M_n$ its maximal ideals. Then         $R/\mathrm{Jac}(R)\cong (R/M_1)\times \dotsb \times (R/M_n)$.   The ring $R$ is isomorphic to the direct product of a finite number of Artinian local rings.      Proof. 1. It's obvious that $M_i+M_j=R,\ \forall 1\leq i \neq j \leq n$. So, from Chinese Remainder Theorem, we have  $$R/\bigcap_{i=1}^{n}M_i = R/\mathrm{Jac}(R) \cong (R/M_1)\times \dotsb \times (R/M_n),$$ as we wanted.    Since $R$ is an Artinian ring, we have $\mathrm{Jac}(R)^m=\{0_R\}$, for some $m\in \Bbb Z^+$. But,  $$\{0_R\}\subseteq M_1^m\dotsb M_n^m=(M_1\dotsb M_n)^m\subseteq (\bigcap_{i=1}^{n}M_i=\mathrm{Jac}(R))^m=\{0_R\}.$$ So, if we apply CRT we will take  $$R\cong R/\{0_R\}\cong R/M_1^m\dotsb M_n^m\cong (R/M_1^m)\times \dots \times (R/M_n^m).$$   Questions.   1) Are these thoughts complete and correct?  2) Why $R/M_i^m$ are artinian local rings?  3) Could you please elaborate some examples as an application? Show *realtime* mouse cursor coordinates? (Cursor mod / overlay) Also, copy to clipboard? I'm looking for a solution that would display the current mouse cursor coordinates in realtime (i.e. NOT xdotool and NOT xev).  I need to move the mouse to a certain position, then press Alt-Tab to flip to another window and record the coordinates there. (This would not move the mouse, so the coordinate display would stay the same).  There's a Windows program that works BEAUTIFULLY for this purpose -   ...but it doesn't even start up in Wine.  Alternately, instead of displaying the coordinates, if this solution could copy the coordinates (in XXX,YYY format) to the clipboard, upon pressing a hotkey, that would be even better.  Any suggestions would be much appreciated!  P.S. I'm running Ubuntu 12.04 LTS. "Was going to" versus "would be" as the past tense of "will" Do you think that "was going to be" or "would be" could be used as past tense of will?     I thought this book was going to be your choice.        I thought this book would be your choice.   Do these two sentences basically mean the same thing or are they slightly different? I have embedded a Python interpreter in a C program.  Suppose the C program reads some bytes from a file into a char array and learns (somehow) that the bytes represent text with a certain encoding (e.g., ISO 8859-1, Windows-1252, or UTF-8).  How do I decode the contents of this char array into a Python string?  The Python string should in general be of type unicode—for instance, a 0x93 in Windows-1252 encoded input becomes a u'\u0201c'.  I have attempted to use PyString_Decode, but it always fails when there are non-ASCII characters in the string.  Here is an example that fails:  #include &lt;Python.h&gt; #include &lt;stdio.h&gt;  int main(int argc, char *argv[]) {      char c_string[] = { (char)0x93, 0 };      PyObject *py_string;       Py_Initialize();       py_string = PyString_Decode(c_string, 1, "windows_1252", "replace");      if (!py_string) {           PyErr_Print();           return 1;      }      return 0; }   The error message is UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 0: ordinal not in range(128), which indicates that the ascii encoding is used even though we specify windows_1252 in the call to PyString_Decode.  The following code works around the problem by using PyString_FromString to create a Python string of the undecoded bytes, then calling its decode method:  #include &lt;Python.h&gt; #include &lt;stdio.h&gt;  int main(int argc, char *argv[]) {      char c_string[] = { (char)0x93, 0 };      PyObject *raw, *decoded;       Py_Initialize();       raw = PyString_FromString(c_string);      printf("Undecoded: ");      PyObject_Print(raw, stdout, 0);      printf("\n");      decoded = PyObject_CallMethod(raw, "decode", "s", "windows_1252");      Py_DECREF(raw);      printf("Decoded: ");      PyObject_Print(decoded, stdout, 0);      printf("\n");      return 0; } Prove or give a counterexample:  $$(A ∪ B = A ∪ C) \land (A ∩ B = A ∩ C) \implies B = C.$$  I think this is true, but I am not sure how to show it. I don't know if there are any manipulations with unions and intersections that allows me to move things around. Thanks in advance for any hints. "find: missing argument to `-exec'" when using "-exec rm -f {}\" Sequence Limit Problem: If $0 \leq x_{m+n} \leq x_n + x_m$ then limit of $x_n/n$ exists Changing internal URL path for SEO I have a site where Google has already indexed about 1 million pages, and I want to change all the URL paths for SEO purposes, ensuring that we always have our keywords in the path.  Technically I know how to complete it (301 redirects, new canonical URL, update sitemap, etc.) but I'm wondering if Google will penalize the site because of it, or if links will disappear from search results until they are re-crawled? Return a blank when cell reference is blank I am using the following formula in a Google Sheets to calculate the number of days between two dates (dates are in columns G and AL):  =ARRAYFORMULA(if(row(A:A)=1, "Readmission Days", (G:G)-(AL:AL)))   It has to be an array because I am working with a Google Forms and entries are automatically populated into new rows.  The problem is that some of the cells in col AL are blank, so the formula is reading those dates as something else and returning a very large number. Also, when both cells are blank, the formula returns a 0, messing up my data.  How can I include something to ignore blank cells or just return a blank when one or both cell references is blank? Jutifying: irrational + rational = irrational I am not sure how to show this. This is what I tried.   Proposition: If x is rational number and y is an irrational number then x+y is an irrational number.  Logically speaking this is  P=x is rational  Q= Y is irrational  R= x+y is irrational  $P\wedge Q \rightarrow R$  Explanation: What I did  $x=\frac{p}{q}$ P and Q integer  Y cannot be written as the a rational by definition  So therefore  $x+y=\frac{p}{q}+y$  Will not be a rational number as there cannot be a common denominator. Mesh generation from PointCloud? The figure bleow is the pointcloud imported as .ply file into blender.   However, I would like to perform triangulation on it to produce the surface as seen in picture below(Accomplished using ballpivoting surface reconstruction and poisson disk sampling in MeshLab).   Is there a way to perform triangulation on belnder.  (PS: The purpose is to be able to select each faces/vertices individually to automate further.)  Edit: Question: Is it possible to select the vertex/faces programmatically post triangulation? if so, please explain how? I'm studying measure theory and two question came to my mind:        If $f:\mathbb{R}\to\mathbb{R}$ is monotone and $B\subseteq\mathbb{R}$ is borel, is the image $f(B)$ borel?   If $f:\mathbb{R}\to\mathbb{R}$ is a monotone function (say, non-decreasing), does there exist a sequence of continuous functions $f_n:\mathbb{R}\to\mathbb{R}$ converging pointwise to $f$?      Here's the motivation for those questions: Let $(X,M)$ and $(Y,N)$ be measure spaces.   It's known that if $\mu$ is a measure on $(X,M)$ and $f:X\to Y$ is measure, then we have the pushforward measure $f_*\mu(A)=\mu(f^{-1}(A))$ on $(Y,N)$. What if we were to define a "pullback measure"? Given a function $f:X\to Y$ such that $f(M)\subseteq N$ (i.e. $f$ maps measurable sets to measurable sets) and a measure $\nu$ on $N$, the natural formula would be $f^*\nu(A)=\nu(f(A))$. So we ask if is there a good amount of functions which map measurable sets to measurable sets in $\mathbb{R}$, and monotone functions seem like good candidates (for strictly monotone, continuous functions, the result is valid and there are several answers on the web). If this were true, maybe we could use some convergence argument to solve the problem above. How can you get the permalink for an answer to a question? I wanted to link to an answer to a Stack Overflow question, but couldn't find a way to do it. I couldn't get the ID of the answer in order to create the link.  How can you get the permalink for an answer to a question? Did the verb “fire a weapon” exist before the actual introduction of firearms on battlefields?  More specifically, does it make sense for a creative work to have archers (or whatever ranged weaponry) be told to “fire!”, when the world they live in has not yet seen firearms?  It seems some kind of an anachronism to me, since before firearms, “fire” would never propel any projectile...  I've seen several movies do it; I can't remember them all, but for instance I verified it in The Lord of the Rings trilogy (left), Kingdom of Heaven (top right), and more recently Frozen (bottom right):    The first two do it several times (with Kingdom of Heaven also using it on ballistae, and The Return of the King even having Aragorn ask Legolas to ), whereas firearms never appear on the battlefields they feature (Kingdom of Heaven is set in the 12th century; as for The Lord of the Rings, apart from one occurrence of a witchcraft-ish bomb, it's archery and medieval siege engines all the way).  Frozen may be debatable, happening probably somewhere in the 18th or 19th century, but since we only see swords, spears and the like, it made me flinch to hear crossbowmen use “fire!”.  I've also noticed other movies avoiding this, using “loose!” instead, such as Troy (left) and Gladiator (right):    This makes me think it would be the right thing to say instead... although I'm still wondering why not use “shoot”, which seems simpler to me. I have proved in earlier exercises of this book that $\sqrt 2$ and $\sqrt 3$ are irrational. Then, the sum of two irrational numbers is an irrational number. Thus, $\sqrt 2 + \sqrt 3$ is irrational. My first question is, is this reasoning correct?  Secondly, the book wants me to use the fact that if $n$ is an integer that is not a perfect square, then $\sqrt n$ is irrational. This means that $\sqrt 6$ is irrational. How are we to use this fact? Can we reason as follows:  $\sqrt 6$ is irrational  $\Rightarrow \sqrt{2 \cdot 3}$ is irrational.  $\Rightarrow \sqrt 2 \cdot \sqrt 3$ is irrational  $\Rightarrow \sqrt 2$ or $\sqrt 3$ or both are irrational.  $\Rightarrow \sqrt 2 + \sqrt 3$ is irrational.  Is this way of reasoning correct? is it possible to create this kind of material with the standard textures? The Voronoi texture (set to cells) is coming close but I don’t know if it is possible to a) set the single cells apart from each other and b) to give them seperate colors.