Say I have a dictionary like so:  my_dict = {2:3, 5:6, 8:9}   Is there a way that I can switch the keys and values to get:  {3:2, 6:5, 9:8}
Given a dictionary like so:  my_map = {'a': 1, 'b': 2}   How can one invert this map to get:  inv_map = {1: 'a', 2: 'b'}
How to repeat currently typed in parameter on bash console? I was just typing something along the lines of:  mv foo/bar/poit/zoid/narf.txt   and suddenly realized, damn, I have to type large parts of that parameter again  mv foo/bar/poit/zoid/narf.txt foo/bar/poit/zoid/troz.txt   Even with tabcompletion, quite a pain. I know I can copy paste the parameter by mouse-selecting the text and middleclick but that is not good enough. I want to remain on the keyboard.  So is there a way to copy paste the current parameter of the line using the keyboard? I am new to Stack Exchange. I know there is a lot of discussion sites for Stack Exchange. I would like to know about there were any Stack Exchange site available for discussing and solving personal psychological problems. How to make Ethernet work on Android over OTG? says that the number of different monomials of degree $M$ in $N$ variables is $$\frac{(M+N-1)!}{M!(N-1)!}\; .$$ Can anyone explain why this is true? I once had the task of determining the following performance parameters from inside a running application:   Total virtual memory available Virtual memory currently used Virtual memory currently used by my process Total RAM available RAM currently used RAM currently used by my process % CPU currently used % CPU currently used by my process   The code had to run on Windows and Linux. Even though this seems to be a standard task, finding the necessary information in the manuals (WIN32 API, GNU docs) as well as on the Internet took me several days, because there's so much incomplete/incorrect/outdated information on this topic to be found out there.  In order to save others from going through the same trouble, I thought it would be a good idea to collect all the scattered information plus what I found by trial and error here in one place. Prove that $T$ has a cyclic vector iff its minimal and characteristic polynomials are the same I want to power my DIY stuff with a MacBook Pro USB C charger. The label on a charger says that it can provide three different power profiles:    20.2V - 4.3A 9V - 3A 5.2V - 2.4A   There is a ton of information about what USB-C power distribution is capable of, but I can't find any examples of how exactly to do it.   Is there an easy way or workaround to request one of those power profiles without using a microcontroller?  For example, I got apple MacBook Pro charger, apple USB-C cable, and a breakout board like this one: Using Perl to change the url homepage for Internet Explorer Windows losing IPv6 address after ~10 minutes When I initially connect to my home network my windows PC is assigned an IPv6 address - however after a few minutes it loses this address! I seem to have similar behaviour on multiple hosts using both wireless and wired connections.  My router is an Asus RT-AC87U.  How could it be losing the IPv6 address? How can I mintor / diagnose this issue?  Update:  Based on @grawity's suggestion below I ran wireshark on this. Sure enough I see a Router Solicitation message and a Router Advertisment message with a Router lifetime of 600 seconds. After 600 seconds my computer drops its Ipv6 address.  What is supposed to happen? Should my host send another Router Solicitation message? Or should the router periodically resend the Router Advertisment message?  Update 2:    says that Router Adverticement messages should be sent periodically. When I take the pth root, the bottom of the p comes very close to the \sqrt symbol.  In the New Century Schoolbook font (which I am using), the p actually intersects the \sqrt symbol, which looks even more terrible.  Is there a clean way to fix this?  \documentclass{article} \usepackage{fouriernc} % use the New Century Schoolbook font \begin{document} When I write $a^{(1/p)}$ as $\sqrt[p]{a}$, the bottom of the $p$ touches the top of the root symbol, which looks ugly. Even when the root symbol is larger, such as with $\sqrt[p]{\frac{1}{n}}$, it still looks bad (since the tail of the p almost hits that line). \end{document} Displaying multiple fields as labels if one field is null in QGIS? I am having some issues trying to show multiple fields for a single label in QGIS. In QGIS2.6, attempting to display labels for a feature consisting of multiple fields results in an empty label if one of the fields is null. So for example, in the label expression dialog:  concat("Temp Site",'\n',"Notes",'\n',"Function")   will function normally unless one of the fields is null, then it results in no label being shown. Using the '||' operator instead in the expression dialog also results in the same behaviour:  "Temp Site" || '\n'  ||  "Notes" || '\n'  ||  "Function"   Is there a way to display the labels even if one of the fields is null? Where should I copy-paste-install software to? I'm installing IntelliJ, and the readme tells me to choose an installation folder. Where is a good, standard place to put installed programs? Automatically fit the graphics in the remaining space of a Beamer slide What do you do in Dungeon World when someone wants to perform an action they don't have a move for? tag:* links incorrectly when using Save And Copy Profile To All Stack Exchange Accounts The  tag in my Stack Exchange profile links to different sites depending on where it's being viewed:  Profile on StackOverflow:  [tag:CSS] =&gt; https://stackoverflow.com/questions/tagged/css   Profile on StackExchange:  [tag:CSS] =&gt; https://stackexchange.com/questions/tagged/css   Profile on CodeReview:  [tag:CSS] =&gt; http://codereview.stackexchange.com/questions/tagged/css    I'd like to have these all link to https://stackoverflow.com/questions/tagged/css. You can ; why not add the ability to specify the site with tags? &lt;!-- tag: stackoverflow --&gt;[tag:css] &lt;!--tag: meta --&gt;[tag:feature-request]  The current behavior also cause a bug on my :    All tags send me to find a Panda aka 404 Page Not Found. number of trailing zeros I'm making a Java application with an application-logic-thread and a database-access-thread. Both of them persist for the entire lifetime of the application and both need to be running at the same time (one talks to the server, one talks to the user; when the app is fully started, I need both of them to work).  However, on startup, I need to make sure that initially the app thread waits until the db thread is ready (currently determined by polling a custom method dbthread.isReady()). I wouldn't mind if app thread blocks until the db thread was ready.  Thread.join() doesn't look like a solution - the db thread only exits at app shutdown.  while (!dbthread.isReady()) {} kind of works, but the empty loop consumes a lot of processor cycles.  Any other ideas? Thanks. I have lecture notes with the claim $(C_b(X), \|\cdot\|_\infty)$, the space of bounded continuous functions with the sup norm is complete.  The lecturer then proved two things, (i) that $f(x) = \lim f_n (x)$ is bounded and (ii) that $\lim f_n \in \mathbb{R}$.  I don't understand why it's not enough that $f$ is bounded. I think the limit of a sequence of continuous functions is continuous and then if $f$ is bounded, it's in $C_b(X)$. So what is this $\lim f_n \in \mathbb{R}$ about? Many thanks for your help. No matter what I do I'm stuck with &gt;. How can I enter a new command?  $ chmod -R 600 `/ .ssh &gt;  &gt; chmod &gt; id_rsa.pub &gt;  &gt; sudo chmod 600 ~/ssh/id_rsa     I was trying to sync the master and slave by following a youtube video when I encountered the "permission denied" issue. While trying to resolve it I got stuck with &gt;. Now I can't enter any new command.   Please guide me. I'm a Linux/AWS newbie. In the book on Brownian Motion by Yuval Peres, he makes the following claim:     Suppose that $\{ B(t); \ t \geq 0 \}$ is a Brownian Motion and $U$ is an independent random variable, uniformly distributed on $[0, 1]$. Then the process $\{ \tilde{B} (t); \ t \geq 0 \}$ defined as,   $$\tilde{B}(t) = \begin{cases} B(t)  &amp; \mbox{ if $t \neq U$} \\ 0  &amp; \mbox{ if $t = U$} \end{cases}$$      has the same finite-dimensional distributions as a Brownian motion, but is discontinuous if $B(U) \neq 0$, i.e. with probability one, and hence this process is not a Brownian motion.   I'm having difficulty in proving that the finite dimensional joint distribution ( basically the joint distribution of $( \ \tilde{B}(t_1), \ \tilde{B}(t_2), \tilde{B}(t_3), \dots \tilde{B}(t_n) \ )$ ) is the same as the finite dimensional distribution of $B(t)$. Can you please give me some clues.