I am using this block of code for mannual logout but i want automatic logout after 5 minutes of inactivity on website. How to do that?  Thanks   &lt;?php session_start(); error_reporting(E_ALL); ini_set('display_errors', '1'); session_destroy();  if(!session_is_registered('username')) {   header("location: logout_msg.html"); } else {   print "&lt;h2&gt;Could not log you out, sorry the system encountered an error.&lt;/h2&gt;"; }  exit(); ?&gt;
I need to keep a session alive for 30 minutes and then destroy it.
After swapping the positions of the hour and the minute hand, when will a clock still give a valid time? This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of their usage.   When would one want to use an interface and when would one want to use an abstract class? How can I pay tolls on Japanese expressways? I'm renting a car soon in Japan and am planning to travel on the expressways. What's the best way to pay tolls? Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string? Let $f: K^\bullet \to L^\bullet$ be homotopy equivalence. From theory of triangulated categories it follows that $C(f)^\bullet$ is contractible. But how can i produce explicit formula for homotopy of $Id_{C(f)^\bullet}$ and $0_{C(f)^\bullet}$? I Roll To Seduce The Dragon! (or, Do doublings of proficiency bonus stack?) Lets say there exist some enterprising young bard 3/ sorcerer 1 named Kirk.   Deciding to uphold (long past) family tradition, he has chosen to go out and have a little half-dragon of his own.   He chose Persuasion as his expertise skill, and is of a dragon bloodline himself, gaining the Dragon Ancestry perk.  Do they stack? Not the same ability, and both say "Your proficiency is doubled" when they activate. Granted, it would only happen when dealing with dragons. But there are certainly worse times to ramp up your charm. Do not show ellipsis when not needed in search results When doing a search, the results page shows an ellipsis when it is not needed. For instance:    The message of that answer is shorter than the text overflow limit, which means the ellipsis (...) should not be shown. A lot of missing dependencies when I try to install all software I have problem with missing dependencies, when I try to install some software by apt-get and also from downloaded .deb files.  I am using Debian 10. After installation I removed a lot of software which I no needed eg. Deluge, some terminals (I have only LXTerminal now), some tools from Libre Office Packet etc.  Now, when I try to install Atom, TeamViewer, or some RDP tools, every time I got information about missing unresolved dependencies, common it is libgconf, libcurl etc.  How can I resolve this issue? Now I can not install a lot of must have software, and when I try to apt-get install this packets, I got error, that no libs with this name were found.  Here is my sources.list. Maybe it will be some tip to fix this problem:  deb http://security.debian.org/debian-security/ buster/updates non-free contrib main deb-src  deb-src http://security.debian.org/debian-security/ buster/updates non-free contrib main deb-src   deb http://deb.debian.org/debian/ buster-backports main contrib non-free  deb-src http://deb.debian.org/debian/ buster-backports non-free contrib main   deb http://ftp.de.debian.org/debian stretch main contrib non-free deb-src http://ftp.de.debian.org/debian stretch main contrib non-free   Stretch repos were added for test purposes, but when I comment them, it looks the same. How to iterate over arguments in a Bash script I have a complex command that I'd like to make a shell/bash script of.  I can write it in terms of $1 easily:  foo $1 args -o $1.ext   I want to be able to pass multiple input names to the script. What's the right way to do it?    And, of course, I want to handle filenames with spaces in them. I read this book in the mid-nineties, probably written in the 80s or 90s.  It’s set in the near future, where the world has experienced a sudden glaciation.  Most of the United States and Europe is now covered with ice.  Civilization has collapsed for the most part. The protagonist is a drifter with strange-colored eyes (yellow, I think).  Because of his weird eyes, he’s never really fit in anywhere.  He moves from place to place just trying to survive, but somehow he discovers that the new ice-age did not occur naturally.  It was engineered by extraterrestrials, to make their work easier.  They’re looking for the plans for a super-weapon - a weapon that can cause any star to go nova.  A rival group of aliens hid the plans for this weapon by encoding the information in the human genome millions of years ago.  The marker to identify humans who carry this gene is - you guessed it - yellow-colored eyes. How do i know which wheels will fit my bike? my bike is:  and everything I have came with the bike, only now the axle of the rear wheel bent and the skewer has lost its grooves.  and I would like to replace the rear wheel with the 12 x 142mm version of:   I want to reuse the old casettes and disc break. I was told to buy new rotor bolts, will these do?   Will I be able to migrate all my previous parts onto this new wheel and will the wheel fit onto my bike?  update: A replacement axle would be prefered. What axle would work for my bike? Can we use curved spacetime to measure the one-way speed of light? This is related to  and  The idea is to shine a beam of light from a clock towards a heavy mass, like a black hole, in some manner such that the curvature of spacetime around the mass is sufficient to &quot;bend&quot; the light directly back to the clock. That is, to send the light along a self-intersecting geodesic using a sufficiently curved spacetime. Note that in this case the source and the detector are the same object, so no clock synchronization is required. Hypothetically, this should measure the one-way speed of light. None of the given refutations from the similar posts on this site are convincing. Here are some of the main refutations, as I understand them, and my counter to them: (1) In being curved by spacetime, the light is actually changing direction, hence this is not the one-way speed. To my understanding of General Relativity, the light travels along a geodesic; that is, a curve such that, ignoring technicalities of Differential Geometry, its tangent direction is constant. There is no reflection or acceleration. So in this sense, how can the light with a constant tangent direction be said to change direction? One might say that the path deviates from a straight line in Euclidean space, but given that spacetime is not Euclidean, has no , and has no global notion of direction, this is the only definition of straight or &quot;one direction&quot; that makes sense. Thus, either the light does not change direction and is &quot;one-way,&quot; or we need to be clearer about what exactly we mean by &quot;one-way&quot; in the context of General Relativity. (2) Such an experiment would be impossible or impractical. I think some posters were saying this because the original questions implied that the clock would have to be at the event horizon of a black hole, which is of course impossible or impractical; however, I don't think such an extreme closeness to the black hole is required. Given that the  of a black hole, where light orbits in a circle, is outside of the event horizon, shining the light at some distance outside of the photon sphere should be sufficient to curve the light back to the clock, regardless of the distance of the clock from the black hole (see my rough illustration). At the extreme, we could place the clock directly on the photon sphere, which should be theoretically possible. Regardless, the question is not about practicality, but whether the one-way speed is theoretically measurable.  Update: Essentially what this argument boils down to, I think, is that the average speed of light along a single self-intersecting geodesic may differ from the average speed of light along a non-geodesic self-intersecting path, which is always c. Put that way, however, it does seem a little ridiculous. It is hard to see how the anisotropy of the speed could be defined in such a way as to be consistent with this pathological case. Presumably, we could approximate a single self-intersecting geodesic with a non-geodesic path arbitrarily closely, so, logically, the average speeds over each path should be approximately the same, i.e., c. Furthermore, how would the &quot;preferred direction&quot; of the speed of light behave around a black hole, for instance? Regardless, I still think this experiment does actually solve the problem for the given notion of &quot;direction&quot;. Though the problem is usually posed in the flat spacetime of Special Relativity, with a global notion of direction, so the apparent unanswerability of this question should be seen as a limitation of Special Relativity only, which is then solved by General Relativity. I need a quick algorithm to select 5 random elements from a generic list. For example, I'd like to get 5 random elements from a List&lt;string&gt;. I was laying on my bed, reading a book when the sun shone through the windows on my left. I happened to look at the wall on my right and noticed this very strange effect. The shadow of my elbow, when near the pages of the book, joined up with the shadow of the book even though I wasn't physically touching it.   I have posted :The video seems to be the wrong way up, but you still get the idea of what is happening.  What is causing this? Some sort of optical illusion where the light gets bent?  Coincidentally, I have been wondering about a similar effect recently where if you focus your eye on a nearby object, say, your finger, objects behind it in the distance seem to get curved/distorted around the edge of your finger. It seems awfully related...  EDIT: I could see the bulge with my bare eyes to the same extent as in the video! The room was well light and the wall was indeed quite bright. I have one website. I have two domain names that I want to point to the same site install.   So whether you go to name-one.com or name-two.com you see the exact same site.  Now, I can either set up name-two.com to serve 301 redirect header redirecting to name-one.com – or, I can set up name-two.com as a CNAME in the DNS pointing to name-one.com  What is the different implications for SEO on this? What is recommended?  I would guess it's better for branding to use a 301 redirect, so that visitors will see one consistent url for my site, right?  The reason I want the two domains is that I want a version with regional letters ('ö' instead of 'oe' ) in the name. How can I find maximum power transfer using Thevenin equivalent Formatting datetime2 in LaTex to 4th September, 2016 without the current day? I'm currently using  \usepackage[UKenglish]{babel} \usepackage{datetime}   and I'm getting  Sunday 4th September, 2016  with the commands \today or with \newdate{example}{01}{09}{2016} (outside of \begin{document}) and \displaydate{example} inside the document.  How can I reformat this date to not have the name of the day in it (Best would be with using datetime2)? So like 4th September, 2016. With the "th" as a high letter like this:   Full document example:  \documentclass[a4paper, 12pt, DIV=calc, headings=small]{scrreprt} %Used packages \usepackage[UKenglish]{babel} \usepackage[utf8]{luainputenc} \usepackage{datetime}  %Other definitions \pagenumbering{arabic}  \newdate{sample}{31}{01}{2017}   \begin{document} \displaydate{sample}\\ \today \end{document} Windows 8 upgrade Recovery Disk I have upgraded to Windows 8 from Win 7. I want to create a recovery disk for Windows 8, just in case something goes wrong. I didn't find the option of creating it from the control panel.  How do I create a Recovery CD/DVD? Install Linux from Linux Changing isometric drawing's constraint angles in Illustrator