When I try to login with redbull as username and pass123 as password it doesnt show the access granted message instead goes to else statement and show the access denied message      Label usernameLb = new Label("Username:");     GridPane.setConstraints(usernameLb, 0, 0);      TextField usernameTf = new TextField();     usernameTf.setPromptText("Username");     GridPane.setConstraints(usernameTf , 1, 0);      Label passLb = new Label("Password:");     GridPane.setConstraints(passLb, 0, 1);      TextField passTf = new TextField();     passTf.setPromptText("Password");     GridPane.setConstraints(passTf, 1, 1);      Button loginBtn = new Button("Login");     loginBtn.setOnAction(e -&gt; {          String username = usernameTf.getText();         String password = passTf.getText();          if (username == "redbull" &amp;&amp; password == "pass123"){              System.out.println(username + "\n" + password);             JOptionPane.showMessageDialog(null,                      "Access Granted", " ", JOptionPane.PLAIN_MESSAGE);          } else {              System.out.println(username + "\n" + password);             JOptionPane.showMessageDialog(null,                      "Access Denied", " ", JOptionPane.PLAIN_MESSAGE);         }     });      GridPane.setConstraints(loginBtn, 1, 2);      gridPane.getChildren().addAll(usernameLb,      usernameTf, passLb, passTf, loginBtn);      Scene scene1 = new Scene(gridPane, 300, 200);     window.setScene(scene1);     window.show();  }
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?
Why are there two tensions on my free body diagram? Convergence of $\int_0^\infty $sin$ (x^p) dx$ A virtual file containing the concatenation of other files Is there a way of creating a filesystem object akin to this:  mknod files p cat file1 file2 ... fileN &gt; files   but such that it can be seeked in, as if it were a regular file? What formula would you use to add up a column based on results from two drop down menus? The set that only contains itself Adding CSS Reference on Site Page Why are these sites cloning my content, and how do I stop them? So I was searching for one of my own websites on Google: http://www.botlibre.com  and to my surprise found some clones of my website, like:  http://83waystowasteyourtime.adidas.com  and:  http:// mediaiq.astral.comm  My question are:   Why are they creating clones of my website?  Some kind of SEO scheme or what? What gain could they be getting? How do they have a URL at adidas.com and astral.comm?  I assume it's not Adidas steeling my content. How do I shutdown these sites and stop people from stealing my content? (on Tomcat) How to find out how many games I have won with a specific race on ladder 1v1?  The profile screen just gives me the total wins and losses but I play with all three races and I would like to know my stats per race.  Thanks.  PS: I have been playing Starcraft from the release date but I don't have the old replays as I format my computer often. Home screen icon for terminal program? I'm using terminal-ide  which is basically a terminal for android with all sorts of utilities. One is able to create bash scripts for example. Is there a way to create an icon on the home screen that will launch one of these scripts? How to test search engine results? I had an interview question:     You were told that a search engine result by target query does not satisfy a requirement by its position. How would you test it?   How would you test it?  I had some thoughts though:   You need a list of input search queries You need a target position for each of the query You match each target position with actual   But it was not enough. iOS emails stuck in All Inboxes In the iOS Mail app, there are 4 emails in the "All Inboxes" section. Those 4 emails are NOT in the actual inbox on Gmail.  I thought, oh well I don't mind deleting them entirely since they're just newsletters. I deleted them directly on gmail, but they still appeared in iOS. So I tried deleting them via iOS and ... they keep coming back!  Even stranger, the 4 emails ONLY appear in "All Inboxes", they don't appear in any of the sub-account inboxes.  So, I disabled "Mail" in my gmail account. They're still here! I no longer have a "gmail" sub-account, but those 4 emails are still in All Inboxes. I tried to quit the app a few times, restart the phone. Still here...  When I tap on one of those messages, I get a black screen (dark mode), no errors. On my homepage, I'm using this method to hide my email from spam bots:  &lt;a href="admin [at] example.com"    rel="nofollow"    onclick="this.href='mailto:' + 'admin' + '@' + 'example.com'"&gt;Contact me&lt;/a&gt;   What do you think about it? Is it effective? What other methods do you know or use? How can I stop being prompted to unlock the 'default' keyring on boot? How do I install wine? Using a naked black hole as a mirror? The YouTube video is a good example how the gravity of this merging binary black holes bend light around themselves. How fast does electricity flow? pass 1 environment variable using sudo Is this a correct way for passing an environment variable in sudo ?  sudo -u www-data -b env FOOBAR="foobar" /home/user/folder/daemon I had a problem with disappearing marker as the data sum up to more than 100 while xmax was set to 100. See .  As written in the answer to the cited question I tried to avoid the problem by normalizing the value to 100. But this lead to (much smaller) rounding errors in previously correct rows and now the marker disappear there. See the following example. Before the normalisation the column F ist affected, after the column B.   How can I in a reliable way avoid this rounding problem? Or at least get a clear error message. I have quite a number of this plots and I don't want to have to check them all the time for missing markers.    \documentclass{scrreprt} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepackage{pgfplotstable} \pgfplotsset{  my stackbar plot/.style={              xbar stacked,              xmin=0,xmax=100,              symbolic y coords={A,B,C,D,E,F,G},              ytick=data,              nodes near coords={xxx},}}  \begin{document}  \pgfplotstableread[col sep=space]{  text   --  -    +       ++  A      0.0 1.7 13.8    84.5  B      0.0 0.6 20.1    79.3  C      0.0 1.9 13.2    84.9  D      0.0 1.6 27.9    70.5  E      1.3 3.9 19.5    75.3  F      0.0 1.4 15.0    83.7  G      0.3 1.7 24.8    73.2  }\data   \pgfplotstablecreatecol[create col/expr={\thisrow{--}+\thisrow{-}+\thisrow{+}+\thisrow{++}}]{sum}\data %  \pgfplotstablecreatecol[create col/copy=--]{--o}\data  \pgfplotstablecreatecol[create col/copy=-]{-o}\data  \pgfplotstablecreatecol[create col/copy=+]{+o}\data  \pgfplotstablecreatecol[create col/copy=++]{++o}\data  \pgfplotstablecreatecol[create col/expr={100/\thisrow{sum}*\thisrow{--o}}]{--}\data  \pgfplotstablecreatecol[create col/expr={100/\thisrow{sum}*\thisrow{-o}}]{-}\data  \pgfplotstablecreatecol[create col/expr={100/\thisrow{sum}*\thisrow{+o}}]{+}\data  \pgfplotstablecreatecol[create col/expr={100/\thisrow{sum}*\thisrow{++o}}]{++}\data  \pgfplotstablecreatecol[create col/expr={\thisrow{--}+\thisrow{-}+\thisrow{+}+\thisrow{++}}]{sumnew}\data  \pgfplotstabletypeset[columns={text,sum}   ,precision=10,columns/text/.style={string type}]\data \quad \pgfplotstabletypeset[columns={text,sumnew},precision=10,columns/text/.style={string type}]\data   %\pgfplotstablesave{\data}{pgfplotstempout.dat} \begin{tikzpicture} \begin{axis}[my stackbar plot]  \addplot table [x expr = \thisrow{--o},y=text] {\data};  \addplot table [x expr = \thisrow{-o}, y=text] {\data};  \addplot table [x expr = \thisrow{+o}, y=text] {\data};  \addplot table [x expr = \thisrow{++o}, y=text] {\data}; \end{axis} \end{tikzpicture} \quad \begin{tikzpicture} \begin{axis}[my stackbar plot]  \addplot table [x expr = \thisrow{--},y=text] {\data};  \addplot table [x expr = \thisrow{-}, y=text] {\data};  \addplot table [x expr = \thisrow{+}, y=text] {\data};  \addplot table [x expr = \thisrow{++}, y=text] {\data}; \end{axis} \end{tikzpicture}  \end{document} Choose information when copying profile The children are eager to start the novel.   or     The children are eager to begin the novel.