synchronizing io operation in java on a string method argument?
Synchronizing on String objects in Java
How to I see the number of sessions in the Google Analytics aquisition overview main graph? Under Acquisition --> Overview, a graph appears around middle of the screen titled "sessions".  It is actually showing the total number of users over a particular time period, I'd like it to show the number of sessions and not users on the blue graph.     How do I change it? How do I enter a file or directory with special characters in its name? I want to enter the following folder in the terminal:  Milano, Torino (Jan)-Compressed   How should I write the command cd to enter this directory?  Spaces and several other special characters like \, *, ), ( and ? cause problems when I try to use them in the command line or scripts, e.g.:    $ cd space dir bash: cd: space: No such file or directory  $ cat space file cat: space: No such file or directory cat: file: No such file or directory  $ cat ( bash: syntax error near unexpected token `newline'  $ echo content &gt;\ &gt; ^C  $ ls ? (  )  *  ?  \   How do I enter file or directory names that contain special characters in the terminal in general? How can I put the computer to sleep from Command Prompt/Run menu? I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu.  How can I put my computer to sleep or shut it down? What is the command for that? I just updated my iMac to Mojave, and am still trying to setup my preferences.  I tried dark mode, but did not like it (half of me apps seem to ignore it anyway).  I switched to light mode, but this too has problems. The File Save dialog shows a list of Directories and existing files, but the latter are very light grey, almost indistinguishable from the background.    I have searched the Preferences menu, but can't seem to find any setting to set normal contrast levels like in High Sierra. How general is the Lagrangian quantization approach to field theory? 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 In Drupal 7, I used the Secure login module to run the site on a secure connection, but it seems it doesn't revert back to http on logout. I would like to just run the whole site as https:// as a simplification.  Is there a simple way to do this without the use of module? The question asks us to classify all distributions in $\mathbb{R}^2$, say $u$, such that $$(xy)u(x,y) = (x^2-y^2)u(x,y)= 0.$$ I am genuinely stuck, any help is extremely appreciated. Swapping two variable value without using third variable What are the use cases of SO_REUSEADDR? I have used SO_REUSEADDR to have my server which got terminated to restart with out complaining that the socket is already is in use. I was wondering if there are other uses of SO_REUSEADDR? Have anyone used the socket option for other than the said purpose? Obviously, most beers are carbonated with carbon dioxide, while some stouts/porters are "carbonated" with nitrogen.  I was curious if there has been any notable experimentation with other gasses to "carbonate" beer. If nitrogen can introduce a "creamy" texture to a beer, I would think that other gasses would also be able to introduce their own characteristics on beer. If any of these experiments have done, what characteristics do these other gases impart?  I'm sure cost would be an issue for certain gasses that would prohibit its use in beer, but for purposes of this question, cost is irrelevant.  As an aside, what is the correct term to use, as opposed to "carbonate", for a question of this nature? Annoying FrontEnd bugs in Mathematica 10 table side by side with minipage I can't manage to get two tables side by side in a minipage environment. Any kind suggestion would be highly appreciated!   \documentclass{article} \usepackage{array}  \begin{document} \begin{table}[htbp] \centering \begin{minipage}{.2\textwidth}     \begin{tabular}{| m{3cm} | m{4.3cm} | c |}   \hline  number of entity filter (size 1) &amp; number of context filters (size 2, size 3,  size 4) &amp; Accuracy\\ [2ex]   \hline  32  &amp;  32  ,  32  ,  32  &amp;  0.835 \\[0.5ex] \hline 32  &amp;  64  ,  64  ,  64  &amp;  0.821 \\[0.5ex] \hline 32  &amp;  128  ,  128  ,  128  &amp;  0.819 \\[0.5ex] \hline 32  &amp;  256  ,  256  ,  256  &amp;  0.749 \\[0.5ex] \hline 32  &amp;  512  ,  512  ,  512  &amp;  0.683 \\[0.5ex] \hline 32  &amp;  1024  ,  1024  ,  1024  &amp;  0.528 \\[0.5ex] \hline 32  &amp;  2048  ,  2048  ,  2048  &amp;  0.235 \\[0.5ex] \hline 64  &amp;  32  ,  32  ,  32  &amp;  0.850 \\[0.5ex] \hline 64  &amp;  64  ,  64  ,  64  &amp;  0.816 \\[0.5ex] \hline 64  &amp;  128  ,  128  ,  128  &amp;  0.786 \\[0.5ex] \hline 64  &amp;  256  ,  256  ,  256  &amp;  0.795 \\[0.5ex] \hline 64  &amp;  512  ,  512  ,  512  &amp;  0.765 \\[0.5ex] \hline 64  &amp;  1024  ,  1024  ,  1024  &amp;  0.669 \\[0.5ex] \hline 64  &amp;  2048  ,  2048  ,  2048  &amp;  0.331 \\[0.5ex] \hline 128  &amp;  32  ,  32  ,  32  &amp;  0.920 \\[0.5ex] \hline 128  &amp;  64  ,  64  ,  64  &amp;  0.890 \\[0.5ex] \hline 128  &amp;  128  ,  128  ,  128  &amp;  0.886 \\[0.5ex] \hline 128  &amp;  256  ,  256  ,  256  &amp;  0.846 \\[0.5ex] \hline 128  &amp;  512  ,  512  ,  512  &amp;  0.789 \\[0.5ex] \hline 128  &amp;  1024  ,  1024  ,  1024  &amp;  0.755 \\[0.5ex] \hline 128  &amp;  2048  ,  2048  ,  2048  &amp;  0.488 \\[0.5ex] \hline 256  &amp;  32  ,  32  ,  32  &amp;  0.920 \\[0.5ex] \hline 256  &amp;  64  ,  64  ,  64  &amp;  0.922 \\[0.5ex] \hline 256  &amp;  128  ,  128  ,  128  &amp;  0.912 \\[0.5ex] \hline 256  &amp;  256  ,  256  ,  256  &amp;  0.877 \\[0.5ex] \hline 256  &amp;  512  ,  512  ,  512  &amp;  0.872 \\[0.5ex] \hline 256  &amp;  1024  ,  1024  ,  1024  &amp;  0.771 \\[0.5ex] \hline 256  &amp;  2048  ,  2048  ,  2048  &amp;  0.683 \\[0.5ex]  \hline  \end{tabular} \end{minipage}% \hfill \begin{minipage}{.2\textwidth}     \begin{tabular}{| m{3cm} | m{4.3cm} | c |}   \hline  number of entity filter (size 1) &amp; number of context filters (size 2, size 3,  size4) &amp; Accuracy\\ [2ex]   \hline 512  &amp;  32  ,  32  ,  32  &amp;  0.910 \\[0.5ex] \hline 512  &amp;  64  ,  64  ,  64  &amp;  0.922 \\[0.5ex] \hline 512  &amp;  128  ,  128  ,  128  &amp;  0.909 \\[0.5ex] \hline 512  &amp;  256  ,  256  ,  256  &amp;  0.910 \\[0.5ex] \hline 512  &amp;  512  ,  512  ,  512  &amp;  0.883 \\[0.5ex] \hline 512  &amp;  1024  ,  1024  ,  1024  &amp;  0.730 \\[0.5ex] \hline 512  &amp;  2048  ,  2048  ,  2048  &amp;  0.682 \\[0.5ex] \hline 1024  &amp;  32  ,  32  ,  32  &amp;  0.925 \\[0.5ex] \hline 1024  &amp;  64  ,  64  ,  64  &amp;  0.931 \\[0.5ex] \hline 1024  &amp;  128  ,  128  ,  128  &amp;  0.920 \\[0.5ex] \hline 1024  &amp;  256  ,  256  ,  256  &amp;  0.917 \\[0.5ex] \hline 1024  &amp;  512  ,  512  ,  512  &amp;  0.899 \\[0.5ex] \hline 1024  &amp;  1024  ,  1024  ,  1024  &amp;  0.858 \\[0.5ex] \hline 1024  &amp;  2048  ,  2048  ,  2048  &amp;  0.776 \\[0.5ex] \hline 2048  &amp;  32  ,  32  ,  32  &amp;  0.933 \\[0.5ex] \hline 2048  &amp;  64  ,  64  ,  64  &amp;  0.934 \\[0.5ex] \hline 2048  &amp;  128  ,  128  ,  128  &amp;  0.925 \\[0.5ex] \hline 2048  &amp;  256  ,  256  ,  256  &amp;  0.928 \\[0.5ex] \hline 2048  &amp;  512  ,  512  ,  512  &amp;  0.907 \\[0.5ex] \hline 2048  &amp;  1024  ,  1024  ,  1024  &amp;  0.878 \\[0.5ex] \hline 2048  &amp;  2048  ,  2048  ,  2048  &amp;  0.798 \\[0.5ex]  \hline  \hline \end{tabular} \end{minipage} \caption{filter window size} \label{tab:config_filternum} \end{table}   \end{document}   What I have so far  EDIT: I followed the second solution from , and it somehow didn't work. I am not sure why. A word with a wide range of meanings Is there a better alternative to ambiguous for a word with a wide range of meanings, difficult to find, because they become different in connection with person's opinion. I'm a citizen of an EU member state traveling to a small city in Vermont. Looking at flight data, it seems that it would be quite a bit quicker to fly into Montreal (Canada) and then drive a rental car to my final destination in Vermont (and back), rather than getting a connecting flight into a small local US airport. I am slightly worried about the trouble I might get myself into by crossing a land border twice, though.  Can anyone give me an idea of what I'd be getting into in terms of:   Crossing time Discomfort Additional paperwork required   For both the outbound (Canada/US) and the return leg (US/Canada) of my journey, when compared to crossing the border at an international airport?  Also, do I need to take any special actions when I'm arranging a rental car if I intend to drive it over to the US and back? Are the eigenvalues of $AB$ equal to the eigenvalues of $BA$? (Citation needed!) First of all, am I being crazy in thinking that if $\lambda$ is an eigenvalue of $AB$, where $A$ and $B$ are both $N \times N$ matrices (not necessarily invertible), then $\lambda$ is also an eigenvalue of $BA$?  If it's not true, then under what conditions is it true or not true?  If it is true, can anyone point me to a citation?  I couldn't find it in a quick perusal of Horn &amp; Johnson.  I have seen a couple proofs that the characteristic polynomial of $AB$ is equal to the characteristic polynomial of $BA$, but none with any citations.  A trivial proof would be OK, but a citation is better. Prove that $f(x)\in \mathbb{Z}[x]$ such that $f(0)$ and $f(1)$ are odd has no integer roots From injective map to continuous map "None is" or "none are" What is the difference between Python's list methods append and extend?