I want to create Key/Value Pair but with only one Set, not Dictionary with multiple pairs. (I don't want to use Array of size 2.)  What is the best way to do in C#?
I'm interested: What is C#'s analog of std::pair in C++? I found System.Web.UI.Pair class, but I'd prefer something template-based.  Thank you!
Am I being charged taxes on my grocery purchases at Walmart? Today, I only bought groceries at Walmart and noticed that there is no tax on groceries in California (Google tells me that this is perhaps true for whole of the US?)  So far I have always paid tax at Walmart for my grocery purchases, but that also included items like crackers, shampoo etc  Did Walmart charge me then only for the items that were not groceries, or if your cart has groceries + non-grocery items, you get charged tax on all of them?  Or is this a policy that varies by store, or cashiers' knowledge/discretion, etc?  Would people recommend for me to break down a single mixed purchase into two: one only having groceries and the other with the rest, or is this being paranoid?  My grocery purchases, every two weeks, amount to around $100+.  I pay 8.25% tax, so that is enough to get me free gas if I can figure this out! How to delete a file ending in a dot in Windows 7? After installing Cygwin on Windows 7 and realizing I'm better of with using Linux on a different partition, I wanted to uninstall it. However, Cygwin has no uninstaller so I was left with the option of deleting the whole folder it was installed in – which I did.  The problem is that a single file remained, in the whole directory tree, named README. at  C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura\README.  I know Windows isn't supposed to allow files with names ending in ., but this one obviously got through, and I cannot delete it. When trying to do that, I get     Item Not Found      This is no longer located in C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura. Verify the item's location and try again.   When viewing the properties of the file (Right-click, Properties), Windows tells me that it has 0 bytes.   However, when viewing it in the explorer window, and clicking on it, the windows status bar thing tells me it has 517 bytes.  Any ideas on how to get rid of it? What is the best way to clean the sensor on a interchangeable lens camera (mirrorless or digital SLR)? I've got a couple of spots of dust on the sensor of my Canon 20D. A rocket blower isn't shifting them, and I'm ridiculously scared of some of the more direct methods for cleaning sensors — what methods/systems have you tried, and how successful have they been? The API Sandbox This is the same concept as .  Why do we need more than one? this is in order to test the API, some methods support vectored ids (for example /questions/id1;id2/comments) and for that two sandboxes are needed. Do not delete good duplicates! What's the standard "roadmap" to learning quantum physics? I'm really interested in quantum physics and would like to learn more. However, I don't know where to start and in what order I should learn things. So, ideally I'm looking for some sort of roadmap of what to learn. What physics topics do I need to know to start learning about quantum mechanics? (In addition to the mathematical topics mentioned at )  My current knowledge is mostly popular science stuff, like tv shows on Discovery Science and National Geographic Channel. So I have a basic understanding of some basic principals. There's also a recent lecture from Brian Cox that I have watched which gave a bit more in-depth information. I installed the  on my Ubuntu&nbsp;11.04 (Natty Narwhal) with   sudo apt-get install lamp-server^   Now I navigate to /var/www and use   wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz   I get the following error.   --2011-08-03 13:59:00--   http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving  ftp.drupal.org... 64.50.233.100, 64.50.236.52 Connecting to  ftp.drupal.org|64.50.233.100|:80... connected. HTTP request sent,  awaiting response... 200 OK Length: 2757101 (2.6M)  [application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied   Cannot write to `drupal-7.x-dev.tar.gz' (Permission denied).   How do I resolve this error?  I tried to download the same file in the downloads folder, and it went on without an issue. So it seems to be some permission error, but I'm not sure about that or how to solve it. How to set system-wide environment variables on OS X Mavericks What's the origin of "I'm down with it"? I understand it's an expression of agreement. What exactly does it mean and where did it originate from? Is there a mass spectrometer software that can measure the mass of a proton Will tcpdump see packets that are being dropped by iptables? How does DES decryption work? Is it the same as encryption or the reverse? If DES decryption is the same as encryption done in reverse order, then how can the reversed S-Box convert 4 bits into 6 bits? Dictionaries on iOS 8 not working Related:   I have put a bit of commentary enumerating my confusions in parentheses  I read in Black Holes and Time Warps (Kip Thorne), that quasars can generate their jets from four different processes. These all involved the accretion disk, but there was one which doesn't make quite as much sense. It was called the Blandford-Znajek process, and it involved magnetic field lines carrying current.  The process was visualized in two ways. A black hole, with magnetic field lines, is spinning. In the first visualisation (viewpoint actually), the magnetic field lines 'spin' along with the black hole, and nearby plasma is anchored onto the field lines by electrical forces (where did the electrical fields come from?). The plasma can slide along the field lines but not across them (why?).  Since the field lines are spinning, centrifugal forces will fling them up and down the field lines, forming jets.  The other viewpoint is this, and it makes even less sense (to me that is, I haven't had a formal education in GR): The magnetic fields and the swirl of space generate a voltage difference across the field lines (Why? How?). The voltage carries current across the magnetic field lines (why are the field lines behaving like wires?). This current travels across plasma, which accelerates it, creating the jets.  Now the main thing that doesn't make sense, is that magnetic field lines are behaving like wires. Why would they? I suspect the answer lies hidden somewhere in the equivalence of EM waves in different frames, but I can't think up any convincing argument from that side.  If the answer involves GR equations, you don't need to solve it here (wouldn't make sense to me), but if you have to, just refer to the equation and what you did to it, along with the final result. Thanks! One of my friends said that I would die if I drank distilled water (we were using it in a chemistry experiment) I gave it a go and surprisingly did not die.  I did a bit of  and found    It said that drinking only this kind of water could definitely cause death, as distilled water was highly hypotonic and it would make the blood cells expand and finally explode and ultimately cause death.  I wanted to know exactly how much of this water on an average was needed to be consumed to cause death. I installed Ubuntu on my Windows 7 Sager laptop using Wubi. Hibernate (i.e. suspend to disc) is not an option from the power icon, only suspend, shutdown, etc. Hibernate is also not an option from my battery/lid close options. I understand that hibernation is disabled by default in Ubuntu 12.04. I tried running pm-hibernate but I get the following message:  Looking for splash system... none  s2disk: Snapshotting system   and then the computer just hangs with a black screen. According to the documentation  if this fails then I can't enable hibernate but it offers no help in making pm-hibernate succeed.  Could swap be my problem? It looks like I have very small swap:  user@ubuntu:~$ cat /proc/swaps Filename                Type        Size    Used    Priority /host/ubuntu/disks/swap.disk            file        262140  0   -1   The advice on  is only for the author's set up (e.g. I don't have an Ubuntu install disk since I used Wubi) and he says that 'INFO: This will not work for 12.04, resume from hibernate work differently in 12.04.'  Any advice? I really need to get hibernate working to use my laptop as a, er, laptop.  Thanks Can the real and imaginary parts of $\dfrac{\sin z}z$ be simplified? I have calculated the real and imaginary parts of $\dfrac{\sin z}z.$ I've obtained  $$\begin{eqnarray} \frac{\sin z}z&amp;=&amp;\frac{\sin(x+iy)}{(x+iy)}\\ &amp;=&amp; \frac{\sin(x)\cosh(y)+i\cos(x)\sinh(y)}{x+iy}\\ &amp;=&amp; \frac{x\sin(x)\cosh(y)+y\cos(x)\sinh(y)}{x^2+y^2}+i\frac{x\cos(x)\sinh(y)-y\sin(x)\cosh(y)}{x^2+y^2}. \end{eqnarray}$$  Before calculating it, I hoped I could use this in a solution to a certain problem, but I would need to differentiate the real and imaginary parts of $\dfrac{\sin z}z$ with regard to $x$ and $y$. But what I'm getting is very complicated. I understand that it could be that that's just the way it is. But maybe there are some simplifications to be done either in the functions or in their derivatives? I've never really used hyperbolic functions before so I'm not sure I'm not missing something.  Added. The problem I'm working on is the following.     Prove that the solutions of the equation $$\tan z=z$$ are all real.   I will sketch the solution I know here.  It can be calculated that  $$\tan(x+iy)=\frac{\sin(2x)}{\cos(2x)+\cosh(2y)}+i\frac{\sinh(2y)}{\cos(2x)+\cosh(2y)}.$$  Plugging this to the equation, we get  $$\begin{eqnarray} x&amp;=&amp;\frac{\sin(2x)}{\cos(2x)+\cosh(2y)}\\ y&amp;=&amp;\frac{\sinh(2y)}{\cos(2x)+\cosh(2y)}. \end{eqnarray}$$  From this we can get   $$\sin(2x)\cdot2y=\sinh(2y)\cdot2x.$$  By plotting the functions $\sin,$ $\mathrm{id}$ and $\sinh$ (and proving the right inequalities we can see from the plots), we can see that this is only possible when $xy=0$. But when we plug $x=0$ to the second equation, we can show that the only solution is $y=0$, which ends the proof.  What strikes me in this solution is the fact that $\dfrac{\sin z}z$ is used. (Not explicitly in my statement.) This function has another connection to the problem:     The non-zero solutions of the equation $\tan z=z$ are exactly the zeros of the derivative of $\dfrac{\sin z}z.$   This is easy to prove. I wondered if there shouldn't be a solution to the problem which uses this fact, given that $\dfrac{\sin z}z$ appears in the solution I know. Background info: I am planning on making a filehost with which one can encrypt and upload files. To protect the data against any form of hacking, I'd like not to know the encryption key ($K$) used for a file, so the user will have to asymmetrically encrypt $K$ and send it as well. The reason for this double encryption is that you can still share (individual!) files with other accounts by encrypting $K$ with the public keys of those users, too.  My problem is: How can a user can get a public and private key without the server saving/knowing the private key and without the user having to remember a passphrase of 250 hex characters?  Question: Is there a way to derive a key pair from a password, like PBKDF-2 does for symmetric encryption? Suggestions on rearranging the cryptographic steps in an easier way are welcome, too.  Alternatively: It is also possible to encrypt the private key with a PBKDF-applied password and store it on the server, but I'd like to keep things 'simple'. ;)  Note: At this point I don't care if it requires RSA, ECC or an obscure cryptography scheme. I am a dual Australian/British citizen with an expired emergency Aussie passport and a valid UK passport. What are my chances for an Aussie visit? I was going to have to miss my brother's wedding on Jan 4th but he bought me a flight today. But my Aussie passport is expired and was only an emergency passport to begin with. I'm born and bred Aussie, just been away for ten years. I'm hoping to arrive on UK passport, show the expired Aussie one and the wedding invite and my return ticket for two weeks later and hope they understand.   What are my chances? Also planning on going to the Aussie embassy on Monday to see what they say but want to know my chances of just entering on a UK passport. Given Newton's third law, why are things capable of moving?