I am trying to learn to use the grep command.  I am not able to access the -a option and understand how it works.
I would like to learn how to use it so I can start to use the terminal more.
Generating values from a multivariate Gaussian distribution I am currently trying to simulate values of a $N$-dimensional random variable $X$ that has a multivariate normal distribution with mean vector $\mu = (\mu_1,...,\mu_N)^T$ and covariance matrix $S$.  I am hoping to use a procedure similar to the inverse CDF method, meaning that I want to first generate a $N$-dimensional uniform random variable $U$ and then plug that into the inverse CDF of this distribution, so to generate value $X$.  I am having issues because the procedure is not well documented and there are slight differences between the  and a .  In my case, I am also choosing the parameters of the distribution randomly. In particular, I generate each of the means, $\mu_i$, from a uniform distribution $U(20,40)$. I then build the covariance matrix $S$ using the following procedure:   Create a lower triangular matrix $L$ where $L(i,i) = 1$ for $i=1..N$ and $L(i,j)  = U(-1,1)$ for  $i &lt; j$ Let $S = LL^T$ where $L^T$ denotes the transpose of $L$.   This procedure allows me to ensure that $S$ is symmetric and positive definite. It also provides a lower triangular matrix $L$ so that $S = LL^T$, which I believe is required to generate values from the distribution.  Using the guidelines on Wikipedia, I should be able to generate values of $X$ using a $N$-dimensional uniform as follows:   $X = \mu + L * \Phi^{-1}(U)$   According to the MATLAB function however, this is typically done as:   $X = \mu + L^T * \Phi^{-1}(U)$   Where $\Phi^{-1}$ is the inverse CDF of a $N$-dimensional, separable, normal distribution, and the only difference between both methods is simply whether to use $L$ or $L^T$.  Is MATLAB or Wikipedia the way to go? Or are both wrong? Prevent Windows 10 installer from using the preinstalled serial key without disabling UEFI My laptop (a Lenovo Flex 2 15) came preinstalled with Windows 8 Standard (with the serial key preinstalled into the BIOS), and I've since installed an SSD (a Samsung Evo 840 120GB) &amp; upgraded to Windows 10.  When the laptop still had its hard drive, I upgraded it to Professional so I could use the resources provided by the domain on my homeserver; because of this, I can only use the Professional editions of Windows (Home can't join domains).  I bought Windows 10 Professional &amp; completed a fresh-install (complete reinstallation) of Windows, only that it installed Windows 10 Home instead of Professional. I'm guessing this is due to the Windows 8 Standard Edition serial key preinstalled in the BIOS.  I then downloaded an All-In-One ISO image of Windows 10 from MSDN (of which I have limited access to), transferred the installer onto a USB stick, &amp; reinstalled (a clean install again). However it's still installing Windows 10 Home.  If I try to install using the AIO image from within Windows, the installer does not present me with a list of options for the edition I want to install; instead, it assumes that I want to install Home Edition:    I am able to get Windows 10 Professional to install if I disable UEFI &amp; use Legacy instead, but I feel that this is stepping around the issue rather than resolving it.  Is it possible to have the Windows 10 installer ignore any serial keys preinstalled in the BIOS/UEFI? If so, how? If not, is using Legacy mode really the only way around this? I'm considering buying a subscription to Minecraft Realms (on PC) as a gift for somebody I know. Mojang doesn't have a gift option, and I don't want to spoil the surprise, so I was thinking I'd just buy it myself and give them access.   If I do this, will the recipient be able to turn around and invite their own friends? Can I grant them "admin" access to the server? Custom cross-reference formats (e.g. "Equation 1" instead of just "1") Execute bash commands over SSH while staying in interactive mode afterwards Probably it is a weird thing I would like to achieve but: I would like to SSH to a remote host and then execute some bash commands like "alias" automatically to use them afterwards in an interactive mode. The remote host does not allow the personal environment.    Is this possible? Would "expect" do it? Or is there any other way to achieve this? Basically I would like to have my bashrc without modifying any files on the remote host. I was looking for a tree or graph data structure in C# but I guess there isn't one provided.  explains a bit about why.  Is there a convenient library which is commonly used to provide this functionality?  Perhaps through a strategy pattern to solve the issues presented in the article.  I feel a bit silly implementing my own tree, just as I would implementing my own ArrayList.     I just want a generic tree which can be unbalanced.  Think of a directory tree.  C5 looks nifty, but their tree structures seem to be implemented as balanced red-black trees better suited to search than representing a hierarchy of nodes. What's the best way to protect your house from Endermen stealing your walls? Intuitive explanation for dividing by $n-1$ when calculating standard deviation? I am writing my thesis,  and i am in restructuring phase - sorting theorems where they should belong thematically. And it would be helpful to have all the proofs hidden so i am not laden with the additional information.  Is it possible to add something like hideproof to documentclass options to omit them when compiling the latex file. So that I could resize the window to a certain size from within Terminal. Is it acceptable to say "We'll get back to you as quick as we can"? Is "quick" a flat adverb in this case? Can I get a postdoc in China more than 3 years after having received my PhD? Let $G = \mathbb{R} / \mathbb{Q}$. Is this an interesting group to study?  Is it isomorphic to any more natural mathematical objects? If an opponent casts  to gain control of  then sacrifices it who will draw the card? How do I install Java, including in my browser, so websites with Java work? Transit visa for Indian citizen traveling through Hong Kong Can I disable full-disk encryption? I recently installed Ubuntu 12.10 and it requires a passphrase to boot up (I installed it with an encrypted file system).  Do I have to reinstall to change to a standard unencrypted file system? Capitalize and punctuate "let us continue this discussion in chat" I'm really new in using biblatex, compile the sample placed in , but what I get is    1.1 Foo    Some text [B02x ].    1.2 Bar    Some text [B02y ].   Do not get the bibliography by chapters, or the global references.  Really not remains to be done   \documentclass{report}  \usepackage[style=alphabetic]{biblatex}  \addbibresource{references.bib}  \begin{document}  \chapter{First chapter}  \section{Foo}  Some text \cite{childs_temperature}.  \printbibliography  \chapter{Second chapter}  \section{Bar}  Some text \cite{hashemian}.  \printbibliography  \newpage  \printbibliography  \end{document}   And the references.bib    @BOOK{childs_temperature,   title = {Practical Temperature Measurement},   publisher = {Butterworth - Heinemann},   year = {2001},   author = {Childs, Peter R N},   address = {Great Britain},   edition = {1},   isbn = {0 7506 5080 X}   }    @PHDTHESIS{hashemian,   author = {Hashemian, Hashem Mehrdad},   title = {Measurements of dynamic temperatures and pressures in nuclear power plants},   school = {{The University of Western Ontario}},   year = {2011},   type = {PhD {T}hesis}   }   I need to obtain references by chapter and global cited references, but i don't know how compile. How to get the newest file in a directory in php