I have java syntax. Sory I'm still not figure out why this happen.  public class TestString {   public static void main(String [] args){     int i=-1;     String a=((Object)i).toString();     if(a=="-1"){         System.out.println("Same");     }else{         System.out.println("Not");     }   } }   And then the result is "Not" what the problems why -1 string different with -1 int in object?
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?
Unable to play MP3 or MP4 files in Rhythmbox or Movie Player I am unable to play any MP3 or MP4 files. When I try to open any MP3 or MP4 file, both show an error, a Python 2.7 plug-in is required. I am currently using a MacBook Pro 13&quot; Mid 2018 with Touch Bar. Today macOS Big Sur was released and I tried to download it but it's getting stuck at 484.4 MB. Initially, it shows 16-17 minutes left, but as soon as it reaches 484.4 MB it's stuck and the timer goes till 10 hours! My Wi-Fi is totally stable with a speed of 100 Mbps. I tried to restart my Mac but it still gets stuck. Earlier there were similar issues in the App Store (even now they are). The issue was I was not able to download an app unless I connect to the US VPN. I even contacted support but they were not able to help out. It wasn't a big deal as a VPN could be used. But now even with VPN, it gets stuck. How to get RGB values from UIColor? I'm creating a color object using the following code.  curView.backgroundColor = [[UIColor alloc] initWithHue:229 saturation:40 brightness:75 alpha:1];   How can I retrieve RGB values from the created color object? Does using the Console Commands negatively affect me? I'm wondering in case I get stuck in an area that I'm unable to get out of or if I clip into a wall and I suddenly can't move. I've had to disable clipping to get out of certain areas in Skyrim before but I want to make sure that things like my achievements and stuff won't shut out on my playthrough.  If I enable something, spawn an item that didn't spawn for me, or just basically use the console command to fix any bugs, what will happen achievement and game-wise? Change Detection using Raster Calculator I'm currently analyzing the change detection for urban expansion over a decade starting from 2006-2016. How can I use raster calculator in order to know the changes? For example, from agriculture to urban area and etc. I already classified the images into 4 classes, urban area,vegetation,water bodies and barren land. How can I find $\gcd(a^m+1,a^n+1)$ with $a,m,n$ positive integers? How can I find $\gcd(a^m+1,a^n+1)$ with $a,m,n$ positive integers?    I have this idea:  Let $d=\gcd(m,n)$. Then there exist positive integers $x,y$ such that $mx-ny=d$ (WLOG). We shall find $G=\gcd(a^m+1,a^n+1)$.  If $m,n$ are odd, then $d$ is odd, therefore one and only one of $x,y$ is even. We have:  $$a^{ny}(a^d+1)=a^{mx}+a^{ny}=(a^{mx}-1)+(a^{ny}+1)=(a^{mx}+1)+(a^{ny}-1).$$  If $x$ is even and $y$ is odd, then $a^{m}+1\mid a^{mx}-1$ and $a^{n}+1\mid a^{ny}+1$, therefore $G\mid a^{ny}(a^d+1)$. If $x$ is odd and $y$ is even, then $a^{m}+1\mid a^{mx}+1$ and $a^{n}+1\mid a^{ny}-1$, thus $G\mid a^{ny}(a^d+1)$. However, since $\gcd(a^m+1,a^{ny})=\gcd(a^n+1,a^{ny})=1$, so $\gcd(G,a^{ny})=1$, hence $G\mid a^d+1$. We also have $a^d+1\mid a^{m}+1$ and $a^d+1\mid a^{n}+1$, so $a^d+1\mid G$. Thus $G=a^d+1$.  If $v_2(m)=v_2(n)=v_2(d)=k&gt;1$, then there exist some odd numbers $m_1,n_1,d_1$ such that $m=2^km_1,n=2^kn_1,d=2^kd_1$. We shall have $m_1x-n_1y=d_1$, so one and only one of $x,y$ is even, and we can use the same argument when $m,n$ are odd, so $G=a^d+1$.  However, if $v_2(m) \neq v_2(n)$, I cannot find any solutions for this. I think that $G \in \{1,2\}$, but I cannot prove or disprove it. How can I find $G=\gcd(a^m+1,a^n+1)$ if $v_2(m) \neq v_2(n)$ ? Moreover, is there anything from my arguments that can be improved ? Finding an expression for $\tan (a+ b + y)$ which involves only $\tan a, \tan b,$ and $\tan y$. How to find this ?   I'm stuck at $1$ and how to $1$ to change the tangent associated with a,b or c.  I meant this ,everybody.  $\frac{tan(a)+tan(b)+tan(y)−tan(a)tan(b)tan(y)}{1−tan(a)tan(b)−tan(a)tan(y)−tan(b)tan(y)}$ Are the following two sentences correct?     I want you to go to sleep.   and     I want you going to sleep.   If they are both correct, what's the difference? I was going through the topic "formation of comparative and superlative".       The rule says     When two objects are compared with each other, the latter term of comparison must exclude the former, as in "Iron is more useful than any other metal". If we say "Iron is more useful than any metal", that is the same thing as saying    "Iron is more useful than iron", since iron is itself a metal.   I am finding difficulty to relate the rule with example. OpenGL Line Width Take $\mathbb{R}$ as a vector space over $\mathbb{Q}$, then a basis for $\mathbb{R}$, then $|B|=2^{\aleph_0}$ I am trying to prove that Given $\mathbb{R}$ as a vector space over $\mathbb{Q}$, and a basis for $\mathbb{R}$, then $|B|=2^{\aleph_0}$.  Proof: Suppse that $|B|&lt;2^{\aleph_0}$, then $\mathbb R = span\{ b_i ; b_i \in B \}$ So $ \mathbb R = \{ \Sigma_{i=1}^{\infty}\alpha_i b_i ; \alpha_i \in \mathbb Q, b_i \in B, i \in \mathbb N \} = \bigcup_{n=1}^{\infty}\{\Sigma_{i=1}^n \alpha_ib_i\}$. Which is a contradiction since a countable union of countable union of countable sets is countable and $\mathbb R$ is not.  What do you think?  Thank you, Shir How to compare (probability) predictive ability of models developed from logistic regression? I know some well-known measures are $c$ statistic, Kolmogorov-Smirnov $D$ statistic. However, as far as I know, those statistics take into account only of the rank order of the observations, and is invariant under changing the intercept of the logistic regression model (e.g. in oversampling-correction exercise).  In my current application, I need to depend on the accuracy of the logistic regression to predict probability of event. I know only of qualitative way of assessing models for probability prediction ability, namely by plotting "QQ-plot" of the actual vs predicted probability of event:   Score the validation dataset using the developed model. Rank the observations according to the predicted probability and group into $n$ buckets according to their rank of predicted probability. (First 1/n would go to the first bucket, next 1/n would go to the next ...) Calculate the average predicted and actual probability of Event for each bucket. Create a scatter plot of Predicted vs Actual - one point for each bucket.   I am wondering:   Is the "Q-Q plot" I mentioned above a legitimate way to assess predictive performance of models developed from logistic regression? If so, where may I find more reference for that? Is there any known quantitative way to assess the probability prediction ability of this kind of model? Create an Application without a Window How would you program a C/C++ application that could run without opening a window or console? How to tell Google to ignore URL parameters and forget about any already crawled? I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.   I'm curious to know about the actual difference between the following 2 child classes.  class Base(object):     def __init__(self):         print "Base created"  class ChildA(Base):     def __init__(self):         Base.__init__(self)  class ChildB(Base):     def __init__(self):         super(ChildB, self).__init__()  ChildA()  ChildB() Does a wireless-N (802.11n) network have poor performance when in b/g "mixed" mode? It seems to be an "old" wives tale that, when using a wireless-N router in "mixed mode" to support legacy 802.11b or 802.11g devices, the performance of 802.11n clients will suffer.      claim that when running in mixed-mode, all (some?) N clients run at G speeds.   make the same claim, but say it only happens when a G client is connected.    say N clients run faster, but still run about 30% slower than if the router were in N-only mode, even if there are no legacy B/G clients connected.    claim there is no speed drop for N clients when running on a mixed-mode network.  They say the only issue is that overall network throughput will be lower, because only one client can be transmitting at any time, so some of that transmission time must be shared with the legacy B/G clients running at lower speeds, reducing the overall throughput from what it would be if there were only N clients connected.    So, which is it?  Will running in mixed-mode slow down my network, even if there are no B/G clients?  If I'm running N, will having another client connected at B/G slow me down substantially vs. if they were running N? I am unable to find the link for downloading Ubuntu 16.04 onto my   desktop/laptop. I am able to see the link only for 18.04, but I need 16.04. I'd like to see if somebody has been trying to log-in by brute-force into my Ubuntu 12.04 server over SSH. How can I see if such activities have been taking place? How to find $\lim_{n\to\infty}\frac{1!+2!+\cdots+n!}{n!}$? Localization of ideals at all primes