String s1 = "abcdef"; String s3 = new String(s1);     if(s3 == s1){      System.out.printf("yes");        }else{             System.out.printf("no");          }      Why is not print yes? Who can explain to me?
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?
Creating if-else condition with ArcGIS API for JavaScript combo boxes? How to know if an object has an attribute in Python Is there a way in Python to determine if an object has some attribute?  For example:  &gt;&gt;&gt; a = SomeClass() &gt;&gt;&gt; a.someProperty = value &gt;&gt;&gt; a.property Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt; AttributeError: SomeClass instance has no attribute 'property'   How can you tell if a has the attribute property before using it? Meta Meta Privilege I just took a look at meta today and noticed something weird in the meta privileges. If you look at the meta privilege list, you can see that at . I know that there is no meta for meta, and the link they give you in the privilege page leads you to meta.stackexchange.com, right where you started. Why do they have this privilege? I have a feeling that this is a bad recursive joke. You must be  member of meta to get the privilege of being a member of meta! :) Is there an equivalent of 'which' on the Windows command line? As I sometimes have path problems, where one of my own cmd scripts is hidden (shadowed) by another program (earlier on the path), I would like to be able to find the full path to a program on the Windows command line, given just its name.  Is there an equivalent to the UNIX command 'which'?  On UNIX, which command prints the full path of the given command to easily find and repair these shadowing problems. A short story about finding an inhabitable planet and meeting aliens If the edges of the complete graph $K_{17}$ (on 17 vertices with no three collinear) are each colored one of three colours can it be proven to have two or more monochromatic triangles? Error: The processing instruction target matching "[xX][mM][lL]" is not allowed I am getting the error:   touch: cannot touch `/opt/tsrm/compliance/cme/log/20121207.log`: No such file or directory   on the touch command: touch $LOGFILE  I also checked the link: , But I didn't understand the answer.   Note: I was also getting mkdir: cannot create directory; I fixed this by adding the -p option.   Could this be something with the version of Linux I am working in? I observed some naive examples. Spheres, for example, when we cut out one point, can be embedded into $\mathbb{R}^n$. And if we cut out a measure zero set of a projective space, it can be embedded into the Euclidean space of the same dimension. So I wonder if all manifolds can be embedded into a same dimensional Euclidean space when we cut out a measure zero set? Can anyone prove it or disprove it by giving me some counterexamples? 1.13 Detect if no mobs with a specific tag exist and execute commands My 1.12 solution can be found . When trying to update command blocks to 1.13, I have the following:  scoreboard objectives add invert dummy   (run at start) then:  scoreboard players set FakePlayer invert 1   (impulse unconditional repeat) chained into:  execute at @e[tag=summoned] run scoreboard players reset FakePlayer invert   (chain unconditional repeat) chained into:  execute if score FakePlayer invert = 1 invert run say "All summoned animals are dead!"   This should reset FakePlayers score continuously until all entities with tag "summoned" are dead, then it should run the final condition. This does not happen, and I can't see why. Is it safe to use a voltage divider for Arduino and DC motor controller? Limit $\frac{x^2y}{x^4+y^2}$ is found using polar coordinates but it is not supposed to exist. How do I get back my suspend option in Gnome Shell? With the new version of Gnome Shell in Ubuntu 12.10 they turned  around by just displaying the shutdown option which becomes suspend on pressing Alt.  How do I get back my beloved suspend option? What should happen if a logo I made is similar to another? Why is pruning not needed for random forest trees? Breiman says that the trees are grown with out pruning. Why? I mean to say that there must be a solid reason why the trees in random forest are not pruned. On the other hand it is considered very important to prune a single decision tree to avoid over fitting. Is there some literature available to read for this reason? Of course the trees may not be correlated but there still will be a possibility of over fitting. How do I detect orientation on app launch for splash screen animation on iPad! I downloaded Heroku from Heroku toolbelt using  wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh   in the terminal, which they recommended on their site.   My Ubuntu (14.04.1) didn't recognize the -q0-, so I took it out.  It then seemed to download fine - I see the  in the directory I was in when i downloaded it.   Now, however, it still doesn't recognize heroku as a command.  It also won't show me where it is with the 'whereis' command.  But when I look in the current directory with ls -a, it shows up.  It seems to be there.   How do I install it? I got a new laptop; it came with an existing Windows installation, but I wanted to migrate my current backup to the new machine. I dd-ed the new machine's partitions to an external drive:  /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3 /dev/nvme0n1p4   and afterwards move my current partitions to the new machine. What followed was a medium-sized nightmare. The new machine would boot, but the wireless network drivers were not recognized and later found out (to the best of my knowledge) they couldn't be installed. I tried:   booting from the console and running:  sfc /scannow chkdsk C: /f /r /x   both seemed to have completed successfully, but now the machine would get stuck in a startup repair loop. I tried resetting the machine (whilst keeping my files), but this failed halfway through. now the machine's still stuck in the loop and decided to try and repair it externally using a bootable Windows&nbsp;10 . It's likely that I'll need the new machine's Windows&nbsp;10 key. I'm not sure if it's stored in the BIOS (it came with Windows&nbsp;10  preinstalled) or somewhere on the partitions.   How can I get the key from the partitions (if it's there at all) while booting from a Linux image? "In the Internet" vs. "on the Internet" When should I use "in the Internet" and when "on the Internet"? What is the relationship between UV image and material texture? I am struggling to understand perhaps a very simple concept in Blender. There are materials which might have some diffuse coloring and a texture image, and there are also UV maps with their own images. Both can be applied to meshes or faces, but it seems that if a face has UV map then the material's texture is ignored and an image for UV map is picked.   If so, what is the use for a texture in a material if it is replaced by UV map's image?   EDIT: I've added some images to clarify the issue I have.   Case 1: a basic plane with material which has a texture, and no UV map. Diffuse color is applied, but material's texture is not.   Case 2: like above, but with reduced intensity of texture.   Case 3: Added UVmap and added image to the UVmap. Now I have texture, but not the diffuse color, and if UVmap was a different image, it would be picked regardless of texture set in the material.   So if I have UVmap image, what is the material texture for?