So, this a question from a Phd qualifying examination. Given the following Lagrangan $$L=\frac{1}{2}\dot{q}\text{sin}^2q,$$ what is the Hamiltonian for this system? So, finding the canonical momentum $p$ and then using $H=p\dot{q} -L$, I find that it is identically zero. Now, the answer 'Zero' was a choice in the choices of answers given but the correct answer is that the Hamiltonian is undefined. I'm not sure why this should be the answer, though this is a pretty  weird dynamical system. The Euler Lagrange equations just give an identity and the Hamiltonian equations also seem rather off. The Hamiltonian equations would are $$\dot{p}=\dot{q}=0. $$ I'm hoping someone shed some light on this, it seems that any random Lagrangian doesn't constitute a dynamical system, so what I should I be looking for?
$$L~=~ \frac{1}{2} \dot{q}  \sin^2{q} $$  Is it zero or not defined?
ColA                  Col B              ColC Project A            A.pdf               A.pdf Project B                                No Link   I have a list of project records. One column (e.g., B) may have a reference to a pdf file. If I create a formula   =if(isblank(B2),"No Link",hyperlink(folderURL + B2),B2)   What I want is to place a hyperlink on only those rows where column B contains a pdf reference, and insert text "No Link". I get the proper text values, but in all rows have the hyperlnk default appearance and behavior -- Excel seems to be creating "phantom links" out of the "No Link" cells.     Clicking on the "No Link" value in Col C activates an attempt to open the file listed in Col B, which returns a No file found error. Motivation for Napier's Logarithms In the wikipedia article on logarithms, I am clueless about the approach and motivation for the following computations done by Napier (and the mysterious appearance of Euler's number) in this . Please help me understand:       By repeated subtractions Napier   calculated $10^7(1 − 10^{−7})^L$ for L   ranging from 1 to 100. The result for   $L=100$ is approximately $0.99999 = 1  − 10^{-5}$. Napier then calculated the   products of these numbers with $10^7(1  − 10^{−5})^L$ for L from 1 to 50, and   did similarly with $0.9995 ≈ (1 −  10^{−5})^{20}$ and $0.99 ≈ 0.995^{20}$.   These computations, which occupied 20   years, allowed him to give, for any   number ''N'' from 5 to 10 million, the   number ''L'' that solves the equation      $$N=10^7 {(1-10^{-7})}^L$$      In modern notation, the relation to   natural logarithms is:      $$L = \log_{(1-10^{-7})} \!\left(  \frac{N}{10^7} \right) \approx 10^7  \log_{ \frac{1}{e}} \!\left(  \frac{N}{10^7} \right) = -10^7 \log_e  \!\left( \frac{N}{10^7} \right)$$      where the very close approximation   corresponds to the observation that      $${(1-10^{-7})}^{10^7} \approx  \frac{1}{e}. $$   I understand the computations, but I don't know what's going on. Reference for general-topology Trigger to assign open tasks back to specific user when account owner is changed We have a workflow that creates tasks and assigns them to a specific user when an opportunity is closed. It's salesforce standard behavior that when the account owner is changed, the open tasks are also reassigned to the new account owner. I'm trying to write a trigger that:   checks if the account owner and/or task owner is changed FROM 00590000000a3xU if yes, reassign the tasks back to 00590000000a3xU only open tasks and tasks where Orb Team Task (checkbox) is true will be reassigned   I was getting all sorts of errors from the old code even after making the changes sfdcfox's pointed out. So I decided to change my approach. Here's the new and working code:  trigger AssignTaskBackToWarehouse on Account (after update){ List&lt;Task&gt;TasksToUpdate = new List&lt;Task&gt;(); Map&lt;Id,Account&gt;amap = new Map&lt;Id,Account&gt;([SELECT Id, OwnerId,(SELECT Id, Status, Warehouse_Task__c     FROM tasks     WHERE Status != 'Completed' AND     Warehouse_Task__c = true)     FROM Account     WHERE Id =: Trigger.newmap.keyset()]); for(Account a : Trigger.new){     for(Task t : amap.get(a.Id).tasks){         t.OwnerId = '00590000000XXXX';         TasksToUpdate.add(t);     }     } if(TasksToUpdate.size() &gt; 0){     update TasksToUpdate; } } How do I overload the square-bracket operator in C#? DataGridView, for example, lets you do this:  DataGridView dgv = ...; DataGridViewCell cell = dgv[1,5];   but for the life of me I can't find the documentation on the index/square-bracket operator.  What do they call it?  Where is it implemented?  Can it throw?  How can I do the same thing in my own classes?  ETA: Thanks for all the quick answers.  Briefly: the relevant documentation is under the "Item" property; the way to overload is by declaring a property like public object this[int x, int y]{ get{...}; set{...} }; the indexer for DataGridView does not throw, at least according to the documentation.  It doesn't mention what happens if you supply invalid coordinates.  ETA Again: OK, even though the documentation makes no mention of it (naughty Microsoft!), it turns out that the indexer for DataGridView will in fact throw an ArgumentOutOfRangeException if you supply it with invalid coordinates.  Fair warning. Possible to turn on Airplane mode with WiFi on only? I know the definition of Airplane mode is all communications and radio signals are blocked. But is it possible to turn off the "calling/receiving" part of the phone so your phone is not connecting to a cell tower and only allow Wifi? I've looked into a couple of apps in Google Play but they're either not working or out of date with newer versions of Android.   I know there is strong opinions on both sides of the issue but I'm worried about radiation from my phone since i use it a lot in bed and I hold the phone close to my head and face. At night I'm not worried about receiving calls, so I just want to turn off the phone part and  use WiFi. Is there a way? Or am i just crazy and paranoid? "Was" or "were" in subjunctive clauses I'm not a native english speaker, so even though I'm decently proficient at it, I don't really "know the rules" sometimes, and this is one that's been confusing me for a long time.  Which one is correct in each sentence?     If the movement [was/were] to continue uncorrected, the tower would   one day topple.      If I [was/were] rich, I would buy a yacht.   NOTE: I care not only about the case of "I", but also "she", "them", "it", etc, as in the example of the tower. Would it be any different if instead of the tower, it'd be me who'd topple if uncorrected?  I'm pretty sure it's "were" in both cases. That's what they taught me, I think. I started to doubt when I saw a lot of "was", but it sounded like the typical intentional mistake used "stylistically". ("If I was a rich girl...")  Then I saw it some more and thought it came down to an American/British English difference (I was taught British, in theory, and most of what I read is American).    But that tower sentence came straight from "The Guardian"...  When do you use was and when do you use were? I need some help with the exercise I was assigned in math class. We were given a 3x3 square made of unit squares, and we wanted to paint all the squares. We had 3 sets of paint, red, blue, and green. Each paint was distinct from each other, but two unit squares with the same color were the same. Additionally, there's only enough paint of each color to color 3 unit squares, and all the paint has to be used. The goal of the exercise was to find the total amount of distinct possible ways such that no two unit squares that share an edge (that is to say they are next to each other vertically or horizontally, having same color across a diagonal is fine). I've started by trying to take a look at each possible arrangement of the bottom 3 unit squares, but I can't seem to find a pattern between it. Is there a better way than continuing by brute force? Any ideas on how I should proceed from here? Prove $|\arctan x - \arctan y|\leq |x-y|$ How does bash interpret the equal operator with no surrounding spaces in a conditional? The following script does not behave as I would have expected.  Adding spaces around the '=' in the conditional made it perform how I wanted, but it got me thinking, what is it actually doing inside the conditional?  #!/bin/bash S1='foo' S2='bar' if [ $S1=$S2 ]; then     echo "S1('$S1') is equal to S2('$S2') fi echo $S1 echo $S2   The output is:  S1('foo') is equal to S2('bar') foo bar   The contents of S1 and S2 don't change from what they are assigned, so the = doesn't perform an assignment. How are long-term capital gains taxed if the gain pushes income into a new tax bracket? How to make unit selection circles merge? How to check if windows has automatic updates waiting from the command line? If a Windows server (2k3/2k8) is set to "download but not install" updates, is there a way to check from the command line.. perhaps a log file or something I can check with powershell, to see if there are any updates actually waiting to be installed? I'm trying to prevent having to manually log on to each server to check, even though they want the "trigger" pulled manually. We have an automation system in place I can use (CA Autosys) - just not sure what to have it look for. How to reduce title bar height? How do I blend a black-background fire image in Photoshop? This fire image:    As you can see, it has a black background, which I can't delete (because it would probably destroy the smooth-looking fire effect). I want to place some fire in a photo.  However, I remember it was possible to take such images and do something in photoshop so that when you place them over a photo, the black is gone and the fire is perfectly blended there. But I can't remember what feature or option was it. Any ideas?  Photoshop CS5. Gaussian-like integral : $\int_0^{\infty} e^{-x^2} \cos( a x) \ \mathrm{d}x$ Is it possible to delete multiple elements from a list at the same time? If I want to delete elements at index 0 and 2, and try something like del somelist[0], followed by del somelist[2], the second statement will actually delete somelist[3].  I suppose I could always delete the higher numbered elements first but I'm hoping there is a better way. How unusual is getting a Masters degree in a slightly different field than Bachelors? Would it be out of the ordinary to get a Bachelors in Mechanical Engineering and then go for a Masters in something like Civil or Structural Engineering?  I don't know a lot about how transitioning to a Masters program works.. Do people usually continue on in the same field, or is branching out common? When viewing a question, when I hover over the star icon (under the voting module) the tooltip says I've made it a favorite when I haven't yet. How do I remove the Unity launcher? How can we remove the launcher that come with Unity on this new Ubuntu version ?