I have two arrays array1 of size 3 and array2 of size 2. I wish to form a pair of each item from both arrays. That is;  int array1[] = {1, 2, 3}; int array2[] = {9, 4};   Results I'm hoping to achieve: 1 , 9  1 , 4  2 , 9  2 , 4  3 , 9  3 , 4   This is what I have tried:  #include &lt;iostream&gt;  using namespace std;  int main(int argc, const char *argv[]) {     int array1[] = {1, 2, 3};     int array2[] = {9, 4};      int arrayOneSize = sizeof(array1);     int arrayTwoSize = sizeof(array2);      for (size_t i = 0; i &lt; arrayOneSize; i++)     {         for (size_t j = 0; j &lt; arrayTwoSize; j++)         {             cout &lt;&lt; array1[i] &lt;&lt; " , " &lt;&lt; array2[j] &lt;&lt; endl;         }      }      return 0; }   But for some reason I am getting a whole bunch of weird combinations like:  1,9 1,4 1,1 1,2 1,3 1,1029505037 1,-531587312 ...             (It's really long, just want to shorten the results a little) 0,-411331072 1,9 1,4 1,1 1,2 1,3 1,1029505037 1,-531587312 1,-411331072  Sorry for the noob question. I am still new to C++ so, I will gladly appreciate any help. And also why am I getting numbers which are not part of the array?   Thanks in advance.
How do I determine the size of my array in C?   That is, the number of elements the array can hold?
When may adjectives precede determiners? (E.g. too difficult a task) The expression too difficult a task sounds a little pompous, but it doesn't sound ungrammatical. According to my folk-beliefs about English grammar, determiners precede adjectives. However, the expression too difficult a task seems to controvert that belief.  Additionally, the expression too difficult of a task seems grammatical too.    Under what conditions may determiners precede adjectives? Are there conditions under which too difficult of a task would be a more grammatical expression than too difficult a task would be?   (This question does not ask what the question “How big of a problem” vs. “how big a problem” asks. That question does not pertain to determiners.) Please add a reply button to messages in the pinned/starred section I've run into this a few times; I'll rejoin chat after being away for a while and notice something interesting in the starred section.  I'd like to reply directly to the message but there's no reply button.  Currently, the only ways to explicitly reply to one of those messages are either:-   find the message by scrolling up and looking for it, then click the reply button or; copy and paste the permalink, deleting all the way up to the fragment identifier and adding the colon at the start.   Please add a reply link, even if it just goes in the popup menu it's an improvement. Can a set be neither open nor closed? An example would do. I cant think of any.   Thanks in advance! Similar to Lifepod 1993, but not it Example of a Subgroup That Is Not Normal Can you kindly provide an example of a subgroup that is not normal?  I have been told many times that, for coset multiplication to be defined, the subgroup must be normal.  I have seen the proof and examples of quotient group multiplications.  Now, I am trying to find out where the process will break down if the subgroup is not normal.  Suppose that $x \in a_1H = a_2H, y \in b_1H = b_2H$, where $H$ is not normal. So $x = a_1h_1 = a_2h_2$ for some $h_1, h_2 \in H$, and $y = b_1h_1^* = b_2h_2^*$ for some $h_1, h_2 \in H$.  $xy = (a_1b_1)(h_1h_1^*) = (a_2b_2)(h_2h_2^*)$.  However, both $h_1h_1^*, h_2h_2^*$ are still elements of $H$.  So I don't see how $a_1b_1H \neq a_2b_2H$. Apply brace expansion in "reverse order" Stopping a Thread in Java? I'm in the process of writing a piece of code that connects to a server spawns a bunch of threads using that connection and does a bunch of "stuff".  There are certain instances where the connection fails and I need to stop everything and start from scratch with a new object.  I wanted to clean up after the object but calling thread.stop on the threads, but this method is seemingly deprecated.  What is the recommended alternative to doing this? Should I write my own cleanup and exit method for each of the threads? Set the thread to null? or something else? I'm currently using an entry-level DSLR with 18-55mm lens and having great trouble trying to creating a blurred background effect in my photos. Now matter what aperture or shutter speed I choose, I'm not able to get it.  There's a general question about , but what specific things can I do to get this effect with an entry-level lens? Prove inequality using Schwarz's Lemma Properties of $y$ if $\frac{d^2y}{dx^2}+xy=0$, $x \in [a,b],$ and $y(a)=y(b)=0.$ Let $y$ be a nontrivial solution of the boundary value problem  $$\frac{d^2y}{dx^2}+xy=0,\ x \in [a,b]$$  $$y(a)=y(b)=0$$ Then:   $b&gt;0$ $y$ is monotone in $(a,0)$ if $a&lt;0&lt;b$. $y'(a)=0$. $y$ has infinitely many zeros in $[a,b]$   I have no idea how to solve it and which options is/ are correct. please help me. For example, the radiation dominated cosmology, the energy density of radiation is proportional to $a^{-4}$ and the volume is proportional to $a^3$, where $a$ is the scale factor. So the total energy of radiation is propotional to $a^{-1}$. So where is the loss of energy of radiation? Is it because the gravitational field has the energy? Does $\nabla_aT^{ab}_{\rm matter}=0$ represent the conservation of energy and momentum of matter field in GR? $A$ is an $n\times n$ matrix of complex numbers. Prove that if $\lambda$ is an eigenvalue of $A^2,$ then $\sqrt{\lambda}$ or $-\sqrt{\lambda}$ is an eigenvalue of $A.$    If $\lambda$ is an eigenvalue of $A^2,$ we have $\lambda\alpha=A^2\alpha$ for some $\alpha.$ Then how can we find a $\beta$ s.t. $\sqrt{\lambda}\beta=A\beta?$ To turn off my system, I can use one of these three commands:  sudo halt   Or:  sudo poweroff   Or:  sudo shutdown -h now   What are the differences between these commands, or are they all just aliases of each other? The Lie algebra of $SL_n(\mathbb C)$ are the matrices where the trace is $0$. But what is the Lie algebra of $SL_n(\mathbb H)$ where $\mathbb H$ is the quaternions? Imported CSV data is not displayed in QGIS I watched a simple video tutorial on how to accomplish it, but nothing shows up on my project when I add the layer. Even if I try zoom to layer, the screen just shows blue. I'm not sure if it has something to do with my Excel, computer, or program. I really need help as I am new to QGIS. (I just posted this, but it won't let me comment to people under that question any more) I have a layer of google hybrid, but when I do add the new layer it is at the top and checked transparency and everything. Its just not accepting the data I entered into the excel spreadsheet is my guess to what the issue is.  I have the spreadsheet with the name, longitude, latitude. Save as CSV In QGIS go to Layer &gt; Add layer &gt; Add Delimited Text Layer Upload the CSV Excel file Add  Nothing shows even tho there is a line in the layers (bottom left) showing that &quot;something&quot; is there but if I choose &quot;zoom to layer&quot; it changes to a blue screen I have a Base layer Google Maps hybrid, and an area of interest on Georgia Is it true that the order of $ab$ is always equal to the order of $ba$? How do I prove that if $a$, $b$ are elements of group, then $o(ab) = o(ba)$?   For some reason I end up doing the proof for abelian(ness?), i.e., I assume that the order of $ab$ is $2$ and do the steps that lead me to conclude that $ab=ba$, so the orders must be the same. Is that the right way to do it? I read that     A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time.   (Source: , William Stallings.)  A block cipher encrypts one block at a time. The block may be of size one byte or more or less. That means we can also encrypt a block of one byte by help of a stream cipher as a stream.  So, what exactly is the difference between a stream cipher and a block cipher? How to limit zoom level in OpenLayers 2.x I would like to have only 3 levels of zoom available (from level 6 to level 8).  demolayer2 = new OpenLayers.Layer.WMS( "abc...","http://localhost:8080/geoserver/gwc/service/wms", {layers: 'def...', transparent:"true", format: 'image/png', numZoomLevels: 3, minZoomLevel: 6 },{isBaseLayer:false},  { tileSize: new OpenLayers.Size(256,256)});  map.addLayer(demolayer2);   map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));  map.zoomToExtent(new OpenLayers.Bounds(-4.601615515076983,39.8769407866263,-3.0527184873294764,41.16710732525929)); Python - Convert string representation of date to ISO 8601 English equivalent for the Persian idiom "send someone out in pursuit of black chickpeas" "To send somebody out in pursuit of some black " is a Persian idiom that implies 'to make or ask someone to run an errand so that you be able to have/ buy some time in order to deal with your private affairs in their absence', like having or continuing a (secret) conversation with someone else.   According to its etymology, since 'black garbanzos/chickpeas' were rarely available in the markets, when someone wanted to buy them, they had to search many stores for a long time, and most of time they couldn't find them at all.   Today, its meaning has changed somehow, and it doesn't necessarily mean that we ask someone to run an impossible errand, but it means we use that errand as an excuse to send them away for a while just to have time to do something in their absence.   Example scenario:   Suppose your classmate has come to your house and you are talking about some girly issues in the sitting room. Now you want to tell her a big secret about one of your classmates, but not in the presence of your younger sister who is sitting there too. So you ask her to go to the market and buy some snacks for you. In this way, you will have some time to continue your conversation until she is back. So you might say to your friend:     Well, I sent my sister out in pursuit of some black chickpeas.  I'm sure that she won't be back for another 15 minutes, so we can talk more freely now."   And your sister, before leaving the house, might sarcastically say to you:     Okay, but I know this is just an excuse, and you are just sending me in pursuit of some black chickpeas!!! so don't think that you can fool me!   Is there any idiom, expression or proverb that conveys the same meaning or connotation in English (i.e. to make or ask someone to do an errand just in order to buy time so that you can deal with some of your private affairs)?   I have found to be/go on  but I'm not sure if I can use it or not.