How to calculate days between two dates by using JavaScript?        How to get only 'day' from the date.   How to get only 'month' from the date.   How to get only 'Year' from the date.   How to calculate 'year' from the 'days'      This type of questions are have Answer is below refer it
How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  &lt;input id="first" value="1/1/2000"/&gt; &lt;input id="second" value="1/1/2001"/&gt;  &lt;script&gt;   alert(datediff("day", first, second)); // what goes here? &lt;/script&gt;
How do you clone a Git repository into a specific folder? Executing the command git clone git@github.com:whatever creates a directory in my current folder named whatever, and drops the contents of the Git repository into that folder:  /httpdocs/whatever/public   My problem is that I need the contents of the Git repository cloned into my current directory so that they appear in the proper location for the web server:  /httpdocs/public   I know how to move the files after I've cloned the repository, but this seems to break Git, and I'd like to be able to update just by calling git pull. How can I do this? I have problem with CRS Bosnia and Herzegovina?  MGI 1901 / Balkans zone 6  EPSG:3908 MGI 31276 / Balkans zone 6  EPSG:31276  Which of these two is OK? When I open google sattelite image with openlayers plugin, MGI 1901 match an image, when I change to MGI 31276 vector layer mismatch about 300m. When I import my layers to Global Mapper, datum of vector is "MGI Austria"   I need this projection: Why are cancer rates low in large animals? Large animals generally have more cells and live longer than smaller animals. For example,  live up to 200 years and weigh up to 100 tonnes, as opposed to humans (living ~ and weigh ~) and  (10–25 g, &lt;1 year in the wild). Hence, whales have an immense number of cells and those cells are subjected to environmental carcinogenic influences (chemicals, UV) for a longer period of time.   Cancer is caused by random mutations and those random mutations are basically stochastic processes. Given their long life span and larger number of cells, shouldn't larger animals have a substantially higher chance to develop cancer? In fact, story goes that bowhead whales in fact only , and less so compared to humans? Is there a way to change the environment variables of another process in Unix? How can I chroot sftp-only SSH users into their homes? How to permanently turn off online results I don't like getting online results when searching in my dashboard, so I went to System Settings &gt; Security &amp; Privacy &gt; Search, and I turned the setting off:    But when I restart my machine, the setting is always reset to:    So how can I permanently disable it without it turning on again after a restart?  Information Update:  I have had a look at the post that this has been marked as a possible duplicate of, and I don't think that my question really is a duplicate of it, as the other question is asking about how to set it globally, and I am not, I am only wanting to set it for one user, so the fact that it is not global is not the problem, the problem is that it is not sticking for that one user, and just resetting to its default state after a restart. In fact, I don't want it to be set globally, and the answers from the other question only really explain how to do that.    OS Information:  Description:    Ubuntu 15.04 Release:    15.04   Package Information:  unity:   Installed: 7.3.2+15.04.20150420-0ubuntu1   Candidate: 7.3.2+15.04.20150420-0ubuntu1   Version table:  *** 7.3.2+15.04.20150420-0ubuntu1 0         500 http://gb.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages         100 /var/lib/dpkg/status Connected graph with colored edges We have connected undirected graph with colored edges in two way (green or blue). And also each vertex have the same number of green and blue edges. How to prove that there are alternate colored (green-blue) path between any two nodes? "Heard me [infinitive]" vs. "heard me [present participle]" "Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why? Why do light disappears the moment we switch off the source (inside the wooden box)? Normally to remove files with spaces in their filename you would have to run:  $ rm "file name"   but if I want to remove multiple files, e.g.:  $ find . -name "*.txt" | xargs rm   This will not delete files with spaces in them. Is it possible to legally visit uninhabited islands in the Pacific for a couple of days/weeks like Robinson Crusoe Do you know any way how can I visit uninhabited islands in the Pacific (French Polynesia, Micronesia etc.) and stay there for a couple of days or weeks?  The only condition, these island (or islands) should have drinking water.  Could it be done legally or only illegally?  Does any company do such crazy things via plane or boat?  Any information is appreciated.  I am mostly interested in French Polynesia.  Boat or plane... that's not very important. in a topological space only finite subsets are compact sets If in a topological space only finite subsets are compact sets, is it then the discrete topological space?   Thank you. Azure Same Storage on VM get the Eyes of the Dark feature (XGtE, p. 51):     When you reach 3rd level in this class you learn the darkness spell [...] If you cast it with sorcery points, you can see through the darkness created by the spell.   Does this mean that if a Shadow Sorcerer casts darkness using sorcery points and then moves into a different area of magical darkness (not the one s/he created), the Sorcerer would not be able to see?  Or does the ability mean that the Sorcerer would possess the ability to see through the magical darkness created by the darkness spell in general (provided they were maintaining their own casting of the spell)? When "Questions that may already have your answer" (similar questions) appear as a right column, it overflows and overlaps the footer.  (shown in the figure)        This happens on all SE network sites on which I have asked questions.  Also this happens to other columns also like "How to Format". Is it possible to use more than 20 layers? Is it possible to use more than 20 Scene layers or Render layers in Blender? Problem: A lot of the time I downvote something that clearly shows lack of research or effort on OP's part, and when they edit to improve it, I usually find out pretty late, because there are no notifications to help with that.  Proposition: add a Get notified when this post is edited button/checkbox under a post which you have downvoted (per post, not just all posts ever), so that if there is a significant improvement, you could remove your downvote or even change it to an upvote to show you recognize the improvement.  I believe this would improve public thinking about votes, and make people (who choose to participate like this on the SE sites more often) vote more freely and more often, and everybody else would not think of a &lt;0 post score as a death sentence for their contribution.  I'm not asking to enable this on SO (for a number of obvious reasons), and that's why I propose an opt-in subscription. This would be most useful on lower activity sites like the SE, in my opinion, but who knows.    I want to know if someone has improved their post after a downvote to reinforce the positive behavior and I get -4 on my good intentions? What kind of culture are you trying to cultivate? Please, explain why you disagree without silently downvoting. If you think there's a better way, yes, I want to know your thoughts. I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this? I want to install the latest Firefox on my Ubuntu (64bit) box.  What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place? Why three-phase power? Why not a higher number of phases? Is there a reason, beyond historical reasons, that three phases has become the dominant number of phases?  I am aware of the advantages against one phase and two phase, namely the reduced amount of conductor needed, and that motors can provide torque when stalled (and less pulsation).  Is this solely due to diminishing returns, with only a small increase in smoothness of torque application, at the cost of increased complexity (increased number of wires (albeit of smaller CSA)).  To be clear, the phases are all evenly distributed, that is, five phases separated by 72 degrees.