I'm writing a simple complex number C++ implementation as practice for overloading operators. One of the operators I simply cannot get past is &lt;&lt;. I get an undefined reference error to it whenever I try to call it.  is a gist link to my code. I am compiling it with the following:  g++ -std=c++11 main.cpp complex.cpp -Wall -Wextra -o complex   In addition to the unused parameter warning in main(), I get the following:  /tmp/cc7qVwEF.o: In function `main': main.cpp:(.text+0x1c5): undefined reference to `std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp; rob::operator&lt;&lt; &lt;char, std::char_traits&lt;char&gt; &gt;(std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, rob::Complex const&amp;)' collect2: error: ld returned 1 exit status
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.)
Where is the itoa function in Linux? itoa() is a really handy function to convert a number to a string. Linux does not seem to have itoa(), is there an equivalent function or do I have to use sprintf(str, "%d", num)? Parenthesis works in bash shell itself, but not in bash script When it comes to getting a tenure-track position where one has both a lot of resources and academic freedom to do what one wants to do (so having a tenure-track position in a top university might be more useful because one may get more resources at a top university).   Or in short, when one wants to maximize one's chances of becoming a "top scientist".  There are obviously numerous factors, and "rank/prestige" should not be considered as a factor in itself. That said, the period after one gets a PhD is an extremely important time for building up connections, and those are easier to get at a top university. I installed the ubuntu 12.04 server edition for my server pc . i had installed lamp server. i need to change the var/www location to my secondary hard disk location. i was configured so many time to at gedit /etc/apache2/sites-available/default here is my code  &lt;VirtualHost *:80&gt;     ServerAdmin webmaster@localhost      #DocumentRoot /var/www     DocumentRoot /media/myserver/     &lt;Directory /&gt;         Options FollowSymLinks         AllowOverride None     &lt;/Directory&gt;     #&lt;Directory /var/www/&gt;         &lt;Directory /media/myserver/&gt;         Options Indexes FollowSymLinks MultiViews         AllowOverride None         Order allow,deny         allow from all     &lt;/Directory&gt;      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/     &lt;Directory "/usr/lib/cgi-bin"&gt;         AllowOverride None         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch         Order allow,deny         Allow from all     &lt;/Directory&gt;      ErrorLog ${APACHE_LOG_DIR}/error.log      # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     LogLevel warn      CustomLog ${APACHE_LOG_DIR}/access.log combined      Alias /doc/ "/usr/share/doc/"     &lt;Directory "/usr/share/doc/"&gt;         Options Indexes MultiViews FollowSymLinks         AllowOverride None         Order deny,allow         Deny from all         Allow from 127.0.0.0/255.0.0.0 ::1/128     &lt;/Directory&gt;  &lt;/VirtualHost&gt;   and also used  sudo chown -R var/www /media/myserver/   and  chmod -R 755 /media/myserver/   still i was not able to connect my /media/myserver and my browser show the following message  Forbidden  You don't have permission to access / on this server.   Please tell anyone how to mount myserver at my var/www, thanks advance What are the subcategories of ordered sets / groups? Words that mean ''to say something unintentional'' I am looking for words that mean ''to say something unintentionally'' Cartoon with a young unicorn and a demon I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this &quot;.prototype&quot; property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot. Today I had some time and felt like writing a relatively good answer on Stack Overflow; explaining both the underlying mechanisms and good practices, unlike usual declarative answers in a "do that" style.  It took me like an hour of time, $50 if I were free lance. It'll bring me nothing but 3-5 occasional views, and - if I get lucky - some ignorant comments.  You know, it's quite discouraging.  Instead of pride for the job that was done, I feel frustrated. I know, this answer may offer help to the OP, if he ever notices it (being already satisfied with other answers).  So the only fate the answer will meet is to sink forever, below thousands other questions, falling like snow.  So, being a programmer, I am thinking of efficiency. It's a waste of time to spend so much effort to answer one question when there is no way to [actually] reuse it. So, I wouldn't do it again but just turn back into short answers mode without explanations.       Seeing other answers, I don't think I am only one with such feeling.  The current policy is driving knowledgeable and educational users away, yet it attracts inexperienced ones in numbers. Ones who will tell you to use [some technology] which they never have laid their hands upon. Ones who write answers just because they have learned some "good practice" from other questions, and this "knowledge" becomes an endless source of rep points.  The idea of Stack Overflow is rotten. It was excellent when trees were high and traffic was low.  It turned bad now; it has become a honeypot for all the "enthusiast programmers" of the world, eager to share their 2 cents faster than you can say the word "close".  You're killing a great resource. Despite all the nice words and proper declarations, it discourages the reuse of the knowledge. And encourages fast on-site answers.  Of course, the rules will tell you contrary. It's all nice and proper (if you don't mind it's strict mutual exclusivity). But mechanically, technologically it works in the way I described.  I tried to write a tag wiki. You know, it was biggest waste of time in my life. As a matter of fact, it is not a wiki at all; you can't even link to a certain section. Not to mention that nobody ever has the idea to read tag wikis.  Reference questions? Don't make me laugh. There is no good mechanism to store and categorize links. Favorites, although intended for the different purpose, are a chunk of crap when you want to use it as a reference. So, you can't compete with 30-seconds answers: a question will get 5 answers before you can even find an appropriate link.  Okay, I can organize links myself but, there are some problems:   I am just a human. I cannot remember everything I am just a human and I cannot answer questions at rate of 1 qpm. One person cannot fight the Tide. It's helpless. When technology makes people writing fast [incomplete] answers -  no good will of proper declarations can do a thing.  Even if a question gets finally closed, it won't hurt anyone - the hydra grew two more already.   You'll call me a brute for insulting honest users and innocent volunteers, but that's fact: There are much more inexperienced users than experienced ones. And inexperienced users have much more spare time to hang over than experts who have their job to do. So, from that fact we can conclude that most of the answers on Stack Overflow have a low quality. Nobody cares. But I do.   There should be a technical way to limit the activity of not-so-knowledgeable-yet-eager-to-answer users. There should be a technical preference for the closing a question over answering it (have a silly answer for the silly question? welcome to comments). There should be a technical solution to accumulate and structure knowledge, a system that lets you choose a good answer instead of writing it by hand.   That's the only way. Otherwise Stack Overflow will remain an automated dispenser of bad practices.  Well, I just felt like letting it out again. Thank you for reading. Which edit actions can move a post into Community Wiki mode? Surprisingly, I couldn't find a straight answer to this.  It's not entirely clear in the .  There are (at least?) four different types of edit actions:   Body edits Title edits Retags Rollbacks   And a few actions that show up in the history but aren't really "edits":   Close/Reopen Delete/Undelete   The FAQ seems to indicate that only body edits are important as far as "wikification" is concerned, but I'm not sure if that's really correct or if I'm just interpreting the post too literally.  The FAQ also says that rollbacks don't reverse the calculations - fine, but are they considered to be additional edits or are they ignored?  Can anyone tell me which of these actually count toward the wikification of a post, and whether the rules are any different for owner edits vs. multiple editors? I want to put a link to my SO profile on my homepage. I remember a codesnippet i saw somewhere that would basically display my Username and my reputation. Where was that? Upper bound and lower bound of an integral I have this problem and I don't know where to start. Can you give me some hint, please?  Suppose that $f:[a,b]\to [0,\infty]$ is a lebesgue integrable function. Let $B=\int_a^b fd\mu.$ Prove that $\sqrt{1+B^2}\leq \int_a^b\sqrt{1+f^2}d\mu\leq 1+B$. I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&amp;A is meant as a general description for all Google and Gmail username/password questions. See: ) Where and how does the Bleach anime diverge from the manga? I've seen almost all of the Bleach anime (at least what's been released dubbed), and I'm now interested in reading the manga. However, when the manga closely follows the anime I've already seen, I tend to get bored quickly. Thus, I'd want to pick up the manga at a point right before the anime began to diverge.  At what point in the manga is this? Can a well-timed Twisted Image kill a player using Tree of Redemption? What happens if my opponent activates  and I cast  with the life-exchange ability on the stack?  Looking at the comp rules, these seem most relevant:     701.8a A spell or ability may instruct players to exchange something (for example, life totals or    control of two permanents) as part of   its resolution. When such a spell or ability resolves, if the   entire exchange can’t be completed, no part of the exchange occurs.      Example: If a spell attempts to exchange control of two target creatures but one of those              creatures is destroyed before the spell resolves, the spell does nothing to the other              creature.      112.7a Once activated or triggered, an ability exists on the stack independently of its source.    Destruction or removal of the source   after that time won’t affect the ability. Note that some    abilities   cause a source to do something (for example, “Prodigal Sorcerer deals   1 damage to    target creature or player”) rather than the ability   doing anything directly. In these cases, any    activated or triggered   ability that references information about the source because the   effect    needs to be divided checks that information when the ability   is put onto the stack. Otherwise, it    will check that information   when it resolves. In both instances, if the source is no longer in the   zone it’s expected to be in at that time, its last known information   is used. The source can still    perform the action even though it no   longer exists.   Is the entire exchange ability countered because the Tree is dead by the time it resolves? Or do we use the "last known state" (toughness 0), thereby killing its controller? When does a locational distinction change its suffix and capitialization in a proper name? android expandablelistview how to set space between groups items How to correctly install libpng12-0 on the Ubuntu 19.10? Why doesn't my flash fire from the hot shoe trigger? I have a Yongnuo YN-560 III and a pair of RF-603II (C3) triggers. I have a Canon Rebel T5i.   I put one trigger on the hot shoe.  When this trigger is in TX mode I get a blue comm light and I can fire a test flash using the large test button on the trigger. But when I press the shutter button to take a picture, there's no flash.  The trigger and flash are on Channel 1. The trigger on the hot shoe is set to TRX. TX is fine, TRX gives me no flash. The flash and camera are in M mode.  I don't have a trigger on the flash because the Mark III has a built-in trigger The problem seems to be the camera.  The trigger can talk to the flash but the camera is not sending a flash command through the trigger in the hot shoe to the flash.  Grateful for anything you could suggest. How to implement custom icons for my script/addon? Is it possible to use different icons other than the default set and how?