the following is true in Java  "abc"=="abc"   Why? The two Strings are two different objects, they should not have the same object identity?
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?
Export Track Markers to csv I am trying to export markers from the Blender motion tracker and found the following script that will do exactly that:  for clip in D.movieclips:     for track in clip.tracking.tracks:         fn = 'data/tr_{0}_{1}.csv'.format(clip.name.split('.')[0], track.name)         with open(fn, 'w') as f:             frameno = 0             while True:                 markerAtFrame = track.markers.find_frame(frameno)                 if not markerAtFrame:                     break                 frameno += 1                 coords = markerAtFrame.co.xy                 f.write('{0} {1}\n'.format(coords[0], coords[1]))   It works but I have two questions:   How can I save the data on my Desktop rather than in folder in MacOS blender content where it saved right now. The following won't work:   fn = '/User/me/Desktop/data/tr_{0}_{1}.csv'.format(clip.name.split('.')[0], track.name) The resulting values I get do not represent the more user friendly marker values in den Blender GUI. Instead of x/y coordinates in screen coordinates, I get a value between 0/1. How can I convert them to those screen coordinates ?    Thanks for your help The title says it all, just wondered if accessing the iOS will count towards your consecutive visited days. Is 60 minutes enough layover time at Los Angeles International Airport? I am flying in to LAX on American Airlines and have a 60 min layover before I fly out with American Airlines (same ticket).  Will this be enough time? White regions in DensityPlot — is this a bug with ColorFunctionScaling? Google Chrome is not starting I've just installed Ubuntu 16.04 LTS on dual boot. I've looked for many solutions and tried them all but Chrome never starts; the logo appears on the left but no window opens.  I downloaded the deb file on google chrome website and installed it through Ubuntu Software, but it doesn't start.   I have tried installing it through the command line with   sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb sudo apt-get install -f   I have checked with uname -a and my system is 64 bit. I have also tried gdebi with the same result.   My repository universe is up to date.  I only have one display in settings>displays> so I can't turn off built-in display nor check the mirror display (I read it could be the problem as I also have a graphic card but it seems it is not in my case).  Here is what I get in the command line when I try to run Chrome from it ( the message is the same, whatever the method I used to install Chrome):  ~$ google-chrome [11831:11831:1122/114854.195473:ERROR:process_singleton_posix.cc(433)] readlink failed: Permission denied (13) [11831:11831:1122/114854.195493:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195508:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195515:ERROR:process_singleton_posix.cc(280)] Failed to create /home/basil/.config/google-chrome/SingletonLock: Permission denied (13) [11831:11831:1122/114854.195538:ERROR:process_singleton_posix.cc(433)] readlink failed: Permission denied (13) [11831:11831:1122/114854.195564:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195622:ERROR:chrome_browser_main.cc(1498)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption. [11831:11868:1122/114854.209297:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process.   Any new approach will be much appreciated How do i testfor a item a player is holding? Create tar archive of a directory, except for hidden files? I'm wanting to create a tar archive of a specific directory (with its subdirectories of course). But when I do it, using the tar command, I get a list of files that were included, for example:     a calendar_final/._style.css      a calendar_final/style.css   As you can see, there are two versions of the same file. This goes for every file, and there are many. How do I exclude the temporary files, with the ._ prefix, from the tar archive? only display df lines that have more fs usage than 80% root@SERVER ~$ df Filesystem  512-blocks  Free    %Used   Iused   %Iused  Mounted on /dev/YXCV   655360      365632  45% 6322    13% / /dev/ASDF   3801088     670648  83% 41759   32% /usr /dev/ASR    1048576     500496  53% 5555    9%  /var   How can I pipe the df command's output to only display lines that have more usage than 80%?  e.g.: it would only display:  /dev/ASDF   3801088     670648  83% 41759   32% /usr Fast(est) and intuitive ways to look at matrix multiplication? "error: XDG_RUNTIME_DIR not set in the environment." when attempting to run nautilus as root I am attempting to run nautilus as root but when I run "sudo nautilus" from the terminal, I get the following error:     error: XDG_RUNTIME_DIR not set in the environment.      (nautilus:9341): Gtk-WARNING **: cannot open display:   The issue does not occur when I attempt to run nautilus as non-root. I am using ubuntu 14.04. Does anyone know how I can fix this? This is what I have come up with so far, but I am rather lost at lines 3-4...  $$\begin{align} (a,b)\in A\times (B\setminus C)\iff&amp; a\in A \land b\in (B\setminus C)\\ \iff&amp; a\in A \land (b\in B \land \lnot(b\in C))\\ \iff&amp; (a\in A \land b\in B) \land (a\in A \land b\notin C)\\ \iff&amp; (a\in A \land b\in B)\setminus (a\in A \land b\in C)\\ \iff&amp; (a,b)\in (A\times B)\setminus ((a,b)\in A\times C)\\ \iff&amp; (a,b)\in (A\times B)\setminus (A\times C) \end{align}$$ Distribution of orbital velocities in a disk galaxy for N-body simulation? Can I travel to Schengen countries that were not on my itinerary when I applied? Grant the OP a binding close as duplicate vote Since the  to the close as duplicate mechanism it is a lot more visible to the OP that there is/might be a duplicate to their question. Empirically, I've noticed a lot more people agreeing, in the comments under their question, that their question is a dupe.   For instance, :        I'm aware that allowing  is  (back in the stone age) but now Stack Exchange is so much larger, and Stack Overflow is groaning under the weight of questions, I think this should be partially revisited.  Based on the principle that the simplest way to keep a site clean is to have as many people as possible nibbling away, I propose that the OP gets granted a binding close-as-duplicate vote.  It should simply be an additional line in the banner, which is . It might be something like this:     This question may already have an answer here:   &nbsp; "" 3 answers   &nbsp; Does this fully answer your question?  Yes / No   I'm not wedded to the Yes / No thing I just can't think of a better way at the moment.  Clicking on Yes would take the OP to the close as duplicate dialogue with that question highlighted. If there are multiple duplicate questions you'd need to ask the OP multiple times. A No could be used to track the relative success of the project, i.e.   Whether the question subsequently gets closed. Whether the question gets reopened again. How many times the OP actually clicks. How many times the OP disagrees with the analysis of the community.   Potentially, a No could be used to open a comment dialogue asking the OP to explain why they think their question is not a duplicate thereby stopping them simply putting "this is not a duplicate" in the question and formalising this process somewhat. Not sure about this idea...  I do not think this should be restricted by reputation, anyone should be able to close their own question as a duplicate. It gives people with lower reputation a more positive experience of the closing process and emphasises the importance of duplicate finding.  Most importantly, self-closes should not, initially, count towards the question ban. We can help new users learn how to use a lot more of the site than they might otherwise see and encourage them to search for duplicates more thoroughly. If the OP then goes on to do the same thing 10 times in a row then you can start using it toward the ban as they're obviously using the users as a personalised search service but at least the first 3-4 times this should not have any effect.  This question is, deliberately, only requesting 20% of the linked question (from 2009) and then only based on the new UI. The linked question asks for binding migration votes etc, which I do not want to see and I am not requesting a binding close-as-duplicate for the OP until someone else has already voted to close (though I think if the OP has 3k rep this might be allowable). This, I hope, addresses the concern's raised in the linked question and explains why this is not a duplicate of that question. We have two sets: set No.1 and set No.2 as in this picture:   The observer is fixed to set No.1 . He sees set No.1 motionless and observes set No. 2 approaching with velocity 100,000 m/s.   Each set has one lamp and two, so called, touchers. Each set is designed so that if both touchers are touched simultaneously the lamp is turned on otherwise it remains off.  Set No. 2 is approaching set No. 1 so that each toucher in each set will be touched twice by the touchers of the other set.  The observer on set No. 1 observes the distance between touchers in each set 10 meters. He thinks the lamps on set No. 1 will be turned on because touchers in it will be touched simultaneously.  My question: Will the lamp on set No. 2 be turned on? How if an electrical current flowing from one toucher in a set to the other proves simultaneous touching? In version 5.2 of Apple's Pages app for OS X (Mavericks), how do I change the page layout? How to use Font as a variable? This may be a very basic question.      Let $R$ be a commutative ring with unity (may be assumed to be an integral domain, if necessary) and $I$ be an ideal of $R$. Assume that $R/I$ is isomorphic to $R$. Does this mean $I=(0)$ ? Auto revision summary has wrong plural: "added 1 characters in body" As seen at:           Update: I'm 101% sure the down votes were due to the lack of free hands.    Update 2: likes me, like me not, like me, likes me not... yeah ! Is there an GUI Designer for python? Is there a GUI IDE for programming python just like java has netbeans?  I wanted one where we could drag &amp; drop test boxes &amp; labels just as we do in swing components using netbeans or eclipse.  Or is there an add-on present in either netbeans or eclipse itself?