How to change object value from another class in Java (look like same as Arraylist)? I'm confused about ArrayList with another variable that can change the value from another class. I have two classes and two examples with the ArrayList and Object variables. Can somebody help me to understand why it's different and if there is a solution to make it have the same effect? This is the code with ArrayList: import java.util.List;  public class Test {     private String name = &quot;Fifi&quot;;          void fill(List&lt;Test&gt; a) {         a.add(this);     } }  import java.util.ArrayList; import java.util.List;  public class B {     private List&lt;Test&gt; a = new ArrayList&lt;Test&gt;();     //a variable is empty      public B() {         // TODO Auto-generated constructor stub         Test oa = new Test();         oa.fill(a);// After this method is called, a variable has change with name is &quot;FiFi&quot;     }      public static void main(String[] args) {         new B();     } }  And then, I have the same form like that with the object variable, but the result is not the same. public class Test {     private String name = &quot;Fifi&quot;;          void fill(Test b) {         b = this;     } }  public class B {     private Test a;     // so a variable is null      public B() {         // TODO Auto-generated constructor stub         Test oa = new Test();         oa.fill(a);// after fill method is called, a still null!     }      public static void main(String[] args) {         new B();     } }  What is different from Arraylist and object variables like above? I do not understand the basics of how it's happening!
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 relate combinatorial proof to bipartite graphs? The question is - Let $k \geq 1$ be an integer and consider a sequence $n_1,n_2,\cdots,n_k$ of positive integers. Use a combinatorial proof to show that  $\binom{n_1}{2} + \binom{n_2}{2} +\cdots+ \binom{n_k}{2} \leq \binom{n_1+n_2+\cdots+n_k}{2}$  How can i prove this without using induction?  Additionally, For each $i$ with $1 \leq i \leq k$,consider the complete graph on $n_i$ vertices. How many edges does this graph have?  I thought of making graphs and figuring out a relation but still wasnt able to. What is aperture, and how does it affect my photographs? How does aperture affect my photographs?  Why should I care about the aperture with which a photo was taken? Zip all files in directory? Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too. Hi is it possible to exclude traffic from a certain country in google analytics?  If yes, how do I do it? Occasionally, you can see little tufts of leaves blowing in spots on the map      Do these mean anything? What are the pros and cons of the leading Java HTML parsers? Okami is now reborn in High Definition for PS3. The graphics are obviously better, sharper and yet preserves the gist of the original game, however I can swear some of the texts have changed as well.  My PS2 console is no longer available to me so I can't test it myself, but does anyone know whether there are any changes to the game (aside from graphics) or not? Problem working fontspec, babel and datetime with cyrillic I have discovered that fontspec with russian babel settings doesn't work with datetime package. I tried to compile such code:  \documentclass[a4paper,11pt]{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[main=russian,english]{babel} \usepackage{datetime} \usepackage[cm-default]{fontspec}  \begin{document} \today \end{document}   with a xelatex and got an error: Command \cyri unavailable in encoding EU1.  Is there any way to handle it?  UPDATE: I really bungle with charset in XeLateX. Thanks to egreg. I have removed fontenc and inputenc and used some cyrillic font, so my MWE now looks this way:  \documentclass[a4paper,11pt]{article} \usepackage[main=russian,english]{babel} \usepackage{fontspec} \setromanfont{PT Sans} \usepackage{datetime}  \begin{document} \today \end{document}   and I've got another error, if I used russian as a main language in babel: Undefined control sequence. \\monthnamerussian ...cyrm \cyra \cyrya \or \cyri  \cyryu \cyrn \cyrya \or \c...  Is it still because of XeLaTeX? Is it possible to have an object ignore a certain light source but still be affected by others? I want to create an effect on a character where their skin and clothing are effected by two different light sources. The clothing should only reflect a bright bounce light, but have the skin should not be affected by this light source.    In the example image I have two objects a cube, a sphere and three emission  lights . I want the two white lights to hit both objects, and I need the purple light to hit and reflect off of the sphere, but ignore the cube entirely (no reflections).  Someone suggested to composite the layers together, it works... but this is very impractical and cumbersome because it forces the background to be transparent and it will be a pain to try and layer together a more complex scene, especially if its animated which is what I want this effect for.  I know you can have objects ignore shadows and all kinds of other things so im hoping someone knows how to get an object to ignore light with a few settings. One word/phrase to describe the reaction when you eat a very spicy-hot food I've read the discussion here about .  I've also read this one: .  But I did not find any word or phrase that describes the reaction someone has when eating a too spicy-hot food. You know, they tend to sweat, catch their breath, and even sometimes shed tears; due to the spiciness of the food.  So my questions:        What do you say to describe the reaction someone has when being excitedly "suffered" by a very spicy-hot food? In Indonesian, we would call it kepedasan.   What do you say when you get that thing [the answer to question 1] with you, other than the list I enclose below:                Oh, spicy!     My God, it's spicy-hot!                      Is that it? If I have a $2\times 2$ or $3\times 3$ matrix, how should I go about computing the eigenvalues and eigenvectors of the matrix?  NB: I am making this question to provide a unified answer to questions about eigenvalues of small matrices so that all of the specific examples that come up can be marked as duplicates of this post. See . I'm new to Blender and this site, so I apologize in advance if I'm not following any of the proper etiquette.  I'm no artist, but I'm trying to learn Blender so that I have some programmer art for me to work around in Unity.    I followed a tutorial for making a basic human model, I rigged it with rigify, and now I'm starting to export it following yet another tutorial.  The thing is, when I was trying to rig the model, I couldn't get the model to go transparent so that I could see the bones inside the model.  Eventually, I managed to get it into wireframe mode, but I can't get it back into solid mode.    It's probably just a display thing and not a property of the model itself, but I want to be sure.  I'm looking at the display options under the "Figure" pane in Blender, and none of the Display check boxes are checked, including the one that says "Wire".  I don't want to import a plain wireframe model into Unity, and even if that doesn't happen, this is functionality of Blender that I should really know anyway, so I'd appreciate any help that anyone has to offer.  If necessary, I can upload the .blend file, but I'm not sure what site people would prefer that I upload it to. How to use "fit" to frame the nodes and labels Why use apparently meaningless do-while and if-else statements in macros? In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X) I have 4 servers with Debian Wheezy OS. I have Apticron installed that informs me about updates. Debian updates are realized so often that when I finish to update the last of 4 servers I get new email about new updates on the first server. I try to update all servers when I get a notification but I never know if there is a need to reboot the servers. I have read that if the directory "/var/run" contains file "reboot-required" I have to reboot the server. But I never have seen this file in "/var/run". How can I know when reboot is required? I don't want reboot my servers every time when I install new updates if it's not needed.  I understand that if I update PHP or MySQL, etc I don't need to reboot the server but updates usually contain many "lib...".  Below are 9 updates (I have received this week).  krb5-locales 1.10.1+dfsg-5+deb7u3 libdbus-1-3 1.6.8-1+deb7u6 libgssapi-krb5-2 1.10.1+dfsg-5+deb7u3 libk5crypto3 1.10.1+dfsg-5+deb7u3 libkrb5-3 1.10.1+dfsg-5+deb7u3 libkrb5support0 1.10.1+dfsg-5+deb7u3 libruby1.8 1.8.7.358-7.1+deb7u2 libxml2 2.8.0+dfsg1-7+wheezy3 ruby1.8 1.8.7.358-7.1+deb7u2   I have no idea what is "libkrb,libgssapi", etc. How can I detect if reboot is needed? Please do not suggest to install UnattendedUpgrades to let the servers update automatically because this can cause websites going offline if something updates not correct. Maybe a stupid question but how can I tell if I have a static IP address or a dynamic IP address? Running Fedora-13 Point reflection over a line I'm having trouble understanding the solution presented below (It's from a textbook). I tried to get something similar, but to no avail. Help me find the way he derived those a,b,x2 and y2 expressions.   Point p is a point which we want to reflect (It's a simple structure with two integers x and y representing coordinates on a 2d plane); (x0,y0) and (x1,y1) are coordinates of endpoints of a line.  Expected result is a new point with reflected coordinates.   Point mirror(Point p, int x0, int y0, int x1, int y1) {     double dx,dy,a,b;    long x2,y2;    Point p1; //reflected point to be returned      dx  = (double) (x1 - x0);    dy  = (double (y1 - y0);     a   = (dx * dx - dy * dy) / (dx * dx + dy*dy);    b   = 2 * dx * dy / (dx*dx + dy*dy);     x2  = Math.round(a * (p.x - x0) + b*(p.y - y0) + x0);     y2  = Math.round(b * (p.x - x0) - a*(p.y - y0) + y0);     p1 = Point((int)x2,(int)y2);      return p1;  } Pokemon keep running away and Pokestops don't drop anything when spinning. What is going on? For example, you're doing a research for a car to purchase. You get a list of cars with engine number, city where a car was assembled, and a color. What's missing is make, model and price. av_acharya@AnoxBotox:/$ wireshark qt.qpa.plugin: Could not find the Qt platform plugin &quot;xcb&quot; in &quot;path/to/plugins&quot; This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.   sudo apt-get install --reinstall qt5-default Reading package lists... Done Building dependency tree        Reading state information... Done The following NEW packages will be installed:   qt5-default 0 upgraded, 1 newly installed, 0 to remove and 23 not upgraded. Need to get 0 B/24.4 kB of archives. After this operation, 170 kB of additional disk space will be used. Selecting previously unselected package qt5-default:amd64. (Reading database ... 241279 files and directories currently installed.) Preparing to unpack .../qt5-default_5.12.8+dfsg-0ubuntu1_amd64.deb ... Unpacking qt5-default:amd64 (5.12.8+dfsg-0ubuntu1) ...