Divider lines of matrix
How to create vertical and horizontal dotted lines in a matrix?
We have the matrix: $$\left[\begin{array}{rrr} 0.8&amp;0&amp;0\\ 0&amp;1.2&amp;0\\ 0&amp;0&amp;1\\\end{array}\right]$$ Finding the eigenvalues and eigenvectors are easy. But finding ${\bf M}^n$ when $n \rightarrow \infty$ is the hard part. Any suggestions? Modified Hamilton's Principle overconstraining a system by imposing too many boundary conditions In Hamiltonian Mechanics, a version of Hamilton's principle is shown to evolve a system according to the same equations of motion as the Lagrangian, and therefore Newtonian formalism. In particular, letting $\delta$ indicate a variation of the path through phase space, $$ \delta \int_{t_1}^{t_2} \big(p_i \dot{q}_i - H(p_i,q_i,t)\big)dt = 0 $$ is shown to generate the same motion equations as those found by the Legendre transform of the Lagrangian equations of motion. Essentially, when we calculate the Euler-Lagrange equations for the above integrand, we find $$ \dot{p}_i + \frac{\partial H}{\partial q_i} = 0\text{, } \dot{q}_i - \frac{\partial H}{\partial p_i} = 0. $$ Now, since these are both first-order equations of motion, we require $2n$ boundary conditions to obtain a solution, where $n$ is the number of particles. This is perfectly consistent with the Lagrangian formalism which had $2n$ boundary conditions due to its $n$ distinct second-order motion equations.   An important thing to note is that since $p_i\dot{q}_i - H(p_i,q_i,t)$ contains no $\dot{p}_i$ dependence, the variation in $p_i(t)$ need not be zero at the endpoints of the path. This is not the case with $q_i(t)$ because the $\dot{q}_i$ dependance results in the appearance of boundary terms that must be set to zero in order to obtain the motion equations.  Now, as far as the boundary conditions are concerned, this makes sense. For the path to be uniquely specified given Newtonian mechanics, we require $2n$ boundary conditions. These can either be the usual Newtonian choice of initial positions and velocities/momenta, or they can be the initial and final positions. Both are perfectly acceptable mathematically speaking. If we were required, in the modified Hamilton's principle variation, to enforce that the variations in the momenta also be zero at the initial and final times, this would mean $2n$ additional boundary conditions, which would generally over constrain a Newtonian system.   However, my confusion is this: when textbooks (Goldstein in particular) consider generating functions, they require that the integrand be invariant to the addition of a total time derivative of a function $F(q_i,p_i,t)$ of the phase space coordinates. However, adding such a function will in general add some $\dot{p}_i$ dependence to the integrand, which will then add boundary terms to the equations of motion unless we require that the $p_i(t)$ variations be zero at the boundaries. This is fine as far as it goes. We can always define the variation however we like. The point is just that it spits out the right motion equations at the end of the day. But my confusion lies in how this doesn't generally over constrain the system. If we specify all the positions and momenta at both the initial and the final times, might not the required path to connect those points in phase space be non-Newtonian? Does this only matter if you're actually trying to use the stationary action principle to find the paths, rather than just using it to find the motion equations? I've looked at the demo of Beeline reader and would like to test it out on a physical version of my books, which are done in LaTeX. I'm wondering if it would even be possible.   Beeline reader takes online test a puts a slight gradient on the letters for a single line of text. On the next line it reverses the direction of the gradient. The idea being that it helps tracking text and improves speed of reading.  Any hints or suggestions as to how to do this in LaTeX?  What follows is an example taken from Are there any guidelines for converting cooking recipes from Regular Ovens to Convection? I was looking to buy a Convection Oven and wanted to know if there are any general differences in baking methods between the two. As a part of self study, I am trying to prove the following statement:  Suppose $X$ and $Y$ are topological spaces and $f: X \rightarrow Y$ is a map. Then $f$ is continuous if and only if $f(\overline{A})\subseteq \overline{f(A)}$, where $\overline{A}$ denotes the closure of an arbitrary set $A$.   Assuming $f$ is continuous, the result is almost immediate. Perhaps I am missing something obvious, but I have not been able to make progress on the other direction. Could anyone give me a hint which might illuminate the problem for me? I have been trying to show these two inequalities hold for all positive integers n, but I don't know how to proceed at all... I have tried playing around with them but I didn't find anything helpful. I have also tried induction but I couldn't make it work. Is it possible to create a counter just with wiring? With the new logic gates in the 1.3.1 update, is it possible to create some wiring circuit that counts how many times a trigger was activated? In other words, is it possible to make a circuit that outputs a trigger every two input triggers?  I've done some experimenting but the nature of wires and there being no intrinsic on/off state in Terraria makes it pretty counter-intuitive compared to real world logic circuits. Operator norm. Alternative definition How can the speed of sound increase with an increase in temperature? Programmatical Setting of 'Store Relative Pathways' for multiple MXDs ArcGIS 10.1 I am looking to move large number of mxds to a different location on the same drive. Many mxds haven't got 'Store relative pathways' option checked therefore this operation will result in broken links to data. I've only started using ArcGIS 10.1 and it is now possible to programmatically update relative pathways for all mxds by using arcPy and setting relativePaths to be "True". I had a go at writing Python script which (in theory) loops through a top folder and searches for all mxds and then updates "Store relative pathways" setting to be on. When I run this script in PyScripter, it fails to complete, I get the following error:  "exceptions.NameError: name 'mxd' is not defined  Can anyone help ?!? Thanks in advance, Magda      import arcpy, os  folderPath = r"C:\My Folder Path\...\...\..."  for filename in os.listdir(folderPath):     fullpath = os.path.join(folderPath, filename)     if os.path.isfile(fullpath):         basename, extension = os.path.splitext(fullpath)         if extension.lower() == ".mxd":             mxd = arcpy.mapping.MapDocument(fullpath)             mxd.relativePaths = 'True'         mxd.save() del mxd I've read  and am interested in this line:     You should never use normal sudo to start graphical applications as Root.   Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user. I am quite proficient with the keyboard and try to only use the mouse when necessary. Given that context I was very familiar with the shortcut keys in MS Outlook 2003 and never needed to use the mouse to use that product. Now my company has recently upgraded to MS Outlook 2010 and I am finding it impossible to operate it without having to use the mouse. In particular replying to meeting requests with the old shortcut keys no longer seems possible.   I have held down the ALT key and sometimes it shows some shortcuts on the ribbon but this seems to be limited to ALT+H which tends to alternate between designating "Accept" and "Tentative" without any keys for the other options. Also as this appears to switch between "Accept" and "Tentative" one can't even use this consistently without first having to check what it means for each particular instance.  Any help with this would be greatly appreciated! Explicit vs implicit SQL joins Is there any efficiency difference in an explicit vs implicit inner join? For example:  SELECT * FROM table a INNER JOIN table b ON a.id = b.id;   vs.  SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id; How can momentum but not energy be conserved in an inelastic collision? In inelastic collisions, kinetic energy changes, so the velocities of the objects also change.  So how is momentum conserved in inelastic collisions? If I have a legendary creature out, and I make a copy of it (such as by enchanting it with  or making a ), do I get enters-the-battlefield effects from the creature before I have to sacrifice it to the legend rule? App keeps crashing & rendering error since update to 1.0.68 I can reproduce that every time now, I go to a site, open an article, then to the next site, open another article. The Feed page pops up for a second, the article page lays over this with some some transparent areas (see picture). The same app-version is ok on a Smartphone with Android 4.4.2. I also sent in some bug reports.    Edit  1.0.71 isn't the solution yet. I go to Meta SE, then to an article. When I want back to Meta SE again, it crashes. Much earlier than before. I already sent in a bug report for this.  Another Edit  I can describe it better now. From the questions-page of a site I go to a post. When I use the back button, everything is ok, I can go to the next site. When I try to go to the next site directly from the post, it crashes. This only happens on the Nexus 10 with Android 5.1.1, App version 1.0.71. Hope this helps.  Edit3  This is fixed in 1.0.73 now. Thanks again. What is different about the Mac ISO image? This has just dawned on me that if you're writing an operating system then what are you writing it on? I ask this as I am reading a microprocessor fundamentals book from 1980 and this question popped in to my head:   How was the first microprocessor chip programmed?  The answer may be obvious but its bugging me. (Re?)Install Ubuntu on a Dell laptop that had Ubuntu preinstalled How can I remove a key from a Python dictionary?