I have a new MacBook Pro that I leave plugged in and closed because I use an external display, keyboard, and mouse. My monitor, keyboard, and mouse are also used by my PC. When I'm finished with work, I'd like to be able to easily sleep the Mac so that my monitor can automatically switch over to my home PC.  say:  Option–Command–Power button* or Option–Command–Media Eject : Put your Mac to sleep  But my Windows keyboard doesn't have a &quot;Media Eject&quot; or &quot;Power&quot; button on it. What are my other options for easily putting my Mac to sleep? I already know I could use the mouse to click Apple &gt; Sleep. And I could open the lid and use the power button. But I'd prefer a keyboard command.
I am looking for a quick way to sleep without closing the lid, or using the mouse.  If it matters, I have Lion version OS and a MacBook Air.
Newton's third law does not apply to the kinetic energy formula? Here is a classic problem:     A 60kg boy and a 40kg girl are sitting in front of each other on skateboards on a frictionless horizontal surface. The boy pushes the girl and the girl gains a velocity of 0.3m/s during the 0.5s the boys hand was in contact with her. What is the boy's resulting velocity?   Considering Newton's Third Law, the best way is to find the total force applied and rearrange the formula to find the boy's speed.  Newton's Law Method:  $F = m*a$  $a=\frac{0.3m/s}{0.5s}$  $F = 40kg * 0.6m/s^2$  $F = 24N$  Therefore the boy's speed will be:   $\frac{24N}{60kg} = a$  $a = 0.4m/s^2$  $v = 0.4m/s^2 * 0.5s$  $v = 0.2m/s$  Kinetic Energy Method:  $E_{k}=\frac{1}{2}*m*v^2$ the girl's kinetic energy  $E_{k}=\frac{1}{2}*40kg*(0.3m/s)^2$  $E_{k}=1.8J$  Since every action has an equal and opposite reaction the boy should have the same amount of kinetic energy.  $E_{k}=\frac{1}{2}*60kg*(0.2m/s)^2$  $E_{k}=1.2J$  As you can see, using Newton's Third Law, the kinetic energy was not the same. So what's going on here? I thought that in this case they should both have the same amount of kinetic energy due to Newton's Law. I must be missing something since there is more energy going in one direction than the other after meeting. My book used the first method as the answer and, well, it feels wrong. Why can't Transporter technology be used as a weapon? Seems like this is the most powerful weapon of all: transport your enemy into a bulkhead, planet, etc. Transport your enemy's ship inside a planet, etc.  Is there some technical reason that it can not be used this way? If $p$ and $q$ are distinct primes such that $p|c$ and $q|c$, prove that $pq|c$ How can I get out of the debt-trap as quickly as possible? I have a credit card with 30% interest and a real estate loan with 11% interest. The amount of debt on my card is lower than the real estate loan.   I want to redeem the installments of the real estate loan, but I can't do it because the credit card debt takes all my money.    What can I do in this situation? How can I get out of the debt-trap as quickly as possible?   I have a 4-room house and 2 cars, and 2 children who have to go to school, that's why there are a lot of fix expenses. "'void' type not allowed here" error (Java) What is a concise function that formats a (String) decimal into a currency format in Apex? goal: write the most concise function that formats a (String) decimal into a currency format in Apex. Feel free to trainwreck the code for points, I've kept mine exploded for readability purposes. No package php-imap available on CentOS 7 I'm running a dedicated server with CentOS 7 64bit, here is the output when trying to install IMAP:    yum install php-imap   Loaded plugins: fastestmirror   Loading mirror speeds from cached hostfile    * base: ftp.ciril.fr    * extras: ftp.ciril.fr    * updates: ftp.ciril.fr   No package php-imap available.   Error: Nothing to do       Also the same when disabling exclusions:    sudo yum install --disableexcludes=all php-imap Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile  * base: ftp.ciril.fr  * extras: ftp.ciril.fr  * updates: ftp.ciril.fr No package php-imap available. Error: Nothing to do How to check if $\sum_{n=1}^\infty \frac 1{n!}$ is converging or diverging by direct comparison test? $$\sum_{n=1}^\infty \frac 1{n!}$$   I think we may compare it with $\frac{1}{n^n}$, and say that $\frac{1}{n!}&gt;\frac{1}{n^n}$. But I am not sure of the convergence or divergence of $\frac{1}{n^n}$ itself, so this turns out to be useless.  What other way is there? Sum with parameter convergence Using --exclude with the du command This is probably something basic but I'm not able to make it work. I'm trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads but not every directory called uploads. For example, my file structure looks a bit like this:  /store   /uploads     /junk_to_ignore     /more_junk_to_ignore   /user_one     /uploads   /user_two   I can run the following command:   du -ch --exclude=uploads*    and it gives me the file size minus all the "uploads" directories. However, in trying to exclude certain directories (and all its sub-directories) I fail. I've tried variations of:  du -ch --exclude=./uploads* du -ch --exclude='/full/path/to/uploads/*'   but can't seem to figure it out. How do I exclude a specific directory? Can I watch the progress of a `sync` operation? I've copied a large file to a USB disk mounted on a Linux system with async. This returns to a command prompt relatively quickly, but when I type sync, of course, it all has to go to disk, and that takes a long time.  I understand that it's going to be slow, but is there somewhere where I can watch a counter go down to zero? Watching buffers in top doesn't help. Peggy would like to prove to Victor that she knows the discrete logarithm of $y$ based $g$; that is, she knows $x$ such that $y = g^x \bmod p$. One round of the interactive proof protocol consists of the following steps.   Peggy picks random $k \in \mathbb Z/(p−1)\mathbb Z$, computes $t = g^k \bmod p$, and sends $t$ to Victor. Victor picks random $h \in \mathbb Z/(p−1)\mathbb Z$ and sends $h$ to Peggy. Peggy computes $r = (k − hx) \bmod (p − 1)$ and sends $r$ to Victor. Victor verifies that $t = g^r y^h \bmod p$.   The interactive protocol can be converted into a noninteractive zero-knowledge proof by choosing and making public a collision-resistant hash function $H$, and changing the second step of the interactive protocol to the following: Peggy computes $h = H(y, t)$. Then the noninteractive proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(y, t), \qquad t \stackrel?= g^r y^h \bmod p.$$   What is the problem if in the non-interactive proof the hash $h$ depends only on $y$? That is, $h = H(y)$, and the proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(y), \qquad t \stackrel?= g^r y^h \bmod p.$$ What is the problem if in the non-interactive proof the hash $h$ depends only on $t$? That is, $h = H(t)$, and the proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(t), \qquad t \stackrel?= g^r y^h \bmod p.$$ Is there an "exists" function for jQuery? Is it possible to use more than 20 layers? Is it possible to use more than 20 Scene layers or Render layers in Blender? Intuitive explanation of binomial coefficient formula Regarding the formula for binomial coefficients:  $$\binom{n}{k}=\frac{n(n-1)(n-2)\cdots(n-k+1)}{k!}$$  the professor described the formula as first choosing the $k$ objects from a group of $n$, where order matters, and then dividing by $k!$ to adjust for overcounting.  I understand the reasoning behind the numerator but don't understand why dividing by $k!$ is what's needed to adjust for overcounting. Can someone please help me understand how one arrives at $k!$? Thanks. I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS. Do badges get calculated in real time, or do they get calculated by an external service? How long does it take for a badge to be awarded, once its requirements are met?  Does Stack Overflow use any external services to do things, like maintenance, e-mailing or badge calculation? how to calculate $\int_C \frac{2xy^2dx-2yx^2dy}{x^2+y^2}$ using green theorm or directly Calculate $$\int_C \frac{2xy^2dx-2yx^2dy}{x^2+y^2},$$ where $C$ is the ellipse $3x^2 +5y^2 = 1$ taken in the positive direction.   I tried to calculate the integral using green theorm.  now i need to build enclosier that doesn't enclose $(0,0)$ i am having hard time guessing what to build.  a circle and ellipse might be perfect but then the domain is not easy to write. can i have hint please ? 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.) Copy game data from one PS4 to another?