I keep writing functions like this one: subtract[{a_, b_}] := Subtract[a, b]
Scan vs. Map vs. Apply
Let $x,y,z>0$ and $x+y+z=1$, then find the least value of ${{x}\over {2-x}}+{{y}\over {2-y}}+{{z}\over {2-z}}$ Let $x,y,z&gt;0$ and $x+y+z=1$, then find the least value of  $${{x}\over {2-x}}+{{y}\over {2-y}}+{{z}\over {2-z}}$$  I tried various ways of rearranging and using AM > GM inequality. But I couldn't get it. I am not good at inequalities. Please help me.  I wrote $x$ as $1-(y+z)$ and I took $x+y$ as $a$ and the others as $b$ and $c$. And I am trying. how disable resume hard disk from Sleep on Shut Down I'm using Windows 7 , I set my drive to sleep after 10 minutes and it works but, when I shut down windows my hard drive resume from sleep. Why? It shouldn't keep hard drive sleep and shut down the PC ? How to read over 4k input without new lines on a terminal? So I have a lot of data WITHOUT NEW LINES on the clipboard (it's a large SVG file on one line). I went  $ cat &gt;file.svg   then tried to paste (in Gnome Terminal), but only the first 4kB characters were accepted.  I assume this is a readline feature/limitation.  Is there a way to read from STDIN that would avoid this problem?  EDIT  Test case: Create a demo file. This one will have ~4k "=" symbols followed by "foo bar".  { printf '=%.0s' {1..4095} ; echo "foo bar" ; } &gt; test.in   Copy that into your clipboard  xclip test.in   (if you want to middle-click to insert) or  xclip -selection clipboard test.in   (if you want to use Ctrl-Shift-Insert to past it in)  Then cat &gt;test.out, paste (whichever way). Press Ctrl-D to end the stream. cat test.out - do you see "foo bar"?  On my set-up (Ubuntu 12.04, Gnome Terminal, zsh) when I paste I only see the = and I don't see foo bar. Same when I inspect test.out. What is an observer in quantum mechanics? My question is not about (pseudo) philosophical debate; it concerns mathematical operations and experimental facts.  What is an observer? What are the conditions required to be qualified of observer, both mathematically and experimentally? math behind complex numbers C||RLC I have a mathematical problem with the following formula. The goal is to transform this equation to have a seperated real and imaginary part. I have already done this with several other equasions, but for this particualar one I don't know where to start.  I dont expect you to do the complete work of transforming for me, it would already be very nice if you could give me a hind on how you would start.  Thank you in advance!  C||RLC      This is my current progress:    My question is:  How can I get rid of the imaginary part jωC2*R?  When the denominator is completely real I can just split up the formula and have an imaginary and a real part. Ring of fractions of $R$ is integral over $R$ Let $R$ be a commutative ring and let $S\subseteq R$ be a multiplicative closed subset containing 1.     I need to show that if $S^{-1}R$ is integral over $R$, then $S^{-1}R=R$.   I don't see how to get started. How to carry audio over SSH? Is there a way to carry audio over ssh?   Say after connecting to remote machine through ssh -X I opened a browser and want to watch a youtube video. Currently I could only able to watch the video without any audio. But I want to hear the audio too. How to do that? Draw a vertical line over the entries of a column in an array I'd like to draw vertical/horizontal lines over the entries of a column/row in an array. I find the method to draw horizontal lines at . But when I used the same way to draw the vertical lines. It didn't look well. My codes are:  \usepackage{tikz} \usetikzlibrary{calc} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};} \newcommand{\DrawLine}[3][]{% \begin{tikzpicture}[overlay,remember picture]     \draw [#1] ($(#2)+(0,0.6ex)$) -- ($(#3)+(0,0.6ex)$); \end{tikzpicture}% }%  \begin{displaymath} \left[ \begin{array}{cccc} \tikzmark{11}{15} &amp; 0 &amp; \tikzmark{13}{0} &amp;0\tikzmark{14} \\ 0 &amp; 50 &amp; 20 &amp; 25 \\ 35 &amp; 5 &amp; 0 &amp; 10\\ \tikzmark{41}{0} &amp; 65 &amp; \tikzmark{43}{50} &amp; 65 \end{array} \right]. \DrawLine[black,thick]{11}{14} \DrawLine[black,thick]{11}{41} \DrawLine[black,thick]{13}{43} \end{displaymath}   The result looks like     But the result I want is     Does anyone know how to fix this? Thank you. I'd like to do it in Python. What I'd like to do in this example in C: #include &lt;stdio.h&gt;  int main() {     int i;     for (i=0; i&lt;10; i++) printf(&quot;.&quot;);     return 0; }  Output: ..........  In Python: &gt;&gt;&gt; for i in range(10): print('.') . . . . . . . . . . &gt;&gt;&gt; print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to &quot;append&quot; strings to stdout. Mann-Whitney U test with unequal sample sizes How do I iterate over a range of numbers defined by variables in Bash? How to cook fall-off-the-bone beef spare ribs in oven or on stove top? All,  I would like to cook spare ribs to a fall-off-the-bone consistency.  I don't have access to a grill.  I know how to do that with pork shoulders (dry rubbed, then uncovered in the oven at low heat for 6-8hrs), but spare ribs are a different type of animal.  They are individually smaller pieces (my ribs are sawed in chunks), and they are fairly fatty, with a big bone.  What should I do?  Should I pan-sear them first, do I need some liquid in the dish?  Should I cover them?  Thanks,  JDelage basic geometry angle problem Two straight lines, AB and AD, lie in the same vertical plane. AB makes an angle of 25 degrees with the horizontal, and AD makes 32 degrees with the vertical. What is the angle between AB and AD?  The answer is 33 degrees or 93 degrees.   I cannot visualize what this question is asking. It says both AD and AD lie on the same vertical plane, then immediately says AD makes 32 degrees with the vertical. Isn't this a contradiction? Plot Summary/Details  A human spacecraft lands on an alien world.  I'm not sure if they are exploring, or touched down for repairs. The world is a foreboding place, and home to a vicious predator that somewhat resembles a panther, or other big terrestrial cat. The creature is quite cunning, and ambushes several crewmen when they are scouting the planet or doing some other activity that would have them isolated and away from the ship. It sticks in my mind the creature is very strong, and able to bite through the heavy spacesuits the men wear with ease.  The creature has an unusual nutritional requirement of some sort. As such, it doesn't eat its victims, but somehow drains them of a particular element or chemical substance. I can't remember what it is, though I think it had something to do with the skeletal structure of the men. Calcium, maybe?  I have only very general recollections of how the story ends/is resolved. The humans become aware of the threat, and I believe they ultimately slay the beast. I can't recall anything more specific than that, unfortunately.  Timeframe of Publication  This one is old, I'm sure of that. I can remember the writing style and some of the descriptions being very "old school" - spacemen, rocketship, that sort of thing. Almost like something you'd see in an old sci-fi movie serial, to use a film analogy. If I had to guess, I'd say 1950's at the latest. Alright, I think we all agree that what happens with the following code is undefined, depending on what is passed,  void deleteForMe(int* pointer) {      delete[] pointer; }   The pointer could be all sorts of different things, and so performing an unconditional delete[] on it is undefined. However, let's assume that we are indeed passing an array pointer,  int main() {      int* arr = new int[5];      deleteForMe(arr);      return 0; }   My question is, in this case where the pointer is an array, who is it that knows this? I mean, from the language/compiler's point of view, it has no idea whether or not arr is an array pointer versus a pointer to a single int. Heck, it doesn't even know whether arr was dynamically created. Yet, if I do the following instead,  int main() {      int* num = new int(1);      deleteForMe(num);      return 0; }   The OS is smart enough to only delete one int and not go on some type of 'killing spree' by deleting the rest of the memory beyond that point (contrast that with strlen and a non-\0-terminated string -- it will keep going until it hits 0).  So whose job is it to remember these things? Does the OS keep some type of record in the background? (I mean, I realise that I started this post by saying that what happens is undefined, but the fact is, the 'killing spree' scenario doesn't happen, so therefore in the practical world someone is remembering.) Diffeomorphism group of the unit circle I am given to understand that the group of diffeomorphisms of the unit circle, $\operatorname{Diff}(\mathbb{S}^1)$, has two connected components, $\operatorname{Diff}^+(\mathbb{S}^1)$ and $\operatorname{Diff}^-(\mathbb{S}^1)$, the diffeomorphisms that preserve or reverse the canonical (counterclockwise) orientation, respectively.  Question 1: How does one prove that?  Question 2: Given $\Phi, \Psi \in \operatorname{Diff}^+(\mathbb{S^1})$, can one construct an explicit path joining them?  I'd be satisfied already with a proof that we can join $\Psi, \Phi \in \operatorname{Diff}^+ (\mathbb{S}^1)$, without giving the path explicitly. I tried the obvious path, $t \mapsto \dfrac{t\Phi + (1-t)\Psi}{|t\Phi + (1-t)\Psi|}$, but that doesn't seem to work.  Thanks. How does Apple AppStore rank search results? How to make different materials for different objects? When I change one material, it changes it on another object. Why and how do I fix it? is there some link between the objects?    Here is my blender file of Iron Man's faceplate.  Here is my whole screen with the main portion of the face selected. On the right, you can see the material, and I can tell you that that is the same as the eyes part: Is there a better way than the following to check to see if a string is nil OR has a length of 0 in Ruby?  if !my_string || my_string.length == 0   return true else   return false end   In C# there's the handy  string.IsNullOrEmpty(myString)   Anything similar to that in Ruby? How to compare two Pearson correlation coefficients Since a few days I do not get ahead when trying to compare two Pearson correlation coefficients. Imagine that I've got two datasets where on each I do a correlation between Land Surface Temperature and an urban metric. The datasets are different in their length, so the first one has round about 160.000 observables and the second one has about 2400 observables. For the correlation on the first dataset I get a Pearson of -0.74 and for the second I get -0.885. Now I want to find out whether these coefficients are significantly different from each other. Is there any appropriate method you could suggest?  I already played around with the Fisher-Z-Transformation, but from my point of view with no purposeful results. When I calculate the Fisher-Z on my coefficients, it results in 20.95 (Fisher-Z).  I would be very happy about suitable advices.