I don't actually know what's up here, but I am writing server-client application and client sends a string to the server. I need to send the string "x" to the server, so it starts running code1, but when I do it, server runs code3. The funniest thing is System.out.println(x); prints "a" in the console.  Here is a fragment of server code(runs on win7, javac compiler):  sInput = new ObjectInputStream(socket.getInputStream()); sOutput = new ObjectOutputStream(socket.getOutputStream());  String x = (String) sInput.readObject(); System.out.println(x);  if (x == "a") {    /*      * code1     */ } else if (x == "b") {    /*      * code2     */ } else {    /*      * code3     */ }   And this is what client does(runs osx, javac compiler):  sInput = new ObjectInputStream(socket.getInputStream()); sOutput = new ObjectOutputStream(socket.getOutputStream());  String x = "a"; sOutput.writeObject(x);   How should I sort it out?  P.S. I know about exception declaration, they are removed to make the code shorter.
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?
Run cURL commands from Windows console Is there a way to install cURL in windows in order to run cURL commands from the command prompt? Circular duplicates in the close review queue? Why are my PHP sessions dying? And why can't I restore them? I have an app using PHP and the PayPal API. The basic way it works to get a payment is that you do a web service call to PayPal to get a token and then do a browser redirect to PayPal with that token for the user to pay. After the payment details have been confirmed, PayPal redirects back to the URL you originally set in the service call.  This all works, millions of people use it every day, et cetera.  Strange thing is, when PayPal redirects back, the PHP session is gone. It's a .  First question: why is this happening? Both pages are on the same domain, both use HTTPS. The session works for all requests up until the PayPal redirect back.  The linked forum thread suggests a workaround, to persist the session ID in the PayPal request and then to retrieve it later and restore the session. Great, except it doesn't seem to work.  I can add some log statements:  log(session_id());   before and after the various redirects. When coming back from PayPal, I log some more.  log("session id is " . session_id()); $session_id = get_session_id_from_paypal(); log("setting it back to " . $session_id); session_id($session_id); session_start(); log("session id is now " . session_id());   The result is not at all what I'd expect:     session_id is fc8f459a186a3f4695ff9ac71b563825   setting it back to 82460dcf8c8ddd538466e7cb89712e72   session_id is now 360ba3fd99d233e0735397278d2b2e55     Second question: why is the session id not at all what I set it to? What am I doing wrong? Or, at least, why do none of the session variables come back? LWC Navigation: "this[f.NavigationMixin.Navigate] is not a function" When attempting to use the Lightning navigation service in my component's base class (.js), I get the following error when functionally testing in the UI:  this[f.NavigationMixin.Navigate] is not a function  I am calling the NavigationMixin function provided by the lightning/navigation module. I have imported the module: import { NavigationMixin } from 'lightning/navigation';  And am calling the function as below: this[NavigationMixin.Navigate]({     type: 'standard__recordPage',     attributes: {         recordId: this.org.Id,         objectApiName: 'Account',         actionName: 'view'     } }); I read somewhere that according to relativity, it is possible - involving black holes and other stuff - to jump into the past. Is it possible for anything to go back in time either continuously or by jumping? SO Blog icon has partial white background when tab is inactive When you open a tab on the , and switch to another tab, the icon has a partial white background: Firefox (Most obvious) - note the difference between that and the normal Stack Overflow logo  IE  Edge  Tested on Windows 10 with Firefox 41.0.2, Internet Explorer 11 and Microsoft Edge v20.10240.16384.0. (If someone could test this on chrome that would be great) I have knowledge about 'Kile' more or less. Now  I am using 'Texmaker'. But  there is a problem in it. In Kile when we write \begin{env} it automatically write \end{env} from the following :  Settings => Configure Kile => LaTeX => Environments => making tick mark on "Automatically complete \begin{env} with \end{env}" we can set it. But in 'Texmaker' automatic environment is not working. How can I do so. Travelling within the US as a foreign citizen without a passport Can a wizard under the effects of Feign Death issue telepathic commands to their familiar? A wizard has a summoned familiar within 100 feet that is currently idle and has  (PHB, p. 240) cast on them by another PC. Would the wizard still be able to issue telepathic commands to their familiar?  Specifically, while Feign Death states that they appear dead and are incapacitated and blind, they aren't listed as being unconscious.   doesn't state that issuing telepathic commands requires an action (which you can't do while incapacitated), whereas it does state that seeing through your familiar's eyes requires an action as does dismissing it.  I was DMing a game where this occurred and I hastily ruled that the wizard was unable to issue commands, but I am second guessing myself after the fact. And knowing my PCs this situation is likely to happen again. How to configure @SkipValidation by XML configuration in Struts 2 Is the Cantor set made of interval endpoints? Unresponsive KeyListener for JFrame My Father passed away - next test(s) on what remains of his DNA sample? I posted this general question over at the forum on FamilyTreeDNA. Though I received a reply, there is still no answer to my question, so I thought I'd try my luck at posting here.  Anyhow, in early 2009 I bought two kits for the Genographic Project and dutifully had my father do his cheek swabs: one kit for his Y-Chromosome, and one for his mtDNA. Once that was completed, I had his samples transferred to Family Tree DNA.  Then, late in 2009 I paid to have an mtFullSequence done on his mtDNA sample.  My father passed away in 2015. In early 2016, I phoned FTNDA to discuss. The first thing they did was arrange to merge his two original samples into one kit. Then, they suggested doing Family Finder. I did that and recently obtained the interesting results.  So, all told what I have done on my father is:   Y-12 (originally done for the Genographic Project) mtFullSequence Family Finder   My father's Y Haplogroup is R-M269 and I am being presented with the M343 SNP pack on FTNDA.  My question is, what now? My father is gone so the sample that remains with FTDNA is old and finite (their customer service says they still have "one container" of his DNA). His siblings have all passed away -- unfortunately, with no samples taken. What is the best way to make use of the sample of my father's DNA that is left?  Should I refine the Y-Chromosome to Y-111? That seems the most natural (though I'm a male and carry it too). Should any SNP tests best be done on his remaining sample as opposed to on me? Or, should I do nothing and just let his 2009 samples continue to sit at FTDNA?  By phone, FTDNA said that they should have enough left to do the Y-111 and a SNP pack which is great, but I'd love to know independent of their customer service if that is the wisest way to make use of the remaining DNA sample which they have?  Full disclosure: I did have my father do 23andMe in 2010 and I did have his blood drawn and sent to a DNA Bank. I hope to never touch his banked DNA (except maybe to do a full sequence someday), but at least it does exist. My question now is solely how to best make use of my father's remaining sample at Family Tree DNA? Show that the function $g(x) = x^2 \sin(\frac{1}{x}) ,(g(0) = 0)$ is everywhere differentiable and that $g′(0) = 0$ Show that the function $g(x) = x^2 \sin\left(\frac{1}{x}\right) ,(g(0) = 0)$ is everywhere differentiable and that $g′(0) = 0$. prove that $\operatorname{lcm}(n,m) = nm/\gcd(n,m)$ I'm trying to prove that $\operatorname{lcm}(n,m) = nm/\gcd(n,m)$ I showed that both $n,m$ divides $nm/\gcd(n,m)$  but I can't prove that it is the smallest number.  Any help will be appreciated. How do I find the right size of filters for a lens? What changes when an Alienist becomes an outsider? The subscript size for formulas in beamer presentation First of all sorry because this question may be duplicated. I don't know why the question was uploaded with another user's name and I can't edit it (may be you can delete the previous question with the same title). The question is the following:  I am creating a beamer presentation where I have a lot of formulas. Between the packages used I have \usepackage{amsmath} and the theme for the presentation is \usetheme{Warsaw}.  As it can be seen in the attached picture, the size of the sub(super)script is bigger than the normal writting.     Anyone knows a set of basic packages in order to get the classical formulas, without these size changes?  The code is the following  \documentclass[]{beamer}  \setbeamercovered{transparent}   %--------------------------% % To add enumeration index %--------------------------% \addtobeamertemplate{navigation symbols}{}{%     \usebeamerfont{footline}%     \usebeamercolor[fg]{footline}%     \hspace{1em}%     \insertframenumber / \inserttotalframenumber  } \setbeamercolor{footline}{fg=black} \setbeamerfont{footline}{series=\bfseries}   %---------------------------------------------------------------------------------%  \usepackage{amsmath,amssymb}    % Theme for the presentation \usetheme{Warsaw} % Change the colour \usecolortheme{spruce}  \setbeamertemplate{footline}{}  % Delete the footline with the names    \begin{document}    \begin{frame} \frametitle{\textbf{Algorithm}: step \texttt{s}}   \scriptsize  \textbf{STEP \texttt{s}}  \vspace{0.25cm}  Let $B^{(s-1)}$ be the variable  for the $\mathit{(s-1)}$-th step, let's take the sets $I_+^{(s-1)}$ and $I_-^{(s-1)}$ of length $r_+^{(s-1)}$ and $r_-^{(s-1)}$ respectively,and define:\\  \vspace{0.25cm}  \begin{center}  $B^{(s+)}= \sqrt{\tfrac{(r_+^{(s-1)} + 1)*r_-^{(s-1)}}{r_+^{(s-1)} + r_-^{(s-1)} + 1}} $  \end{center}   \end{frame}  \end{document} Help finding the limit of $\lim_{n \to \infty}\prod_{k=1}^{n}\left(1+\frac{1}{n}f\left(\frac{k}{n}\right)\right)$. Meta SE account is shown 3 times in accounts Earlier today I asked my first question on this site. So Meta SE was added to my accounts. But this account is shown three times:        One of them also has a badge while the other two don't.   The network profile doesn't show MSE at all:        Also I have got this long wierd user name and  I am not able to change it. In the edit- display name this long name is not there.My user name on other sites is shown there.   After all this happened Meta SE questions are not getting loaded in my SE app.    Edit: the issue of name is solved now. I changed the profile picture and saved changes and it worked.