Logarithmic yscale in imshow
How to plot an image with non-linear y-axis with Matplotlib using imshow?
How do I log every command executed by a user? I want to monitor all user's activity in my server.  Even when the user executes a shell command from some editor like vim I want to see them in the log file.  I have checked the tool acct but it is not listing the complete commands. (Please correct me if I have missed some options which does already).  Which Linux tool I should be looking at to solve this problem? What does "$$" mean in the shell? Let $X$ be a beta distributed variable with parameters $a$, $b$. Let $Y$ be a beta distributed variable with parameters $c$, $d$. Let $Z = \max(X, Y)$.  Does anybody know of a fast way to compute the mean and variance of $Z$ given $(a, b, c, d)$?  $X$, $Y$ don't necessarily need to have beta distributions, but they should be similar -- in $[0, 1]$.  What I really want to find is a way to quickly approximate the distribution of the sample max of a bunch of random variables. Let $Z = \max(\{X_1, X_2,\dots , X_n\})$. If I know parameters (not necessarily beta-distribution) for $X_1, X_2,\dots, X_n$, can I quickly compute a set of parameters (same distribution as $X_i$) to form a distribution that closely approximates $Z$?    EDIT: To clarify, the purpose of this has to do with programming AI for board games. If we are evaluating a position in a chess game and we determine one move leads to a 60% chance of winning while all others have a 20% chance of winning, then we value the position as a 60% win. This is the minimax algorithm... However, what I'm curious about is whether this can be improved upon. In the simple case, we approximate: $$ \mu_c = \max(\{\mu_1, \mu_2,\dots, \mu_n\}) $$ where $\mu_c$ is the expectation from the current position and $\mu_i$ is the expectation from each of the sub-trees.  It seems like we should be able to do better than this. Can we find a function f that replaces max and closely approximates parameters for the distribution of the sample maximum? $$ (\mu_c, \sigma_c) = f\left(\{(\mu_1,\sigma_1), (\mu_2,\sigma_2), \dots, (\mu_n, \sigma_n)\}\right) $$ In this case, we still want $\mu_i$ to be the expectation from each of the nodes. However, $\sigma_i$ does not necessarily need to be variance/standard deviation; just a parameter that represents uncertainty.  Just as: $$ \max(\{a, b, c\}) = \max\left(\{\max(\{a, b\}), c\}\right) $$ We should expect: $$ f\left(\{a, b, c\}\right) \approx f\left(\{f(\{a, b\}), c\}\right) $$ So $f$ does not necessarily need to take parameters for more than two nodes.  One thing, however, is that $f$ should be relatively fast to compute. If the integrals must be calculated, I think doing double exponential integration might work well, but I'm not sure -- Rationale behind pronunciation of "subtle" Can I enable the Windows 7 Start menu in Windows 10? I've upgraded from Windows 7 to Windows 10 and now I only find this new slower Start menu with all the tiles in it   (picturesource: )  Can I enable the older Windows 7 one again which suites my needs more? What is the role of NS records at the apex of a DNS domain? $ORIGIN example.com. ; not necessary, using this to self-document  $TTL 3600 @        IN     SOA   ns1.example.com. admin.example.com. (                       1970010100 7200 1800 1209600 300)  @        IN     NS   ns1.example.com. @        IN     NS   ns2.example.com.  @        IN     A    198.51.100.1 ns1      IN     A    198.51.100.2 ns2      IN     A    198.51.100.3  sub1     IN     NS   ns1.example.edu.  sub2     IN     NS   ns1.sub2 ns1.sub2 IN     A    203.0.113.1 ; inline glue record   The role of a NS record beneath the apex of a domain is well-understood; they exist to delegate authority for a subdomain to another nameserver. Examples of this above would include the NS records for sub1 and sub2. These allow the nameserver to hand out referrals for portions of the domain that it does not consider itself authoritative for.  The purpose of the NS records at the apex of a domain, ns1 and ns2 in this case, seem to be less understood by the internet at large. My understanding (which may not be holistic) is as follows:   They are not used by caching DNS servers in order to determine the authoritative servers for the domain. This is handled by , which is defined at the registrar level. The registrar never uses this information to generate the glue records. They  used to delegate authority for the entire domain to other nameservers. Trying to do so with software such as ISC BIND will not result in the "expected" referral behavior at all, as the nameserver will continue to consider itself authoritative for the zone. They are not used by the nameserver to determine whether it should return authoritative responses (AA flag set) or not; that behavior is defined by whether the software is told to be a master or a slave for the zone. Most nameserver software will quite happily serve apex NS records that disagree with the information contained by the upstream glue records, which will in turn cause well-known DNS validation websites to generate warnings for the domain.   With this being the case, what are we left with? Why are we defining this information if it doesn't appear to be consumed by caching DNS servers on the internet at large? This is from page 3 of  ().  Copying the relevant segment:     Stirling’s approximation tells us $\sqrt{2\pi n} (n/e)^n \leq n! \leq e^{1/12n} \sqrt{2\pi n} (n/e)^n$. In particular we can use this to say that   $$ {n \choose k} \leq \left(\frac{en}{ k}\right)^k$$   I tried the tactic of combining bounds from $n!$, $k!$ and $(n-k)!$ and it didn't work. How does this bound follow from stirling's approximation? The muffins were rock hard, what did I do wrong? Why, with Springer's  svmono template, do the letters written with the \mathcal font change? It seems that \mathcal becomes \mathscr.  Edit: Look at this image:    With the svmono template \mathcal returns the first alphabet and not the (classical) latter.  Here the packages I use in my document:  \documentclass[envcountsame,envcountchap]{svmono}  \usepackage{subfiles} \usepackage[utf8]{inputenc}  \usepackage{mathptmx} \usepackage[bottom]{footmisc} \usepackage{microtype} \usepackage{stmaryrd}    \usepackage{amsmath} \usepackage{courier} \usepackage{mathrsfs}  \usepackage{amssymb}  \usepackage[all,cmtip]{xy} \usepackage{faktor} \usepackage{graphicx} \usepackage{mathdots} \usepackage[colorlinks={true},linkcolor={blue},citecolor={blue}]{hyperref} \usepackage[frame,width=15truecm,height=23.5truecm,center]{crop}   With this settings I have the above strange behavior of \mathcal. Proving $f(x,y,z)=\big(\frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \big)$ is injective Let $a\in \mathbb{R}$, $a\neq 0$, and $E=\{(x,y,z)\in \mathbb{R}^3:a+x+y+z\neq 0\}$ and $f:E\rightarrow \mathbb{R}^3$ defined by $$ f(x,y,z)=\big(\frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \big) $$ Show that $f$ is injective.    I've been trying to prove it directly by showing that if $f(x_1,y_1,z_1)=f(x_2,y_2,z_2)\Rightarrow$ $x_1=x_2, y_1=y_2,z_1=z_2$. But I get a system of equations which I'm find difficult to deal with. Any help would be greatly appreciated. Precise connection between complexification of $\mathfrak{su}(2)$, $\mathfrak{so}(1,3)$ and $\mathfrak{sl}(2, \mathbb{C})$ "Speed" of Gravity and Speed of Light Some threads here touching speed of gravity made me think about that. This lead to some questions.    The speed of gravity was not measured until today (at least there are no undebated papers to that effect). It seems common knowledge/belief among physicists that the speed of gravity is the same as the speed of light.    And this is my question: Is that speed of light = speed of gravity a result of GR or is that fed into the theory? Or is there some evidence from other sources than GR for this? Does the same speed imply some deep-lying relation between gravity and electromagnetism? Convergence of the series $\sqrt[n]n-1$ Let $a_n=\sqrt[n]n-1$. Does $\sum_{n=1}^\infty a_n$ converge? Is there some easy way to pad Strings in Java?  Seems like something that should be in some StringUtil-like API, but I can't find anything that does this. For example, the square can be described with the equation $|x| + |y| = 1$. So is there a general equation that can describe a regular polygon (in the 2D Cartesian plane?), given the number of sides required?  Using the Wolfram Alpha site, this input gave an almost-square: PolarPlot(0.75 + ArcSin(Sin(2x+Pi/2))/(Sin(2x+Pi/2)*(Pi/4))) (x from 0 to 2Pi)  This input gave an almost-octagon: PolarPlot(0.75 + ArcSin(Sin(4x+Pi/2))/(Sin(4x+Pi/2)*Pi^2)) (x from 0 to 2Pi)  The idea is that as the number of sides in a regular polygon goes to infinity, the regular polygon approaches a circle. Since a circle can be described by an equation, can a regular polygon be described by one too? For our purposes, this is a regular convex polygon (triangle, square, pentagon, hexagon and so on).  It can be assumed that the centre of the regular polygon is at the origin $(0,0)$, and the radius is $1$ unit.  If there's no such equation, can the non-existence be proven? If there are equations, but only for certain polygons (for example, only for $n &lt; 7$ or something), can those equations be provided? Find out trace of a given matrix $A$ with entries from $\mathbb{Z}_{227}$ Let $A$ be a $227\times 227$ matrix with entries in $\mathbb{Z}_{227}$ such that all of its eigen values are distinct. What would be its trace? I think it is zero by adding all 227 elements but i am not sure.  Edited: Here I have assumed that eigenvalues are in a base field. Right triangles and tangent lines Consider the hyperbola $xy=1$ with $x&gt;0$ and $y&gt;0.$ The tangent line at any point on the hyperbola forms a right triangle with the coordinate axes. Show that the area of the triangle does not depend on the point chosen. To show this, do the following:      a) Choose a point on the hyperbola of your choice. Find the tangent line and then find the area of the right triangle described above.      b) Choose a different point of your choice. Find the tangent line and then find the area of the right triangle described above.      c) Now for the general case, choose the point at $x=a.$ Find the tangent line at $x=a$ and then find the area of the right triangle described above.   This is the work I have so far:    No method to find the area of a right triangle was given, so I just used 1/2*B*H.  But I get stuck when given $x=a$ for part C.  Any ideas? DNS subdomain (child) NS records If we have example.com we would setup things something like this: $ORIGIN example.com. @  1D  IN  SOA ns1.example.com. hostmaster.example.com. (                   2002022401 ; serial                   3H ; refresh                   15 ; retry                   1w ; expire                   3h ; nxdomain ttl                  )           IN  NS     ns1.example.com.           IN  NS     ns2.example.com.  since in the parent zone .com. there is already NS record for the example.com. child zone and A glue record for the ns1.example.com. for what purpose do we state NS records again in the child zone? and also, do we need to state A record for the name servers in the child zone itself? Suppose we have a natural number $n \ge 0$.  Given natural numbers $\alpha_1,\ldots,\alpha_k$ such that   $k\le n$ $\sum_i \alpha_i = n$   what is the maximum value that $\Pi_i \alpha_i$ can take?  I'm quite sure that there is a theorem telling me the result, but I cannot find it. For sure an upper bound is $n^k$ but I'm searching for a real upper bound. I'm pretty sure that upper the bound should be $n^2$, but I don't know I could prove it. Automorphism group of direct product of groups I was working on a problem in group theory, which asks about the automorphism group of a direct product of groups.  Okay, so I know that if $G,H$ are two groups whose orders are relatively prime, then $\operatorname{Aut}(G\times H)\cong\operatorname{Aut}(G)\times \operatorname{Aut}(H)$.  I also know that if $G,H$ are abelian and simple and isomorphic, then $\operatorname{Aut}(G\times H)\cong \operatorname{GL}_2(\mathbf{Z}_p)$ where $p$ is the order of $G$.  What I don't know is the following: what if $G,H$ are simple, yet not abelian? Let us for now focus on a more restricted case where $G\cong H$, in particular, $G=H$. What can we say about the group $\operatorname{Aut}(G\times H)$? (I heard something about this group being related to what is called "wreath product", which I do not know...)  Thanks bunch in advance!