Remove whitespace only between two characters { and } in file
How to remove all white spaces just between brackets [] using Unix tools?
Eeeek! Code blocks are misbehaving! So code blocks in questions and answers on the android app (inline included) seem to be scared of me putting my finger in them. When I poke them, they only move over two columns!  (For clarity, these are the code blocks that overlap the TextArea view because they've been eating too much)  The intended behaviour here is that when I press my finger into a code block, the touch event should register a drag; at current, I try to scroll inside a code block and I end up switching to question or answer view instead, over and over.  EDIT:  Something tells me this is status-bydesign because the text is deliberately cut off (probably inviting you to click on the code block and expand it; UX Decision?): Using exec and tee to redirect logs to stdout and a log file in the same time In a bash script, how can I redirect all standard outputs to a log file and tee the output on the screen using exec ?  log_file="$HOME/logs/install.txt-`date +'%Y-%m-%d_%H-%M-%S'`" [ -f "$log_file" ] || touch "$log_file" exec 1&gt;&gt; $log_file 2&gt;&amp;1   This code redirect all the log to the log file but not to the screen . How to find chromatic number of the $n$-dimensional hypercube $Q_n$? Sum of First $n$ Squares Equals $\frac{n(n+1)(2n+1)}{6}$ I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals:  $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$  I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other? If the edges of the complete graph $K_{17}$ (on 17 vertices with no three collinear) are each colored one of three colours can it be proven to have two or more monochromatic triangles? Image of concave mirror when object is farther than the focal point I have a set of concave/convex mirrors/lenses, and I have drawn out all of the ray tracing diagrams for each possible combination and type of image each optical element can produce. When I look at the ray tracing diagrams then reproduce the situation in the real world with myself as the &quot;object&quot;, all the scenarios make sense to me except one: when I as the object stand beyond the focal point of a concave mirror.  The image ends up as &quot;real&quot; and appears to be in front of the mirror. Now I understand that in the situation above, I as the object would stand at 6m and this would result in the image appearing at 12m. So if I placed a wall or screen at the 12m mark, the image would form on that surface (just like a movie theater screen).... at least I think I interpreted that correctly. But I still see myself when I look in the mirror?! If the image is supposed to form and come into focus behind me, what in the world am I seeing when looking at the surface of the mirror? I still see myself, just inverted. The surface of the concave mirror still has a reflection on it. It doesn't look quite like a normal flat mirror, in that the image doesn't really look like it's &quot;inside&quot; the mirror, more like it's right on the surface of it. It's really frustrating because every other possible arrangement of optical elements makes total sense to me, except this one. Any suggestions on how to think about it? Thank you for your time! When validating a field manually from my form a error is displayed but the field doesn't get red. For the first parameter i used the name of the input element. DRUPAL 7  if($form_state['values']['panes']['webform_nid31'][0]['contact_person'] == '') {     form_set_error('panes[webform_nid31][0][contact_person]', t('You must select a name for this group of settings.'));   } Performing deep learning land cover classification using R? I am really new to Deep Learning and, unfortunately, I can't find example codes on land cover classification other than  where the author wrote a script in R for a large dataset.   The main reason that I am asking is because recently I found a few papers on Remote Sensing Image classification using Deep Learning and I was wondering if there were any R examples on that subject.  So, is there a code example, preferably a step-by-step, which I can use?  I found several git repos like  that can do Deep Learning classification with R, BUTT, I am still looking for a simple multi-spectral image segmentation method. An example of that can be found at  and I also found a similar question in  for which the answer is "use something else other than R if you can".  If I find anything that works today I will be posting a working answer. How do I log into my Linux laptop if I have forgotten both the username and password? Why doesn't the Related question list show that questions are closed? Mirror changes to side of cube across all six sides Show that if $|f(z)| \leq M |z|^n$ then $f$ is a polynomial max degree n I can't prove this statement, can anybody show me how to prove it?    $$f:\mathbb{C}\rightarrow \mathbb{C} \in \mathcal{O}(\mathbb{C}), \exists n\in \mathbb{N}, R &gt;0 , M&gt;0 : |f(z)| \le M|z|^{n} \ \ \forall |z|&gt;R \Rightarrow \deg(f)\le n $$  To show is that if there exists such an $M$, that then $f$ is a polynomial of max degree $n$. I started like this:   $$f(z) = \sum_{n=0}^{\infty} a_n (z-z_0)^n$$ So if I put this into the inequality: $$|f(z)| = \left| \sum_{n=0}^{\infty} a_n (z-z_0)^n \right| \le M |z|^n .$$ Finding real roots of negative numbers (for example, $\sqrt[3]{-8}$) HTTP request parameters are not available by request.getAttribute() What is in the space between a nucleus of an atom and its electrons? Why do polarized sunglasses remove (most) reflections on car windows?  I know that both lenses of polarized sunglasses are polarized in the same direction and I can see that reflections in my own windshield and the windows of other cars appear, disappear, or change depending on how I tilt my head, but why?  Why is the light in those reflections polarized?  edit: And why is most of the light in the various reflections on the interior of my own windshield and various windows/windshields at what seem like a variety of angles all polarized in a sufficiently narrow set of ways as to make polarized sunglasses work? What if my State / Country doesn't have a Ubuntu LoCo Team? How can I start one? I know what an Ubuntu Team is and , but what can users do if their area doesn't have a LoCo team? Background: One of my co-authors faced problem of compiling the paper that I had built using TexStudio and MikteX 2.9 on his Mac Machine running TexLive.   ShareLaTeX Role: So, one solution is to use ShareLaTeX. But the first problem pops in mind is how safe is uploading unpublished article to a publicly accessible portal?  What I did: I googled security and data breach of ShareLaTex and found nothing except some words from the ShareLaTex community about their word to ensure that our data are safe; perhaps this would not be enough.  My 1st Question: To what extent can I trust ShareLaTeX and put my ready-to-publish content there?   My 2nd Question: Is there any alternate way of sharing LaTeX with others around the globe without changing the underlying platform? Is it better to difference a series (assuming it needs it) before using an Arima OR better to use the d parameter within Arima?  I was surprised how different the fitted values are depending on which route is taken with the same model and data. Or am I doing something incorrectly?  install.packages("forecast") library(forecast)  wineindT&lt;-window(wineind, start=c(1987,1), end=c(1994,8)) wineindT_diff &lt;-diff(wineindT)  #coefficients and other measures are similar modA&lt;-Arima(wineindT,order=c(1,1,0)) summary(modA) modB&lt;-Arima(wineindT_diff,order=c(1,0,0)) summary(modB)  #fitted values from modA A&lt;-forecast.Arima(modA,1)$fitted  #fitted from modB, setting initial value to the first value in the original series B&lt;-diffinv(forecast.Arima(modB,1)$fitted,xi=wineindT[1])   plot(A, col="red") lines(B, col="blue")   ADD:  Please note I am differencing the series once and fitting arima (1,0,0) then I am fitting arima (1,1,0) to the original series. I am (I think) reversing the differencing on the fitted values for the arima(1,0,0) on the differenced file.   I am comparing the fitted values - not the predictions.  Here is the plot (red is arima(1,1,0) and blue is the arima (1,0,0) on the differenced series after changing back to the original scale)  :    Response to Dr. Hyndman's Answer:  1) Can you illustrate in R code what I would need to do in order to get the two fitted values (and presumably forecasts) to match (allowing for small difference due to your first point in your answer) between Arima (1,1,0) and Arima(1,0,0) on the manually differenced series? I assume this has to do with the mean not being included in modA, but I am not entirely sure how to proceed.  2) Regarding your #3. I know I am missing the obvious, but are not $\hat{X}_t = X_{t-1} + \phi(X_{t-1}-X_{t-2}) $ and $\hat{Y}_t = \phi (X_{t-1}-X_{t-2})$ the same when $\hat{Y}_t$ is defined as $\hat{X}_t - X_{t-1}$? Are you saying I am "undifferencing" incorrectly? Is Using Digital Signatures to prove identity a zero knowledge proof? Suppose Alice publishes a book with a public key in it, and later wants to prove that she wrote the book. She could sign challenge messages with her private key, and others could verify those signed messages. Alice is proving she knows a private key without revealing anything about it.  Is this an example of an interactive zero knowledge proof?   Or does this example somehow not apply to zero knowledge proofs?