So I am building a simple user authentication system, users will input their name into username and password fields and then the code should test what the user enters against a database. I have used a string comparator to do this but it does not execute code in the if statement when correct user and pass are fed through it.  Here is a snippet of the code  Boolean authpassed = false while(rs.next() &amp;&amp; (authpassed == false)){           int id  = rs.getInt("id");          String first = rs.getString("first");          String last = rs.getString("last");          String username = rs.getString("username");          String password = rs.getString("password");            System.out.print("ID: " + id);          System.out.print(", First: " + first);          System.out.print(", Last: " + last);          System.out.print(", Username: " + username);          System.out.println(", Password: " + password);           if((authuser == username) &amp;&amp; (authpass == password) ) {              System.out.println("Logged In!");              authpassed = true;          }       }   When code is executed with correct login details the "Logged in" is not displayed?  Thanks for having a look :)
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?
I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what? Why is Cat5/Cat5e Ethernet cable rated 100MHz? As the questions says, is there any specific reason why Ethernet cable is rated 100MHz?  For a 100Mbps Ethernet the data rate is 100Mbps, and the baud rate is 125Mbaud, because of the specific line coding that it uses. What is the relationship between 125Mbaud rating of data transfer and 100MHz rating of cable?  Thank you. When I restart httpd, I get the following error.  What am I missing?  [root@localhost ~]# service httpd restart Stopping httpd:                                            [  OK  ] Starting httpd: Syntax error on line 22 of /etc/httpd/conf.d/sites.conf: Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration   I have installed mod_ssl using yum install mod_ssl openssh  Package 1:mod_ssl-2.2.15-15.el6.centos.x86_64 already installed and latest version Package openssh-5.3p1-70.el6_2.2.x86_64 already installed and latest version   My sites.conf looks like this  &lt;VirtualHost *:80&gt; #    ServerName shop.itmanx.com     ServerAdmin webmaster@itmanx.com      DocumentRoot /var/www/html/magento     &lt;Directory /var/www/html&gt;         Options -Indexes         AllowOverride All     &lt;/Directory&gt;      ErrorLog logs/shop-error.log     CustomLog logs/shop-access.log &lt;/VirtualHost&gt;  &lt;VirtualHost *:443&gt;     ServerName secure.itmanx.com     ServerAdmin webmaster@itmanx.com      SSLEngine on     SSLCertificateFile /etc/httpd/ssl/secure.itmanx.com/server.crt     SSLCertificateKeyFile /etc/httpd/ssl/secure.itmanx.com/server.key     SSLCertificateChainFile /etc/httpd/ssl/secure.itmanx.com/chain.crt      DocumentRoot /var/www/html/magento     &lt;Directory /var/www/html&gt;         Options -Indexes         AllowOverride All     &lt;/Directory&gt;      ErrorLog logs/shop-ssl-error.log     CustomLog logs/shop-ssl-access.log     &lt;/VirtualHost&gt; Suppose $a_n>0$ and $\sum_{n=1}^{\infty}{a_n}$ diverges. Determine convergence of $\sum_{n=1}^{\infty}{\frac{a_n}{s_n^2}}$, where $s_n=\sum^n a_n$. I have a question about calculating the degree of a finite field extension over $\mathbb{Q}$.  This is problem 18 in chapter 1 of Patrick Morandi's Field and Galois Theory. The problem asked to show that $$ \left[ \mathbb{Q}{ \left( \sqrt[4]{2},\sqrt{3} \right):\mathbb{Q} }\right] =8 $$ Here's my work : First, we have $$  \left[ \mathbb{Q} ( \sqrt[4]{2},\sqrt{3}):\mathbb{Q}\right] = \left[ \mathbb{Q}(\sqrt[4]{2},\sqrt{3}) : \mathbb{Q}({\sqrt[4]{2}}) \right] . \left[ \mathbb{Q}{(\sqrt[4]{2})}: \mathbb{Q} \right]$$ It's easy to show that $\left[ \mathbb{Q}{(\sqrt[4]{2})}: \mathbb{Q} \right] =4 $ because the minimal polynomial of $\sqrt[4]{2}$ over $\mathbb{Q}$ is $x^4 -2$. Next, I'm going to show that  $$ \left[ \mathbb{Q}(\sqrt[4]{2},\sqrt{3}) : \mathbb{Q}({\sqrt[4]{2}}) \right] =2$$ Consider the polynomial $f(x) = x^2 -3$. It's monic and $\sqrt{3}$ is a root of $f$, but I'm stuck in proving $\sqrt{3} \notin \mathbb{Q}(\sqrt[4]{2})$ (hence $f$ is irreducible over $\mathbb{Q}(\sqrt[4]{2}))$.  My question is: Is there any proof to show that $\sqrt{3} \notin \mathbb{Q}(\sqrt[4]{2})$ or another way to caculate the degree of this field extension?  Thank you for your help. How do I escape a single quote in SQL Server? This post is an expansion of  For many graduated sites (eg Physics), moderators do not want to apply the unilateral close vote in all cases--it is better to let some community votes pile on first.  We only use the unilateral in obvious cases then. This renders the CV queue useless to us. If we &quot;skip&quot; something, we can't get back to it. If we say &quot;do not close&quot;, it's removed from the queue and our community can't see it. If we use &quot;close&quot;, we are using a unilateral mod vote--we don't want to do that. What I propose is a set of &quot;next/previous&quot; buttons, that let us navigate the queues, looking for closeable questions, and coming back to the others later. Thoughts? Update and bounty reason Due to the recent Great Flag Overhaul, mods no longer see close flags in the flag queue. Which means that the only way to get to them is via the review queue 1 Shog's solution is ideal in this case; let mods view the close queue as a list. (In fact, a list similar to the old flag queue -- which shows a list of mods who have seen the post and what mod actions have already been taken -- would be great) On Physics, the majority of the flags that we get are VTC flags. And the community isn't always able to close things on their own, so we have to step in. However, powering through the close queue isn't an option; because &quot;skip&quot;ing a post2 leads to it being dumped into the void (I can't get back to it unless I have a link). Extremely inconvenient. Could the workflow here be improved? 1. The /tools listing for posts with outstanding close votes doesn't work because it doesn't list posts which have been flagged but not VTCd 2. which I may want to take a closer look at later; gotta be careful with the binding votes. sudo apt-offline install not updating working with procedure  to update Ubuntu 18.04 offline machine, the sudo apt-offline install /path_to_downloaded_package_folder do not apply any updates/upgrades. The beginning of the massage I get is :   sudo apt-offline install ./updates_path/ No changelog available (Y) Yes. Proceed with installation (N) No, Abort. (C) Display changelog (?) Display this help message. What would you like to do next:  (y, N, ?)y Proceeding with installation ERROR: Path for keyring is invalid: /etc/apt/trusted.gpg gpgv: Signature made Mon 06 Jan 2020 08:17:27 AM MST gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" gpgv: Signature made Mon 06 Jan 2020 08:18:52 AM MST gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" gpgv: Signature made Mon 06 Jan 2020 08:18:25 AM MST gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" gpgv: Signature made Thu 26 Apr 2018 05:38:40 PM MDT gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" security.ubuntu.com_ubuntu_dists_bionic-security_InRelease synced. security.ubuntu.com_ubuntu_dists_bionic-security_Release synced. security.ubuntu.com_ubuntu_dists_bionic-security_Release.gpg synced.   What am I doing wrong? For any smooth manifold, is it true that for any two points on the manifold, there exists a chart that covers the two points? Using Through to evaluate complex expressions Wikipedia claims this but only cites an offline proof:  $$\lim_{n\to\infty} 2^n \sqrt{2-\sqrt{2+\cdots+ \sqrt 2}} = \pi$$  for $n$ square roots and one minus sign. The formula is not the "usual" one, like Taylor series or something like that, so I can't easily prove it. I wrote a little script to calculate it and it's clearly visible, but that's not a proof. How to zero out a drive? I'm currently running Ubuntu 12.04 and want to completely format my laptop so I can install Windows 7 (replace Ubuntu).   When I put in my bootable USB with the OS it just shows a black screen with a white blinking cursor on the top left corner. I wait for hours (to be specific 5 whole hours) waiting for something to happen but I get nothing, so I pull out the USB and my Ubuntu 12.04 loads up.  Repeated this several times with putting different boot priority options on top-est that relate to USB but the results are same. I go and visit some sites on the net like this  that say I have to zero out my hard drive.   My question is how?  Note: Erasing out all my data is no problem cause I have nothing important to backup.  If I have to lose my primary OS (Ubuntu 12.04) in the process I am ready to as my aim is just to install Windows 7 successfully. Please don't answer that there is something wrong with my USB or my USB reader/port/hardware or the content inside the USB cause they all works fine on my brothers PC as it boots up flawlessly. Is there a systematic way to obtain all conserved quantities of a system? Does leaning (banking) help cause turning on a bicycle? Increase partition size on which Ubuntu is installed? I have Ubuntu installed on a drive. The problem is it is running low on disk space. This is installed on vmware. I expanded the virtual drive and booted into ubuntu. But when I opened gparted(sudo gparted), the move/resize option is unavailable. This is the partition Ubuntu is installed on, but I need to resize it. Any ideas? I am comfortable using command line I need to find a period-3 orbit for a tent map defined by $$T(x)=\begin{cases}2x &amp; 0\le x\le0.5 \\[2ex] 2-2x &amp;0.5 &lt; x \le 1 \end{cases}$$  So, what is a fast and efficient way of finding it? I only know how to do it by guessing-and-checking. For example, I picked a random point, $x = \frac{2}{7}$ and found that $$T\left(\frac{2}{7}\right)=\frac{4}{7}\\[4ex]T\left(\frac{4}{7}\right)=\frac{6}{7}\\[4ex]T\left(\frac{6}{7}\right)=\frac{2}{7}$$ which is a period-3 orbit. Is there any better way of finding a period-3 orbit , more specifically, a period-3 point? I have the message:   Error Broken count &gt;0 Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Details: The following packages have unmet dependencies: firefox-globalmenu: Depends: firefox (= 19.0+build1-0ubuntu0.12.04.2) but 19.0+build1-0ubuntu0.12.04.1 is installed   Any suggestions? My question is from Apostol's Vol. 1 One-variable calculus with introduction to linear algebra textbook.  Page 57. Exercise 12. Show that the following are polynomials by converting them to the form $\sum_{k=0}^{m}a_kx^k$ for a suitable $m$. In each case $n$ is a positive integer. $a)$ $(1+x)^{2n}.$ $b)$ $\frac{1-x^{n+1}}{1-x}, x\not=1.$ $c)$ $\prod_{k=0}^{n}(1+x^{2^k}).$  The attempt at a solution: a) part of the problem is pretty easy I guess, it is example of binomial theorem, so the answer would be $(1+x)^{2n}=\sum_{k=0}^{2n}(^{2n}_{k})x^k.$ Answer to part b) would be the following: $$\frac{1-x^{n+1}}{1-x}=\frac{(1-x)(1+x+x^2+\cdots+x^n)}{1-x}=1+x+x^2+\cdots+x^n=‌​\sum_{k=0}^{n}x^k.$$thanks to @DiegoMath's hint. As for part c), we have $$\prod_{k=0}^{n}(1+x^{2^k})=(1+x)(1+x^2)(1+x^4)(1+x^8)\cdots(1+x^{2^n})$$ and I have trouble &quot;converting&quot; this to sum which would be of a form of polynomial. What is the next perfect square of the form 14444... in decimal notation? We know that $12^2 = 144$ and that $38^2 = 1444$. Are there any other perfect squares in the form of $\frac{13}{9} (10^n - 1) + 1$ (i.e. $1$ followed by $n$ $4$'s), and how would we prove it? How do you reopen a closed question?