I am a beginner working on an android application in which i am stuck at comparing the value taken from previous activity and a variable initialized with the same value as the previous one.  This is the mainactivity code       String string="value";     reference.setText(string);//i am setting the value manually to Edittext            Intent i = new Intent(this,next.class);     String getrec=reference.getText().toString();     Bundle bundle = new Bundle();     bundle.putString("VALUER", getrec);     System.out.print(getrec);     i.putExtras(bundle);     startActivity(i);     finish();   This the next.class code             int i;             Bundle bundle = getIntent().getExtras();              String venName = bundle.getString("VALUER");                 if (venName=="value") {                     i=1;                     ...                   }   And  this if condition is not getting executed. Please help.
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?
We currently have two rewards checking accounts.  We are nearing the maximums permitted on each account, after which we receive .5% and .25% APY.  It's within our means to perhaps open another one, but at that point we are looking at using our debit cards 50 to 55 times a month.  I feel that running that number of debit transactions is getting out of hands as it's just the two of us.  I realize there are easy ways to game the system, but I want these things to stay around and another person doing just such that could lead to the ends of these accounts.  We are saving towards a new house down payment.  As such we don't require these funds to be fully liquid, but would still like to remain free of as much risk as possible -- however I realize we are unlikely to find anything near our rewards checking accounts (4% APY interest for meeting various rules: direct deposit, a certain number of debit card transactions, and not receiving a paper statement), but would hope we can get at least half of that.  We aren't fully sure when we will be buying, but we are probably a couple of years out.  For that reason I don't think CDs would work.  Even if we ladder them, when we need the money we will need it pretty much instantly.  Do I bite the bullet and just find the best available money market account?  What other options do I have that let me deposit monthly, and not have a timebomb associated to accessing that money that isn't in the initial lump sum? I think we can all agree, this sucks:  If you've been around a little while, you've probably encountered hundreds of answers like this in various forums, some of them even marked as &quot;The Answer&quot; by well-meaning1 forum admins looking to close a thread. We could try to enumerate the commonly-observed problems with it...  Link is probably broken If link isn't broken, it's spam If link isn't spam, it's to some broadly-related resource that the answerer found by pressing &quot;I'm feeling lucky&quot; when googling the question's title.  ...but the real issue here is that we don't know! Even if the link was originally pointing directly to the most awesomeest answer ever for exactly the question being asked, there's nothing in the answer itself to even hint at what direction we're being pointed in. Strip the markup, and this is what you're left with:  i think you should take The tutorial HERE! This will help you a lot  Is there even one tiny speck of information there? No. Even the title of the page being linked to would have provided something to go on, but that was entirely too much work. So let me be clear: this sort of response is not an answer. If you see this, flag it. Moderators, if you see it flagged, delete it. There's really only one valid exception to this rule, and that's when the question is:  Suggest me some tutorials where i can learn quick.  Don't get me wrong, it's still a bad answer - but when the question is kinda asking for bad answers this is to be expected. Close or flag the question and move on - this is much more efficient than hanging around to babysit it by deleting every crap answer that inevitably shows up. If you're still reading, you're probably getting really bored by now. &quot;Gee, Shog - answers that contain ZERO information are terrible, horrible, very-bad things? What shocking revelations will you share next?&quot; Yeah. It's really simple... Except, . See, the problem is that once you step away from black-and-white &quot;answers / doesn't answer&quot; decision-making, things get... Interesting. And all those other answers with links in them See, this is an answer:  And so is this:  Yes, they're both very short, and yes, they contain links. But strip the markup, and you still get at least a little bit of useful information. Does that mean these answers should forever hang around the site? No, not necessarily - if it turns out they're just not that useful, they should probably still be removed - or at very least, down-voted so that they rank below other answers. Just remember: if the text of the post contains an honest attempt at answering the question, then it is an answer - so don't flag it otherwise, and if you do, don't complain if your flag gets declined. Answers &amp; Apples If you're still confused, forget about answers. Think about apples instead:  Answers are just like that, but less tasty in pies.  1 By which I mean to say, &quot;criminally lazy&quot; Infiniteness of non-twin primes. I need to echo a string containing angle brackets (&lt; and >) to a file on a Windows machine.  Basically what I want to do is the following: echo some string &lt; with angle &gt; brackets &gt;&gt;myfile.txt  This doesn't work since the command interpreter gets confused with the angle brackets.  I could quote the whole string like this: echo "some string &lt; with angle &gt; brackets" &gt;&gt;myfile.txt  But then I have double quotes in my file that I don't want.    Escaping the brackets ala unix doesn't work either: echo some string \&lt; with angle \&gt; brackets &gt;&gt;myfile.txt  Ideas? Background: One of my co-authors faced problem of compiling the paper that I had built using TexStudio and MikteX 2.9 on his Mac Machine running TexLive.   ShareLaTeX Role: So, one solution is to use ShareLaTeX. But the first problem pops in mind is how safe is uploading unpublished article to a publicly accessible portal?  What I did: I googled security and data breach of ShareLaTex and found nothing except some words from the ShareLaTex community about their word to ensure that our data are safe; perhaps this would not be enough.  My 1st Question: To what extent can I trust ShareLaTeX and put my ready-to-publish content there?   My 2nd Question: Is there any alternate way of sharing LaTeX with others around the globe without changing the underlying platform? Repeating "to" and "will" in enumerations of verbs Should I use the second "will" in constructions like this one: "it will definitely help you and will make the text more readable"  And should I write "to" before every infinitive in enumeration, or only before the first one, e.g. "it helps to develop and test" or "it helps to develop and to test"? Could this example be influenced by the fact that "help" can go with to-invinitive and bare infinitive, and with other verbs the rule would be different? How to make text aligned left/center/right in the same line? I am trying to align some text to left/center/right in the same line. For example, I want to put my phone number on the left, my name in the center, and my email on the right, how do I do that? NSString tokenize in Objective-C Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions? Only generation-I Pokemon are available, however it seems that the types which did not exist in Gen-I do exist in Pokemon Go (e.g. Dark type moves).   So I'm wondering which type chart the game is using for move effectiveness.    According to Bulbapedia, in Gen I Bug attacks were super-effective against Poison, but in Gen II-V Bug attacks are not very effective against Poison. What is it in Pokemon Go? Similarly, in Gen II-V Ghost attacks are not very effective against Steel, but in Gen VI Ghost attacks are normal effective against Steel. Does anyone have a Magnemite, is it Steel type? Does it resist Ghost? Does STAB exist in this game? I recently purchased an ASUS K55A. Like all Windows 8 machines, it come with a UEFI feature called Secure Boot. This basically makes sure that the laptop won't load anything other than the Windows 8 OEM version that came with it.  However the Asus UEFI allows for me to disable Secure Boot, and therefore I should be able to revert to Windows 7, Linux, etc. (drivers may or may not be supported). When I insert my Linux Mint boot disc and try to boot from it, though, nothing happens. There isn't even a boot priority list in the UEFI settings (I can provide screenshots later). It just says "Windows 8 Bootloader" and also on the other tab it says "WINDOWS 8 BOOT OVERRIDE".  Has anybody purchased a Windows 8 machine and successfully installed Windows 7 or Linux on it? Embedding DLLs in a compiled executable Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it?  Normally, I'm cool with just leaving the DLLs outside and having the setup program handle everything, but there have been a couple of people at work who have asked me this and I honestly don't know. Im trying to craft a regex that only returns &lt;link&gt; tag hrefs  Why does this regex return all hrefs including &lt;a hrefs?       (?&lt;=&lt;link\s+.*?)href\s*=\s*[\'\"][^\'\"]+        &lt;link rel="stylesheet" rev="stylesheet"      href="idlecore-tidied.css?T_2_5_0_228" media="screen">     &lt;a href="anotherurl">Slash Boxes&lt;/a>   thank you Recovering added/staged file after doing git reset --hard HEAD^? How do you copy the contents of an array to a std::vector in C++ without looping? Vertical alignment of align* in enumerate Related (but not the same):         Earlier today I asked a question about aligning equations in an enumerate environment and got an answer that seemed to work for the example I gave, but it turns out I wasn't really specific enough for my problem.  I'm using align* environments, often as the only part of a list item. (If you're wondering why I'm not using more words to introduce the align*, these are mostly homework solutions where most of the work is algebra, etc.)  Here's my code and what it makes (above the middle line):  \begin{enumerate}   \item \begin{align*}     x^2 + y^2 &amp;= x^2 + (iy)^2 \\               &amp;= (x + iy) (x - iy)   \end{align*}   \item \begin{align*}     \frac{1}{n^2-4} &amp;= \frac14 \frac{4}{(n-2)(n+2)} \\                     &amp;= \frac14 \left( \frac{1}{n-2}-\frac{1}{n+2} \right)   \end{align*} \end{enumerate}     I'm trying to make the baseline of the first line of the align* environment the same as the number's baseline—I want the first line of the align* to have the same vertical position (centered horizontally in the same way) relative to its number as in the second half of my picture. (Side question: why is there so much space before the align* starts?) I've found a strange thing: some Stack Exchange sites have their own domain names instead of https://[site name].stackexchange.com. The websites which have their own domain names are:          Are there any parameters for allocating specific URLs to Stack Exchange sites? iCloud Disassociation for a Mac Computer I had a Mid-2012 MacBook Pro that recently stopped booting. I narrowed this down based on troubleshooting of the boot device to likely the SATA/hard drive connector/cable no longer working for whatever reason.  I have decided to sell the system. I'd like to know if I remove the hard drive (or in this case, an after-market SSD I've installed) from the system, will there be any other data (i.e. iCloud data) stored on the system on any other chip that I can reset in any way? I plan to reset the SMC/NVRAM before I sell the system off of to someone else.  Additionally, if I remove the hard drive, is the system still associated to iCloud (specifically Find My Mac) or any other service? If so, how do I disassociate it? The system will no longer boot even if I put in my boot device.  Thanks! The reciprocal of many prime numbers p in base 10 have a set of repeating digits p-1. Why? I've noticed that the reciprocal of many prime numbers have a curious number of digits. For example. 1/7 has 6 repeating digits, 1/17 has 16 repeating digits, and 1/47 has 46. There's a rule here that makes this pattern, and I haven't quite figured it out. Does anyone have some insight on this?  There are a few other numbers that follow the pattern subversively. For example, 1/3 has two repeating digits: 33. 1/11 has ten repeating digits: 0909090909. The number 1/13 has a set of six that repeats twice, which makes a set that's 12 digits long.  For reference, here is a website that lists reciprocals of numbers 2 through 70, including non-primes.   The ones that break the rule are 1/2 and 1/5, but they seem to be a matched pair, where the 2 and 5 switch places in the equation 1/X = Y/10  What is the rule that makes this pattern? I'm very curious. Show that the congruence $x^{p-1} \equiv 1 \pmod {p^2}$ has precisely $p-1$ solutions modulo $p^2$ Let $p$ be a prime number. Show that the congruence $x^{p-1} \equiv 1 \pmod {p^2}$ has precisely $p-1$ solutions modulo $p^2$  I know the statment above is true for modulo $p$, but how is this imply to modulo $p^2$