public class Employee {      int age = 32;     String name = &quot;Kevin&quot;;      public Employee updateEmployee(Employee e) {         e = new Employee();         e.age = 56;         e.name = &quot;Jeff&quot;;         return e;     }      public static void main(String[] args) {         // TODO Auto-generated method stub         Employee t = new Employee();         t.updateEmployee(t);         System.out.println(&quot;age= &quot; + t.age + &quot; &quot; + &quot;name= &quot; + &quot; &quot; + t.name);      }  }  =================== OUTPUT:- age= 32 name=  Kevin  Why is the output not 56 and Jeff. I updated the object reference &quot;t&quot; in the method? Please help.
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?
Property of the conjugate transpose matrix with inner product How does long-distance space travel work in the MCU? In Guardians of the Galaxy vol. 2, we see long-distance space travel. It involves piloting your ship into some sort of "jump point" that opens up in space, taking the shape of a honeycomb-like structure with a single hex missing.  The way it's describe, these points are fixed in space: early in the movie, the Guardians have to out-run an enemy fleet to reach the one they need; later on, we see them fly through a very long series of them in sequence. It's also made clear that doing too many of these "jumps" in a row has consequences for the passengers.  The process seems to be similar to, say, the Mass Effect relay setup, mixed with a bit of Star Wars hyperspace travel.  Is this the first time we have seen long-distance space travel in the MCU? Is there anything from the source material that explains how this works from a logistical standpoint? If there's any information on the "science" behind it, that would also be helpful. Finding where source has branched from git Combinatorial proofs: having a difficult time understanding how to write them out Can someone explain how combinatorial proofs work?  I've included an example questions that's been giving me a hard time.  Any insight on the topic would be great.  $$\sum_{k=1}^{n}k{n \choose k} = n2^{n-1}$$  Another one:  $${2n \choose 2} = 2{n \choose 2} + n^2$$  The solution says:  LHS: Pick two people from a pool of n men and n women. RHS: Pick two women, pick two men, and pick one of each.  But I don't see how this applies.  How does $n^2$ show that we're picking "one of each?"  Thanks for the help :) How to make git mark a deleted and a new file as a file move? How to trigger a check for updates in Firefox programatically or from a command line? Is there a command line switch for firefox.exe or an "about:" URL that will either force an update check or at least display the Help/About dialog, which checks for updates and tells if you're running the latest version?    One site claimed that the "about:" URL was the same as menu Help -> About, but it's not.  I built a program to automate the updating of various programs on my machine, and most programs have command line tools for checking for updates. Windows update has wuauclt.exe, Java has jucheck.exe. For some applications, I can even automate the interface, but it's difficult in Firefox, because the main window title is unpredictable (it depends on which web page is active), and all Firefox windows seem to use the exact same window class name. Where Can I Give Feedback on Ubuntu? I'm running Ubuntu 11.04 Beta 2. Is there a way, or a place, to give feedback on this system? Not file bugs, just give feedback. Problems installing xpatch I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch.ins and xpatch.dtx files) to the /usr/local/texlive/2011/../texmf-local/ folder. When I run the command above, I get the output Generating file(s) ./xpatch.sty  ! Cannot find file xpatch.dtx. \readsource ...ot find file \uptospace #1 \qStop }                                                   \else \processedLines \z@ ... l.34 ...xpatch.sty} {\from{xpatch.dtx} {package}}}   I've checked, and the .dtx file is in the folder. Any ideas what the problem is? I viewed in this post  a solution to my question, but...    Are there any easier way (or alternative) to do this using colors?  Thank you. ------------------ edited after showed than it´s duplicate ------------- I think that there are many sols, but for example this is easy using a normal table without pgf...     I´m trying to adapt to similar colors to apply to the table probabilitiess Is there a way to respec attributes? How can I show notify-send messages triggered by crontab? Getting a stack overflow exception when declaring a large array The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable. I understand the proof that  $$Var(aX+bY) = a^2Var(X) +b^2Var(Y) + 2abCov(X,Y), $$  but I don't understand how to prove the generalization to arbitrary linear combinations.  Let $a_i$ be scalars for $i\in {1,\dots ,n}$ so we have a vector $\underline a$, and $\underline X = X_i,\dots ,X_n$ be a vector of correlated random variables. Then $$ Var(a_1X_1 + \dots a_nX_n) = \sum_{i=1}^n a_i^2 \sigma_i^2 + 2 \sum_{i=1}^n \sum_{j&gt;i}^n a_i a_j \text{ Cov}(X_i,X_j)$$  How do we prove this? I imagine there are proofs in the summation notation and in vector notation? filling an occluded plane with the smallest number of rectangles I've got a specific problem which I'll try to describe as clearly as possible.   I have a defined rectangular region on a cartesian plane, and within that region there are other given rectangular sub-regions that are described in terms of their 4 vertices, ie {(x1, y1), (x1, y2), (x2, y1), (x2, y2)}, so that these regions form 'occlusions' on the plane. These regions don't overlap, but they can form more complex polygons when different-sized rectangles adjacent to each other appear joined.  here's an illustration:   I am interested in the space between these shapes, and how to define the space in the same way the occlusions are defined, that is as a set of rectangles. In particular I want the definition optimised so that the space is described using the smallest possible number of rectangles. For example, an incomplete rendering might look like this:   Can anyone suggest a way forward with this? How can I have the original set of vertices (describing the black rectangles) generate the 'complementary' set of vertices (red rectangles) such that the number of red rectangles is minimal?  I suspect it's a variation of a 'packing problem', but I have a feeling it might be fairly simple... No sound after upgrade to 18.10, only a dummy device is shown After I updated to Ubuntu 18.10 my sound device isn't recognized anymore. Only a dummy device is shown.  I have an onboard Intel device:  lspci -nnk | grep -A2 Audio 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)     Subsystem: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:2036]     Kernel driver in use: snd_hda_intel     Kernel modules: snd_hda_intel   The command pacmd list-cards does not show any devices:  :~$ pacmd list-cards 0 card(s) available.   This message in /var/log/syslog might have to do something with the problem:  Oct 19 21:02:06 MyComputerName pulseaudio[14331]: E: [pulseaudio]  backend-ofono.c: Failed to register as a handsfree audio agent with  ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono  was not provided by any .service files   Does anybody have the same issue? How can I fix this? How to Link/Append a data-block using the Python API? I'm searching a way to append a group in Python.  It should behave exactly like the Append function (ShiftF1) works, all objects should be local and editable. The idea is to append a character (with rig etc.) via Python and not Link it (to be able to modify it without making everything local one by one).  Thanks Stack Overflow as a reference in a professional paper/presentation Suppose I'm doing an academic paper, journal article, or other professional presentation.  Would you say that it would be possible to use Stack Overflow as a reference?    Of course I'm pretty sure that the answer here would be "yes."   So here's the follow up: When, if ever, would it be a good idea to cite a Stack Overflow question as a reference in an professional paper/presentation of some kind? $SU(3)$ irreducible representations with tensor method Elements of $\mathbb{F}_p$ having cube roots in $\mathbb{F}_p$ Let $p$ be a prime number, and let $\mathbb{F}_p$ be the field with $p$ elements. How many elements of $\mathbb{F}_p$ have cube roots in $\mathbb{F}_p$?   I had this question on an exam and after reviewing I am still not sure. Any help would be appreciated. Is there a setup where I can leave the water on all summer?