Why is my program not stopping?
How do I compare strings in Java?
vim and system clipboard I can cat a file, copy and paste text with the middle button or shift-insert.  How can I copy text in vim and paste it from the system clipboard? Filtered Review Queue doesn't show any audits Are there any disadvantages to unusual RAM amounts for virtual machines? This is going to seem like a silly question, but many many years ago I somehow got it into my head, perhaps from reading an article or speaking to people 'in the know' that a computer should not be run with 'odd' amounts of ram, such as 3,  5, 7 etc...    Is there any truth in this whatsoever?  I have a vmware environment with many servers in it.  I want to go through and alter the amounts of ram to reduce the overall ram usage and in many cases I want to give a server 3gb of ram as opposed to 4 or 2. How do I delete folders and files that were older than 7 days on the command line? I want to delete folders and its files were created longer than 7 days using the command line. Calculate the uncertainty in velocity of electron I got this question in one of my periodic test in coaching, I (seemingly) solved the question but later recognised what mess I did.  So, the question is :      Calculate the uncertainty in velocity of an electron. If the uncertainty in its position is ${10^ {-15}} \; \mathrm m$.   By simple calculations one can see that the answer would be ${5.79\times{10^{10}}} \; \mathrm{m/s}$. However, as one can see, the uncertainty in velocity is greater than the velocity of light then how is that possible or there is some other way to handle such problems.  P.S. I know the concept of dynamic mass but I am not very familiar with it. (I think that would work here, but don't know how?) Intuituive reason why Fermats last theorem holds I am unsure of whether it is normal, but to me, intuitively Fermats last theorem should not hold.  If anyone intuitively believed it to be correct, why?     Can someone explain so I understand somewhat why FLT holds without reading a massive and complex proof? Authenticate to Stack Exchange using GitHub I've seen sign in methods using  as an authentication provider, for example : (AWS Cloud9)        Is it possible to authenticate into Stack Exchange using this method? At the moment there's other methods such as OpenID, Google, Yahoo and Facebook, but it would be interesting to also have the GitHub authentication. Does light reflect if incident at exactly the critical angle? A lot of textbooks and exam boards claim that light incident at exactly the critical angle is transmitted along the media boundary (i.e. at right-angles to the normal), but this seems to violate the principle of reversibility in classical physics.  How would a photon or ray travelling in the reverse direction "know" when to enter the higher refracting medium?  It can't know, so I conclude that such light is simply reflected?  Is this correct? Which of the following two sentences is correct?  He must decide who to be. He must decide whom to be.  I can think of arguments for both sides, but I'm not sure. To elaborate, is who(m) the object of decide, the subject of be, or the object of be? Does the infinitive form of be have any bearing on the answer? And is there anything else to consider about the position or role of who(m) in this particular sentence that would inform the answer? The answers to the linked question  say to &quot;substitute he and him for who and whom.&quot; However, that doesn't give a clear answer in this context, because neither of those pronouns sounds right: &quot;He must decide to be he&quot;? &quot;He must decide to be him&quot;? Normally we'd use a reflexive pronoun here (&quot;He must decide to be himself&quot;) and it's not clear what case that corresponds to. In the , the key $k = (a, b)$ should have the following property, i.e. GCD of $a$ and the modulus should be 1:     $\gcd (a, m) = 1$, where $m$ is the set of possible moduli   My question is, why it is required that $a$ should have the above property? What is the significance of this? And why is $b$ excluded from this condition? I have a scenario where I have multiple threads adding to a queue and multiple threads reading from the same queue. If the queue reaches a specific size all threads that are filling the queue will be blocked on add until an item is removed from the queue.  The solution below is what I am using right now and my question is: How can this be improved?  Is there an object that already enables this behavior in the BCL that I should be using?  internal class BlockingCollection&lt;T&gt; : CollectionBase, IEnumerable {     //todo: might be worth changing this into a proper QUEUE      private AutoResetEvent _FullEvent = new AutoResetEvent(false);      internal T this[int i]     {         get { return (T) List[i]; }     }      private int _MaxSize;     internal int MaxSize     {         get { return _MaxSize; }         set         {             _MaxSize = value;             checkSize();         }     }      internal BlockingCollection(int maxSize)     {         MaxSize = maxSize;     }      internal void Add(T item)     {         Trace.WriteLine(string.Format("BlockingCollection add waiting: {0}", Thread.CurrentThread.ManagedThreadId));          _FullEvent.WaitOne();          List.Add(item);          Trace.WriteLine(string.Format("BlockingCollection item added: {0}", Thread.CurrentThread.ManagedThreadId));          checkSize();     }      internal void Remove(T item)     {         lock (List)         {             List.Remove(item);         }          Trace.WriteLine(string.Format("BlockingCollection item removed: {0}", Thread.CurrentThread.ManagedThreadId));     }      protected override void OnRemoveComplete(int index, object value)     {         checkSize();         base.OnRemoveComplete(index, value);     }      internal new IEnumerator GetEnumerator()     {         return List.GetEnumerator();     }      private void checkSize()     {         if (Count &lt; MaxSize)         {             Trace.WriteLine(string.Format("BlockingCollection FullEvent set: {0}", Thread.CurrentThread.ManagedThreadId));             _FullEvent.Set();         }         else         {             Trace.WriteLine(string.Format("BlockingCollection FullEvent reset: {0}", Thread.CurrentThread.ManagedThreadId));             _FullEvent.Reset();         }     } } Embed vimeo video into the body field MySQL cartesian product between two SELECT statements Profitable strategy in coin tossing? Constant Amortized Time What is meant by "Constant Amortized Time" when talking about time complexity of an algorithm? Verify is tautology by using logical equivalence Verify is tautology by using logical equivalence:  $$((p ∨ q) ∧ (p → r) ∧ (∼ r)) → q$$  by showing what laws are using, step by step explanation needed.  Logical equivalence: de morgan's laws, commutativity, associativity, double negative, distribution, idempotent, absorption, identity, universal bound, negation  Rules of inference: modus ponens, modus tollens, generalisation, specialisation, conjunction, ellimination, transivity, proof by division into cases, contradiction  What I got so far:  I need to prove   $$((p ∨ q) ∧ (p → r) ∧ (∼ r)) → q ≡ \text{tautology}$$ Since $p → r$ same as $∼ p ∨ r$: $$((p ∨ q) ∧ (p → r) ∧ (∼ r)) → q ≡ ((p ∨ q) ∧ (∼ p ∨ r ) ∧ (∼ r)) → q$$  I am stuck here How to get access to USB-storage from an application installed as Snap? I have Ubuntu 18.04 LTS installed. I inserted USB-flash to my laptop. It was automounted to /media/username/DISKLABEL and opened in Nautilus. I can read and write objects to it. How can I access it from the application, which is installed as Snap? I tried snaps of the following applications such as gedit, arduino-mhall119, organize-my-files. All them show me errors if I navigate to /media folder:    Could not read the contents of Media Error opening the directory of '/media': permission denied  Output of active Snap  is below: $ snap interfaces  | grep -v &quot;.*-$&quot; Slot                             Plug :browser-support                 organize-my-files :core-support                    core:core-support-plug :cups-control                    gedit :desktop                         gedit,organize-my-files :desktop-legacy                  gedit,organize-my-files :gsettings                       gedit,organize-my-files :home                            arduino-mhall119,gedit,organize-my-files :network                         arduino-mhall119,gedit,organize-my-files,pulsemixer :opengl                          organize-my-files :pulseaudio                      organize-my-files,pulsemixer :unity7                          arduino-mhall119,gedit,organize-my-files :wayland                         gedit :x11                             arduino-mhall119,organize-my-files,pulsemixer gnome-3-26-1604:gnome-3-26-1604  gedit gtk-common-themes:gtk3-themes    gedit gtk-common-themes:icon-themes    gedit gtk-common-themes:sound-themes   gedit -                                arduino-mhall119:serial-port -                                gedit:avahi-observe -                                gedit:mount-observe  Updates:  connecting mount-observe to Gedit with snap connect gedit:mount-observe does not help. it seems that we need special Snap with support of  interface. Crossroads / Second Chance / Choices I am trying to find a short story involving an alien race of 'Intellectuals.' They possess no opposable thumbs or other limbs to control their world.  I think the basis of the story is their discovery of a way to influence another unintelligent species that can manipulate objects.  This leads to a new start for them.  They may have been at risk of breeding beyond available resources.  The story ends with explorers returning from sea. They may have discovered a new land into which they can expand. The last few scenes have a darker flavor where one character has been presented with a rock that glows in the dark. He considers it for a period before being called away to greet the explorers. The author then takes over and makes some comments about most species passing one crossroads only to meet another.  The story could have been written at any time from the Golden Age though to the 1970's. Different batteries connected in parallel If we have 2 batteries one of emf x and the other is of emf y and we connect them in series we get an effective emf of x+y.  But what if we connect them in parallel, how to calculate the emf now? Install Headers on Kali apt-get install linux-headers-`uname -r` Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-headers-4.9.0-kali3-amd64 E: Couldn't find any package by glob 'linux-headers-4.9.0-kali3-amd64' E: Couldn't find any package by regex 'linux-headers-4.9.0-kali3-amd64'