What is happening with this reference variable? public class Reverse {  public static void main(String[] args) {     String [] simpsons = {"Homer", "Flanders", "Apu"};     reverse(simpsons);     System.out.println(simpsons[0] + " " + simpsons[1] + " "             + " " + simpsons[2]);   } //End main  public static void reverse(String[] list) {     String[] temp = new String[list.length];     for (int i =0; i&lt;list.length; i++)     {         temp[i] = list[list.length-i-1];     }     //System.arraycopy(temp, 0 , list, 0, list.length);     list = temp;; }  }       I'm just getting started in Java, and this problem confused me. As you can see, I've solved the problem with the commented out arraycopy method. I'm simply confused as to why the list = temp still returns the original, non-reversed array. I believe I understand conceptually that references are just locations in memory, but doesn't list = temp assign the passed in array to the memory location of temp, AKA the reversed array?
Is Java "pass-by-reference" or "pass-by-value"? I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
How to get a drive formatted with exfat working? In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support? What is the "?" symbol in URL used for in php? I can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I used the ls -a command to see the .bash_profile, but there isn't such a file. I've seen $d(xy) = y(dx) + x(dy)$, but I don't understand the principle behind it and memorizing it is lame.  Can anyone explain what is going on here?  For example from physics, $$F = {{dP} \over {dt}}$$ $$F = {{d(mv)} \over {dt}}$$ $$F = {{v(dm) + m(dv)} \over {dt}}$$ Since $$dm = 0$$  $$F = {{m(dv)} \over {dt}}$$ Since $$a = {{dv} \over {dt}}$$ $$F = ma$$ How can I convert a hex string to a byte array? Oddly wide spaces in subsection title I have a problem, this is what it looks like:     And this is the code:  \subsection{Bakterienst\"amme und Anzuchtbedingungen}   Where does the huge whitespace come from? Prove that if $X$ and it's closure $\overline X$ are connected and if $X\subset Y \subset \overline X$, show that Y is also connected. Can anyone give me a proof of the statement that if $X$ and its closure $\overline X$ are connected and if $X\subset Y \subset \overline X$, show that Y is also connected?  Thank you. How to derive the least square estimator for multiple linear regression? Rocket Altitude Calculation Assignment Basic data I was launching a rocket model and I tried to calculate the reached altitude.  The engine (C6-0) impulse is 10 Ns Total weight is 65,7 g (includes the engine)  I calculated speed = 152 m/s $$\vec F \cdot t = \Delta m \vec v$$ Then I calculated the altitude 1007 m which seems too much to me. I guess something about 200 m (you may see the video) $$y_{\max} = \frac{v_0^2 \ }{2 g}$$ Drag I guess, I have to consider drag  Diameter of rocket 2,5 cm Drag coefficient 0,05 (I guess)  $$F_D\, =\, \tfrac12\, \rho\, v^2\, C_D\, A$$ But what about now, what is really achieved altitude? Engine description  (source: )  (source: ) Rocket Altitude Calculation GUI/Unity crashing in 16.04 LTS after updates 2018-01-04, compiz segfaults I have a website that sells music artists posters. Each artists has a page containing a small bio, and a list of posters we are selling representing the artist.  Currently our HTML looks like that  &lt;h1&gt;{Artist name}&lt;/h1&gt; bio &lt;h2&gt;Posters&lt;/h2&gt; &lt;ul&gt;   &lt;li class="poster"&gt;...&lt;/li&gt;   ... &lt;/ul&gt;   We are redesigning this page, and we have a new template that we really like. Problem is that in this new version the &lt;h2&gt;Posters&lt;/h2&gt; does not appear anywhere on the page.  As you might expect, a significant part of our traffic comes from people typing something like : "{Artist name} poster" on Google.  I fear that, by removing the word "poster" from the page, we will reduce our chances of getting these people to come to the site, since Google might down rank us.  I see several options here :   Give Google a slightly altered page that contains the H2 tags. But I think this falls into the "Black Hat SEO" category. And I don't want that. Put the heading. Hide it with CSS. Everyone wins, including accessibility tools which can determine the structure of the page using the "invisible" heading. But I do not know if this is considered a good practice. Forget about the heading, and find other ways to tell Google that we really are about posters. (via keywords, but do they really have the same "weight" as an H2?) Adapt the design to our SEO need, and find a way to put that heading nicely.   Are there webmasters out there that have been facing the same issue, how did you resolve it? Why do Google search results include pages disallowed in robots.txt? I have some pages on my site that I want to keep search engines away from, so I disallowed them in my robots.txt file like this: User-Agent: * Disallow: /email  Yet I recently noticed that Google still sometimes returns links to those pages in their search results.  Why does this happen, and how can I stop it? Background: Several years ago, I made a simple web site for a club a relative of mine was involved in.  They wanted to have e-mail links on their pages, so, to try and keep those e-mail addresses from ending up on too many spam lists, instead of using direct mailto: links I made those links point to a simple redirector /  script running on my own site.  This script would return either a 301 redirect to the actual mailto: URL, or, if it detected a suspicious access pattern, a page containing lots of random fake e-mail addresses and links to more such pages.  To keep legitimate search bots away from the trap, I set up the robots.txt rule shown above, disallowing the entire space of both legit redirector links and trap pages. Just recently, however, one of the people in the club searched Google for their own name and was quite surprised when one of the results on the first page was a link to the redirector script, with a title consisting of their e-mail address followed by my name.  Of course, they immediately e-mailed me and wanted to know how to get their address out of Google's index.  I was quite surprised too, since I had no idea that Google would index such URLs at all, seemingly in violation of my robots.txt rule. I did manage to submit a removal request to Google, and it seems to have worked, but I'd like to know why and how Google is circumventing my robots.txt like that and how to make sure that none of the disallowed pages will show up in their search results. Ps. I actually found out a possible explanation and solution, which I'll post below, while preparing this question, but  in case someone else might have the same problem.  Please do feel free to post your own answers.  I'd also be interested in knowing if other search engines do this too, and whether the same solutions work for them also. Writing in bash while it is working When you are performing time consuming operations in bash like installing new software, is it possible to write text that will appear at the prompt when the operation has finished.  E.g   Imagine running:  apt-get install eclipse-platform   Then it will use quite a while to finish while you see the installation log, meanwhile I want to create new folders (workspaces) which Eclipse later will use.  Is this possible without opening a new terminal (or tab)? White background with filmic blender I have a Dell N5110 laptop with integrated Nvidia GeForce GT 525M and an Intel HD Graphics 3000 card; My problem is the default card is the Intel one, and it provides a very bad performance with Windows 8. So can I force to use the Nvidia one all the time including "Desktop Windows Manager" ? I want to enable GPU rendering, but there is no option in User Preferences > System:    Why is this? How can I get cycles to render using my GPU? ModelBuilder not adding output feature class to Table of Contents? I'm trying to create a tool in ModelBuilder that will take a new point from a user, create a feature class for this point and display it on a map.  What I've done is:   I've created a feature class for a point-like feature in ArcCatalog. I've prepared a really simple model in ModelBuilder, that starts with a feature set variable (which takes the feature class as a schema and symbology file). The variable is marked as a parameter. Next I'm using the Copy Features tool that takes the variable as input and saves it as a feature class in my scratch workspace. The output feature class is marked as a parameter with the 'add to display' option.   After the module is run I get a shapefile in my scratch workspace. I can add it manually to TOC and it contains the selected point. However no matter what I do, I can't display it in TOC automatically after the model completes.  There is a known issue described in several places that doesn't allow to display newly created layers in TOC when model finishes with the 'add to display' option. However there's a quick workaround, which is to mark the output layer as parameter. In my case it doesn't work.  I'm using ArcGIS for Desktop 10.1 on Windows 7 x86_64. What's the keyboard shortcut for keyboard layout switch in Mojave? Shift + Control + Space doesn't seem to work anymore. What do all those cryptic number and letter codes in a lens name mean? (mód 1) is not copied correctly Please consider the following MWE:  \documentclass{article} \usepackage[spanish]{babel} \selectlanguage{spanish} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \begin{document} Works: áéà  Does not work: \(\pmod1\) \end{document}   The áéà text is copied correctly, but if I try to copy (mód 1) it says: (m´od 1).  Does anyone know why this happens? How is it solved?  Thanks!