How can we copy an object in java without copying the reference. If any object is present inside then we should copy the value only with out modifying the original object reference.  How can this be done in a general way. That is we don't know whether the object is serializable or not.  I want to write a method which will deep copy the object passed to it. The object passing to it will be of any type.
It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?
What are the zero divisors of $C[0,1]$? Suppose you have a ring $(C[0,1],+,\cdot,0,1)$ of continuous real valued functions on $[0,1]$, with addition defined as $(f+g)(x)=f(x)+g(x)$ and multiplication defined as $(fg)(x)=f(x)g(x)$. I'm curious what the zero divisors are.  My hunch is that the zero divisors are precisely the functions whose zero set contains an open interval. My thinking is that if $f$ is a function which is at least zero on an open interval $(a,b)$, then there exists some function which is nonzero on $(a,b)$, but zero everywhere else on $[0,1]\setminus(a,b)$. Conversely, if $f$ is not zero on any open interval, then every zero is isolated in a sense. But if $fg=0$ for some $g$, then $g$ is zero everywhere except these isolated points, but continuity would imply that it is also zero at the zeros of $f$, but then $g=0$, so $f$ is not a zero divisor.   I have a hard time stating this formally though, since I'm only studying algebra, and not analysis. Is this intuition correct, and if so, how could it be rigorously expressed? How to combine measurement error with statistic error Is a general GRE score of X sufficient for entry to postgraduate degree Y? Question: I got general GRE scores of VR (verbal reasoning), QR (quantitative reasoning), and AW (analytical writing).  Is this a good score to apply for entry to postgraduate degree in field X?  How will this score look to the selection committee?    Note: This is an intentionally generic GRE question (with unspecified scores and field of study) which is intended as a template for a large number of questions asked on this forum regarding evaluating the scores on the general GRE test (e.g., , , , , , , , and ).  This question seeks answers that are applicable for an applicant for graduate-level programs in any field, based on any scores in the GRE general test.  The goal of this question is to provide a general reference to avoid the need for specific questions with particular scores/field of study. What are the light blue lines on my imported objects Why was the Triwizard cup portkey in Goblet of Fire two-way? At the end of the scene in the cemetery in GoF, the spirits who emerged from Voldemort's wand tell Harry to go grab the trophy (which, of course, was a portkey that took Harry and Cedric from the maze to the cemetery), and that the trophy portkey would take Harry back to Hogwarts.  Why would the portkey do that?  Are all the portkeys 2-way?  If possible, I would prefer as much of the answer based on canon (or JKR) as feasible Java Thread priority has no effect Why can we apply the $E=hf$ equation for electrons? So in my textbook, it states that the $E=hf$ equation applies to electrons, and all particles, not just photons.   But in order to prove this, wouldn't these particles need to have zero mass, to satisfy $E=pc$ from Einstein's equation?  In Einstein's theory of relativity $E^2= p^2c^2 + m^2c^4$, we get $E=pc$ because we consider the mass to be zero.   For $E=hf$ to work for other particles, don't we need to assume electrons have zero rest mass? How to evaluate $\lim\limits_{n\to+\infty} \prod\limits_{k=1}^n (1+k/n^2)$? I've got a limit which puzzle me several days. The question is  $$ \lim_{n\to+\infty} \prod_{k=1}^n\left(1+\frac{k}{n^2}\right).$$  Can you help me? Thank you in advance How to prove $\gcd(a^2, b^2) = (\gcd(a, b))^2$?  My attempt:  Let $\gcd(a, b) = d$.  Then $d|a$ and $d|b$ then $d^2|a^2$ and $d^2|b^2$. i.e $d^2$ divides $a^2 ~~\&amp;~~ b^2$. What is the measure of the set of numbers in $[0,1]$ whose decimal expansions do not contain $5$? I made a simple FM transmitter following  and it worked! Now I need some help to understand how.  My coil is made of 1 mm copper wire has 6 turns and 8 mm wire diameter. According to this online calculator:  this means that: L = 3.9e-7 H  I did not have any 5 pF trim capacitor so I used a 3 pF capacitor instead.  Am I correct in assuming that the frequency this will transmit on can be found by looking at the L1 C2 as a LC oscillator and using the frequency formulae:  fR = 1/(2*pi*sqrt(LC))  ?  If so I should get fR = 147 MHz. Which is strange since I received the signal on 91.5 MHz on my radio.  In a LC circuit I understand that the signal decays exponentially over time. That is hopefully not happening here. Why? Because of C4 maybe?  Also what is the purpose of C1?  If I want to increase the range of this FM transmitter somewhat can I do this by simply replacing R2 with a 470 Ohm resistor?  Are there free simulator programs that let me see the resulting spectrum at the antenna? Creating point to center of polyline? I'm trying to create a points in the middle of polylines. The data is now in the form of shapefile. Is there an easy way to do this? Test for the convergence of the sequence $S_n =\frac1n \left(1 + \frac{1}{2} + \frac{1}{3} + \cdots+ \frac{1}{n}\right)$ Let $E$ be a metric $\mathbb R$-vector space, $I$ be a nonempty set and $(\mu_t)_{t\in I},(\nu_t)_{t\in I}$ be families of nonnegative finite measures on $\mathcal B(E)$.  that if $(\mu_t)_{t\in I}$ and $(\nu_t)_{t\in I}$ are tight$^1$ and bounded in total variation norm, then the family of convolutions $(\mu_t\ast\nu_t)_{t\in I}$ is tight and bounded in total variation norm as well.  Now I would like to show the converse: If $(\mu_t)_{t\in I}$ and $(\mu_t\ast\nu_t)_{t\in I}$ are tight, then $(\nu_t)_{t\in I}$ is tight. (Most probably we need to impose a boundedness assumption on $(\mu_t)_{t\in I}$ and on $(\mu_t\ast\nu_t)_{t\in I}$ or even a priori on $(\nu_t)_{t\in I}$.)  For the moment, I'm only able to prove the claim assuming that the $\mu_t,\nu_t$ are probability measures. Under this assumption, the proof goes as follows: Let $\varepsilon&gt;0$. Since $(\mu_t)_{t\in I}$ and $(\mu_t\ast\nu_t)_{t\in I}$ are tight, there is a compact $K\subseteq E$ with $$\sup\left(\sup_{t\in I}\mu_t(K^c),\sup_{t\in I}(\mu_t\ast\nu_t)(K^c)\right)&lt;\varepsilon\tag1.$$ Now $K-K$ is compact and \begin{equation}\begin{split}1-\varepsilon&lt;(\mu_t\ast\nu_t)(K)&amp;=\underbrace{\int_K\mu_t({\rm d}x)\nu_t(\underbrace{K-x}_{\subseteq\:K-K})}_{\le\:\nu_t(K-K)}+\underbrace{\int_{K^c}\mu_t({\rm d}x)\underbrace{\nu_t(K-x)}_{\le\:1}}_{&lt;\:\varepsilon}\\&amp;&lt;\nu_t(K-K)+\varepsilon\end{split}\tag2\end{equation} for all $t\in I$, which immediately yields $$\nu_t(K-K)&gt;1-2\varepsilon\;\;\;\text{for all }t\in I\tag3.$$  Can we drop the probability measure assumption?  EDIT I'm not able to obtain the claim, even with the help of the answer below. If $\varepsilon&gt;0$, the goal is to show that $$\nu_t(E)-\nu_t(K-K)=\nu_t((K-K)^c)&lt;\varepsilon\tag4.$$ If I'm choosing all the constants as generic as possible, we obtain $$\mu_t(E)\le c_1\tag5$$ $$\mu_t(K^c)\le k_1(\varepsilon)\tag6$$ $$(\mu_t\ast\nu_t)(K)&lt;c_1\nu_t(K-K)+c_2k_1(\varepsilon)\tag6$$ $$\mu_t(E)\ge\alpha_1\tag7$$ $$(\mu_t\ast\nu_t)(E)\le c_3\tag8$$ $$\nu_t(E)\le\frac{c_3}{\alpha_1}=:c_2\tag9$$ $$(\mu_t\ast\nu_t)(E)\ge\alpha_3\tag{10}$$ $$\nu_t(E)\ge\frac{\alpha_3}{c_1}\tag{11}$$ $$(\mu_t\ast\nu_t)(K^c)&lt;k_3(\varepsilon)$$ The assumptions that I'm imposing is that $(\mu_t)$ and $(\mu_t\ast\nu_t)$ are bounded above (by $c_1$ and $c_3$) and below (by $\alpha_1$ and $\alpha_3$) in total variation norm and are tight (so that we can find $K$ for arbitrary $k_1(\varepsilon)$ and $k_3(\varepsilon)$). In order to obtain the claim we need to choose $k_1(\varepsilon)$ and $k_3(\varepsilon)$ such that $(4)$ holds. From everything above, we obtain $$\nu_t(E)-\nu_t(K-K)&lt;\frac{c_3}{\alpha_1}-\frac{\alpha_3}{c_1}+\frac{c_3}{\alpha_1c_1}k_1(\varepsilon)+\frac1{c_1}k_3.(\varepsilon)\tag{12}$$ Even if we simplify this by assuming $\alpha_1=\alpha_3$, $c_1=c_3$ and $k_1(\varepsilon)=k_3(\varepsilon)$, the equation $$\frac{c_3}{\alpha_1}-\frac{\alpha_3}{c_1}+\frac{c_3}{\alpha_1c_1}k_1(\varepsilon)+\frac1{c_1}k_3.(\varepsilon)=\varepsilon\tag{13}$$ doesn't seem to admit a solution $(k_1(\varepsilon),k_3(\varepsilon))$ with positive $k_1(\varepsilon)$ and $k_3(\varepsilon)$; unless $\frac{c_3}{\alpha_1}-\frac{\alpha_3}{c_1}\ge0$; which clearly doesn't need to be the case (it is clearly the case for probability measures though ...)  $^1$ Remember that a family $\mathcal F$ of finite signed measures on $\mathcal B(E)$ is called tight if for all $\varepsilon&gt;0$, there is a compact $K\subseteq E$ such that $$\sup_{\mu\in\mathcal F}|\mu|(K^c)&lt;\varepsilon.$$ I am trying to install a Ralink wifi adapter in Ubuntu Desktop 14.04.  The system is not detecting the wifi.   lsusb lists the device as:  Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp.  I have the rt2800 USB driver listed in "/etc/modules"; Following some instructions on the web, I tried this command:  echo 148F 7601 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_i  lsmod | grep rt2800 returns the following:  rt2800usb              26581  0  rt2x00usb              20041  1 rt2800usb rt2800lib              83150  1 rt2800usb rt2x00lib              48886  3 rt2x00usb,rt2800lib,rt2800usb mac80211              545990  3 rt2x00lib,rt2x00usb,rt2800lib crc_ccitt              12627  1 rt2800lib How do we know for certain that space is expanding? Can I choose which damage type my Sneak Attack does if my weapon does multiple types? 'pyrcc5' is not recognized as an internal or external command I installed QGIS 3.0 on Windows 10. I get this error everytime i run the pyrcc4 or pyrcc5 command:  'pyrcc4' is not recognized as an internal or external command  Even if I find a place with a pyrcc4.exe file or a place with apyrcc5.bat file and add the path to the environment variables I get the same error. In the previous installation of osgeo4w i had a pyqtdev folder or something similar appear I think it was on C/. Was there supposed to be such a folder, do I need to download pyqt separately? How does the Java 'for each' loop work? Consider:  List&lt;String&gt; someList = new ArrayList&lt;String&gt;(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax? A question about long exact sequence of finite dim vector spaces