Program not noticing when the string is equal to a specific string
How do I compare strings in Java?
A worker carries two bags. Each of the bags initially contains N nails. Whenever the worker needs a nail, he takes it from a bag picked at random. At some point the worker picks an empty bag. Find the probability that the other bag contains exactly m nails.  My reasoning:  The desired probability: $C_2^1 \cdot P(|A| = 0\ and\ |B| = m)$, where A, B - sets of nails in each bag. Then we can "divide" this probability (I suppose that I deal with independent events):  $P(|A| = 0\ and\ |B| = m) = P(|A| = 0) \cdot P(|B| = m);$  $P(|A| = 0) = (\frac{1}{2})^N$, where $|A| = |B| = N$ (initial condition).  $P(|B| = m) = (\frac{1}{2})^{N - m}$  Result: $C_2^1 \cdot P(|A| = 0\ and\ |B| = m)$ = $C_2^1 \cdot (\frac{1}{2})^{2N - m}$  Am I wrong or it is correct? How do I install the Nvidia drivers? I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me? I'm writing a tool to report information about .NET applications deployed across environments and regions within my client's systems.  I'd like to read the values of assembly attributes in these assemblies.  This can be achieved using Assembly.ReflectionOnlyLoad, however even this approach keeps the assembly loaded.  The issue here is that I cannot load two assemblies that have the same name from different paths, so naturally I can't compare the same application deployed in different systems.  At this point I'm assuming the solution will involve using temporary AppDomains.  Can someone detail how to load an assembly into another AppDomain, read the attributes from it and then unload the AppDomain?  This needs to work for assemblies on the file system as well as those at URL addresses. I use Ubuntu 12.04 64-bit, I did the following: sudo gedit /etc/apt/apt.conf and added  APT::Install-Recommends "false"; APT::Install-Suggests "false";    But it did not work. When I try to install a package, it still wants to install the suggested and recommended packages. How can I solve this? Gravitational slingshot of light using a black hole/massive object Wikipedia has this page on  using planets. In some cases this effect was used to accelerate the spacecraft to a higher velocity. This diagram shows this in a very oversimplified manner.   That got me thinking that if light is affected by gravity, and if it slingshots around the black hole/massive object, can't it gain a higher speed than $c$? What limitations are stopping it from doing this?  Forgive me if the answer to this question is pretty straight-forward or staring-you-in-the-face kind. I haven't fully understood the mechanics of the gravitational slingshot fully yet, but I couldn't wait to ask this. Note: If it is possible (I highly doubt that!), could you provide an explanation using Newtonian mechanics, I'm not very familiar with general relativity because I'm in high school. Should 'using' directives be inside or outside the namespace? I have been running  over some C# code, and it keeps reporting that my using directives should be inside the namespace.  Is there a technical reason for putting the using directives inside instead of outside the namespace? Does it make sense to Favourite a Question you created? Is this just a redundant act, or are there differences? From my old HD (Ubuntu 16.04) I copied ~/.thunderbird and other programs to the new disk with Ubuntu 18.04 installed. All went good. I tried to install Opera. The installation was unsuccessful, a window asking something was held. After that Thunderbird Local Folders -> Inbox (only) was invaded by large icons like this screenshot  Flowers, plants, trucks and others. I restarted but those images are still there. Opera was successfully installed. What can I do to remove them? There was the following sentence in an article titled, “Like, Degrading the Language? No Way” in New York Times (April 5), in which the author says Americans are moving backward on language:     “(Like the use of ‘like’) the use of “totally” mines the same vein.   “He’s totally going to call you” does not mean “He is going to call   you in a total fashion.” It has a more specific meaning, although only   handled subconsciously by speakers, as so much of language is. “He’s   totally going to call you” contains an implication: that someone has   said otherwise or that the chances of it may seem slim at first glance   but in fact aren’t. As with “like,” “totally” tracks and nods to the   opinions of others. It’s totally civilized.”      Although the author explains “totally going to call you” contains an implication of someone having said otherwise, I’m not still clear with the meaning of “He’s totally going to call you.”   What does it mean? He’s totally going to call you “what”?   How does “He’s totally going to call you.” differ from “He’s going to call you.”? Is this expression (use of totally) ubiquitous today as the author asserts? What is the point of throwing candy on the ground using the "Throw 10 candies on the ground"? All that seems to happen is that the text under it becomes more and more disappointed in me. ಠ_ಠ Been trying to this line to parse for a good 20mins, but all attempts have failed:  \beta = $-$0.84, t = $-$2.09, P = 0.04   Could anyone tell me why I'm getting a Missing $ inserted error here? Error notification on plone 4 product of normal and lognormal variates If x and y are uncorrelated normal variates, x*exp(y) will have a symmetric unimodal distribution with positive excess kurtosis. Has this distribution been named and studied? Can I visit the US for tourism on a previously unused B1/B2 visa? Note: This is NOT a duplicate of  Difference: In both other questions, the posters traveled once to the US for the original purpose for which the B1 visa was obtained. Their question is about visiting again using the same visa. However, I've not traveled to the US yet, and I'm planning my visit. What I want to understand whether I can use this visa for a visit whose purpose is not the same as what was submitted along with the application.  Can I use a B1/B2 visa for tourism that was originally obtained for business purposes BEFORE I actually visit the US even once? I had applied for a business visitor visa for a valid business reason but by the time I got it stamped, my plan changed. So I've not visited the US even once. Can I now use this visa to visit as a tourist without having used that visa for its original intended purpose? PS: I live in India. In what situation do you put a comma before "because"?   And, when do you not put a comma before "because"?   I've always assumed that you put a comma, because the clause introduced by "because" will always be independent, because it cannot stand on its own, because it wouldn't make sense on its own.   Is this the case? Could you think of an example where it doesn't take a comma? There's a spaceship, nearing the end of its journey. Everybody on board is in cryosleep. For some reason the wake-up system malfunctions, and the ship will fly on indefinitely. The people at the space port realise this, and try to wake someone up. Their last resort is finding someone on board who is telepathic, and wake this person up. They find one, but it turns out to be an unborn baby. Can you change your email for Pokemon Go? Do these two observations suffice to show that a finite boolean ring must be of the form $\mathbb{Z}_2\times\cdots\times\mathbb{Z}_2$? Question: If $R$ is a finite boolean ring, then show $R \cong \mathbb Z_2 \times \mathbb Z_2 \times \cdots\times \mathbb Z_2$.   I know that   $\mathrm{char}(R) =2$  $R$ has $2^k$ elements for some $k$  (this is because, if $p\neq 2$ is a prime with $p\mid|R|$, then there exists a non-zero $x \in R$ s.t. $px=0$ and $p $ is odd $\implies x=0$, contradiction).   Does this suffice to answer my question? Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent? Dual-boot boot menu does not show up after installing Ubuntu 15.10 alongside Windows 10