I have a class in a namespace that I've used extensively throughout my solution. As the number of classes in this namespace has grown I realize that it would've been a better design decision to place this class (and a few others) into a sub-namespace. Is there any easy way to do this in Visual Studio(C#)?   I'm thinking something like the Class->Refactor->Rename feature.  Perhaps an extension?
I'm doing some architectural cleanup that involves moving a bunch of classes into different projects and/or namespaces. Currently I'm moving the files by hand, building, and then manually adding using Foo statements as needed to resolve compilation errors. Anyone know of a smarter way of doing this? (We're a CodeRush and Refactor! shop, but I'd be interested to hear if Resharper has support for this)
Show that $\left | \sin a - \sin b \right | \leq \left | a-b \right |$ Clerical mistake in UK visa application: should I make a pen-and-ink correction or electronically edit the PDF? I've gone through all similar questions but I believe my specific question doesn't have an answer yet.  I've applied for a Standard Visitor visa. After I completed the application, made an appointment and paid the fee, I noticed that the way I spelled my name on the application differs from how it is spelled in the passport by 1 letter (this is partially because of myself being an idiot, but mainly because my new passport has an incorrect transliteration of my name, whereas my old passport and any other document in my life has the correct one).  So here are the options I see:   Print the application and make a pen-and-ink correction with a black ballpoint pen by crossing the printed name/letter and writing the correct one - as answers to other similar questions suggests. Edit the PDF electronically and print it so that there are no visible corrections. However, as the form is saved at their end, there will be a discrepance between the printed form and saved form with no visible signs of correction.   Which way has better chance for me to have my application accepted?  Also (probably doesn't matter much but still): if it's the pen-and-ink correction, is it better to cross-out the whole name or only the wrong letter? How to Split Features in QGIS? Manganese has more unpaired electrons than Iron so why is Iron ferromagnetic Manganese paramagnetic? Manganese has five unpaired electrons, but Iron has four, then why is Iron ferromagnetic and Manganese paramagnetic? What's that property I'm missing? Cauchy-Schwarz inequality proof (but not the usual one) Before you downvote/vote-to-close, I am not asking for a proof of: $$\sum^n_{i=1}a_ib_i\le\sqrt{\sum_{i=1}^na_i^2}\sqrt{\sum^n_{i=1}b_i^2 } $$ Which is what EVERY link I've found assumes is the inequality (for a proof of that see:  )    I am reading a book that claims the Cauchy-Schwarz inequality is actually: $$\vert\langle x,y\rangle\vert\le\Vert x\Vert\Vert y\Vert$$ where $\Vert x\Vert :=\sqrt{\langle x,x\rangle}$  with the additional claim: equality holds $\iff\ x,y$ are linearly dependent  I cannot find a proof of this claim (only proofs for the dot product inner product). My question is: what is the simplest way to prove this (I define simplest to mean "using as few definitions outside of the inner product itself as possible" - so that's not including Gramm-Schmitt orthonormalisation, for example.)  I've just found some possible answers in the links on the right (annoyingly) but fortunately I have a second, albeit softer, question:  What inequalities that are common for say $\mathbb{R}^n$ are actually based on the inner product?   (In future I will check this site first, I was targeting lecture notes and such in my search)  Addendum: I want to use this on not-finite dimensional vector spaces. I've found one proof that relies on finite-ness. Contour integral of $\sqrt{z^2-1}$ on $|z| = 2$ I've been wrestling with this problem (available  ):  Evaluate the integral of $f(z) = \sqrt{z^2-1}$ around the circle $\{z: |z| = 2\}$, where the branch of the square root function is chosen so that $\sqrt{2^2-1} &gt; 0$.  I came up with the answer $$\int\limits_{|z| = 2} \sqrt{z^2-1} dz = \pi i$$ using the following argument, which seems a little like voodoo to me.  You notice that there are two points, at $z \pm 1$, where you might have to pick a branch of $log()$ to define the square root. Then, I convinced myself that as long as you exclude from your domain the real interval $-1 \le x \le 1$, the function $f(z)$ can be continuously defined (maybe the two branches somehow cancel?), and so is analytic on its domain.  Therefore you can shrink the contour of integration continuously using the Cauchy Closed Curve Integral Theorem, so that you wind up reducing it to the real integral $$2\int_{-1}^1 \sqrt{x^2-1} dx = \pi i$$  I'm not really sure the answer is correct, and I'm even less certain about the way I got it. I had a hard time convincing myself that $\sqrt{z^2-1}$ was not multi-valued on the domain. To try to get at that I tried $\sqrt{z^2-1} = \sqrt{z+1} \sqrt{z-1}$ and reasoned that the product makes the discontinuity disappear, using $$e^{\frac{\pi}{2}i}\cdot e^{\frac{\pi}{2}i} = -1 = e^{-\frac{\pi}{2}i}\cdot e^{-\frac{\pi}{2}i} $$ for the different branches of $log()$ you can choose.  I'd appreciate any input that would help me get a a better way to look at this.  Thanks!    EDIT  An attempt to use the Residue at infinity:  By substituting $z = 1/w$ you get \begin{eqnarray} \int\limits_{|z| = 2} \sqrt{z^2-1} dz &amp;=&amp; \int\limits_{|w| = 1/2} \frac{1}{w^2}\sqrt{\frac{1}{w^2}-1} dw \\ &amp;=&amp; \int\limits_{|w| = 1/2} \frac{1}{w^2}\sqrt{\frac{1-w^2}{w^2}} dw \\ &amp;=&amp; \int\limits_{|w| = 1/2} \frac{1}{w^3}\sqrt{1-w^2} dw \end{eqnarray} The integrand is analytic in $|w| \le 1/2$ except at $w = 0$, so we can apply the Residue Theorem. Near $w = 0$, $\sqrt{1-w^2} = 1 - \frac{1}{2}w^2 + \dots$, so the residue of $\frac{1}{w^3}\sqrt{1-w^2} $ at $w = 0$ is $-\frac{1}{2}$. Then the integral is $$\int\limits_{|z| = 2} \sqrt{z^2-1} dz = 2\pi i \cdot (-1/2) = -\pi i$$ After Doomsday was defeated, a spec-ops team sent to the Kryptionian ship in Metropolis found Luthor submerged in water, in front of a... thing, which "held" three metal cubes. The thing looked up, roars, and dissipates into thin air.    What the hell was that all about? I am really confused. What was that creature and what was Luthor doing with it? C++ inlining class methods causes undefined reference How can I query the  for tags I've created? How do I get permissions to edit system configuration files? I can't seem to edit and save config files in the root system (eg: /etc/dhcp/dhcpd.config); it just says "permission denied" or the save option is blocked in the text editor.  I'm pretty sure I'm a root user, but how do I make sure? If I am a root user, how do I fix this? How do I change the "Selected Items" color? I was trying to change the selected items color from the default orange to something else, however, the option isn't there, as it used to be in the Appearance properties in previous versions of ubuntu. Any idea where it could be in the beta? Like the title said, I want to install Celestia. I already downloaded the packages  and then, I tried all the things that I found on some posts (also, they're outdated, cause the last one is for Ubuntu 16.04) but nothing works.  How can I install it on Ubuntu 18.04.1? Can't see a glass object through another glass object in Eevee I was just testing Eevee and found that you cannot view a glass object through another glass. Is there any workaround? It works fine only If I rotate the glass window or put my camera to the back side of the scene Preposition 'to' with gerund (-ing)? Check this sentence from  (US Department of Education)     Technology ushers in fundamental structural changes that can be integral to achieving significant improvements in productivity.   Cannot it be better as...     Technology ushers in fundamental structural changes that can be integral to achieve significant improvements in productivity.   The preposition to takes gerund (-ing) here. Any rule? Difference between 'struct' and 'typedef struct' in C++? What is the origin of "that's using your noggin"? I have two identical folders, with same structure and contents like this:  folder_1   hello.txt   subfolder     byebye.txt  folder_2   hello.txt   subfolder     byebye.txt   if I compress them as tar.xz formats I get two different archives with two different file sizes (just a few bytes, but they're not identical).  $ cd folder_1 &amp;&amp; tar -Jcf archive.tar.xz * $ cd folder_2 &amp;&amp; tar -Jcf archive.tar.xz *   I get:  folder_1/archive.tar.xz != folder_2/archive.tar.xz   and of course if I md5sum or sha1sum them I'll get two different hashes  And that's my problem... I need to check if a provided archive is identical to the one I have in my storage. I cannot use hashing nor just check file sizes.  Using zip instead of tar.xz works as zip always produces identical achives from identical files. Why is this happening? Is there a way to prevent it? We learned in Thor: Ragnarok that Mjolnir is only a focus for Thor's power, not the source. If so, when a worthy​ being lifts Mjolnir and gains "the power of Thor", where are they getting the power from? How to prepare/augment images for neural network? I would like to use a neural network for image classification.  I'll start with pre-trained CaffeNet and train it for my application.    How should I prepare the input images?  In this case, all the images are of the same object but with variations (think: quality control).  They are at somewhat different scales/resolutions/distances/lighting conditions (and in many cases I don't know the scale).  Also, in each image there is an area (known) around the object of interest that should be ignored by the network.  I could (for example) crop the center of each image, which is guaranteed to contain a portion of the object of interest and none of the ignored area; but that seems like it would throw away information, and also the results wouldn't be really the same scale (maybe 1.5x variation).  Dataset augmentation  I've heard of creating more training data by random crop/mirror/etc, is there a standard method for this?  Any results on how much improvement it produces to classifier accuracy? Let $z_1, z_2, z_3,$ ...be a sequence of independent random variables s.t. $P(z_i=1)=P(z_i=-1)=\frac 1 2$. Does this sequence converge almost surely?  My intuition is telling me that the sequence will approach the random variable Z? i.e. $z_n-&gt;Z$ as $n-&gt;\infty$ and Z is just another RV s.t. $P(Z=1)=P(Z=-1)=\frac 1 2$.  Here is my confusion, if a sequence converges almost surely, then $z_i$ should be different for each term s.t. it approaches Z in the end; but in this sequence $z-i$ is the same for every term. So I dont udnersntand.