What is the error with equating a value in an ArrayList to a String? **The ArrayList is type String**
How do I compare strings in Java?
On found exact duplicates, should these be voted to close directly against a preferred, or ultimate, canonical question?   Or is a chain of possible duplicates (where one question is closed as duplicate of another, which itself is a duplicate of another, and so on and so on) allowable or OK?  One example of this situation can be found . How can I find the program I'm hiding in bash Say I have PATH="home/bob/bin:/usr/bin".  I am writing a bash script /home/bob/bin/foo that will do some munging and then call /usr/bin/foo.  Of course I want to be able to use this script on different systems which have different path structures.  In practice the real foo might be in many different places, so I want to just find it from the PATH.  My new foo script is on my path too, so I can't just call foo, that will result in a recursive call.  Is there an easy way of doing this in a bash script? (Other than looping through elements of PATH and doing the search manually?) Show $100+t$ is reducible in $\mathbb{Z}[[t]]$ $\mathbb{Z}[[t]]$ is the ring of formal power series with integer coefficients, and the problem asks to show that $100+t$ is reducible. This means I need to find two power series, $\sum_{i=0}^\infty a_i t^i$ and $\sum_{j=0}^\infty b_j t^j$ with $a_i,b_j\in\mathbb{Z}$, that when multiplied give $100+t$. Since the integers are an integral domain, I know that neither of these power series may be finite, but I'm having a really hard time figuring out how to come up with two series that will telescope properly. Any suggestions? How to show that the spherical metric satisfies the triangle inequality? For $x,y\in \mathbb R^n$ define  $$d(x,y)={\|x-y\| \over \sqrt{1+\|x\|^2} \sqrt{1+\|y\|^2}}$$ Here $\|x\|$ is the euclidean norm of a vector. How to prove that $d$ (the spherical metric) is indeed a metric?     Progress so far:    $d(x,y)\ge 0$ is obvious. $d(x,y) =0 \iff \|x-y\|=0 \iff x=y$, so the positivity holds. $d(x,y) = d(y,x)$ is clear from the formula, so symmetry holds.    But I am having difficulties with the triangle inequality. Writing it out in coordinates leads to a complicated inequality with square roots all over the place in denominators. Is there a better way? Should I use center or centering for figures and tables? What is the correct way to center figures and tables (figure, table)?  \begin{center} ... \end{center}   or   \begin{centering} ... \end{centering} Alternatives to "and/or"? What training do doctors/Healers receive above their school education?   A fresh Hogwarts graduate does not seem to have all the skills required to be a Healer, so s/he would need to be learning those skills somehow/someplace. So how/where do they get those skills?  Also, there is one instance of a doctor being praised for inventing a healing spell. Is there any research system, like funding, trials etc or any other source of innovation? I met this equation frequently in Guass-Newton optimizations. But I dont understand why the left and right side of the equation can be equal.  Lets say the Jacobian is $2$ by $2$   and Hessian is $$\begin{bmatrix}\frac{\partial^2f_1}{\partial^2 x_1 } &amp; \frac{\partial^2f_1}{\partial^2 x_2  } \\ \frac{\partial^2f_2}{\partial^2 x_1 } &amp; \frac{\partial^2f_2}{\partial^2 x_2  }\end{bmatrix}$$   But the right hand side of the equation is  $$J^TJ =\begin{bmatrix} \left( \frac{\partial f_1}{\partial x_1} \right)^2 + \left( \frac{\partial f_2}{\partial x_1} \right)^2  &amp;  \frac{\partial f_1}{\partial x_1}\frac{\partial f_1}{\partial x_2} +\frac{\partial f_2}{\partial x_1}\frac{\partial f_2}{\partial x_1}\\ \frac{\partial f_1}{\partial x_1}\frac{\partial f_1}{\partial x_2} +\frac{\partial f_2}{\partial x_1}\frac{\partial f_2}{\partial x_1} &amp;\left( \frac{\partial f_1}{\partial x_2} \right)^2 + \left( \frac{\partial f_2}{\partial x_2} \right)^2\end{bmatrix} $$  Why can these two be equal as presented in papers? Word for "willing to try new and unfamiliar things" Example:  A: Hey, do you like to do bungee jumping? B: Um, OK. Haven't done it before, but let's try it.  I'm not looking for adventurous or something similar. That word should also fit in less action-packed activities:  A: I have a new board game. Do you like to play? B: I don't know this game and, actually, I don't like these varieties of games but I'll play. Maybe it's fun.  First I thought about open-minded but I think this means more willing to listen to people, think about their ideas, arguments, ... and accept them (not necessarily agree). What word describes person who is willing to try activities he doesn't know or hasn't experienced before? Is there a way to do the following using LINQ?  foreach (var c in collection) {     c.PropertyToSet = value; }   To clarify, I want to iterate through each object in a collection and then update a property on each object.  My use case is I have a bunch of comments on a blog post, and I want to iterate through each comment on a blog post and set the datetime on the blog post to be +10 hours. I could do it in SQL, but I want to keep it in the business layer. derivative of a determinant of matrix Let $A,B\in M_{n\times n}(\mathbb{R})$, prove that $$(\frac{d}{dt}\det(A+tB))_{t=0} = Tr(cof(A)^{T}\cdot B), $$ where $cof(A)$ is the cofactor matrix of $A$. I tried expanding it using row expansion, but it gets messed up. Any help? Mysql strip time component from datetime I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert '2008-11-05 14:30:00' to '2008-11-05'  Currently i am doing this:  SELECT from_days(to_days(my_date))   Is there a proper way of doing this? How to get battery status? How do I get the battery status on an iPhone? Cycle Normal Pass in Camera Space How does Intel Turbo Boost work? How to create meaningful relationships with NPCs How do I help the PCs to create meaningful relationships with NPCs?   Maybe it is a result of my group playing too many one-dimensional adventures trying to find whatever MacGuffin they are after each week, but most of the time my PCs don't tend to value NPCs too much. Every time they meet an NPC they quickly evaluate what immediate values the NPC can give or tend to ignore them.  What I would really like is to have some good relationships where the PCs actually go out of their way to help NPCs without selfish motivation or even just to try to think of NPCs more and how their actions affect others.  I am not looking for a specific game rules solution to this, but instead techniques to get the players to feel attachment to these fictional characters. I want to delete the record type which is default to the some profiles Difference between files written in binary and text mode What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i &lt; 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text); Number of sigma algebras for set with 4 elements How will people upgrade from 12.10 to later releases after 13.04 is EOL?