I have a bunch of assignment operations in Visual Studio, and I want to reverse them: i.e  i = j; would become  j = i;  i.e. replacing everything before the equals with what's after the equals, and vice versa  Is there any easy way to do this, say something in the regular expression engine?  Cheers, Ed
After writing code to populate textboxes from an object, such as:  txtFirstName.Text = customer.FirstName; txtLastName.Text = customer.LastName; txtAddress.Text = customer.Address; txtCity.Text = customer.City;   is there way in Visual Studio (or even something like Resharper) to copy and paste this code into a save function and reverse the code around the equal sign, so that it will look like:  customer.FirstName = txtFirstName.Text; customer.LastName = txtLastName.Text; customer.Address = txtAddress.Text; customer.City = txtCity.Text;
This is something that has long bothered me, and I have asked a few physicists and chemists and never gotten a very satisfying answer. Why are particles charged? And I'm not asking (and this is the answer you often get) why some molecule might be negatively charged because the answer to that is simply is that there was one more negatively charged particle than positively charged particle. That doesn't answer my question, however, of why there are charged particles at all?  So, on a fundamental level, what makes one particle charged and another one neutral.  For instance, protons and neutrons have almost exactly the same mass, which I'm assuming that means they have very similar internal compositions, yet one is positively charged and the other neutral. What is going on that makes these particles different?  On a similar note, and I'd really like to know this, how is it that a proton and an electron have exactly equal and opposite charge, yet an electron is about 1000 times less massive than a proton?  I have particular trouble with this question because if the answer were something along the lines of "particle X which composes protons all have partial positive charges of n amount..." I would just ask why particle X has any charge and we'd be in the same predicament.  I'm sure there is a satisfactory answer to my question, I just can't find it and don't know what resources are reliable or detailed enough to be satisfactory. Suppose you have a physical . It is true that as amplitude increases, the period increases. Can we demonstrate this fact without explicitly finding the period (which is pretty involved and pretty messy) in:    an intuitive fashion,  rigorously? What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive? I'm a teacher and will ask my students to either bring their laptops with Ubuntu installed with an specific list of packages preinstalled or bring a USB Drive or External Hard Drive with Ubuntu and the packages preinstalled.  For those who are going to bring the USB are two posibilities:   Install with the Ubuntu's "Startup disk creator" program, and telling it to reserve some space for persistence. Boot with a LiveCD and Install Ubuntu in the USB drive.   Then, in either case, boot with that media and install the packages.  So, for my purpose or any other purpose:   What is the best choice and why? Do we have another option? full explanation please. A topological space is extremally disconnected iff every two disjoint open sets have disjoint closures Show that for any topological space $X$ the following are equivalent:         $X$ is extremally disconnected   Every two disjoint open sets in $X$ have disjoint closures.      My attempt at a solution  Assume every two disjoint open sets in $X$ have disjoint closures. Let A open in $X$, $A$ and $X \setminus \overline{A} $  disjoint open set $\overline{A} \cap (\overline{X \setminus \overline{A}} )= \emptyset$,  $(\overline{X \setminus \overline{A}} ) \subset X \setminus \overline{A}$, which implies that $X \setminus \overline{A}$ is closed in $X$. Thus $\overline{A}$ is open in $X$. So we obtain $X$ is extremally disconnected.  Otherwise Let $X$ is extremally disconnected. Then the closure of every open set is open.  So $X$ is completely separated. Let $A$, $B$ two disjoint open sets.  Then there exist a continuous function $g:X \rightarrow [0,1]$ such that  $g(A)=0$, $g(B)=1$  How can I continue? Understanding d-separation theory in causal Bayesian networks I am trying to understand the d-Separation logic in Causal Bayesian Networks. I know how the algorithm works, but I don't exactly understand why the "flow of information" works as stated in the algorithm.    For example in the graph above, lets think that we are only given X and no other variable has been observed. Then according to the rules of d-separation, the information flow from X to D:   X influences A, which is $P(A)\neq P(A|X)$. This is OK, since A causes X and if we know about the effect X, this affects our belief about the cause A. Information flows. X influences B,which is $P(B)\neq P(B|X)$. This is OK, since A has been changed by our knowledge about X, the change at A can influence our beliefs about its cause, B, as well. X influences C,which is $P(C)\neq P(C|X)$. This is OK because we know that B is biased by our knowledge about its indirect effect, X, and since B is biased by X, this will influence B's all direct and indirect effects. C is a direct effect of B and it is influenced by our knowledge about X.   Well, up to this point, everything is OK for me since the flow of the information occurs according to intuitive cause-effect relationships. But I don't get the special behavior of so called "V-structures" or "Colliders" in this scheme. According to the d-Separation theory, B and D are the common causes of C in the graph above and it says that if we did not observe C or any of its descendants, the flow information from X is blocked at C. Well, OK, but my question is why?  From the three steps above, started from X, we saw that C is influenced by our knowledge about X and the information flow occurred according to the cause-effect relationship. The d-Separation theory says that we cannot go from C to D since C is not observed. But I think that since we know that C is biased and D is a cause of C, D should be affected as well while the theory says the opposite. I am clearly missing something in my thinking pattern but can't see what it is.  So I need an explanation of why the flow of information blocked at C, if C is not observed. $\lim\limits_{n \to{+}\infty}{\sqrt[n]{n!}}$ is infinite Trying to identify a story about breaking out of a predefined path and no one notices I vaguely remember reading a short story many years ago where something happens and the protagonist gets a bit "out of step" with the rest of the world.  Everyone else keeps acting as if he's still doing what he would have been doing before the event, to the point of carrying on one-sided conversations and the like.  I can't remember much of the plot, but the premise stuck with me.  Edit: To try and explain it more clearly, based on the comment I just wrote, I think everyone else was effectively acting like they were robots with a prerecorded program.  If someone would normally wake up, drink coffee, put on pants, then walk out the door to catch a bus, then if the protagonist broke his coffee cup, stole his pants, and jammed the door, the victim would pour coffee into a broken/nonexistent cup, walk out pantsless, but when he got to the jammed door he might suddenly realize something was up (and thus being "out of step" spreads) or he might continue to go through the motions.  In either case, no one else would notice that the victim was pantsless (or that he didn't make it to work)...  How much of this actually came up in the story, I don't remember. Stack Exchange- Area 51 Android App I am trying to use Stack Exchange Andoid App to use my accounts in Stack Overflow &amp; Area 51.   For the Area 51, there is only Area 51 Discussion. Even Area 51 Discussion isn't working in the App!   VERSION 1.0.51  When adding this site, it's showing the correct full name as in this screen-shot:     However, when I pin this site to my fav sites in Stack Exchange, it is showing: Unknown Site. When clicking it, it shows black screen then just quit the App!  Here is the screen-shot:       Is the site not yet capable with Android? or is it a bug in the App itself?  PS: this question isn't duplicate:   In the previous versions of the App, the site was opening but with Unknown Site name. However, in this version, it quits the app when pressing the area site! It isn't opening at all! This question is also to track this bug in the App. As it's about the site name issue &amp; the content as well. The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled &quot;other documents you may want to provide&quot; (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is &quot;bank statements&quot; and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning &quot;for example&quot;; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me? Not able to understand the meaning of question? car moving with a speed of 40 km / h can be stopped by applying brakes after at least 2 m. If the same car is moving with a speed of 80 km / h, what is the minimum stopping distance  Does this mean that after 2 m, You will apply brakes and then it stops. What is the retardation value  with which you are brakes.I am not understand the meaning of the values. How to mix a jpeg background image with a 3D scene generated using Filmic Blender? I want to compose 3D-model over image, and I use filmic to get more suitable result. But I want the background image to remain in the original colors. So I try to use this setting:    but it haven't setting "look" ("high contrast", "low contrast", ets..) here, so color changes..  How to solve this?  Of course, I can save my render and compose it with jpg-image in different place - no problem here, but my question is about how to make it in place. It will give ability to control colors in filmic color space and see the results immediately.   UPD: image is from image node:    UPD2:     you can't really convert a display referred image to the scene   referred domain; the information has been permanently lost   Ok, but how to make the colors at the output looks close to the original?  UPD3:  This filmic version is from daily build. This question is inspired by my own answer to a  which I tried to answer and got stuck at one point.     The question was:     HI DARLING.      USE MY ATM CARD, TAKE ANY AMOUNT OUT, GO SHOPPING AND TAKE YOUR FRIENDS FOR LUNCH.      PIN CODE: $\displaystyle \int_{0}^{1} \frac{3x^3 - x^2 + 2x - 4}{\sqrt{x^2 - 3x + 2}} \, dx $      I LOVE YOU HONEY.      Anyone knows? Are we gonna get an integer number?     My attempt:  Does this help?     $$\frac{3x^3-x^2+2x-4}{x-1}=3x^2+2x+4$$   (long division)   \begin{align*} I&amp;=\int\frac{3x^3-x^2+2x-4}{[(x-1)(x-2)]^{1/2}} dx = \\ &amp;=\int\frac{(3x^2+2x+4)(x-1)^{1/2}}{(x-2)^{1/2}} dx = \\ &amp;=\int 3(u^4-4u^2-4)(u^2+1)^{1/2}du \times 2 \end{align*}   after the substitution   \begin{gather*} (x-2)^{1/2}=u\\ du=\frac1{2(x-2)^{1/2}}dx\\ u^2=x-2\\ (x-1)^{1/2}=(u^2+1)^{1/2} \end{gather*}   Update:  may help us proceed.    I tried to proceed:     $$6\int (u^4-4u^2-4)(u^2+1)^{1/2} du = 6\int ((t-3)^2-8)t \frac{dt}{2u}$$   after $u^2+1=t$ and $dt=2udu$   \begin{align*} u^4-4u^2-4 &amp;= (u^2+1)^2-(6u^2+5) \\ &amp;= (u^2+1)^2-6(u^2+1)+1 \\ &amp;= ((u^2+1)-3)^2-8 \end{align*}   I wonder whether this question can be solved from here?    Update:   This has been getting a lot of views, and I think most people came for the sort of problem mentioned in the title (where I got stuck) rather than the original problem itself.  Keepin this in mind, I'm reopening the question and here's the kind of answers I expect — Solutions to the original problem are good, but I'd prefer solutions that continue from the part where I got stuck — the polynomial in $u$ — that's the sort of problem mentioned in the title. In the proof of the lemma     For every limit ordinal $\alpha$, $\textrm{cf } \alpha$ is a regular cardinal    Jech says that     It is easy to see that if $\alpha$ is not a cardinal, then using a mapping of $|\alpha|$ onto $\alpha$ one can construct a cofinal sequence in $\alpha$ of length $\leq |\alpha|$, and therefore $\textrm{cf } \alpha &lt; \alpha$.    I've spent a while trying to construct this cofinal sequence and was wondering if I was on the right path:   From a bijection $f$ between $\kappa = |\alpha|$ and $\alpha$ take $S = \{\beta \in \kappa : \ f(\gamma) &lt; f(\beta)$ for all $\gamma &lt; \beta\}$ then if $\xi$ is the order type of $S$ and $g$ is the isomorphism from $\xi$ to $S$ the function $f\circ g$ is a cofinal sequence in $\alpha$ and $\xi &lt; \alpha$.   Is this on the right track, or is there an easier way of doing it? I need to be able to compare some month names I have in an array.  It would be nice if there were some direct way like:  Month.toInt("January") &gt; Month.toInt("May")   My Google searching seems to suggest the only way is to write your own method, but this seems like a common enough problem that I would think it would have been already implemented in .Net, anyone done this before? How do I upgrade to a newer version of Ubuntu? What exactly is a kilogram-meter? This question isn't just about kilogram-meters, it's about multiplied units in general.  I have a good mental conception of divided units, e.g. meters per second or grams per cubic meter.  Meters per second just (usually) means how many meters are traversed by an object each second.  Simple.  But I don't really have a mental conception of what it means when units are multiplied, e.g. a kilogram-meter.  Can anyone explain in simple physical terms what a kilogram-meter is? How do I find the privileges I have earned and will earn in Stack Overflow? It used to be off the top bar, now its gone  Where has it moved?  EDIT:  It moved onto the profile page !  Right side same row as your name in profile:    Thank you List of PDOStatement::bindParam data_type parameters I'm trying to prove that the rationals are not the countable intersection of open sets, but I still can't understand why   $$\bigcap_{n \in \mathbf{N}} \left\{\left(q - \frac 1n, q + \frac 1n\right) : q \in \mathbf{Q}\right\}$$   isn't a counter-example. Any ideas? Thanks! Prove that for $ 0&lt;x&lt; \pi $, $$ \quad S_n(x) = \sin x + \frac{ \sin3x }{3} + ... + \frac{ \sin((2n-1)x) }{2n-1} &gt;0 \quad \forall n = 1,2,... $$  Having trouble with this problem. This is an olympiad-style question, so an answer that doesn't use calculus or analysis would be preferred. A possible approach is induction, but for this we need to find a function in terms of $n$ and $x$ so that we can actually use the inductive step. If anyone has any ideas they would be appreciated.  If you really want to go down the calculus route (at this point I don't mind), then $ S_n' (x) = \cos x + \cos 3x + ... +\cos((2n-1)x) $ , which you can find a closed form for, but I don't know how useful that is.