I've noticed that kernel.shmmax value is set to oddly huge number on my RHEL 7 system.   # sysctl kernel.shmmax kernel.shmmax = 18446744073692774399    Is it OK to have such a huge number set? How can it affect the system? What exactly that parameter means?   Some info about the system:   # cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo)  # cat /proc/meminfo MemTotal:        9037028 kB MemFree:          175220 kB MemAvailable:    2544492 kB Buffers:               0 kB Cached:          2716836 kB SwapCached:        14908 kB Active:          5749708 kB Inactive:        2371364 kB Active(anon):    4490064 kB Inactive(anon):  1120848 kB Active(file):    1259644 kB Inactive(file):  1250516 kB Unevictable:       10800 kB Mlocked:           10796 kB SwapTotal:       5242876 kB SwapFree:        5143688 kB Dirty:              9704 kB Writeback:             0 kB AnonPages:       5400268 kB Mapped:           318000 kB Shmem:            202700 kB Slab:             379036 kB SReclaimable:     169128 kB SUnreclaim:       209908 kB KernelStack:       34080 kB PageTables:        46252 kB NFS_Unstable:          0 kB Bounce:                0 kB WritebackTmp:          0 kB CommitLimit:     9761388 kB Committed_AS:    7599336 kB VmallocTotal:   34359738367 kB VmallocUsed:      181868 kB VmallocChunk:   34359341052 kB HardwareCorrupted:     0 kB AnonHugePages:   1861632 kB HugePages_Total:       0 HugePages_Free:        0 HugePages_Rsvd:        0 HugePages_Surp:        0 Hugepagesize:       2048 kB DirectMap4k:       92096 kB DirectMap2M:     9345024 kB   # uname -a Linux hostname 3.10.0-693.21.1.el7.AV1.x86_64 #1 SMP Thursday April 5, 2018 09:26:08 MDT x86_64 x86_64 x86_64 GNU/Linux   Well, kernel.shmall parameter has the same value.  $ sysctl -a | grep shm kernel.shmall = 18446744073692774399 kernel.shmmax = 18446744073692774399 kernel.shmmni = 4096   Thanks in advance!
I'm just wondering where these values are being set and what they default to? Mine is currently 18446744073692774399. I didn't set it anywhere that I can see.  $ cat /proc/sys/kernel/shmmax  18446744073692774399  $ sysctl kernel.shmmax kernel.shmmax = 18446744073692774399
Validate/verify PDF files integrity Is there any tool which I can run on the PDFs archives (all directories) and finally it lists/identifies the corrupt/invalid PDFs? I have hundreds of PDF files (related to documentation etc.) on my computer (Windows machine), and very often I receive/have to send dozens of PDFs via email. It is now a normal routine that the PDF I receive or send is corrupted. This creates serious trouble sometimes, when the source file (e.g. Word file or the Tex file) is missing/not available instantly. Checking these thousands of PDFs is not possible in finite time, so I have searched for a tool which I can run once and it would scan all PDFs (in directories and sub-directories), and finally I would get a list of files which I should re-create. Up to now, it seems there is no such tool. Every time I insert the SD card from my camera into the card reader, I get this dialog:    Of course there is no need to scan it. Is there a way to disable it? I've been searching for a quantum algorithm to compute the the inner product between two $n$-qubit quantum states, namely $\langle\phi|\psi\rangle$, which is in general a complex number. One can get $|\langle\phi|\psi\rangle|^2$ through thte SWAP test for multiple qubits, but this is not really the inner product as the information of the real and imaginary parts are lost. I came across this , which claims that the task can be done by simply using CZ gates. I'm not sure if I am mistaken, but it seems to me that such a circuit works for computational basis states, but not for general quantum states. Could somebody help me confirm if this is actually the case? If the above algorithm doesn't work for general quantum states, what algorithm would you suggest? I've always heard this reasoning, and it makes obvious sense, but how do you actually show it for some arbitrary product? Would it be something like this?  $$(a(b(cd)))e=((ab)(cd))e=(((ab)c)d)e=abcde?$$  Do you just say that the grouping of the parentheses now corresponds to just multiplying straight through? Thanks. How to get the type of T from a member of a generic class or method Let's say I have a generic member in a class or method, like so: public class Foo&lt;T&gt; {     public List&lt;T&gt; Bar { get; set; }          public void Baz()     {         // get type of T     }    }  When I instantiate the class, the T becomes MyTypeObject1, so the class has a generic list property: List&lt;MyTypeObject1&gt;. The same applies to a generic method in a non-generic class: public class Foo {     public void Bar&lt;T&gt;()     {         var baz = new List&lt;T&gt;();                  // get type of T     } }  I would like to know what type of objects the list of my class contains. So what type of T does the list property called Bar or the local variable baz contain? I cannot do Bar[0].GetType(), because the list might contain zero elements. How can I do it? Why must $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$ -- the set of all polynomials in $\sqrt{2}$ and $\sqrt{3}$ with rational coefficients  -- contain multiplicative inverses?   I have gathered that every element of $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$ takes form $a + b\sqrt{2} + c\sqrt{3} + d\sqrt{2}\sqrt{3}$ for some $a,b,c,d \in \mathbb{Q}$, and I have shown that $\mathbb{Q}[\sqrt{2}]$ and $\mathbb{Q}[\sqrt{3}]$ are both fields, but it's not clear to me why this allows for general multiplicative inverses to exist in $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$. When should a supervisor be an author? I've read a new study which suggests that yawning may help you keep a cool head. Also, the findings might hold some hope for sufferers of insomnia, migraines, and even epilepsy.  Is there any conclusion about what the function of yawning is and why do we yawn? How to show that $\lim_{n \to +\infty} n^{\frac{1}{n}} = 1$? I've spent the better part of this day trying to show from first principles that this sequence tends to 1. Could anyone give me an idea of how I can approach this problem?  $$ \lim_{n \to +\infty} n^{\frac{1}{n}} $$ Skype window problem in Ubuntu 14.04 Passive voice phrasing of "The bottle contains two liters" How can I reproduce the error "package... needs to be reinstalled, but I can't find an archive for it" for testing? From time to time, Ubuntu users encounter errors from  or , of the form:  The package some-package needs to be reinstalled, but I can't find an archive for it.  I want to know what causes this error so that I can reproduce it and try to find safe ways of fixing it, even when the broken package is important and has many dependencies.  of the  might give a bit of a clue, but I don't know how packages get the status that causes the error.  How can I produce this error for testing on my (Ubuntu MATE 17.10) system?  This is prompted by  and my long-standing discomfort with closing questions about this error against , whose answer uses dpkg --force-all to remove the offending package.  suggests this solution has worked for many users, but I am not confident that using --force-all won't cause later problems, or that it's a good idea to use this method to remove important packages like APT. Why does a query run slower in a Stored Procedure than in the Query window? Find the probability that a geometric random variable $X$ is an even number Timeout on a function call Multiplication in Permutation Groups Written in Cyclic Notation I didn't find any good explanation how to perform multiplication on permutation group written in cyclic notation. For example, if $$   a=(1\,3\,5\,2),\quad b=(2\,5\,6),\quad c=(1\,6\,3\,4), $$  then why does $ab=(1\,3\,5\,6)$ and $ac=(1\,6\,5\,2)(3\,4)$? How to get bright concert photos? I've been starting to shoot some live music recently and have been doing an okay job and see an improvement with each time I shoot. However recently I was shooting and all of my photos have come out very dark, too dark to use really. I was shooting in manual with 1/100 shutter speed aperture as wide as possible and a 6400 iso. Any advice is welcome. Thanks in advance. Why doesn't 'find' show this file? Here is the script to create my tables:   CREATE TABLE clients (    client_i INT(11),    PRIMARY KEY (client_id) ); CREATE TABLE projects (    project_id INT(11) UNSIGNED,    client_id INT(11) UNSIGNED,    PRIMARY KEY (project_id) ); CREATE TABLE posts (    post_id INT(11) UNSIGNED,    project_id INT(11) UNSIGNED,    PRIMARY KEY (post_id) );   In my PHP code, when deleting a client, I want to delete all projects posts:  DELETE  FROM posts INNER JOIN projects ON projects.project_id = posts.project_id WHERE projects.client_id = :client_id;   The posts table does not have a foreign key client_id, only project_id. I want to delete the posts in projects that have the passed client_id.  This is not working right now because no posts are deleted. Check differentiability of multivariable functions I am trying to determine if the following functions are (totally)   differentiable at $(x,y)=(0,0)$.      $$f(x,y)=\sqrt{\vert xy \vert}$$      $$g(x,y)=e^{{{\vert x \vert}^3}y}$$   However I am not particularly sure where to start. The concept of the total derivative being the Jacobian matrix makes sense but I don't really understand how to work with functions that may not have a Jacobian matrix. Any help would be greatly appreciated!