I am running ubuntu 16.04 with gcc.  My q.ccp file is  #include &lt;my_messages.pb.h&gt;  int main(int argc, char **argv) {      google::protobuf::MyMessage* logged_msg_;      return 0; }   command used for compilation:  g++ -m64 -Wl,-O1 -L/usr/lib/x86_64-linux-gnu /usr/local/lib/libprotobuf.a my_messages.pb.cc q.cpp -lpthread   protoc --version returns: 2.2.0  gcc --version  gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   compile error starts with  undefined reference to `google::protobuf::internal::ExtensionSet::Clear()   and gives undefined reference error for every function of protocol buffers.
Why does the order in which libraries are linked sometimes cause errors in GCC?
Can a multiclass character use either of its spellcasting modifiers for spells? The easiest way to explain this question is with a thought experiment:  Consider God, the ultimate of everything, who is wholly omnipotent (all-powerful) and omniscient (all-knowing). Let's just say, hypothetically, that he wanted  (this is a totally random example I just happened to be reading about; I could have just as easily said He wanted Bob to score a free-throw in basketball 3 times in a row tomorrow, or Sally to knit a blue sweater on Sunday, November 4th, 2012).  But anyways, one way He could do this (get X group of people to save a man from a burning car) is: At the beginning of time, God could instantly plan out the future and set in motion a massive chain of events, from the creation of light and stars, the creation of Earth and the creatures, mankind, then civilization with all the conflicts and progress and glory that comes with it, such that one day, a few people would come from out of nowhere—complete strangers to each other—and save this man (also a stranger) from under a burning car. God need not intervene at all this whole time, He merely "ignited" the chain of events from day 1 and watched it unfold exactly as He planned. Let's call this Universe A.  He could also, being all-powerful, just freeze time for a bit and skip a few steps, creating the world and universe instantly, with all the civilizations and animals and things in place, putting all the strangers there together next to a car which is already on fire and the man trapped under it. Then press play, and presto, you have the exact same scenario, without billions of years of buildup. Let's refer to this as Universe B.  God is obviously capable of doing both. My question thus is whether there is an  (really any difference at all) between Universe A and Universe B. Personally, I don't think this kind of power is outside of God's capability; he should, after all, have no problem with creating identical universes which match up exactly once they reach "biker under the car" moment where He unfroze time in Universe B. At that moment, Universe A and Universe B are exactly the same, right? Or is there somethinge special about Universe A, with all it's buildup, that separates it intrinsically from Universe B? In other words, is it outside of God's ability to make them exactly equivalent? How can I combine two plots? Prove that in a triangle $$r^2+r_1^2+r_2^2+r_3^2=16R^2-(a^2+b^2+c^2)$$ where the symbols have their usual meanings. I am looking for a smaller or elegant proof using trigonometry. A geometric proof would be super cool. I did prove it but it took me ages to do the calculation. Thanks. Drive shape key based on relative camera orientation? I am trying to customize the legend for this graph. First of all, I would like the legend width to be equal to the x-axis width. At the moment, I am setting the width of the legend via      /tikz/every even column/.append style={column sep=1.0cm}   and I could manually adjust this value so that length equals the x-axis width, but I guess that there is a more elegant way to set the width of the legend.  Second, I don't really like the little color rectangles in the legend. I only want one rectangle in front of every entry and not two. This rectangle does not need to have a border and should be vertically centred with the text. The alignment seems to be okay for the rectangle closer to the text, but not for one the far left.   Update: Thanks to Christian Feuersänger's comment, there is possibility to change the rectangles via   legend image code/.code={%     \draw[#1, draw=none] (0cm,-0.1cm) rectangle (0.6cm,0.1cm);   or what Gonzalo Medina proposed  legend image code/.code={%     \draw[#1, draw=none, /tikz/.cd, bar width=3pt, yshift=-0.2em, bar shift=0pt] %     plot coordinates {(2*\pgfplotbarwidth,0.6em)};   Third, I would like to the legend entries to start next to the text "Legend:".  I don't really know if with these requirements it still makes sense to use legend or if it would be better to add everything manually via after end axis/.code and \ref{label}.  Graph    MWE  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{document} \begin{tikzpicture}     \begin{axis}[                 ybar,                 height=6cm,                 title={Some plot},                 width=12cm,                 axis on top,                 y axis line style={opacity=0},                 axis x line*=bottom,                 tick align=inside,                 tick style={draw=none},                 xtick=data,                 ymajorgrids,                 major grid style={draw=white},                 xtick={1,2,3,4},                 legend style={                     at={(0.0,-0.15)},                     anchor=north west,                     legend columns=-1,                     /tikz/every even column/.append style={column sep=1.0cm}                         },             ]                    \addlegendimage{empty legend}             \addlegendentry{\textbf{Legend:}}                                \addplot coordinates {                 (1, 0.2064)                 (2, 0.3961)                 (3, 0.5961)                 (4, 0.7961)}; \addlegendentry[text width=45pt, text depth=]{legend a}             \addplot coordinates {                 (1, 0.3064)                 (2, 0.4961)                 (3, 0.6961)                 (4, 0.8961)}; \addlegendentry[text width=65pt, text depth=]{lengend b}     \end{axis}  \end{tikzpicture} \end{document} Dynamically adding a form to a Django formset I want to dynamically add new forms to a Django formset, so that when the user clicks an &quot;add&quot; button it runs JavaScript that adds a new form (which is part of the formset) to the page. How do you handle multiple instances of setTimeout()? What is the most recommended/best way to stop multiple instances of a setTimeout function from being created (in javascript)?  An example (psuedo code):  function mouseClick() {    moveDiv("div_0001", mouseX, mouseY); }  function moveDiv(objID, destX, destY) {    //some code that moves the div closer to destination    ...    ...    ...     setTimeout("moveDiv(objID, destX, destY)", 1000);    ...    ...    ... }   My issue is that if the user clicks the mouse multiple times, I have multiple instances of moveDiv() getting called.  The option I have seen is to create a flag, that only allows the timeout to be called if no other instance is available...is that the best way to go?  I hope that makes it clear.... Looking for a simple proof that groups of order $2p$ are up to isomorphism $\mathbb{Z}_{2p}$ and $D_{p}$ . I'm looking for a simple proof that up to isomorphism every group of order 2p (p prime) is either $\mathbb{Z}_{2p}$ or $D_{p}$ (The Dihedral group of order 2p).  I should note that by simple I mean short and elegant and not necessarily elementary. So feel free to use tools like Sylow Theorems, Cauchy Theorem and similar stuff.  Thanks a lot! Is there a good casual online place to practice/learn bridge? I know that Pogo.com (which powers Yahoo Games) has a long running online bridge game and that there are a handful of places for serious tournament/MasterPoint level bridge players online (though most seem based on software written a decade or more ago) but are there any places to play, practice and learn bridge in a more casual manner? Ideally via a well designed modern piece of software? \AtEveryBibitem{\clearfield{Title}} in beamer? Control a property with no socket (color ramp swatch, etc) from a Group Node input? Why isn't sizeof for a struct equal to the sum of sizeof of each member? Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members? Accepted way to abbreviate cities that have "Saint" in their name My first question here, so I'm not sure if this OT or not, so please bare with me.  Background: I don't live in US. I'm working with some data that I'm pulling from . Sometimes, I'm getting a city name as St. John and sometimes as Saint Ann.   So my question is, is there an accepted way on how people write a US city names which starts with Saint or is this just some random thing (or just specific to AdWords maybe)?  I'm asking this, because if for example I'll get both St. John and Saint John in the same file, should I consider them the same or should I be suspicious? I still do not understand what a  precisely is. Is it exactly the same as a particle? Or only an excited state?  And why does it make a peak in some diagrams? And which diagrams? What happens if both players die simultaneously? If both players are very low health and someone plays this card:    Both players could die simultaneously. What happens in Arena when this event occurs? Does it count as a loss for both players? Does it count at all for your Arena record?  Side note: Holy Nova + Auchenai Soulpriest could cause the same scenario. Purchasing a Switch - AC vs DC Current Specifications? I'm trying to purchase several switches for a DC system with moderately low current (a few amps at 12V). When browsing for switches in parts catalogs (e.g.  and ) there are always separate voltage ratings for AC and DC applications. I understand that AC switches are less expensive because the switching time does not need to be as fast and arcing is less of a concern. There is only one current rating listed and I am not sure if it applies to AC switching, DC switching, or both.  Does this current rating apply to both the rated AC and DC voltages? Is there a good rule-of-thumb for converting between AC and DC voltage/current ratings? What is the highest current I could reasonably expect from a DC switch before moving to a relay? How to Setup GIMP 2.10 on Ubuntu 16.04 (Xenial Xerus) Integral $ \int_{-\pi/2}^{\pi/2} \frac{1}{2007^x+1}\cdot \frac{\sin^{2008}x}{\sin^{2008}x+\cos^{2008}x}dx $ I am trying to solve this integral $$ \int_{-\pi/2}^{\pi/2} \frac{1}{2007^x+1}\cdot \frac{\sin^{2008}x}{\sin^{2008}x+\cos^{2008}x}dx $$ A closed form does exist despite the looks of the integrand.  This problem is from some old high school IMO training courses.  I am not sure how to solve it. The only information that may be of help is $$ \sin x=\sum_{n=1}^\infty \frac{(-1)^n x^{2n+1}}{(2n+1)!}, \quad \cos x=\sum_{n=1}^\infty \frac{ x^{2n}}{(2n)!} \quad \forall \ x $$ Thanks, I am looking for a complete solution, not a description as of what to do. Solution of equation $\frac{x\cdot 2014^{\frac{1}{x}}+\frac{1}{x}\cdot 2014^x}{2} = 2014$ Solution of equation $\displaystyle \frac{x\cdot 2014^{\frac{1}{x}}+\frac{1}{x}\cdot 2014^x}{2} = 2014$   $\bf{My\; Try::}$ Clearly Here $x&gt;0$, Now Using $\bf{A.M\geq G.M}$  So Here $\displaystyle x\cdot 2014^{\frac{1}{x}}&gt;0$ and $\displaystyle \frac{1}{x}\cdot 2014^x&gt;0$ .  So $\displaystyle \left(\frac{x\cdot 2014^{\frac{1}{x}}+\frac{1}{x}\cdot 2014^x}{2}\right)\geq \left(x\cdot 2014^{\frac{1}{x}}\cdot \frac{1}{x}\cdot 2014^x\right)^{\frac{1}{2}} = \sqrt{2014^{\left(x+\frac{1}{x}\right)}} = 2014$   And equality Hold , When $\displaystyle x = \frac{1}{x}\Rightarrow x= 1$  Can we solve it  without Using $\bf{A.M\geq G.M}$  If Yes, Then please explain me.  Thanks