This code reads from a .properties file   protected String cfgReader(String arg1)         throws IOException          {     String readVal = null;     FileInputStream in = new FileInputStream("CFG.properties");     Properties props = new Properties();     props.load(in);     readVal = props.getProperty(arg1);      in.close();      FileOutputStream out = new FileOutputStream("CFG.properties");     props.store(out, null);     out.close();         return readVal;  }   but if I try to do something like:  if(cfgReader("var1") == "n/a"){...}   it doesn't work even if the .properties contains  var1=n/a
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?
Comment flags are broken If I flag a comment now, it puts the dialog off the page:        It is only fixed by performing one of these actions:   Maximize window (if not already maximized) Restore window (if maximized)         I am running Windows and Firefox; also I tried Firefox in safe mode. I would be interested to see what testing was done on this beforehand - as this seems like a pretty glaring error. Please and thank you.    Inspired by the answer, the following CSS worked for me. It makes me sad to have to fix Stack Exchange CSS; I would figure this community over all others would get it right. Oh well.  aside {   transform: none !important; } Please note: I posted this question about an hour ago on my account (I just made it as I am new to the site). I revisited my post and saw that I had not given definitions of what I was asking (I thought they were common notations) and it would not let me edit the post for some reason so I will ask here now and hopefully someone can delete the other thread.  How to prove for a finite group $G$ that $|\langle g \rangle|=o(g)$?  Here are the definitions:  Let $G$ be a finite group and $g \in G$  $o(g)$ is the smallest $m \in \Bbb{N}$ such that $g^m=e$ (the identity element of the group). (If such an $m$ exists)  $\langle g \rangle=\{g^m : m \in \mathbb{Z}\}$  I really don't know how to show that this is true I tried to say let $o(g)=m$ and then show that $|\langle g \rangle|$ has exactly $m$ elements but I wasn't even sure it did because it would contain the elements $g^0,...g^{m-1}$ so that would mean it's true but what about $g^{-1}$ and the other elements with negative coefficients so it seems like it would actually be bigger than $m$?  Thanks. Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$  I can't see anything in this limit , so help me please. For which values of $\alpha$ and $\beta$ does the integral $\int\limits_2^{\infty}\frac{dx}{x^{\alpha}\ln^{\beta}x}$ converge? Is there a way to load my own custom CSS or Javascript while using a browser?  When I'm accessing a website or developing a website I want to load my own custom scripts from my computer. I know this can be done by Firebug or Chrome's developer toolbar, but after you refresh your browser your changes will be cleared too. This is exactly what I'm looking for adding CSS and Javascript, but I wish it has an option where you temporarily save your changes locally. Or it has an option to load external CSS or JS files.   Purpose:   When I'm developing the frontend, sometimes it's convenient for me using Chrome's developer toolbar or Firefox's Firebug to change or tweak CSS properties because I can then see the changes in real time without refreshing. One problem I see is that every time I refresh my browser, my changes also get reset. Now I wish there were an option where I could save my changes locally or load my own external .css file or .js file. I want to customize how some websites look when viewed locally, e.g., accessing a blog that has too many ads. I want to apply CSS properties to hide the junk.   Browsers I use often:   Google Chrome (for development: Built-in Dev Toolbar) Mozilla Firefox (for development: Firebug) How to rotate the curve but not the axes? Difference Between Sequential Workflow & State machine workflow? What is the difference between Sequential Workflow and Stater machine workflow? What context should I take account to when choosing one of them? A question about $f(x)\equiv 0$ As soon as I start SQL Server with no application querying, in the task manager it starts to consume memory very fast till it consumes around 15GB. How can I resolve this issue? Piping data through arbitrary functions in Clojure It seems that most people who use the ignored tags feature end up with a fairly long list of those tags.  Although , it is sometimes necessary to add new ignored tags manually (typically when adding some-tag*).  It would be a lot easier if the add box was above the long list of ignored tags rather than below. I suppose the same would apply to the favorites tags for consistency's sake. Why does US Customs & Immigration ask the purpose of my trip when I'm returning home? As a US citizen, when I re-enter the US, I am often asked where I was, how long I was there, and the reason for my visit.  Why am I asked these things?  Am I required to answer? Don't I have a legal right to enter the US (as long as I'm not doing or carrying anything illegal)?  If I were to refuse to answer these questions, would I be permitted entry?  Note: I'm not really bothered by the questions (except when the agent asking them is especially rude), I'm just curious. What is the difference between read() and fread()? If $p$ and $q = 2p + 1$ are both odd primes, show that $-4$ and $2(-1)^{(1/2)(p-1)}$ are both primitive roots modulo $q$. If $p$ and $q = 2p + 1$ are both odd primes, show that $-4$ and $2(-1)^{(1/2)(p-1)}$ are both primitive roots modulo $q$.   I cannot get heads nor tails of how to even start this let alone finish it When are you supposed to use escape instead of encodeURI / encodeURIComponent? In general what is the approach to switch the desktop environment or window manager on Ubuntu? The main difference between stock Ubuntu, Kubuntu and Lubuntu is supposedly the use of Unity vs. KDE vs. LXDE.  However, in order to try various desktop environments and window managers I don't want to have to reinstall the respective flavor from scratch just to get a particular desktop environments or window manager. There probably is an easier method than that.  The question: How can I easily test different desktop environments and respective compatible window managers (say KDE, LXDE, Unity, GNOME, XFCE and StumpWM)? ibus Avro in Ubuntu 14.04 LTS I'm robotic engineer. I'm using OpenSCAD to model robotic components (gears, pulleys, parts, etc). But I need application to model physics and interaction of the components (for i.e. how will robot move if I will rotate current gear).  So, is it possible to import OpenSCAD models into Blender and model interactions in it?  I have models in STL format (for i.e. gears). I need to make reductor from it and see how it moves (if possible - measure rotation speed and torque). I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API?  Alternatively, can someone alleviate my fear that the pid I'm passing might belong to another process after some time if the parent has died? Hyperref - Token not allowed Possible Duplicate:          The following code:  \subsection{The classes $\mathcal{L}(\gamma)$}   generates the errors:  Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `math shift' on input line 1938.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\gamma' on input line 1938.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `math shift' on input line 1938.   What do I have to do to keep \gamma in the subsection, so that it is also listed in the table of contents?