I am confused a little bit. I would like to swap 2 directory in the apache2 config files with the sed program.  APACHE_CONF=/etc/apache2/apache2.conf FULL_DIR=/home/$USER/new DEFAULT_DIR=/var/www/html`   This works fine:  sudo sed -i.bak 's|'$DEFAULT_DIR'|'$FULL_DIR'|' "$APACHE_CONF"   These are not (these don't have error, just do nothing):  sudo sed -i.bak 's/"$DEFAULT_DIR"/"$FULL_DIR"/' "$APACHE_CONF" sudo sed -i.bak 's/\"$DEFAULT_DIR"/\"$FULL_DIR"/' "$APACHE_CONF"   Can anybody explain why don't these work and why does the first one work?
I often see tutorials on the web or posts on this site which make heavy use of the following characters at the command line. Often it seems that they are used for pretty similar purposes. What are the differences between them when used on the command line or for shell programming? For what purpose do I use which of them?  " " double quotes  ' ' single quotes  ` ` backticks
$n$ Lines in the Plane How am I to "[u]se induction to show that $n$ straight lines in the plane divide the plane into $\frac{n^2+n+2}{2}$ regions"? It is assumed here that no two lines are parallel and that no three lines have a common point. Further, this is not a non-Euclidean problem, but I wouldn't mind a discussion on the non-Euclidean nature of the problem.  I was thinking it might be easier to show using the unit sphere.    A GOOD REFERENCE I FOUND THAT WILL BE USEFUL TO ANYONE COMING ACROSS THIS PROBLEM IS Concrete Mathematics, Graham, Knuth, Patashnik pp. 4–8. How can a module detect when the "access denied" page is output? How is it possible for a module to detect when Drupal is outputting the "access denied" page? I know how to do it with Drupal 6; I need to know how to do it with Drupal 7. Draw a vertical line over the entries of a column in an array I'd like to draw vertical/horizontal lines over the entries of a column/row in an array. I find the method to draw horizontal lines at . But when I used the same way to draw the vertical lines. It didn't look well. My codes are:  \usepackage{tikz} \usetikzlibrary{calc} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};} \newcommand{\DrawLine}[3][]{% \begin{tikzpicture}[overlay,remember picture]     \draw [#1] ($(#2)+(0,0.6ex)$) -- ($(#3)+(0,0.6ex)$); \end{tikzpicture}% }%  \begin{displaymath} \left[ \begin{array}{cccc} \tikzmark{11}{15} &amp; 0 &amp; \tikzmark{13}{0} &amp;0\tikzmark{14} \\ 0 &amp; 50 &amp; 20 &amp; 25 \\ 35 &amp; 5 &amp; 0 &amp; 10\\ \tikzmark{41}{0} &amp; 65 &amp; \tikzmark{43}{50} &amp; 65 \end{array} \right]. \DrawLine[black,thick]{11}{14} \DrawLine[black,thick]{11}{41} \DrawLine[black,thick]{13}{43} \end{displaymath}   The result looks like     But the result I want is     Does anyone know how to fix this? Thank you. I am having trouble getting a basic example of a matrix of notes to show up in my beamer presentation. I am using the code copied from the pgf manual. Here is a complete working example. The error I get upon compilation is:  "Package pgfbasematrix Error: Single ampersand used with wrong catcode."  \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,petri,positioning,matrix}  \begin{document}  \begin{frame}  \begin{tikzpicture} \matrix (magic) [matrix of nodes] { 8 &amp; 1 &amp; 6 \\ 3 &amp; 5 &amp; 7 \\ 4 &amp; 9 &amp; 2 \\ }; \draw[thick,red,-&gt;] (magic-1-1) |- (magic-2-3); \end{tikzpicture}  \end{frame} \end{document} How does water evaporate if it doesn't boil? When the sun is out after a rain, I can see what appears to be steam rising off a wooden bridge nearby. I'm pretty sure this is water turning into a gas.  However, I thought water had to reach 100 degrees C to be able to turn into a gas.  Is there an edge case, for small amounts of water perhaps, that allows it to evaporate? I am fascinated by the way the CLR and GC works (I'm working on expanding my knowledge on this by reading CLR via C#, Jon Skeet's books/posts, and more).  Anyway, what is the difference between saying:  MyClass myclass = new MyClass(); myclass = null;   Or, by making MyClass implement IDisposable and a destructor and calling Dispose()?  Also, if I have a code block with a using statement (eg below), if I step through the code and exit the using block, is the object disposed of then or when a garbage collection occurs? What would happen if I call Dispose() in the using block anyay?  using (MyDisposableObj mydispobj = new MyDisposableObj()) {  }   Stream classes (eg BinaryWriter) have a Finalize method? Why would I want to use that? Are there any rules on the positioning adverbs should take in a sentence? Let $f(z)$ be an entire function whose real part is bounded by a polynomial in $|z|$. Does it follow that $f(z)$ is a polynomial?  Or, without loss of generality and more suggestively $$(f(z)=\sum_{k=0}^\infty a_k z^k \quad \land \quad \operatorname{Re}(f(z))\leq |z|^n)\quad \forall z\in \mathbb{C} \qquad \Rightarrow \qquad f(z)=\sum_{k=0}^n a_k z^k \quad\forall z\in \mathbb{C}$$ Show that if $\sqrt{a}+\sqrt{b}\neq 0$, then $\mathbb{Q}(\sqrt{a}+\sqrt{b}) = \mathbb{Q}(\sqrt{a},\sqrt{b}), \forall a,b\in\mathbb{Q}$ Show that if $\sqrt{a}+\sqrt{b}\neq 0$, then   $\mathbb{Q}(\sqrt{a}+\sqrt{b}) = \mathbb{Q}(\sqrt{a},\sqrt{b}),  \forall a,b\in\mathbb{Q}$   It has something to do with $\sqrt{a} = -\sqrt{b}\implies a^2 = b^2$  The inclusion $\mathbb{Q}(\sqrt{a}+\sqrt{b})\subseteq \mathbb{Q}(\sqrt{a},\sqrt{b})$ is obvious  Now take $x\in \mathbb{Q}(\sqrt{a},\sqrt{b})$, that is: $x = c + d\sqrt{a} + e\sqrt{b} + f\sqrt{ab}$. I need to show that this is in $\mathbb{Q}(\sqrt{a}+\sqrt{b})$, that is, $x = g + h\sqrt{a} + i\sqrt{b}$, but I can't get that $\sqrt{ab}$ removed I'm stuck in a teleporting loop. What can I do? Why is it bad practice to test for item names? I've heard that testing for item names and lores in Minecraft JE is bad practice. For example, the following commands are not good: execute if entity @e[nbt={Inventory:[{tag:{display:{Name:'[{&quot;text&quot;:&quot;Test Thing&quot;}]'}}}]}] clear @p minecraft:diamond{display:{Name:'{&quot;text&quot;:&quot;Shiny…&quot;}'}} 0 clear @p minecraft:netherite_sword{display:{Lore:['{&quot;text&quot;:&quot;A Mysterious Sword&quot;}']}} 0  Why are these commands considered bad practice? Are they prone to failure and may not work? And what can I do to fix them? Note that this only applies to reading item names, not setting them. The following are not considered bad practice and in fact are the only ways to accomplish these tasks: give @p minecraft:diamond{display:{Name:'{&quot;text&quot;:&quot;Shiny…&quot;}'}} replaceitem @p weapon.mainhand minecraft:netherite_sword{display:{Lore:['{&quot;text&quot;:&quot;A Mysterious Sword&quot;}']}} Dictionary for TeXstudio: “No dictionary Available” I have trouble spell checking my document in TeXstudio. When I press spellcheck, I get the error No dictionary Available. Am I supposed to install a dictionary separately? How? Any suggestion? I understand when we say current, we mean charge (protons/electrons) passing past a point per second. And the charges have energy due to the e.m.f. of the power supply.  Now tell me, if a lamp has resistance and you hook it in the circuit, how will the current stay the same? The charges obviously lose energy in the lamp and so become SLOWER, which should mean current decreases, right?  [Edit] All answers explained a bit of everything, so it was hard to choose one. If YOU are looking for an answer, please check the others too, in case the accepted one doesn't answer your question. I have a 3TB Seagate Backup Plus Desktop USB 3.0 drive, which works fine when in its enclosure, but when I get it off its enclosure and directly plug it as an internal SATA drive, it's just not properly recognized (it works again when used in the enclosure). My systems’s motherboard is an , which has two SATA 6.0 Gb/s and four SATA 3.0 Gb/s ports.  When used as an internal SATA drive Windows 7 asks if I want to format the drive, as if it didn’t have a proper filesystem, and if I use the DISKMGMT.MSC tool (typing that in the start menu) I get completely wrong information about the drive.  It says the drive has 3 partitions (349,31GB of RAW data and two unassigned partitions of 1698,68GB and 746,52GB). This information is plain wrong, since the drive, when used in the USB enclosure, works as a single NTFS partition (2794,52GB). How come it’s shown as 3 partitions without filesystem when connected through SATA?!  Is Seagate using some proprietary way of storing the data when using the drive in its provided USB 3.0 enclosure? I didn’t use any kind of encryption. I just plugged the drive with USB 3.0 and started using it straight away, since it apparently came pre-formatted with an NTFS filesystem. Apport-gpu-error-intel.py crash How do I sudo a command in a script without being asked for a password? Java Generics: List, List, List Can someone explained, as detailed as possible, the differences between the following types?  List List&lt;Object&gt; List&lt;?&gt;   Let me make this more specific. When would I want to use  // 1  public void CanYouGiveMeAnAnswer(List l) { }  // 2 public void CanYouGiveMeAnAnswer(List&lt;Object&gt; l) { }  // 3 public void CanYouGiveMeAnAnswer(List&lt;?&gt; l) { } Combinatorics That Looks Similar to Vandermonde's Identity How to call a function on a directive scope from the controller Is a small size block cipher usable? Consider a block cipher with a key of size 128 bits but a small block size, say 32 bits.  Is this kind of block cipher secure?  I would like to know to what extent I can use a small block cipher, like a 32 bit block cipher. What are the constraints so that the use is acceptable in a real life application.  For instance, if we use a one-time key, that is, to encrypt only one message. Besides, the message could be small.  Suppose that when we want so send one file, we perform a key agreement so that we use the key for one message. This scenario is not efficient, but the CPA find-then-guess game is not adequate in this case.