I am trying to write a class for an unordered array, so I made a template class for it in another file. I have only added a constructor and destructor, but when I build and run the code in visual studio 2019, the linker throws this error: 1&gt;main.obj : error LNK2019: unresolved external symbol &quot;public: __thiscall UnorderedArray&lt;int&gt;::UnorderedArray&lt;int&gt;(unsigned int)&quot; (??0?$UnorderedArray@H@@QAE@I@Z) referenced in function _main 1&gt;main.obj : error LNK2019: unresolved external symbol &quot;public: __thiscall UnorderedArray&lt;int&gt;::~UnorderedArray&lt;int&gt;(void)&quot; (??1?$UnorderedArray@H@@QAE@XZ) referenced in function _main 1&gt;C:\Users\stati\source\repos\Data_Structures_and_Algorithms\Debug\Data_Structures_and_Algorithms.exe : fatal error LNK1120: 2 unresolved externals  I do not understand why the linker the throwing this error since I defined everything in the .cpp file. Here is the code: UnorderedArray.cpp #include &quot;UnorderedArray.h&quot;   // Constructor template &lt;typename T&gt; UnorderedArray&lt;T&gt;::UnorderedArray(size_t length)     : m_length{ length },     m_maxSize{ m_length },     m_data{ new T[m_maxSize] } {  }  // Destructor template &lt;typename T&gt; UnorderedArray&lt;T&gt;::~UnorderedArray() {     delete m_data;     m_data = nullptr; }   UnorderedArray.h #ifndef ARRAY_H #define ARRAY_H  #include &lt;cstddef&gt;   template &lt;typename T&gt; class UnorderedArray { private:     T* m_data;     size_t m_length;     size_t m_maxSize;  public:     // Constructor     UnorderedArray(size_t length);     // Destructor     ~UnorderedArray(); };   #endif // !ARRAY_H  main.cpp #include &quot;UnorderedArray.h&quot;  int main() {     UnorderedArray&lt;int&gt; arr{ 5 };      return 0; }
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.)
Sorry if this is very basic but here's a question.   Let $\mathbf{v}=(v_1,\ldots, v_n)\in k^n$ where $k=\bar{k}$.      Why do we have   $$ \sqrt{\sum_{i=1}^n |v_i|^2} \leq \sum_{i=1}^n |v_i|,  $$   where the left-hand side can be thought of as the $2$-norm $\|\mathbf{v}\|_2$ on $L^2(k^n)$?   $\mathbf{General \; case}$: If this is true for $p=2$-norm, I am guessing that this is true for all $p\geq 1$:  $$ \left( \sum_{i=1}^n |v_i|^p\right)^{1/p}\leq \sum_{i=1}^n |v_i|.  $$     In fact, does this inequality hold when $p$ is a rational number? How can I keep multiple live/bootable ISO images on a single USB drive? I am looking to create a USB flash drive that I can put multiple  ISO images on and select which boots from startup. The ideal candidate supports Linux and Windows-based ISO images, and is relatively simple. It also must have some reasonable process for adding and removing an ISO image from the drive/list.    Things that I'm not looking for in this specific question:    or other swiss-army knife live CDs. The point is to boot any one of multiple CDs, not to boot a (certainly useful) utility CD. Installing a single live CD to a USB drive. I'd like to have multiple ISO images, selectable at startup.   I don't have a specific purpose in mind, possibilties include a single drive with a  variant, Ubuntu desktop, UBCD4Win for DOS, the Offline NT Password Cracker, etc.  Flexible and easy to use are the name of the game! I'm a student and I'm working on a low power communication project. I am trying to design a PCB using the . There is a MC-306 (32.768kHz, 12.5pf, and 20/50ppm).   I don't know what the 20/50ppm rating is. For me, the size is very important, so I decided to replace it with the , but its ppm is -20/+20. Will it cause a problem if I use this one instead?  What is the ppm rating in the crystal oscillator? The following sentence refers to an apocalyptic story where money no longer has any value:     A can of sardines, radio batteries, or a bicycle is/are more precious than money.   Should I use is or are after the series? WinDirStat shows 244GB unknown space on external drive I recently noticed that one of my external hard drive seems to be missing a lot of space. It was recommended that I try WinDirStat, as it could help identify how much space each file was taking up. This is the result:     As you can see, there is about 244.7GB "unknown" usage.  Doing a bit of research online, the most common suggestion was (a) Recycle Bin and (b) System Volume Information.  (a) As you can see, empty. To double check, I ran Disk Cleanup. It confirmed that it was empty. (Note that a new file appeared by the time I took this screenshot, but it's only 129 Bytes.)  (b) Harder to tell. However, according to various forums, the most common reason for System Volume Information to grow large is due to System Restore Files. I had a look, and it is definitely turned off for this drive, as seen here:     What else could be causing this issue? It is an enormous amount of storage to have gone missing! The propagation of electric field What are the correct version numbers for C#? Let $f$ be an entire function with $|f(z)|\le 100\log|z|,\forall |z|\ge 2,f(i)=2i, \text{ Then} f(1)=?$  I have no idea how to solve this one!  $g(z)={f(z)\over \log|z|}$ Then Can I say $g$ is constant by Liouville Theorem? (I'm aware of  but it has no answers…)  Let be $u_0 \in \mathbb{R}$ and the sequence $(u_n)_n$ defined by: $u_{n + 1} = \frac12 \arctan(u_n)$.  I define also: $v_n = 2^n u_n$, so I can show that: $\lim (u_n)_n = 0$ (by studying $x \mapsto \frac12 \arctan(x)$), thus, I can show that $(v_n)_n$ is monotone and converges because it is bound.  Now, I conclude: $u_n \sim \dfrac{l}{2^n}$, I'd like to determine $l$ more precisely.  Here is what I tried, I suspect $l$ to be something like $f(\pi)$ for some $f$ :   push the asymptotic expansion of $\arctan$ to the 2nd order and reinject it ; use $\arctan(u_n) + \arctan(1/u_n) = \dfrac{\pi}{2}$ ; use series techniques to look for $\sum v_{n + 1} - v_n$, maybe conclude using Cesaro summation Where and why do I have to put the "template" and "typename" keywords? In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template &lt;typename T, typename Tail&gt; // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template&lt;typename U&gt; struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion&lt;U&gt; dummy;      };     template&lt; &gt; struct inUnion&lt;T&gt; {     }; }; template &lt;typename T&gt; // For the last node Tn. struct UnionNode&lt;T, void&gt; {     // ...     template&lt;typename U&gt; struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template&lt; &gt; struct inUnion&lt;T&gt; {     }; };   The problem I have is in the typedef Tail::inUnion&lt;U&gt; dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion&lt;U&gt; names a type and not a function? Difference of the floor of a product and the product of floors Is there any way the following can be simplified?  $$\lfloor f(x)\cdot g(x) \rfloor - \lfloor f(x) \rfloor  \cdot \lfloor g(x) \rfloor$$ Why and how is the  of a matrix in $M_3(\mathbb C)$ fully determined by its characteristic and minimal polynomials? And why does it fail for $n &gt;3$?   Thanks. "This question has been asked at Stack Overflow" vs. "on Stack Overflow" How should I phrase it:     This question has been asked at Stack&nbsp;Overflow.   Or,     This question has been asked on Stack&nbsp;Overflow. I am a beginner to python coding in GIS. I want to calculate the total number of counts in raster attribute table. In order to do that:   I would like to build a attribute table of raster data use a loop through attribute table using ARCPY.SearchCursor()   Therefore, I wrote a code to build an attribute table. However, I am getting an error while running the code and not able to figure out the error in the code.  Code:  import arcpy # Create the geoprocessing object  import arcgisscripting gp = arcgisscripting.create()  #To overwrite output arcpy.env.overwriteOutput = True  #Set environment settings gp.workspace = "C:/Subhasis/Test/raster-read"  #Build Raster Attribute Table gp.BuildRasterAttributeTable_management("sti-9", "Overwrite")  Error Message: Traceback (most recent call last):   File "C:/Subhasis/Test/raster-read/test.py", line 15, in &lt;module&gt;     gp.BuildRasterAttributeTable_management("sti-9", "Overwrite") ExecuteError: ERROR 000049: Failed to build attribute table Failed to execute (BuildRasterAttributeTable). What is the difference between kernel drivers and kernel modules? This might be a stupid question, but why exactly is work a path function?  In school, my teacher said it’s because it depends on the path. She gave an example of walking up a mountain, and said the work you expend depends on the path you take (straight path up or circling up around the mountain). But isn’t the work expended just equal to $E= mgh?$ Why is a T distribution used for hypothesis testing a linear regression coefficient? In practice, using a standard T-test to check the significance of a linear regression coefficient is common practice. The mechanics of the calculation make sense to me.  Why is it that the T-distribution can be used to model the standard test statistic used in linear regression hypothesis testing? Standard test statistic I am referring to here:   $$ T_{0} = \frac{\widehat{\beta} - \beta_{0}}{SE(\widehat{\beta})} $$ How to drive multiple LEDs from a Li-ion battery (with varying voltage)? I want to supply constant voltage to my LED's but the supply varies from 3.7V to 4.2V (Li-ion battery). I cannot use 3.3V voltage regulator as it will need at least 4.3V voltage at the input but my battery can supply only 4.2V max. so is there any other way I can supply regulated 3.3V to my LED.   RGB LED = 3.3V, 60mA Battery = 3.7V - 4.2V, 3000mA Number of LEDs = 24 The LED's are connected in parallel grep strange behaviour with single letter words I am removing stop words from a text, roughly using this   I have the following  $ cat file file types extensions  $ cat stopwords i file types   grep -vwFf stopwords file  I am expecting the result: extensions  but I get the ( I think incorrect)  file extensions   It is as if the word file has been skipped in the stopwords file. Now here's the cool bit: if I modify the stopwords file, by changing the single word/letter i on the first line, to any other ascii letter apart from f, i, l, e, then the same grep command gives me a different and correct result of extensions.  What is going on here and how do I fix it?  I'm using grep (BSD grep) 2.5.1-FreeBSD on a Mac OSX GNU bash, version 4.4.12(1) I am trying to modify output in my twig file. In D7, I was able modify data in my array with this  check_markup($tweet-&gt;text, 'full_html');   and I see that this function still exists in D8. However, I'm not sure how I would use this in a filter in twig. This is what I have so far:  {% for tweet in params.tweets %} &lt;div class="tweet-wrapper"&gt; &lt;div class="tweet-profile-image"&gt;     &lt;img src='{{ tweet.user.profile_image_url }}'/&gt; &lt;/div&gt; &lt;div class='tweet-text'&gt;     &lt;!--check_markup($tweet-&gt;text, 'full_html');--&gt;     {{ tweet.text }} &lt;/div&gt;   &lt;/div&gt; {% endfor %}   I actually tried to do this before I sent it to the template as well, but it didn't change anything:   foreach($tweets as $tweet) {   $tweet-&gt;text = check_markup($tweet-&gt;text, 'full_html');   $cleanTweets[] = $tweet; } dpm($tweets); $params = array('tweets' =&gt; $cleanTweets); $tweet_template = array('#theme' =&gt; 'twitter_pull_tweet_listing', '#params' =&gt; $params); return $tweet_template;   What I'm trying to do here is make drupal create links for web links in the twitter tweet text. This worked fine for me in D7.