I have an arrayList in a class and a getter for it. I need to make a method that returns an arrayList filled with all the files from the first arrayList that have the same name as the String arg. This is what I've come up with.  ArrayList&lt;File&gt; dirs = new ArrayList&lt;File&gt;(); // filled with files  public ArrayList&lt;File&gt; getDirectoriesNamed(String fileName) {     ArrayList&lt;File&gt; files = new ArrayList&lt;File&gt;();     for (File file : dirs) {         if (file.getName() == fileName) //problem is here             files.add(file);     }     return files; }   however when I try this, I get an empty arrayList. and I figured out that the reason is because of the if Statement... is there any reason why that shouldn't work that I'm not seeing?
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?
Proving $\mathbb{F}_p/\langle f(x)\rangle$ with $f(x)$ irreducible of degree $n$ is a field with $p^n$ elements I am attempting to prove what the title says, that $\mathbb{F}_p/\langle f(x)\rangle$ with $f(x)$ irreducible of degree $n$ is a field with $p^n$ elements.  I have already proven that for any field $K$ and polynomial $f(x)$ in $K[x]$, $K[x]/\langle f(x)\rangle$ is a field if and only if $f(x)$ is irreducible in $K[x]$. So I know that $\mathbb{F}_p/\langle f(x)\rangle$ is a field for sure. Where I'm lost is figuring out how to know for sure that there are $p^n$ elements. It's fairly clear if $n\in\{ 0 ,1\}$, but I don't think induction is going to help.  I know from a proposition in class that since $F_p = \mathbb{Z}/\langle p\rangle$ and $F_p = \mathbb{Z}/\langle p\rangle$ is an integral domain, $F_p[x] = (\mathbb{Z}/\langle p\rangle)[x] = (\mathbb{Z}[x])/(\langle p\rangle[x])$, but I'm not sure whether or not that's helpful information. Every Christmas, Harry receives a mediocre gift from the Dursleys. In Harry Potter and the Chamber of Secrets he gets a toothpick.     At that moment, Hedwig swooped into the room, carrying a very small package in her beak.     “Hello,” said Harry happily as she landed on his bed. “Are you speaking to me again?”     She nibbled his ear in an affectionate sort of way, which was a far better present than the one that    she had brought him, which turned out to be from the Dursleys. They had sent Harry a toothpick    and a note telling him to find out whether he’d be able to stay at Hogwarts for the summer    vacation, too.    They hate owls, but obviously use them to contact Harry at school? What is the purpose of the bin directory? What are some examples? What is the difference between "INNER JOIN" and "OUTER JOIN"? What is the difference between "I've been to China" and "I've gone to China"? Both are in the present perfect, but one uses the verb 'to go' and the other 'to be'. Is there a rule for this?  Is there any chance that the differences between "I have been" vs. "I have gone", are differences in English dialect (I don't know if this is the right word).  Edit Could I say that North American English speakers use "I have gone", and maybe U.K speakers say "I've been"? Or vice versa. Youths can teleport, they are chased by the government avidemux problems with Ubuntu 16.04 LTS I installed 16.04 a few days ago and had to reinstall some apps. One of them was avidemux. After I installed it from the Software Center, I couldn't get it to work properly. It wouldn't even load a video clip before giving me an error message and closing.   After trying many commands to purge the avidemux files, I still can't get it to reinstall from the Software Center...   Any tips? Writing conditional (if/then) statements into ArcGIS Field Calculator using Python Parser? I have gotten stuck on seemingly simple ArcGIS field calculator python expression.  I obtained a great answer to a another similar question a few years ago: . Now I need to populate a new field based on 6 ranges of values (bedrock depth).  My attempt at writing this expression is below:    I just need to populate the empty field "bedrockdp" using the ranges in the toc called brockdepmin.     Pre-Logic Script Code:  def !GRIDCODE! (value):     if value &gt;0 and value &lt; 50:         return "0 - 50 cm from the surface"     else:         return "n/a"   bedrockdep =  GRIDCODE (!bedrockdep!) Redirect parent window from an iframe action I'm currently an M. Phil student in Math and I failed a course last semester because I was not able to hand in a home work assignment (which was worth 40% of my grade) on time (I was 30 minutes late).   Apart from that I'd say I'm a fairly decent student, I got an upper second class honours bachelors degree, I have a B+ and A's for all my other courses in my current programme and I'm almost finished with my first paper to be published.   I've however been deeply worried about this failure as it would reflect poorly on my transcript if I were to apply to a Ph.D or another Master's programme.   Will my failing grade affect my chances of getting into a competitive programme or greatly lower my chances of getting a scholarship? Could we provide some automatic feedback on (enough) unfriendly/rude comments? Confirmation that (inner) classes are still not fully supported in @AuraEnabled methods? so i have a 30A disconnect available for use at a customer site for running 2 5HP motors ( at 480V)  the only question i have though is if the line is sized for a 10HP motor would both the 5HP motors need additional fuse protection?   Or could i get away without having addtional fuses protecting the motors ? Underscores in custom fields While trying to perform a WP_Query using meta_query(), I had some trouble because the custom fields created by a plugin had _ in the beginning of its name.   Although I noticed it was stored this way in the database, I had no idea why it was there and thought I had to reference it without the underscore (for the record, that is wrong).  Why do some custom fields start with underscores and others don't? What are the underscores used for? Are they mandatory in some circumstances? Does a percentage require a singular or plural verb, for example, do we say ten percent "go" or "goes"? In the early '80s, I read a story about a Terran man on another planet, where the natives develop skin lesions and eventually die, but are happy, as they become part of the planet they live on. I remember that the protagonist is not developing the lesions, because he hates the planet. Once he starts loving the planet, he starts having the lesions as well. In this story, the planet is "alive".  I have read about "" and "". They do not match my memory. Thank you. Why can we distinguish different pitches in a chord but not different hues of light? In music, when two or more pitches are played together at the same time, they form a chord. If each pitch has a corresponding wave frequency (a pure, or fundamental, tone), the pitches played together make a , which is obtained by simple addition. This wave is no longer a pure sinusoidal wave.  For example, when you play a low note and a high note on a piano, the resulting sound has a wave that is the mathematical sum of the waves of each note. The same is true for light: when you shine a 500nm wavelength (green light) and a 700nm wavelength (red light) at the same spot on a white surface, the reflection will be a superposition waveform that is the sum of green and red.  My question is about our perception of these combinations. When we hear a chord on a piano, we’re able to discern the pitches that comprise that chord. We’re able to “pick out” that there are two (or three, etc) notes in the chord, and some of us who are musically inclined are even able to sing back each note, and even name it. It could be said that we’re able to decompose a Fourier Series of sound.  But it seems we cannot do this with light. When you shine green and red light together, the reflection appears to be yellow, a “pure hue” of 600nm, rather than an overlay of red and green. We can’t “pick out” the individual colors that were combined. Why is this?  Why can’t we see two hues of light in the same way we’re able to hear two pitches of sound? Is this a characteristic of human psychology? Animal physiology? Or is this due to a fundamental characteristic of electromagnetism? What is the "Event Horizon" of a black hole $$T(n) = \sqrt{n} T \left(\sqrt n \right) + n$$  Master method does not apply here. Recursion tree goes a long way. Iteration method would be preferable.  The answer is $Θ (n \log \log n)$.  Can anyone arrive at the solution. Is there a way to closely approximate the CDF of a student-t distribution at a point $x$ without involving the hypergeometric function? For example, by using a series expansion, or expressing the CDF in terms of simpler functions?  The t-distribution can   $$t = \frac{X\sqrt{n}}{Y}$$  where $X$ is normally distributed with mean 0 and variance $\sigma^2$; $\frac{Y^2}{\sigma^2}$ has a chi-squared distribution. Maybe this expression can help simplify the t CDF?  I am trying to write an algorithm to compute the student-t CDF for any real number, so using the hypergeometric function will be extremely difficult. I am also trying to avoid integrating the PDF to get the CDF.