Evaluate $$ \sqrt{-9}\sqrt{-4} $$ Now, I am told that $\sqrt{a}\sqrt{b}=\sqrt{ab}$, so I should be able to simply write $$ \sqrt{-9}\sqrt{-4} = \sqrt{(-9)(-4)}=\sqrt{36} = 6 $$ However, I am also told that I can simplify things like $\sqrt{-9}$ to $\sqrt{9(-1)}=\sqrt{9}\sqrt{-1}=3i$.  Following this reasoning, instead of the above value of 6 I get $$ \sqrt{-9}\sqrt{-4}=\sqrt{9(-1)}\sqrt{4(-1)}=(3i)(2i)=6i^2=-6 $$ So is the answer $\pm6$?  The first line of thought does not seem to be missing anything but does not include $-6$.  The second line does not include the $6$.  Are both simultaneously needed for completeness?
I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &amp;= i \\\\\ \frac1{\sqrt{-1}} &amp;= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &amp;= \frac1i \\\\  \sqrt{\frac1{-1}} &amp;= \frac1i \\\\  \sqrt{\frac{-1}1} &amp;= \frac1i \\\\  \sqrt{-1} &amp;= \frac1i \\\\  i &amp;= \frac1i \\\\  i^2 &amp;= 1 \\\\  -1 &amp;= 1 \quad !!? \end{align}
I'm trying to prove that the rationals are not the countable intersection of open sets, but I still can't understand why   $$\bigcap_{n \in \mathbf{N}} \left\{\left(q - \frac 1n, q + \frac 1n\right) : q \in \mathbf{Q}\right\}$$   isn't a counter-example. Any ideas? Thanks! Creating non-reverse-engineerable Java programs Render water-paint in iOS Removing the first line of CSV file Regular expression to extract URL from an HTML link I’m a newbie in Python. I’m learning regexes, but I need help here.  Here comes the HTML source:  &lt;a href="http://www.ptop.se" target="_blank"&gt;http://www.ptop.se&lt;/a&gt;   I’m trying to code a tool that only prints out http://ptop.se. Can you help me please? Where can I find sample or real Selenium projects. All the material I can find on github and on internet are basic, and never intermediate or advanced.  How does a real Selenium project look in real life? How can I find sample code? postgresql - replace all instances of a string within text field How come SG-1 couldn't get back to Earth? In Stargate SG-1 S02E16, , SG-1 (Captain Carter, Teal'c and two other members, who replaced Colonel O'Neill and Dr Jackson) is "trapped" on planet in binary system, where second star has risen and is slowly raising temperature - Samantha Carter says, in one moment, that it's going to reach 200°F soon - and dialing device is locked mid-dial. Yet, SGC manages to dial the planet and send them instructions how to repair the device and off-world team makes it back.  Why didn't they come back when Earth first dialed P9Q-281 to contact SG-1? I mean, from my understanding, stargate wormhole is two-directional, meaning it doesn't matter which end it was activated from, yet it seems like it is one-directional from the events of this episode... Is there an online course in Mathematical Methods for Physics, Covering Matrices and Vector Analysis? I am taking a course in Mathematical Methods for physicsPhysics (Junior Level).   We are working from   > Mathematical Methods for physicists, George B.Arfken .    I just need online resources covering ( Matrices, Determinants, Vector Analysis, Tensors and differential forms and Vector spaces...etc) to study and understand from. How can I use multiple overlay effects simultaneously in Photoshop? There are 3 overlay effects available in Photoshop as layer styles: Color, Gradient and Pattern. The problem: these effects come in a strictly fixed order!  Is it possible to make a translucent Gradient Overlay over a Color Overlay using only layer styles? Or a Multiply Pattern and Color Overlays? How do I change the full background color of the console window in C#? I am trying to filter items with a stored procedure using like. The column is a varchar(15). The items I am trying to filter have square brackets in the name.  For example:  WC[R]S123456.  If I do a LIKE 'WC[R]S123456' it will not return anything.  I found some information on using the ESCAPE keyword with LIKE but I do not understand how to use it to treat the square brackets as a regular string. See YouTube videos in Anaglyph mode How to see a YouTube video in  from a non-3D Android device? I am not able to enable Anaglyph mode from the YouTube application. Just ran the latest batch of updates on 20.04 (Xubuntu), and now I'm getting a GRUB error: symbol 'grub_calloc' not found  I'm dropped into the 'grub rescue' shell, but have no idea what to do there that might be useful. To me, 'symbol not found' implies some sort of build error with the grub package, but I don't really know how grub works. I noticed that this update also included 'firmware', not sure if that could be related. Is my best bet just to boot from a live CD and see if I can roll back the update to grub somehow? Edited to add: OK, thanks to lots of people ! Here's what I think I now understand.  On 'non-UEFI' systems, grub is installed in two separate parts. The first, most basic, part is the part that is started on bootup. But for most of it's functionality, it needs the second part. These parts must be aligned - neither part must require any functionality from the other part which is not actually there. The visible, run-time problem occurs when these parts are not aligned, and the function grub_calloc is not supplied. It's not 100% clear to me if grub_calloc belongs in the second, larger part or the first. I would have expected the second, but the grub build system is a work of considerable art, so I don't know :).  The root cause of the problem is that the grub update has not ensured that both parts have been updated. Ideally, failure to do this should cause grub installation to fail, and the system should be reverted to a safe state. This does not happen. This is actually still a bit of a mystery to me. All that the update needs to do by default is put each part where the current parts are, because obviously that worked. If the install locations/drives are configuration - driven, and one of these locations can't be reached, then somehow a mismatch has arisen between that configuration data and reality. This might not show up as a problem as long as no new dependency was introduced between the parts.   All flavours of solution involve reinstalling grub to ensure that the two parts are aligned. It's not actually necessary to go back to the previous version ( although that will work ), because it's not the grub runtime per se that is broken. There are numerous ways to achieve this, depending on your environment, but running the Boot-repair live disk worked for me. It may be useful, for the purpose of avoiding such a misalignment in future, to ensure that the grub installer on your system is configured to install to the correct devices. This update resolves some important bugs (). If you have reverted grub to resolve this problem, be aware that you are exposed to these issues. How to completely remove Garage Band from macOS? $k$ times's draw from $n$ numbers with replacement, each number at least appear once Sample $k$ times with order from $n$ distinct numbers with replacement where $k\ge n$. Here "with order" means the sample is treated like a sequence rather than a set, so results like "1,3,3" and "3,1,3" are different.  The question is what is the probability that every number is sampled at least once? My answer is $1-\frac{{\sum\limits_{i = 1}^n {C_n^i\times i! \times {{(n - i)}^k}} }}{{{n^k}}}$ where $C_n^i$ denotes $n$ chooses $i$.  ${C_n^i\times i! \times {{(n - i)}^k}}$ means first choose $i$ ($i=1,2,...,n-1$) of numbers not to appear in the sample, and then we sample from the remaining $n-i$ numbers for $k$ times.   My question is, is there more elegant solution where the numerator can be directly computed? i.e. can we directly calculate the number of possible sample sequences in which every number has at least one occurrence? Thank you!    PS: my attempt was $C_k^n\times n!\times n^{n-k}$, meaning that we first choose $n$ positions in the sequence of length $k$ to place $n$ numbers, and then permute the $n$ numbers. This is to ensure every number to appear once. The remaining $n-k$ are sampled from the $n$ numbers without restriction.   However, I later found this seems not correct, and it counts the same sequence multiple times.  PS2: as pointed out in the comments, my first answer "1- ..." is not correct either. How to run a program without typing the full path? System utilities such as ls don't need to have the full path typed before executing them. However, to execute Netbeans, I have to type /home/chris/netbeans-7.0.1/bin/netbeans. How can I make it so that I only have to type netbeans? urlEvent is undefined When I'm going through a whole bunch of shots to determine which to delete and which to flag, it's fastest for me to just keep both hands on the keyboard.  However, if I want to zoom in to 100% on a picture and then pan to a specific area, it seems I can only get halfway there -- 'Z' to zoom, but then I'm stuck having to pick up the mouse to pan around.  I was excited to find page-up/page-down/home/end can be used, but they seem to exist to provide an exhaustive, linear scrolling of the image, panning top-to-bottom then left-to-right, without unconstrained 2d movement.  Is there some way to toggle the arrow keys so they can pan instead of navigate to the next/prev photo?  Something else?  Or am I out of luck? In Bishop's book "Pattern Classification and Machine Learning", it describes a technique for regularization in the context of neural networks. However, I don't understand a paragraph describing that during the training process, the number of degrees of freedom increases along with the model complexity. The relevant quote is the following:     An alternative to regularization as a way of controlling the effective   complexity of a network is the procedure of early stopping. The   training of nonlinear network models corresponds to an iterative   reduction of the error function defined with respect to a set of   training data. For many of the optimization algorithms used for   network training, such as conjugate gradients, the error is a   nonincreasing function of the iteration index. However, the error   measured with respect to independent data, generally called a   validation set, often shows a decrease at first, followed by an increase as the network starts to over-fit. Training can therefore be   stopped at the point of smallest error with respect to the validation   data set, as indicated in Figure 5.12, in order to obtain a network   having good generalization performance. The behaviour of the network   in this case is sometimes explained qualitatively in terms of the   effective number of degrees of freedom in the network, in which this   number starts out small and then to grows during the training process,   corresponding to a steady increase in the effective complexity of the   model.   It also says that the number of parameters grows during the course of training. I was assuming that by "parameters", it refers to the number of weights controlled by the network's hidden units. Maybe I'm wrong because the weights are prevented to increase in magnitude by the regularization process but they don't change in number. Could it be referring to the process of finding a good number of hidden units?  What's a degree of freedom in a neural network? What parameters increase during  training?