How to get the difference between two dates in php
How to calculate the difference between two dates using PHP?
How do favored classes work in Pathfinder? I'm working on creating a half-elf paladin character for a Pathfinder game.  Full disclosure: this is the first time I've tried creating a character; I've used ones other people created before.  In the text, it mentions something about "favored classes" I believe.  What is this? Integer reciprocals in arithmetic progression Let $m_1,m_2,\ldots,m_k$ be $k$ positive integers such that their reciprocals are in AP. Show that $k&lt;m_1+2$. Also find such a sequence.     Whatever way I tried, whichever formula I used, I could not eliminate the $m_k$ term, which I reckon would be the ideal scenario to find the solution. I am exhausted of any further ideas, please help. Thank you. How does JavaScript .prototype work? I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this &quot;.prototype&quot; property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot. Should you include press interviews and articles about your work in your CV? Is it appropriate to include interviews (published online or in print magazines) in an academic CV?   What about articles/news published about your works? I mean brief (one paragraph) news that professional magazines publish about significant research articles.  If yes, how do you do this to avoid exaggeration? Is there a word for describing people who know many things but superficially? Is there an appropriate word for the antonym of "full-stack", as in programming? Someone who knows a lot of things just as a full-stack programmer, but without mastering them. Overriding the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider Background:  I have created a custom Auth. Provider in Salesforce to reach out to an authorization server that isn't on the default list of Provider Types. I used  as a good starting point to extend the Auth.AuthProviderPluginClass. Once appropriately added to my org, it then became an option on the list of Provider Types. I was able to create an Auth. Provider using that new provider type and it works to initiate the OAuth2.0 flow. I am appropriately able to get the access token and refresh token from the authorization server.  The Problem:  As it currently stands, we will have users click on a button that will send them to the provided "OAuth-Only Initialization URL" link that was generated when I created the actual Auth. Provider record. The trick is that when the OAuth2.0 flow is completed, the user is redirected back to the Salesforce Setup Home page, and I don't see a good way in the documentation to override the final destination to be something else (like a success page or something).  Question:  Does anyone know of a way to override the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider?    UPDATE: I tried using the startUrl (and also tried retUrl for good measure) as query params, but doing so didn't change the behavior after the OAuth2.0 flow finished.  Meaning, both of the following URLs gave me the same final destination as not having any query params at all:  https://&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?retUrl=lightning%2Fpage%2Fhome   https://&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startUrl=lightning%2Fpage%2Fhome     Another Update: This WORKED:  https:/&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startURL=%2Flightning%2Fn%2FCustomPage   Apparently, it was important to add the leading /, (of course, url encoded to be %2F) and %2Flightning%2Fpage%2Fhome gets interpreted as the setup home and sends you there.    (Parallel posted to Salesforce Dev Forum: ) How to read and write excel file Browsing folders with more than 100000 images How to monitor process/program execution in windows? We are trying to develop a small application that can monitor the programs/processes that are executing in a windows machine.  If the program/process is not supposed to run, it should be blocked. It works similar to an antivirus.  This is the basic idea.  I want to know the ways to hook into the OS to get notified about every single program/process trying to run in the machine. Theorem 13.9 in these  is the polynomial spectral mapping theorem:     Theorem 13.9 For a polynomial $p$ we have $\sigma(p(T)) = p(\sigma(T))$.     My questions:   First direction: Why would $q(T) (p(T) - p(\lambda) I)$ be an inverse for $T - \lambda I$? Update: @RobertIsrael said that instead $(p(T) - p(\lambda) I)^{-1} q(T)$ should be $(p(T) - p(\lambda) I)^{-1}$ be? According to the lines in the proof above, we have $$ (p(T) - p(\lambda) I)^{-1} = ((T - \lambda I) q(T))^{-1} \overset{?!}{=} q(T)^{-1} (T - \lambda I)^{-1}, $$ but as $\lambda \in \sigma(T)$ by assumption, $(T - \lambda I)^{-1}$ doesn't exist, right? For the second direction: Why does $x_i \in \sigma(T)$ imply that $p(x_i) - \mu = 0$? I thought that $x_i \in \sigma(T)$ only implies that $T - x_i I$ is not boundedly invertible. Since $\mu \in \sigma(p(T))$ we have that $p(T) - \mu I = c \prod_{k = 1}^{n} (T - x_i I)$ is not boundedly invertible but how does that help?   In both statements there seem to be a notion of "a product of operators is not invertible iff all factors aren't invertible", but how can that be true? Consider i.e. shift operators on a sequence spaces such that $ST = I$, i.e. the left and right shift operators, then the above mentioned notion doesn't hold, right? Python — How can I find the square matrix of a lower triangular numpy matrix? (with a symmetrical upper triangle) What are some ways to write object-oriented code in C? Especially with regard to polymorphism.    See also this Stack Overflow question . Does "singular" have a common meaning across matrices, decomposition, vectors and values? Pass Variable to Custom Block template file I want to create my custom block with custom content in Drupal 8,in start I create  Block with just simple text on it, and work correctly, my Problem is how can I pass my custom variable to it? I saw some tutorial about it , my Module name is tcdev and this is content of .module file.  function tcdev_theme($existing, $type, $theme, $path) {     return array('tcdev' =&gt;         array(             'variables' =&gt; array(                 'title' =&gt; 'Default title',                 'description' =&gt; null             ),             'template' =&gt; 'block--sliderblock'         )     ); }   and my SliderBlock.php       namespace  Drupal\tcdev\Plugin\Block; use Drupal\Core\block\BlockBase;   /**  * Provides a 'SliderBlock' block.  *  * @Block(  * id = "slider_block",  * admin_label = @Translation("Slider Block"),  * )  */  class SliderBlock extends BlockBase{     /**      * {@inheritdoc}      */     public function build(){         return array(             '#title' =&gt; 'my title ',             '#description' =&gt; 'my custom desc'         ); } }   and finally my template file block--sliderblock.html.twig    &lt;h2&gt;My Custom Block{{ title }}-{{ description }}&lt;/h2&gt;   But Result is only "My Custom Block-" . The problem is variables not getting passed to template file,where is my fault?  appreciate any help WOL - Wake On Lan over internet Is there a way to call process builder from Apex? Install on usb external hard drive I am new to ubuntu and i would like some help. I have a laptop with windows 7 installed but i would love to have ubuntu too because it's a great OS. So i would like to install ubuntu on an external usb hard drive (320 - 500 GB) and i have some questions about that :   Do i need a usb external hard drive which will be compatible with ubuntu - linux ? or i can do it with any hard drive  If i make a partition on it for ubuntu staff will i be able to use it and save other staff in the usb hard drive (movies,songs,documents etc) ? If i have ubuntu installed on the usb hard drive will i be able to boot ubuntu from any pc ? Are my changes going to be saved normally or my settings will be lost after shut down ?   Waiting for your answers, if something is not explain well tell me to try explain it better . Thank you! Weather Resistant Outlets vs Weather Proof Box I started using Sublime Text 2 a week or so ago and I loved it so much I've spent $60 on it and now want to use it for everything.  Gedit currently has ownership of most of the text file associations. I'd essentially like to replace any association to gedit with sublime-text-2.  Any tips available on bulk association changing? Desktop-neutral methods are preferred. derivative under integral intuition