Right, in this program I am supposed to be able to search for a person in the list. If I search for someone who is not in the list then the Found variable should be kept at false. If I search for someone who is in the list eg: "Ben" then Found should be set to true.   However for some reason, searching for someone who is in the list does not set found to true. It seems like the if statement which checks the player's input to the array is not working properly. I have no idea why this is. There are no errors. Can anyone help? Thanks  code:      package com.test.main;  import java.util.Scanner;      public class Main {     public static void main(String[] args){     String[] Names = new String[4];     Names[0] = "Ben";     Names[1] = "Thor";     Names[2] = "Zoe";     Names[3] = "Kate";      int Max = 4;     int Current = 1;     boolean Found = false;      System.out.println("What player are you looking for?");     Scanner scanner = new Scanner(System.in);     String PlayerName = scanner.nextLine();      while(!Found &amp;&amp; Current &lt;= Max){         //System.out.println(Names[Current-1]);         //System.out.println("PLAYERNAME: " + PlayerName.length() + ", ARRAY: " + Names[Current-1].length());         if(Names[Current-1] == PlayerName){             //System.out.println("found");             Found = true;         }         else{             Current++;         }     }     //System.out.println(Found);     if(Found){         System.out.println("Yes, they have a top score");     }     else{         System.out.println("No, they do not have a top score");     } } }
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 $1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$ using induction I'm a simple minded Bayesian who feels comfortable in the cosy world of Bayes.   However, due to malevolent forces outside my control, I now have to do introductory graduate courses about the exotic and weird world of frequentist statistics. Some of these concepts seem very weird to me, and my teachers are not versed in Bayes, so I thought I'd get some help on the internet from those who understand both.   How would you explain the different concepts in frequentist statistics to a Bayesian who finds frequentism weird and uncomfortable?   For example, some things I already understand:   The maximum likelihood estimator $\text{argmax}_\theta \;p(D|\theta)$ is equal to the maximum posterior estimator $\text{argmax}_\theta \;p(\theta |D)$, if $p(\theta)$ is flat.  (not entirely sure about this one). If a certain estimator $\hat \theta$ is a sufficient statistic for a parameter $\theta$, and $p(\theta)$ is flat, then $p(\hat \theta|\theta)=c_1\cdot p(D|\theta)=c_1\cdot c_2\cdot p(\theta|D)$, i.e. the sampling distribution is equal to the likelihood function, and therefore equal to the posterior of the parameter given a flat prior.    Those are examples of explaining frequentist concepts to someone who understands Bayesian ones.   How would you similarly explain the other central concepts of frequentist statistics in terms a Bayesian can understand?  Specifically, I'm interested in the following questions:   What is the role of Mean Square Error? How does it relate to Bayesian loss functions? How does the criterion of "unbiasedness" relate to Bayesian criteria? I know that a Bayesian will not demand that its estimators are unbiased, but at the same time, a Bayesian would probably agree that an unbiased frequentist estimator is generally more desirable than a biased frequentist one (even though he would consider both to be inferior to the Bayesian estimator). So how does a Bayesian understand unbiasedness? If we have flat priors, do frequentist confidence intervals somehow coincide with Bayesian ones?  What in the name of Laplace is going on with specification tests like the $F$ test? Is this some degenerate special case of a Bayesian update on the distribution over model space?    More generally:  Is there some resource that explains frequentism to Bayesians?  Most of the books run the other way around: they explain Bayesianism to people who are experienced in frequentist statistics.     ps. I have looked, and while there are a lot of questions already about the difference between Bayesian and Frequentism, none explicitly explain Frequentism from the perspective of a Bayesian.   is related, but is not specifically about explaining Frequentist concepts to a Bayesian (more about justifying frequentist thinking in general).  Also, my point is not to bash frequentism. I really do want to understand it better What is rank deficiency, and how to deal with it? What is currently the best way to get a favicon to display in all browsers that currently support it?  Please include:   Which image formats are supported by which browsers. Which lines are needed in what places for the various browsers. Keyboard Shortcuts no longer working on GNOME 3.4.1 Analytics search keywords are unreliable Thought Experiment - Poking a stick across a Black Hole's Event Horizon I have a dual boot laptop (Windows 10). I ran general updates and now my Ubuntu won't boot.   I ran in recovery mode and still it freezes in the same place.      Kernel panic – not syncing: Attempted to kill init! exit code=0x00007f00 The problem:  Assume $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfies $|f(t) - f(x)| \leq |t - x|^2$ for all $t, x$. Prove $f$ is constant.  I believe I have some intuition about why this is the case; i.e. if $t$ and $x$ are very close, ($|t - x| = \epsilon$), then $\sqrt{\epsilon}$ will converge to 0, so $|f(t) - f(x)|$ will also converge to zero if you keep taking $t$ and $x$ closer and closer to each other. However, how do I formalize this argument? Thanks. Average time alloted for manuscript review across disciplines I am asking this question because I've always had the impression that manuscripts submitted to a journal in my field (theoretical linguistics) take an insanely long time to get published, and sometimes I get the impression that this is because, most of the time, nobody other than the author cares about getting things done within a reasonable amount of time. Some examples from personal experience follow.   For the last paper I submitted before getting my PhD, I had to wait nine months from the submission date to get reviews back from the referees. Last week I got a review request from a journal I had never reviewed for previously. The review deadline is March 15 (almost four months). In early October, I submitted a manuscript to a journal that I know asks reviewers to return reviews within 6 weeks. I checked the status of the manuscript online and it still says "with editor". Earlier this year, I was about to start writing a review when my wife went into labor. By the time we came back from the hospital, I had forgotten about the review, so I missed the deadline. The editor didn't contact me to ask about the review until two months after the deadline. Late in 2013, I was asked to write a survey chapter for a handbook. The expected publication date of the handbook is summer 2016.   All of this is not me being unlucky with editors and referees. In private conversations through the years, many colleagues have confirmed that it is virtually unheard of to get reviews back within 3 months of submission; 5 or 6 months seems to be a good average, but in some cases it can take longer (see my first point above). In general, everybody seems to have accepted that the submission-to-printed-journal process is going to take a bare minimum of one year, and that's assuming that the manuscript is accepted without revisions. If revisions are required, two years is not out of the question. Also, it's not like our papers are ridiculously long. I've reviewed about 100 papers so far, and the longest one was about 50 single-space pages; 30-35 single-spaced pages is closer to average.  I remember that, when I was a postdoc, my astrophysics housemate mentioned that in his field the entire submission-to-printed-journal process took only three or four months. I really can't see a good reason why theoretical linguistics shouldn't operate on similar timeframes, other than the fact that everybody seems to have grown used to things taking way longer than they really need to. What are the wait times in other fields? How do you manage to get things done quickly? How do you start Windows 10 in safe mode? I am using ArcMap 10.1. The background: I have an .mxd that I intend to roll out across the company as our default template for all future maps/figure production. This .mxd contains two Data Frames; the first (&quot;Main&quot;) is larger (occupying almost the entire page) and is designed to be used to hold the majority of mapped data whilst the second (&quot;Inset&quot;) is much smaller and is to be used as an overview map. The problem: When choosing to import this new .mxd to an existing .mxd (using the Change Layout button on the Layout toolbar) the wizard automatically selects the smaller (&quot;Inset&quot;) Data Frame to occupy the larger part of the page. The screenshot below shows this interface with a red box indicating the two possible locations of each Data Frame:  Whilst it is possible to manually alter the order of the Data Frames using the Move Up or Move Down buttons, how do I change the default option for this setting (i.e. so that the &quot;Main&quot; Data Frame always appears in the larger space - &quot;2&quot;)? The reasoning is that I would like the process of using this new .mxd template to be as simple as possible, this is especially important as we have a wide range of users with varying abilities. Does anyone know how to choose/change this default setting? It does not appear to be in the Data Frame Properties &gt; Data Frame menu where I would expect it to be. I recently put a bounty on a question regarding the . I did this as the only two answers on that page are not satisfactory and I wish to encourage a tractable answer.  I am concerned that when the bounty period expires, if I do not select an answer for the bounty that it may be awarded automatically to one of these speculative and unsatisfactory answers. How might I prevent that? I could put an answer of my own stating "no satisfactory sources are available" and award the bounty to that, however I feel that there should be a better way.  I stress that I put the bounty on the question specifically because the current answers are not satisfactory and I do not want to award them. Why is time evolution unitary? Is the reason why the time evolution operator is unitary based on purely physical arguments, i.e. that the physical processes that an isolated system undergoes shouldn't depend on any particular instant in time (homogeneity of time); thus two experimenters who conduct the same experiment starting from the same initial state, but at different times, should have the same probability amplitude for that state?! Or is there some mathematical argument as well?  Also, is the reason why the time evolution operator is linear implied by the superposition principle (as an arbitrary state can be expressed as a linear combination of basis states the operator should act linearly as otherwise the state as a whole would evolve differently to the superposition of states that it was initially represented by)?! Reference to undeclared entity exception while working with XML I am trying to set the innerxml of a xmldoc but get the exception: Reference to undeclared entity  XmlDocument xmldoc = new XmlDocument(); string text = "Hello, I am text &amp;alpha; &amp;nbsp; &amp;ndash; &amp;mdash;" xmldoc.InnerXml = "&lt;p&gt;" + text + "&lt;/p&gt;";   This throws the exception:      Reference to undeclared entity 'alpha'. Line 2, position 2..    How would I go about solving this problem? The new Top-Bar does not show reputation changes from Area 51. Is it supposed to be a HTML or an HTML I've seen many people who say:     This is a HTML page.   Yet I've also seen many people who say:     This is an HTML page.   Are both usages equally correct?  Or, which is the grammatically correct one?       Possible Duplicates: Why should boostrap sample size equal the original sample size? When searching the internet on the sample size of for boostrap samples I generally find that the size should equal the original sample size. However, I can't find any explanation on why this should be the case.   In what way is it bad to use a smaller sample size? Is it always better to use a larger sample size?   Some of the sites which report this: Updated WiFi fix for Yoga 13 and Ubuntu 16.04? I have a Lenovo Yoga 13 and I was running 14.04 on it and I've since upgraded to 16.04. I applied the fix descibed here () with 14.04 and it worked but no longer seems to with 16.04. I know that the way Realtek drivers work was reorganized in Linux kernel 4.4 () however I don't know enough about what was changed to know if that was the problem. Has anyone else experienced this issue or know how to fix it? How do you parse and process HTML/XML in PHP?