There's a process in my system (a standard desktop installation with upwards of 150 quiescent processes at any time) that is sporadically resetting a config file's permissions that I have explicitly set so that it could be read by multiple users.   Even though I have ways to prevent that from happening (eg, changing the file's owner), I really want to find the process that is doing the change, if only so that I can terminate it with extreme prejudice.  I know the kernel has at least 2 mechanisms for this, inotify and the more recent fanotify. However, the latter only intercepts changes to file contents, not to the inode, while the former does detect such changes but doesn't report the process responsible.   So is there another kernel mechanism which i don't know about? Or some other roundabout way of "trapping" the process as it's going to change the file's permissions, or after it has done so?
A specific file on our production servers is being modified at apparently random times which do not appear to correlate with any log activity.  We can't figure out what program is doing it, and there are many suspects.  How can I find the culprit?  It is always the same file, at the same path, but on different servers and at different times.  The boxes are managed by , but the puppet logs show no activity at the time the file is modified.  What kernel hook, tool, or technique could help us find what process is modifying this file?    lsof is unsuitible for this, because the file is being opened, modified and closed very quickly.  Any solution that relies upon polling (such as running lsof often) is no good.      OS: Debian testing Kernels: Linux, 2.6.32 through 3.9, both 32 and 64-bit.
Strange math notation, vertical bar with parentheses. So I was reading "Resistance Distance" (D. J. Klein, M. Randić) (Journal of Mathematical Chemistry 12(1993)81-95) when I came up with strange notation.  From the paper:  The graph adjacency matrix is defined as: $$A_{xy} = (x|A|y) =  \begin{cases} 1/r_{xy} &amp; x \sim y \\ 0 &amp; \text{otherwise}  \end{cases}$$  The graph degree matrix of a graph is defined as:  $$\Delta_{xy} = (x|\Delta|y) = \delta(x,y) \sum_{z}^{\sim x} 1/r_{xy}$$  $$ |\phi) \equiv \sum_x |x)  $$  My main question is what does the combination of the vertical bar parentheses mean. Thanks in advance. Some movies feature child characters put in violent situations. This can range from crude language to extreme horror (e.g. torture, gore, etc.). As an example,  and its sequel has plenty of those scenes. It looks like a paradox that children can be actors in movies that are definitely not for children.  Do the directors usually try and avoid exposing the very young actors to the violence of such scenes, e.g. by clever dubbing and editing? Are there laws that require them to do so, just like there are ratings that prevent children from seeing some movies? ZF: Difference between POW and SEP? How to make 'python' program command execute Python 3? The python program command executes Python 2. Python 3 can be executed using the python3 command.  How can Python 3 be executed using the python command? Can I rent a camper in the US/Canada with a European B license? We are considering a holiday in North America with a camper. I have a European driver's license (B) which allows me to drive personal cars up to 3500 kg, although I can imagine that an average camper easily weighs more.  Does my license qualify me to drive a camper? If not, can I take an American/Canadian driver's test which would allow me to drive a camper? Block cipher fixed points (plaintext equal to ciphertext) Create database fields to an existing table when installing a module I'm new to drupal and I need some help.  I created a new module with name user_extra. Which create necessery table when Installing the module.  But I also need to insert some database field in 'users_field_data' table ('user_extra_id' and 'user_office')  In baseFieldDefinitions I wrote all necessery database table fields for user_extra table.   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {     // Standard field, used as a unique if primary index.     $fields['id'] = BaseFieldDefinition::create('integer')         -&gt;setLabel(t('Unit ID'))         -&gt;setDescription(t('The unit ID.'))         -&gt;setReadOnly(TRUE)         -&gt;setSetting('unsigned', TRUE);      $fields['uuid'] = BaseFieldDefinition::create('uuid')         -&gt;setLabel(t('UUID'))         -&gt;setDescription(t('The unit UUID.'))         -&gt;setReadOnly(TRUE);         .         .         .     $fields['user_info'] = BaseFieldDefinition::create('string')         -&gt;setLabel(t('User Info'))         -&gt;setDescription(t("The User Info"))         -&gt;setSetting('max_length', 255)         -&gt;setDisplayOptions('form', array(           'type' =&gt; 'string_textfield',           'weight' =&gt; 10,         ))         -&gt;setDisplayConfigurable('form', TRUE);      return $fields;      }   When I install the module it inserts all values that I define in baseFieldDefinitions.  But I also need to create 'user_extra_id' and 'user_office' in 'users_field_data' table with setDisplayOptions and setDisplayConfigurable options.  This is the commenting that I made in entity file  /**  * @ContentEntityType(  *   id = "user_extra",  *   label = @Translation("user extra"),  *   handlers = {  *     "storage" = "Drupal\user_extra\UserextraStorage",  *     "storage_schema" = "Drupal\user_extra\UserextraStorageSchema",  *     "access" = "Drupal\user_extra\UserextraAccessControlHandler",  *     "list_builder" = "Drupal\user_extra\UserextraListBuilder",  *     "view_builder" = "Drupal\user_extra\UserextraViewBuilder",  *     "views_data" = "Drupal\user_extra\UserextraViewsData",  *     "form" = {  *       "default" = "Drupal\user_extra\Form\UserextraForm",  *       "add" = "Drupal\user_extra\Form\UserextraAddForm",  *       "edit" = "Drupal\user_extra\Form\UserextraEditForm",  *       "delete" = "Drupal\user_extra\Form\UserextraDeleteForm",  *     }  *   },  *   admin_permission = "administer user_extra",  *   base_table = "user_extra",  *   entity_keys = {  *     "id" = "id",  *     "label" = "name",  *     "uuid" = "uuid",  *   },  *   links = {  *     "canonical" = "/admin/user_extra/{user_extra}",  *     "add-form" = "/admin/user_extra/add",  *     "delete-form" = "/admin/user_extra/{user_extra}/delete",  *     "overview-form" = "/admin/user_extra/${user_extra}/overview",  *     "edit-form" = "/admin/user_extra/{user_extra}",  *     "collection" = "/admin/user_extra",  *     "children" = "/admin/user_extra/{user_extra}/children",  *   },  * )  */ Limit of sequence in which each term is defined by the average of preceding two terms We have a sequence of numbers $x_n$ determined by the equality   $$x_n = \frac{x_{n-1} + x_{n-2}}{2}$$  The first and zeroth term are $x_1$ and $x_0$.The following limit must be expressed in terms of $x_0$ and $x_1$ $$\lim_{n\rightarrow\infty} x_n $$  The options are:   A)$\frac{x_0 + 2x_1}{3}$ B)$\frac{2x_0 + 2x_1}{3}$  C)$\frac{2x_0 + 3x_1}{3}$ D)$\frac{2x_0 - 3x_1}{3}$  Since it was a multiple choice exam I plugged $x_0=1$ and $x_1=1$. Which means that all terms of this sequence is $1$,i.e, $$x_n=1, n\in \mathbb{N} $$  From this I concluded that option A was correct.I could not find any way to solve this one hence I resorted to this trick. What is the actual method to find the sequence's limit? My understanding is that GPUs are more efficient for running neural nets, but someone recently suggested to me that GPUs are only needed for the training phase. Once trained, it's actually more efficient to run them on CPUs.  Is this true? Basic If/Then in Python Parser of ArcGIS Field Calculator? Why don't the Google Docs CTRL + ALT shortcuts work? I'm currently using Google Docs, but when I try to use the keyboard shortcuts like Ctrl+Alt+M it gives µ instead.    Is Chrome (9) overruling Google Docs in some way?  How can I get these shortcuts working?  I'm using Chrome dev 9 on a Dutch Windows 7 with a US-layout keyboard Find the tangent lines to the graph of $x^2+4y^2 = 36$ that go through the point $P=(12,3)$ I was solving a few problems from a textbook and I came across this one:     Find the tangent lines to the graph of $x^2+4y^2 = 36$ that go through   the point $P=(12,3)$   I could find the tangency points $$ but my solution was completely messy (I had four equations that I had to go back-and-forth with.  Is there an elegant/simple solution to that?  Tangency points:  $$P_1 = (0,3)$$ $$P_2 = \left( \frac{24}{5} , 3-\frac{24}{5} \right)$$ Show that $a_n=\sin(n)$ does not converge     My idea:  Take two subsequences: $a_{n_k}=\sin(\frac {\pi k} 2)$ , $a_{n_l}=\sin(\frac {2\pi l} 3)$  So: $\forall n$ : $\lim_{n\to\infty} a_{n_k}=1$, $\lim_{n\to\infty} a_{n_l}=-1$  So two inifinite subsequence converge to different limits thus the sequence $a_n$ doesn't converge.   Is that correct ?  Edit:   The contrapositive of the defintion of a limit of a sequence:   $\exists\epsilon&gt;0 : \forall n\in N : \exists n&gt;N \Rightarrow |x_n-L|&gt;\epsilon$  Take $\epsilon =1$ and we know that $\sin(n)$ is bounded so lets take it's supermum: 1  $|1-1|&gt;\epsilon=1\Rightarrow 0&gt;1 \Rightarrow$ Contradiction. Is there an optimal loss function for dealing with imbalanced classes? I'm aware that there are many ways of dealing with datasets where there is a strong class imbalance in the target variable: downsampling the more prevalent and less important class, over-weighting the valuable minority class, etc. Are there any loss functions that are ideally suited for these types of problems? I've heard of AUC, but AUC sounds like a means of evaluating a model once its training is complete (correct me if I'm wrong). Log loss and squared loss penalize a model's over confidence, but overconfidence and class imbalance seem unrelated. Is that true? Is there a way to find out if I need a transit visa for a layover in the UK? How can I add a Login link to the "Main navigation" menu?  When a user clicks on the link, it should take them to the /user/login page. Once they login, the link should change to say "Logout" instead of "Login".  Is there any way to add such a link? Mock a service while running a BrowserTest? I am trying to test the output of a controller that returns some information in a given page. This controller has a custom http client injected into it.  I want to create a BrowserTest that can navigate to a fake node, and then test for certain text or values. I also want to change the mock to return different values, so I can further test the output to account for those cases.  I tried:      $client = $this-&gt;getMockBuilder('\Drupal\mymodule\Client\AuthorizeClient')       -&gt;disableOriginalConstructor()       -&gt;getMock();     $client-&gt;expects($this-&gt;any())       -&gt;method('request')       -&gt;with('w12345', FALSE)       -&gt;willReturn([]);      $this-&gt;container-&gt;set('mymodule.auth_client', $client);   But I get errors in the test that refer to the original class, and not the one I am trying to replace. I looked around in the core but wasn't really able to find what I was looking for. Does it make sense to do this? Is there a way to do a Kernel test to test responses from the route in question? Branch of the n-th root of a holomorphic function is holomorphic It is true that given a domain $D$ and a function $f$ that is holomorphic and not vanishing in $D$, then a branch $\varphi$ (with $\varphi$ continuous) of $f^{1/n}$ in $D$ is holomorphic in $D$ ().   My question is, does the statement remain true if we remove the non-vanishing condition? I haven't been able to find a counterexample or a proof on that more general case. How to I stop a launchd script from running on wake I have a simple launchd script that plays a sound every 30 minutes and it runs out of the user library ~/Library . It doesn't run if my machine is asleep, but does run the last event missed when the machine wakes. I think this is the expected behavior. My question is, how do I stop this happening. If I missed the half-hour event, I don't want it to be run at 20 minutes past the hour.  Here's the core of my script. It calls a Python script. I tried to put a block in the python script to check that I am within a few minutes of each 30 minutes, but that doesn't seem to work on wake. (Is it missing the system clock somehow?)  &lt;key&gt;ProgramArguments&lt;/key&gt; &lt;array&gt;     &lt;string&gt;/usr/local/bin/python3&lt;/string&gt;     &lt;string&gt;/Users/pheon/Documents/playsound.py&lt;/string&gt; &lt;/array&gt;  &lt;key&gt;StartCalendarInterval&lt;/key&gt; &lt;array&gt;     &lt;dict&gt;         &lt;key&gt;Minute&lt;/key&gt;         &lt;integer&gt;0&lt;/integer&gt;     &lt;dict&gt;         &lt;key&gt;Minute&lt;/key&gt;         &lt;integer&gt;30&lt;/integer&gt;     &lt;/dict&gt; &lt;/array&gt;   Here is a snippet from the python code which checks the time before playing the sound.  time0 = datetime.datetime.now() if (time0.minute % 30) &lt; 2:     subprocess.run(["/Users/pheon/bin/afplay-vol.sh", "1", bell],check=True) Proof of for-all / there-exists "negation"?