I have some code. In main function i push six element in BST. when i look to debugger, i see that variable  size = 5, but variable root = null. Why variable root not change.  package Search;  public class BST&lt;Key extends Comparable&lt;Key&gt;, Val&gt; { private class Node{     Key key;     Val val;     Node left;     Node right;     Node prev;     Node(Key k, Val v){         key = k;         val = v;     } } public void push(Key k, Val v){     push(root,k,v); } private void push(Node x, Key k, Val v){     if(x == null){         x = new Node(k,v);         size++;         return;     }     int cmp = x.key.compareTo(k);     if(cmp &gt; 0)         push(x.left,k,v);     else if(cmp &lt; 0)         push(x.right,k,v);     else         x.val = v;  } Node root = null; int size = 0; public static void main(String args[]){     BST&lt;String,Integer&gt; bst = new BST&lt;String, Integer&gt;();     bst.push("c",1);     bst.push("b",2);     bst.push("d",3);     bst.push("a",4);     bst.push("e",5);     bst.push("c",6); }   }
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?
Why does increasing the number of features reduce performance? How to redirect output of a running program to /dev/null I know that in order to suppress the output of a program I can redirect it to /dev/null, for example to hide all error and warning messages from chromium I can start the program like this  chromium-browser 2&gt; /dev/null &amp;   However, if I happen to forget about the error messages and type  chromium-browser &amp;   (which is quite annoying when they appear in the middle of a command) I don't know what to do except for stopping the application and starting it again properly.  Can I somehow redirect error output without restarting the application? Fly and Two Trains Riddle Exec format error of gcc-compiled Hello World c++ On AWS Ubuntu Server, I wrote C++ Hello, World program:  #include &lt;iostream&gt; using namespace std;  int main(){         cout&lt;&lt;"Hello, World!"&lt;&lt;endl;         return 0; }   And compiled it:  ubuntu@ip-xxxxx:~/dev/c++$ g++ -c ./test.cc -o out ubuntu@ip-xxxxx:~/dev/c++$ chmod a+x out ubuntu@ip-xxxxx:~/dev/c++$ ./out -bash: ./out: cannot execute binary file: Exec format error ubuntu@ip-xxxxx:~/dev/c++$ file ./out ./out: ELF 64-bit LSB  relocatable, x86-64, version 1 (SYSV), not stripped ubuntu@ip-xxxxx:~/dev/c++$ uname -a Linux ip-xxxxx 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ubuntu@ip-xxxxx:~/dev/c++$ gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4   It seems that architecture x86-64 is the same each other. What is the problem here? Do I have to add more C++ flags? Folders Completely Hidden Except via Save As I'm using an audio program called Supercollider on Windows 10. I have saved some files in a folder called "tunes" from SC via Save As, but Windows Explorer and CMD both seem unable to recognise access or recognise the "tunes" folder.  C:\Users\HP&gt;cd "C:\Program Files (x86)\SuperCollider-3.7.2\supercollider-robin\tunes" The system cannot find the path specified.  C:\Program Files (x86)\SuperCollider-3.7.2\supercollider-robin&gt;dir/a doesn't show it either.  However, when saving from SC with Save As, it's there clear as day. I can even shift+right-click to get the path: "C:\Program Files (x86)\SuperCollider-3.7.2\supercollider-robin\tunes"  This makes no sense to me. Can anyone explain and tell me how to access my folder tunes folder please? Why was the previous Code of Conduct FAQ (and all answers) removed? I noticed that the  was deleted.   When the  came out, I tried to look for my old answer as well as others for comparison.  Why not just mark the old one superseded by [insert link]?  Note: I don't care about lost rep. There were a lot of useful links in answers and comments there (and some less-than-useful ones too).     Old CoC FAQ may be available  and . Source: (, ). I have been using the default Ubuntu 11.10 with Unity for some time now and decided to start customizing it.  I have already been able to make some changes with the gnome-tweak-tool. However, there are many themes that I get from gnome-look.org that don't appear in the gnome-tweak-tool even after putting them in the /usr/share/themes folder.  Any idea why this is happening? Thanks. How can I profile a multithread program in Python? I'm developing an inherently multithreaded module in Python, and I'd like to find out where it's spending its time. cProfile only seems to profile the main thread. Is there any way of profiling all threads involved in the calculation? "Was going to" versus "would be" as the past tense of "will" Do you think that "was going to be" or "would be" could be used as past tense of will?     I thought this book was going to be your choice.        I thought this book would be your choice.   Do these two sentences basically mean the same thing or are they slightly different? Is $\cot(z)-\frac1z$ bounded on a given circle? Grant permission for new created files inside folder automatically I have a folder which permission is set to 777 but when I add any files or folder unziping in that folder. Extracted files or folder permission never change. Destination folder permission is 777 and I want what I will add in that folder will automatically get permission of 777.   When I add any files or folder by extracting .zip in that folder, extracted folder/files permission won't change automatically. I always have to chmod for newly add file/folder! On Chrome on Android, code blocks on the mobile site have no syntax highlighting, are not a monospaced font, and words are wrapped.  Mobile site on mobile browser:    Desktop site on mobile browser:    Inline code has the same issue, it isn't a monospaced font.  It has been this way for as long as I can remember. Wouldn't be surprised if this is a dupe. Using notify-send with cron Evaluating the integral $\int_0^\infty \frac{x \sin rx }{a^2+x^2} dx$ using only real analysis Calculate the integral$$ \int_0^\infty \frac{x \sin rx }{a^2+x^2} dx=\frac{1}{2}\int_{-\infty}^\infty \frac{x \sin rx }{a^2+x^2} dx,\quad a,r \in \mathbb{R}. $$  Edit: I was able to solve the integral using complex analysis, and now I want to try and solve it using only real analysis techniques. Show the existence of a certain subgroup of F2 Atiyah Macdonald, Exercise 8.3. Let $k$ be a field and $A$ a finitely generated $k$-algebra. Prove that the following are equivalent:   (1) $A$ is Artinian.   (2) $A$ is a finite $k$-algebra.   I have a question in the proof of (1$\Rightarrow$2): By using the structure theorem, we may assume that $(A,m)$ is an Artin local ring. Then $A/m$ is a finite algebraic extension of $k$ by . Since $A$ is Artinian, $m$ is the nilradical of $A$ and thus $m^n=0$ for some $n$. Thus we have a chain $A \supseteq m \supseteq m^2 \supseteq \cdots \supseteq m^n=0$. Since $A$ is Noetherian, $m$ is finitely generated and hence each $m^i/m^{i+1}$ is a finite dimensional $A/m$-vector space, hence a finite dimensional $k$-vector space.  But now how can I deduce that $A$ is a finite dimensional $k$-vector space? Python — How can I find the square matrix of a lower triangular numpy matrix? (with a symmetrical upper triangle) Many times I see that URL extensions are hidden (e.g. .html, .php), but not all websites do this.  Why do webmasters hide the extension? Is it for security, for the URL to look cleaner, or for some other purpose? NetGear A6100 AC600 wireless adapter not working in Ubuntu 20.04. Worked fine in 18.04. Not same problem as previously Firstly, I know very well there are answers to this already. But, in my case, it is installed and shows in the terminal as such Bus 001 Device 007: ID 0846:9052 NetGear, Inc. A6100 AC600 DB Wireless Adapter [Realtek RTL8811AU]  It says it is installed in  as well.  I have tried downloading the driver for this adapter from several guides online, linking to GitHub, but no luck there either...  Any help is greatly appreciated! Thanks in advance!  EDIT: The answer from sudo dkms status command reads:  rtl8812au, 4.3.8.12175.20140902+dfsg, 5.4.0-31-generic, x86_64: installed  The other command  modinfo 8812au | grep 9052   spits out the following:  alias:          usb:v0846p9052d*dc*dsc*dp*ic*isc*ip*in* How to disable javascript modal popup ads For many years I have blocked popup ads with AdBlock Plus.  But it seems more and more these past couple months there is a "new" kind of popup overtaking the web.  They are javascript based "modal" popups which ABP is powerless over.  See attached for an example.  Is there a way to kill these ads without breaking the functionality of anything I need?