On sharelatex.com the Russian em dash works fine in document body, but does not work when used in macros. I tried to ask the support, they sent me here.    Code:  \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} \usepackage[russian]{babel} \pagestyle{empty}  \def\foo{ qwe "--- rty }  \begin{document}  \foo  asd "--- fgh  \end{document}   Result:
The package babel with the ngerman option (and most other languages as well, but not english) provides the shorthand "|, which prevents a ligature at the given position (see p. 81 of the , e.g. Auf"|lage will result in the word Auflage without an fl-ligature (as is desired because, in German, you don't want ligatures across morpheme borders).  However, when placed in a macro, "| doesn't work anymore. Why is this and how can I circumvent it?  \documentclass{article}  %\usepackage[T1]{fontenc}% doesn't help \usepackage[ngerman]{babel}  \newcommand{\foo}{"|}  \begin{document}  ff  f"|f  f\foo f  \end{document}
Gradient descent and many other methods are useful for finding local minima in cost functions. They can be efficient when the cost function can be evaluated quickly at each point, whether numerically or analytically.    I have what appears to me to be an unusual situation. Each evaluation of my cost function is expensive. I am attempting to find a set of parameters that minimize a 3D surface against ground truth surfaces. Whenever I change a parameter, I need to run the algorithm against the entire sample cohort to measure its effect.  In order to calculate a gradient, I need to change all 15 parameters independently, meaning I have to regenerate all the surfaces and compare against the sample cohort way too many times per gradient, and definitely way too many times over the course of optimization.  I have developed a method to circumvent this problem and am currently evaluating it, but I am surprised that I have not found much in the literature regarding expensive cost function evaluations.  This makes me wonder if I am making the problem harder than it is and that there might be a better way already available.  So my questions are basically this: Does anyone know of methods for optimizing cost functions, convex or not, when evaluation is slow?  Or, am I doing something silly in the first place by rerunning the algorithm and comparing against the sample cohort so many times? Finding Value of the Infinite Product $\prod \Bigl(1-\frac{1}{n^{2}}\Bigr)$ While trying some problems along with my friends we had difficulty in this question.   True or False: The value of the infinite product $$\prod\limits_{n=2}^{\infty} \biggl(1-\frac{1}{n^{2}}\biggr)$$ is $1$.   I couldn't do it and my friend justified it by saying that since the terms in the product have values less than $1$, so the value of the product can never be $1$. I don't know whether this justification is correct or not. But i referred to Tom Apostol's Mathematical Analysis book and found a theorem which states, that    The infinite product $\prod(1-a_{n})$ converges if the series $\sum a_{n}$ converges.   This assures that the above product converges. Could anyone help me in finding out where it converges to? And,   Does there exist a function $f$ in $\mathbb{N}$ ( like $n^{2}$, $n^{3}$) such that $\displaystyle \prod\limits_{n=1}^{\infty} \Bigl(1-\frac{1}{f(n)}\Bigr)$ has the value $1$? Background  Suppose we have an Ordinary Least Squares model where we have $k$ coefficients in our regression model, $$\mathbf{y}=\mathbf{X}\mathbf{\beta} + \mathbf{\epsilon}$$  where $\mathbf{\beta}$ is an $(k\times1)$ vector of coefficients, $\mathbf{X}$ is the design matrix defined by  $$\mathbf{X} = \begin{pmatrix} 1 &amp; x_{11} &amp; x_{12} &amp; \dots &amp; x_{1\;(k-1)} \\ 1 &amp; x_{21} &amp; \dots  &amp;       &amp;   \vdots \\ \vdots &amp;   &amp; \ddots &amp;       &amp;   \vdots \\ 1 &amp; x_{n1} &amp; \dots  &amp; \dots &amp;   x_{n\;(k-1)}     \end{pmatrix}$$ and the errors are IID normal,  $$\mathbf{\epsilon} \sim \mathcal{N}\left(\mathbf{0},\sigma^2 \mathbf{I}\right) \;.$$  We minimize the sum-of-squared-errors by setting our estimates for $\mathbf{\beta}$ to be $$\mathbf{\hat{\beta}}= (\mathbf{X^T X})^{-1}\mathbf{X}^T \mathbf{y}\;. $$   An unbiased estimator of $\sigma^2$ is  $$s^2 = \frac{\left\Vert \mathbf{y}-\mathbf{\hat{y}}\right\Vert ^2}{n-p}$$ where $\mathbf{\hat{y}} \equiv \mathbf{X} \mathbf{\hat{\beta}}$ ().   The covariance of $\mathbf{\hat{\beta}}$ is given by $$\operatorname{Cov}\left(\mathbf{\hat{\beta}}\right) = \sigma^2 \mathbf{C}$$ where $\mathbf{C}\equiv(\mathbf{X}^T\mathbf{X})^{-1}$ () .  Question  How can I prove that for $\hat\beta_i$, $$\frac{\hat{\beta}_i - \beta_i} {s_{\hat{\beta}_i}} \sim t_{n-k}$$ where $t_{n-k}$ is a t-distribution with $(n-k)$ degrees of freedom, and the standard error of $\hat{\beta}_i$ is estimated by $s_{\hat{\beta}_i} = s\sqrt{c_{ii}}$.    My attempts  I know that for $n$ random variables sampled from $x\sim\mathcal{N}\left(\mu, \sigma^2\right)$, you can show that  $$\frac{\bar{x}-\mu}{s/\sqrt{n}} \sim t_{n-1} $$ by rewriting the LHS as $$\frac{ \left(\frac{\bar x - \mu}{\sigma/\sqrt{n}}\right)  }   {\sqrt{s^2/\sigma^2}}$$ and realizing that the numertor is a standard normal distribution, and the denominator is square root of a Chi-square distribution with df=(n-1) and divided by (n-1) ().  And therefore it follows a t-distribution with df=(n-1) ().  I was unable to extend this proof to my question...  Any ideas?  I'm aware of , but they don't explicitly prove it, they just give a rule of thumb, saying "each predictor costs you a degree of freedom". Is there a single word for 'without a beginning'? How do I turn off some formats in GeoServer's WMS? I have published a couple of layers on my Geoserver.  To be complaint with the T&amp;C of my data provider, I need to block the access of some of those layers as Vector data. Hence I have already blocked the WFS services on these Layers.  I came to know that even on the WMS service, you can get Vector Data, if you use GeoRSS and some of the .   How do I block GeoRSS, SVG &amp; UTFGrid as formats in the WMS Service? Deleting self-answered question gets "Delete this answered question" warning While attempting to delete a question which was answered by myself, and with no other answers, I got the following warning:     Delete this answered question?      We do not recommend deleting questions with answers because doing so   deprives future readers of this knowledge.      Repeated deletion of answered questions can result in your account   being blocked from asking. Are you sure you wish to delete?   I understand that deleting your question when someone else has answered it is effectively nullifying the effort that person put into that answer, which is bad. But is it bad if the only answer that's deleted along with your question is your own? How can I repair a buried 120v cable splice to make it meet code? I have an electrical question. I have a cable feeding an outdoor yard light. It was cut, I spliced it, soldered it and wrapped it with tape. Is there a way to splice and bury it safely to code? If not, I'll need to dig a 30 foot trench to replace the whole length.  Was about 8 inches below ground, surfaced over the years and probably hit with the weed trimmer.   It is outdoor cable inside copper tubing. Years ago when I bought the wire I knew outdoor was gray. The box said outdoor but it is white like indoor wire.   It was spliced about 20 years ago but am fixing up house and like to hide the ugly splice. HTML/Javascript: how to access JSON data loaded in a script tag with src set I updated the chrome to version 61, and the auto-scroll stopped working, it is necessary to scroll down the page manually. The problem does not occur in the previous version or in firefox.  Also, the reply icon no longer working when the message replied to is not in the current chat page. (Middle click still works and opens the link in new tab.) Varying behavior for possible loss of precision How to import sextante(processing) for QGIS 1.9 (2.0) How is the "charge on a capacitor" defined when two plates are unequally charged? In Concepts of Physics by Dr.. H.C.Verma, in the chapter on "Capacitors", in page 144, under the topic "Capacitor and Capacitance" the following statement is given:     A combination of two conductors placed close to each other is called a capacitor. One of the conductors is given a positive charge and the other is given an equal negative charge. The conductor with the positive charge is called the positive plate and the other is called the negative plate. The charge on the positive plate is called the charge on the capacitor …   Note that the term charge on a capacitor does not mean the total charge given to the capacitor.   (Emphasis mine)  According to the above statement, "the charge on the capacitor" is the charge on the positive plate when both positive and negative plates of a capacitor are equally charged? How to extend this definition when the two plates are unequally charged?   Suppose we supply charges $+Q_1$ and $-Q_2$ to the positive and the negative plates respectively. After electrostatic conditions are attained, I determined the charge distribution on the four surfaces - outer surfaces and inner surfaces of the two plates. The charge on the outer surfaces of the two plates are equal to $\frac{Q_1-Q_2}{2}$. The magnitude of charge on the inner surface of the two plates is $\frac{Q_1+Q_2}{2}$.   Now coming to my doubt, if the "charge on the capacitor" is the charge on the positive plate, which surface of the positive plate should I want to consider - the outer one or the inner one? And what is the reason for this choice? It seems to me that, a capacitor with unequal charges on its plates is not a capacitor in the first place (inferred from the statement above). Property of the conjugate transpose matrix with inner product How to show $a^{2^n}+1 \mid a^{2^m}-1$? I've been struggling with this all day today. I imagine it's not very hard, but my algebra skills are terrible. So, how can I show that if $m&gt;n$ and $a$ is a positive integer, then $$a^{2^n}+1 \mid a^{2^m}-1.$$ I just can't get a coherent picture of what I'm supposed to do. If this too (see yesterday's question) boils down to the Unique Factorization Theorem, I would be very grateful for any intuition on how to think about this! Where can I install ubuntu if I have 4 primary partitions? I want to triple boot Windows 7, Backtrack, and Ubuntu. Windows and Backtrack are already installed. The problem is that both of them take 4 partitions: 3 for Windows, and 1 for Backtrack. When I try to make another partition, it says I can't have over 4. How can I install Ubuntu with this problem? Note: The 3 Windows partitions are PQSERVICE, SYSTEM RESERVED, and eMachines. I don't really know if I can delete one. Global inbox message not updated after comment edit At the moment, I have the latest notification in the global inbox, content of which does not correspond either to the comment itself or the copy of it on "recent responses" page. This seems like the comment was edited and the updated version was not copied to the global inbox.    ETA: OK, now this looks more coherent. "In" vs. "after" for future talk How to put a unique material on duplicated objects separately? I've a sphere and then duplicated it. In object tree they are displayed as three siblings. I selected on of them and created a green glass material through node editor however this material was assigned to all three spheres. I confirmed that my selection is only on one sphere. What am I missing? I need a poll inside my content types.  Sometimes the users create an article and like to create a poll directly into the node they created. They don't want to create an extra poll with no connection to the original article.  So how can I get the poll functionality inside a different content type? Recently I'm working on a project aiming to convert the vibration of sound waves into electricity to charge batteries using a piezoelectric material (MFC type). I was trying to use the human voice as an input, but theoretically it was not enough, so do you have any ideas about some places that I can apply my project on it (that must be noisy or can give me vibrations)?  Moreover, has the MFC material been used before in this application? If I used many pieces of it in parallel would that help?