Here is my javascript code:  var prevDate = new Date('1/25/2011'); // the string contains a date which                                       // comes from a server-side script                                       // may/may not be the same as current date  var currDate = new Date();            // this variable contains current date     currDate.setHours(0, 0, 0, 0);    // the time portion is zeroed-out  console.log(prevDate);                // Tue Jan 25 2011 00:00:00 GMT+0500 (West Asia Standard Time) console.log(currDate);                // Tue Jan 25 2011 00:00:00 GMT+0500 (West Asia Standard Time) console.log(prevDate == currDate);    // false -- why oh why   Notice that both dates are the same but comparing using == indicates they are not the same. Why?
Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.
I have seen other similar questions but they don't seem to be what I want, please correct me if I'm wrong.  For simplicity: delete the default cube, NumPad7, add cylinder, rotate X 90, then add torus with ext/int 1/0.75 and raise it above the cylinder. It should look like this:.  What I want is to deform the torus against the cylinder, but make it as if it's a projection. This means that, when looked from above, it will look like a normal, undeformed torus (volume changes), but when viewed with NumPad1, it will look like a round-end tube following the curvature of the cylinder, while still having the same round cross-section. To make it worse, my object needs to be deformed by a more complex surface, such as sin(x).  If I'd use soft body, it will look shrinked when looking from above, i.e. it will preserve the volume. If I use shrinkwrap, it either does a projection with its circumference intact, but all flat, or it will project it (similar to what I want), but only the bottom side vertices, like a curtain.  Mesh modifier gets me nowhere since I have to manually tweak the surrounding mesh, and curve modifier also preserves the length/volume, while also squishing the section of the torus at the bending points.  My question(s): is there a way to project (mold) the torus onto the cylinder while preserving it's cross-section? Can this be extended for more complex meshes to be projected or to be projected on?    This is, roughly, what the side view (along Y axis in the 1st pic) would look like after the deforming of the torus:    The unselected shape above is the torus (as it is in the first picture), and the selected shape is what it would look like after the deform, or molding, whatever you want to call it.  And here is what it would look like when seen from above (top view, along Z axis)): i.stack.imgur.com/HVOCo.png (can't add more than 2 pics)  The view would be the same before and after the torus is deformed. Show that $a(-1) = (-1)a = -a $. I have been attempting this problem for a while, it is an assignment problem so I don't want somebody to just post the answer, I'm just looking for hints.  Let $\mathfrak{u}(n,\mathbb{C})$ be the Lie algebra of strictly upper triangular $n\times n$ matrices over $\mathbb{C}$.  I am trying to show that $\mathfrak{u}(n,\mathbb{C})$ is a nilpotent Lie algebra for $n\geq 2$.  This is what I have looked at so far.  I have done some explicit calculations (I shall omit the bulk of them and just summarise below) for $n=2,3,4$ and have come up with some ideas.  Let $L=\mathfrak{u}(n, \mathbb{C})$.  If $n=2$,  $L^1 = [L, L] = &lt;0&gt;_{\mathbb{C}}$  So $L$ is nilpotent.  If $n=3$,  $L^1 = [L, L] = &lt;e_{13}&gt;_{\mathbb{C}}$  $L^2 = [L, L^1] = &lt;0&gt;_{\mathbb{C}} = \left\{ 0 \right\}$  So, $L$ is nilpotent.  If $n=3$  $L^1 = [L,L] = &lt;e_{13},e_{14},e_{24}&gt;_\mathbb{C}$  $L^2 = [L,L^1] = &lt;e_{14}&gt;_{\mathbb{C}}$  $L^3 = [L, L^2] = &lt;0&gt;_{\mathbb{C}} = \left\{ 0 \right\}$  So, $L$ is nilpotent.  So my hypothesis so far is that for an arbitrary $m\in\mathbb{N}$, $L^{m-1}=\{0\}$  My instinct is to do this by induction. My base case, $n=2$ has already been shown. Now I assume that $\mathfrak{u}(n,\mathbb{C})$ is nilpotent for $n=k$ ($k\in\mathbb{N}$) and consider the case for n=k+1.  However, I have no idea how to link these two cases together. I have read in Introduction to Lie Algebras and Representation Theory - J.E. Humphreys that $L^k$ should be spanned by basis vectors $e_{ij}$ where $j-i=k+1$ - however in my calculations for $L^1$, I obtain an $e_{14}$ which does not satisfy 4-1=2.  Am I missing something completely obvious? Or have I made a mistake somewhere? (I have checked my calculations numerous times, but cannot find any errors!)  Thanks,  Andy. The more I use Stack Exchange, the more it is getting a knowledge-base for me. All questions, that I need for later reference I mark as favorite. Now I need to store these pages locally on my laptop. It is really time-consuming:  I could use Ctrl+S on each favorite question page  on Linux: there could be a solution with wget -N -r -l 1 &quot;https://stackoverflow.com/users/1069083/rubo77?tab=favorites&quot;  this will download all favorite questions but it creates no correct index.html Another approach would be to use the  to automatically follow into all your Stack Exchange-accounts. But that would have to be somehow limited to only favorites links on your  in each stack. cross-platform: You would need a firefox-plugin that downloads links recursively but only within the favorite-area of the  in your stack  Additionally, I would like to  and Help with math symbols in BibTeX I am writing a PhD thesis using LaTeX. Every thing is going fine, but I have problem with the output of the mathematical symbols in the references lists. I copy one example from the Pdf file to make it clear for you. You can see that the fraction remains the same.      [1] Mezzacapo, F. and Cirac, J. I. (2010) Ground-state properties of   the spin-\frac{1}{2} antiferromagnetic Heisenberg model on the   triangular lattice: a variational study based on entangled-plaquette   states. New. J. Phys., 12,   103039.   You can see below the all the packages I use:  \documentclass[12pt,PhD,twoside,a4paper]{GB_muthesis}%[10pt,PhD, singlespace] \usepackage[pdftex]{graphicx} \usepackage[bookmarks=true,colorlinks=true,linkcolor=blue, urlcolor=blue,citecolor=blue]{hyperref} \usepackage[numbers,comma, sort&amp;compress]{natbib} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathtools} \usepackage{rotating} %\usepackage{GE_manthesis} \usepackage{GB_thesis} \usepackage{bm} \usepackage{fmtcount} \usepackage{setspace} \usepackage{chapterbib} \usepackage{subfigure}% allow subfigures \usepackage{amsfonts} \usepackage{url, enumitem} \usepackage{lscape} \usepackage{notoccite}%This package is for ingnoring the citation in the caption of the figures and tables. \begin{document} This might be a duplicate of  but that question is 5 years old and unanswered.  When I'm in drive.google.com and I open a G Suite file (either double-click or select &amp; press enter) in Firefox it opens in a new window whereas in Chrome it opens in a new tab.   Why do they do that? Is this a browser-specific quirk or a Google setting (that I haven't found)? Is there a way to control the behavior? I'd like them both to open in tabs, but presumably the same answer would be relevant in the opposite direction too. jQuery Event Handler created in loop Examples and further results about the order of the product of two elements in a group Let $G$ be a group and let $a,b$ be two elements of $G$. What can we say about the order of their product $ab$?   says "not much":     There is no general formula relating the order of a product $ab$ to the orders of $a$ and $b$. In fact, it is possible that both $a$ and $b$ have finite order while $ab$ has infinite order, or that both $a$ and $b$ have infinite order while $ab$ has finite order.   On the other hand no examples are provided. $(\mathbb{Z},+), 1$ and $-1$ give an example of elements of infinite order with product of finite order. I can't think of any example of the other kind! So:   What's an example of a group $G$ and two elements $a,b$ both of finite order such that their product has infinite order?     Wikipedia then states:     If $ab = ba$, we can at least say that $\mathrm{ord}(ab)$ divides $\mathrm{lcm}(\mathrm{ord}(a), \mathrm{ord}(b))$   which is easy to prove, but not very effective. So:   What are some similar results about the order of a product, perhaps with some additional hypotheses? How to find all the subclasses of a class given its name? Using Gnome 3.18. I share files between other family members, but the default umask on my distro (archlinux) is 0022. So every file/directory created is not writable for our common group.  I tried to put umask 0002 in /etc/profile but the gnome session is still using 0022. It's working for a login bash shell, though.  I also tried to add this line in /etc/pam.d/system-auth:  session   required  pam_umask.so umask=0002  It has the same effect as the one in /etc/profile. I tried  If I change the umask manually in a gnome-terminal shell, then I launch an application from it, say gedit, then the files created by it have the wanted permissions. If I launch gedit from the gnome menus, it doesn't. So my matter is really to set the umask for the gnome session, and I can't find where to do it.  EDIT (to answer Gilles' comment): I'm using gdm 3.18 as the DM. I also tried to add the pam_umask line into /etc/pam.d/gdm-launch-environment. All other gdm-* files contains includes of session from the system-auth file, so they should not need more. It doesn't change anything.  /etc/login.defs contains UMASK 077 but also USERGROUPS_ENAB yes which should set the umask to either 0077 or 0007 for users whose primary group is the username.  The only file that contains 022 for umask in /etc is /etc/profile but that was my first try.  As for /etc/Xsession.d, I don't have this directory. Besides, as wayland is now the default display server, I'm not sure the umask should be set as part of X initialisation, even if I'm still using it myself. Mirror cells so that a change in either cell updates the other I have 2 cells containing the same picklist values on separate sheets. I want the cells to mirror each other so that whenever I choose a new value in either sheet 1 or sheet 2, the value on the other sheet is updated to match the newly selected value. Is this possible?  UPDATE   Worksheet 1:   Worksheet Name: 'Live Forecast Tool' Cell containing picklist: C3:D3 (merged) Picklist values within range: ='SF MRF'!H5:Y5  Worksheet 2:   Worksheet Name: 'AH' Cell containing picklist: C3:D3 (merged) Picklist values within range: ='SF MRF'!H5:Y5    Cell C3:D3 needs to update to show the value that has been changed on the other sheet. If asking a question or giving instruction towards a group of objects where the number is unknown (and possibly could be one) what is the correct way to phrase the sentence? Which of the following sentences are more correct:     Has there been any studies regarding this and if so what has been the   conclusion?   OR     Has there been any studies regarding this and if so what have been the   conclusions? How to install tzdata on a ubuntu docker image? I have the following line in the Dockerfile.  RUN apt-get install -y tzdata   When I run it, it asks for my input. After I provided my input, it hung there. Does anybody know how to solve this problem?  Step 25/25 : RUN apt-get install -y tzdata  ---&gt; Running in ee47a1beff84 Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed:   tzdata 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 189 kB of archives. After this operation, 3104 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 tzdata all 2018i-0ubuntu0.18.04 [189 kB] debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (This frontend requires a controlling tty.) debconf: falling back to frontend: Teletype dpkg-preconfigure: unable to re-open stdin:  Fetched 189 kB in 1s (219 kB/s) Selecting previously unselected package tzdata. (Reading database ... 25194 files and directories currently installed.) Preparing to unpack .../tzdata_2018i-0ubuntu0.18.04_all.deb ... Unpacking tzdata (2018i-0ubuntu0.18.04) ... Setting up tzdata (2018i-0ubuntu0.18.04) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline Configuring tzdata ------------------  Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located.    1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc   2. America     5. Arctic     8. Europe    11. SystemV   3. Antarctica  6. Asia       9. Indian    12. US Geographic area: `` I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today).  After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt:  BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs)   I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me.  I tried the method described , and after the final command   mount -t ntfs-3g /dev/sda1 /root -o force   it does nothing and gives me another (initramfs) prompt.  I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it.  One more question: using the command fdisk -l how can I tell which mount point (sda1/sda2) is my windows partition and which one is Ubuntu? I am a photography newbie and have only a 18 - 135mm canon kit lens at my disposal. I wanted to take macro shots but can't really afford a macro lens right now. One very optimistic goal of mine is to capture a single snow flake this winter.   Is there any cheap(er) way to take macro shots? Also, any specific advice from anyone one how to go about photographing a single snow flake. Let $z \in \Gamma (R)$ where this is the upper semi circle centred at the origin with radius $R&gt;1$. Let $z=x+iy$ with $x \in \mathbb{R}$ and $y \geq 0$. So   $$|e^{i \lambda z}|=|e^{i \lambda z}| |e^{- \lambda y}|= |e^{- \lambda y}|$$  where $\lambda \in \mathbb{R}^{+}$.  How can the last equality possibly be true? How do hashes really ensure uniqueness? This might seem an impractical and unnecessary conversation, but I feel it's something I need to clarify. Especially, as I just got my first developer job in a blockchain startup.  So hashes are said to generate the same thing for any information it sees, and it's only a one-way interaction.   As far as I understand, hashes are just long alphanumeric strings. If one computes hashes across all documents, keys, information, files, etc, over and over again- it's simply a matter of time until the same combination comes up again for different information (applying it across all possible contexts)? This might be an impractical test given size and possibility, yes, but is it this that makes hashes powerful, that it's practically impossible to recreate a hash that for any foreseeable endeavor it's fine, or is there some element that I'm missing that reduces even that extremely low probability to zero? Is there any design constraint that prevents a very powerful computer to back-calculate the original data from a hash? Or is it simply that the design is so complex that it's simply a futile exercise to dream of such a large computer required for this task? What's stopping a hacker or malicious middle man to hack open the software program or library that creates this "hash" and then use that library to create hashes of his/her own or mislabel some target company's hash with his/her own pointing to their version of the file? Especially since many applications, languages, and developers use hashing independently. Whichever is most weakly secured, we can use that to take on the rest?   Any resources are also appreciated. A bounce-rate attack to manipulate SEO? This is a question to experienced people that might help us shed some light on the issue.   We noticed a very strange behavior on our site, in Google Analytics. Some dude from Finland, namely, from Kouvola city is hitting one of our pages - only one page on our site, 'bout a hundred times per day, all with an average bounce rate of 90%+...  This is causing our overall bounce rate to go up by 1 to 3% per day... which is very disturbing.. since we're trying to do our best in order to keep it as low as possible. And obviously having it jumped from ~24% to 27%, just because of that crazy dude is not making us happy at all... We tried implementing a geo-targeted script in order to catch this particular visitor and deliver him a juicy message, and it seemed like it helped in the beginning, it has stopped for a day or two, but now he's back...   The geo-targeted script was also logging all IP addresses for page requests originating from Finland in order to find out more details and (in order to block them on the server level, later).. but thing is, it was all mainly cable or DSL connections with various, but not constantly repeating IPs... we are all wondering what is he up to really ?   I think that this page should be kept updated with ideas on how to combat this and perhaps someone could also shed light on what it might be ? What is the reason for doing this "bounce-rate attack", as I call it?  There was a similar question asked on stackoverflow earlier, with no meaningful answer - here - How do I get Siri to pronounce my name correctly? Siri doesn't pronounce my name correctly. I tried editing the phonetic spelling as it says on many sites, but it doesn't fix the problem. How do I fix this problem? What happened to the link to the duplicate when a question is closed as a duplicate? Possible Duplicate:          This question:      has been closed as an exact duplicate, but there is no link to the duplicate so we can neither assess whether the closure is valid nor see the explanations in the duplicate question.  It wasn't so long ago that the duplicate links were shown &mdash; is there a policy change (and if so, why?), or is it just a glitch?