Class that my list stores:     class newClass{ private:   int a;   double b; public:   newClass( int c, double d ){     a = c;     b = d;   } };   Creating the list:  list&lt; newClass &gt; newList;   Printing the list:  list&lt; newClass &gt;::iterator i; for( i = newList.begin(); i != newList.end(); i++ ){   cout &lt;&lt; *i &lt;&lt; " "; } cout &lt;&lt; endl;   This is the only method for printing lists that I have found but due to me printing values from a class this does not work. How do I work around this?
I am writing a small matrix library in C++ for matrix operations. However my compiler complains, where before it did not. This code was left on a shelf for 6 months and in between I upgraded my computer from debian etch to lenny (g++ (Debian 4.3.2-1.1) 4.3.2 ) however I have the same problem on a Ubuntu system with the same g++.  Here is the relevant part of my matrix class:  namespace Math {     class Matrix     {     public:          [...]          friend std::ostream&amp; operator&lt;&lt; (std::ostream&amp; stream, const Matrix&amp; matrix);     } }   And the "implementation":  using namespace Math;  std::ostream&amp; Matrix::operator &lt;&lt;(std::ostream&amp; stream, const Matrix&amp; matrix) {      [...]  }   This is the error given by the compiler:     matrix.cpp:459: error: 'std::ostream&amp;   Math::Matrix::operator&lt;&lt;(std::ostream&amp;,   const Math::Matrix&amp;)' must take   exactly one argument   I'm a bit confused by this error, but then again my C++ has gotten a bit rusty after doing lots of Java those 6 months. :-)
What does it really mean that telephoto lenses "flatten" scenes? This is another perspective distortion question. I understand that perspective distortion is primarily a function of capture and viewing distance, but I am still working on fully understanding the causes of the "flattening" of scenes that is credited to telephoto lenses.  This seems to refer to our ability to discern the differences in size attributable to differences in distance from the lens for subjects beyond a certain distance from the lens. If this is correct, then is it just that with the longer distance from the subject when using a telephoto lens, this compression happens closer to the foreground, rather than in the mid- or background with a wide lens?  Is it fair to say that the compression effect occurs at a certain distance from the photographer regardless of lens, but the field of view influences how close to the foreground this effect takes place? Can you share any information to help people like me understand this? Do we know anything about Aragorn's first time in Moria? When the Company is forced to abandon their attempt to cross the Misty Mountains via the Redhorn Gate (the pass of Caradhras), Gandalf proposes they go "neither over the mountains, nor round them, but under them," via Moria. During the debate Aragorn remarks:     "I too once passed the Dirmrill Gate but though I also came out again, the memory is very evil. I do not wish to enter Moria a second time."    I haven't read much beyond the LOTR trilogy other than The Silmarillion. Does Tolkien ever describe Aragorn's first visit to Moria anywhere? Implications of parity violation for molecular biology In biology, the concept of parity emerges in the context of chiral molecules, where two molecules exist with the same structure but opposite parity. Interestingly, one enantiomer often strongly predominates over the other in natural biological systems (e.g. D-glucose is ubiquitous, L-glucose is rare in nature).  In physics, it has been established that weak interactions violate parity, which (if I understand correctly) implies a physical difference between left- and right-handed systems.  This suggests to me the following questions: Does parity violation in physics affect the physical or chemical properties of chiral molecules? And does this have any implications for our understanding of biological homochirality? Convergent or divergent $\sum_{n=1}^{\infty} \frac{e^nn!}{n^n}$? Git error: large files "detected", even though no large files exist Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality  using the SB theorem? Also how does one find a bijection on $f:(0, \infty) \to (0,1)$ such that they have the same cardiniality? Convergence of $U_n=\frac{1}{\sqrt{2n\sigma^2}}\left(\Sigma X_j-\Sigma Y_j\right)$ - central limit theorem Suppose that $U_n=\frac{1}{\sqrt{2n\sigma^2}}\left(\Sigma X_j-\Sigma Y_j\right)$,  where $X_1,X_2,\ldots$ and $Y_i,Y_2, \ldots$ are i.i.d. sequences of random variables with mean $\mu$ and variance $\sigma^2$ and the sequences $\{X_i\}$ and $\{Y_i\}$ are independent.  Then, for all real numbers $x$, show that, as $n\to \infty$,  $$\mathbb{P}(U_n\leq x) \to  \int_{-\infty}^{x} \frac{1}{(\sqrt(2\pi))} \:e^{-\frac 12{u^2}}\mathrm du $$ Approach  I tried to carry out the integration on the right, but this does not integrate nicely. It ends up involving an error function, so I figured this was the wrong was to go.  Should I be looking at convergence in probability to answer this question? Is Chebyshev's inequality relevant here? If so, how and how does that relate to the integral? \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \begin{document} \tl_to_str:n { testing _ things }  \par  \tl_set:Nn \l_tmpa_tl { testing _ things } \tl_to_str:N \l_tmpa_tl \end{document}   gives a strange result (testing ̇things).  How can I get testing_things?  I basically want verbatim content (with line breaking). Biblatex citation order Can we actually discourage downvotes? Before you disagree with me with a downvote, or just want to be funny, please hear me out. From the :  The upvote privilege comes first because that's what you should focus on: pushing great content to the top. Downvoting should be reserved for extreme cases. It's not meant as a substitute for communication and editing.  I have honestly never seen a downvote reserved for an extreme case. The process is usually 1) downvote post if it's bad and don't comment. (Not much of a process, is it?) As you stay on the site longer and longer, you develop a carelessness towards downvotes (as I have), but for new users, it's really discouraging.  question inspired me to [ask balpha to] make , which is a list of users with 1 rep who have the  badge. That's the closest I could get to new users who deleted their own posts after downvotes came in. Don't get me wrong, I know the argument about being nice to new users very well, but I still believe it to be an issue. And since , users are much more inclined to go the lazy route and downvote bad questions. No alternative measures (see below) are taken, for the most part. Personally, I leave a comment and don't downvote until the asker shows no interest in fixing their post. The only other measure taken to discourage downvotes (on answers) is the -1 rep punishment to the downvoter, which is absolutely meaningless and inconsequential anyways. How are we supposed to educate new users when we don't teach them what to do, don't direct them to the FAQ, and discourage them with downvotes right off the bat?  Instead of voting down: If the post is spammy or offensive — flag it. If the question is duplicate or off-topic — flag it for moderator attention. If something is wrong, please leave a comment or edit the post to correct it.  We claim to discourage downvoting, yet I see answers like  that encourage us to downvote first and ask questions later when a question is simply unclear or effortless. It's just an awful chain reaction. A new user comes to the site asking a question, but that doesn't work out too well, so they get downvotes, delete the question in shame, and don't get the help they deserve as a fellow writer of code and programmer. Strip away the quality of the site for a moment: the core functionality of this site, and the only reason I and a lot of other users are (still) on it, is to receive and give help to/from others. I enjoy making sure fellow programmers get the answer they need, because this site has helped me get mine when I needed them. Quality can still be maintained if content is fixed rather than downvoted more often. So can we stop discouraging new users from continuing to use this site and actually start to discourage downvoting? I think we need to encourage effort towards teaching and helping new users understand the system and why their post is bad rather than slapping them in the face with downvotes that they don't know how to interpret anyways. I'm leaving ways we can do this up to others. My first thought was to increase the punishment for downvoting answers and to no longer make question downvotes free, but those wouldn't be well-received, judging by the history of similar suggestions. . Enroll Apple Developer Program under 18 I've seen a lot of questions like this throughout the web but they're mostly from 2 or 3 years ago, so I decided to ask to have some updated answers.   I'm 16 and I want to start publishing and using the benefits that comes with the Developer Program. In the legal agreement says that I should be over 18, and I'm not so, i can't do it. I've contacted the apple developer support and they told me that I should use a account in my father's name. We reside in Brazil. With that, I had some doubts:   Will the name on the App Store be mine or my father's? In the future, when I'm 18, this account can be transferred to my name?   Besides that, if someone has any advice or (legal) workaround I'd appreciate it, thanks Page title with substitution on views page I have a view page that requires a dynamic page title. It is a simple substitution of the label field.  If I use {{ label }} it works fine for the title displayed on the page, but it doesn't substitute the label for the actual page title (in meta)  I was able to fix this by using hook_views_post_render using the following code  // Set the route title. $route = \Drupal::routeMatch()-&gt;getCurrentRouteMatch()-&gt;getRouteObject(); $route-&gt;setDefault('_title', $title);  $view-&gt;setTitle($title);   However, the title only works if the page is not cached. For the cached pages, the page title is missing. This feels like a bug in drupal, but I am hoping that there is a simple way to get this done. I'm trying to use ARIMA process to predict the behaviour of a time series, the probleme I face is that I can't get the order of each component of ARIMA, the lag is between 0 and 1, same goes for the acf. The time series has no tendency, and I guess no seasonality.     My question is : Does this mean that ARIMA orders are all 0s, and if so, is the HoltWinters a good (or the best) solution for modelling this kind of TS ? Markov's paper on insolubility of the homeorphy problem I am looking for an English translation of Markov's 1958 paper, On insolubility of the homeorphy problem, which I remember coming across on a website for a computational topology course (taught by Afra Zomorodian). Clipboard for copying and pasting files in command line? In Bash, suppose I visit a directory, and then another directory. I would like to copy a file from the first directory to the second directory, but without specifying the long pathnames of them. Is it possible?   My temporary solution is to use /tmp as a temporary place to store a copy of the file. cp myfile /tmp when I am in the first directory, and then cp /tmp/myfile . when I am in the second directory. But I may check if the file will overwrite anything in /tmp.  Is there something similar to a clipboard for copying and pasting a file? How to custom (split in two)? Ibidem Colors and legend in groupplots/barplot In order to compare three items I use the groupplot command. For each item I have n different criteria to compare.    Is it possible to set the color for each criteria itself? Meaning the first bar in every group goes gray, the second pink etc.. The legend than should contain the n compared criteria.  And... how do I manage to let the whole tikz-picture have a width of 0.9\textwith  \documentclass{standalone} \usepackage{pgfplots,pgfplotstable} \usetikzlibrary{pgfplots.groupplots}  \pgfplotstableread{ nr  fii faa foo a   10  15  12 b   12  18  14 c   13  19  15 d   9   13  10 e   7   11  8 f   10  15  12 }\datatable  \begin{document} \begin{tikzpicture} \begin{groupplot}     [group style={columns=3},         ybar,         ymin=0,         ymax=20,         xtick=\empty,         tickpos=both]  \nextgroupplot[xlabel=fii] \addplot [fill=blue] table [x expr=\coordindex, y=fii] {\datatable}; \nextgroupplot[xlabel=faa] \addplot [fill=green] table [x expr=\coordindex, y=faa] {\datatable}; \nextgroupplot[xlabel=foo] \addplot [fill=red] table [x expr=\coordindex, y=foo] {\datatable};  \end{groupplot} \end{tikzpicture} \end{document} The advantages and disadvantages of using Kaiser Rule to select the number of principal components Is the Kaiser rule (choosing only PCs with eigenvalues >1, ) a reasonable method to select the number of principal components to retain? What are its pros and cons? DNS Resolution for example.com - Can you explain? Polygon intersection using turf js