public class ex1 {  public static void main(String[] args) {     // TODO Auto-generated method stub     System.out.println("Please enter a series of strings each followed by the enter key. When you'd like to end thr program simply type 'quit': \n");     Scanner scan = new Scanner(System.in);      ArrayList&lt;String&gt; inputList = new ArrayList&lt;String&gt;(); // creates a list to store user input      String input = scan.nextLine(); //takes the scanner input     while(input != "quit") { //makes sure its not equal to quit         //System.out.println(input);         inputList.add(input);         input = scan.nextLine();     }     scan.close();            System.out.println("The number of strings enetered was: " + inputList.size());     System.out.println("The strings you entered were as follows");     for (String i: inputList) {         System.out.println(i);      }   } }  I'm trying to use the preceding code to take a series of inputs from a user using the enter key and if they enter quit I end the program. However the condition is never satisfied and the while loop never ends and I can't understand why
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?
Error in batch file to copy folder: 'Invalid number of parameters' I am making a batch file in Windows XP to copy my folders I need to another folder on my PC. I am getting an error.  I get the error "Invalid number of parameters".  xcopy /s/z D:\Documents and Settings\%username%\Desktop C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Favorites C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Start Menu C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\My Documents C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\PrintHood C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\NetHood C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Templates C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Searches C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook C:\SomeRandomFolder\ pause   Then I changed the batch and get this error: "File not found - Desktop"   xcopy /s/z D:\...\%username%\Desktop C:\SomeRandomFolder\ pause   How do I fix these errors? Find the eigenvector associated with the smallest eigenvalue, not smallest in magnitude Suppose $f$ and $g$ are entire functions, and $|f(z)| \leq |g(z)|$ for all $z \in \mathbb{C}$, Prove that $f(z)=cg(z)$. Suppose $f$ and $g$ are entire functions, and $|f(z)| \leq |g(z)|$ for all $z \in \mathbb{C}$, Prove that $f(z)=cg(z)$.   My try :  I consider $h(z)=\frac{f(z)}{g(z)}$. If I prove that $h(z)$ is entire, using the fact that $|h(z)|\leq 1$, the result follows immediately from Liouville's theorem.  To prove that $h(z)$ is entire, I have to prove that $h(z)$ has removable singularities at possible zeros of $g(z)$.  Suppose $g(z_0)=0 \Rightarrow |g(z_0)|=0 \Rightarrow |f(z_0)|=0$, BUT what if $z_0$ be a root of of order $k$ of $g(z)$ (i.e. $f^{(n)}(z_0) = 0 $ for all $ 0 \leq n \leq k-1$) and be a zero of order $m$ of $f(z)$ and $k&gt;m$ ?  And if that's not the case, how to rigorously show that $z_0$ is a removable singularity ?  Thank you all in advance. Correct way to use include and includeonly when writing a large document like a thesis What is Ubuntu's status on the Meltdown and Spectre vulnerabilities? I think it would be cool if a question would eventually open up to moderators to accept answers on the user's behalf, once a time period has passed. The asking user would get the rep score for the accept.  I know I've seen questions successfully answered with lots of upvotes and no accepted answer that sit there for months unaccepted. This would give superusers a little more functionality and would tie up a lot of loose ends.  What do you think? Tenure and tenure denial rates by universities Is there a way or website to find the tenure and tenure denial rates by universities and departments? I heard from some faculty that the tenure rate at X university is Y%, so I wonder if there is a way to find the statistics for all universities. How to recover deleted files? Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file. Shadows along edges of mesh in 3D View I have recently started using blender and one of the models I'm working on has dark shadows along edges. I started this model from scratch. I can't remember them being there when I first started the model, but I had trouble joining areas together and think I've pressed something I shouldn't have. However, there are so many options I'm not sure what I did.  Here is an image of what I mean   The one on the left has the shadow. As a test I started a new model, which is on the right in the image, and as you can see it doesn't have any shadows.  Also, occluded vertices partially show through the model. Occlusion doesn't work properly.   In orthogonal view small darkened triangles appear along the the edges.    I don't really want to start the model again from scratch so any ideas on how to remove this shadow would be great. Thanks. Which are the spec bits in this cache? Auto size image to page size in InDesign I've got an InDesign document with 100 A4 pages.   I've got 100 assets (a mixture of .jpg and .pdf files) and I want to place 1 per page. If an image is not the proportion of the A4 page I would like to get it as big as it can be on the page before it hits into the margin. Ex. if it's a portrait image it should be as large as it can be before hits the top/bottom margin. If it's a landscape image it should be as large as it can be before hits the left/right margin.   At the moment I'm dragging each file across and resizing them manually. Is it possible just drop them on the page and get them auto resized ? Shape of the universe? What is the exact shape of the universe? I know of the balloon analogy, and the bread with raisins in it. These clarify some points, like how the universe can have no centre, and how it can expand equally everywhere in all directions. But they also raise some questions, like if you are on the surface of a balloon and travel in 1 direction, you will eventually return to your starting point, is it possible our universe have this feature?  If it has, or had, would this be a symmetry of sorts ($\psi(x)=\psi(x+R)$), and as such have a conserved quantity associated with it (by Noether)? Assuming "small curled up dimensions" wouldn't these dimensions have this type of symmetry, what are the associated conserved quantities? Is it known exactly what the geometrical shape of the universe is? (on a large scale) (I am not talking about only the observable universe). How does one define the "size" of a dimension, is this scale only applicable to curled up ones? Is it possible to describe to a layman the shape of the universe without resorting to inept analogies? List all directories that do NOT have a file with a given file name inside How would I go into listing all directories that do not have a file with a given file name inside? e.g. given this tree  /   /a      README      file001      file002   /b      README      file001   /c      file003   I want to list the directories that do not have a file named README, in this case it would be directory /c. How would I do that? I can't think of any syntax using e.g. find. What is a magic number, and why is it bad? Where can I get a Thunderbolt hub or splitter? Apple has just announced the new MacBook Airs, Mac mini, and Thunderbolt display. One of the features of the Thunderbolt display that caught my eye was its ability to daisy-chain two displays together from one Thunderbolt port (on a MacBook Pro).  I already have two 24" monitors and I don't feel like paying for two £900 displays. I worked out that all I need is a Thunderbolt hub/splitter so that I can plug the two cables that emerge into mini DisplayPort-to-DVI adapters.  Does anyone know of any Thunderbolt hubs or splitters? Or does anyone know of an alternative method? Does deleting iCloud photos affect them on devices? If I delete a photo from my iCloud will it also be removed from my devices that are connected to my account? How to set Command Block(s) to test for a particular time and output a message? I simply want one command block to test for the time of day or night (e.g. time = 18000) and output a message in the chat to everyone if that time returns true.  I was trying a simple set-up with two command blocks and a comparator in the middle, but I'm a beginner and am obviously missing the correct syntax (especially to test for a particular time of day, and if true, then trigger the say "message" block).  ETA: Kudos to @Ben for the Daylight Sensor/Redstone idea, but I'd really prefer a Command Block solution for the above, since my plan is to output several messages during the day and night cycle at very specific times in the world. Thanks. Home button broken and Notification Center stuck my home button on my ipod touch 5th Gen has been broken for  while so I have been using assistive touch. Earlier on my notification centre got stuck half way down the lock screen, making my ipod completely unusable.   I tried turning it off but the notification centre is blocking the slider and obviously I can't restart it since my home button is broken. Has anyone got any solutions? It's an absolute nightmare! In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment.  If I know a printer's name, how can I get these values in C# 2.0? Todo comments:Not include and left align?