I am trying to calculate the point from a given lat/long, a bearing, and a distance.  This is for plotting weather given a aeronautical way point.   For example:  Given a waypoint with a known lat/long (LAX airport control tower), with a bearing of North by Northwest and a distance of 45 nautical miles, where is the point?  I could treat the world as flat, but I think the resulting calculations would be inaccurate the further north the point is since longitudes get more narrow near the poles.  I am mainly interested in plotting these points in the US.  Is there a projection that would help me do this?  This is for a Python application I'm writing, and the libraries I have access to are GDAL and Proj4 for projections. So no fancy tools like ArcGIS are available to me.  Ultimately I want to combine 4 or these calculated points to form a polygon that should roughly be about 100-200 miles in width and height.  Thanks!
There are several algorithms to calculate distance between two latitude/longitude points.     Hubeny     But there are not so many algorithms (actually I can't finally find it) which can calculate latitude/longitude of point B from another latitude/longitude point A with bearing and distance.      I'm glad to know if there are any algorithms which is lesser accurate, but faster than Vincenty's formulae.
Figure or longtabu/longtable causes bottom margin overflow I have been searching for a while now without any luck, so I hope you can help me. The problem is that when I insert a figure/longtabu on my page, the text below is running out of the page, like this image shows:    Do you know what the problem is here?  I have uploaded some sample code here: How to set shell to wrap words for long commands? how to prove the chain rule? I have just learnt about the chain rule but my book doesn't mention a proof on it. I tried to write a proof myself but can't write it. So can someone please tell me about the proof for the chain rule in elementary terms because I have just started learning calculus. Suspended user cannot award bounty I asked a question on Stack Overflow: . I want to award my bounty to  by user  However, my Stack Overflow account is suspended recently for 7 days, and the suspension still has 5 more days to end.And I know I can't vote, ask, answer or comment as pointed on  by  with the sentence below.  You will be unable to vote, ask, answer, or comment.  I couldn't find anything about not being able to accept an answer or award bounty so I tried to accept the mentioned answer above and award my bounty to it and I got a  Suspended users cannot vote  rejection which can be seen below with a screenshot.  I know this  If you do not award your bounty within 7 days, the highest voted answer created after the bounty started with at least 2 upvotes will be awarded half the bounty amount.  from . None of the answer given to my question is upvoted and the answer I mentioned is not the oldest one after the bounty started so it won't be awarded by community. What can I do? (except being a good guy and not get suspended :)) I am writing a small matrix library in C++ for matrix operations. However my compiler complains, where before it did not. This code was left on a shelf for 6 months and in between I upgraded my computer from debian etch to lenny (g++ (Debian 4.3.2-1.1) 4.3.2 ) however I have the same problem on a Ubuntu system with the same g++.  Here is the relevant part of my matrix class:  namespace Math {     class Matrix     {     public:          [...]          friend std::ostream&amp; operator&lt;&lt; (std::ostream&amp; stream, const Matrix&amp; matrix);     } }   And the "implementation":  using namespace Math;  std::ostream&amp; Matrix::operator &lt;&lt;(std::ostream&amp; stream, const Matrix&amp; matrix) {      [...]  }   This is the error given by the compiler:     matrix.cpp:459: error: 'std::ostream&amp;   Math::Matrix::operator&lt;&lt;(std::ostream&amp;,   const Math::Matrix&amp;)' must take   exactly one argument   I'm a bit confused by this error, but then again my C++ has gotten a bit rusty after doing lots of Java those 6 months. :-) Do I need a UK visa? How and where to apply? Automatically show connected mass storage devices on Windows desktop I need to show that for prime numbers of the form $p=4n+1$, $x=(2n)!$ solves the congruence $x^2 \equiv-1\pmod p$. I then need to show this implies p isn't a gaussian prime.   I have started to solve this using Wilson's theorem that a number $z$ is prime iff $(z-1)!\equiv-1\pmod z$. Therefore the endpoint of my proof should be that $(p-1)!\equiv-1\pmod p$.  As $p$ is of the form $p=4n+1$, I only need to prove that $4n!$ is congruent to $-1$ modulo $p$.   Here is my working so far: Starting with the congruence $x^2 \equiv -1\pmod p$:    $$\eqalign{x^2 = -1\pmod p&amp;\implies   x^2 + 1 = kp \implies (x-i)(x+i) = kp\cr &amp;\implies ((2n)!-i)((2n!)+i))=kp \implies 4n!- 1 =kp\cr}$$   This is where I start to run out of any ideas that seem to get me anywhere. Any tips would be greatly appreciated! Weird $3^n$ in an identity to be combinatorially proved I don't have complex analysis at my beck and call, and I only have a low level of knowledge in topology, but I need to prove that this metric space (for any real $r$ and $R$ with $r &lt; R$)$$ X = \{ (x, y) \in \mathbb{R}^2 \ | \ r \leq x^2 + y^2 \leq R \}$$  with the Manhattan metric $d((x_1, y_1), (x_2, y_2)) = |x_1-x_2| + |y_1-y_2|$ is not simply connected.  I've already prooven that it's path connected, and now I need to show there are some points $P$ and $Q$ with two paths between them such that one cannot be continuously 'morphed' into the other.  $ \ $  What I have so far is as follows:  I take $P = (0, r)$ and $Q = (0, -r)$, with $f_0$ being a path from $P$ to $Q$ going clockwise around the circle radius $r$ and $f_1$ being much the same but going counterclockwise.  Now I assume there is a function $g : [0, 1]^2 \to X$ such that:   $g(s, 0) = f_0 (s)$ $g(s, 1) = f_1 (s)$ $g(0, t) = P$ $g(1, t) = Q$   To get the final result, I need to show that this function cannot be continuous, but for the life of me I cannot.  For some context, these are the topics which have been visited during the course, roughly in order of recentness.   Multiple connectedness Simple connectedness Pathwise connectedness Interior points Boundary points Open sets Compactness Complete metric spaces Bounded metric spaces Totally bounded metric spaces Closed sets Closure of a metric space Limit points Cauchy sequences Convergence Continuity Metric space quivalence Metric equivalence   Edit: I might have an argument that works, though it's far from rigourous. We can shrink $R$ to be as close to $r$ as we want, so we can essentially constrain the annulus down to a circle and thus force any path from the left side of the circle to the right side to go through $P$ or $Q$.  So holding $s \in (0, 1)$ constant and varying $t$ must produce a path through $P$ or $Q$ for any $s$. If for some $s$ it passes through $P$ and for some other $s$ it passes through $Q$, then there must be $s_0$ such that $\forall \epsilon &gt;0  \ \exists \delta \leq \epsilon$ st. $s_0$ produces a path through $P$ and $s_0 + \delta$ produces a path through $Q$.  Now we can consider the path $g(s, \frac{1}{2})$, and note that it must have a discontinuity at $s_0$.  Now consider the case where all $s$ produce paths through only one of $P$ or $Q$. WOLOG: $P$. Now, at $t = \frac{1}{2}$, $s$ arbitrarily close to $1$ are mapped away from $Q$, but $1$ is always mapped to $Q$ by definition, so $g(s, \frac{1}{2})$ has a discontinuity at $s=1$. Therefore $g(s, t)$ is not continuous.  This argument is definitely iffy to me, if no one has their own argument (using sufficiently low level concepts), then criticism on the above would be appreciated. Read it in the 90's. I remember one specific part where the inventor of the peeking mechanic has his Eureka moment, and has the presence of mind to give a thumbs-up/wave to the future, when they look back on his Eureka moment.  I also remember that they had computer screens that were like plastic cloth that they would just unfold on whatever surface was handy.  Sorry I don't have much more to go on.  Please and thank you! How does IPv4 Subnetting Work? This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this? Aligning multiple figures/tikzpicture vertically and horizontally I'm trying to align four figures vertically and horizontally. But I couldn't get it right in spite of repeated tweaks.  Can someone help me out?   Here is a MWE -- there are no errors, but the figures don't come out scaled properly.  \documentclass[12pt]{llncs}  \usepackage{fullpage} \usepackage{graphicx}  \pdfoutput=1 \usepackage{epsf} \usepackage{epsfig} \usepackage{epstopdf} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} \usepackage{latexsym} \usepackage[all]{xy} %\pagestyle{empty} \pagestyle{plain} %\usepackage{algorithmic} %\usepackage{algorithm} \usepackage{hyperref} \usepackage{nameref} %\usepackage{MnSymbol} \usepackage{tikz} \usepackage{caption} \usepackage{subfig}  \begin{document}  \begin{figure} \captionsetup[subfigure]{width=2in} \begin{minipage}[t][4em][s]{.5\textwidth} \subfloat[First]{ %\begin{subfigure}[b]{\textwidth} \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]  \node (1) at (0, 0) {$a$}; \node (2) at (3.0, 0) {$s$}; \node (3) at (4.5, 0) {$s'$}; \node (4) at (7.5, 0) {$t'$}; \node (5) at (9.0, 0) {$t$}; \node (6) at (12.0, 0) {$b$};   \draw[-&gt;] (1) -- (2); \draw[-&gt;] (2) -- (3); \draw[-&gt;] (3) -- (4); \draw[-&gt;] (4) -- (5); %\draw (8) -- (7); \draw[-&gt;] (5) -- (6);  \end{tikzpicture} %\label{fig:sto} } %%\qquad % %\bigskip % \subfloat[Second]{ \label{fig:st} %\begin{subfgure}[b]{\textwidth} \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]  \node (1) at (0, 0) {$a$}; \node (2) at (3.0, 0) {$s$}; \node (3) at (4.5, 0) {$s'$}; \node (4) at (7.5, 0) {$t'$}; \node (5) at (9.0, 0) {$t$}; \node (6) at (12.0, 0) {$b$};   \draw[-&gt;] (1) -- (2); \draw[thick, dashed, -&gt;] (2) to[out=-100,in=-150] (1); %\draw (3) -- (2); \draw[-&gt;] (3) -- (4); \draw[thick, dashed, -&gt;] (4) to[out=-100,in=-150] (3); %\draw (5) -- (4); \draw[thick, dashed, -&gt;] (2) to[out=-250,in=-350] (4); \draw[thick, dashed, -&gt;] (3) to[out=100,in=150] (1);     %\draw (8) -- (7); \draw[-&gt;] (5) -- (6); \draw[thick, dashed, -&gt;] (6) to[out=-100,in=-150] (5);   \end{tikzpicture} } \end{minipage} \begin{minipage}[t][4em][s]{0.5\textwidth} \subfloat[Third]{ %\begin{subfigure}[b]{\textwidth} %\centering \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]  \node (1) at (0, 0) {$a$}; \node (2) at (3.0, 0) {$t$}; \node (3) at (4.5, 0) {$t'$}; \node (4) at (7.5, 0) {$s'$}; \node (5) at (9.0, 0) {$s$}; \node (6) at (12.0, 0) {$b$};   \draw[-&gt;] (1) -- (2); \draw[-&gt;] (2) -- (3); \draw[-&gt;] (3) -- (4); \draw[-&gt;] (4) -- (5); %\draw (8) -- (7); \draw[-&gt;] (5) -- (6);   \end{tikzpicture} } %%\qquad % \subfloat[Fourth]{ \label{fig:ts} %\begin{subfigure} \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]  \node (1) at (0, 0) {$a$}; \node (2) at (3.0, 0) {$t$}; \node (3) at (4.5, 0) {$t'$}; \node (4) at (7.5, 0) {$s'$}; \node (5) at (9.0, 0) {$s$}; \node (6) at (12.0, 0) {$b$};   \draw[-&gt;] (1) -- (2); \draw[thick, dashed, -&gt;] (4) to[out=-100,in=-150] (1); %\draw (3) -- (2); \draw[-&gt;] (3) -- (4); \draw[thick, dashed, -&gt;] (5) to[out=100,in=150] (1); %\draw (5) -- (4); \draw[thick, dashed, -&gt;] (2) to[out=100,in=150] (5); \draw[thick, dashed, -&gt;] (4) to[out=-100,in=-160] (2);   %\draw (8) -- (7); \draw[-&gt;] (5) -- (6); \draw[thick, dashed, -&gt;] (6) to[out=100,in=150] (3);  \end{tikzpicture} } \end{minipage} \end{figure} \end{document} How can I prove that the following summation converges? $$\sum_{n=0}^\infty \sum_{k=0}^n \frac{(-1)^n}{(k+1)\times (n-k+1)}$$  I tried to prove that by proving that the following summation in in absolute value converges so the original one converges too, but that's incorrect.  Any other ideas? I have the following code for my masterpage:  &lt;%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server" style="position:relative"&gt;     &lt;title&gt;Masterpage&lt;/title&gt;     &lt;asp:ContentPlaceHolder id="head" runat="server"&gt;     &lt;/asp:ContentPlaceHolder&gt; &lt;/head&gt; &lt;body&gt;     &lt;form id="main" runat="server" style="position:relative"&gt;     &lt;div&gt;         &lt;asp:ContentPlaceHolder id="MainContent" runat="server"&gt;         &lt;/asp:ContentPlaceHolder&gt;     &lt;/div&gt;     &lt;/form&gt;     &lt;br style="clear:both" /&gt;     &lt;form id="footer" style="position:relative"&gt;     &lt;div&gt;         &lt;center style="font-size:small"&gt;Footer content&lt;/center&gt;     &lt;/div&gt;         &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;   My problem is that when the MainContent isn't filling up the page the footer is not at the bottom of the page. Is there a way to force the footer to stay on the bottom of the page if the main content isn't pushing it all the way down? When the main content is "big" enough it pushes the footer down with the content and displays on the bottom when scrolling down, but not if it is to small.  Anybody know how to fix this? How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error     ! Package titlesec Error: Not allowed in `easy'   settings. If you multiclass a Warlock and a Sorcerer, then you have a character with both the Spellcasting and Pact Magic features.  PHB Page 101, Sorcerer, Spellcasting, Spell Slots:     You regain all expended spell slots when you finish a long rest.   PHB Page 107, Warlock, Pact Magic, Spell Slots:     You regain all expended spell slots when you finish a short or long rest.   PHB Page 165, Customization Options, Multiclassing, Class Features:     Pact Magic. If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature, and you can use the spell slots you gain from the Spellcasting class feature to cast warlock spells you know.   Do the spell slots keep their previous method of recovery (sorcerer slots long rest, warlock slots any rest), or do they all act consistently as I am led to believe from the language of the multiclass section? Do they all recover only from long rests as per the sorcerer feature, or can they all be recovered with a short rest because the warlock feature says so? JavaScript: getting ImageData without canvas Why Integer.getInteger does not work? What's the difference between STDIN and arguments passed to command?