How to recognize which virtual environment is being used
Easy way to determine the virtualization technology of a Linux machine?
Show bigger amplitude of physical pendulum means bigger period Suppose you have a physical . It is true that as amplitude increases, the period increases. Can we demonstrate this fact without explicitly finding the period (which is pretty involved and pretty messy) in:    an intuitive fashion,  rigorously? Flight reservation for Schengen visa I am not asking about the two factor authentication process where the user needs to enter both a password and a one-time-password.  Gmail recently (I don't know from when exactly) changed their login process which is depicted in the following screenshot:     So, the new steps are as follows:   Enter email   Click Next  Enter password   Click Sign In    as opposed to the previous and usual way of logging in:   Enter email and password   Click Sign In    Isn't the new process non-user friendly requiring extra user interactions?  Since, Google does not usually make UX blunders can you explain the reasoning behind the new process? I'm looking for details like user interaction simplicity or any other hidden advantages.  Note: The question  doesn't cover the reason behind the change while Mervin Johnsingh's answer cites Google's reason. Which command / configuration file controls the open file limits on OS X?  Is there a different command for OS X 10.5 / 10.6 / 10.7?  The options I explore below are ulimit, sysctl, and launchctl  "Too many open files" is apparently a common error on Leopard, perhaps other versions of OS X:        There are many (related?) ways to view the open file limits:  $ ulimit -a core file size          (blocks, -c) 0 data seg size           (kbytes, -d) unlimited file size               (blocks, -f) unlimited max locked memory       (kbytes, -l) unlimited max memory size         (kbytes, -m) unlimited open files                      (-n) 2048 pipe size            (512 bytes, -p) 1 stack size              (kbytes, -s) 8192 cpu time               (seconds, -t) unlimited max user processes              (-u) 512 virtual memory          (kbytes, -v) unlimited   $ launchctl limit cpu         unlimited      unlimited       filesize    unlimited      unlimited       data        unlimited      unlimited       stack       8388608        67104768        core        0              unlimited       rss         unlimited      unlimited       memlock     unlimited      unlimited       maxproc     1024           2048            maxfiles    2048           4096         $ sysctl -a | grep files kern.maxfiles = 32768 kern.maxfilesperproc = 16384 kern.maxfiles: 32768 kern.maxfilesperproc: 16384 kern.num_files: 2049   It has been claimed in some of the above posts that these can be modified with the following commands:  sudo launchctl limit maxfiles 16384 32768 sudo ulimit -n 32768 sudo sysctl -w kern.maxfilesperproc=16384 sudo sysctl -w kern.maxfiles=32768   However, out of the above commands, only the sysctl commands have any apparently effect (i.e. ulimit -n and launchctl limit show no change after the above commands have been entered, while sysctl -a does show the requested changes).  The corresponding locations to change these parameters for the OS are:  /etc/sysctl.conf /etc/launchd.conf   I also discovered one  which reads that ulimit only controls the current shell.  How can I adjust upwards the max files / max open files limits on macOS? Mathoverflow - why so different Curious why  (se site) doesn't have hot questions list on the right.  It also uses the old stackoverflow design.  Why has this site's design and functionality been abandoned (or at least look abandoned?) How can I set an external display (monitor) as the primary one? Currently the MacBook's display works as primary, so every application I open gets open on the 13" and I have to drag it to the 24". I also don't have access to the dock on my 24".  Is is possible to turn off the MacBook screen and use only the one attached via DVI?  (I've just connected my 24" HP LP2475w via Mini DisplayPort to DVI to my MacBook Pro 13", which works great except for this one thing.) Probability expected value football problem The number of injuries at a college football game has the following probability distribution:      $$\begin{array}{|l:l|} \hline \textrm{Number of injuries} &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 \\ \hdashline \textrm{Probability} &amp; 0.14 &amp; 0.33 &amp; 0.23 &amp; 0.17 &amp; 0.09 &amp; 0.04 \\ \hline \end{array}$$      The coach must file a report whenever there is more than one injury in any game.      a. Calculate the expected number of reports filed in the next 20 games.      b. Calculate the standard deviation of the number of reports filed in the next 20 games.      c. Calculate the expected number of football games to be played before the first game in which there are at least four injuries. Are there any downsides to passing structs by value in C, rather than passing a pointer? Are there any downsides to passing structs by value in C, rather than passing a pointer?  If the struct is large, there is obviously the performancd aspect of copying lots of data, but for a smaller struct, it should basically be the same as passing several values to a function.  It is maybe even more interesting when used as return values. C only has single return values from functions, but you often need several. So a simple solution is to put them in a struct and return that.  Are there any reasons for or against this?  Since it might not be obvious to everyone what I'm talking about here, I'll give  a simple example.  If you're programming in C, you'll sooner or later start writing functions that look like this:  void examine_data(const char *ptr, size_t len) {     ... }  char *p = ...; size_t l = ...; examine_data(p, l);   This isn't a problem. The only issue is that you have to agree with your coworker in which the order the parameters should be so you use the same convention in all functions.  But what happens when you want to return the same kind of information? You typically get something like this:  char *get_data(size_t *len); {     ...     *len = ...datalen...;     return ...data...; } size_t len; char *p = get_data(&amp;len);   This works fine, but is much more problematic. A return value is a return value, except that in this implementation it isn't. There is no way to tell from the above that the function get_data isn't allowed to look at what len points to. And there is nothing that makes the compiler check that a value is actually returned through that pointer. So next month, when someone else modifies the code without understanding it properly (because he didn't read the documentation?) it gets broken without anyone noticing, or it starts crashing randomly.  So, the solution I propose is the simple struct  struct blob { char *ptr; size_t len; }   The examples can be rewritten like this:  void examine_data(const struct blob data) {     ... use data.tr and data.len ... }  struct blob = { .ptr = ..., .len = ... }; examine_data(blob);  struct blob get_data(void); {     ...     return (struct blob){ .ptr = ...data..., .len = ...len... }; } struct blob data = get_data();   For some reason, I think that most people would instinctively make examine_data take a pointer to a struct blob, but I don't see why. It still gets a pointer and an integer, it's just much  clearer that they go together. And in the get_data case it is impossible to mess up in the way I described before, since there is no input value for the length, and there must be a returned length. Is there a package to secure rendered pdf with a password? Is there a package and command that can secure rendered pdf with a password? Batch Rename (remove specific character) Files $SU(2)$ is the covering group of $SO(3)$. What does it mean and does it have a physical consequence?  I heard that this fact is related to the description of bosons and fermions. But how does it follow from the fact that $SU(2)$ is the double cover of $SO(3)$? Validate date format in php How do the Chitauri "ships" propel themselves? In the 2012 The Avengers film, the Chitauri army arrives through the portal along with these big robot alien whale Chitauri dudes. Here's one chasing Iron Man:  These guys basically swim through the air like... giant robot alien whales. I don't see any means of propulsion. Other, more humanoid Chitauri soldiers fly around on things that seem to be mechanical &quot;speeders&quot; of sorts. What are these guys? Are they ships, creatures, or both? Is there an explanation anywhere in the Avengers universe for how they defy gravity and swim through the air? Adding a CTAN package to a MacPorts-maintained TeX installation I have installed TeXlive through MacPorts and now discover that I am missing some package. For clarity let's use a trivial example and say I am missing lipsum.sty.  I now have two options:  Option 1  I go to a CTAN site, look for lipsum.sty, download it, and install it in ~/Library/texmf/tex.  This is not bad, but it leaves it possible that I will end up with a second lipsum at some point. That's why the second option is desirable.  Option 2  2.1-- I find out which MacPorts package includes lipsum.sty  and  2.2-- I sudo port install the necessary package.  How do I do 2.1? Why is $(2, 1+\sqrt{-5})$ not principal in $\mathbb{Z}[\sqrt{-5}]$?   Say $(2,1+\sqrt{-5})=(\alpha)$, then since $2\in(2,1+\sqrt{-5})$ we have $2\in (\alpha)$, so $\alpha\mid2$ in $\mathbb Z[\sqrt{-5}]$. Writing $2=\alpha\beta$ in $\mathbb Z[\sqrt{-5}]$ and taking norms, $4=N(\alpha)N(\beta)$ in $\mathbb Z$, so $N(\alpha)\mid4$ in $\mathbb Z$. Similarly, since $\sqrt{-5}\in(\alpha)$ we get $N(\alpha)\mid5$, thus $N(\alpha)$ is a common divisor of $4$ and $5$, therefore $N(\alpha)=(1)$, so $\alpha$ is a unit. But that means $1\in (2,1+\sqrt{-5})=(\alpha)$, so it must be the whole ring, but it cannot to reach a contradiction, so how can I find an element, which is not in $(2, 1+\sqrt{-5})$.  Or is there a simpler method ? (Maybe not UFD would imply not PID) I have a card with a due date of today. The task is complete, and we've moved it to our "Done" list.  How can I update the card so that the due date icon is not red implying that it is late while retaining the date for historical reference? Expectation of the Maximum of iid Gumbel Variables I keep reading in economics journals about a particular result used in random utility models. One version of the result is: if $\epsilon_i \sim_{iid}, $ Gumbel($\mu, 1), \forall i$, then:   $$E[\max_i(\delta_i + \epsilon_i)] = \mu + \gamma + \ln\left(\sum_i \exp\left\{\delta_i \right\} \right),  $$  where $\gamma \approx 0.52277$ is the Euler-Mascheroni constant.  I've checked that this makes sense using R, and it does.  The CDF for the Gumbel$(\mu, 1)$ distribution is:  $$G(\epsilon_i) = \exp(-\exp(-(\epsilon_i - \mu)))$$  I'm trying to find a proof of this and I've had no success.  I've tried to prove it myself but I can't get past a particular step.   Can anyone point me to a proof of this?  If not, maybe I can post my attempted proof up to where I get stuck. A result of Stieltjes Integral While studying the Riemann - Stieltjes integral, I read this exercise in my book:  "Let $f:[a, b]\to \mathbb{R}$ be a bounded function. Denoted $L(P, f)$ the lower Darboux sum and $|P|$ the mesh of the partition $P$. Prove that for every $\epsilon&gt;0$, there exists $\delta&gt;0$ such that for every partition $P$ with $|P|&lt;\delta$, we have: $\underline{\int_{a}^{b}}f(x)dx-L(P, f)&lt;\epsilon$."  My question is: Can we generalize this problem for Stieltjes integral, with $\underline{\int_{a}^{b}}f(x)d\alpha$ instead of $\underline{\int_{a}^{b}}f(x)dx$?  Particularly, can we have this theorem?  Let $f:[a, b]\to \mathbb{R}$ be a bounded function and $\alpha$ is a monotonic function on $[a, b]$ . Denoted $L(P, f, \alpha)$ the lower Darboux sum and $|P|$ the mesh of the partition $P$. Prove that for every $\epsilon&gt;0$, there exists $\delta&gt;0$ such that $\underline{\int_{a}^{b}}f(x)d\alpha-L(P, f, \alpha)&lt;\epsilon$ for every partition $P$ with $|P|&lt;\delta$?  I don't know how the mesh of the partition relate to the function $\alpha$. Does one need to adjust for multiple comparisons when using MANOVA? There are 10 dependent variables and 2 groups. When I wanted to compare 10 dependent variables between two groups, I performed MANOVA.  I wonder if there is a multiple comparison problem in that case. Should I have performed Bonferroni correction because of 10 dependent variables? Or is Bonferroni useless because MANOVA just does analysis once? Is there a way in javascript to detect if the unload event is caused via a refresh, the back button, or closing the browser?