Time-evolution operator written through a commutator
Time ordering operator if commutator is $c$-number function
Determining true mean from noisy observations dpkg: error: dpkg status database is locked by another process How do I automate a key press in AppleScript? I am using Ubuntu 16.04, with Gnome 3.18. Using extensions I have gotten rid of the dash panel and only use the Applications Menu in the upper left-hand corner of the screen. (I don't have Unity.) What I can't figure out is how do you add a new program, move software around to different categories, and create new categories?  Also, any keyboard shortcut to access the Applications Menu? Why does my shell script choke on whitespace or other special characters? Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it? Uses of the definite article (the) in generic noun phrases Proof that $n\Bbb Z \leq \Bbb Z$ and are the only subgroups of $\Bbb Z$ My challenge is      Prove that if $n = 0,1,2,\ldots$ and $n\Bbb Z = \lbrace nk: k \in \Bbb Z \rbrace$, show that $n\Bbb Z$ is a subgroup of $\Bbb Z$ and are the only subgroups.   I handled the first point by saying that  i) Identity is 0, and $0\in n\Bbb Z$ and $0 \in \Bbb Z$  ii) For any $a,b \in n\Bbb Z$ $a+b = na_2 + nb_2 = n(a_2+b_2) \in n \Bbb Z$  iii) For any $na \in n\Bbb Z$, its inverse $n(-a) \in n\Bbb Z$.  For the second point, I said that all of the subgroups should be infinite, because for any finite group the largest element $a+a \notin H$, where $H$ is the potential subgroup, which is a contradiction. So $H$ must be of infinite order. For any $a \in H, -a$ should also be in $H$. The difference between any $a,b \in H$ should also be in $H$, i.e. $(a-b) \in H$. This leaves only the whole group or any group of the form $n\Bbb Z$.  Is my proof complete? In a couple weeks, I will have a long layover in Cairo on a trip from Mumbai to Toronto. I get to Cairo on Sunday at noon and leave for Toronto on Monday at about 1 AM.  I am travelling on EgyptAir business class. While browsing for people who have experiences with a similar itinerary, some people seemed to have said they they were put up ina  hotel by the airline. However, I did not see anything about this when I booked my ticket.   allows me to enter my status (i.e. citizenship etc.) which results in a .  It doesn't appear like I need a transit visa- however it specifies that:     Leaving the airport is permitted for passengers with transit time   between 6 and 12 hours   My transit time 13.5 hours.  Now for my questions:   Is it an issue that my transit time is longer than 12 hours? Can I still leave the airport? What are my options with regards to airport hotels, etc.? Any other recommendations about how I could best utilize my time while in Cairo? Let a,b,c,d be real or complex numbers with absolute value less than $1$. Is the following true:  $$|ab-cd| \leq |a-c| +|b-d|?$$ The Safari Back Button Problem I do some minor programming and web work for a local community college. Work that includes maintaining a very large and soul destroying website that consists of a hodge podge of VBScript, javascript, Dreamweaver generated cruft and a collection of add-ons that various conmen have convinced them to buy over the years.   A few days ago I got a call "The website is locking up for people using Safari!" Okay, step one download Safari(v3.1.2), step two surf to the site. Everything appears to work fine.  Long story short I finally isolated the problem and it relates to Safari's back button. The website uses a fancy-pants javascript menu that works in every browser I've tried including Safari, the first time around. But in Safari if you follow a link off the page and then hit the back button the menu no longer works.  I made a pared down webpage to illustrate the principle.  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt; &lt;html&gt; &lt;head&gt;&lt;title&gt;Safari Back Button Test&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt; &lt;/head&gt; &lt;body onload="alert('Hello');"&gt; &lt;a href="http://www.codinghorror.com"&gt;Coding Horror&lt;/a&gt; &lt;/body&gt; &lt;/html&gt;   Load the page and you see the alert box. Then follow the link off the page and hit the back button. In IE and Firefox you see the alert box again, in Safari you do not.  After a vigorous googling I've discovered others with similar problems but no really satisfactory answers. So my question is how can I make my pages work the same way in Safari after the user hits the back button as they do in other browsers?  If this is a stupid question please be gentle, javascript is somewhat new to me. I'm trying to do a number checker in imessage. We all know that there is no such api, so I'm trying to use the tools at hand. The main took with past issues on this site on this topic.  I made a loop that inserts a number into a string, and by the color of the number (blue - registered, red - missing), using the standard utility Digital Colors Meter determines the color of the number. Then, depending on the color, it either adds a variable with a number from the initial txt file to the new one, or starts the script from the beginning. At least it should be.  But something is going wrong in loop. It checks the color, inserts numbers, everything is fine, but apparently the wrong condition, apparently the wrong data types. It inserts different numbers into the scatter. Some will insert, some will not, regardless of the initial condition. What could be the reason? Where is the error?      tell application "Digital Color Meter" to activate     tell application "System Events"         tell process "Digital Color Meter"             click menu item 1 of menu 1 of menu bar item 4 of menu bar 1         end tell         do shell script "/usr/bin/python -c \"import objc;bndl = objc.loadBundle('CoreGraphics', globals(), '/System/Library/Frameworks/ApplicationServices.framework');objc.loadBundleFunctions(bndl, globals(), [('CGWarpMouseCursorPosition', 'v{CGPoint=dd}')]);CGWarpMouseCursorPosition((" &amp; 1002 &amp; "," &amp; 222 &amp; "));\""         set rgbColors to words of (the clipboard)     end tell     if rgbColors is equal to {"77", "39", "38"} then         exit repeat     else         do shell script "echo " &amp; quoted form of n &amp; " &gt;&gt; /Users/oneone/Desktop/base2.txt"     end if   Only the color check condition for Digital Color Meter is presented here.  Through the do shell, the color is read at the mouse position and the variable is added to the new file. Better to buy an older high-level camera or newer entry-level camera? What are the pros and cons of buying an older higher-level camera if the price is about the same as a new entry-level one? Sum of closed spaces is not closed Find expected value of $\frac{1}{1+\xi}$ Find expected value of $\frac{1}{1+\xi}$ if $\xi$ has Poisson distribution.  My try:  $$E\left[ \frac{1}{1+\xi}\right]=\sum_{k=0}^{\infty}{x}_{k}{p}_{k}=\sum_{k=0}^{\infty}\frac{1}{k+1}\frac{\lambda^ke^{-\lambda}}{k!}$$  Is it right? Using Model to equally distribute points, spatially within known geometry using ArcGIS ModelBuilder? Is it possible to create a model in ArcGIS ModelBuilder where you simply state number of points and an area in the form of a polygon to get the model to try and equally space out the points based on the geometry of the polygon and number of points? What is the promotion rate of professors in United States? I'm writing an essay, and want to know the promotion rate and average duration from assistant professor to associate professor and associate professor to professor in recent years. Sadly I don't know the data for the US. Could anyone tell me? What is the antiderivative of $e^{-x^2}$ I was wondering what the antiderivative of $e^{-x^2}$ was, and when I wolfram alpha'd it I got $$\displaystyle \int e^{-x^2} \textrm{d}x = \dfrac{1}{2} \sqrt{\pi} \space  \text{erf} (x) + C$$  So, I of course didn't know what this $\text{erf}$ was and I looked it up on wikipedia, where it was defined as:   $$ \text{erf}(x) = \dfrac{2}{\sqrt{\pi}} \displaystyle \int_0^x e^{-t^2} \textrm{d}t $$   To my mathematically illiterate mind, this is a bit too circular to understand. Why can't we express $\int e^{-x^2} \textrm{d}x$ as a 'normal function'? Also, what is the use of the error function? Proof of dilogarithm reflection formula $\zeta(2)-\log(x)\log(1-x)=\operatorname{Li}_2(x)+\operatorname{Li}_2(1-x)$ Error in pip: unsupported operand type(s) for -=: 'Retry' and 'int' I'm trying install the requests, but I can't do that. I'm using Ubuntu 16.04  I tried to install using  $ sudo pip install requests   and I get the following error   Collecting requests Exception: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main     status = self.run(options, args)   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run     requirement_set.prepare_files(finder)   File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files     ignore_dependencies=self.ignore_dependencies))   File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in _prepare_file     finder, self.upgrade, require_hashes)   File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in populate_link     self.link = finder.find_requirement(self, upgrade)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in find_requirement     all_candidates = self.find_all_candidates(req.name)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in find_all_candidates     for page in self._get_pages(url_locations, project_name):   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages     page = self._get_page(location)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page     return HTMLPage.get_page(link, session=self.session)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page     "Cache-Control": "max-age=600",   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get     return self.request('GET', url, **kwargs)   File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request     return super(PipSession, self).request(method, url, *args, **kwargs)   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request     resp = self.send(prep, **send_kwargs)   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 597, in send     history = [resp for resp in gen] if allow_redirects else []   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 195, in resolve_redirects     **adapter_kwargs   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send     r = adapter.send(request, **kwargs)   File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send     resp = super(CacheControlAdapter, self).send(request, **kw)   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send     timeout=timeout   File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen     _stacktrace=sys.exc_info()[2])   File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment     total -= 1 TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'   My python version is the 2.7 and the pip is 8.1.1 What is a good way to draw images using pygame?