I have a URL which requires some parameters. The values of those parameters can be accented characters, so I absolutely need to UrlEncode them. Strangely, I see a difference between the behavior or Javascript and .NET.  Let's pretend I try to UrlEncode the word "éléphant". In JavaScript (according to this WebSite: ), I get the following: %E9l%E9phant. This appears correct to me. However, in .NET with this call (System.Web.HttpUtility.UrlEncode("éléphant")) I get "%c3%a9l%c3%a9phant". What is wrong? What am I missing? What should I do if I want to get %E9l%E9phant in .NET?  Thanks!
In JavaScript:  encodeURIComponent("©√") == "%C2%A9%E2%88%9A"   Is there an equivalent for C# applications? For escaping HTML characters I used:  txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]",     m =&gt; @"&amp;#" + ((int)m.Value[0]).ToString() + ";");   But I'm not sure how to convert the match to the correct hexadecimal format that JS uses. For example this code:  txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]",     m =&gt; @"%" + String.Format("{0:x}", ((int)m.Value[0])));   Returns "%a9%221a" for "©√" instead of "%C2%A9%E2%88%9A". It looks like I need to split the string up into bytes or something.  Edit: This is for a windows app, the only items available in System.Web are: AspNetHostingPermission, AspNetHostingPermissionAttribute, and AspNetHostingPermissionLevel.
Android EditText listener for cursor position change What Thunderbolt to USB 3.0 cables/adapters exist for OS X and Mac hardware? I have the Late 2013 Macbook Pro, which has two USB 3.0 ports and two Thunderbolt 2 ports. I currently use both USB 3.0 ports and one TB2 port. I want to connect a third USB 3.0 device to the machine, but I don't want to use a USB splitter on one USB port as I'm concerned the devices would draw too much power from the bus. I have no current use for the second TB2 port and I would love to be able to use it for this purpose.   Browsing extensively online, I've found numerous docks, such as , that connect via a Thunderbolt cable. This would work, but it's an expensive, 'bulkier' solution (and not the one I'm looking for).   I'm aware that a USB 3.0 device wouldn't be able to take advantage of Thunderbolt's I/O speeds, but it's certainly compatible, which is all I'd need. After all, Apple even sells a . I also know that Thunderbolt is not only used for digital video purposes (along with the TB > Firewire option, there exists ).   There are almost no Thunderbolt to USB 3.0 cables/adapters on the market. I'd think this hardware would be more prevalent given the prominence of USB devices out there. What adapters are available for OS X? My csv export displaying html, how to get rid of? Express $\sqrt{3}\sin\theta - \cos\theta$ as: $a\cos (\theta + \alpha) $ Express $\sqrt{3}\sin\theta - \cos\theta$ as: $a\cos (\theta + \alpha) $  Can someone please explain to me how to go about doing this? Why does my shell script choke on whitespace or other special characters? prove that $\frac{(2n)!}{(n!)^2}$ is even if $n$ is a positive integer Prove that $\frac{(2n)!}{(n!)^2}$ is even if $n$ is a positive integer.      For clarity: the denominator is the only part being squared.   My thought process:   The numerator is the product of the first $n$ even numbers and the product of the first $n$ odd numbers.   That is, $(2n!) = (2n)(2n-2)(2n-4)\cdots(2n-1)(2n-3)(2n-5).$ In effect, the product of even numbers can be cancelled out with $n!$ resulting in the following quotient:  $$ \frac{(2^n)(2n-1)(2n-3)}{(n!)}\;.$$  To me this looks even thanks to the powers of $2$. But I am not convinced for some reason.   Was this approach to naive?   Sorry for the poor notation, I don't know any coding languages, my apologies. $\LaTeX$ and Mathematica PlotLegends disappearing with list of functions I would like to know if there are any other tenses or grammatical structures to use for speaking about the future apart from will (perfect tense included), going to, simple and continuous present.  I mean not the obvious ones. For example, simple present (I could never have imagined it could be used for the future).     My mom arrives tomorrow.   I go to the doctor at 4 o'clock this afternoon. How to use the parskip package? (space in between paragraphs) Zero vector of a vector space I know that every vector space needs to contain a zero vector. But all the vector spaces I've seen have the zero vector actually being zero (e.g. $\mathbf{0}=\langle0,0,\ldots,0\rangle$). Can't the "zero vector" not involve zero, as long as it acts as the additive identity? If that's the case then are there any graphical representations of a vector space that does not contain the origin? How to call a function in a Twig file Let's say I create a function in a module file:  function _get_test() {   return 'test'; }   How can I call this in any Twig file? For example *.html.twig, page.html.twig, node.html.twig etc.   OR   How can I pass a variable from PHP to Twig and display in any Twig file.  For example *.html.twig, page.html.twig, node.html.twig etc. Proving a three variables inequality There is a remote Windows server on a private network which I can connect to via Remote Desktop Connection.  I would like to be able to make TCP/IP connections from my computer to other computers on that server's network.  Remote Desktop Connection makes it possible to share printers, drives, and other local resources through the connection.  Is there any way to "tunnel" a TCP/IP connection via RDC?  I'd like something similar to the port-forwarding provided by SSH.  I don't see any way to do this via RDC, but I'm hoping the capability is there and I just don't know about it. Why could the pictures and paintings in Hogwarts talk and the photos of Harry's parents couldn't? When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. More than a decade ago, I read a short story about a small group of people at the end of the world. The story was premised on some sort of mass-produced device which took ambient heat and turned it into power. The devices had been overused, and now the world was freezing.   I think the people were essentially bandits; the main character may have been a woman who lured men to her house and killed them for their body heat? There was also a strong implication that one person she had done this to was an alien who had come to warn that the devices were destroying the world.  I think the story was in a hardbound collection, and I think the collection was from the late 70's or very early 80's.  (Calling it a "short story" is just meant to distinguish it from a full novel — it may have actually been a novella or similar.) Double booked - User bookmarking question recorded twice In this  one user is shown as having bookmarked  twice:  This doesn't appear to be the same question as:  or  though it's certainly possible that the cause is the same. Set the size of pgf picture? I have a pgf picture which I insert with:  \input{m1.pgf}   But the image is too big. Instead of regenerating a smaller image, I'd rather take advantage of vector graphics, and have XeLaTeX scale it. How do I set the width of pgf picture (keeping its aspect ratio)?  MWE  tex:  \documentclass{article}  \usepackage{fontspec} % enagles loading of OpenType fonts \usepackage{polyglossia} % support for languages  % fonts: \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes \setmainfont{DejaVu Sans} \setsansfont{DejaVu Sans} \setmonofont{DejaVu Sans Mono}  % pgf: \usepackage{pgf}  \begin{document}  \input{m1.pgf}  \end{document}   Sample pgf:  (it's too big to cite it here, and I can't make much smaller). I recently bought  white LED reading lamp. I like it a lot, but the "white" light produced is significantly blue; I'll guess its  is about 5000K.  I've noticed that, when this is the only source of light, printed text appears slightly fuzzy, and is more difficult to read than with a standard incandescent reading lamp. My guess is that this is  causing color fringing in my eyes, making it harder to read with this new lamp.  Is there a way to make this lamp less blue using some sort of transparent/translucent filter over the lens? This could filter out some of the blue end of the spectrum, or include a  to convert some of the blue to yellow (as  do). The fluorescence idea would be better, as there'd be less light lost. I don't want to go too far, though; a strongly yellow lamp might be worse for reading than this currently blueish lamp.