I am reading an engineering mathematics book whose author says that the term mapping and function have the same meaning and whether one calls $f:X\rightarrow Z$ a function or mapping is a matter of choice. Nevertheless, I do remember from calculus course that the two terms cannot be used interchangeably and I think that mapping is a more general term than function. So, what am I missing here? Is the author right?
I wonder if there is any difference between mapping and a function. Somebody told me that the only difference is that mapping can be from any set to any set, but function must be from $\mathbb R$ to $\mathbb R$. But I am not ok with this answer. I need a simple way to explain the differences between mapping and function to a lay man together with some illustration (if possible).  Thanks for any help.
I have several big files with some measurements.   It looks this way:  N 12344;PE 9.9999999;... #S 0 0 31 44 75 130 165 196... #S_+ "2 5 2 3 3 1 1 2 3 1 2 2...  N 12345;PE 9.9999999;... #S 0 0 34 57 84 133 152... #S_+ "1 0 1 1 2 3 0 0 0...  N 12346;PE 9.9999999;... #S 0 0 31 44 73 140 169... #S_+ "3 3 4 0 0 2 1 2 4...  N 25104;PE 9.9999999;... #S 0 0 36 52 102 108 145... #S_+ "1 1 0 1 0 0 3 0 1...  N 25105;PE 9.9999999;... #S 0 0 32 58 88 130 143...   Sample is here:   The file is much bigger but I replaced part of the data with "..." to make it shorter.  I need to somehow replace the line ends before "#S" - in fact simply merge the "N" line with the following two ones into one line (or with the following three ones so I can get rid of the blank lines). Expect output like this:  N 12344;PE 9.9999999; #S 0 0 31 44 75 130 165 196 #S_+ "2 5 2 3 3 1 1 2 3 1 2 2... N 12345;PE 9.9999999; #S 0 0 34 57 84 133 152 #S_+ "1 0 1 1 2 3 0 0 0... N 12346;PE 9.9999999; #S 0 0 31 44 73 140 169 #S_+ "3 3 4 0 0 2 1 2 4... N 25104;PE 9.9999999; #S 0 0 36 52 102 108 145 #S_+ "1 1 0 1 0 0 3 0 1... N 25105;PE 9.9999999; #S 0 0 32 58 88 130 143...   Is this possible to achieve using some command-line utility in linux?   My knowledge is quite limited in this area so I would appreciate any help.  thanks Let $S$ be the set of $3 \times 3$ matrices $\rm A$ with integer entries such that $$\rm AA^{\top} = I_3$$ What is $|S|$ (cardinality of $S$)?   The answer is supposed to be 48. Here is my proof and I wish to know if it is correct.  So, I am going to exploit the fact that the matrix A in a set will be orthognal, so if the matrix is of the form \begin{bmatrix}         a_{11} &amp; a_{12} &amp; a_{13} \\         a_{21} &amp; a_{22} &amp; a_{23} \\         a_{31} &amp; a_{32} &amp; a_{33} \\         \end{bmatrix}  Then each column and row will have exactly one non-zero element which will be +1 or -1. Thus, I have split possibilities for the first column into three cases and counted the possibilities in each case as follows :- $$a_{11} \neq 0$$ or $$ a_{21} \neq 0$$ or $$ a_{31} \neq 0$$  In case 1), we obviously have two possibilities(+1 or -1) so we consider the one where the entry is +1. Now, notice that the moment we choose the next non-zero entry, all the places for non-zero entries will be decided because of the rule 'each column and row will have exactly one non-zero element'. Meaning, if b and c are remaining two non-zero entries, we only have two possibilities left  \begin{bmatrix}         1 &amp; 0 &amp; 0 \\         0 &amp; b &amp; 0 \\         0 &amp; 0 &amp; c \\         \end{bmatrix}  or  \begin{bmatrix}         1 &amp; 0 &amp; 0 \\         0 &amp; 0 &amp; c \\         0 &amp; b &amp; 0 \\         \end{bmatrix}  Using the fact that b and c are simply $$\pm1$$  In each of the above matrices, we get 4 possibilities for each of the matricies. Thus, 8 possibilities in totality. Basically, we are getting 8 possibilities on the assumption that  $$a_{11} = 1$$  Thus, we get 16 possibilities on the case that $$a_{11} \neq 0$$  Following, the second and third cases analogously, we get a total of 16 possibilities in each of them and 48 possibilities in total.    Source :- Tata Institute of Fundamental Research Graduate School Admissions 2016 \ref, make figure/table reference automatically toggle between "above" or "below" Is it possible to automatically include a reference to the position of a labeled object (Table, Figure) in text? By this I mean the following:  Say I have labeled a figure in chapter 1:  \label{fig:one}   Then I refer to it in text by using:  See Figure~\ref{fig:one}   Which produces "See Figure 1.1" as desired. I'd like to be able to have it produce: "See Figure 1.1, above" or "See Figure 1.1, below", automatically detecting whether to produce "above" or "below" depending on whether the figure will be placed above that position on the final page. What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way? Connecting MySql with Android without using PHP Simple examples of uncorrelated but not independent $X$ and $Y$ Is hiding the ball allowed in football? Imagine all our football team except one player form a tight circle, with our hands on the shoulders of the people next to us.  Inside the circle there is the eleventh person with the ball. The whole "construction" is moving slowly towards the opponent's goal. It is inevitable that we will score.  Is this illegal? If yes, according to what rule? Python: List vs Dict for look up table I have about 10million values that I need to put in some type of look up table, so I was wondering which would be more efficient a list or dict?  I know you can do something like this for both:  if something in dict_of_stuff:     pass   and  if something in list_of_stuff:     pass   My thought is the dict will be faster and more efficient.  Thanks for your help.  EDIT 1  Little more info on what I'm trying to do.  .  I'm making a look up table to see if a value calculated has all ready been calculated.   EDIT 2  Efficiency for look up.  EDIT 3  There are no values assosiated with the value...so would a set be better? How can I keep Ubuntu updated automatically? I want help to  make Ubuntu 'update &amp;&amp; upgrade' itself automatically, select the settings for this automatic system.  How can I do it? Please advice about  where to find the menu (GUI) or file (command line) to do it, what settings that can be recommended (if different from the default).  As a bonus, please describe how different types of program packages are treated,  program packages from Ubuntu repositories and PPAs snap packages flatpak packages other kinds of programs/packages. How can I get the node id the comment is attached to in hook_comment_insert?  I tried the following code:  function mymodule_comment_insert(Drupal\Core\Entity\EntityInterface $entity) {   if ($entity-&gt;bundle() == 'comment_custom' &amp;&amp; $entity-&gt;get('entity_type')-&gt;value == 'node') {      // Below returns empty, because "$entity-&gt;get('entity_id')-&gt;value" is empty.     $node = Node::load($entity-&gt;get('entity_id')-&gt;value);      // No luck with this one too.     $node = \Drupal::routeMatch()-&gt;getParameter('node');    } } The sup norm on $C[0,1]$ is not equivalent to another one, induced by some inner product Let $\mathrm{C}[0,1]$ be the space of continuous functions $[0,1]\rightarrow \mathbb{R}$ endowed with the norm $||x||_{\infty}=\mathrm{max}_{t\in [0,1]}|x(t)|$. It is easy to verify that this norm is not induced by any inner product (really the parallelogram law fails for $x(t)=t$ and $y(t)=1$). Well, how to understand that this norm is not equivalent to anyone induced by an inner product? So, the norms induced by inner products should have some special properties... Proving $R-S$ contains a prime ideal when $S$ is a multiplicative set I'm mainly trying to prove that      If $0\not \in S\subseteq R$ is a multiplicative subset of a   commutative ring $R$ with identity. Then $R-S$ contains a prime ideal.   Now, by using Zorn's lemma, one can show that $R-S$ contains a maximal ideal I. In fact, I is a prime ideal as well, so we need to show this.To do that, I assumed the opposite, i.e $\exists a,b \in R$ s.t $ab\in I$, but $a,b \not \in I$. Then looked each case. However, I stuck when $a,b \in R-[S\cup I]$. The following is what I've done for this case;  Proof:  In this case, our assumptions are $a,b\in R-[S\cup I]$ and $I + (a) = J$, where $J$ is an ideal in $R$ and $J \cap S \not = \emptyset$.   These imply that; $S^{-1}(I + (a)) = S^{-1} J$, but since $J \cap S \not = \emptyset$, by a theorem that we proved in the class, $S^{-1} J = S^{-1}R$.Therefore, it must be true that $\exists (i\in I, r\in R, s_1,s \in S)$ s.t  $$\frac{i+ra}{s_1} =\frac{1}{s}$$ but this implies $\exists s_2 \in S$ s.t  $$ s_2(is + sra -1 s_1) = 0 \quad \Rightarrow \quad (s_1 s )i + (s_1 s r) a = (s_1 s )1,$$ ,so $$(b s_1 s )i + (s_1 s r) ab = (s_1 s )b.$$ Observe that by our assumption $ab\in I$, so $(s_1 s)b \in I$.  Now, at the point, I don't know how to proceed, so I would appreciate any help or hint because I stuck at this point for over a week now.  Edit  Thanks for the great answers; however, but I'm specifically interested in how to continue from the point where I stuck. What advantages does using (function(window, document, undefined) { ... })(window, document) confer? Can you make a non-polar electrolytic capacitor out of two regular electrolytic capacitors? There was some discussion on this question        which I don't see as being conclusively resolved:   "turns out that what might LOOK like two ordinary electrolytics are not, in fact, two ordinary electrolytics." "No, do not do this. It will act as a capacitor also, but once you pass a few volts it will blow out the insulator." 'Kind of like "you can't make a BJT from two diodes"' "it is a process that a tinkerer cannot do"   So is a non-polar (NP) electrolytic cap electrically identical to two electrolytic caps in reverse series, or not?  Does it not survive the same voltages?  What happens to the reverse-biased cap when a large voltage is placed across the combination?  Are there practical limitations other than physical size?  Does it matter which polarity is on the outside?  I don't see what the difference is, but a lot of people seem to think there is one.  Summary:   As posted in one of the comments, there's a sort of electrochemical diode going on:     The film is permeable to free electrons but substantially impermeable to ions, provided the temperature of the cell is not high. When the metal underlying the film is at a negative potential, free electrons are available in this electrode and the current flows through the film of the cell. With the polarity reversed, the electrolyte is subjected to the negative potential, but as there are only ions and no free electrons in the electrolyte the current is blocked. —    Normally a capacitor cannot be reverse-biased for long, or large currents will flow and "destroy the center layer of dielectric material via electrochemical reduction":     An electrolytic can withstand a reverse bias for a short period, but will conduct significant current and not act as a very good capacitor. —    However, when you have two back-to-back, the forward-biased capacitor prevents a prolonged DC current from flowing.  :     For circuit positions when reverse voltage excursions are unavoidable,   two similar capacitors in series connected “back to back” ... will create a   non-polar capacitor function ... This works because almost all the circuit voltage   is dropped across the forward biased capacitor, so that the reverse   biased device sees only a negligible voltage.   :     The oxide dielectric construction that is used in tantalum capacitors   has a basic rectified property which blocks current flow in one   direction and at the same time offers a low resistance path in the   opposite direction. How do I play a YouTube video in the background on my iPad? I like to 'listen' to YouTube video in the background while I am surfing on my desktop. However, I cannot do this on the iPad as, as soon as I switch from YouTube video to the browser, the video pauses. Is there a solution for this either in the form of an app or a website? View list of files in ZIP archive on Linux Why should the first person pronoun 'I' always be capitalized? Using bm with eulervm gives inconsistent ‘’ characters I prefer to use bm package to bold math. However, I noticed that when used with eulervm, this gives inconsistent results for ‘&lt;’ and ‘>’ characters.  I wonder what causes it and can the usage bm be fixed to get proper ‘&lt;’.  \documentclass{article}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  %\usepackage{amsmath}  \usepackage[euler-digits,euler-hat-accent]{eulervm}  \usepackage{bm}  \begin{document}      \texttt{\hphantom{mathbold}\llap{bm}}: \quad $ 1 + 1 &lt; 3; \quad \bm{1 + 1 &lt; 3} $      \texttt{mathbold}: \quad $ 1 + 1 &lt; 3; \quad \mathbold{1 + 1 &lt; 3} $  \end{document} How to compare objects by multiple fields Assume you have some objects which have several fields they can be compared by:  public class Person {      private String firstName;     private String lastName;     private String age;      /* Constructors */      /* Methods */  }   So in this example, when you ask if:  a.compareTo(b) &gt; 0   you might be asking if a's last name comes before b's, or if a is older than b, etc...  What is the cleanest way to enable multiple comparison between these kinds of objects without adding unnecessary clutter or overhead?   java.lang.Comparable interface allows comparison by one field only Adding numerous compare methods (i.e. compareByFirstName(), compareByAge(), etc...) is cluttered in my opinion.   So what is the best way to go about this? How can I get admin access to a Mac without knowing the current password?