I know that date format "dd/mm/yyyy" can be achieved like this:  var d = new Date(); var day = d.getDate(); var month = (d.getMonth() +1); var year = d.getFullYear();  document.write("Today is " +day+ "/" +month+ "/" +year+ "&lt;br&gt;");   Date picker   var x = new Date(document.getElementById("dateSelection"));   However how can I convert those to a single date object so I can then compare it against date picker in a simple statement like this:  if (d &gt; x) {    document.write("Date from the past"); } else if (d &lt; x) {    document.write("Date from the future"); } else {    document.write("Date equals today's date"); }   Thanks for help I'm novice at this.
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.
Looking for a word like "eulogy", but for a person that has not died? I was thinking of words like the "background" of a person? Their overall qualities summarised into a short form. Eulogy might be a bad example, as it implies praise. A word meaning "a summary of someone's traits and characteristics." I am attempting to return an integer (itemcount) of the items within a SP2013 list. I have done this easily using the stock standard json method. However I have a need of counting the splist items which contain a certain value. My silly knowledge immediately lead me to try and use filtering with the ItemCount parameter only to find out that it will always still return the count for all items and it will completely ignore the filter. I have searched for a way of doing this but have found absolutely nothing other than a single page with a comment stating that it is not possible with the REST api and that it can ONLY be done using CSOM.  My question is, firstly, is it true that there is NO way to filter itemcount with REST? If so, how else can I obtain my item count using this type of filtering? (Examples or sources will help vastly) Thanks.  Below is my attempted request:  var itemid = item.id;           MyService.ensureFormDigest(function (fDigest) {               $http.get(                   MyService.appWebUrl + '/_api/web/Lists/getbytitle(\'Items\')/ItemCount?$filter=SubjectsID eq' + itemid,                   {                       headers: {                           'Accept': 'application/json; odata=verbose',                           'X-RequestDigest': fDigest                       }                   }).success(function (d) {                       item.itemcode = d.d.ItemCount;                       alert(item.itemcode);                       callback();                   }).error(function (er) {                       alert("Error getting List Item Count: " + er);                   });           });       }   On another note, I was advised to try it as such: /Items?$filter=SubjectsID eq 3&amp;$select=Id  Then in the JS, in my success method:  data.d.results.length Proving $1-\exp(-4x^2/ \pi) \ge \text{erf}(x)^2$ For a polynomial $p(z)$, prove there exist $R>0$, such that if $|z|=R$, then $|p(z)|\geq |a_n|R^n/2$ For a polynomial $p(z)=a_0+\ldots+a_nz^n$, prove there exist $R&gt;0$, such that if $|z|=R$, then $|p(z)|\geq |a_n|R^n/2$.  I get $|p(z)|\geq |a_n|R^n$, which makes that factor of $1/2$ useless. So I must have done something wrong.  $$|\frac{\partial^n{f}}{\partial z^n}(P)|\leq \frac{\sup_{z\in \overline{D}(P,r)} |f(z)|k!}{r^k}$$. This is the Cauchy estimate.   $$|\frac{\partial^n{p}}{\partial z^n}(z)| = |a_n n!|$$ $$|\frac{\partial^n{p}}{\partial z^n}(0)|\leq \sup_{\zeta\in \overline{D}(0,|z|)} |p(\zeta)|n!/R^n$$ $$|a_n n!|\leq \sup_{\zeta\in \overline{D}(0,|z|)} |p(\zeta)|n!/R^n$$ $$R^n |a_n|\leq \sup_{\zeta\in \overline{D}(0,|z|)} |p(\zeta)|$$  There exist a $z_0$, such that $|z_0|&gt;0$ and $$\sup_{\zeta\in \overline{D}(0,|z_0|)} |p(\zeta)| = |p(z_0)|$$.  This is saying there exist a disk centered at the origin, such that $|p|$ is maximum on some point on the boundary.   Let $R=|z_0|$, we have $R^n |a_n|\leq |p(z_0)|$  Edit: I know what I got wrong. $z_0$ is just one point on the circle $|z| = R$. One can chose another point $z_1$ on the circle, such that $p(z_1)&lt;p(z_0)$. Use filecontents environment to write a binary file In  of mine, I was trying to show how to embed an audio file into the pdf with the multimedia package. The resulting MWE does not stand on its own because it requires an example audio file.  I guess my first question is, does TeXLive include any example audio files? The second, and potentially less uninteresting question is, can I use the filecontents environment, or some other environment, to create a binary file?  \documentclass{article} \usepackage{graphicx} \usepackage[implicit=false]{hyperref} \usepackage{multimedia}  % What goes in here to produce a usable wav file. Happy to use a different environment. \begin{filecontents}{\jobname.wav} \end{filecontents}  \begin{document} \sound[inlinesound]{\includegraphics{example-image}}{\jobname.wav} \end{document} What is the difference between a 'closure' and a 'lambda'? If I take the $k \in \mathbb{N}$ power of 10 and mod it by a large prime, I notice that the remainders repeat at some point.  For instance $10^k mod~7$ seems to repeat every $8$th value of $k$.  Given $k$ (the power of ten), and a large prime number $p$, how can I compute the size of the cycle?  I tried writing a python script that computes the first instance of a repeat. However, I don't know if this works since a single instance of a repeat may not necessarily mean a full cycle. I've got a Canon EOS camera that takes a BP-511 battery.  The specs on the battery are 7.4V and 1100mAh.  The battery is dead and I want to buy a replacement, but I'm looking at a third party battery, because it's much cheaper than the Canon branded one.  I've found one with very high reviews online, and it seems identical except that it's rated at 1500mAh instead of 1100mAh.  So the question is: is this difference important to the camera or not? I want to use the top half of the circle to make a cut but whenever I apply the boolean modifier, the circle just stays there and becomes attached to my other object.  I've managed to make the cut in a standard cube but not sure why it's not working for this...? How does virtualizing differ from emulation, in terms of structure? Someone told me that a virtualizing program like VirtualBox does not work like an emulator does in the sense that it doesn't emulate registers and uses the actual ones for the virtualized data that are on the CPU. Emulators must emulate the registers since they are mostly to execute software that depends on a foreign environment (e.g. a Genesis emulator needs Motorola 68000's registers and memory addresses, so developer must make these resources available as emulated registers).  My main question is, how is virtualization developed? How do we enable an entire OS to run as a process in a virtual machine, but get it to run independently while still making use of the actual CPU? I only know emulation, not virtualization, so if anyone could help that'd be nice!  PS: I am not asking solely what the difference is, but differences in how they run software. Difference between ' and " on command line (bash)? I used to use '' and "" (single and double-quotes) interchangeably on the command line, but I recently noticed that '$HOME/some/dir' is not expanded, while "$HOME/some/dir" is. I searched around a little bit and found that "" allows some protection of special characters, while '' allows full protection. So what other characters are protected by '' and not ""?  EDIT: What are practical situations in which these differences might be significant? What kind of lubrication should I use for a lock? I recently made the Yale lock on my front door much easier to open by spraying some WD-40 in there.  However, I just saw  on WD-40 not being a “true” lubricant, and wondered whether it was appropriate to use on Yale locks? How is a Kelvin Pod different than a standard Escape pod? Is there a single word for a "friend of a friend"? I am looking for a word that I could use instead of "friend of a friend". On certain occasions, it happens that you may want to talk about a friend of a friend with someone else.   In such cases how would you refer to this friend? jQuery Validate Plugin - How to create a simple custom rule? How do you create a simple, custom rule using the jQuery Validate plugin (using ) that doesn't use a regex?  For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked? I was thinking of the noted 1980 paper by Sidney Coleman and Frank de Luccia--"Gravitational effects of and on vacuum decay"-- about metastable vacuum states that could tunnel to a lower energy "true vacuum" with catastrophic results. I suspect the answer is that if our vacuum is a false one, we wouldn't "see" the true one til it hit us. What could cause this? f12:    Viewport:    (the f12 has fewer samples, but even when the viewport is at lower samples it looks different..)  I know about color management, but that is at the defaults..    EDIT: oops.. I know 'log' is not a default, but that is because I was fiddling with it. The image above is rendered with 'default'    The material is quite simple, only a translucent shader. (for testing) I even tried appending everything into a new file to reset all the settings, but no difference.  EDIT2: Uploaded blend What's the standard "roadmap" to learning quantum physics? I'm really interested in quantum physics and would like to learn more. However, I don't know where to start and in what order I should learn things. So, ideally I'm looking for some sort of roadmap of what to learn. What physics topics do I need to know to start learning about quantum mechanics? (In addition to the mathematical topics mentioned at )  My current knowledge is mostly popular science stuff, like tv shows on Discovery Science and National Geographic Channel. So I have a basic understanding of some basic principals. There's also a recent lecture from Brian Cox that I have watched which gave a bit more in-depth information. Im not familiar with Ubuntu or Linux in general but have succesfully installed dual-boot windows7/Ubuntu on a single harddisk on my private PC. I used the "Install Ubuntu alongside them"-option.   On my work PC I have an existing windows 7 64-bit installation that boots from BIOS firmware on a SSD drive (C:), and have my working data (documents etc) on a partition on a separate disk (D:). I now want to install Ubuntu (v 14.04.3) on the remaining unformatted space on D:\ using with the option of choosing system using GRUB. There are of cause fine descriptions around (e.g.  and ). My question is how to setup the partitions in the "something else"- option during the Ubuntu installation.   In  tutorial they assume that all partitions on the D-drive can be deleted; however I only obviously want to keep the working data on the existing D-partition, and place Ubuntu on the residual space (or part of it) on the D:-drive.  A) How is this ensured ? B) how many partitions should I make (boot, root, home, swap ?)  C) and should boot be made primary, and the others logical ? D) Should I set Device for boot loader installation as/dev/sdb - will this not erase the existing D-partion ? How do I bake chocolate chip cookies like Subway? I want a chocolate chip cookie like the ones Subway has. Those cookies have a smooth top and chewy texture.  I have a recipe for 3/4 cup fat, 0.5 cup sugar 0,5 cup brown sugar, 3/4 cup flour, 1 egg, 2 tsp extract. I get a semi stiff dough, but also an airy cookie, not as dense like Subway. I use room temperature margarine.  I have tried to bake cookies with 2 eggs and with 1 egg, but they always come out wrinkly on top, not as stiff. Is it possible that using an egg and a yolk would work? (But wouldn't that waste a lot of whites if that's how they do it?)  I think as part of this I want a stiff dough, that'll leave the bowl clean, to minimize spread and keep the tops from getting wrinkly as stiffness will keep the the cookies from expanding and contracting. Is that true? If so, I'm afraid that if I add more flour to stiffen the dough will make the cookies cakey - is that the case? How would I avoid that?