Should I add a ; after putting a function into a variable? is this code right?  pj.RemoveProjectTask = function (e, scope) {     e.preventDefault();     scope.remove(); };  pj.ToggleProjectTask = function (e, scope) {     e.preventDefault();     scope.toggle(); };   or this code:  pj.RemoveProjectTask = function (e, scope) {     e.preventDefault();     scope.remove(); }  pj.ToggleProjectTask = function (e, scope) {     e.preventDefault();     scope.toggle(); }
In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out?  If you're unfamiliar with the rules, there's a description of semicolon insertion on the . Here's the key point:     If the first through the nth tokens of a JavaScript program form are grammatically valid but the first through the n+1st tokens are not and there is a line break between the nth tokens and the n+1st tokens, then the parser tries to parse the program again after inserting a virtual semicolon token between the nth and the n+1st tokens.   That description may be incomplete, because it doesn't explain @Dreas's example. Anybody have a link to the complete rules, or see why the example gets a semicolon? (I tried it in JScript.NET.)   is related, but only talks about a specific scenario.
$$\lim\limits_{x\to 1}\frac{\sqrt x-x^2 }{1-\sqrt x}$$  I'm not entirely sure how to go about this, since rationalizing anything doesn't quite work for me. Just looking for some help. Zip all files in directory? Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too. How do I ensure that a Python while-loop takes a particular amount of time to run? What word describes random unfitting accusations I really dont know how to describe this. Im having a discussion with someone, I was sharing information that I found on a topic. Randomly im called out as being rude when nowhere was there evidence of rudeness exchanged. This person seems to have a history of claiming people have a problem or are being rude out of the random blue.   Is there a word to describe these random accusations that dont connect to anything? Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes. The integral $\int_0^8 \sqrt{x^4+4x^2}\,dx$ Rename command not found when running a script I'm trying to to execute a script, which uses the command rename.   When I execute it, I get a message rename: command not found. Any ideas?   if [[ -z '$3' ]]; then     shopt -s dotglob     rename "$EXPRESSION" ./* else     rename "$EXPRESSION" "$3" fi Parental controls with different settings for different users Does anyone know of a good way to set up some sort of parental controls so that one user account is subject to them, but not another?  A couple of friends of mine use Ubuntu and have kids (7 to 10 years old) who use the family computer. They'd like to have some blocking of adult sites. They're not going to supervise all the time, which I know might be ideal, but there we go. And they're not particularly technical, so they don't want to have to run scripts to turn the parental controls on and off regularly, but they can cope with having different accounts for different people. I haven't found a great way of doing this. I am pretty technical, so I'm happy to spend some time at the command line to set it up, but then it needs to just work.  Please don't just link to DansGuardian. If your answer doesn't address the different user account aspect, I will vote it down. If you want to talk about general parental controls that apply to all users then please start a new question - I'm sure that plenty of people would be interested in it, and I'll link to it from this question. Why is "union" an exception to the "a/an" rule? iOS 11-13 - unable to paste into comments Dictionary application needs to download dictionary "Apple Dictionary" before use I'm repeatedly being asked to download the "Apple Dictionary" when I open the dictionary application.     Dictionary application needs to download dictionary "Apple Dictionary" before use.   This doesn't happen every time I open it. I haven't pinned down specific usage cases where this message appears, but I think it may be every time after I reboot my computer.  Is there anyway for the Dictionary application to remember that I have "Apple Dictionary" permanently? This has only started happening after I upgraded from OS X Mountain Lion to macOS Sierra. How do I make a floor plan with specific dimensions? Didn't Harry have any other family he could have searched for? Let's say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be a dev, prod and stage versions. How do you deal with this in source control? Not check in this file at all, check it with different names or do something fancy altogether? What is a suitable word to describe a place where two rivers meet? I've googled for a while and on some sites I've found the word "watershed" as the proposed word. Is it the word that best suits it? Let $f\colon X\to\overline{\mathbb{R}}_{\geq 0}$ be a measurable function. Show that     $$ \int f\, d\mu=\int\limits_0^{\infty}\mu(\left\{x\in X: f(x)&gt;t\right\})\, dt. $$     (The right integral is to be read as an Lebesgue-integral.)      Hello, my idea is to approximate $f$ by the functions $$ f_n:=2^{-n}\sum\limits_{k=1}^{\infty}\chi_{\left\{x\in X: f(x)&gt; k/2^n\right\}}. $$  With this approximation by simple functions I got $$ \int\limits_X f\, d\mu=\lim\limits_{n\to\infty}\int\limits_X f_n\, d\mu=\lim\limits_{n\to\infty}\sum\limits_{k=1}^{\infty}\frac{k}{2^n}\cdot\mu\left(\left\{x\in X: f_n(x)=k/2^n\right\}\right)\\=\lim\limits_{n\to\infty}\sum\limits_{k=1}^{\infty}\frac{k}{2^n}\cdot\mu\left(\left\{x\in X:f(x)&gt;k/2^n\right\}\right) $$  This is the point where I do not come along anymore... is that right to this point and if yes: How can I continue in order to get the desired right side?  With regards I have studied from Griffiths, the relativistic form of momentum is $$p = \frac{1}{\sqrt{1-\frac{v^2}{c^2}}} m_0v$$   Now when I evaluate the momentum for photon, I just insert $v=c$ and $m_0=0$ and I get $p= 0/0$. How does it make sense?   Can you tell me that where I am wrong? How can one change an entire document to use bold font? Theorem. If the identity is written as the product of $r$ transpositions, $id=τ_1τ_2\dots τ_r$, then $r$ is an even number. Proof. We will employ induction on $r$. A transposition cannot be the identity; hence, $r &gt; 1$. If $r = 2$, then we are done. Suppose that $r &gt; 2$. In this case the product of the last two transpositions, $τ_{r−1}τ_r$, must be one of the following cases: $(ab)(ab) = id\\ (bc)(ab) = (ac)(bc)\\ (cd)(ab) = (ab)(cd)\\ (ac)(ab) = (ab)(bc),$ where $a$, $b$, $c$, and $d$ are distinct. The first equation simply says that a transposition is its own inverse. If this case occurs, delete $τ_{r−1} τ_r$ from the product to obtain $id=τ_1τ_2···τ_{r−3}τ_{r−2}$. By induction $r − 2$ is even; hence, $r$ must be even. In each of the other three cases, we can replace $τ_{r−1} τ_r$ with the right-hand side of the corresponding equation to obtain a new product of $r$ transpositions for the identity. In this new product the last occurrence of $a$ will be in the next-to-the-last transposition. We can continue this process with $τ_{r−2} τ_{r−1}$ to obtain either a product of $r − 2$ transpositions or a new product of $r$ transpositions where the last occurrence of $a$ is in $τ_{r−2}$. If the identity is the product of $r − 2$ transpositions, then again we are done, by our induction hypothesis; otherwise, we will repeat the procedure with $τ_{r−3}τ_{r−2}$. At some point either we will have two adjacent, identical transpositions canceling each other out or $a$ will be shuffled so that it will appear only in the first transposition. However, the latter case cannot occur, because the identity would not fix $a$ in this instance. Therefore, the identity permutation must be the product of $r − 2$ transpositions and, again by our induction hypothesis, we are done. Question: That is the proof written in the book, but unfortunately after more than $10$ times reading I don't understand the last two paragraph (i.e., from &quot;In each of the other three cases&quot;). Is there another simpler proof or could someone please clarify what is going on? Thank you. Diplomacy Attacking a Territory as they move If I convince Turkey, to move Army Bul to Gre, would I be able to send Army Ser to Bul and take the area?