The loop I'm trying to run will initialize but will not continue to run after the first loop.  Since I know where the problem i took out most of the code to fix the loop.  After i make the second selection the loop will not run.  Thank you for any help.  public static void main(String[] args) {   String number; // enter number           int stringLength = 0;       String selection = "y" ;   // Create a Scanner object to read input.   Scanner keyboard = new Scanner(System.in);   // PrintWriter outputFile = new PrintWriter("outDataFile.txt");  // outputFile.close();    while (selection == "y")   {       // Get the user's number.      System.out.print("Write your number ");      number = keyboard.nextLine();        System.out.print("y/Y to continue, any else to exit");      selection = keyboard.nextLine();     }  }
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?
A virtual file containing the concatenation of other files Don't certain processes decrease entropy? How quickly does the Ultimate Meter fill up? Producing PDF/X compliant document with XeLaTeX When using the ssh or ftp commands from the Bash shell, does the server that I am connecting to learn of the domain name used? I understand that the domain name is locally translated into an IP address via DNS. In HTTP, after that happens, the server is told the original domain name as well in order to serve the correct page, or to present the correct TLS cert (SNI).  host serverfault.com GET /   Does a similar phenomenon happen when connecting to ssh or ftp?  I ask because I am  trying to ssh into a server (GoDaddy webhosting) which expects a domain name, but is not letting me in when I try to connect via user@IPaddress as the DNS is not yet moved to the GoDaddy IP address. Are static class variables possible in Python? Product of two cyclic groups is cyclic iff their orders are co-prime Say you have two groups $G = \langle g \rangle$ with order $n$ and $H = \langle h \rangle$ with order $m$. Then the product $G \times H$ is a cyclic group if and only if $\gcd(n,m)=1$.  I can't seem to figure out how to start proving this. I have tried with some examples, where I pick $(g,h)$ as a candidate generator of $G \times H$. I see that what we want is for the cycles of $g$ and $h$, as we take powers of $(g,h)$, to interleave such that we do not get $(1,1)$ until the $(mn)$-th power. However, I am having a hard time formalizing this and relating it to the greatest common divisor.  Any hints are much appreciated! Here $p$ and $q$ are co-prime integers. Is it necessarily an algebraic number? Path connectedness of the set $\{(x,y):(x+1)^{2}+y^{2}\leq 1\}\cup\{(x,y):y=x\sin(\frac{1}{x}),x>0\}$ Let $A$ be the following subset of $\mathbb{R}^{2}$:$$A=\{(x,y):(x+1)^{2}+y^{2}\leq 1\}\cup\{(x,y):y=x\sin(\frac{1}{x}),x&gt;0\}$$ Then  $1.$ $A$ is connected.  $2.$ $A$ is compact.  $3.$ $A$ is path connected.  $4.$ $A$ is bounded.  It is clear that $A$ is unbounded as the graph of $x\sin(\frac{1}{x})$, so option $2$nd and $4$th are not correct. Again $A$ is connected by using the fact that closure of connected set is connected. But i am confused about path connectedness of $A$. Please help me about path connectedness of $A.$ Thanking you. I came across the phrase, “suck it up and go” in the columnist’s answer to a question from a reader of Carolyn Hax's column in Washington Post’s “Lifestyle” section (July 2nd).  The Q&amp;A titled “Ever the aunt, never the godmom” begins with the following sentence:     “Dear Carolyn: We just got an invitation to the baptism of my seventh nephew on my husband’s side. Once again we were not considered as godparents. I felt snubbed. -- Is this a legitimate snub? Should I talk to my sister-in-law about it?”    and Carolyn answers:     “Boycotting the baptism in a wounded huff would be petty, yes, and that’s the main reason to suck it up and go - but you also need to go because nothing would undermine your own purpose more tidily than staying home.”   I checked the meaning of “suck it up and go” in English Japanese dictionaries at hand only to find one of them shows “suck it and see” meaning “to try” as a British and  Australian usage. Online dictionaries register “suck it (up) and “go suck,” but not “suck it up and go.”   What does “suck it up and go” mean? Is it an American version of “suck it and see”? Consider an isosceles triangle. Let r be the radius of the circumscribed circle and p be the radius of the inscribed circle. Prove that the distance d between the centers of these two circles is $$d = \sqrt{r(2p-r)}$$ I recently upgraded to 12.04 from 11.10 and since upgrading have been unable to log in to my user profile. The upgrade went okay and I can login to a guest session fine but whenever I try to login to my profile, after entering my password, I just return to the login screen.  I've changed my password in Root (passwd &lt;username&gt;) and can log in to tty1 with no issues, it's just in GUI I'm having problems.  I'm using a HP dv7 laptop, 32-bit Ubuntu install, Intel® Core™2 Duo CPU P7350 @ 2.00GHz × 2, Nvidia graphics.  Any help would be appreciated. Performance of try-catch in php What kind of performance implications are there to consider when using try-catch statements in php 5?   I've read some old and seemingly conflicting information on this subject on the web before. A lot of the framework I currently have to work with was created on php 4 and lacks many of the niceties of php 5. So, I don't have much experience myself in using try-catchs with php. string.format format string containing { Where is the operator panel in Blender 2.8? Drawing Mechanical Systems in LaTeX I really like CircuiTikZ for drawing diagrams in my LaTeX documents. However I mostly draw mechanical and not electronic systems, which is why I'm looking for some similar way to draw mechanical systems. What I want is something to draw masses, springs, dampers and ground (boundary condition).  are typical examples:     Anybody got some suggestions or am I out of luck? The actual period of a pendulum at 90°. Looking for the correct formula Do you have access to any scientific experiment which gives the period of a pendulum when the angle is $90^\circ$:     says $T$ varies to about $18\%$ up to $90^\circ,$ so for a seconds pendulum the complete period would be roughly $2.36.$    I d'like to know the ratio at $90^\circ$ with a good approximation, and the span it can vary in relation to air friction, if the bob  is not massive.  Also, I'd like to know the max. speed of the bob at $P_0$ and how it compares with the speed of same ball sliding without friction on a circular surface, would it be the same?      What I am trying to understand here is rather complex, I'll try to explain:  If the block is placed on an air-track or other frictionless surface, the block would acquire a certain speed, momentum and KE in the opposite direction, right? same amount of momentum is lost by the bob and we can find speed loss.    Isn't the same amount of speed lost by the bob when it is attached to a pendulum?  Is this an important factor or may be the most important factor (more relevant than air friction or friction at the pivot) for the increase of the period when the angle is greater than $30^\circ$?  I figured out that this factor can account for about one third of the $18\%$ increase, can you give a more accurate value?   What I am suggesting is that this (loss of horizontal momentum, which is made clear when the bob is not attached to a rod but slides on a block) is the most important factor that makes the actual period increase when the starting point deviates on the vertical direction. I managed to successfully publish my old bachelor thesis in a good quality national journal in my country. However, I am thinking of retracting the article due to certain circumstances. First, I felt really embarrassed by the low quality research methodology used in my bachelor thesis. I only used simple correlation in my research. After it was published, I realized that the journal editor team forgot to include a reference in that article because they were rushing me throughout the editing process. I informed them about their mistake and it seems that they have done nothing to fix the problem. I became a bit annoyed because the editor team has never made this problem in the past.  I felt that it would be better for me to simply ask for retraction to solve this issue, but I am a bit afraid of negative consequences in the future. Is it okay to do this? I am really interested of entering the academic world in the future. Why is the word 'number' abbreviated to 'No.' in UK English and '#' in American English? Why the disparity? And why use 'No.'? Is it from the French?  And the hash or pound sign seems a weird choice too, is there a history or any reason involved? "No worthy mechs found" when trying to relay email to Gmail using Postfix I've been trying to configure email to forward to Gmail, using Postfix to relay email to smtp.gmail.com. However, I'm failing to get it to authenticate with smtp.gmail.com, which is a rather vital prerequisite to getting anything working…  The mail logs show only:  Oct 29 15:50:14 gsnedders-1 postfix/master[6596]: daemon started -- version 2.7.1, configuration /etc/postfix Oct 29 15:50:19 gsnedders-1 postfix/pickup[6598]: EBA1F78750: uid=1000 from=&lt;gsnedders&gt; Oct 29 15:50:19 gsnedders-1 postfix/cleanup[6603]: EBA1F78750: message-id=&lt;20111029145019.EBA1F78750@mail.gsnedders.com&gt; Oct 29 15:50:19 gsnedders-1 postfix/qmgr[6599]: EBA1F78750: from=&lt;gsnedders@gsnedders.com&gt;, size=324, nrcpt=1 (queue active) Oct 29 15:50:19 gsnedders-1 postfix/cleanup[6603]: F2D557874F: message-id=&lt;20111029145019.EBA1F78750@mail.gsnedders.com&gt; Oct 29 15:50:19 gsnedders-1 postfix/local[6605]: EBA1F78750: to=&lt;me@gsnedders.com&gt;, orig_to=&lt;me&gt;, relay=local, delay=0.04, delays=0.03/0.02/0/0, dsn=2.0.0, status=sent (forwarded as F2D557874F) Oct 29 15:50:19 gsnedders-1 postfix/qmgr[6599]: F2D557874F: from=&lt;gsnedders@gsnedders.com&gt;, size=454, nrcpt=1 (queue active) Oct 29 15:50:19 gsnedders-1 postfix/qmgr[6599]: EBA1F78750: removed Oct 29 15:50:20 gsnedders-1 postfix/smtp[6606]: warning: SASL authentication failure: No worthy mechs found Oct 29 15:50:20 gsnedders-1 postfix/smtp[6606]: F2D557874F: SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.157.108]: no mechanism available   And the postfix config is:  relayhost = [smtp.gmail.com]:587  smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd smtp_sasl_security_options = noanonymous  smtp_tls_eccert_file = smtp_tls_eckey_file = smtp_tls_security_level = may smtp_tls_CAfile = /etc/postfix/cacert.pem smtpd_tls_received_header = yes tls_random_source = dev:/dev/urandom smtpd_tls_security_level = may