I am working on an android app. I have a string in one of my first activity. And I use intent.putExtra() to pass that string to second activity which I started in first activity. Here are the related parts of activity codes:  First Activity  final ListView lv = (ListView) findViewById(R.id.listView1);         lv.setOnItemClickListener(new OnItemClickListener() {              @Override         public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,                     long arg3) {                 // TODO Auto-generated method stub         String selectedFromList = (lv.getItemAtPosition(arg2).toString());          Intent content_umre_Intent = new Intent("com.uygulama.hacc.ContentActivity");         content_umre_Intent.putExtra("key", selectedFromList);         startActivity(content_umre_Intent);     }  });   Second Activity  Context context = getApplicationContext();                       int duration = Toast.LENGTH_SHORT;  Toast toast = Toast.makeText(context, text, duration); String text = getIntent().getStringExtra("key").toString();  if(text=="abc"){     toast.show(); }   There is something curios here. I put toast.show() outside of if statement, and I saw that it is equal to "abc".   However even the variable text is exactly equal to "abc" it doesnt go enter the if statement.   Do you have an idea why this happens? I couldnt find any reason. I really need help right now.  Any help would be appreciated.
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?
How to show $a,b$ coprime to $n\Rightarrow ab$ coprime to $n$? What mechanism is responsible for the creation of these dunes on Comet 67P/Churyumov-Gerasimenko?  The following high resolution picture from ESA's Rosetta mission shows the dunes:       At a distance of 7.8 km from the surface, the image scale is about   66.5 cm/pixel, so each 1024 x 1024 pixel frame is about 680 m across (although if we assume the furthest point away is an additional ~1 km   further from the centre, the image scale is about 92 cm/pixel).   So the scale of the dunes is on the order of tens of meters along the crest. And each crest are probably just a few meters apart. Does $\sum_{m=1}^{\infty}\sum_{n=1}^{\infty}a_{mn}^3=\sum_{n=1}^{\infty}\sum_{m=1}^{\infty}a_{mn}^3$ occur here? Let $\{a_{mn}\},~m,n \in \Bbb{N}$, be an arbitrary double sequence of real numbers then does the following equality occur always?   $$\sum_{m=1}^{\infty}\sum_{n=1}^{\infty}a_{mn}^3=\sum_{n=1}^{\infty}\sum_{m=1}^{\infty}a_{mn}^3$$   I think there is no reason for the equality of this iterated series in general but I cannot figure out how to construct a counter example. Can anyone please help me how to create a example of $\{a_{mn}\}$ such that the given equality does not hold...!! Mutable or immutable class? Write access without read access Is it possible for a user to have a write access to a file and not be able to read it? How is it possible?   I tried the following commands:  debianbox@debian:~/posix/io$ touch filetest debianbox@debian:~/posix/io$ ls -l filetest -rw-r--r-- 1 debianbox debianbox 0 14 oct.  03:10 filetest  debianbox@debian:~/posix/io$ echo "Hello World" &gt; filetest debianbox@debian:~/posix/io$ cat filetest Hello World  debianbox@debian:~/posix/io$ chmod u-r filetest debianbox@debian:~/posix/io$ cat filetest cat: filetest: Permission forbidden  debianbox@debian:~/posix/io$   As you can see here, I have write but not read access on this file. How can this be possible? Is this considered as a bug? If not, in what situation would this be useful? Allow moderators to see delete/undelete activity on users' profiles We get auto flags for 'possible vandalism' related to deletes, and these can be helpful at times in finding 'rage quit' users, or other potential problems.  But often, I would like to know if there is a prior pattern with the user doing this. While we can see posts of theirs which have been flagged, and perhaps find previous auto flags this way, it would be nice to see an overall view of their self-deletions and undeletions; mostly just to identify patterns.  Such a feature would be nice if it was activity centered, rather than post-centered. That is; each delete/undelete action should be shown. So we could easily see, for example, if someone went back-and-forth on a single post.  The "activity" tab in the profile would be a logical place to show these events.  I think this would be best to be limited to instant self-deletions, not deletion votes. {genealogytree} How to model my Cousins What is a NullPointerException, and how do I fix it? I think this question is already answered anywhere, but I couldn't find a solution with my search terms :/ .  So I got this model and I only want to smooth out the cylinder parts, but not the extruded edges.  So here is my original model, I think it's kinda clear what should be smoothed out, it is supposed to become a rifle scope.    This happens with the normal smooth button, but I already tried it with a Bevel modifier and subdivison surface aswell.    Solution: Edge Split Modifier with Smooth: I want to completely replace Ubuntu with Lubuntu Why do universities have to spend money on journals? Obviously this is a question in the light of the recent Elsevier boycott. Currently we do have an arXiv, maintained by academia and where researchers regularly upload parts of their work. In such a case,   Why do universities spend lots of money to publish in third-party journals?   The question especially applies to journals that operate with a rigorous profit motive. The subscription is very high, so wouldn't publishing in such journals affect the paper's citation count and deter the spread of knowledge about the work within academic circles?   Why should not universities collaborate to create free, open access, peer-reviewed journals?   Moreover, given the need to conserve paper, why should journals spend on printing research papers? Wouldn't an online version suffice, as most people use only local computer printouts anyway? In other words, why can't we have a Wikipedia-like system of sharing research knowledge, having properly established standards for such journals? The Fourier transform of a "comb function" is a comb function? Let $f(x) = \sum_{n=-\infty}^{\infty} \delta(x - n)$, where $\delta$ is the Dirac delta function. This function $f$ (a "comb function") is important in signal processing because evenly sampling a function $g$ can be viewed as multiplying $g$ pointwise with $f$. This idea is the first step towards understanding how to approximate the Fourier transform of $g$, given evenly spaced samples of $g$. The next step is to note that $\hat{gf} = \hat{g}*\hat{f}$, where $\hat{f}$ is the Fourier transform of $f$ and $*$ denotes convolution.  Is it true that $\hat f$ is also a comb function? If that statement isn't quite right, what is the correct statement?  I would like to see: 1) an informal, intuitive, nonrigorous but easy derivation of the Fourier transform of $f$ . 2) A rigorous version of the same calculation.  (How would you even define $f$ rigorously, is it a distribution?)  (I'd also be interested in recommendations of math textbooks that cover this topic, including the Nyquist sampling theorem, even if it's only an exercise or series of exercises in an analysis textbook.) Allow given application to run as administrator, without prompting user for credentials List of freely available physics books I'm trying to amass a list of physics books with open-source licenses, like Creative Commons, GPL, etc. The books can be about a particular field in physics or about physics  in general.  What are some freely available great physics books on the Internet? edit: I'm aware that there are tons of freely available lecture notes online. Still, it'd be nice to be able to know the best available free resources around.  As a starter:         Table of contents sorted by field (in alphabetical order): Name lookups in C++ templates Calculate Euler equations of fluid dynamics without division? I'm working on the calculation of the  with the . Unfortunately I'm not allowed to do a division. So I'm wondering if there's a form which does not need a division.  At the moment the Euler equations look like this:  $$ \frac{\partial}{\partial t} \begin{pmatrix} \rho \\ \rho v_1 \\ \rho v_2 \\ \rho v_3 \\ \rho E \end{pmatrix} = -\mathrm{div} \begin{pmatrix} \rho v_1 &amp; \rho v_2 &amp; \rho v_3 \\  \rho v_1^2 + p &amp; \rho v_1 v_2 &amp; \rho v_1 v_3 \\  \rho v_2 v_1 &amp; \rho v_2^2 + p &amp; \rho v_2 v_3 \\  \rho v_3 v_1 &amp; \rho v_3 v_2 &amp; \rho v_3^2 + p \\  (\rho E + p) v_1 &amp; (\rho E + p) v_2 &amp; (\rho E + p) v_3 \end{pmatrix} $$  As you can see, I first need to calculate $\frac{\rho v_1}{\rho}$ to get $v_1$ so I can calculate e.g. $\rho v_1^2$ My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal? What is a Vanilla JS or jQuery solution that will select all of the contents of a textbox when the textbox receives focus? My problem is that, I can not give name of my folder or file with special characters like \ / : * ? " &lt; > | in windows based O.S. This is very important for me, that giving name of file/folder which contain this type of characters.  I already search and refer so many site,for this problems but all are hopeless. I also read Microsoft support page, they suggest use other characters. This is its link,    I already try Alt button + ASCII code number of this type of special characters, from numpad key, just example rename file/folder and press Alt+60 (for &lt; characters) Still it giving message that, A filename cannot contain any of the following characters: \ / : * ? " &lt; > |   Suggest me suitable solution so that I can give name of my file/folder with this type of special characters. Review-beta: Obviously good answer in low-quality