I'm having a little problem! I want to restrict the users of my programm from using anything but letters in certain textboxes, which currently looks like this  private void textBox_Ansprechpartner_Name_TextChanged(object sender, EventArgs e) {     if (!System.Text.RegularExpressions.Regex.IsMatch(textBox_Ansprechpartner_Name.Text, "^[a-zA-Z ]"))     {         MessageBox.Show("This textbox may only contain letters.");         textBox_Ansprechpartner_Name.Text = string.Empty;     }             }   Which works just fine, until you actually want to use backspace for example, which makes it empty the textbox again with the same message. Another problem I have is, that it shows the message box when it detects that the input is disallowed aswell as when emptying the field itself.   I tried allowing backspaces by adding \b but the only thing that does is disallowing letters all together.   I'm in a bit of a weird situataion as nothing I've tried so far has worked out.  Help would be greatly appreciated
I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.
After update to OS X 10.11 I started having these bugs:   Finder sidebar text flashing  Very high CPU load:      I have Macbook Pro Retina 13" Mid 2014  I reset NVRAM.  I deleted com.apple.finder.plist, it didn't help.  Also I did this: , no longer flashes. Notify question OP (and those who marked it a favourite) if an answer has been modified Seriously, I had not noticed e.g. Jeff's edit  had he not also retagged my question. Does anyone know the (specific) reasons that it is recommended that old LTS server users wait until the point release to upgrade?  Is it just a matter of bug fixes and waiting for improved stability for production servers, or is there something more fundamental than that? If I see an answer that involves some illegal activity, such as breaking license agreements, should I then mark this as Offensive or should I simply down-vote it? What is the best way to install Guest Additions with all the resize and clipboard and file sharing features on Ubuntu 16.04? I have a string which is like this:  this is "a test"   I'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:  ['this','is','a test']   PS. I know you are going to ask "what happens if there are quotes within the quotes, well, in my application, that will never happen. How do I show that there exists variational/action principle for a given classical system? We see variational principles coming into play in different places such as Classical Mechanics (Hamilton's principle which gives rise to the Euler-Lagrange equations), Optics (in the form of Fermat's principle) and even General Relativity (we get Einstein's equation from the Einstein-Hilbert action). However, how do we explain this very principle, i.e., more mathematically, I want to ask the following:      If I am given a set of generalized positions and velocities, say, $\{q_{i}, \dot{q}_{i}\}$, which describes a classical system with known dynamics (equations of motion), then, how do I rigorously show that there always exists an action functional $A$, where    $$A ~=~ \int L(q_{i}, \dot{q}_{i})dt,$$    such that $\delta A = 0$ gives the correct equations of motion and trajectory of the system?    I presume historically, the motivation came from Optics: i.e., light rays travel along a path where $S = \int_{A}^{B} n ds$ is minimized (or at least stationary). (Here, $ds$ is the differential element along the path). I don't mind some symplectic geometry talk if that is needed at all. After the recent "Look and Feel" Apple vs Samsung lawsuits, I've been wondering to what extent this might affect websites/webapps that offer functionality similar to other existing sites.  So what exactly would one have to be wary of to make sure they don't step on the toes of a big corporation?  I could see carbon copying a companies website/app (especially if it's a very distinctive product) being a bad practice that could get you some backlash, especially blatantly ripping off iconic terminology, but how similar is too similar?  Does the ten-foot rule apply to the web?     “If a reasonable person could not, at ten feet, tell the difference between two competitive products, then there was cause to believe an infringement was occurring.”   Or is there a separate legal precedent associated with the web?  And then where does feel, which is essentially the common term for UX, come in.  Can you patent the way a website "feels", as in the flow, organization and functionality associated.  I understand that you can't patent basic elements like radio buttons, but what about the layout and look of a large number of those elements used in combination to complete a certain action/s?    I know that is still a bit of a Sword of Damocles for online retailers.  Where is the line drawn for website/webapp copyright infringement?  Or is there even a line drawn yet? How can I view all my unaccepted questions across SE? Limits of sequences of sets I am starting to learn about the liminf and limsup of a sequence of sets. However, I do not understand the very basics, such as why $\lim\sup A_n=\bigcap_{n\in N}\bigcup_{k&gt;n} A_k,$ and why $\lim\sup A_n=\bigcup_{n\in N}\bigcap_{k&gt;n}A_k.$ Can someone break these definitions down for me?  Also, why is $\lim\inf\subseteq\lim\sup$? What are all the font styles I can use in math mode? As can be seen in above picture, there are lots of fonts or font styles that can be used in math mode.  What are all the fonts or font styles I can use in math mode, and which packages are required in order to use them?  Let's assume I'm using standard Computer Modern or Latin Modern (lmodern) fonts.  Edit: It'd be great to see examples of what the different styles look like, probably via images.    I'm not interested in a reproduction of the picture, which can be found at ; the picture is for illustration purposes only. Furthermore, this is supposed to become a one-catches-all question for questions like the beforementioned. If I actually were looking for these fonts, I wouldn't just lazily ask here but look e.g. at  , tables 3.14 and 6.4 first.) I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.   This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.  I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?  The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.  I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue. Do we know anything about Aragorn's first time in Moria? When the Company is forced to abandon their attempt to cross the Misty Mountains via the Redhorn Gate (the pass of Caradhras), Gandalf proposes they go "neither over the mountains, nor round them, but under them," via Moria. During the debate Aragorn remarks:     "I too once passed the Dirmrill Gate but though I also came out again, the memory is very evil. I do not wish to enter Moria a second time."    I haven't read much beyond the LOTR trilogy other than The Silmarillion. Does Tolkien ever describe Aragorn's first visit to Moria anywhere? Writing string at the same position using Console.Write in C# 2.0 Understanding backtick (`) I'm creating a model for a 3D game that will eventually be exported using a custom Python script. This model makes heavy use of UV textures.  However, the project now references a bunch of images that are not used by any objects in the project. Example:    I don't want the first two, or the red_bubble.png image. However, I have no idea how to remove them from the project. Selecting one of them reveals that there are "2 users of the data" although I am not using it anywhere.  How can I get rid of these excess images? Deriving the joint probability density function from a given marginal density function and conditional density function We have a multivariate normal vector $\mathbf{X} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma})$, where $\mathbf{X} =  \left[ \begin{matrix} X_1 \\ X_2 \\ \dot\\\\ \dot\\\\ X_n \end{matrix} \right]$,    $\boldsymbol{\mu} =  \left[ \begin{matrix} \mu_1 \\ \mu_2 \\ \dot\\\\ \dot\\\\ \mu_n \end{matrix} \right]$, and  $\boldsymbol{\Sigma} =  \begin{bmatrix} \sigma_1^2 &amp; \sigma_1\sigma_2 &amp; \dots &amp; \sigma_1\sigma_n   \\ \sigma_2\sigma_1 &amp; \sigma_2^2 &amp; \dots &amp; \sigma_2\sigma_n  \\ \dot\\\\ \dot\\\\ \sigma_n\sigma_1 &amp; \sigma_n\sigma_2  &amp; \dots &amp; \sigma_n^2 \end{bmatrix} $ is the covariance matrix.  Y is a random scalar of the form $Y = \beta_0 + \boldsymbol{\beta^TX} + \epsilon$, where $\epsilon \sim \mathcal{N}(0, \sigma_\epsilon^2)$  How can we go about deriving the joint probability density function(pdf) of the random vector $(Y, \boldsymbol{X^T})$?  The marginal multivariate pdf of $\boldsymbol{X}$ is given by  $ pdf(\boldsymbol{x}) = \frac{1}{\sqrt{(2\pi})^n. \begin{vmatrix} \boldsymbol{\Sigma} \end{vmatrix}}.exp\left[ \frac{-1}{2}\boldsymbol{(x-\mu)}^T \boldsymbol{\Sigma^{-1}}\boldsymbol{(x-\mu)} \right]$  The conditional probability density function of $Y \,\mid \, \boldsymbol{X=x}$ is given by  $pdf(y\mid \boldsymbol{X=x}) = \frac{1}{2\pi\sigma_\epsilon}.exp\left[  \frac{-1}{2\sigma_\epsilon^2}(y - \beta_0 - \boldsymbol{\beta^Tx})^2  \right]   $  To compute the joint probability density function, we can use the fact that   $pdf(y, \boldsymbol{x})=  pdf(y\mid \boldsymbol{X=x}).pdf(\boldsymbol{x})$  I am unable to do the witty manipulation required in the algebra to arrive at the result the joint distribution will have a probability density function of a normal distribution. All questions previously asked seem to address the problem of deriving the conditional density function given the joint probability density function, for example,   Edit:  Multiplying the pdfs, we get $pdf(y, \boldsymbol{x}) = \frac{1}{\sqrt{(2\pi})^n. \begin{vmatrix} \boldsymbol{\Sigma} \end{vmatrix}}. \frac{1}{2\pi\sigma_\epsilon}.exp\left[ \frac{-1}{2}\boldsymbol{(x-\mu)}^T \boldsymbol{\Sigma^{-1}}\boldsymbol{(x-\mu)} + \frac{-1}{2\sigma_\epsilon^2}(y - \beta_0 - \boldsymbol{\beta^Tx})^2 \right]$   Like the comment below mentions, most manipulations dealing with normal pdfs involve completing squares; but since this specific algebraic expression contains $\boldsymbol{x}$ in both terms within the exp term, I'm unsure on how to go about completing the squares. Am I able to change my GPA once I submit a graduate school application? We consider $g : (t,u,v)\in \mathbb{R}^3 \mapsto (t^2,u^2,v^2,\sqrt{2}uv, \sqrt{2}tv,\sqrt{2}tu)\in\mathbb{R}^6$. I have to prove that $g(\mathbb{S}^2)$ is a submanifold of $\mathbb{R}^6$.  $dg_{(t,u,v)}=\begin{pmatrix}2t&amp;0&amp;0\\  0&amp;2u&amp;0\\  0&amp;0&amp;2v\\  0&amp;\sqrt{2}v&amp;\sqrt{2}u\\ \sqrt{2}v&amp;0&amp;\sqrt{2}t\\ \sqrt{2}u&amp;\sqrt{2}t&amp;0\\ \end{pmatrix} $  So it proves that $g$ is an immersion (the rank is $3$ clearly) for $(\mathbb{R}^3-\{(0,0,0)\})$.  Now how to prove that $\mathbb{S}^2$ is homeomorphic to $g(\mathbb{S}^2)$ ? I must prove that $g$ is injective  ?  Thanks in advance ! Is there a safe way to run a diff on two zip compressed files? Seems this would not be a deterministic thing, or is there a way to do this reliably?