If I use \begin{align*}...\end{align*} and out of it I write a text then there is a big vertical space between the text and the mentioned environment. Why is there that space? And how can I erase it? Also in this case I think that the vertical space is too much. For example in tabular environment or other environments there is much less vertical space. Why is align environment different?  \documentclass[12pt]{article} \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}  \usepackage{multicol}  \usepackage[utf8]{inputenc}  \setlength{\parindent}{0cm}  \usepackage{setspace}  \usepackage{xltxtra} \usepackage{xgreek} \setmainfont[Mapping=tex-text]{GFSDidot.otf} \setsansfont[Mapping=tex-text]{GFSDidot.otf}  \usepackage[fleqn]{amsmath} \usepackage{unicode-math}  \setlength{\mathindent}{0cm}  \newcommand{\3}{\vspace{0.3cm}}  \title{} \author{} \date{}  \begin{document}  \begin{multicols*}{2}   70 \begin{align*} &amp;e^{jz}=\cos z+j\sin z\\ &amp;\cos z=(1/2)(2\cos z)=\\ &amp;=(1/2)(2\cos z+j\sin z-j\sin z)=\\ &amp;=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\ &amp;=(1/2)(e^{jz}+e^{-jz}) \end{align*}   \end{multicols*} \end{document}     70  \begin{align*} &amp;e^{jz}=\cos z+j\sin z\\ &amp;\cos z=(1/2)(2\cos z)=\\ &amp;=(1/2)(2\cos z+j\sin z-j\sin z)=\\ &amp;=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\ &amp;=(1/2)(e^{jz}+e^{-jz}) \end{align*}
I need to display math in my report, but is it possible to remove the vertical space around align*?  A little example is the following (where I just want the align* to have the same vertical space as a \\  \documentclass[10pt,danish,a4paper,oneside,fleqn]{report}  \usepackage[english]{babel} \usepackage{amsmath}  \begin{document}  ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \begin{align*}   A{\cap}B\ &amp; =\ {\left\{{b,d,e}\right\}}{\;}{\cap}{\;}{\left\{{a,b,f,g}\right\}}   \\   \nonumber\ &amp; =\ {\left\{{b}\right\}} \end{align*} ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \\ ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss  \end{document}
What is approximate error of Pythagorean Theorem vs. Haversine Formula in measuring distances on sphere at various scales? Many people when first trying to calculate distances between two longitude / latitude pairs  ask if Pythagorean theorem works as an appropriate distance function.  Most often people answer "no, the Pythagorean theorem only works on a 2D Euclidean plane." Rarely, however, do people mention the effect of scale and location on the sphere on how inaccurate the Pythagorean theorem is.  The basic idea being at very small scales, the surface of a sphere looks very much like a plane. At very large scales, it distances along the surface are more curved and therefore the difference between the incorrect Pythagorean Theorem and the correct Haversine Formula is greater.  Does anyone know a formula or rule of thumb that tells you the difference between the two distance measures based on the scale of the distance you are trying to measure?   I think having this explicitly would help in:   explaining why the Pythagorean Theorem isn't perfect; and in letting people who are looking for more "rough" distances know when Pythagoras actually will serve their purposes. Will I get OTA updates after installing Android L Developer preview? In Delphi, is TDataSet thread safe? I'd like to be able to open a TDataSet asynchronously in its own thread so that the main VCL thread can continue until that's done, and then have the main VCL thread read from that TDataSet afterwards. I've done some experimenting and have gotten into some very weird situations, so I'm wondering if anyone has done this before.  I've seen some sample apps where a TDataSet is created in a separate thread, it's opened and then data is read from it, but that's all done in the separate thread. I'm wondering if it's safe to read from the TDataSet from the main VCL thread after the other thread opens the data source.  I'm doing Win32 programming in Delphi 7, using TmySQLQuery from  as my TDataSet descendant. Extremely difficult logic question using conditional statement In this problem, we will only consider (real-valued) functions with domain $\mathbb{R}$. We define two new concepts. Let $f$, and $g$ be two functions.  We say $f$ is a rival of $g$ if   &emsp;&emsp;&emsp;&emsp; $\exists x\in \mathbb{R} \ \text{s.t.} \ \forall y\in \mathbb{R}, x \lt y \implies \lvert f(x)- g(x)\rvert\lt\lvert f(y)-g(y)\rvert$    We say $f$ is a frenemy of $g$ if  &emsp;&emsp;&emsp;&emsp; $\forall x\in\mathbb{R} \ \text{s.t.} \ \  x \lt y \ \ \text{AND} \ \ \lvert f(x)-g(x)\rvert \lt \lvert f(y)-g(y)\rvert$  Below are four claims. Which ones are true and which ones are false? If a claim is true prove it. If a claim is false, show it with a counterexample.  a) If $f$ and $g$ are any two functions and $f$ is a rival of $g$ then $f$ is a frenemy of $g$. b) If $f$ and $g$ are any two functions and $f$ is a frenemy of $g$ then $f$ is a rival of $g$. If $f$ and $g$ are any two functions and $f$ is a rival of $g$, then $g$ is a rival of $f$. Let $f$, $g$, and $h$ be any three functions. If $f$ is a frenemy of $g$ and $g$ is a frenemy of $h$ then $f$ is a frenemy of $h$  What are the four claims stating? Especially for c), the concept is not even present I am having a misunderstanding on how to solve them? How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see &quot;&quot; in the . Trying to make aliases that open the last modified file One thing that I frequently do is edit the most recently modified files, so instead of typing "ls -lr" and then "vim lastfile", I thought I would make some shortcuts in my ~/.bash_profile file:  alias via="vim `ls -rt | tail -1`" alias vib="vim `ls -rt | tail -2 | head -1`" alias vic="vim `ls -rt | tail -3 | head -1`" alias vid="vim `ls -rt | tail -4 | head -1`" alias vie="vim `ls -rt | tail -5 | head -1`"   The problem is that, weirdly enough, these commands don't work.  They open some file that isn't one of the last, or even a file was deleted from the current directory (I wonder if there's some kind of file cache updating issue in the directory.  This occurs on both my local machine and the cluster I work on).  However, if I type vim `ls -rt | tail -1` directly, without using the alias, it works every time. Show all the file up to the match grep --before-context 5 shows 5 lines before the match.  I want to show everything before the match. Doing grep --before-context 99999999 would work but it is not very... professional.  How to show all the file up to the match? Do badges get calculated in real time, or do they get calculated by an external service? How long does it take for a badge to be awarded, once its requirements are met?  Does Stack Overflow use any external services to do things, like maintenance, e-mailing or badge calculation? How can I redefine \int to put a negative space after the integral sign, but keep the limits properly set? I'd like to modify the \int command such that it adds an automatic negative space, e.g. \! after the integral sign. Preferentially, I'd like to be able to not edit any of my code, so cleverly redefining \int seems like my best option. Unfortunately, naive implementations get the limits wrong:  \documentclass{article} \usepackage[intlimits]{amsmath} \usepackage{ifthen}  \newcommand{\diff}[2][]{   \ifthenelse { \equal {#1} {} }   {\ensuremath{\mathop{\mathrm{d} #2}}}   {\ensuremath{\mathop{\mathrm{d}^#1 #2}}} }  \begin{document}  This is what I would want: \begin{equation}  \int_0^\infty \mspace{-4mu}\diff[3]{\boldsymbol r} f(\boldsymbol r), \end{equation} but with this ``user code", containing no negative spacing explicitly: \begin{verbatim}  \int_0^\infty \diff[3]{\boldsymbol r} f(\boldsymbol r), \end{verbatim} which for comparison with the above gives: \begin{equation} \int_0^\infty \diff[3]{\boldsymbol r} f(\boldsymbol r), \end{equation}  mostly because this gives me the option to remove it or change the spacing when I see fit. \end{document}   Which results in: Today I was thinking about composition of functions.  It has nice properties, its always associative, there is an identity, and if we restrict to bijective functions then we have an inverse.  But then I thought about commutativity.  My first intuition was that bijective self maps of a space should commute but then I saw some counter-examples. The symmetric group is only abelian if $n \le 2$ so clearly there need to be more restrictions on functions than bijectivity for them to commute.  The only examples I could think of were boring things like multiplying by a constant or maximal tori of groups like $O(n)$ (maybe less boring).  My question: In a euclidean space, what are (edit) some nice characterizations of sets of functions that commute? What about in a more general space?   Bonus: Is this notion of commutativity important anywhere in analysis? What's the difference between a method and a function? Can someone provide a simple explanation of methods vs. functions in OOP context? How to write a simple jQuery plugin Can you get a Windows (AD) username in PHP? I have a PHP web application on an intranet that can extract the IP and host name of the current user on that page, but I was wondering if there is a way to get/extract their Active Directory/Windows username as well. Is this possible? How does a  work, and what differentiates it from other linear classifiers, such as the , , or ? *  (* I'm thinking in terms of the underlying motivations for the algorithm, optimisation strategies, generalisation capabilities, and run-time complexity) $|G|>2$ implies $G$ has non trivial automorphism Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|&gt;2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center? Relative performance of std::vector vs. std::list vs. std::slist? How do I make a fully statically linked .exe with Visual Studio Express 2005? My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would like. Attempting to run one of these programs on an old (2001 vintage, not scrupulously updated) XP box gave me nothing but a nasty "System cannot run x.exe" (or similar) message.  Some googling revealed that with this toolset, even specifying static linking results in a simple hello-world.exe actually relying on extra .dll files (msvcm80.dll etc.). An incredibly elaborate version scheming system (manifest files anyone?) then will not let the .exe run without exactly the right .dll versions. I don't want or need this stuff, I just want an old fashioned self contained .exe that does nothing but lowest common denominator Win32 operations and runs on any old win32 OS.  Does anyone know if its possible to do what I want to do with my existing toolset ?  Thank you. When for the first time A new question I answer This haiku appears:     Little slab of meat   In a wash of clear jelly   Now I heat the pan   Such a message is Very strange; is anyone Seeing the same thing?  Have not seen again. Came and went like the wind does! Why I am so blessed? How to resolve a Java Rounding Double issue Seems like the subtraction is triggering some kind of issue and the resulting value is wrong.  double tempCommission = targetPremium.doubleValue()*rate.doubleValue()/100d;   78.75 = 787.5 * 10.0/100d  double netToCompany = targetPremium.doubleValue() - tempCommission;   708.75 = 787.5 - 78.75  double dCommission = request.getPremium().doubleValue() - netToCompany;   877.8499999999999 = 1586.6 - 708.75  The resulting expected value would be 877.85.  What should be done to ensure the correct calculation? When a spaceship is experiencing a constant acceleration of $10m/s^2$, the astronauts will be moving at nearly the speed of light after about a year in the earth's reference frame. This means the spaceship's energy will start to diverge as a function of the speed $v$ so there will be a huge amount of energy necessary to increase the speed of the ship any further. This way, the speed of light can never be crossed.  All of this is clear to me, but all of this is also formulated in earth's reference frame. But from the astronaut's reference frame: the spaceship is simply accelerating at $10m/s^2$ and so the force on the spaceship is constant. Then why would we need huge amounts of energy to accelerate the spaceship?  For example, I read somewhere that the amount of energy that would be needed to accelerate a large spaceship to half the speed of light is more than 2000 times the current world annual energy consumption. How does this make sense in the astronaut's (non-inertial) frame?