Unable to implement pgrouting(plugin) pgr_astar routing algorithm (shortest path)
pgrouting unexpected output
Is it wrong to place the  tag after the  tag? Can't save settings after copying site to new server When I was in the university (in the late 90s, circa 1995) I was told there had been research investigating the $2$ (the square of distance) in the Newton's law of universal gravitation.  $$F=G\frac{m_1m_2}{r^2}.$$  Maybe a model like   $$F=G\frac{m_1m_2}{r^a}$$  with $a$ slightly different from $2$, let say $1.999$ or $2.001$, fits some experimental data better?  Is that really true? Or did I misunderstand something? $a\mid b,\ c\mid d\,\Rightarrow\ ac\mid bd $ $\ \, \bf\small [Divisibility\ Product\ Rule]$ I just need to check the reasoning in my proof is correct, I think it is valid although I'm not totally convinced because I can't follow the logic; does proving that $x$ is an integer prove that $ac|bd$?  Theorem: Let $a$, $b$, $c$, $d$ be integers. If $a|b$ and $c|d$, then $ac|bd$.  Proof: $aj=b$ and $ck=d$ for integers $j$, $k$. Then, $ac|bd$ implies $acx=ajck$ and thus $x=jk$ for some $x$. Since the product $jk$ is an integer, $x$ is an integer and thus $acx=ajck$ and thus $ac|bd$. What are the differences between a pointer variable and a reference variable in C++? I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable? How do we know for certain that space is expanding? Do DOM tree elements with ids become global variables? Best practice for Rails App to run a long task in the background? I have a Rails application that unfortunately after a request to a controller, has to do some crunching that takes awhile.  What are the best practices in Rails for providing feedback or progress on a long running task or request?  These controller methods usually last 60+ seconds.    I'm not concerned with the client side... I was planning on having an Ajax request every second or so and displaying a progress indicator.  I'm just not sure on the Rails best practice, do I create an additional controller?  Is there something clever I can do?  I want answers to focus on the server side using Rails only.  Thanks in advance for your help.  Edit:  If it matters, the http request are for PDFs.  I then have Rails in conjunction with Ruport generate these PDFs.  The problem is, these PDFs are very large and contain a lot of data.  Does it still make sense to use a background task?  Let's assume an average PDF takes about one minute to two minutes, will this make my Rails application unresponsive to any other server request during this time?  Edit 2:  Ok, after further investigation, it seems my Rails application is indeed unresponsive to any other HTTP requests after a request comes in for a large PDF.  So, I guess the question now becomes: What is the best threading/background mechanism to use?  It must be stable and maintained.  I'm very surprised Rails doesn't have something like this built in.  Edit 3:  I have read this page: .  I would love to read about various experiences with these tools.  Edit 4:  I'm using Passenger Phusion "modrails", if it matters.  Edit 5:  I'm using Windows Vista 64 bit for my development machine; however, my production machine is Ubuntu 8.04 LTS.  Should I consider switching to Linux for my development machine?  Will the solutions presented work on both? How can I use a variable in the replacement side of the Perl substitution operator? Variable name as a string in Javascript I read somewhere that according to relativity, it is possible - involving black holes and other stuff - to jump into the past. Is it possible for anything to go back in time either continuously or by jumping? I am trying to learn how to find the product of non-disjoint cycles, as you may have guessed from the title. I have the basic idea, but I do not understand it entirely.  I am trying to find $(1352)(256)$ and $(1634)(1352)$, multiplying from right to left.  Please give me some hints/suggestions.  Thank you. Allow an edit to notify downvoters: "I think I've fixed the issue now - please check" To me, a downvote usually indicates a problem with an answer. When I downvote it's to mark the answer as having a problem, not the person. If the answer is fixed, I want to remove that downvote - but it's tricky to keep track of all the questions I've looked at over the last few hours.  I don't actually downvote very much, but it's very easy to forget what's going on.  It would be nice to have some way of indicating in an edit that you (the editor/answerer) believe the reason for the downvote has now been resolved, so that the downvoters could come and undo their downvotes or explain why it's still not fixed.  (Note: this isn't about rep-recovery, but quality control. I would feel a lot better about downvoting on "iffy" answers if I felt it was likely that the answer would be fixed and I could undo the vote. Whether or not I'd get back the cost of the downvote is somewhat immaterial.) PS4 Controller not connecting to PS4 and won't reset? I was playing my PS4 two days ago and then packed it up with two controllers that were both connected to this PS4.   I got to where I was going, set everything up and now the controllers won't connect. They show pulsing orange when they plug in, but when I hit the PS Button to connect, it blinks white 1-2 times and goes back to orange.   I have tried resetting them both.  Can anyone help? What does the term "BODMAS" mean? What is BODMAS and why is it useful in programming? How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions.  A figure is supposed to spread over the entire text width, but I have two figures which are narrow and long, and I need to save the space in order to withstand the pages limit. The international Stack Overflow sites in Spanish, Portuguese, Russian, and Japanese seem to have a bug in their quick site descriptions (under their titles), for they all start with the word  For...  in English, instead of their respective languages As an example, the Spanish Stack Overflow site description is:  For programadores y profesionales de la informática  Obviously, this isn't something too big of a deal, but since they offer those sites in their respective languages, it would be nice if this issue were fixed. You can see this under &quot;More communities&quot; in the top bar.    You can also see this on the  page, where the descriptions begin with  Q&amp;A for... How iptables tables and chains are traversed I know linux has 3 built-in tables and each of them has its own chains as follow:  FILTER: PREROUTING, FORWARD, POSTROUTING  NAT: PREROUTING, INPUT, OUTPUT, POSTROUTING  MANGLE: PREROUTING, INPUT, FORWARD, OUTPUT, POSTROUTING  But I can't understand how they are traversed, in which order, if there is. For example, how are they traversed when:   I send a packet to a pc in my same local network when I send a packet to a pc in a different network when a gateway receives a packet and it has to forward it when I receive a packet destinated to me any other case (if any) I understand when we say current, we mean charge (protons/electrons) passing past a point per second. And the charges have energy due to the e.m.f. of the power supply.  Now tell me, if a lamp has resistance and you hook it in the circuit, how will the current stay the same? The charges obviously lose energy in the lamp and so become SLOWER, which should mean current decreases, right?  [Edit] All answers explained a bit of everything, so it was hard to choose one. If YOU are looking for an answer, please check the others too, in case the accepted one doesn't answer your question. Convert a comma delimited list of numbers to a hyphenated list or range