I've tested the cp command, and it will only copy individual files. For example, I typed cp followed by the exact filename, then typed the directory and the file got copied. However, when I typed the directory and the destination directory, nothing on the computer changed. I thought cp was supposed to copy contents in the directories.  I've tried this multiple times.
let's say that I have a following file structure:  ~/DIR1 -fileA -DIR2 --fileB   Then, being in ~, I run this script:  cp DIR1 NEWDIR2   And just an error happens:  cp: omitting directory ‘DIR1’   I understand why nothing from DIR1 gets copied (because I didn't use -r switch that would enforce recursion) but I'd expect the DIR1 folder itself copied to NEWDIR2 (so practically a creation of a new "NEWDIR2" in ~ or a creation of ~/NEWDIR2/DIR1).  Could someone explain to me why is my expectation wrong?
Any nice, stable ways to keep a window 'Always on top' on the Mac? How to setup a restricted SFTP server on Ubuntu? I would like to know how to set up root, sudo, sftp-only user accounts which won't be required public key authentication at log in. I would also like to know how to set up sftp-only users' home directories where they can't access upper level other directories. I cleared all my browser data and visited  and it logged me back in. How?  This happens on Chrome on OS X and Windows 7.  Surely the security concerns outweigh the benefits to the user. What if a family member or friend wants to use my machine? I wouldn't want them logged in as me.  Update  My mistake, I should have said data &#8212; all those checkboxes clicked/checked. I completely cleared everything, yet it still logs me back in.  Update 2  Here's a video to prove it: SF Story about human adapting to alien environment This is a story that was read on BBC radio about thirty years ago, and this is about as right as I can remember it: The human pilot of a spacecraft is doing some reconnaissance on an alien planet. He crashes but survives. For some reason, no one will know where to look for him. He sees something in the distance that looks like a building of some sort. When he gets there, it seems to be a home. Very much like a human home. There's furniture, but it's strange and uncomfortable . There's food, but it's inedible. There's a faucet but what comes out of it seems more like acid. Everything looks as though it should be right, but it's not. He leaves the house, wanders and after a few days is desperate for water. But there isn't any water anywhere. He's close to death, crawling on the ground and then something happens. There are cracks in the soil and there appears to be water bubbling up from perhaps some underground stream. The water revives him. He goes back to the house and tries the food again. It's delicious and he eats enough to gain back his strength. Then he decides to try the water again. It's pure and wonderful. He takes a shower and the last line of the story is how refreshing the water is on his skin and something about him lifting his tail. I would like to be able to write a Java class in one package which can access non-public methods of a class in another package without having to make it a subclass of the other class. Is this possible? My Indian passport book cover is detached from the main book, but all other information, as well as the book is fine. I am traveling to India in 2 days. What should I do? Will there any problem at the airport? Safari autofill multiple e-mail adresses I have the following recurrence that I've been pounding on:  $$ a(0)=1\\ a(1)=1\\ a(2)=2\\ a(2n)=a(n)+a(n+1)+n\ \ \ (\forall n&gt;1)\\ a(2n+1)=a(n)+a(n-1)+1\ \ \ (\forall n\ge 1) $$  I don't have much background in solving these things, so I've been googling around looking for different techniques. Unfortunately, I haven't been able to correctly apply them yet. So far I've tried:   Characteristic equations Generating functions Plugging it into Wolfram Alpha Telescoping Observation   I'm sure that one or more of these is the way to go, but my biggest problem right now is figuring out how to deal with the idea that there are different equations for odd and even values of $n$. I'm not necessarily looking for a solution (though it would be gratefully accepted), but any nudges in the right direction would be much appreciated.    To follow up, it turned out that the speed problem described in my comment, below was related to the Decimal implementation in Python 2.7. Switching to Python 3.3 (and Java) made everything many orders of magnitude better. ArrayList contains case sensitivity What ways could you create a data extension that contains all the subscribers (SubscriberKeys) that are currently “in” a Journey (Journey Builder)?  The Journey I would like to do this for is a complex activity with multiple decision branches resulting in multiple possible journey durations. For example; if the customer didn’t open Email1 after 2 days, then send Email2; else Exit Journey. If the customer didn’t open Email2 after 2 days, then send Email3; else Exit Journey. Wait 2 more days, then End Journey. The minimum journey duration for the above example is 2 days, while the maximum is 6 days.  Note that I don’t want a list of subscribers that “entered” a Journey, but a list of the ones that are “currently in” a Journey and have not yet exited. Answer must account for non-standard Journey exits including Unsubscribes/Contact Deletes, etc. Let $p, q \in \mathbb{R}^n$ such that $\|p\| = \|q\| = 1$ and define $$A = pq^T + qp^T$$ Find the null space of $A$.    I am not having very much luck. I have managed to show that $p + q$ and $p - q$ are eigenvectors, but I can't seem to connect those two. I know that since $A$ is generated by an outer product, it is of rank one. That implies that the rank of the null space is $n - 1$, but I can't seem to get any further. Can anyone help? In classical logic, why is $(p\Rightarrow q)$ True if both $p$ and $q$ are False? I am studying entailment in classical first-order logic.  The Truth Table we have been presented with for the statement $(p \Rightarrow q)\;$ (a.k.a. '$p$ implies $q$') is: $$\begin{array}{|c|c|c|} \hline p&amp;q&amp;p\Rightarrow q\\ \hline T&amp;T&amp;T\\ T&amp;F&amp;F\\ F&amp;T&amp;T\\ F&amp;F&amp;T\\\hline \end{array}$$  I 'get' lines 1, 2, and 3, but I do not understand line 4.      Why is the statement $(p \Rightarrow q)$ True if both p and q are False?  We have also been told that $(p \Rightarrow q)$ is logically equivalent to $(~p || q)$ (that is $\lnot p \lor q$).  Stemming from my lack of understanding of line 4 of the Truth Table, I do not understand why this equivalence is accurate.       Administrative note. You may experience being directed here even though your question was actually about line 3 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 4, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines. Computing $\int_{0}^{\pi}\ln\left(1-2a\cos x+a^2\right) \, dx$ I wasn't aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any? Where is the GRLESS key? Mean absolute error OR root mean squared error? Why use Root Mean Squared Error (RMSE) instead of Mean Absolute Error (MAE)??    Hi  I've been investigating the error generated in a calculation - I initially calculated the error as a Root Mean Normalised Squared Error.  Looking a little closer, I see the effects of squaring the error gives more weight to larger errors than smaller ones, skewing the error estimate towards the odd outlier. This is quite obvious in retrospect.   So my question - in what instance would the Root Mean Squared Error be a more appropriate measure of error than the Mean Absolute Error? The latter seems more appropriate to me or am I missing something?  To illustrate this I have attached an example below:                    The scatter plot shows two variables with a good correlation,  the two histograms to the right chart the error between Y(observed ) and Y(predicted) using normalised RMSE (top) and MAE (bottom).     There are no significant outliers in this data and MAE gives a lower error than RMSE. Is there any rational, other than MAE being preferable, for using one measure of error over the other? How do I get label of the selected item from a lightning:select drop down list? I would like to get the value of the label of the selected drop down item.  In this case, the label is the Name of the Contact.  &lt;aura:component&gt;  &lt;aura:attribute name="contacts" type="Contact[]"/&gt;  &lt;lightning:select label="Contact" aura:id="contactList" name="contactList"&gt;     &lt;aura:iteration items="{!v.contacts}" var="c" indexVar="index"&gt;        &lt;option value="{!c.Id}"&gt;{!c.Name}&lt;/option&gt;    &lt;/aura:iteration&gt;  &lt;/lightning:select&gt;  &lt;/aura:component&gt;   I know how to get the value:  component.find("contactList").get("v.value");   But how do I get the label? Help with this trigonometry problem How do I figure the dice and bonuses for attack rolls and damage rolls? I'm building my character, a Half-Elf Ranger, and I'm a little confused about how to work out the attack bonus and the damage bonus.  So, please tell me if I've got this right:   I'm proficient with a longbow. That means my attack roll is 1d20 + prof bonus + Dex modifier. The damage roll however is 1d8 + Dex modifier.   I'm just a little confused about working out the numbers (without even going into spells and when to roll for attack, etc.) How can I get a new browser session when opening a new tab or window on Firefox/Chrome? When opening new Internet Explorer window, a new browser session is issued. Therefore you can login with two different accounts on the same service (let's say ). The same does not apply when opening a new tab in the same window in Internet&nbsp;Explorer.  How can I get a new browser session when opening a new tab or window on Firefox?  How about Google Chrome?