Regex validation for asp textbox control
How to validate phone numbers using regex
I want to upgrade the hard drive in my 2012 Macbook Pro to an SSD. I have the parts, but had a question about how to clone the contents of my current drive so I can install it onto the SSD.  I've seen tutorials where people suggest connecting the new SSD to the Macbook prior to installation and using a Carbon Copy Cloner to clone the drive, and then installing the SSD drive.  My question is, can I do a Time Machine backup of my current hard drive on an external hard drive, install the SSD, and then use the Time Machine backup from the external to transfer it onto the newly installed SSD? Is this the same as using the clone program above? Why is it that Android still can't be installed as regular OS? Congruent Modulo $n$: definition In an Introduction to Abstract Algebra by Thomas Whitelaw, he gives examples of the congruence mod operation, such as $13 \equiv5 \pmod4$,  and $9 \equiv -1 \pmod 5$. But when I first learned about the modulo operation my junior year, I would have told you that $13 \equiv 1 \pmod 4$, and that $9 \equiv 4 \pmod 5$.     Is this just a difference in the definition of modulo? Or is this pretty typical (to not take it to the largest factor, or one over)? File Upload using Selenium WebDriver and Java Robot Class Website giving pronunciations of English words recorded in different dialects? I'm aware that there are certain websites around that provide recorded examples of English words pronounced in different accents/dialects.  Could anybody list some of them? How should I submit bug reports and feature requests? Inspired by  I became curious about what is the current preferred mechanism for submitting bug reports and feature requests to Apple. I'm aware that they have the internal RDAR bug tracking system, and that there is an  project to crowdsource the tracking of issues, but I'm at a loss as to the preferred channel to submit something.    Is there a public-facing portal for submitting issues? Lines too long due to text inside custom command not being hyphenated I'm having some problems with lines that turn out to be too long. There are correct hyphenation rules for the word but they aren't being applied.  Let me first give the sentence that is too long:  An isomorphism that maps a graph to itself is called an \concept{automorphism}.   The command concept is defined as follows  \newcommand{\concept}[1]{\index{#1}\marginpar{\raggedright\textbf{#1}}\textbf{#1}}   The problem seems to be that words inside \concept aren't being hyphenated. How can I fix this? If I type   An isomorphism that maps a graph to itself is called an \textbf{automorphism}.   then the word is hyphenated perfectly. So I would now like to have the command \concept behave the same way, i.e. allow concepts to be hyphenated according to the standard rules. How can I prevent my Wi-Fi connection from glitching? Terence Tao, Analysis I, Ex. 5.5.2: Entry point needed Terence Tao, Analysis I, 3e, Exercise 5.5.2:     Let $E$ be a non-empty subset of $\mathbb{R}$, let $n \ge 1$ be an   integer, and let $L &lt; K$ be integers. Suppose that $K/n$ is an upper   bound for $E$, but that $L/n$ is not an upper bound for $E$. Without   using Theorem 5.5.9, show that there exists an integer $L &lt; m \le K$   such that $m/n$ is an upper bound for $E$, but that $(m-1)/n$ is not   an upper bound for $E$. (Hint: prove by contradiction, and use   induction. It may also help to draw a picture of the situation.)    does not do the trick for me, since I'm looking for the proof by contradiction, equipped only with the set of propositions and theorems covered so far.  What I'm actually looking for is an entry point to the proof, since I find it quite hard to negate the assumption.  My attempt is to induct over $n$. Assume I have been able to prove the statement for $n = 1$, is the following a valid negation of the assumption?  For all integers in the range $(L, K]$, at least one of the following statements holds:   $(m-1)/(n+1)$ is not an upper bound and $m/(n+1)$ is not an upper bound. $(m-1)/(n+1)$ is an upper bound and $m/(n+1)$ is not an upper bound. $(m-1)/(n+1)$ is an upper bound and $m/(n+1)$ is an upper bound.   If I were able to prove that there is an integer in the given range such that none of the above holds, am I done?       Theorem 5.5.9 (Existence of least upper bound). Let $E$ be a non-empty subset of $\mathbb{R}$. If $E$ has an upper bound, (i.e.,   $E$ has some upper bound $M$), then it must have exactly one least   upper bound.     I went through another loop considering  of Steve Kass, but I ended up wondering why the proof needs induction at all:  Assume for all integers $m$ where $L &lt; m \le K$ we have that $m/n$ and $(m-1)/n$ are upper bounds of $E$. Then $(m-1)/n = L/n$ is also an upper bound. But $L/n$ is no upper bound, by assumption. Assume $m/n$ and $(m-1)/n$ are no upper bounds. Then $m/n = K/n$ is also no upper bound. But $K/n$ is an upper bound, by assumption.   Hence, there is an integer in the range $(L, K]$ s.t. $m/n$ is an upper bound for $E$, and $(m-1)/n$ is not. How do I get attention for one of my own questions without a good answer? I have several hundred Illustrator files that are formatted similarly, and for legal reasons I need to replace a font in all of them. Even with the 'Find font' tool, that's a hell of a lot of fonts to replace by hand.  Is there some way of automating it? For example, using Bridge? Illustrator (CS5) doesn't offer many options in Bridge, compared to the automation options offered by Photoshop. I also don't see any option for running actions on multiple Illustrator files.  Also, creating a repeatable action for replacing the font doesn't seem to work: instead of repeating my action, it brings up the dialog box an waits for me to tell it to replace them.  As a programmer I'm prepared to edit the files directly if it can be done without breaking them.    Update: The 'Batch...' menu item from Illustrator's actions panel menu allows the same action to be performed on a folder of files. It doesn't fix the Find Fonts action waiting for input though. Toggling the dialog off makes the action do nothing at all. How do I use superposition to solve a circuit? Yes, this is a pedagogical question. While answering another recent question, I wanted to refer the OP to concise instructions for using superposition to solve circuits. I found that all the easily found resources online were somewhat deficient. Typically they were unclear about what kinds of circuits superposition applies to, or about the actual method to apply the superposition theorem to a circuit problem. So,   What kinds of circuits can be solved by superposition?  How are different kinds of sources treated when solving by superposition?  What are the steps to solve a circuit using the superposition theorem? MySQL Access denied for user 'root'@'localhost' What is Change Detection and performing such analysis with open source tools? I've noticed something while trying to prove the properties of parallel lines, and the properties that a triangle has 180 degrees. To prove the properties of parallel lines, such as alternate angles, you need to use the property that a triangle has 180 degrees. To prove a triangle has 180 degrees however, you need to use the properties of parallel lines. This really bothers me because of how circular it is. They are both reliant on each other to be true, and do not logically show, without being reliant on each other, why triangles have 180 degrees, and why parallel line properties are true.   So what I hoping for here is a way to prove parallel line properties without using the fact that a triangle has 180 degrees, or a way to prove triangles have 180 degrees without using parallel line properties. This way, things will be logical to me, and make sense.   Thanks in advance. How to decide whether to replace or repair? Creating new layers using ArcPy to define Definition Query for each field value? I am trying to set multiple definition queries for one layer based on one field using python.  ie.  I have a City layer with a field that holds the city name.  I want a copy of the layer in an MXD with the Definition query set for each value in the City field.  So essentially, I have one source layer, with a copy of the layer as many times as there are values in the City field.  The query would look like this: CITY = 'Atlanta' I have posted a proof below, and would appreciate it if someone could review it for accuracy. Thanks!   Problem:   Let n $\in$ $\mathbb{Z}$ with $n$ $\ge$ 3. Prove the following:   (a) Z(D$_{2n}$) = 1 if $n$ is odd.   (b) Z(D$_{2n}$) = {1, r$^k$} if $n$ = $2k$.   Note that $r$ and $s$ generate D$_{2n}$ with the group presentation { $r$,$s$ | $r$$^n$ = $s$$^2$ = 1, $rs$ = $sr$$^{-1}$ }   Proof:  part (a)   Let $n$ $\ge$ 3 where $n$ $\in$ $\mathbb{Z}$ and $n$ is odd.   For any x $\in$ Z(D$_{2n}$), x must commute with both $s$ and $r$, since both are in $D_{2n}$. Note that if $x$ commutes with both $s$ an $r$, then $x$ commutes with any element of $D_{2n}$ since $r$ and $s$ generate D$_{2n}$.    Then for any x$\in$ Z(D$_{2n}$), we have $xr$ = $rx$, where x is of the form $x$ = s$^j$r$^w$ (any such element can be arranged into this form via the relation $rs$ = $sr$$^{-1}$ and the fact that $r$ and $s$ generate D$_{2n}$). Note that since r and s have finite order, the exponents are modulo n and modulo 2 for $r$ and $s$ respectively.   Then we have  s$^j$r$^w$$r$ = $r$s$^j$r$^w$.   Which implies s$^j$r$^{w+1}$ = s$^j$r$^{w +- 1}$  In the case where the power of r on the RHS is $w$ - 1, it is clear we cannot have equality unless |r| = 1, which it is not. Note that if $j$ is even then we have only the $w$ + 1 case. Hence $x$ may be of the form $1$$r$$^w$ = $r$$^w$.   Also we have that x must commute with $s$, hence $s$$x$ = $x$$s$.   Then $s$$r$$^w$ = $r$$^w$$s$.  Which implies $s$$r$$^w$ = $s$$r$$^{-w}$.   Applying s$^{-1}$ to both sides we arrive at the task of finding when r$^w$ = r$^{-w}$ i.e when $w$ = $-w$. But since r has finite order we have:   $$ \bar{w} = (n-1)*w $$   where $\bar{w}$ is the residue class of w modulo n. Hence for some a $\in$ $\mathbb{Z}$$_+$   $$ w + an = wn - w $$  $$ 2w = wn - an $$ $$ 2w = n(w-a) $$   Now since 0 $\lt$ w $\le$ n we have that the LHS is greater than 0. Also since n $\ge$ w then (w-a) $\le$ 2, since otherwise the RHS would be greater than the LHS. So since n is odd we must have that (w-a) is even and hence (w-a) = 2, implying that 2w = 2n and hence n = w.   Hence x = $r$$^w$ = $r$$^n$ = 1. So Z(D$_{2n}$) = 1.   part (b)   From the argument above any x $\in$ Z(D$_{2n}$) must be of the form $s$$^j$$r$$^w$ for j even and j $\in$ $\mathbb{Z}$. Then x is of the form $r$$^w$ for $0$ $\lt$ w $\le$ $n$. Since $n$ is even we have the equation below is satisfied when $2w$ = $n$ or $w$ = $n$, since (w-a) $\le$ 2 but also (w-a) $\ge$ 0 for (w-a) $\in$ $\mathbb{Z}$$_+$.   $$ 2w = n(w - a) $$   Hence $r$$^w$ $\in$ Z(D$_{2n}$) when $2w$ = $n$, as desired. Why does QgsSpatialIndex.nearestNeighbor(point, 1) sometimes return 2 lines? I'm trying to get the closest line to a point using PyQGIS in a plugin. The active code file is this:   When I request the closest line (only 1)  nearestIds = self.spIndex.nearestNeighbor(self.feat2.geometry().centroid().asPoint(),1)   I sometimes get a list with two lines and the first one is not the closest but as far as I can see the second one is. Why is this?   Does QgsSpatialIndex use only boundingboxes for lines? How do I get the real closest line always, not only most of the time? If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.