Let $z=a+ib,w=c+id\in\mathbb{C}. $Prove $|z|-|w|\leq|z-w|$   Solution: If $|z|-|w|\leq 0$ then we are done since $|z-w|\geq 0$. Suppose $|z|-|w|&gt;0$. The stages are going backward: $$ \\ |z|-|w|\leq|z-w|\Leftarrow  \\ (|z|-|w|)^2\leq |z-w|^2\Leftarrow  \\ (\sqrt{a^2+b^2}-\sqrt{c^2+d^2})^2\leq(a-c)^2+(b-d)^2\Leftarrow  \\ ac+bd\leq c^2+d^2+\sqrt{(a^2+b^2)(c^2+d^2)} $$  How can I finish it?  Also, is there a way to solve it without using $a,b,c$ and $d$?
Can somebody please check if my proof is okay?  Prove that $||z_1|-|z_2|| \leq |z_1-z_2|$.  Attempt: This proof seems similar to the triangle inequality proof.  $$\begin{split} |z_1-z_2|^2 &amp;= (z_1-z_2) \overline{(z_1-z_2)} \\ &amp;= (z_1-z_2)(\bar z_1 - \bar z_2) \\ &amp;= z_1\bar z_1 - z_1 \bar z_2 - \bar z_1 z_2 + z_2 \bar z_2\\ &amp;=|z_1|^2 - 2Re(z_1 \bar z_2) + |z_2|^2\\ &amp; \geq |z_1|^2 -2|z_1 \bar z_2| + |z_2|^2 \\ &amp;= |z_1|^2 - 2|z_1||z_2| + |z_2|^2 \\ &amp;= (|z_1| - |z_2|)^2. \end{split}$$  Taking the square root of both sides gives $|z_1|-|z_2| \leq |z_1-z_2|$  Can I just take the norm of both sides so that $||z_1|-|z_2|| \leq ||z_1-z_2|| = |z_1-z_2|$?  Thank you.
Which loss function is correct for logistic regression? I read about two versions of the loss function for logistic regression, which of them is correct and why?  From  (in Chinese), with $\beta = (w, b)\text{ and }\beta^Tx=w^Tx +b$: $$l(\beta) = \sum\limits_{i=1}^{m}\Big(-y_i\beta^Tx_i+\ln(1+e^{\beta^Tx_i})\Big)  \tag 1$$  From my college course, with $z_i = y_if(x_i)=y_i(w^Tx_i + b)$: $$L(z_i)=\log(1+e^{-z_i}) \tag 2$$    I know that the first one is an accumulation of all samples and the second one is for a single sample, but I am more curious about the difference in the form of two loss functions. Somehow I have a feeling that they are equivalent. Split a string with delimiters but keep the delimiters in the result in C# My network includes machines running Linux and others running Windows. And my machine is running Linux. Quick Look support for non-native video files (.avi, .mkv) on Mavericks In the past, we've been able to get codecs for DivX/XviD/MPEG4 and support for containers like AVI, MKV in Mac OS X's Quick Look feature using  (as per ).  As noted on the Perian site, development has ceased, and future versions may or may not continue to work. It seems with the upgrade to OS X 10.9 "Mavericks", the OS or Quick Look API has changed sufficiently that Perian no longer works.  Are there any alternatives? Ideally a one-app-does-all like Perian, but even a list of individual codecs and/or plug-ins for video container files would be useful.  NB: This question isn't about video players—there are many that support more than those playable via the built-in QuickTime player. This question is about codecs/plug-ins for QuickTime on OS X to allow it and Quick Look (and apps which rely on the OS to play videos) to open/play video files/formats lacking native support. UK PLAB Visa Refusal due to unexplained bank deposits I had applied for a PLAB (Doctors) Visa for the UK to appear in PLAB test. I got refused on the basis of two recent large deposits in the bank statement I provided (my mothers). In reality, these are my own savings which I had deposited in her account to make it more strong. The only objection I got was that I must provide evidence for the source of these deposits. Other than this, I have previously travelled to the UK and USA as well as other parts of the world and my travel history is fine. Can someone please advise on how to proceed and re-apply? Question about mosfet gate resistor I have n mosfet gate connected to  logic and Id is about 100mA. Both 4043 and mosfet has +5v. I have plan to use  mosfet  Questions are: How large gate resistor i need between 4043 and mosfet? Logic output is sometimes put on rapidly. How fast? Motherboard hdd led controls that. Do i need to place pull down resistor from logic to -0v, between 4043 and mosfet? Why is there no plural 's' after "hundred" or "thousand" in cardinal numbers? Let's say we have the numeral "12,345". Why is it pronounced as "twelve thousand three hundred and forty five" as opposed to "twelve thousands three hundreds and forty five". Are 's's omitted while pronouncing numerals to make the whole thing more succinct and easier to pronounce? Filling HTML  dropdown list in JSP with values fetched from database in Servlet Environment.TickCount vs DateTime.Now Im trying to run the following code as a powershell script,but I cant get it to work. 1st,the following works with one -Include item but I cant seem to get it to work with multiple ones. 2nd, the -Exclude perimeter doesn't seem to work. I still get files from the C:\Windows and C:\Program Files directorys .  $Include = "*.zip","*.rar","*.tar","*.7zip" $exclude = "C:\Windows","C:\Program Files" Get-ChildItem "C:\" -Include $Include -Exclude $Exclude -Recurse -Force -ErrorAction silentlycontinue | Select-Object -ExpandProperty FullName   Note: The purpose of this script is to find all compressed files on the system. I know this is probably really simple but I just cant seem to get it to work. How do I set environment variables? I'm trying to set up Apache Tomcat on my pc, and it wants me to set up an environment variable for CATALINA_HOME.  Does any know how to do this? How can I sum two values and store the result in other variable? In LaTeX2e,how can I sum two values and assign them to other variable?  I want to compute something like:   var=\textwidth - 1cm    And if both were constants:   var=1+1 I wrote an email to Prof. X to ask about a PhD student vacancy and talk about a topic in one of his papers. He refused to accept me because of his retirement and replied with a warming email. In that, he cc-ed two others that he thought might be interested in me, Prof. Y and Prof. Z. Prof. Y refused because his area is somewhat distinct to mine; Prof. Z hasn't answered yet. I haven't responded to anyone yet. I also want to ask Prof. X's opinion about Prof. T's work, who is actually the one that I want to follow.  How should I respond to this? My feeling is that if Prof. X cc-ed others, this means that he wants to create a group discussion. As a group, everyone should have the right to hear each other voices. Should I reply to the group with a generic "thank you" email?  But if I do that, then I have to send another private emails to Prof. X and Prof. Z. I just worry that this will make me looks sneaky because I don't have the courage to discuss this in public.   What should I do? How does a calculator calculate the sine, cosine, tangent using just a number? Sine $\theta$ = opposite/hypotenuse   Cosine $\theta$  = adjacent/hypotenuse   Tangent $\theta$  = opposite/adjacent      In order to calculate the sine or the cosine or the tangent I need to know $3$ sides of a right triangle. $2$ for each corresponding trigonometric function. How does a calculator calculate the sine, cosine, tangent of a number (that is actually an angle ?) without knowing any sides? Smaller vs. less vs. lesser I am confused as to some of the vocabulary that can be used to compare numbers and quantities, and would very much appreciate some clarification.   I suppose it is safe to say that 1 is smaller than 2.   Can I also say that 1 is less than 2, and if so, which form is preferable?   It seems that saying that 1 is lesser than 2 is uncommon - but is it incorrect?   Finally, -2 is clearly less than -1, but is it true that -2 is smaller than -1? (If I have 2$ of debt, then I would say that I have less money than if I had 1$ of debt, but I would also say that my debt was larger, not smaller). Azure Same Storage on VM In episode 10 of Full Metal Alchemist: Brotherhood, during the events in the Research Lab 5, Edward Elric is severely hurt. Later in the hospital, he writes down everything he had come to know, and he discusses with Alphonse, Hughes, and Armstrong about what to do with the information to continue the investigation.  At this point, King Bradley arrives with lemon into the room. He finds out what they are doing but acts very calm and chilled out and allows them to continue investigation while being careful.  Why did he not get Hughes and Armstrong killed at that point? Or at least tell them to not investigate at all? My question concerns the inductive step of the proof below. I've typed out the work I've done so far. If anyone has any suggestions on how to proceed thanks in advance.  If $n\in\mathbb{N}$, then $(1-\frac{1}{2})(1-\frac{1}{4})(1-\frac{1}{8})(1-\frac{1}{16})\cdots(1-\frac{1}{2^n})\ge\frac{1}{4}+\frac{1}{2^{n+1}}$.  $Proof.$ We use mathematical induction.  Base Case. For $n=1$ we see that $1-\frac{1}{2}\ge\frac{1}{4}+\frac{1}{4}$ since $\frac{1}{2}\ge\frac{1}{2}$.  Inductive Step. Let $n&gt;1$. Assume our statement is true for $n$. Now observe that  $\begin{align}(1-\frac{1}{2})(1-\frac{1}{4})(1-\frac{1}{8})(1-\frac{1}{16})\cdots(1-\frac{1}{2^{n+1}})&amp;\ge\\ \left((1-\frac{1}{2})(1-\frac{1}{4})(1-\frac{1}{8})(1-\frac{1}{16})\cdots(1-\frac{1}{2^{n}})\right)(1-\frac{1}{2^{n+1}})&amp;\ge(\frac{1}{4}+\frac{1}{2^{n+1}})(1-\frac{1}{2^{n+1}}) \end{align}$  My question is: How do we get from $\begin{align} (\frac{1}{4}+\frac{1}{2^{n+1}})(1-\frac{1}{2^{n+1}}) \end{align}$ to $\frac{1}{4}+\frac{1}{2^{(n+1)+1}}$?  Most of what I've attempted has led to tedious calculations that do not simplify to the desired result. I've also tried making the argument that $(1-\frac{1}{2^{n+1}})$ must be $\ge$ to $\frac{1}{2}$ but then I'm stuck with $\frac{1}{8}+\frac{1}{2^{(n+1)+1}}$... Is my approach incorrect here? $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$   by directly substituting $x=0$ i got $\infty$ by using L-H's rule, i got $-1/8$   the given options are  $a)\frac{24e}{11}$    $b)\frac{11e}{24}$    $c)\frac{e}{11}$    $d)\frac{e}{24}$    may be the question would be  $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$ Project Euler Question 14 (Collatz Problem)