How to insert Latin accent inside lstlisting - Could you please help me find a way to insert Latin accents in the lstlistings environment? I've tried the direct way and also the indirect way, i.e using ç and \c{c}. However, when using ç, this error appers:  Package inpuntec Error: Unicode char ...\lst@EC ... (U+9EA7)(inpuntec) not set up for use with LaTeX.  Replacing the ç for the \c{c} gets rid of the error, but when the pdf is generated, the output is not converted to ç, but instead, it stays as \c{c}.
How to insert code with accents with listings? I'm trying to insert source code in LaTeX with using listings, but my code has accents and pdflatex gives me this error:  Unicode char \u8:�\expandafter not set up for use with LaTeX.   This is a code the reproduces the error.  example.tex  \documentclass{article} \usepackage{listings} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel}  \begin{document}  \lstinputlisting[language=C++]{code.cpp}  \end{document}   code.cpp  // Código con una tilde   What can I do to generate the PDF correctly?
How can I add a new user as sudoer using the command line? JavaScript closure inside loops – simple practical example Calculate the uncertainty in velocity of electron I got this question in one of my periodic test in coaching, I (seemingly) solved the question but later recognised what mess I did.  So, the question is :      Calculate the uncertainty in velocity of an electron. If the uncertainty in its position is ${10^ {-15}} \; \mathrm m$.   By simple calculations one can see that the answer would be ${5.79\times{10^{10}}} \; \mathrm{m/s}$. However, as one can see, the uncertainty in velocity is greater than the velocity of light then how is that possible or there is some other way to handle such problems.  P.S. I know the concept of dynamic mass but I am not very familiar with it. (I think that would work here, but don't know how?) How to exclude jars generated by maven war plugin? How do I get an animated gif to work in WPF? What control type should I use - Image, MediaElement, etc.? I use tikz (and tikzpicture) a fair bit, but files that used to compile fine before the latest slew of updates to pgf, and pstricks, no longer seem to do so (at least, on my MikTeX installation). The MWE (below) seems to compile correctly, but the DVI can't be rendered using yap, and dvi -> ps -> pdf fails (the dvi -> ps seems to be ok -- to the extent it isn't throwing errors), but ps2pdf fails miserably, with the following errors:   Error: /undefined in XC@.  Operand stack:    --nostringval--   --nostringval--   --nostringval--   --nostringval--   -  -nostringval--   --nostringval-- Execution stack: %interp_exit   .runexec2   --nostringval--   --nostringval--   --  nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --  nostringval--   false   1   %stopped_push   2045   1   3   %oparray_pop    2044   1   3   %oparray_pop   2025   1   3   %oparray_pop   1884   1   3    %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval-  -   --nostringval--   --nostringval--   2   %stopped_push   --nostringval-- Dictionary stack:   --dict:979/1684(ro)(G)--   --dict:1/20(G)--   --dict:87/200(L)--   --    dict:182/300(L)--   --dict:58/200(L)--   Current allocation mode is local   Current file position is 99615   GPL Ghostscript 9.26: Unrecoverable error, exit code 1   Here is the MWE:  \documentclass[12pt,letterpaper,oneside]{article}  \usepackage{tikz}  \usetikzlibrary{decorations,shapes,arrows,matrix,positioning}  \begin{document}  \begin{center} \begin{tikzpicture}[x=0.175cm,y=0.175cm,scale=1]  % set up maximum and minimum x- and y-coordinates \def\xmin{0} \def\xmax{23.5} \def\ymin{0} \def\ymax{23.5}  % draw and label axes    \draw[-&gt;,thick] (\xmin,0) -- (\xmax,0) node[below=8pt,near end]  {\small{abundance ($N$)}};   \draw[-&gt;,thick] (0,\ymin) -- (0,\ymax) node[above=12pt,near   start,rotate=90] { \small{birth rate ($b$)}};  % draw vertical reference line at K/2=50   \draw[color=black, thick,  smooth] (0,20) -- (20,0)  node[below=6pt,midway,rotate=-45] {\small{slope~$=a$}};  % draw circle around point where function intersects x-axis \draw [red] (0,20)  ellipse (0.2cm and 0.2cm) node[right=3pt,black] {$b_0$};   \end{tikzpicture}  \end{center}   \end{document} There seems to be a preference for to have the    18 mm - 55 mm 55 mm - 250 mm   lenses, but no mention of why they're better than a single 18-200mm. Could someone please explain why the two separate are better than the one combined, and if anyone has quantified this difference?  (I'm curious about Canon in particular.) If I'm playing the Hilltop farm in co-op - what farmer's mining level is used for the hilltop spawns? How to analyse 'Element not Found' exceptions when working with Selenium Why is learning modern algebraic geometry so complicated? If the matrix $A^3 = 0$, is $A$ singular? Requires installation of untrusted packages? What are the advantages of a custom ROM over rooted stock? How to create a shortcut that executes an xdotool command to simulate a key press? I'm trying to simulate a media key press using a custom shortcut.  So far, I've been able to achieve the simulation I need using the command:  xdotool key XF86AudioPlay   It works perfectly, it pauses or starts the music player every time it is run.  The problem comes when trying to run it as a shortcut.  First I tried to run an alias with a custom shortcut, but it did not work.  As explained on :     The commands run by keyboard bindings are not parsed via a shell. Your best bet is to create a directory bin in your homedir.   Next I created the suggested script and named it simplay:  #!/bin/sh xdotool key XF86AudioPlay   It is located inside a bin folder which is part of the PATH, this works fine and can be run from any location.  When trying to create the Custom Shortcut, I was unable to get it to execute, the configuration is the following:  Name: test Command: simplay  Shortcut: Ctrl+Alt+R   After searching a bit more I found another way to execute the shortcut:  gnome-terminal -e simplay   I tried it on a terminal and noticed that when executing it it would rapidly open a new terminal window, execute the child process, pausing the music and immediately close the window.  I changed the command on the shortcut and when hitting it I noticed the same behavior opening a terminal and immediately being closed but this time the child process did not pause the music, which makes me think that the script has been called on all my previous attempts but it is somehow not being able to execute.  How can I solve this problem according to your knowledge? Can my child attend a private school whilst I'm on USA ESTA? I am British, currently staying in the USA for 6 weeks on an ESTA Visa Waiver. I am living with a local family and whilst here my child (9 years old) has been attending a private (non-state) school with the children of the local family.  Today somebody told me that by having my child attend a private school I may be in violation of the terms of the ESTA Visa Waiver.  I have found nothing about this at   Where can I find official documentation / online advice about this? How to hide quoted text in Lion Mail? In Mail's conversation view, by default, quoted text is hidden and can be shown by clicking "See More from XXX" in the bottom of each message. After clicking that, how can quoted text be hidden again? Birthday line to get ticket in a unique setup At a movie theater, the whimsical manager announces that a free ticket will be given to the first person in line whose birthday is the same as someone in line who has already bought a ticket.  You have the option of choosing any position in the line. Assuming that you don't know anyone else's birthday, and that birthdays are uniformly distributed throughout the year (365 days year), what position in line gives you the best chance of getting free ticket? command to zip multiple directories into individual zip files I have a single directory that contains dozens of directories inside of it.  I'm new to command line and I'm struggling to come up with a command that will zip each sub-directory into a unique sub-directory.zip file.  So in the end my primary directory will be filled with all of my original sub-directories, plus the corresponding .zip files that contain the zipped up content of each sub-directory.  Is something like this possible? If so, please show me how it's done. Suppose we are in $\mathbb R^n$. What can we say about the sign of $\Delta u(\vec x)$ if u($\vec x$) has a local max/min at $\vec x$? I've tried looking at the reverse of the second partial derivative test and it seems to suggest that $\Delta u(\vec x) \leq 0$ if $\vec x$ is a min and $\Delta u(\vec x) \geq 0$ if $\vec x$ is a max. However, I'm not convinced of this result. Can somebody point me towards a statement (theorem, etc.) involving the above. I appreciate the help. I have seen in American Sniper, Dead-7 and Carrie that when someone is killed, they are laying on the ground with blood leaking out of their back or somewhere else on the body.  The puddle continuously grows with few signs of slowing down. This is obviously not CGI because it is a real liquid (may not be real blood as that would spark an emergency in real life).   I have seen in American Sniper that when the protagonist kills yet another enemy, they are filmed hitting the ground and blood starts pooling around their body.  In Carrie: In the dance room where Carrie sets her powers loose and kills a lot of teenagers in the process, there are a few that hit the ground with blood pooling under their bodies. Sometimes they would be on their side with blood coming out.  In Dead 7: Kimono and the other six killed lots of zombies. Some of the six were killed in the process as well before they came to Apocalypta to kill her. They were filmed hitting the ground dead with blood pooling around them.  I am not sure how they film this as they are wearing thin shirts for these scenes, and not only that, but the characters also have blood (obviously fake) only just dripping out of the side of their mouths (an indicator they have a ruptured and wounded stomach or lung (in this case the blood would be pink and frothy).  What is the film technique that allows this to happen?