C# Copy an object by value
Deep cloning objects
Rounding a number to the nearest 5 or 10 or X Given numbers like 499, 73433, 2348 what VBA can I use to round to the nearest 5 or 10? or an arbitrary number?  By 5:   499 -&gt;  500 2348 -&gt; 2350 7343 -&gt; 7345   By 10:   499 -&gt;  500 2348 -&gt; 2350 7343 -&gt; 7340   etc. If I roll two fair dice, the probability that I would get at least one 6 would be.... I have got codes like the following (generated by Kile). How can I add a caption. I guess I should have used the table environment. Is there any solution now?  \newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}} \begin{center} \begin{tabular}{rccll}      &amp;   &amp; \mc{3}{c}{Colin}\\      &amp;   &amp; a &amp; \mc{1}{c}{b} &amp; \mc{1}{c}{c}\\\cline{3-5} Rose &amp; \mc{1}{c|}{A} &amp; \mc{1}{c|}{(1,2)} &amp; \mc{1}{c|}{(2,5)} &amp; \mc{1}{c|}{(4,4)}\\\cline{3-5}      &amp; \mc{1}{c|}{B} &amp; \mc{1}{c|}{(7,4)} &amp; \mc{1}{c|}{(3,5)} &amp; \mc{1}{c|}{(0,6)}\\\cline{3-5} \end{tabular} \end{center} Using mask as a garbage matte to hide an object Is there a secular, non vulgar alternative to "for heaven's sake"? I know for heaven's sake, for Pete's sake, for God's sake and for Christ's sake. All of those, however are religious references. The only non-religious equivalent phrases I know are for fuck's sake and its variations. Are there any non-vulgar, non-religious alternatives? I am very used to the general construct of for X's sake and am looking for something along the same lines that I could use in cases like  C'mon, it's just a scratch for X's sake! That's not even true for X's sake!  It does not need to also be applicable as a general exclamation of frustration (Oh, for chrissake!) but that would be nice. Basically, I'm looking for a synonym for the &quot;Oh come on!&quot; sense of for fuck's sake rather than the Oh shit! one.  EDIT: Since this has gotten quite a bit of attention, I would like to urge those who answer to read the entire question, not just the title. I am not just looking for polite swearwords but for something that can be used in the example phrases above. Meaning of 'const' last in a function declaration of a class? Can the Ubuntu logo be used for a commercial website? Is there an Ubuntu logo that can be used on a commercial website to indicate that Ubuntu can be installed for customers? If the center of a group $G$ is of index $n$, prove that every conjugacy class has at most $n$ elements. (This question is from Dummit and Foote, page 130, 3rd edition.)  Here is my attempt: we have  $|G| =|C_G (g_i)| | G : C_G (g_i)| $  $|C_G (g_i)| =|Z(G)| \cdot  |C_G (g_i):Z(G)| $.  Then   $|G|= |Z(G)|\cdot |C_G (g_i):Z(G)|\cdot | G : C_G (g_i)| $.  Then  $n = |C_G (g_i):Z(G)|\cdot  | G : C_G (g_i)| $.  But $|C_G (g_i):Z(G)|$ is positive integar as  $ Z(G)$ is   subgroup of  $C_G (g_i)$.  If $| G : C_G (g_i)|$ bigger than $n$, then $|C_G (g_i):Z(G)|\cdot | G : C_G (g_i)|$ is bigger than $n $.  But   $|C_G (g_i):Z(G)|\cdot | G : C_G (g_i)|=n$, contradiction.  Then $| G : C_G (g_i)|\le n$ and this completes the proof.   Is this proof right or not ??!!! Well structured URLs vs. URLs optimized for SEO Let’s take an example of a movie site. So a well structured set of URLs for this site can be:     Movie page - example.com/movies/the-matrix Review for movie - example.com/movies/the-matrix/reviews Trailers for movie - example.com/movies/the-matrix/trailers Specific trailer for movie - example.com/movies/the-matrix/trailers/trailer1   where it’s possible to navigate the resource even by directly deleting/appending resource name seamlessly.  For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query "the matrix trailer"    example.com/movies/the-matrix/trailers example.org/trailers/the-matrix/    `     Google might prefer the second URL as it has the keyword "trailer" at first level comparing to first URL which has "trailer" at 3rd level (a resource deeper in URL hierarchy may be less important).    If it is correct, one may be tempted to create URL hierarchy somewhat like      Movie page - example.com/movies/the-matrix Review for movie - example.com/reviews/the-matrix/ Trailers for movie - example.com/trailers/the-matrix/ Specific trailer for movie - example.com/trailers/the-matrix/trailer1     which will break the seamless hierarchy.    My questions are:   Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?   Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization? Consider the smallest number in each of the $n\choose r$ subsets (of size $r$) of $S=\{1,2,\ldots,n\}$... Consider the smallest number in each of the $n\choose r$ subsets (of size $r$) of $S=\{1,2,\ldots,n\}$.Show that the arithmetic mean of the numbers so obtained is ${n+1}\over{r+1}$. I have no idea, how to solve it.It would be better if the solution has bijection. Please help! Characterization of short exact sequences The following is the first part of Proposition 2.9 in "Introduction to Commutative Algebra" by Atiyah &amp; Macdonald.     Let $A$ be a commutative ring with $1$. Let $$M' \overset{u}{\longrightarrow}M\overset{v}{\longrightarrow}M''\longrightarrow  0\tag{1} $$ be sequence of $A$-modules and homomorphisms. Then the sequence (1) is exact if and only if for all $A$-modules $N$, the   sequence  $$0\longrightarrow \operatorname{Hom}(M'', N)  \overset{\overline{v}}{\longrightarrow}\operatorname{Hom}(M,  N)\overset{\overline{u}}{\longrightarrow}\operatorname{Hom}(M', N)  \tag{2} $$ is exact.   Here, $\overline{v}$ is the map defined by $\overline{v}(f)=f\circ v$ for every $f\in\operatorname{Hom}(M'', N)$ and $\overline{u}$ is defined likewise.   The proof one of direction, namely $(2)\Rightarrow (1)$ is given in the book, which I am having some trouble understanding. So assuming (2) is exact sequence, the authors remark that "since $\overline{v}$ is injective for all $N$, it follows that $v$ is surjective". Could someone explain why this follows?  Given that $\overline{v}$ is injective, we know that whenever $f(v(x))=g(v(x))$ for all $x\in M$, we have $f=g$. I am not sure how we conclude from this surjectivity of $v$.  Thanks! Does Quicksilver's walkman speed up with him? Sums in math mode: how to display index under the sigma sign? I have a fraction with sums above and under the line. How can I convince LaTeX to write the indices of the sums under the sigma instead of next to it?  \begin{displaymath}   \frac{\sum_{s \in S} s^2}{\sum_{p \in P} p^2} \end{displaymath} Use a shell variable in awk How to refresh the specific Lightning component not the lightning page I have two lightning component placed on one page lightning app. First Component have refresh icon and I set onclick action to refresh Component $A.get('e.force:refreshView').fire(); but this event refresh the whole page instead of First component.  how can refresh only one component on page not all the page ? Rubbing eggplants in salt Get specific GPS location somehow on windows 8 I am relatively new to Blender so please excuse me if this is rather amateur!   The bottom of my torus has poor surface quality, I have scaled the vertices down for a smaller (variable) tubular radius all the way around the torus and at the bottom the surface quality is awful, with inaccurate shading. Any ideas as to what is wrong and/or how I could fix this?  Thanks, itsanate Hydrostatic pressure - doesn't density vary with depth? Our class is learning about hydrostatic water pressure and we have been told that we can calculate the force of the liquid on an object at any depth using "the density x 9.8 x the depth". However, as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it? So should't there be something in the equation to account for the varying density? To me, "density x 9.8 x depth" seems like it is saying that the density will be constant... Number of solutions to the congruence $x^q \equiv 1 \mod p$. Let $p, q$ be distinct odd primes, I would like to compute the number of solution $\mod p$ to the congruence $x^q \equiv 1 \mod p$. (Show that it's $gcd(q, p - 1))$  If $x^q \equiv 1 \mod p$, since $q$ is prime, this must mean that $x$ is either $1$ or has order $q$.   Hence, the problem reduces to finding the number of elements of $U_p$ which is either $1$ or has order $q$.  If $ q \nmid  p - 1$, then there is only one element, namely $1$.  If $q \mid p - 1$, then the number of elements of order $q$ is $\phi(q) = q - 1$, and so the number of solutions to the congruence $\mod p$ is $q - 1 + 1 = q$, and in either case the number of solutions is $\gcd(q, p - 1)$.  Does this look fine?