Cannot find a logic error in my simple code
How do I compare strings in Java?
How can I search for bounty questions? Is there any possible way to search and list the bountied questions separately in SE? In the sentence     What’s funny is Cat’s dry humour.   Wouldn’t it be better to put a comma after “funny”:     What’s funny, is Cat’s dry humour.   This question entails a (at the time of writing) heated discussion in the . "had they known" or "if they had known" Can this:     These same officials, however, would have been appalled had they known what was going on behind this façade of self-help.   be rephrased as     These same officials, however, would have been appalled if they had known what was going on behind this façade of self-help.   ? Prove by induction that $$(a_{1}+a_{2}+\cdots+a_{n})\left(\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}\right)\geq n^{2}$$  where $n$ is a positive integer and $a_1, a_2,\dots, a_n$ are real positive numbers   Hence, show that  $$\csc^{2}\theta +\sec^{2}\theta +\cot^{2}\theta \geq 9\cos^{2}\theta$$  Please help me.  Thank you! How do I recursively create a folder inside another non-existent folder? I want to create this folder: $HOME/a/b/c/d while $HOME/a has not yet been created! Is it possible with one line in Terminal? Normality assumption in linear regression Avoiding copy of objects with the "return" statement Fastest way to try all passwords Suppose you have a computer with a password of length $k$ in an alphabet of $n$ letters.  You can write an arbitrarly long word and the computer will try all the subwords of $k$ consecutive letters. What is the smallest word that contains all combinations of $k$ letters as subword? (i.e. the fastest way to hack the computer :) )  The smallest word that contains $n^k$ subwords of size $k$ has length $k-1+n^k$ and based on some easy cases, we would like to prove that it is in fact possible to find a word of such length that contains all possible passwords. The problem can be translated into a problem in graph theory, by taking as vertices all words of length $k$.  We tried $k=2$, where you can prove the conjecture by induction. For $n=2$ and small $k$ it also works. How can I use Unicode-aware regular expressions in JavaScript?  For example, there should be something akin to \w that can match any code-point in Letters or Marks category (not just the ASCII ones), and hopefully have filters like [[P*]] for punctuation, etc. Why can't I use a type argument in a type parameter with multiple bounds? So, I understand that the following doesn't work, but why doesn't it work?  interface Adapter&lt;E&gt; {}  class Adaptulator&lt;I&gt; {     &lt;E, A extends I &amp; Adapter&lt;E&gt;&gt; void add(Class&lt;E&gt; extl, Class&lt;A&gt; intl) {         addAdapterFactory(new AdapterFactory&lt;E, A&gt;(extl, intl));     } }   The add() method gives me a compile error, "Cannot specify any additional bound Adapter&lt;E&gt; when first bound is a type parameter" (in Eclipse), or "Type parameter cannot be followed by other bounds" (in IDEA), take your pick.  Clearly you're just Not Allowed to use the type parameter I there, before the &amp;, and that's that. (And before you ask, it doesn't work if you switch 'em, because there's no guarantee that I isn't a concrete class.) But why not? I've looked through Angelika Langer's FAQ and can't find an answer.  Generally when some generics limitation seems arbitrary, it's because you've created a situation where the type system can't actually enforce correctness. But I don't see what case would break what I'm trying to do here. I'd say maybe it has something to do with method dispatch after type erasure, but there's only one add() method, so it's not like there's any ambiguity...  Can someone demonstrate the problem for me? How to find roots of $X^5 - 1$? How to find roots of $X^5 - 1$? (Or any polynomial of that form where $X$ has an odd power.) I'm trying to recover a Windows system from backups and can't seem to find where Chrome saves its bookmarks.   Does anybody know where Chrome saves its bookmarks on Windows? In the example  $\cup^{i=1}_{\infty}F_i$   How do you get the i=1 directly below the union symbol and the infinity directly above? How is Cycles different from Blender Internal? Nested Virtualization What I do: I want to write a kernel module that does stuff to the KVM data structures. But I don't want to run it on the real machine, so I run one guest, inside it I run another two guests, and want to test my module.  The problem: VirtualBox (which now runs the outer guest), doesn't support nested virtualization, and when I cat /proc/cpuinfo | grep vmx I get no output.  What can I use that has nested virtualization?  You may look at my  to get an idea of what I want to do. I've been writing checks this way for the last ~15 years or so:    Namely, the amount field is written using numbers like     1,500 and 00/100    rather than the tedious, painful spelling out of      One Thousand Five Hundred and 00/100   99 times out of 100, this works fine. But occasionally you'll get certain rare human tellers who simply refuse to believe this is a valid check and you have to fight over it. I still figure the time I've saved by not writing out all those ridiculous numbers-as-words is still worth it, overall, but it's definitely irritating.  So: who's right? Is a check with the amount written in numbers valid ... or not? I installed the WSL Bash on Windows 10 and set my user to e.g. 'abc' but now I want to change it to something else.  How can I change the user name of the user I'm logged in as?  When I open bash it automatically logs me in with my current user. What is the physical significance of the off-diagonal moment of inertia matrix elements? The tensor of moment of inertia contains six off-diagonal matrix elements, which vanish if we choose a reference frame aligned with the principal axes of the rotating rigid body; the angular momentum vector is then parallel to the angular velocity. But while considering the general case, what are the off-diagonal moment of inertia matrix elements? That is, do they have any physical significance as [say] the components of a vector? Or is it merely a mathematical construction with no definite physical meaning (which seems rather wrong to me)?  A similar thread exists  but they are more interested in the principal axes of the body. It also says:     The physical significance of the off-diagonal components is that   you're using a coordinate system not aligned with the principal   directions of the object. They tell us nothing interesting about the   object itself.   Is that all or is there more to it, perhaps related to properties of tensors in general? Charm Person has verbal and somatic components.  Is there anything in the rules as written that defines how obvious those verbal and somatic components are?  Would it be obvious the caster was casting a spell from 5 feet away?  From across a crowded room?  I'm specifically interested in an answer based on the rules as written, although interpretation and individual opinion are not unwelcome. What does "Warning: untrusted X11 forwarding setup failed: xauth key data not generated" mean when ssh'ing with -X?