Static magnetic fields
Why bar magnet can produce magnetic field?
Making an elastic waistband on clothing? I want to show the IP address like below  lo : 127.0.0.1  eth0 : 192.168.5.123 eth1 : 192.172.0.212 wlan0 : 10.1.0.124   I'm able to print all IP address by ifconfig | awk '/inet addr/{print substr($2,6)}'. But it is only printing the IPs. Every system have their own interface names and addresses. So my script has to show their interfaces with respect to IP addresses. Is it acceptable to write a thank you in a comment? There have been a number of cases where I would like to thank someone for providing me with a thorough response and give them feedback beyond the vote up. Often I wish people would tell me why they voted me up. Not that the thank you part is necessary but it sets it apart from the other comments related to answering the question itself.  In this type of situation is a "Thank you" acceptable in a comment?     For more information, see  in the . Why aren't we sterilizing N95 masks? Review of a proof for De Moivre's theorem using mathematical induction The following is a rigorous proof of De Moivre's theorem by means of mathematical induction. The theorem put simply is that:  Any complex number, $z = a+bi$, on a cartesian plane can be expressed in polar form, where $a=r\cos\theta$ and $b=r\sin\theta$ and $r$ is the absolute distance from the origin to the point $z$. In light of this, the expression for the complex number $z$ in polar form is $z=r(\cos\theta+i\sin\theta)$ In order to find the $n^{th}$ power of $z$, the following rule applies: $$\displaystyle z^n=(r(\cos\theta+i\sin\theta))^n=r^n(\cos n\theta+i\sin n\theta)$$ where $n\in\mathbb N$ (I have confined $n$ to the natural numbers given that I intend on using mathematical induction to prove the theorem.  Base step: We must prove that what is stated is true for $n=1$, hence $$z^1=r^1(\cos 1\cdot\theta+i\sin1\cdot \theta)$$ $$=r(\cos\theta+i\sin\theta)$$ which is true. Next we assume it is true for $n=k$, and therefore proceed to the inductive step. Inductive step: When calculating $z^{n+1}$, it's the same as calculating $z^nz$, hence $$z^{n+1}=(r^n(\cos n\theta + i\sin n\theta))(r(\cos \theta+i\sin \theta))$$ $$=r^nr(\cos n\theta+i\sin n\theta)(\cos\theta +i\sin \theta)$$ $$=r^{n+1}(\cos n\theta\cdot\cos\theta+\cos n\theta \cdot i\sin\theta+i\sin n\theta\cdot\cos\theta+i^2\sin n\theta\cdot\sin\theta)$$ from here, $i^2=-1$, and therefore $+i^2\sin n\theta\cdot\sin\theta$ becomes $-\sin n\theta\cdot\sin\theta$. In addition to this, the following trigonometric identities will be used: $$\sin(n\theta + \theta) = \sin n\theta\cdot\cos\theta+\cos n\theta\cdot\sin\theta$$ $$or$$ $$k\sin(n \theta+\theta)=k\sin n \theta\cdot\cos \theta + \cos n\theta\cdot k\sin\theta$$ $$and$$ $$\cos(n \theta + \theta)=\cos n\theta\cdot\cos\theta-\sin n\theta\cdot\sin\theta$$ by using these, the original equation has now become $$=r^{n+1}(\cos(n \theta + \theta) + i\sin(n \theta + \theta))$$ then, after factoring out $\theta$, the theorem becomes $$=r^{n+1}(\cos((n+1)\theta)+i\sin((n+1)\theta))$$ which completes the proof. Question: is this proof correct all the way through? Or have I missed any conditions? If all is well in the case of this proof, could somebody aid me in proving it for $\{n|n\in\mathbb R,n\geq1\}$ About $\lim \left(1+\frac {x}{n}\right)^n$ I was wondering if it is possible to get a link to a rigorous proof that  $$\displaystyle \lim_{n\to\infty} \left(1+\frac {x}{n}\right)^n=\exp x$$ What is covariance in plain language and how is it linked to the terms dependence, correlation and variance-covariance structure with respect to repeated-measures designs? What is the difference between convolutional neural networks and deep learning? Combinatorial proof of an identity with squared binomial coefficients Is it true that $\sum_kk\binom{n}{k}^2=n\binom{2n-1}{n-1}$? (I proved it using generating functions). Could you help me to prove it combinatorially? please How to set the default format in text_format and hide the select? /**  * Implements hook_form_alter().  */ function MODULE_NAME_form_alter(   &amp;$form,   \Drupal\Core\Form\FormStateInterface $form_state,   $form_id ) {    if ($form_id == 'node_article_form') {     $form["body"]["widget"][0]['#allowed_formats'] = ['full_html']; // Your default format     $form["body"]["widget"][0]['#after_build'][] = 'MODULE_NAME_hide_format';   } }  function MODULE_NAME_hide_format(   &amp;$element,   FormStateInterface $form_state ) {   if (isset($element["format"]["format"])) {     $element["format"]["format"]["#access"] = FALSE;   }    return $element; } I want to cd into /var/named but it gives me a permission denied error, and when I want to use sudo to do this I am not permitted. What is the technical reason for this, and is it possible to do this some other way? Do I need a Turkey transit visa for a layover? I have an Indian passport and am planning to visit Germany with a valid visa. To book a flight for Germany (Mumbai – Dusseldorf), I came across some connected flights that stop at Istanbul.  Do I need to have visa for Turkey?  This is the first time I am travelling outside my country, and any information on this will be helpful. Does assigning objects to null in Java impact garbage collection? Does assigning an unused object reference to null in Java improve the garbage collection process in any measurable way?  My experience with Java (and C#) has taught me that is often counter intuitive to try and outsmart the virtual machine or JIT compiler, but I've seen co-workers use this method and I am curious if this is a good practice to pick up or one of those voodoo programming superstitions? Is there a way to send a thanks message to Stack Overflow or any of the individual Stack Exchange sites, aside from sending an email? I want to thank Stack Overflow for being an awesome live QA site. It helps people a lot. How to check if a shell is login/interactive/batch I think I understand the differences between an interactive, a login and a batch shell. See the following links for more help:    (from the sister site: )  (from A User's Guide to the Z-Shell)   My question is, how can I test with a command/condition if I am on an interactive, a login or a batch shell?   I am looking for a command or condition (that returns true or false) and that I could also place on an if statement. For example:  if [[ condition ]]    echo "This is a login shell" fi Why does HTML require that multiple spaces show up as a single space in the browser? I have long recognized that any set of whitespace in an HTML file will only be displayed as a single space.  For instance, this:  &lt;p&gt;Hello.        Hello. Hello. Hello.                       Hello.&lt;/p&gt;   displays as:  Hello.        Hello. Hello. Hello.                       Hello.  This is perfectly fine, as if you need multiple spaces of pre-formatted text you can just use the &lt;pre&gt; tag.  But what is the reason?  More precisely, why is this in the specification for HTML? How can I animate the Restrict Visibility property of an object? I've been trying to create an animation where an object blinks on and off.   For example, I have a Cube and I set a keyframe on it's Restrict Visibility icon (the "eye" icon) with I, then I toggle off that "eye" so my cube doesn't show in the Viewport and again I press I to record that keyframe. Then, when I preview the animation in the Viewport, I see my cube appears and then disappears like I want, but when I render it, the cube does not disappear at all.  What am I doing wrong? Today, when looking up the definitions of the phrasal verb "take sth up", I noticed that one of them was written like this: "to start or begin something such as a job." For the first time I realised that probably "start" and "begin" don't exactly mean the same thing.So the question is what the difference is between the two, and if there are cases when they mean exactly the same thing. How to merge records for query set We have a question related to a DB query :   CREATE TABLE `Action` (   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,   `emp_Id` int(10) unsigned NOT NULL,   `name` varchar(60) NOT NULL,   `updated_action_at` datetime(3) DEFAULT NULL,   `created_At` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,   `notes` varchar(400) DEFAULT NULL,   PRIMARY KEY (`id`),    KEY `action_empId_fk` (`emp_Id`),    CONSTRAINT `action_empId_fk` FOREIGN KEY (`emp_Id`) REFERENCES `Employee` (`id`) ON DELETE CASCADE,  ) ENGINE=InnoDB AUTO_INCREMENT=502004 DEFAULT CHARSET=latin1   CREATE TABLE `ActionAssignedTo` (   `action_Id` int(10) unsigned DEFAULT NULL,   `emp_Id` int(10) unsigned DEFAULT NULL,   KEY `actionassignedto_emp_id_foreign` (`emp_Id`),   KEY `actionassignedto_action_id_foreign` (`action_Id`),   CONSTRAINT `ActionAssignedTo_ibfk_1` FOREIGN KEY (`emp_Id`) REFERENCES `Employee` (`id`) ON DELETE CASCADE,   CONSTRAINT `ActionAssignedTo_ibfk_2` FOREIGN KEY (`action_Id`) REFERENCES `Action` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1  CREATE TABLE `Employee` (   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,   `vendor_Id` int(10) unsigned DEFAULT NULL,   `name` varchar(40) NOT NULL,   `mobile_Number` varchar(15) NOT NULL,   `active` tinyint(1) DEFAULT '1',   `updated_At` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,   `created_At` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,   PRIMARY KEY (`id`),   KEY `employee_vendor_id_foreign` (`vendor_Id`),   CONSTRAINT `employee_vendor_id_foreign` FOREIGN KEY (`vendor_Id`) REFERENCES `Vendor` (`vendor_Id`) ) ENGINE=InnoDB AUTO_INCREMENT=511 DEFAULT CHARSET=latin1   We want to find the action created by employee with Action.empId = 4 along with the list of Assignee (an action can be assigned to multiple people)  We have the following query :   Select     notes,             Action.id,             AssigneeName.name,             ActionAssignedTo.emp_Id  from       Employee inner join Action  on         (Action.emp_Id = Employee.id  and        Action.emp_Id in (select Employee.id                               from Employee                               where Employee.vendor_Id = 1)) inner      join ActionAssignedTo  on         Action.id =  ActionAssignedTo.action_Id inner join Employee as AssigneeName  on         ActionAssignedTo.emp_Id =  AssigneeName.id where      Action.emp_Id = 4   Now, lets say if Action with id = 10 was assigned to 2 people : John (empId : 2) And Jack (empId : 5) --> the above query returns following results :  (columns from the query)  notes                       | Action.id | AssigneeName.name | ActionAssignedTo.emp_Id 1. Finish Designing Queries | 10        | John              | 2 2. Finish Designing Queries | 10        | Jack              | 5   If we observe the above results the first 2 columns get repeated for the Assignees for SAME ACTION ID  --> is there a way we can merge them something like   1. Finish Designing Queries |10         | { John : 2  , Jack  : 5}   Basically records being merged into one. How do I mail merge from Google Spreadsheet to a Google Document?