How to display a portion of an image with CSS?
How can I display just a portion of an image in HTML/CSS?
C++ deleting line of text in a file What does the '!!!' syntax mean in javascript? I want to put four figures in a single row. The code I am trying to use is taken from .  This puts three figures in a row. When I add a fourth one, I get three images in row and the last one appears in the second row. But I want all of them in one row. Here is my code.  \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis   \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{document}  \begin{figure}         \centering         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{gull}                 \caption{A gull}                 \label{fig:gull}         \end{subfigure}%           \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{gull}                 \caption{A gull2}                 \label{fig:gull2}         \end{subfigure}%          ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{tiger}                 \caption{A tiger}                 \label{fig:tiger}         \end{subfigure}         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{mouse}                 \caption{A mouse}                 \label{fig:mouse}         \end{subfigure}         \caption{Pictures of animals}\label{fig:animals} \end{figure} \end{document}   As I have mentioned above, it works for three figures.  But I can not use it for four figures. What should I change?   What does  width=\textwidth mean?   I changed    \begin{subfigure}[b]{0.3\textwidth}   to  \begin{subfigure}[b]{0.2\textwidth}   but it didn't help.  Then, I changed     \includegraphics[width=\textwidth]{mouse}   to  \includegraphics[width=0.5\textwidth]{mouse}   Still no solution. How to typeset a file path? I am trying to run a function from  in ArcMap 10.1; Sink evaluation. But before it can finish it returns an error message, that, frankly, I don't understand at all.  It goes System.runtime.interopservices.comexception (0x80004005): error hresult e_fail .  Can anyone help me solve this? I have tried all I can think of. Run the function from the toolbox instead of dropdown menus, shorten paths, restart ArcMap, reinstall AHT, open new map documents, restart my computer, wait till next day and see if it automagically have fixed itself...   After searching this forum I found a , although it's got no answers. Now I'm all out of ideas, can anyone please help me?!    I'm using ArcMap 10.1 SP1 basic license and Windows 7.    I think I have narrowed it down a bit, still not clear what's wrong though. Sink evaluation uses a series of functions in Arcmap, of which one is Zonal statistics as table. That's the one it gets stuck on. The input raster somehow does not exist, path unknown. I guess this is some intermediary raster.       After consulting the Arc Hydro team, I got the advice not to use grids stored in a gdb (which I didn't). I have also tried to change target locations, thanks to @G.Oxsen. Unfortunately neither of those solved the issue. According to the Arc Hydro team, GPL0 that I asked about earlier is an in-memory grid, so probably no problem there.   I am currently pursuing that it is related to the installation of SP1. Anyone out there using AHT with SP1 and got Sink evaluation working?    Uninstalling SP1 did not change anything, unfortunately. Still working on this, but with less intensity. Seems like I'll have to find workarounds...    By reducing the number of sinks in need of processing I managed to get Sink evaluation running. Having the files not stored in a gdb seem to help as well, as mentioned earlier, and using integer grids.  Changing the "Maximum number of unique values to render" in ArcMap Options (Customize menu), tab Raster --> Raster dataset is another tip that I got (from the Arc Hydro Team). Restarting ArcMap after running every one or two functions also helps keeping things stable. I'm trying to make a systemd timer that runs every 15 minutes. Right now I have:     timer-fifteen.timer:  [Unit] Description=15min timer  [Timer] OnBootSec=0min OnCalendar=*:*:0,15,30,45 Unit=timer-fifteen.target  [Install] WantedBy=basic.target    timer-fifteen.target:  [Unit] Description=15min Timer Target StopWhenUnneeded=yes    This runs over and over again without stopping. Does it need to be *:0,15,30,45:* instead? How can I make this work? I have the Nikon kit lens that came with a D5100 — the kit lens is  . I was thinking of getting a fast lens and I am looking to buy the .  Should I consider 35mm or instead buy a 55-200mm for better range? Show that $C[a,b]$ is a complete space under the metric $d(f,g)=\sup_{t\in [a,b]}|f(t)-g(t)|$. Understanding etoolbox \ifdefempty and \ifdefvoid I am trying to understand the  \ifdefempty and \ifdefvoid macros. The documentation says that \ifdefempty     Expands to true if the control sequence is defined and is a   parameterless macro whose replacement text is empty, and to false   otherwise.   Similarly \ifdefvoid     Expands to true if the control sequence is undefined, if is a macro   whose meaning is \relax, or a parameterless macro whose replacement   text is empty, and to false otherwise.   From these descriptions I thought that \def\myempty{}, \def\myrelax{\relax}, and \def\myemptyempty{\myempty} would all be both "empty" and "void", but \def\myempty{} is the only one that is either "empty" or "void". What am I missing?  \documentclass{minimal} \usepackage{etoolbox}  \begin{document}  \def\myempty{} \def\myrelax{\relax} \def\myemptyempty{\myempty}   \ifdefempty{\myempty}{Empty}{Not empty}  \ifdefempty{\myrelax}{Empty}{Not empty}  \ifdefempty{\myemptyempty}{Empty}{Not empty}  \ifdefvoid{\myempty}{Void}{Not void}  \ifdefvoid{\myrelax}{Void}{Not void}  \ifdefvoid{\myemptyempty}{Void}{Not void}  \end{document} Which one is correct to say: "It's me" or "It's I"? I was taught at school that the following expression is not grammatically correct:  Who is there? It's me.  The correct one is:  Who is there? It's I.  Can you let me know which one is accurate? Me and some friends were recently disuccing "How cool it would be to be invisible", from a military viewpoint, I said that Camouflage, when done correctly, works surprisingly well, so invisibility was unnecessary. They countered with the argument that an infrared camera could see you easily. Apart from several warm coats, are there any non-restictive ways of preventing IR radiation being emitted from your person? "'key' is not valid for passed 'access_token', token not found" when trying to login using Google on Android SE app When handling multiple white-on-transparent png images, I am hindered by the fact that the thumbnails of these images are all-white. Both Adobe Bridge CS6 and Windows Explorer suffer the same problem, I can't discern between two of these pngs.  Is there a way to make these thumbnails useful? Is there some setting I missed that allows changing the thumbnail background colour for a png -- now a deafult white? Can I configure it to allow:   select right-click to copy right-click or ctrl-v to paste? Shooting many bullets toward the mouse position I try to shoot a bullet toward the mouse position by this code.  float deltaX = mousePosition.x - (aircraft.getPosition().x + aircraft.getLocalBounds().width / 2); float deltaY = mousePosition.y - (aircraft.getPosition().y + aircraft.getLocalBounds().height / 2); float angleRadian = (float)(std::atan2(deltaY, deltaX)); float angleDegree = (float)(angleRadian * 180 / PI);   It works fine with one bullet but when I add another one bullet to shoot together I use this code to specify start shooting point of each bullets.  sf::Vector2f offset1(aircraft.getPosition()); offset1.x += -10;//start shooting point first bullet.  sf::Vector2f offset2(aircraft.getPosition()); offset2.x += 10;//start shooting point second bullet.   this is a picture of this problem.   When I rotate aircraft to picture 2 the bullets are not the same as the first picture.  How can I solve this problem? How to create a DEB file manually? I want to create a DEB file manually. I would like to just provide a folder which contains data to install, and a script to be executed after installation.  Is this possible? Why isn't smoke flowing with the shape of the domain? I created this Smoke domain.    Then When I added smoke, it didn't stay within the domain, it went through the hole. Subscribe to tags I am interested in? How do I subscribe to the tags that I am interested in?  I like to get notified via email or so, when someone asks new questions or if someone responds to my questions. recover data after using dd command What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  &lt;script&gt;   var myvar = "&lt;?php echo $myVarValue;?&gt;"; &lt;/script&gt;   However, this doesn't work when $myVarValue contains quotes or newlines.