When you have two variables as input
Best way to return multiple values from a function?
In the ,  can monitor some things like the total traffic on the site. However, it seems to be broken at the moment, all figures are almost zero. This is how it looks for Meta Stack Exchange (other sites show similar pictures): Say I have two points. One at $A = (0, 0)$ and another at $B = (0, 10)$. I wish to derive an equation for a line that, for any point $P$ on the line, would equal a set ratio for the distance $P$ to $A$ and $P$ to $B$.  This is easy if the predetermined ratio for $A:B$ is $1:1$. I would create a line from $A$ to $B$, find its midpoint, then create an orthogonal line at the midpoint. Then at any $P$ on the line I know that the ratio distances from $P$ to $A$ and $B$ will be $1:1$.  But what if the ratio for $A:B$ is something like $11:18$?  This is for a positioning algorithm I am implementing - not for homework :)  EDIT: Note - If an exact formula is not possible, an approximation of the line out to $\pm 200$ from $A$ or $B$ is acceptable as values further from $A$ and $B$ will not be utilized anyway. A linear equation for the final result/approximation is ideal for speed in running multiple computations. How can I install an app given only its APK file? Windows 8.1 64-bit: High memory usage I have 8GB of memory on a 64 bit windows 8.1 machine, and windows is telling me I'm using 91% of my memory, yet its simultaneously telling me I'm only using 3GB.  I literally just restarted my machine a few minutes ago because it was being incredibly rediculously slow. I'm currently only running chrome (with a ton of tabs, but doesn't add up to anywhere near 7.5GB). What could be going on here?   Here's a bunch of my current info       I took a look at this:  but I wasn's able to use xperf and the rest didn't lead me to a solution.  UPDATE - RamMap:   UPDATE 2: I checked Resource Monitor at Wouter's suggestion and found an "Image" called lxdecoms.exe with over 6GB of Commt (KB). I tried killing the process, but while it lowered my Commit Charge, it didn't affect "Used Physical Memory". So I restarted hoping to capture it again in full, but its not back yet and yet the problem persists.  I should note that I do have a Centos virtual box virtual machine running on my machine, not sure if that has any weird memory impacts that aren't reflected in the numbers in these tools.   I got xperf working, so here's my resource monitor and a wpa analysis of my xperf output (from xperf -on ReferenceSet -BufferSize 1024 -MaxFile 512 -FileMode Circular  &amp;&amp; timeout 5 &amp;&amp; xperf -d MemUsage.etl):     What is N/A that's taking up 2.7GB of memory? My VM? TestMethod do not support Web service callouts, test skipped Finding a formula to sum natural numbers up to $n$ Possible Duplicate:          I got this question in homework:  Find an expression for the sum ‫‪     $\sum k = 1 +\cdots + n‬‬$.    and prove it using an induction.   I'm not even near finding the expression. What I did notice is that if $n$ is (for example) 5 then the sum would be   $5^2 - 4^2 + 3^2 - 2^2 + 1^2$  So the first number is always positive and from there on the sign changes.  Any tips on how do I contintue from this point on, assuming I'm in the right direction?  Thanks! How to customize my titlepage? Find a tangent to two quadratic bezier curves I have two quadratic bezier curves and I want to find whether they have a common tangent, and if so where it is.  If the first bezier is defined by points $(x_1, y_1)$, $(x_2, y_2)$, $(x_3, y_3)$, then the points on the curve have coordinates:  $x = (x_1 - 2x_2 + x_3)t^2 + (2x_2 - 2x_1)t + x_1 \\ y = (y_1 - 2y_2 + y_3)t^2 + (2y_2 - 2y_1)t + y_1$  Or to simplify things:  $x = A_xt^2 + B_xt + C_x \\ y = A_yt^2 + B_yt + C_y$  Likewise, I can get an equation for the second bezier:  $x = D_xs^2 + E_xs + F_x \\ y = D_ys^2 + E_ys + F_y$  The gradient of the tangent, $m$, to the first curve at $t$ is $\dfrac{2A_yt + B_y}{2A_xt + B_x}$,  which must be equal to the tangent to the second curve at $s$, $\dfrac{2D_ys + E_y}{2D_xs + E_x}$.  So $m = \dfrac{2A_yt + B_y}{2A_xt + B_x} = \dfrac{2D_ys + E_y}{2D_xs + E_x}$  Which I rearranged to get:  $t = \dfrac{2(B_yD_x - D_yB_x)s + B_yE_x - B_xE_y}{4(A_xD_y - A_yD_x)s + 2(A_xE_y - A_yE_x)}$  The gradient of the tangent is also equal to the difference in the y-coordinates over the difference in x-coordinates:  $m = \dfrac{D_ys^2 + E_ys + F_y - (A_yt^2 + B_yt + C_y)}{D_xs^2 + E_xs + F_x - (A_xt^2 + B_xt + C_x)}$  But that's as far as I got. The algebra looks too messy from here. Can anyone solve this, or is there a better approach? Find the slope of tangent line to the curve at the point $(1, \pi/2)$  the equation is  $$\sin(xy) = x$$  The right answer was = Slope is infinite   My answer was taking the derivative and I end up in this equation   $$ (1-y\cos(xy))/ x\cos(xy)  $$  I substitute with the points and the calculator showed an error, Does the error means infinite ? Solve $\sin(z) = z$ in complex numbers Show that $\sin(z) = z$ has infinitely many solutions in complex numbers. Little Picard theorem should help, but using big Picard theorem is undesirable. Thanks a lot! Pass an extra argument to a callback function How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated. Eigen Values Proof a.) Let A and B be $n$ x $n$ matrices. Prove that the matrix products   $AB$  and $BA$ have the same eigenvalues.      b.) Prove that every eigenvalue of a matrix A is also an eigenvalue of   its transpose $A^T$. Also, prove that if v is an eigenvector of A with   eigenvalue $\lambda$ and w is an eigenvector of $A^T$ with a different   eigenvalue $\mu \ne \lambda$, then v and w are orthogonal vectors with   respect to the dot product.   For a, I know that if their eigenvalues are the same then their eigenvectors must relate too.    For the first part of b, is it similar to proving that the $det(A) =det (A^T)$? And, I do not know how to do the second part. How do I become a Werewolf? I've heard that one of (maybe the only?) secret races in this game is a werewolf.  How do I become a werewolf?  And by extension, how do I cure lycanthropy, that is, if there even is a cure? I have a problem with this limit, I don't know what method to use. I have no idea how to compute it. Is it possible to compute this limit with the McLaurin expansion? Can you explain the method and the steps used? Thanks. (I prefer to avoid to use L'Hospital's rule.)  $$\lim _{x\to 0}\frac{x\bigl(\sqrt{3e^x+e^{3x^2}}-2\bigr)}{4-(\cos x+1)^2}$$ 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$. Determine device (iPhone, iPod Touch) with iOS Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible. Why won't my taskbar display on my secondary monitor? On my secondary monitor (currently using Windows 10), my taskbar will barely show up. I've tried adjusting the resolution to lower ones (it recommends 1920x1080) and it doesn't do much. Is there a way to adjust the taskbar so I can see it?  That is about what I see. I could make it bigger via Snipping Tool and see my entire desktop on the picture but not normally. Lightning force:createRecord capture redirect after save Is there a way to use force:createRecord but capture the redirect to the newly created record page that occurs after saving the record? Finally, prevent the redirect from completing?  createRecord : function (component) {     var createRecordEvent = $A.get("e.force:createRecord");     createRecordEvent.setParams({         "entityApiName": "Event__c"     });     createRecordEvent.fire(); } I can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I used the ls -a command to see the .bash_profile, but there isn't such a file.