Good Day!  I Need help with a Libgdx Project. What i want is to remove a tile, which is in my graphics layer (layer 0).  This is what i got so far:  if(object1.getUserData() != null &amp;&amp; object1.getUserData() == "polyblock"){        polyblock1 = true;        System.out.println("PLAYER 1"); }else if(object1.getUserData() != null &amp;&amp; object1.getUserData() == "redcoin" || object1.getUserData() == "greencoin" ||  object1.getUserData() == "bluecoin" ){            B2dObjectGetter.getCell(object1.getUserData() == "redcoin" ? 3 : object1.getUserData() == "greencoin" ? 4: 5).setTile(null);       }   The coin bodies and the getCells Method:  for (int i = 3; i &lt;= 5; i++){      for (MapObject obj : map.getLayers().get(i).getObjects().getByType(EllipseMapObject.class)) {             Ellipse ellipse = ((EllipseMapObject) obj).getEllipse();              bdef.type = BodyDef.BodyType.StaticBody;             bdef.position.set((ellipse.x + ellipse.width / 2) / GameJLibGDX.PPM, (ellipse.y + ellipse.height / 2) / GameJLibGDX.PPM);              CircleShape shape = new CircleShape();              coinbodies[i] = world.createBody(bdef);             shape.setRadius(ellipse.width / 2 / GameJLibGDX.PPM);             fixdef.shape = shape;             coinbodies[i].createFixture(fixdef).setUserData(i == 3 ? "redcoin" : i == 4 ? "greencoin" : "bluecoin");         }     }  }  public static TiledMapTileLayer.Cell getCell(int i){     TiledMapTileLayer layer = (TiledMapTileLayer) map.getLayers().get(0);     System.out.println(coinbodies[i].getFixtureList());     return layer.getCell((int)(coinbodies[i].getPosition().x * GameJLibGDX.PPM / 128),(int)(coinbodies[i].getPosition().y*GameJLibGDX.PPM / 128)); }   It seems to work really fine except one Thing:  Blue coin got hit:    Green coin got hit:    Red coin got hit: Cant post more than two Pictures :(. The red coin is disappering and everything is fine. But only if I hit them one after another. So i mean in the order: Redcoin, Greencoin, Bluecoin  I noticed something really weird:    but:    Thank you for your time!
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?
How do I find out which DOM element has the focus? I would like to find out, in JavaScript, which element currently has focus. I've been looking through the DOM and haven't found what I need, yet. Is there a way to do this, and how?  The reason I was looking for this:  I'm trying to make keys like the arrows and enter navigate through a table of input elements. Tab works now, but enter, and arrows do not by default it seems. I've got the key handling part set up but now I need to figure out how to move the focus over in the event handling functions. SGS2 screen gets more and more dark blue, possibly after overheated charging In  is a proof of Stirling's formula.  I really like most of it, but at a crucial step he uses the integral identity  $$n! = \int_{0}^{\infty} t^n e^{-t}  dt$$  , coming from the Gamma function.  I have a mathematical confession to make: I have never "grokked" this identity.  Why should I expect the integral on the right to give me the number of elements in the symmetric group on $n$ letters?    (It's not that I don't know how to prove it.  It's quite fun to prove; my favorite proof observes that it is equivalent to the integral identity $\int_{0}^{\infty} e^{(x-1)t}  dt = \frac{1}{1 - x}$.  But if someone were to ask me, "Yes, but why, really?" I would have no idea what to say.)  So what are more intuitive ways of thinking about this identity?  Is there a probabilistic interpretation?  What kind of random variable has probability density function $\frac{t^n}{n!} e^{-t}$?  (What does this all have to do with Tate's thesis?)  As a rough measure of what I'm looking for, your answer should make it obvious that $t^n e^{-t}$ attains its maximum at $t = n$.  Edit:  The kind of explanation I'm looking for, as I described in the comments, is similar to  of the beta integral. Is a +1/+1 counter I get from, say Unleash or Undying different than +1/+1 from something like  or ? Can Java's NullPointerException be changed to report on which variable was null? Detect if an outgoing call has been answered Rename Multiple files in unix I have multiple files whose names look like this  2313_ABCDEAUG2014_PQRST_0_.pdf 3244_ABCDEAUG2014_PQRST_0_.pdf 4234_ABCDEAUG2014_PQRST_0_.pdf   t want to rename the file in the following format.  AZ-2014-08-2313.pdf AZ-2014-08-3244.pdf   Please suggest. "Oriented" vs. "orientated" Is it standard for graduate students to get gifts for their advisors? Is it standard for graduate students to give their advisors gifts around Christmas, like chocolates or bottles of wine?  What about other important people, such as their thesis committee members, or department secretaries? How do I keep both the background and foreground in the image in focus at the same time? How do you have both the background and foreground in the image in focus at the same time?  Last week I was attempting a shot where I had the back of a hat in focus and in the distance you could see a mountain. I wanted both in focus, but could either focus on the mountain or the hat. I ended up taking the in-focus shots of both and merging them in Photoshop. While that isn't difficult I would prefer to shoot the shot as accurate as possible. From what I have read aperture is important in the depth of field but what are the techniques for keeping both the background and foreground in focus?  I am using a Nikon D5100 with a 18-55mm f/3.5-5.6 (standard kit lens) and a 55-200mm  f/4.5-5.6.    almost answers my question, but I am a bit confused. Can someone explain this a bit differently? Thanks! Why is SQL Server losing a millisecond? I have a table structured like this:  CREATE TABLE [TESTTABLE] (     [ID] [int] IDENTITY(1,1) NOT NULL,     [DateField] [datetime] NULL,     [StringField] [varchar](50),     [IntField] [int] NULL,     [BitField] [bit] NULL )   I execute the following code:  BEGIN     INSERT INTO TESTTABLE (IntField, BitField, StringField, DateField)     VALUES ('1', 1, 'hello', {ts '2009-04-03 15:41:27.378'});       SELECT SCOPE_IDENTITY()   END   And then   select * from testtable with (NOLOCK)   and my result shows:  2009-04-03 15:41:27.*377*   for the DateField column.  Any ideas why I seem to be losing a millisecond?? How do I fix the left mouse opening the menu instead of breaking blocks? Using ArcPy to Switch Layout Templates? Using ArcMap 10.1, since there is not a way to control portrait or landscape of the layout view through python, is there a way to switch layout templates without opening a new mxd through python?   Since there is a change layout template button it would be nice to have a python function to do the same. Where can I have a genuine Ainu cultural experience in Hokkaido? During my next trip to Japan I may end up in Hokkaido. I've read something about this mysterious indigenous group called Ainu/Aynu/Aino/Ezo, but I must admit my understanding of the whole thing is rather limited right now.   What I wish to know is: is there such a thing like an authentic Ainu village/town/whole-region where Ainu people live according to their tradition, as opposed to something staged for tourists?  Edit: given the comments below I wish to specify better what I mean with the word 'authentic'. Of course, I don't expect pristine landscapes and Ainu people living in blissful harmony with fluffy penguins (semi-quote) but I won't be surprised to find out there still are authentic villages in remote areas of Hokkaido where mass tourism is not an issue at all.  People are subject to tourist's attention (tourist coming from different countries, at least) everywhere, not only when they "made a conscious decision to live a traditional life". This doesn't actually mean anything. Indian people are surprisingly differents (in local customs) from Italians and Italians take a lot of pictures during their travels there, still the tourism isn't banned in India. Dupehammer creates and deletes a comment, causing notifications to go out What is the value of $i^{i^{i^\ldots}}$? What is the value of $i^{i^{i^\ldots}}$?   My effort is the following: If $z, \alpha \in \mathbb{C}$ with $z \neq 0$ then we can write $z^{\alpha}=e^{\alpha \log z} = e^{\alpha [ \log |z|+i \text{ Arg z} + 2 \pi i m]}$ where $ m=0, \pm 1, \pm 2, \ldots$  and Arg z is the principle argument of the complex number $z$. But in above expression we don't have the finite no of exponents, so I am not sure how should I use this formula to the solve above problem. Thanks and Regards! Why am I getting different results from two servers that located in the same destination network? There's two servers with the same network IP, and the only difference between them is the last two numbers like: 37.211.15.247 and 37.211.166.178. The Hosting Provider claims that the subnet mask for both networks is 255.254.0.0  When I try the command Tracert (Traceroute) to test the ping and to see what hops does it take to reach the destination server, I get different ping times and different forward path results which is strange because they are all located in the same company host.  Is there something wrong? Shouldn’t it take the same path too?  I have added the the full IP addresses to both servers as requested by some commenters. Well the two servers aren’t “International” anyways, so as far as I know, the only thing that comes to mind is the possibility that the two are configured on different subnetworks just like what . Though it’s suspicious.  UPDATE: After doing so much research, I found out the Subnet of these two hosts. They are on a /15 (255.254.0.0) subnet mask. Unfortunately, this is what that hosting provider claimed to me which is not true, and the true Subnet they apparently use is a /17 (255.255.128.0) Subnet mask. It turns out that they were definitely on different Subnets. That's why I got different traceroutes when I tested these two IPs 37.211.15.247 and 37.211.166.178  because they are clearly on different Subnets. Thank you everyone for these good answers, especially  his answer helped me a lot. How to prove the following product? $$\frac{\sin(x)}{x}= \left(1+\frac{x}{\pi}\right) \left(1-\frac{x}{\pi}\right) \left(1+\frac{x}{2\pi}\right) \left(1-\frac{x}{2\pi}\right) \left(1+\frac{x}{3\pi}\right) \left(1-\frac{x}{3\pi}\right)\cdots$$ Do I need a visa to transit (or layover) in the Schengen area? I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland Problem with sudo apt get update: The repository cdrom... does not have a Release file Every time I try update (using sudo apt-get update) my Ubuntu I get this problem:  W: The repository 'cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   How can I fix it? I use Ubuntu 16.04 LTS