Check if two java list contain the same objects, independently of order and number of elements
What issues should be considered when overriding equals and hashCode in Java?
Is it possible to get a decimal output from doing division in Bash? Basically in Bash, what I'm trying to do is take a input of seconds from a user and find the hours. So basically if the user enter 35 the output should be 0.00972222.  But bash gives me is a zero.  heres the command I have:  echo "Enter the seconds you wish to convert to hours: " &amp;&amp; read sec &amp;&amp; echo " $((sec/3600)) is the amount of hours "   Is there a way I can make it so it prints out 0.00972222 if I enter 35.  Thanks! If $f$ is continuous, then there exists $x+\frac{1}{n}\in[0,1]$ and $f\left(x+\frac{1}{n}\right)=f(x)$ Let $f:[0,1]\to \mathbb{R}$ is continuous, such that $f(0)=f(1)$. For each $n\in\mathbb{N}$, prove that $\exists x\in [0,1]$ such that $x+\dfrac{1}{n}\in[0,1]$ and $f\left(x+\dfrac{1}{n}\right)=f(x)$.   My approach: The interval $[0,1]$ is connected, then if $f$ is continuous, we have $f([0,1])\subset\mathbb{R}$ is a interval. And I suppose that, I can define a closed path such that $f(0)=f(1)$. Any hint pls, Is there a way to set the gnome-terminal title from within the terminal itself without having to right click on the tab. Something like:  active-terminal --title "Foo"   There was a related question previously with an answer that almost lets you do this:  but that doesn't set the gnome-terminal tab title only the window title. How to get the file name from a full path using JavaScript? Why does my Nikon D3100 give the error "Lens not attached" with a Vivitar 200 telephoto lens? trim is not part of the standard c/c++ library? Is it me or are there no standard trim functions in the c or c++ library? is there any single function that acts as a trim? If not can anyone tell me Why trim is not part of the standard library? (i know trim is in boost)  My trim code is  std::string trim(const std::string &amp;str) {     size_t s = str.find_first_not_of(" \n\r\t");     size_t e = str.find_last_not_of (" \n\r\t");      if(( string::npos == s) || ( string::npos == e))         return "";     else         return str.substr(s, e-s+1); }   test: cout &lt;&lt; trim("  \n\r\r\n \r\n text here\nwith return   \n\r\r\n \r\n "); -edit- i mostly wanted to know why it wasnt in the standard library, BobbyShaftoe answer is great. How do you open a command line? How do you access the command line or run option to put the commands into the system? How to set up a wi-fi hotspot with an Ubuntu laptop (access point mode)? I've read , and carefully followed the instructions provided. I am sure the wireless card in my laptop supports going into wireless access point mode. But unfortunately, when I use the following command to start hostapd service it throws an error:   $ sudo service hostapd stop  Starting advanced IEEE 802.11 management hostapd                      [fail]    The instructions mentioned above said this could possibly be because my wireless card does not support the g mode, and provided the wiki of hostapd. But what is g mode? I tried to switch to a, or b mode, but it just didn't work.  Can anyone help with this or recommend a tool like connectify in windows ?  ps. I am using Ubuntu 12.04, 32 bit. I have an ADSL wired network, and I want to share it by setting my laptop into a WiFi hotspot with  my windows phone. How many solutions $X^{10} - I=0$ has in $M_2(\mathbb{R})$? How many solutions $X^{10} - I=0$ has in $M_2(\mathbb{R})$? Where $M_2(\mathbb{R})$ denotes the set of $2 \times 2$ real matrices.  I absolutely have no idea of where I should start from. $I$ and $-I$ solve the equation, but are there any other non-trivial solutions? Are there infinitely many solutions? Prove that $\int_0^1t^{p-1}(1-t)^{q-1}\,dt=\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}$ for positive $p$ and $q$ I'm trying to prove that for $p,q&gt;0$, we have $$\int_0^1t^{p-1}(1-t)^{q-1}\,dt=\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}.$$    The hint given suggests that we express $\Gamma(p)\Gamma(q)$ as a double integral, then do a change of variables, but I've been unable thus far to express it as a double integral.  Can anyone get me started or suggest an alternate approach?  Note: This wasn't actually given to me as the $\Gamma$ function, just as a function $f$ satisfying $$f(p)=\int_0^\infty e^{-t}t^{p-1}\,dt$$ for all $p&gt;0$, but I recognized that. This is in the context of an advanced calculus practice exam. Are there 'stack' sites for Mac or Windows? I understand that if a particle approaches a finite potential barrier of height $V_0$ with energy $E &lt; V_0$, there is still a finite probability of finding the particle on the other side of the barrier due to quantum tunneling.  My question is, since the wavefunction is nonzero inside the barrier region, is it possible to actually make a position measurement and locate a particle inside the barrier?  I mean, if we can say that "there is a nonzero probability that the particle is inside the barrier", surely this would suggest we can do so?  If not, why not? Am I understanding the whole wavefunction/probability distribution thing right? Android cancel Toast when exiting the app and when toast is being shown Using Illustrator CS6 to create shape out of multiple paths How to stop the Facebook app from updating itself automatically? Ubuntu Software doesn't open in Ubuntu 20.04 If $n&gt;1$ is an integer, then $\sum \limits_{k=1}^n \frac1k$ is not an integer.  If you know , then you know there must be a prime $p$ between $n/2$ and $n$, so $\frac 1p$ appears in the sum, but $\frac{1}{2p}$ does not. Aside from $\frac 1p$, every other term $\frac 1k$ has $k$ divisible only by primes smaller than $p$. We can combine all those terms to get $\sum_{k=1}^n\frac 1k = \frac 1p + \frac ab$, where $b$ is not divisible by $p$. If this were an integer, then (multiplying by $b$) $\frac bp +a$ would also be an integer, which it isn't since $b$ isn't divisible by $p$.  Does anybody know an elementary proof of this which doesn't rely on Bertrand's Postulate? For a while, I was convinced I'd seen one, but now I'm starting to suspect whatever argument I saw was wrong. Q&A blank in Stack Exchange Android app v1.0.95 - S10e/Android 10 Recently upgraded to a Samsung S10e and Android 10, but all Q&amp;A in the Stack Exchange app v1.0.95 are blank.  The title and comments are visible, but question/answer posts are just white space. Accessing the About page in the app is also blank.  I tried clearing data, cache and re-installing the app, but I still get the same behaviour. Does Earth really have two high-tide bulges on opposite sides? The bit that makes sense – tidal forces My physics teacher explained that most tidal effect is caused by the Moon rotating around the Earth, and some also by the Sun. They said that in the Earth and Moon system, the bodies are in freefall about each other. But that points on the surface of Earth, not being at Earth's centre of gravity, experience a slightly different pulls towards the Moon. The pull is a little greater if they are on the Moon's side, and slightly lesser if they are on the side away from the Moon. Once freefall is removed, on the Moon side this feels like a pull towards the Moon and on the the opposite side it feels like a repulsion from the Moon. This makes sense to me, and is backed up by other questions and answers here, like  and also  Phys.SE question. The bit that doesn't make sense – tidal bulges They also said that there are &quot;tidal bulges&quot; on opposite sides of the Earth caused by these forces. The bulges stay still relative to the Moon and Earth rotating through the bulges explains why we get two tides a day. They drew a picture like this one…  An image search for  finds hundreds of similar examples, and  from a scientist on Twitter. …But, if there is a tidal bulge on both sides of Earth, like a big wave with two peaks going round and around, how can an island, like Great Britain where I live, simultaneously have a high tide on one side and a low tide on the other? For example:   on the West coast  on the East  Two ports with tides 6 hours, or 180º apart. It's high tide at one while low tide at the other. But they are only  by road. Great Britain is much smaller than Earth. It's probably not even as big as the letter &quot;A&quot; in the word &quot;TIDAL&quot; in that picture.  To prove this isn't just Britain being a crazy anomaly, here is another example from New Zealand:     Two ports that are 180º (6 hours) apart, but separated by  through a national park. New Zealand, unlike the UK, is in fairly open ocean. How to create immutable objects in Java?