I don't understand why the following if statement never hits, I've verified through the log that movie and films.get(i).getTitle() are the same string:  List&lt;Film&gt; films = new ArrayList&lt;Film&gt;(); films = filmDB.getAllFilms();    for(int i = 0; i &lt; films.size(); i++)                  if(movie == films.get(i).getTitle())                 {                     Log.d("TITLEMOVIE", films.get(i).getTitle());                     ;                 }             else                 {                     Log.d("NOMATIC", films.get(i).getTitle());                 }
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?
If I seem tired, can I say: "I haven't slept last night"? If not, why have I been told that we use present perfect for actions that have present effects? Limiting floats to two decimal points I want a to be rounded to 13.95.  &gt;&gt;&gt; a 13.949999999999999 &gt;&gt;&gt; round(a, 2) 13.949999999999999   The  function does not work the way I expected. What's the default value for an 'object' in java? Progressive Draw 2 and Draw 4 Uno When playing with progressive Draw 2 and Draw 4 and (say that there are 2 players playing) and    Player 1 goes out with a Draw 2  Player 2 puts down a Draw 2    Does player 1 have to pick up 4 cards? Related to : The question specifies morphs, but I wondered if this was true for Manifest as well? As Manifest is not an ability on the card, does  prevent it from being turned face up for its mana cost? How can I transform the elliptic curve $E/\mathbb{C}$ of the form $$y^2=4(x-e_1)(x-e_2)(x-e_3)$$ with $e_1&gt;e_2&gt;e_3\in\mathbb{R}$ roots of $E$ into a Weierstrass-Form $y^2=x^3+ax+b$? Material will not assign to selected vertices I've noticed this a few times on the Feed activity on the Android app, but never thought anything of it.  Why does this question (How To auto enable checkbox?) appear as "Unanswered" when there is an icon which denotes there are 5 answers, one of which has been marked as the answer?  Dragging down to refresh doesn't seem to clear the unanswered flag either.  Device: Nexus 5 Is every sufficiently large positive integer of the form $ab + ac + bc + 1$? Is every sufficiently large positive integer $A$ of the form $ab + ac + bc + 1$   where $a,b,c$ are some positive integers larger than some given positive integer $d$ ?  How large is sufficiently large , in other words how do we know our number $A$ is sufficiently large ( as a function of $d$ ) ?    Update :  I read the following about positive integers that are not of the form $ ab + ac + bc $:    And I quote about that sequence above : " Note that for n in this sequence, n+1 is either a prime, twice a prime, the square of a prime, 8 or 16 "  This is why I considered the weird +1 in $ab + ac + bc + 1$  So composites larger than 16 not a prime , twice a prime or the square of a prime are of the form $ab + ac + bc + 1$.  And I wonder why !  I guess that relates strongly to the Original posted problem. Maybe I should have mentioned that before , sorry.  Will Jagy's answer gave the same OEIS link which I already knew. This also explains some of the comments.  Im no expert in genus theory or Galois theory but I assume this has a simple answer. Why doesn't the Moon fall onto the Earth? Why doesn't the Moon fall onto the Earth? For that matter, why doesn't anything rotating a larger body ever fall onto the larger body? What to do with an Ubuntu disk image that appears as a WinRAR file? I've never used Ubuntu before. Just heard from some friends. "IT'S GREAT!!!", they used to say. So i decided to try it. I downloaded WUBI, and ran it but 'twas takin' too much time. So I decided to download the .ISO Image file separately. It couldn't download more after 150 mB, and got interrupted (and cancelled) itself. I just went to , and further went to , and searched for my question. After having found a related one, which told     "try the torrent way"   So I downloaded it through the torrent. And after that when I opened the .rar file, there wasn't any .ISO image file; just some folders with names like .disc, boot, ISOLINUX, etc. I searched for the .ISO file but nothin' there: ANYONE HELP ME, PLEASE!!! or this will drive me into never thinkin' about Ubuntu again. I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a parameter and they seem to both be able to do the same things.  Obviously I see that actions are called when actions take place and filters are called when data is manipulated, but it seems to just be a semantic naming difference.  Besides semantics and what they are used for, what real differences are there between them? Conditional Expectation of Composite Function Preliminaries  Let $(\Omega, \mathcal{G}, \mathbb{P})$ be a complete probability space.  Let $D$ be a complete, separable, metrizable topological space with Borel $\sigma$-algebra $\mathcal{B}(D)$ (such as $D = \mathbb{R}^q$ with $\sigma$-algebra $\mathcal{B}(D) = \mathcal{B}(\mathbb{R}^d)$).  Let $\mathbb{R}$ be equipped with its canonical Borel $\sigma$-algebra $\mathcal{B}(\mathbb{R})$.  Let $g: \Omega \times D \rightarrow \mathbb{R}$ be a bounded $(\mathcal{G} \otimes \mathcal{B}(D) ) / \mathcal{B}(\mathbb{R})$-measurable function.  Let $\Pi: \Omega \rightarrow D$ be a $\mathcal{G}/\mathcal{B}(D)$-measurable random variable.  Let $H : \Omega \rightarrow \mathbb{R}$ be a $\mathcal{G}/\mathcal{B}(\mathbb{R})$-measurable random variable, defined by $$ H(\omega) := g(\omega, \Pi(\omega)).$$ Note, that, since $g$ is bounded, we have $H \in \mathcal{L}^2(\Omega, \mathcal{G}, \mathbb{P})$.  Let $j: D \rightarrow \mathcal{L}^2(\Omega, \mathcal{G}, \mathbb{P}) $ be defined by $$ j(\pi)(\omega) := g(\omega, \pi)  $$  For all $\pi \in D$, let $j(\pi)$ be independent of $\Pi$.  Question  I am interested in the conditional expectation $$\mathbb{E}[H \mid \Pi] :\Omega \rightarrow \mathbb{R}$$ of $H$ with respect to $\Pi$. More specifically, I suspect that (a $\mathbb{P}$-unique version of) this condititional expectation is given by  $$ \mathbb{E}[H \mid \Pi] (\omega) = \mathbb{E}[j(\Pi(\omega))], \quad (\dagger)  $$ whereby $\mathbb{E}[j(\Pi(\omega))]$ can of course also be written as $$\mathbb{E}[j(\Pi(\omega))] = \int_{\Omega} j(\Pi(\omega))(\tilde{\omega}) d\mathbb{P}(\tilde{\omega}) . $$  How can I prove, that $(\dagger)$ is the case? I have tried, tracking the definition of conditional expectation and using Fubini, but with little success so far.  Thanks for any advice! What are the Undying Lands? I've heard a lot about the Undying Lands but I don't fully understand how they're different from Middle-earth and why only certain people/races are allowed to go there.  Can someone explain? It is my understanding that I can disable my touchscreen by adding Option "Ignore" "on" to this file                                /usr/share/X11/xorg.conf.d/10-evdev.conf   Section "InputClass"           Identifier "evdev touchscreen catchall"           MatchIsTouchscreen "on"           MatchDevicePath "/dev/input/event*"           Driver "evdev"           EndSection   so it would look like this   Section "InputClass"           Identifier "evdev touchscreen catchall"           MatchIsTouchscreen "on"           MatchDevicePath "/dev/input/event*"           Driver "evdev"           Option "Ignore" "on"           EndSection   What would happen if I simplied changed MatchIsTouchscreen to "off"?   Section "InputClass"           Identifier "evdev touchscreen catchall"           MatchIsTouchscreen "off"           MatchDevicePath "/dev/input/event*"           Driver "evdev"           EndSection   Would this disable my touchscreen? Can a hyphen be used without anything on the right side? No surname on passport and applying for Japanese Visa Show that $\lim_{x \to +\infty}\left(f(x)+f'(x)\right)=0 \Rightarrow \lim_{x \to +\infty} f(x)=0$ How to show that $\lim_{x \to +\infty}(f(x)+f'(x))=0 $ implies $\lim_{x \to +\infty} f(x)=0$? Can mobs go through doors? I was wondering if mobs can go through doors or not. It's the difference between me just putting up a door to my house, or putting up dirt instead. I Roll To Seduce The Dragon! (or, Do doublings of proficiency bonus stack?) Lets say there exist some enterprising young bard 3/ sorcerer 1 named Kirk.   Deciding to uphold (long past) family tradition, he has chosen to go out and have a little half-dragon of his own.   He chose Persuasion as his expertise skill, and is of a dragon bloodline himself, gaining the Dragon Ancestry perk.  Do they stack? Not the same ability, and both say "Your proficiency is doubled" when they activate. Granted, it would only happen when dealing with dragons. But there are certainly worse times to ramp up your charm.