I have referred to the various explanations around here on SO about pass by value and pass by reference in Java. So far the notion is that incase of primitive datatypes it goes pass by value and incase of reference and user defined datatypes it is pass by reference. I also read that arrays are always pass by reference. However, when I try to execute the following program why the outputs are different in both these methods? The location of the object is called the reference. So if I am passing by value to demoByValue_ it should return 90 or 91? What am I missing here? Also, will it help to start fiddling with first pointers from C/C++ in order to get an abstract picture of this idea or what could be a real life analogy to grasp thi concept for a beginner? I did look into the analogy of house addresses and if the person wants to go to a specific house it needs the address etc. But, I want to know here that why I am failing to understand this concept? How to access the reference to the value of a primitve data type to see whats going on?  public class Misc {      public static void main(String[] args) {          int a = 91;         System.out.println(a); //prints 91         demoByValue(a);         System.out.println(a); //prints 91         a = demoByValue_(a);         System.out.println(a); //prints 90 -- Why??     }     public static void demoByValue(int a){         a = 90;     }     public static int demoByValue_(int a){         a = 90;         return a;     } }
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?
I understand that the entrance pupil is the image of the aperture as seen from the front of the lens. However, is the size of the entrance pupil the same as the size of the effective aperture? In other words, if I measure the size of the entrance pupil by looking at it, will that be equivalent to the focal length of the lens divided by the f-number (with the focus set to infinity)? I know that sometimes this is hard to estimate because of the shape of the aperture blades, but I was wondering whether pupil and aperture can be quite different (perhaps at very low magnification). Differential form is closed if the integral over a curve is rational number. The following problem comes from do Carmo's book Differential Forms and Applications, Chapter 2, Exercise 4:  Let $\omega$ be a differentiable 1-from defined on an open subset $U\subset \mathbb{R}^n$. Assume that for each closed differential curve $C$ in $C$, $\int_C \omega$ is a rational number. Prove that $\omega$ is closed.   Can anyone give some hints? My idea was that we could try to show the integral vanishes if the curve lies in $N_\epsilon (p)$ (i.e. a small neighborhood around $p$) for any $p$ in $U$ and use the Poincare Lemma, but failed. uint color;  bool parsedhex = uint.TryParse(TextBox1.Text, out color);  //where Text is of the form 0xFF0000 if(parsedhex)    //...   doesn't work. What am i doing wrong? How can I print the table of contents multiple times in my document? I am using also titletoc to improve how my table of contents. I would like to print the table of contents several times. How can I do it?  It does not work in the MWE:  \documentclass{article} \usepackage[utf8]{inputenc}  \begin{document}  \tableofcontents  \section{Hello} \section{Bye}  \tableofcontents  \end{document}     PS: I have this code in my document, in order to have no title for the table of contents.  \makeatletter \renewcommand\tableofcontents{%     \@starttoc{toc}% } \makeatother   PPS: \renewcommand{\contentsname}{}% Remove \tableofcontents' title/name will not work since I am using [french]{babel}. Why is brace expansion not supported? Do I have to do any configuration to start brace expansion? When I run mkdir {1..10}, it just creates a dir naming {1..10}. Given a large (~ 1 million) sample of unevenly distributed points - is it possible to generate irregular grid (in size, but could also be irregular in shape if that is possible?) that will contain specified minimum amount of n points?   It is of less importance for me if genereted 'cells' of such grid contain exactly n number of points or at least n points.  I'm aware of solutions like  in ArcGIS or  in QGIS/mmgis however they will all create regular grids which will result in an output with empty cells (smaller problem - I could simply discard them) or cells with count of points less than n (bigger problem since I'd need a solution to aggregate those cells, probably using some tools from ?).  I've been googling around to no avail and am open to both commercial (ArcGIS &amp; extensions) or free (Python, PostGIS, R) solutions. Product of quotient maps and quotient space that is not Hausdorff I am looking for easy(!) counterexamples that the product of two quotient maps is not necessarily a quotient map and that the quotient space of a Hausdorff space is not necessarily Hausdorff. No internet connection after ubuntu server 20.04 install, ifconfig not available I recently installed Ubuntu Server 20.04 LTS on my desktop, and found out there was no internet connection even though I had the LAN cable connected. ifconfig and iwconfig failed saying the corresponding packages net-tools and wireless-tools were not installed.   EDIT  Here is the info requested. Please find the image Compute: $\lim_{n \rightarrow \infty}\sqrt{n}(A_{n+1} − A_n)$ where $A_n = \frac{1}{n}(a_1 + a_2 + \cdots + a_n)$ Let $\{a_n\}, {n\geq 1}$, be a sequence of real numbers satisfying $|a_n|\leq 1$ for all $n$. Define  $$A_n = \frac{1}{n}(a_1 + a_2 + \cdots + a_n),$$ for $n\geq 1$. Then find $\displaystyle\lim_{n \rightarrow \infty}\sqrt{n}(A_{n+1} − A_n)$ .    I proceed in this way  $$\lim_{n \rightarrow \infty}\sqrt{n}(A_{n+1} − A_n)=\lim_{n \rightarrow \infty}\sqrt{n}\left[\frac{1}{n+1}(a_1 + a_2 + \cdots + a_n+a_{n+1})-\frac{1}{n}(a_1 + a_2 + \cdots + a_{n})\right]=\lim_{n \rightarrow \infty}\left[{(na_{n+1}-a_1 - a_2 - \cdots - a_n})\frac{1}{\sqrt{n}(n+1)}\right]$$  Please help me to complete from here Intro  I'm working on a lightweight package that allows you to put any content (typically LaTeX code) in an environment, then use that content multiple times, each time scanned separately, so you can use it both as verbatim output and interpreted as LaTeX.  Its main purpose is to typeset LaTeX code and its 'result' side-by-side; useful for documenting TeX packages without having to copy/paste code. But it has other purposes as well.  After experimenting with \scantokens until I gave up in tears, I arrived at the filecontents environment, which almost solved my problem singlehandedly!  The Problem  The problem is, when reintroducing filecontented code through \input, LaTeX adds an implicit newline at the end, which translates to whitespace that I can't seem to get rid of.  I've seen many semi-related questions floating around, with answers employing techniques like:   reading a file line-by-line, using \everyeof in some clever way, playing with \endlinechar or using packages such as catchfile   but none of them provides a clear answer to the following question:  The Question  How can I \input a file without getting the implicit newline?  Minimal Working Example  \documentclass[margin=1mm]{standalone}  \usepackage{filecontents}  \begin{filecontents*}{tmp.tex}     \LaTeX{}\end{filecontents*}  \begin{document}     \fbox{\input{tmp.tex}} \end{document}     Note the extra whitespace to the right of the box.  Note also that I'm definitely not adding any explicit whitespace. Even a manually produced file (so, not using filecontents) with no newlines at all exhibits the same problem. Should I compile release builds with debug info as "full" or "pdb-only"? find and print file path, without filename Quantum mechanics textbooks that use path integrals I'm looking for a textbook in quantum mechanics that relies heavily on Green functions and the path integral formalism to supplement my QM books. I want to do some calculations using alternative methods (path integrals, green functions, Lagrangians etc). "every" vs "each"? I have an element that already has a class: &lt;div class=&quot;someclass&quot;&gt;     &lt;img ... id=&quot;image1&quot; name=&quot;image1&quot; /&gt; &lt;/div&gt;  Now, I want to create a JavaScript function that will add a class to the div (not replace, but add). How can I do that? "The pair was ..." or "the pair were ..." Interpreting exp(B) in multinomial logistic regression This is somewhat of a beginner's question, but how does one interpret an exp(B) result of 6.012 in a multinomial logistic regression model?  1) is it 6.012-1.0 = 5.012 = 5012% increase in risk?  or  2) 6.012/(1+6.012) = 0.857 = 85.7% increase in risk?  In case both alternatives are incorrect, can someone please mention the correct way?  Ive searched many resources on the internet and I get to these two alternatives, and I am not entirely sure which one is correct. Jordan Canonical Form determined by characteristic and minimal polynomials in dimension $3$, but not beyond Why and how is the  of a matrix in $M_3(\mathbb C)$ fully determined by its characteristic and minimal polynomials? And why does it fail for $n &gt;3$?   Thanks. This is a question in Ahlfors in the section on the argument principle: How many roots of the equation $f(z)=z^4+8z^3+3z^2+8z+3=0$ lie in the right half plane?  He gives a hint that we should "sketch the image of the imaginary axis and apply the argument principle to a large half disk."  Since $f$ is an entire function, I think I understand that the argument principle tells us that for any closed curve $\gamma$ in $\mathbb{C}$, the winding number of $f(\gamma)$ around 0 is equal to the number of zeros of $f$ contained inside $\gamma$.  How would you go about actually applying the hint though? I am having trouble figuring out what the image of a large half disk under $f$ would look like. Is the Echo of a Echo Knight actually a creature? I've always been certain that the echo created by an Echo Knight fighter using their 3rd-level feature Manifest Echo is not defined in game terms as a creature, since the description of the echo never explicitly tells it is a creature. But the presence of people believing the echo to be a creature in lieu of the fact that it is immune to all conditions and might make saving throws (game characteristics typically associated with creatures only) brought this doubt to my mind.  from Jeremy Crawford implies it is just an image and not a creature, further confirming that the feature should tell you, but  implies that the echo is an object whilst the feature doesn't explicitly say so. (Included for reference and insight, since tweets are not eligible as official ruling) Is the echo a creature?