I'm doing a little research for a course on which computing speed over collections on different cpu types. I'm writing my tests in C++ (bad choice as I started with the language three weeks ago) and I'm trying to measure the amount of clock ticks.  I thought I'd implement an arbitrary map (yes, yes, transform) function first. For some reason I decided to encapsulate the functions I'm writing in different classes. I first tried making a function that takes an arbitrary collection, but that didn't work, so I thought of making a function that takes two iterator pointers, so I'm currently having problems with this:  .h  #include &lt;vector&gt; #include &lt;map&gt; #include &lt;ctime&gt; using namespace std;  class MapTests { public:     static unsigned long halve(unsigned long in);      template &lt;class InputIter&gt;     static clock_t getHalveTest(InputIter begin, InputIter end); };   .cpp  #include "MapTests.h"  unsigned long MapTests::halve(unsigned long in){ return in/2; }  template&lt;class InputIter&gt; clock_t MapTests::getHalveTest(InputIter begin, InputIter end) {     vector&lt;unsigned long&gt; store = {};     auto beginTime = clock();     transform(begin, end, store, &amp;MapTests::halve);     return clock()-beginTime; }   I'm still planning on making a seperate function for std::map, but this is what I was planning to use for list, vector, array and such.  When I try to compile and print the clock ticks for the forward_list I get this monster of an error:      Undefined symbols for architecture x86_64:     "unsigned long MapTests::getHalveTest*> >(std::__1::__forward_list_iterator*>, std::__1::__forward_list_iterator*>)", referenced from:         _main in main.cpp.o   ld: symbol(s) not found for architecture x86_64   clang: error: linker command failed with exit code 1 (use -v to see invocation)   And I have no clue what I'm doing wrong here. I suspect I should do something with my template, but I don't know what.
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.)
Snap application doesn't see files from another partition I have installed KeePassXC snap package on Ubuntu 17.10. I have multiple linux systems installed on the same drive, so I have made most of my home folders like ~/Documents created as links to a separate ext4 partition (users have same uid so permissions are correct). I tried to open my passwords' database which I have inside Documents, but keepassxc cannot see any files inside Documents. If I put the file in my home folder then it sees it.  Are snap packages able to find files outside from my home folder? Any way to make KeePassXC (and the rest snap packages) access the files at my separate ext4 partition (maybe some configuration somewhere)? Best way to obtain clarifying information when reputation doesn't allow comments? Java generics type erasure: when and what happens? I read about Java's type erasure .  When does type erasure occur? At compile time or runtime? When the class is loaded? When the class is instantiated?  A lot of sites (including the official tutorial mentioned above) say type erasure occurs at compile time. If the type information is completely removed at compile time, how does the JDK check type compatibility when a method using generics is invoked with no type information or wrong type information?  Consider the following example: Say class A has a method, empty(Box&lt;?&nbsp;extends&nbsp;Number&gt;&nbsp;b). We compile A.java and get the class file A.class.  public class A {     public static void empty(Box&lt;? extends Number&gt; b) {} }     public class Box&lt;T&gt; {}   Now we create another class B which invokes the method empty with a non-parameterized argument (raw type): empty(new Box()). If we compile B.java with A.class in the classpath, javac is smart enough to raise a warning. So A.class has some type information stored in it.  public class B {     public static void invoke() {         // java: unchecked method invocation:         //  method empty in class A is applied to given types         //  required: Box&lt;? extends java.lang.Number&gt;         //  found:    Box         // java: unchecked conversion         //  required: Box&lt;? extends java.lang.Number&gt;         //  found:    Box         A.empty(new Box());     } }   My guess would be that type erasure occurs when the class is loaded, but it is just a guess. So when does it happen? Is there a quicker way to turn on WiFi Hotspot? is there a way to automate (or at least reduce the number of steps) to turn on or turn off the WiFi hotspot on my Galaxy 3.  I have to    unlock  press the menu button  press settings press More Settings Tethering and portable hotspot Slide portable hotspot on. I know the "textbook" estimate of the standard error of a proportion is $SE=\sqrt{\frac{p(1-p)}{n}}$, but does this hold up when the data are weighted? Why is `enjoy to [verb]` incorrect I can say:     I love to read. I hate to read.   But it must be:     I enjoy to read. I enjoy reading.   What is enjoy so different? Cycles settings missing This particular blend file is messed up. I'm not sure what I did or pressed. If I open a new blend file everything works fine but in this one the materials tab is missing and the render properties is also missing some things. I don't want to start over my project. I have tried a day and a half to figure this out. I have a Git repo that I have deleted four files from using rm (not git rm), and my Git status looks like this:  #    deleted:    file1.txt #    deleted:    file2.txt #    deleted:    file3.txt #    deleted:    file4.txt   How do I remove these files from Git without having to manually go through and add each file like this:  git rm file1 file2 file3 file4   Ideally, I'm looking for something that works in the same way that git add . does, if that's possible. You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C.  myObject.property = YES;   or  [myObject setProperty:YES];   Is there a difference in performance (in terms of accessing the property)? Is it just a matter of preference in terms of coding style? Embedding a link (or other html) in a JSF message Experience using dropdowns in-line of sentence "mad lib" style Do you have experience implementing text inputs or drop-downs in-line with other text or forms? Is this approach any better than just creating a separate field/label?  In the example below the user has the option to indicate when to be reminded again (in one, two, or three days). When they are reminded of an assignment, they simply get an email or text message. Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? How do I hide Thunderbird from the launcher while running? I have a question for you all.  It's possible to "hide" thunderbird from the unity application bar when thunderbird is running?  For my is unhelpfull see thunderbird on the "mail" tray ( near shutdown button) and the unity "running" application.  If i close thunder with the close button, it don't notify me new email. The question is how can I exclude an object from the freestyle render?  What I need to do is create a Clay render with the wire only on the airplane.  My scene is simple I only have two objects the "Toy Plane" and the "floor". For the Clay render I only override the materials to a simple clay material and done.    But this happens when I use freestyle. How can I tell freestyle to ignore the "Floor"? This next year, I am helping an effort to clean several SQL Server environments.    We have about 10,000 stored procedures and estimate that only about 1000 of them are used on a regular basis, and another 200 or so are used on a rare occasion, meaning we have a lot of work to do.    Since we have multiple departments and teams that can access these databases and procedures, we are not always the ones calling the procedures, meaning that we must determine what procedures are being called.  On top of that, we want to determine this over a few months, not in a few days (which eliminates some possibilities).  One approach to this is to use the SQL Server Profiler and track what procedures are being called and compare them to the list of what procedures we have, while marking whether the procedures are used or not.  From then, we could move the procedures to a different schema in case a department comes screaming.  Is using the Profiler the most effective approach here?  And/Or have any of you done something similar and found another way/better way to do this? If $\operatorname{rank}\left( \begin{bmatrix} A &B \\ C &D \end{bmatrix}\right)=n$ prove that $\det(AD)=\det(BC)$ Two arrays in foreach loop I'm getting into English recently and I'm a little confused by the way people pronounce a word that starts in a vowel right after a word ending in -ing.  For example:      You have to bring it up now?   I don't know if I should pronounce it as:   bring /ŋit/ brin' /nit/ bring /git/   Another example would be "I'm coming out".  Likewise, what about the ending -ang? For example:      We can just hang out and have a good time.    And to round it all up, what about a combination of the two? For example,      He got sick of hanging around waiting for you and went home.   I've been asking myself these questions for weeks. I am a senior undergraduate (electrical) engineering student, exceedingly interested in physics. 4 years ago when entering university, for some reasons (better: illusions) I chose engineering as my major, while I was interested (and also really knowledgeable) in physics . Soon after the first semester I realized that I've decided wrong, and I must have chosen physics.  Since our university is a technical institute and does not have a strong physics department I decided to study physics on my own, without changing my major.But I took and passed the basic graduate physics courses (advanced quantum mechanics, advanced statistical mechanics, electrodynamics I &amp; II), have done a few research projects and had a paper published (maybe 1 more in the future). I have explored lots of research areas in physics and I think I have a good potential for doing research.  While concentrating on physics, I was inattentive to EE courses. Today, while searching for graduate programs, I saw that some schools require a minimum GPA, usually 3. I just calculated my GPA and found out that it is 2.95!   Do all universities have a GPA threshold?  Since I'm changing my major and also have a good GPA in graduate physics courses, is there any way I can compensate for my (very) low electrical engineering GPA? (like by taking subject GRE, etc.) If I first (somehow) get a masters degree in physics and then apply for a PhD, can I throw away this electrical engineering GPA in my PhD application ?   Any other suggestion is warmly appreciated. How can I resize NTFS partition in GParted?