How can create a regular expression for this URL?
Learning Regular Expressions
Impossible to hide navigation bars in Safari iOS 7 for iPhone/iPod touch Best way to migrate a huge SQL Server database with low downtime over network Problem definition  Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB.  Having little to no downtime for this would be ideal.  Workload  Those databases are used for a .NET website and are constantly getting updated.   Having it not available over the weekend would be acceptable though. The currently in use DB would remain the only one in use until the switch over to the new one.  That switch would ideally be made just by changing DNS entries to point to the new DB server while making sure the DB is not being updated.  Also, time taken by this operation does not really matter as long as the switch from one server to the other (downtime) is kept low.  Approaches considered   Backup and restore  This has been done in the past but involved a high downtime even though it was done through an internal network, so more efficiently than through Internet Log shipping  As far as I understand, this approach would minimize downtime by configuring a master/slave and transferring  an exact copy of the master DB to its slave being read only. As mentioned above, no access to the slave would be necessary and we just need a way to have a replica of the master DB without data corruption.   It also seems to be quite efficient in terms of resources utilization and wouldn't impact to much the master performance.   I might be wrong about this approach so feel free to correct me. Database mirroring  I'm not too aware of that approach but it seems like a valid option. No need to have real time sync and performance of the master is quite important so asynchronous would be the way to go if this approach were to be chosen. Other options?  That server runs directly on bare metal hardware so lower level solutions are unfortunately not an option. Maybe there is a better way to get this done?   Constraints  As described, those databases are quite big to the point they are hard to maintain but that's an other problem.  The versions of SQL Server will be the same (Microsoft SQL Server 2012 Enterprise 64-bit).  It will have to be transferred over network between two datacenters so most probably over Internet. Having disks sent from one site to the other for an initial sync is unfortunately not an option. Having some sort of security for the transfer would be ideal but we will do the best of this situation.  That should give a quite good overview of our needs for this task and hopefully some of you had to face that situation before. Suppose $G$ has odd order, show the function $f:G\rightarrow G$ defined by $f(x)=x^2$ is injective. This proposition is easily provable if we assume $G$ is Abelian, but I don't know how to start this without the assumption of being Abelian. Can I boil milk unattended (and still keep the pan clean)? I tried to use sudo cd name_of_dir but am getting the error message:   sudo: cd: command not found   Is there any other way to enter a directory owned by another user which has 700 permission? sudo apt update &amp;&amp; sudp apt upgrade -y now shows the error message E:The package linux-modules-5.4.0-56-generic needs to be reinstalled. But I can't find an archive for it.  and nothing proceeds. How can I fix this problem? Thanks. Show that both mixed partial derivatives exist at the origin but are not equal $$f(x,y) = \begin{cases} \displaystyle \frac{xy(x^2-y^2)}{x^2+y^2} &amp; \text{if } (x,y) \neq (0,0), \\ 0 &amp; \text{if } (x,y) = (0,0). \end{cases}$$ I tried finding both mixed partial derivatives but they ended up being the same for that function. I must be failing to take into account something dealing with the fact that it is piece-wise. I still need to show the mixed partial derivatives exist. How can I do all of this? I am constructing a thought experiment about a spinning object that is floating in intergalactic space.  I assume that this object is about the size of a planet so that it will have enough gravity so that a Foucault pendulum will work, although I'm not sure that this is necessary for the thought experiment.    I can easily determine that this object is spinning if I stand on the object and observe the galaxies around me rise and set.  Similarly, I can determine the axis of rotation.    For simplicity, I go to one of the poles of my object, and I set up my Foucault pendulum.  What will I see?  And why will I see it?  I assume that in intergalactic space, the gravity is very small (galaxies are very far away, and the mass of my object is very small compared to the mass of a galaxy) so that there will be little coupling between the gravitational field of my object and the gravitational field of the galaxies around me. How to detect if a mob has been hit in minecraft with command blocks? i am making a boss battle for my minecraft adventure map, and using a mob spawned with commands as the boss. When the mob gets hit, some command blocks will give the player a potion effect, but I can't figure out how to activate the command block when the mob gets hit. I am in the latest snapshot (16w03a). please help me (the person who answers my question will be given credit for it in my map) Question  I calculated the classical heat capacity of a diatomic gas as $C_V = (9/2)Nk_B$, however the accepted value is $C_V = (7/2)Nk_B$.  I assumed the classical Hamiltonian of two identical atoms bound together as $$ H = \dfrac{1}{2m}( |\bar{p}_2|^2 + |\bar{p}_2|^2)+ \dfrac{\alpha}{2} |\bar{q}_1-\bar{q}_2|^2. $$ I calculated the partition function of $N$ particles as $$ Z = \left( \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} e^{-\beta H} ~d^3q_1~d^3p_1~d^3q_2~d^3p_2 \right)^N \propto V^N T^{(9/2)N}. $$ I calcuated the heat capacity as $$ C_V = \dfrac{\partial }{\partial T} \left( k_B T^2 \dfrac{\partial \ln(Z)}{\partial T} \right) = \dfrac{9}{2}k_BN. $$  Why does the classical argument fail?  Classical Derivation  The partition function is \begin{align} Z &amp;=&amp; \left( \frac{1}{h^6} \int \mathrm{e}^{- \beta H(\bar{q}_1,\bar{q}_2,\bar{p}_1,\bar{p}_2)} ~d^{3}q_1 ~d^{3}q_2 ~d^{3}p_1   ~d^{3}p_2 \right)^N \\&amp;=&amp; \left( \frac{1}{h^6} \int \mathrm{e}^{- \beta ((|\bar{p}_1|^2+|\bar{p}_2|^2)/(2m)+\alpha |\bar{q}_1-\bar{q}_2|^2/2)} ~d^{3}q_1 ~d^{3}q_2 ~d^{3}p_1   ~d^{3}p_2 \right)^N \end{align} A useful gaussian integral \begin{align} \int_{-\infty}^{\infty} e^{-\gamma (x-x_0)^2}dx = \sqrt{\dfrac{\pi}{\gamma}} \end{align} The partition function can be evaluated using separated integrals \begin{align} \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta |\bar{p}_1|^2} ~d^{3}p_1 = \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta |\bar{p}_2|^2} ~d^{3}p_2 = \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \end{align} and \begin{align} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta \alpha |\bar{q}_1-\bar{q}_2|^2/2 } ~d^{3}q_1 ~d^{3}q_2 = \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 \iiint_{-\infty}^{\infty}  ~d^{3}q_1 = \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 V \end{align} The last set of integrals are improper integrals. One has to take the limit as the space approaches infinite containment. In that limit, integrating one set of variables $d^3q_2$ approaches the limit of a finite Gaussian term, while the other $d^3q_1$ approaches the diverging value of the total volume of the gas.  The partition function is \begin{align} Z &amp;=&amp; \left( h^{-6} \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 V \right)^N \\&amp;=&amp; \left( h^{-6} \left(k_B T \pi\right)^{9/2} \left( \dfrac{2}{\alpha} \right)^{3/2} V \right)^N \\&amp;=&amp; \left( h^{-6} \left(k_B \pi\right)^{9/2} \left( \dfrac{2}{\alpha} \right)^{3/2} \right)^N V^N T^{9N/2} \end{align} I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now, if I switched to master branch that same file is shown as modified.   For example:  git status in git-build branch:  # On branch git-build # Changes to be committed: #   (use "git reset HEAD &lt;file&gt;..." to unstage) # #       modified:   cvsup_current #   Switch to master branch  [root@redbull builder_scripts (git-build)]# git co master M       builder_scripts/cvsup_current Switched to branch "master"   git status in master branch  [root@redbull builder_scripts (master)]# git status # On branch master # Changes to be committed: #   (use "git reset HEAD &lt;file&gt;..." to unstage) # #       modified:   cvsup_current #   Why is that the file is shown as modified in master branch even though it was modified in git-build branch?   My understanding was that the branches are independent of each other and when I change from one branch to another the changes do not "spill over" from one branch to another. So I am obviously missing some thing here.   Anyone got a clue stick? What is the fastest car in Saints Row 4, and where can I find it? I found an Attrazione in Salander, which has traditionally been fastest in previous games, but I don't like sinking upgrades money into a car unless it's for keeps. What car is fastest in Saints Row IV (before and after upgrades), and how can I get it? Is there any way to get stats on the car in-game? How to ensure that string interpolated into `sed` substitution escapes all metachars Targeting only Firefox with CSS From where do the permanent magnets get energy from? I have a doubt about permanent magnets. If a magnet is permanent it can attract some materials permanently.  Attracting something involves energy. If a permanent magnet can do this forever, from where does this energy come from? How can it not run out of energy? Doesn't it contradict with the laws of energy? The Lie algebra of $SL_n(\mathbb C)$ are the matrices where the trace is $0$. But what is the Lie algebra of $SL_n(\mathbb H)$ where $\mathbb H$ is the quaternions? Draw power from a portable mobile charger to power circuits I usually power my beginner prototype circuits using mb102 power supply board, but it needs an external elimeter to draw power and then regulate it.  I was looking for a portable solution for my 5 volt and 3.3 volt circuit needs and came up with using a portable battery charger for mobile phones.  I tried powering up a simple transistor and LED circuit with it but it wouldn't power-up.   I feel that there is some load sensing circuit in the portable charger which doesn't detect these low power circuits.  I also tried connecting different resistors to the charger, the charger outputs 5 Volts for a few seconds and then again shuts down and doesn't stay ON continuously.  It would be really comfortable to use a portable charger since it could be charged using a phone charger and would be very handy.  What can I do to make the charger output power on low loads? New Chain causing skipping on cassette - will this work itself out or is it unsafe? I just installed a new chain on my 2002 Trek 2200 Road Bike.  The old chain was a Shimano 9 speed that I installed 18 months and about 5000 miles ago.  It had stretched modestly and was full of winter cruft/grime.  The new chain is a SRAM 9 speed, my first time using the gold snap ring system.  I followed instructions and made sure I have the same link count as the chain that came off the bike.  The cassette was new with the old chain, so it has about 5000 miles on it and doesn't appear to have significant wear.  After installation and a clean/wipe/lube/wipe, I took it for a 15 mile easy ride at about 15-16 mph.  It shifts perfectly and I didn't have to make any adjustments to either derailleur.  Three times, however, when putting it under stain (once on a modest hill climb, once starting from a stop sign in a fairly big gear, and once on an acceleration coming out of a sharp turn) it skipped several teeth and caused my foot to slam down hard.  On the hill, it actually hurt as I had my weight off the saddle (not really standing) and I came down hard on the inside of my thigh.  I think all three were on the right side (power train side) pedal stroke, and I don't think they were all in the same gear.  I'm pretty sure it was the rear cassette that skipped, not the front chainring, but it did happen really fast each time.  I will also say that it's not like these were the only three times I put substantial pressure on the pedals in the ride - I wasn't going hard, but I wasn't being tentative or anything.  Also, in case it's relevant, it was cold, about 40 degrees F or about 4 degrees Centigrade.    My question:  Is this going to get me hurt, or will the new chain 'settle in' over a few rides?  I searched here and pretty much got confirmation of what I had previously thought, that you always get a new chain when you get a new cassette, but you should be able to get a few chains out of each cassette.  Thanks! Formatting section titles Forgive the stupid simplicity of this question, and please feel free to refer me to an older answer. I'm not quite familiar enough with LaTeX terminology to have found it.  All I want to do is set a different default format for my section titles. Instead of just being bolded and slightly larger than the main text, I'd like them to be of normal weight, the same size as the main text, and all caps.   I'm using the article class. Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?  Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages.  In particular:   Where do you put the source? Where do you put application startup scripts? Where do you put the IDE project cruft? Where do you put the unit/acceptance tests? Where do you put non-Python data such as config files? Where do you put non-Python sources such as C++ for pyd/so binary extension modules?