When I run this if loop program, it always returns "You're not Harry", even if I enter "Harry". I'm running Eclipse Oxygen.  import java.util.Scanner;  class Hey {     public static void main(String args[]) {         Scanner Myscanner = new Scanner(System.in);         java.lang.String x;         System.out.println("Enter name:");         x = Myscanner.nextLine();         if (x == "Harry") {             System.out.println("You're Harry");         } else {             System.out.println("You're not Harry.");         }      } }
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?
$\forall a > 0$ $\sum_{n=1}^{\infty} f(na)$ is convergent. Prove that $\int_{0}^{\infty}f(x) dx$ is convergent. My computer boots to a black screen, what options do I have to fix it? I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents: Given an infinite set of cardinality $X$, is there a chain in $\mathcal P(X)$ of the same cardinalty of $\mathcal P(X)$? $P(\mathbb N)$ = power set of $\mathbb N$. $A \subset P(\mathbb N)$ is a chain if $a,b \in A \implies$ either $a \subseteq b$ or $ b \subseteq a$ That is, we have something like this: $$\cdots a \subseteq b \subseteq c \subseteq\cdots$$ where $a,b,c \in A$ are distinct. We can show easy enough that there is an uncountable chain - this is done by noting $\mathbb N\sim\mathbb Q$ then using Dedekind cuts in $\mathbb Q$ to define $\mathbb R$ we see that a family of (nearly arbitrary) cuts satisfy the condition. For instance the family $L_r=\{q \in \mathbb Q : q &lt; r \}$ for $r &gt; 0$ gives us the sets we need and obviously we can pick others. I tried doing this for $ \mathbb R$ and don't seem to be getting anywhere.  To be more specific, does there exist a chain in $P(\mathbb R)$ with cardinality $2^ \mathbb R$? Given a set of cardinality $X$ (necessarily non-finite), is there a chain in $P(X)$ of the same cardinalty of $P(X)$? Fantasy novel about kid who controls magic through coin changer device I read this book in high school, and I can't remember what it's called. Some kid learns he has magical ability, but only finds out later that he controls it through some kind of coin changer he's been tinkering with the whole book. Solve the integral $\int_0^\infty x/(x^3+1) dx$ I'm new here!  The problem: integrate from zero to infinity x over the quantity x cubed plus one dx. I checked on wolfram alpha and the answer is that the indefinite integral is this:  $$\int \frac{x}{1+x^3} dx = \frac{1}{6}\left(\log(x^2-x+1)-2 \log(x+1)+2 \sqrt{3} \arctan((2 x-1)/\sqrt{3})\right)+\text{constant}$$  and the definite integral is this:  $$\int_0^\infty \frac{x}{1+x^3} dx = \frac{2 \pi}{3 \sqrt{3}}\approx 1.2092$$  I am trying to figure out all the steps in between. I see that there are logs, which are equivalent to the ln variant that i am more familiar with, which means it was integrating $1/x$ at some point; I also see an inverse tangent in there.  I started with long division to simplify and I got (which could be wrong because I am very tired right now) $x/(x^3+1) = x^2+ 1/(x^3+1)$ which seems to be a step in the right direction. Wolfram Alpha thinks I definitely did that step wrong. The two equations do not evaluate as equal.  Then I cheated and took the wolfram alpha factorization of $(x^3+1) = (x+1)(x^2-x+1)$...I probably should have known that but didn't offhand. Now it is looking like $x^2$ plus the partial fraction decomposition $1/(x^3+1) = A/(x+1)+(Bx+C)/(x^2-x+1)$. Am I heading in the right direction with this? At this point do I just plug in and crunch? What are the functions that are their own inverse?  (thus functions where $ f(f(x)) = x $ for a large domain)  I always thought there were only 4:  $f(x) = x , f(x) = -x , f(x) = \frac {1}{x} $ and $ f(x) = \frac {-1}{x} $   Later I heard about a fifth one     $$f(x) = \ln\left(\frac {e^x+1}{e^x-1}\right) $$ (for $x &gt; 0$)  This made me wonder are there more? What are conditions that apply to all these functions to get more, etc. How to understand the LaTeX warning “there were undefined references”? How long does it take for a black hole to form for an external observer? how to find $|GL_2(F_p)|$ I need to find $|GL_2(F_p)|$, I am very very uncomfortable in counting, so please help here I proceed,  $\begin{pmatrix}a&amp;b\\c&amp;d\end{pmatrix}$ be such an invertible matrix, so we need and sufficient that $ad\neq bc$, so if i chose all non zero $a,b,c$ arbitrarily and chose $d\neq a^{-1}bc$ and form matrices then the cardinality   will be $(q-1)^3\times (q-2)$, well now if one of $a,b,c,d$ be zero then other three can be anything nonzero so in this case cardinality will be $4(q-1)^3$, so finally if two entries are $0$ then they must be opposite to each other i.e diagonally, but other two must be nonzero, so cardinality in that case $2(q-1)^2$, so total number is just sum of three cases. Finitely generated group which is not finitely presented Is there any easy group theoretical way of showing that the wreath product $G$ of two infinite cyclic groups is not finitely presented?  I was looking for a finitely presented group with a central subgroup isomorphic to the free group of countable rank and whose factor group is isomorphic to $G$; in this way assuming that $G$ is finitely presented we get a contradiction.   Any ideas? Short story where a man discovers he's living in a fake world I may be conflating two separate short science-fiction stories here, so please bear with me. I definitely read this more than 10 years ago and it's likely to be older than that (60's, 70's?)    A man wakes up one day to discover that the world is subtly different. His wife acts strangely and there's a weird "groundhog day" vibe.    He discovers that his house is actually made entirely of painted metal, including things that should be wood (a boat that he made by hand, for example). He comments that in the real world, it's the fact that stuff doesn't work properly that shows you that you're living in reality (a wobbly doorhandle may have been mentioned?) He's constantly beset by advertising; brands of washing powder, political messages, etc. and people keep asking him what he thought about them. At one point, the advertisers start getting very aggressive, literally invading his house to dirty his clothes and driving around with megaphones to shout slurs about their political competitors. He finally breaks out of the town (with the assistance of his secretary?) and they discover that they're...      ...actually robots living in a simulated town used by advertisers to test slogans, etc.   The final twist is that...     ...the town fits onto a desktop and is encased in glass. Even if he could escape, he could never live in the real world since he's very tiny. What is an effective way to level Archery? I have to create a report on some student completions. The students each belong to one client. Here are the tables (simplified for this question).  CREATE TABLE  `clients` (   `clientId` int(10) unsigned NOT NULL auto_increment,   `clientName` varchar(100) NOT NULL default '',   `courseNames` varchar(255) NOT NULL default '' )   The courseNames field holds a comma-delimited string of course names, eg "AB01,AB02,AB03"  CREATE TABLE  `clientenrols` (   `clientEnrolId` int(10) unsigned NOT NULL auto_increment,   `studentId` int(10) unsigned NOT NULL default '0',   `courseId` tinyint(3) unsigned NOT NULL default '0' )   The courseId field here is the index of the course name in the clients.courseNames field. So, if the client's courseNames are "AB01,AB02,AB03", and the courseId of the enrolment is 2, then the student is in AB03.  Is there a way that I can do a single select on these tables that includes the course name? Keep in mind that there will be students from different clients (and hence have different course names, not all of which are sequential,eg: "NW01,NW03")  Basically, if I could split that field and return a single element from the resulting array, that would be what I'm looking for. Here's what I mean in magical pseudocode:  SELECT e.`studentId`, SPLIT(",", c.`courseNames`)[e.`courseId`] FROM ... Does the Planck scale imply that spacetime is discrete? C++ compiling on Windows and Linux: ifdef switch How to completely remove Notepad++ in Ubuntu 18.04 terminal?  I can't find it in Synaptic package manager, and don't know where is on system, but I can see an icon in Activity. It is probably not completely installed, because I can't open it. In many languages, including English, the most important verbs are irregular. Examples include:   to be  to do  to get  to go  to have  to make   The same applies (roughly) to many other languages I know about (Dutch, German, French, Spanish, Swedish) and presumably to many other languages too.  Is there any reason why these everyday verbs tend to be irregular? How can I get rid of those little white dots? I am using Blender 2.70a. This is probably a silly question but I need some help. I opened a file that I've been working on for about a month in the new 2.8 version of Blender. However when I tried to reopen the file in version 2.79, the scene is completely empty. Here is where the problem lies for me, I accidentally saved over the original file save while in version 2.8 . Please help. Thanks! I'm rewiring a a small part of a wall and I'm confused about a combination of the NEC and the products that I'm able to find.  I'm working on a 20 amp circuit (with 12g wire of course).  I'm connecting 4 receptacles each in their own box, 15 amp receptacles for normalcy.  But the terminals don't seem to accept 12g wire, even on the screws.  My first reaction was to make pigtails 14g pigtails, so that the 14g tap goes directly to the receptacle and is not used to feed the rest of the circuit.  12g in the box, 12g out of the box, and 14g inside the box only.    Is that type of splice allowed, or should I look harder for a 15 amp outlet that can more easily accept 12g wire?