can some one help me if am checking the reference of the string then what would be the exact answer and why?
How do I compare strings in Java?
Should operator<< be implemented as a friend or as a member function? That's basically the question, is there a "right" way to implement operator&lt;&lt; ? Reading  I can see that something like:  friend bool operator&lt;&lt;(obj const&amp; lhs, obj const&amp; rhs);   is preferred to something like   ostream&amp; operator&lt;&lt;(obj const&amp; rhs);   But I can't quite see why should I use one or the other.  My personal case is:  friend ostream &amp; operator&lt;&lt;(ostream &amp;os, const Paragraph&amp; p) {     return os &lt;&lt; p.to_str(); }   But I could probably do:  ostream &amp; operator&lt;&lt;(ostream &amp;os) {     return os &lt;&lt; paragraph; }   What rationale should I base this decision on?  Note:   Paragraph::to_str = (return paragraph)    where paragraph's a string. Generate a log of all the installs on a system (whether apt-get/yum/pip/npm/...) Is there a way to check that the conditions on your plane ticket are actually what your travel agent said they are? How to build a difference distribution table? I want to create a 2D game but I'd like to have the character to wear tons of different equipments on different combinations, like a RPG or something.  So let's say the user changes his/her shoulders and pants, this must be shown to the player and all these different equipments must follow the different characters action (hitting, being hit, spelling magic, etc.).  I see a few problems that I'd like to know the best approach/algorithm/architecture to solve.  1 - Sprites or Animations  Should I create different sprites for each equipment in each action animation?  Is it better to just have the equipment sprite and animate it directly on code like rotating and translating (using something like tween on Flash)?  Is there any other better option? (I really don't like the ideas above)  2 - Positions  Let's say during one of the character's move he starts looking directly in front to the player's view but ends his movement showing his right side to the player (like if he swings his sword from one side to the other).  If we consider one part of the user, like his head for example, it starts in front and then turns left.  It means at least 3 different positions for each head equipment (helmet, cap, whatever).  This surely influence the answer of #1 question. How is the best way to achieve that?  3 - Layers  Let's consider a character move where he spins 360 degrees with his arms open. At the beginning of the animation, his right hand is close to the user's view and then, at the middle of the movement, this is probably behind the character's body on the animation.  Whatever is the option on #1 question, you surely needs to use some kind of layer model to make this sprite or animation to starts closer to the player's view and later change to far away from player's view.  Is there any good way to do that?  I know the question is quite long and difficult to understand. Let me know if you think it's better to have some drawings to try to explain which one and I'll try to do that. Geometric intuition of improper integrals I am aware that the area under the curve of $\frac{1}{x}$ is infinite yet the area under the curve of $\frac{1}{x^2}$ is finite.   Calculus and series wise, I understand what is going on, but I can't seem to get a good geometric intuition of the problem. Both curves can be shown to converge to $0$ (the curves themselves, not the area), and on the interval from $1$ to infinity, the two curves have nothing intrinsically different. Can someone please provide me with an good geometric intuition of what's going on? I can't find anything on the web, people seem to not want to explain it geometrically. Lat/Long co-ordinates are not plotting onto EPSG:3857 OSM basemap correctly Excuse me if this is a stupid question, but I've honestly tried to find the answer in a few threads here on SE, and I cannot seem to follow the suggested steps correctly.    Project is in  (WGS 84 / Pseudo-Mercator) BaseMap (OpenStreetMap) layer is set to EPSG:3857 Vector data has been imported from CSV, and has Lat/Long coordinates, set to EPSG:3857.    The layer appears right in the middle of the map, around 0,0 obviously.   Why is this, what am I doing wrong? Laws of addition of Vectors Seems that I just proved $2=4$. This  asks how to install FF32 bit while keeping the 64 bit.  I want the much more simple thing: is there a canonical way to install firefox 52 ESR as "default" firefox in my 16.04?  I found this  ... but there are no packages; probably no wonder given the fact that the linked blog article dates back to 2012.  So, 2017, Ubuntu 16.04; how to install FF 52 ESR (as I simply need the java plugin to work for me).  ( my current solution: I downloaded the TAR file from mozilla, extracted that to /opt; and then changed /usr/bin/firefox to be a link to that ESR version of firefox. works, but ugly ) Given the following HTML:   &lt;div id="container"&gt;   &lt;!-- Other elements here --&gt;   &lt;div id="copyright"&gt;     Copyright Foo web designs   &lt;/div&gt; &lt;/div&gt;    I would like #copyright to stick to the bottom of #container. Can I achieve this without using absolute positioning? How do I avoid checking for updates for a specific module? In a current project I have had to patch the life out of a few modules (node hierarchy, workbench access and a few more). These modules are now absolutely perfect for the project's needs and are very unlikely to break with future updates to core.  That being said, when the app is handed over the clients will have full (user 1) access to the system and will therefore be warned when these modules have available updates. And they will update them, no matter how many times I beg them not to (oh how easy life would be without clients!).  Is there a way (perhaps in the modules' .info files) to persuade the update manager not to check for updates for these modules?  EDIT  I'm aware of the project status url key that's available for the .info file so I guess I could set that to a non-existent URL but I'd much rather do this in a clean way if possible. There is no smallest rational number greater than 2 I have a problem that I am seriously stuck on. I'm not sure what to do I've seen similar proofs online with the least positive rational number but this is apparently different and I'm not sure why.     Prove the statement “There is no smallest rational number greater than 2” by contradiction. We know Euler formula:  $$ e^{ix}=\cos(x)+i\sin(x). $$  Does this formula work if we replace real number $x$ with complex number $z$? How do split panes in Terminal work? How can it be that, if like charges repel, they don't repel themselves? In other words, why don't charges break apart?  About the possible duplicate: I want to know about charges in general, not just that of an electron. My response to :  Thank you very much for the extensive explanation. Unfortunately it's a bit above my level (I'm a first year electrical engineering bachelor student). This is how I understand it: If the charge is the sum of multiple separate charges, there has to be an external force that keeps this charges together. However we most often think of electrons and protons as point charges. In other words, we don't think of them as if they are made up from different (smaller) parts. But the idea of electrons and protons as point charges has its own problems. I didn't know that the electric field has a mass. From the formula, I understand that $m\propto \frac{1}{r}$. This would mean that $m\rightarrow \infty$ as $r \rightarrow 0$ (or $r = 0$), which of course is physically not possible. But there is a way to calculate the radius of an electron based on the mass, the speed of light and the constant of Planck. (Unfortunately I don't know why.) You can get around this by a technique called called renormalization, which causes the integral to converge. Unfortunately, I don't understand the rest of the answer due to my level in physics. Nevertheless I am grateful for you answer. It would be awesome if you could confirm or correct my understanding. What does this black-font Israeli stamp on my Passport mean? I applied for B2 Tourist visa at Israel embassy in New Delhi last week. But my visa application got rejected and stamped a black stamp on my passport.   What does black stamp mean? After how much time should I reapply for tourist visa? Often when I mistype a command such as ls (e.g. I hit ENTER before I type 's') there is a long (~2s) delay after the terminal displays:  bash: l: command not found...   I can understand the reasons for a similar delay after an incorrect password is entered, per . But why delay after an unrecognized command? Does FAIL_DELAY in /etc/login.defs affect this also? Why are site stats graph for beta sites not available to public? Currently, on all beta sites, the current site stats is placed prominently on the front page, which is great for knowing how the site is currently doing.  However, it doesn't say anything about the trend of the numbers - whether the site is sailing or it is sinking compared to the last month. According to Madara Uchiha, our moderator on Anime &amp; Manga SE, . Disregarding data which are not already public, , I can't see any reason why we are not allowed access to graphical representation of public site statistics. In fact, there is already a third-party app that scraps the information from the home page and . Can we have a beautiful visualization on how our beta sites evolve over time, from pony to unicorn?   Images stolen borrowed from Bulbapedia Regex for splitting a string using space when not surrounded by single or double quotes