the code isn't working and I'm not sure where I've gone wrong any help would be much appreciated this is the details of the assignment create a class template by writing a template for a class named "Pair". This class will represent a pair of data members of a type that is parameterized in the template definition. For example, you could have a Pair of integers, a Pair of doubles, etc.  /* so I'm trying to implement this driver this is the driver.cpp file and  * I'm trying to do it with a template class */  int main() {    Pair&lt;char&gt; letters('a', 'd');    cout &lt;&lt; "\nThe first letter is: " &lt;&lt; letters.getFirst();    cout &lt;&lt; "\nThe second letter is: " &lt;&lt; letters.getSecond();     cout &lt;&lt; endl;    cin.get(); }  //this is my .h file code template &lt;class T&gt; class Pair {    private:       T first;       T second;    public:       Pair(const T, const T);       T getFirst();       T getSecond(); };  //this is my Pair.cpp #include "Pair.h"   template&lt;class T&gt; Pair&lt;T&gt;::Pair(const T first, const T second) {    return first, second; }  template&lt;class T&gt; inline T Pair&lt;T&gt;::getFirst() {    return first; }  template&lt;class T&gt; inline T Pair&lt;T&gt;::getSecond() {    return second; }
Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
Selecting a Textbox Item in a Listbox does not change the selected item of the listbox How to use the Alt + Right click in edit mode in Linux How can I solve this functional equation, where $x,y$ are any real numbers and $f:\mathbb{R}\to \mathbb R$ is a function such that : $$f(x+y)+f(x-y)=2f(x)\cos y$$    I tried substituting $x=0$ to get $f(y)+f(-y)=2f(0)\cos y$ . Taking $x=y$ gives $f(2x)+f(0)=2f(x)\cos x$. I similar get some more relations like that, but its not really helping me in finding anything useful. I also think the function must either be $\sin$ or $\cos$ looking at the product to sum formulae. Can anyone tell me how should I solve this? Show that every group of prime order is cyclic I want to extend my volume. However the unallocated space lies ahead of the volume. Is it possible to extend this volume without converting it to a dynamic volume?     I tried to use diskpart with the extend command but it doesn't work. Makes sense because the instructions says that the unallocated space has to be behind the volume. How does Delta baryon decay conserve angular momentum? I'm a chemist so bear with me:  I understand the  $\Delta^{+}$ and $\Delta^{0}$ to be in some sense spin (and isospin) quartet states of the proton and neutron. These can decay straight to a proton or neutron through emission of a pion, which is spin-0.  I've been puzzling about the mechanism by which this decay conserves spin. I note via Wikipedia that  into either a lepton pair or a photon pair, for which it's easy to show spin is conserved, however pion production seems to induce a loss of $J=1$.  This seems to suggest momenta of:  $\Delta^{+} (J=\frac{3}{2}) \rightarrow{} p^{+} (J=\frac{1}{2}) + \pi^{0} (J=0)$  Am I missing a boson? Is my understanding of spin flawed? I assume that if this decay exists, similar things turn up everywhere else. Could anyone explain why the number of legal or reachable combinations of a $3\times 3\times 3$ Rubik's Cube is $1/12\mbox{th}$ of the total. I understood the logic behind the total number of combinations: $8! \cdot 2^{12} + 3^{12} \cdot 12!$. What I am not able to understand is why do we divide this quantity by $2 \cdot 3\cdot 2$. I don't have any idea about parity or group/set theory. Is there another possible explanation for it? Can I keep the Rueful Axe and get Clavicus Vile's Mask? Is there a way to keep the Rueful axe and get Clavicus's Mask?  I thought you could kill Barbas after receiving the mask, but he is a statue now.  Did I miss my chance? Where does Google Chrome for Linux store user specific data? What happens when you need to tear-down a hotel but no houses are in the bank in Monopoly? Custom hard edges in Blender SC2272-M4 Behaviour when using relay SRD-05VDC-SL-C 5V DC I'm currently encountering a problem when using a relay switch with a 5v receiver. When using the same receiver with a row of LEDS it works flawlessly. I've noticed that the relay keeps making the switching noise over and over like I'm pressing the transmitter really fast apart from the fact I'm not. Also, when the transmitter is moved closer to the receiver from 20" to around 1" the problem stops. Below is some circuits to help show you my setup.  Any help appreciated thanks.  Setup Specs   USB 5v DC (2AMPS) Receiver (XY-DJM-5V - SC2272-M4) Relay (SRD-05VDC-SL-C 5V DC) Transmitter (XY-04) Diode (1N4001) Transistor (2N2222A) Resistor (1.8K Ohms)          &ndash; Schematic created using   Antenna Signal Workaround or Booster  I believe this issue is related to wireless signal on D0. Basically above 20" inches the output to the relay drops from 5.05v to 0.5v and is obviously causing the problem. I think I need to boost the signal or replace the transistor with something that triggers at low and high current but have no clue. Any help appreciated, I'm new at this.  Board Setup How can I prove that if $G$ is an Abelian group with elements $a$ and $b$ with orders $m$ and $n$, respectively, then $G$ contains an element whose order is the least common multiple of $m$ and $n$?  It's an exercise from Hungerford's book, but it's not homework. I could not solve it when I take the course on groups and I think it should be easy. There is a hint that says to first prove when $m$ and $n$ are coprimes. I did this part. But I have no idea how to solve the general case.  Thanks. See permissions for new files on a given directory I don't understand how my Linux machine is operating on new files.   I have an Amazon Linux AMI (RHEL based distro) and when I execute umask I get 0002, so I get whenever I create new stuff other users won't get write access.  But then I go to my home directory and I type:  $ mkdir myDir $ touch myDir/myFile $ ls -l | grep myDir   and I get  drwxrwxr-x 2 myself myself 4096 May 11 22:37 myDir   and for the folder:  $ ls -l myDir -rw-rw-r-- 1 myself myself 0 May 11 22:37 myFile   So apparently there's more going on there then my umask, since myFile permissions are more restrictive than just write protection.  Digging deeper, if I try:  $ sudo touch /var/run/myPidFile.pid $ ls -l /var/run/ | grep myPidFile.pid -rw-r--r-- 1 root    root       0 May 11 22:42 myPidFile.pid   So myPidFile.pid gets a much more restrictive default permission, under /var/run then myFile gets under my home folder.  We could blame the root umask but if I run umask under root I get 0022 which is indeed more restrictive then my user's 0002 umask but still doesn't explain how the execution bit permission isn't set.  So how can I understand a folder's default permission on Linux? of a monic polynomial $f \in \mathbb F\left[x\right]$ in $1$ variable $x$ over a field $\mathbb F$ plays an important role in understanding the structure of finite dimensional $\mathbb F[x]$-modules.  It is an important fact that the characteristic polynomial and the minimal polynomial of $C(f)$ are both equal to $f$. This can be seen quite easily by induction on the degree of $f$.  Does anyone know a different proof of this fact? I would love to see a graph theoretic proof or a non inductive algebraic proof, but I would be happy with anything that makes it seem like more than a coincidence! Should moderators be allowed to decline flags on their own comments? I think I just witnessed a moderator decline a flag raised on his own comment. (I'm hesitant to discuss specifics unless I have to, as I don't mean to put anyone in a negative light.)  Since there are at least 2 other moderators per site, I'm not sure this should be allowed—I feel that either   only uninvolved moderator(s) should be able to view and handle flags on co-moderators' posts, or moderators should be able to view all flags, but a flagged moderator should not be allowed to decline a flag against him- or herself.   I have no personal issue with this moderator. I just felt in this case that there was truth in both sides (the moderator's as well as the flagging user's), and sought a win-win solution, i.e. by improving the disputed answer. Coming back an hour later to see that the moderator unilaterally declined the user's flag—that didn't seem fair to the user...  I am making some assumptions based on the "Last Seen" stat in the moderator tools, so if I'm simply mistaken on what happened, I apologize in advance. How to convert coordinates from vertex to world-space? How do I convert from object-space to world-space?  I suspect it is:  vert_os = obj.vertices[foo] vert_ws = vert_os.getPositionFromMatrix(obj.matrixWorld)   but does the matrix also handle translations, or do I need to handle that separately?  Can someone link to the relevant documentation? I am seeking advice on which memory to use with my motherboard and CPU. Below are my components and some relevant information extracted from their official websites.   NOTE: Although this is a very specific case, a general answer is equally good for me — and also alot more useful for everyone else!  CPU: AMD Phenom II X4 810   ASUS M4A785TD-V EVO listed as one of many  motherboards.   Motherboard: ASUS M4A785TD-V EVO   4 x DIMM, Max. 16 GB, DDR3 1800(O.C.)*/1600(O.C.)/1333/1066/800 ECC,Non-ECC,Un-buffered Memory Dual Channel memory architecture (Complete list of specs: ).   NOTE II: I wouldn't want to do any overclocking as I have no experience with that. So I think the 1333 MHz is the most appropriate. Since the higher frequencies are marked with "O.C."  Questions:   How can I be certain that a specific RAM will work well (or not work) together with my CPU and motherboard? (The Qualified Vendor List is a good starting point, but it's a bit limited and sometimes a bit outdated). Is it true that choice of memory is not independent of the processor? How?    I'm worried I'll be missing something essential when buying my next RAM chips :) If I have a double (234.004223), etc., I would like to round this to x significant digits in C#.  So far I can only find ways to round to x decimal places, but this simply removes the precision if there are any 0s in the number.  For example, 0.086 to one decimal place becomes 0.1, but I would like it to stay at 0.08. When applying dropout in artificial neural networks, one needs to compensate for the fact that at training time a portion of the neurons were deactivated. To do so, there exist two common strategies:   scaling the activation at test time inverting the dropout during the training phase   The two strategies are summarized in the  below, taken from .  Which strategy is preferable, and why?    Scaling the activation at test time:    Inverting the dropout during the training phase: