How many natural numbers are multiples of both a and b?
$ d_1,d_2\mid n\iff {\rm lcm}(d_1,d_2)\mid n\ $ [LCM Universal Property]
JavaScript private methods To make a JavaScript class with a public method I'd do something like:  function Restaurant() {}  Restaurant.prototype.buy_food = function(){    // something here }  Restaurant.prototype.use_restroom = function(){    // something here }   That way users of my class can:  var restaurant = new Restaurant(); restaurant.buy_food(); restaurant.use_restroom();   How do I create a private method that can be called by the buy_food and use_restroom methods but not externally by users of the class?  In other words, I want my method implementation to be able to do:  Restaurant.prototype.use_restroom = function() {    this.private_stuff(); }   But this shouldn't work:  var r = new Restaurant(); r.private_stuff();   How do I define private_stuff as a private method so both of these hold true?  I've read  a few times but it doesn't seem like "private" methods can be called by public methods and "privileged" methods can be called externally. Galaxy S not detected, how do I make it work? Can anyone please provide the necessary steps to connect a Samsung Galaxy S with Ubuntu 10.10 please? I was thinking that perhaps it could detect something, but it doesn't, Anyone succeeded ?   Thanks Variablity in cv.glmnet results I am using cv.glmnet to find predictors. The setup I use is as follows:  lassoResults&lt;-cv.glmnet(x=countDiffs,y=responseDiffs,alpha=1,nfolds=cvfold) bestlambda&lt;-lassoResults$lambda.min  results&lt;-predict(lassoResults,s=bestlambda,type="coefficients")  choicePred&lt;-rownames(results)[which(results !=0)]   To make sure the results are reproducible I set.seed(1). The results are highly variable. I ran the exact same code 100 times to see how variable the results were. In the 98/100 runs had one particular predictor always selected (sometimes just on its own); other predictors were selected (co-efficient was non-zero) usually 50/100 times.  So it tells me that each time the cross-validation is running it's going to probably select a different best lambda, because of the initial randomization of the folds matter. Others have seen this problem () but there isn't a suggested solution.  I am thinking that maybe that one which shows up 98/100 is probably pretty highly correlated to all the others? The results do stabilize if I just run LOOCV ($\text{fold-size} = n$), but I am curious why they are so variable when $\text{nfold} &lt; n$. is there any diffrence to use nonlinear or liner activation function in single hidden layer network Is my paper under review (or similar) for too long and if yes, how should I react? Is it appropriate to use a question mark at the end of a compound sentence where the first independent clause is a question but the second is a statement? For example:     Do you want attribution for that quotation, because I'm definitely sharing it and want to know if I should give you credit?   or      Do you want attribution for that quotation, because I'm definitely sharing it and want to know if I should give you credit.   I suppose this could work, but it's a little niche, as the second clause might not always be appropriate for a parenthetical.     Do you want attribution for that quotation (because I'm definitely sharing it and want to know if I should give you credit)? Triangle Inequality for norm integral $\|f\|_1=(\int_a^b [|f|^2+|f'|^2]\mathsf dx)^{1/2}$. Define $C_1^1[a,b]$ to be the space of continuously differentiable functions on $[a,b]$, with norm $$\|f\|_1=\left(\int_a^b[|f|^2+|f'|^2]\mathsf dx\right)^{1/2}.$$ Show that this is a proper definition of a norm. Is this normed space complete?  I'm stuck on the triangle inequality part. I'm having a hard time showing that $$\|f+g\|_1\leq \|f\|_1+\|g\|_1.$$ Any hints or solutions are greatly appreciated. Database Encryption scan for database  was aborted. Reissue ALTER DB to resume the scan If $x^n=y^n$ and $n$ is odd then $x=y$ Here, we suppose that $x,y\in\mathbb{R}$ and that $x^n=y^n$, where $n$ is odd. I want to prove that $x=y$.  Maybe we can use that $x^n-y^n=(x-y)(x^{n-1}+x^{n-2}y+...+xy^{n-2}+y^{n-1})$  So, it suffices to show that if $x^n=y^n$ then $x^{n-1}+x^{n-2}y+...+xy^{n-2}+y^{n-1}\neq 0$  Any hint? Addons: Only some .zips will install I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way to decide when to use the interface or the concrete type? running script with ". " and with "source " I was wondering if the following two ways of running a bash script are equivalent?  . ./myScript.sh  source myScript.sh  Are they both running the content of the script instead of running the script, i.e. not creating a subshell for running the script? Java method dispatch with null argument Prove $\gcd(a+b,a^2+b^2)$ is $1$ or $2$ if $\gcd(a,b) = 1$ Assuming that $\gcd(a,b) = 1$, prove that $\gcd(a+b,a^2+b^2) = 1$ or $2$.   I tried this problem and ended up with $$d\mid 2a^2,\quad d\mid 2b^2$$ where $d = \gcd(a+b,a^2+b^2)$, but then I am stuck; by these two conclusions how can I conclude $d=1$ or $2$?  And also is there any other way of proving this result? Suppose I have this:   $\frac{6^{666}}{2^{6}}$ (mod $125$)  I saw it is possible to reduce only the numerator's power modulo Euler's phi function. Can someone explain why is that possible?  It is essentially this:   $\frac{6^{666 \space (mod \phi(125))}}{2^{6}}$ (mod $125$) Page 105 of D. Burton's A First Course in Rings and Ideals reads     It is not difficult to show that if (I'll call them $n$ and $m$ instead of $n_1$ and $n_2$) $n$, $m$ are square free integers, then $\mathbb{Q}(\sqrt{n}) \cong \mathbb{Q}(\sqrt{m})$ if and only if $n=m$.   Well, it is getting difficult for me, any help or would be appreciated.    My progress so far: Suppose $\phi :\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ is an isomorphism. Then $\phi(u)=u$ for every $u \in \mathbb{Q}$, so that $\phi(\sqrt{n})^2=\phi(n)=n$. If $\phi(\sqrt{n})=a+b\sqrt{m}$ for some $a,b\in\mathbb{Q}$, then $(a+b\sqrt{m})^2=a^2+b^2m + 2ab\sqrt{m}=n$ implies $$a^2+b^2m = n$$ and $$2ab=0.$$  Then $b=0$ cannot happen since that would imply that $\sqrt{n}\in\mathbb{Q}$, where $n$ is a square-free integer. Also $a=b=0$ cannot happen. Hence $a=0$ and we have $$b^2m=n.$$ If $\psi:\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ were an isomorphism then there would exist some $s\in\mathbb{Q}$ such that $$s^2m=n,$$ then $s=b$ or $s=-b$. Therefore the only isomorphisms from $\mathbb{Q}(\sqrt{n})$ to $\mathbb{Q}(\sqrt{n})$ are $\phi(u+v\sqrt{n})=u+vs\sqrt{m}$ and $\psi(u+v\sqrt{n})=u-vs\sqrt{m}$.    I don't know if there's an easier way and I don't know if I'm in the correct way here. Thanks beforehand :) How to wait for a shell process to finish before executing further code in VB6 Are if else statement equivalent to logical and && or || and where should I prefer one over the other? I'm learning about decision making structures and I came across these codes:  if [ -f ./myfile ] then      cat ./myfile else      cat /home/user/myfile fi   [ -f ./myfile ] &amp;&amp; cat ./myfile || cat /home/user/myfile   Both of them behave the same. Are there any advantages to using one way from the other? Create a floating div on top of divs Define functions in structs