Extended hours in php
Calculate time elapsed in php - spans over 24 hours
Can someone tell me how to get a closed form for  $$\sum_{k=1}^n k^p$$  For $p = 1$, it's just the classic $\frac{n(n+1)}2$.   What is it for $p &gt; 1$? Event binding on dynamically created elements? I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. Can I downgrade to an earlier version of Android after installing an OTA update? I installed the KitKat upgrade on my Nexus 7, but I am unhappy with it. Is it possible to roll back to an earlier version of Android (Jelly Bean)? I have 2 hard disks, on first I have installed win xp. I boot into xp and run setup of win7 and installed it on second hard disk. Now the problem is that win7 bootloader is installed on first harddisk, so if I remove the first harddisk, I cannot boot into win7.   How I can move / install bootloader of win7 on second hard disk? Equivalent of "both" when referring to three or more items? What would be the correct word to use when referring to three or more items, in the same manner as the word both?  For example, using two words, with the word both:     "There are several recommendations I   have to further improve the sites —   both to improve their profit, and   decrease their cost."   Using three words, with a blank space in place of the correct word:     "There are several recommendations I   have to further improve the sites —   _ to improve their profit, decrease their cost and improve their   usability."   So, what would be the correct word to use in place of the __? How do I kill entities at y=65? Potions can survive at y=65  One potion was thrown into the void, but instead of being killed, it just lingered there.  Any ideas to kill it? I can't just run /kill @e[type=!player,tag=test1]  (yes, the tag of the entity is indeed test1 ) What does it mean when it says under a journal article that it has been communicated by "XYZ" where XYZ is not the author but some other scholar with a very strong reputation? What is the relationship to the actual author and/or the content? Is this some sort of seal of approval to get results out and known quickly? (I am specifically wondering in the context of mathematics and mathematical physics.) In the header of my document I set the maximal author names to 2:  \usepackage[style=authoryear-icomp, maxbibnames=9, maxcitenames=2, backend=biber]{biblatex}   Now, when I cite texts with two authors, LaTeX gives me the following:     (Author_A/ Author_B 2012: 232)   When I have three authors or more, LaTeX makes it:     (Author_A/ Author_B et al. 2012: 232)   But I want LaTeX to just name the first author if there are more than two authors ... like this:     (Author_A et al. 2012: 232)   Any tips on how to achieve this ? Why don't shell builtins have proper man pages? All shell builtins share the same manual page:  BUILTIN(1)                BSD General Commands Manual               BUILTIN(1)  NAME      builtin, !   etc.   Then there is a little text describing what shell builtins are, and then a list that  looks something like this:    Command       External    csh(1)    sh(1)        !             No          No        Yes        %             No          Yes       No   But if we do man grep we get sections such as   Bugs History See also Standards Description   etc.  Don't shell builtins have their own history, description and arguments like -A or -r? Why isn't that provided in the manual pages and how would I learn to use them correctly and efficiently? The difference between sys.stdout.write and print? Fastest way to clamp a real (fixed/floating point) value? Is there a more efficient way to clamp real numbers than using if statements or ternary operators? I want to do this both for doubles and for a 32-bit fixpoint implementation (16.16). I'm not asking for code that can handle both cases; they will be handled in separate functions.  Obviously, I can do something like:  double clampedA; double a = calculate(); clampedA = a &gt; MY_MAX ? MY_MAX : a; clampedA = a &lt; MY_MIN ? MY_MIN : a;   or  double a = calculate(); double clampedA = a; if(clampedA &gt; MY_MAX)     clampedA = MY_MAX; else if(clampedA &lt; MY_MIN)     clampedA = MY_MIN;   The fixpoint version would use functions/macros for comparisons.  This is done in a performance-critical part of the code, so I'm looking for an as efficient way to do it as possible (which I suspect would involve bit-manipulation)   EDIT: It has to be standard/portable C, platform-specific functionality is not of any interest here. Also, MY_MIN and MY_MAX are the same type as the value I want clamped (doubles in the examples above). Why time is considered a dimension? Disabled submit button on form vs allow submit then show errors? We have a few different forms as part of a web-based medical application. These forms have quite a few fields - 10-20 depending on the form. Each has at least 5 or so required fields. We currently disable the save button until those required fields are all completed.  We've been debating whether it's a better user experience to make the submit button enabled by default and then display an error message (and highlight missing required fields) if the submit button is clicked before all required fields are filled out.  Any research or sound opinions on what might be better? We're leaning towards the latter approach since our forms are pretty long -- allowing them to submit then find errors might be more efficient than the cognitive load of searching through the form to see why the button isn't enabled. How to activate hyphenation in \ttfamily without explictly setting a font? I am suprised that in the code below no hyphenation is done. And I can not find something about that on the web. Maybe I used the wrong words for searching.  \documentclass{scrartcl} \usepackage{xltxtra} \usepackage{polyglossia} \setdefaultlanguage[spelling=new]{german} \usepackage{tabu}  \begin{document} \begin{ttfamily} \begin{tabu} spread \textwidth {X[l]|X[l]|X[l]|X[l]}     A&amp;     B&amp;     Sichtweise, Haltung, Akzeptanz, useability, Anwenderfreundlichkeit&amp;     D\\ \end{tabu} \end{ttfamily} \end{document} ERROR running force:source:pull: Entity of type 'CustomApplication' named 'Contact' cannot be found Expanding electromagnetic field Lagrangian in terms of gauge field What is LookDev/Material Preview mode for in 2.8? How do we explain the behavior of \rput, \psGetNodeCenter and saveNodeCoors? Introduction  I am writing a tutorial on a short introduction to PSTricks for newbies. I got obstacles to explain how  a node A (for example), \rput, (!\psGetNodeCenter{A} A.x A.y) and (!N-A.x N-A.y) work by design.  I have read the pst-node documentation as shown below.      And the following is taken from page 35-36:    The manual says:   The transformation matrix will be reset by \psGetNodeCenter. (!N-A.x N-A.y) is not affected by \rput.   Even though I read it many times, I still get confused. The statements are too short.  Problem  Please consider the following figure for the remaining discussion.     Case 1  A node A is defined outside \rput and a dot is translated by \rput.   with (!\psGetNodeCenter{A} A.x A.y)  \pnode(2,2){A} \rput(1,1){\psdots(!\psGetNodeCenter{A} A.x A.y)}  with (!N-A.x N-A.y)  \pnode(2,2){A} \rput(1,1){\psdots(!N-A.x N-A.y)}    The results are different. \rput only affects (!N-A.x N-A.y). Case 2  A node A is defined inside \rput and a dot is translated by \rput.   with (!\psGetNodeCenter{A} A.x A.y)  \rput(1,1){\pnode(2,2){A}\psdots(!\psGetNodeCenter{A} A.x A.y)}  with (!N-A.x N-A.y)  \rput(1,1){\pnode(2,2){A}\psdots(!N-A.x N-A.y)}    The results are identical. \rput affects both. Case 3  A node A is defined inside \rput and a dot is defined outside \rput.   with (!\psGetNodeCenter{A} A.x A.y)   \rput(1,1){\pnode(2,2){A}}  \psdots(!\psGetNodeCenter{A} A.x A.y)  with (!N-A.x N-A.y)   \rput(1,1){\pnode(2,2){A}}  \psdots(!N-A.x N-A.y)    The results are different. \rput only affects (!\psGetNodeCenter{A} A.x A.y).   The MWE is given as follows.  \documentclass[margin=12pt]{standalone} \usepackage{pst-node} \addtopsstyle{gridstyle}{gridlabels=5pt} \psset{saveNodeCoors,linecolor=red} \everypsbox{\color{blue}} \begin{document}  \begin{psmatrix} \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 1-A}     \pnode(2,2){A}     \rput(1,1){\psdots(!\psGetNodeCenter{A} A.x A.y)} \end{pspicture} &amp; \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 1-B}     \pnode(2,2){A}     \rput(1,1){\psdots(!N-A.x N-A.y)} \end{pspicture} \\ % case 2 \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 2-A}     \rput(1,1){\pnode(2,2){A}\psdots(!\psGetNodeCenter{A} A.x A.y)} \end{pspicture} &amp; \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 2-B}     \rput(1,1){\pnode(2,2){A}\psdots(!N-A.x N-A.y)} \end{pspicture} \\ % case 3 \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 3-A}     \rput(1,1){\pnode(2,2){A}}     \psdots(!\psGetNodeCenter{A} A.x A.y) \end{pspicture} &amp; \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 3-B}     \rput(1,1){\pnode(2,2){A}}     \psdots(!N-A.x N-A.y) \end{pspicture} \end{psmatrix} \end{document}   Question  How do I have to explain their behaviors to the newbies as the statements in the documentation seem to be unclear?  Note: As (!\psGetNodeCenter{A} A.x A.y) is identical to (A), (A) will not be discussed here.     If you are a teacher, how do you explain it to your   students? I have heard many (rather most) people, especially in the USA, saying:      I don't know nothing about it.   Is that correct? I always get a weird feeling hearing this and feel the correct one would be saying:     I don't know anything about it. I recently switched from my beloved MacBook Pro Retina (Late 2013) i5 2.6/16/512 to MacBook Pro (2017) Non-TB i5 2.3/16/512.  I purchased what from the build-quality looked like a good USB-C-to-DisplayPort cable with 4k/60Hz support, just to run into the very problem the Logicboard repair guru Louis Rossmann had described in : As soon as you plug in the USB-C dongle, the (2.4 GHz) Wifi stops working despite full antenna signal. Unplug the USB-C connector and you are immediately back in the game.  The big question I'm asking myself now: Who is to blame? Is this a design flaw in the current generation MacBooks with improper shielding or is it a design flaw in the various dongles?  I mean the fact that even Apple’s very own USB-C Digital AV Multiport Adapter is causing these WiFi issues (as you can learn from the many horrific ; but AFAIK have been fixed through a ), show that there’s something going horribly wrong.