Hi I'm trying to build a palindrome but it seem to be not working, please could you help. I'm expected to catch true on dad and false on other things  public static void main(String[] args) {      Scanner input = new Scanner(System.in);     System.out.println("Enter Your User Name");     String userInput =input.nextLine();     System.out.println(abcDEF(userInput)); } static boolean abcDEF(String userInput) {     StringBuilder s1 = filter(userInput);     StringBuilder s2 = reverse(userInput);     return s1.toString() == s2.toString(); } static StringBuilder filter(String userInput) {     StringBuilder sb = new StringBuilder();     char[] inputData = userInput.toCharArray();      for (int i = 0; i &lt; userInput.length(); i++) {         if (userInput.matches("[a-zA-Z0-9]+")) {             sb.append(inputData[i]);         }     }     return sb; }  static StringBuilder reverse(String userInput) {     StringBuilder sb = filter(userInput);     sb.reverse();     return sb; }
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?
Prove that a positive polynomial function can be written as the squares of two polynomial functions How can I read my hard drive’s SMART status in Windows 7? How can I read the  S.M.A.R.T. state of my HDDs while using Windows 7, either automatically or manually? How can I prove that every planar graph can be expressed as a union of (maximum) five edge-disjoint forests?  Only thing I can think about is going somehow like the $5$ color theorem but I get stuck in the middle. Or with induction, but still something doesn't fit. Can you help? 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? Field that is a subfield of own of its subfields Let $K$ and $L$ be fields. We have homomorphisms $f: K \to L$ and $g: L \to K$. Are $K$ and $L$ necessarily isomorphic? resetPassword problem for enterprise users when called from a community? I'm working within a custom application in a customer community that is used by both community-license users and Salesforce enterprise users.  There is a custom Visualforce page where an application admin can select a user and reset the password.  The VF Controller is using the standard System.resetPassword() method.  We are finding that when an enterprise user receives this password reset email, the user can't get to the expected password reset page.  Instead, it eventually redirects to the community login screen.  The password reset URL for these enterprise users is based on the community's URL, and it seems that these users cannot change password through the community -- it has to be through the enterprise URL, like what you get when you reset password via Setup.  Has anyone run into this and found a workaround?  (Of course community users have no trouble with password resets through this Visualforce page.) Connect Error (2054) - mysql_old_password issue still not solved Do the topologies with the same convergent sequences coincide? Do the same sequential convergence in two topologies the result are the same topologies? Let $X$ be topological  space with topologies $\tau$, $\tau'$. Let $(x_{n})\in X$ and $x\in X$ and $(x_{n})\rightarrow x$ with $\tau$ if and only if $(x_{n})\rightarrow x$ with $\tau'$. Do the two topologies on $X$ coincide? I don't really remember the plot but I think the a couple of alien girls (look human) crash land on Earth and are helped by human boy (18-19 ish). They get back to their ship but the older girl, with white hair, decides to stay on Earth to be with the boy.  At the beginning of the TV movie the boy wakes up and uses a ham radio and then goes to work on a ranch/farm(?).  I think it might have been one of these old Disney Sunday night movies. We have $q, p$ prime and $tq = (p-1)(p+1)$ for some positive integer $t$. The book I'm reading says that because $q$ is prime, it divides $p-1$ or $p+1$.   Question: Why exactly does it matter that $q$ is prime here? Single supply op amp to convert 0-5VDC to +/-2VDC (microcontroller to line level) I am generating a 0-5 volt sine wave using an arduino with a DAC. I would like to level shift this signal (DC bias?) by -2.5 volts and have a gain of .8, so that I end up with a line level sine wave.  Thus I am trying to design a single supply op amp with the following equation:  $$V_{\text{o}} = (V_{\text{i}}-2.5) \times 0.8$$  I found this white paper that is supposed to describe a way to do this but I'm having trouble following as I am new to op-amps.    Does anyone know of a way to do this with a single op amp or IC?  The frequency range of 20Hz to 20KHz must be preserved. How to save animation as a video format I am basically trying to make an intro for my youtube channel. I am sort of familiar with the program because I was playing around with it for a long time, getting the basics of it. With the help of youtube videos I am basically done with my project. I put my name in it and everything. I just need to know how to save the animation onto my desktop as a file that I could open and would be in a video format. iCloud storage always full I'm mainly a C# developer, but I'm currently working on a project in Python.  How can I represent the equivalent of an Enum in Python? Set "this" variable easily? How to reverse name and first name? What do you call a person who is never content with anything that is given to him? I am looking for an adjective for a person who, no matter what you give him/her (materially or otherwise), is never content and always expects more. "Newtonian limit" property of special relativity Books say that special relativity is indistinguishable from Newtonian mechanics when the speed of the primed frame ($v$) is small compared to the speed of light ($c$). This is what I mean by the "Newtonian limit" property of special relativity. (I don't know the correct name for it). But the transformation of the time coordinate  $$t' = \gamma \left(t + \frac{vx}{c^2}\right)$$  involves the spatial quantity $x$ which, if large enough, could balance out the smallness of $v/c^2$. So why doesn't this observation mess up the "Newtonian limit" property? The infinite product of the sines of all positive integers is zero I tried to prove that $\prod\limits_{k = 1}^\infty  {\sin k = 0}$  Define $$P(m)=\prod\limits_{k = 1}^m  {\left|\sin k\right|}$$  then I take the logarithm of both sides $$\log P(m)=\log \prod\limits_{k = 1}^m  {\left|\sin k\right|}$$  which can be written as $$a_m=\log P(m)=\sum\limits_{k = 1}^m  {\log\,\left|\sin k\right|}$$ for any $k\in\mathbb{N}$ we have $0&lt;\left|\sin k\right|&lt;1$, so all terms of the sum above is strictly negative.  I say that the sequence diverges: $\left\{a_m\right\}_{m\in\mathbb{N}}\to\,-\infty$  This is a delicate point on which I have some doubts.  I know that  $$\int\limits_0^\pi  {\log \left|\sin x\right|{\text{ d}}x}  =  - \pi \log 2$$ and that the function $\log \left|\sin x\right|$ is periodic with period $\pi$,  so the integral from 1 to $\infty$ diverges to $- \infty$. Then the series diverges as well for the integral test for convergence.  As $\log P(m)\to\, -\infty$ we can say that $P(m)\to\,0$ as $m\to\,\infty$  Therefore $$\mathop {\lim }\limits_{m \to \infty } \prod\limits_{k = 1}^m {\left| {\sin k} \right| = \mathop {\lim }\limits_{m \to \infty } \prod\limits_{k = 1}^m {\sin k = \prod\limits_{k = 1}^\infty  {\sin k = } 0} }.\quad \blacksquare$$ Find all primes $p>2$ for which $x^2+x+1$ is irreducible in $\mathbb{F}_p[x]$ Find all primes $p&gt;2$ for which $x^2+x+1$ is irreducible in $\mathbb{F}_p[x]$   Attempt. Since $x^2+x+1$ is of degree 2, it is reducible iff it has a root in $\mathbb{F}_p$. It has a root in $\mathbb{F}_p$ iff $x^3-1=(x-1)(x^2+x+1)$ has a root other than 1. The latter has a root other than $1$ iff $\mathbb{F}_p$ has elements of order $3$, which happens iff $3\mid |\mathbb{F}_p^{\times}|=p-1$, which happens iff $p\equiv 1\bmod 3$. So $x^2+x+1$ is irreducible iff $p\not \equiv 1\bmod3 $.   I am getting a different answer than my professor, who has $p\equiv 1\bmod 3$. If I am incorrect, were am I going wrong?  Update. Now I am unsure about my own reasoning. What if $1$ is a root of $x^2+x+1$? I don't know why I am considering roots of $x^2+x+1$ other than $1$ when $1$ can be a root.