Android Unfortunately app has stopped? I have to make an app where the user inputs and then the AI responds but when I input some text and press send it gives me the message "Unfortunately, app has stopped".  Here is my code:  Here is the code for sending:  &lt;Button         style="?android:attr/buttonStyleSmall"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="@string/Button"         android:id="@+id/Send_btn"         android:layout_alignParentBottom="true"         android:layout_alignParentRight="true"         android:layout_alignParentEnd="true"         android:onClick="Zdenka"   /&gt;...   Here is the start of the .java file:      EditText Text, OdgBox;     String odg;      @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_my);          EditText Text = (EditText) findViewById(R.id.Txt); //User input         Button Btn = (Button) findViewById(R.id.Send_btn); //Send button         TextView Output = (TextView) findViewById(R.id.TextView); //AI output      }...   And the last part of the java file:  ... public void Zdenka (TextView Output, EditText Text, String odg) {      String Text1 = Text.toString().toLowerCase();       if (Text1 == "živjo") {          odg = "Živjo";      }     else if (Text1 == "zivjo") {         odg = "oj";     }     else{ odg = "Ne razumem."; }        Output.setText(odg);   Thanks for the help!
How do I compare strings in Java? 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?
vertical align middle in How to get Steam to recognize existing game files from a different source? Let's say I have a game bought on retail/other digital download and installed on my hard drive. I buy the same game (or a minor variant of it, say the GOTY edition) on Steam. It should be possible to use the existing installation to avoid the generally big downloads. This is very useful as it saves both bandwidth and time.   Previously, as far as I understood, Steam downloaded the game files directly to steam\steamapps\common\&lt;game_name&gt;. Since this folder would be created on starting the download, pausing and closing steam, copying the game files to this folder and then validating game files would make Steam absorb as much as possible and just download the missing files.  Currently, Steam downloads the files to steam\steamapps\downloading\&lt;game_id&gt; and then moves them over to the aforementioned folder once the download finishes. So first of all, what the final folder would be is not clear. So what would be the correct way of doing the same thing, that is, make steam use as much of the existing files as possible? Should the files be copied to downloading\*\, or should I figure out the actual folder (say via googling) and copy the files to steamapps\common\*\?  More specifically, I had a retail copy of Arkham City installed and I just bought the GOTY version on Steam. Now I tried both of the above things, in either case, the validating does not seem to do anything. Assuming I have the correct folder name steamapps\common\Batman Arkham City GOTY, according to , if I copy the files there, Steam seems to just continue with its 17GB download. If I copy it to steamapps\downloading\200260 then the download keeps stopping every few seconds with "Disk Write Error" after modifying 1 or 2 files, and I have to keep hitting resume. Can linear momentum be conserved before and after collision in the presence of an external force? I'm a physics tutor for 11th and 12th grade students. I taught my students that momentum is conserved only when the net external force on the system is zero. But in the books we are following, momentum was conserved in the following cases in spite of presence of an external force:   A body (mass m1) is dropped from a tower (height h) and another body (mass m2) is projected vertically upward with initial velocity u. Find the velocities just after collision. (Gravitational force is the external force) Two bodies projected towards each other on a rough table surface, with all required parameters given asked to find the velocities after collision. (frictional force is the external force) Body explodes in mid air. Momentum is conserved before and after explosion. (Again gravitational force is the external force)   I explained to my students in all these cases though an external force is present it has negligible effect. But I'm not satisfied with my answer.  EDIT: Thank you for the comments and answer. It is clear that contribution of external force to change in momentum is negligible. Can someone do the calculation of taking change in momentum into consideration and showing that it is negligible? How to run BitTorrent Sync? I am in Ubuntu 12.04 (precise) 64bit and downloaded the btsync executable from  but running it doesn't seem to have any effect. Double-clicking the executable does nothing, and running ./btsync in the terminal also exits immediately without any output.  Has anyone successfully ran this under Ubuntu, and if so, is there any special configuration changes that need to be made to make it work? Is the uncertainty principle a property of elementary particles or a result of our measurement tools? In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected. I can't seem to find a few of the Stones, so, is there a list available with the location of all the stones? Looking for sci-fi novel I read about humanity finding alien station on orbit of Earth I am looking for a novel that I'd love to re-read it with my wife (my 13-year old self must be proud of me I guess). Key Plot points The plot was about humanity finding an alien station on an orbit of Earth. (I'm not sure if it wasn't Moon itself). On this station there were thousands of ships ready to travel so there rose a company that paid people to get on those ships and explore the galaxy. The problem was humans didn't understand how to steer those ships so they had to rely on preset targets. Of course there was no telling where particular ship was to go and fair amount of them never returned. Chronology and other relevant information I read it as an early teenager back in early 2000s. It was Polish translation of a foreign (possibly English) story. I think (not sure) that the book wasn't new at the time. It was just one of those books you dig out in a library and take to see if it's good. I don't recall cover either and even if I did it'd be of the Polish version. Additional information could be that the narration was led along the psychoanalytics of the main protagonists where he relives his memories from inside the station and his journeys. Prove that $2730$ divides $n^{13} - n$ for all integers $n$. Prove that $2730$ divides $n^{13} - n$ for all integers $n$.   What I attempted is breaking $2730$ into $2, 3, 5$, and $7, 13$. Thus if I prove each prime factor divides by $n^{13} - n$ for all integers $n$, it will prove the original problem.   I already proved $2, 3$, and $5$ work. Struggling with how to do $91$?  Other solutions are welcome, but they should be associated with mod and solutions of this kind, because my answer should pertain to what was learned in class.  (Edit: Fixed the 91 problem, being slow today...In any case, I've got this problem now, so no answers are necessary. Posting my own soon.) Declaring static data members of normal class and class template Two Clash of Clans accounts on one device I have been playing on two clash of clans accounts on one device for a long time but just recently i cannot switch from my lvl17 to my lvl75. The switch villages option is not popping up for me and I don't know why. Can anyone help me get my main account back? I have a bit of code where I've written a SOQL query that returns a list of SObject records, however I need a Set&lt;Id&gt; structure to pass to another method that I don't have control of (and thus can't change the method signature of).  How can I turn my returned List&lt;SObject&gt; into a Set&lt;Id&gt;? Is the best option just a for loop? Since asking for tutorials, videos, resources, links to other content or downloads is considered off topic here, this is a specifically created Community Wiki which gathers resources for Blender and it has been approved by the .  Just write in the appropriate answer/section. If you have concerns, questions, post a  question, so we don't clutter the comments, but you can link your meta question from the comments.  Questions regarding such resources are not allowed anymore, except for very specific and on topic requests (ask on  if you're unsure about your question). Follow the instructions made in the question about how to post, what can be posted, etc.  Learning             Assets    (also see: )   Reference Images/Blueprints (also see: )    Tools    (also see: )      Other   Special Interest ()     Also see the . Why is the mol a fundamental physical quantity? I am starting to study physics in detail and as I read about physical quantities, I was puzzled why mol (amount of substance) is taken as a physical quantity.  A physical quantity is any quantity which we can measure and has a unit associated with it. But a mol represents the amount of substance by telling the number of particles (atoms, molecules, ions, etc.) present. So it is a pure number and numbers are dimensionless. So mol should not be considered a physical quantity.  Also, fundamental physical quantities should be independent of each other. I am wondering whether mass and mol are independent. This is so as they surely affect each other as we can evidently see while calculating the number of moles and using the mass of that sample for calculation.  So how is the mol a fundamental physical quantity and independent of mass? arcpy.env.overwriteOutput = True not working for one dataset How do I remove directories that begin with a dot after my server was infected? My server had been infected and the attacker spread a bunch of .5randomletters folders around my file system, with malicious code inside of them. I want to search for all the folders that begin with a dot, review them and then remove them.  How can I do that? Using Elseif Conditional Statement in QGIS Field Calculator? Continuity of $f(x)$ on $[a,b]$ implies continuity of $f(t) = \displaystyle \min_{a \leq x \leq t}f(x)$ at [a,b]. How do I change the default wifi network that Ubuntu connects to on startup? There is an unsecured public wifi network in my range, as well as my own home WPA secured wifi that I want to use by default. However, on startup Ubuntu always connects to the unsecured one. Sometimes I forget to reconnect to the other one, which is very dangerous.   I am running a default setup of Ubuntu Destkop 11.10 with Gnome 3. I have looked under network settings but I can't find a 'default' option. Partition a set into subsets of size $k$ I know that the Windows copy dialog (in Windows&nbsp;XP) stores the copy in memory first, and it is still copying after the dialog closes, so the time is off, but why is the estimation of the time it will take to make a copy so inaccurate, even when memory copying has been disabled (in Vista and Windows&nbsp;7)? It seems so arbitrary! How does the whole copy procedure work, and why can't Windows estimate it correctly?