I tried the following code:  int a[4] = {0}; int b[4] = {5}; int c[4]; printf("%d %d %d %d %d %d\n", a[0], a[3] , b[0], b[3], c[0], c[3]);   And got the following result:  0 0 5 0 random random   While I get why I got random values for the c array, I don't understand why the assignation {5} does not work as {0} and only initialize the first element of the array.  Is there a way to initialize array b elements to the same value different from 0? (without using a memset, or a for loop)
I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?
Have a look at   One of the bolds works, and the other one just turns up as ** in the actual post.  This is the string that isn't working: **x**ml n**ib**  Which renders as: xml nib Why is polynomial regression considered a special case of multiple linear regression? If polynomial regression models nonlinear relationships, how can it be considered a special case of multiple linear regression?  Wikipedia notes that "Although polynomial regression fits a nonlinear model to the data, as a statistical estimation problem it is linear, in the sense that the regression function $\mathbb{E}(y | x)$ is linear in the unknown parameters that are estimated from the data."  How is polynomial regression linear in the unknown parameters if the parameters are coefficients for terms with order $\ge$ 2? Why won't my follower, Serana, follow me? I told my follower (Serana) to wait. But this is different. I told her to go somewhere and wait so it will activate the enemies. Well it did and I killed them. But Serana seems to be not following me anymore. I can't tell her to follow me. And she is constantly in a squatting position. The only thing I can do is tell her to wait somewhere else to move her. And I can't part ways because I'm doing a main quest and she has to be there. Can anybody give me a tip on what to do? What do I need to consider to choose between dSLR, mirrorless, or a compact as my first "serious" camera? I am thinking of buying a camera to learn photography. Most of the time I'll be shooting portraits and landscapes. But I am not sure where I should start. Most of my friends tell me that I should get an entry level DSLR, but I am not sure if I have the persistence and enthusiasm to carry it all day in a backpack. But the camera on my cellphone doesn't seem to be enough to begin with.  So what I want is some expert advice (preferably with professional experience). Can most compact fixed-lens or mirrorless cameras fit the situations I mentioned? Or do I really need to go to a DSLR to get a tool to learn photography? Integral closure of $\mathbb{Z}$ in $\mathbb{C}$ is not finitely generated as a $\mathbb{Z}$-module? Let     $$ \mathbb{Z}^{'}_{\mathbb{C}}=\{ z \in \mathbb{C} | \exists f \in \mathbb{Z}[X] \text{ monic such that } f(z)=0\} $$   be the integral closure of $ \mathbb{Z} $ in $ \mathbb{C} $. Prove that $ \mathbb{Z}^{'}_{\mathbb{C}} $ is not finitely generated as a $ \mathbb{Z} $-module.  My attempt: Suppose $ \mathbb{Z}^{'}_{\mathbb{C}}=\mathbb{Z}\alpha_{1}+...+\mathbb{Z}\alpha_{n} $ for some $ \{ \alpha_{i}\}_{i=\overline{1,n}} \subset \mathbb{Z}^{'}_{\mathbb{C}} $. I know that given $ \alpha , \beta \in \mathbb{Z}^{'}_{\mathbb{C}} $ with minimal polynomials of degrees $ m $ and $ n $ respectively, then we can construct a monic polynomial with integral coefficients $ P(z)=\prod(z-(\alpha_{i}+\beta_{j})) $ where $ \alpha_{i},\beta_{j} $ are the conjugates of $\alpha $ , $\beta $ and therefore the minimal polynomial of $ \alpha + \beta $ has degree $ \leq mn $.   I was thinking that then the degrees of the minimal polynomials of the elements of $ \mathbb{Z}\alpha_{1}+...\mathbb{Z}\alpha_{n} $ could be somehow bounded by a certain constant, whereas $ \mathbb{Z}^{'}_{\mathbb{C}}$ contains elements whose degrees of the minimal polynomials are arbitrarily large, take $ 2^{\frac{1}{n}} $ for example,$ n\geq 2$. I think this works when we are asked to prove that the set of all algebraic numbers $ \overline{\mathbb{Q}} $ is not a finitely dimensional $\mathbb{Q}$-vector space, but I don't know how to proceed in my case.  I would really appreciate any ideas, hints or solutions. Thank you very much! mod [= remainder] operation (and relation), name and meaning I am trying to write the Euclidean algorithm in the following way:  $A = \lfloor A \div B \rfloor \times B + (\text{remainder of}) \: A \div B $   Now is there any symbol I can use  to say "remainder of A $\div$ B"? I know that in the C programming language there is the operator % for modulus; is that a valid symbol in maths? Can I write A % B? Or is there some other way? The vote fraud script breaks legitimate polling questions - A serial downvoter's lament I've downvoted several of the answers on these Meta discussions:       Both questions are typical self evaluations, Stack Exchange runs them on all young Beta sites and as you may have noticed they are essentially polls, a series of example questions from the site that we are supposed to vote on.  Today I noticed that almost all of my votes have disappeared on both evaluations, only an upvote remains in the later one. My votes triggered the serial voting script, something that :      Heh, it appears I just serially downvoted you (I downvoted a lot of the answers here), hopefully the script is smart enough to not reverse my votes. Will check back in 24h, and if it does, I'll rant about it on MSO ;)    My voting behaviour on both evaluations was very simple:   I had the evaluation open in the left monitor, Opened all the example questions in their own tab, in the right monitor, Scanned each question quickly, and voted on the Meta answer (most of my votes were downvotes), Repeat for the next one, and so on...   I didn't spend more than a few seconds on any question, as I'm fairly regular on the site and I've already read all of them while casually browsing the site. In fact, if my memory isn't failing me, I had voted (up/down) and/or commented, and/or voted to close on each of the 20 example questions. I might have spend a minute or two re-reading a couple, but I mostly scanned through them. In any case I think my voting pattern is quite normal, and the script should be somehow tweaked to take serial posts, posted by the same user in quick succession, into consideration, especially on Metas.   Since I had anticipated that the script would kick in, I could have tried to fool it by pausing a bit between votes or trying to look for other Meta posts to vote on, in between voting on the evaluation answers. However I'm a very active voter on Meta Workplace, there aren't many posts I haven't already voted on, and the few that I haven't is probably because I neither agree or disagree with (my opinion on them is simply "meh"). In any case I think my voting behaviour was natural, and although the serial voting script is awesome, this time it caught and reversed a perfectly legitimate behaviour.  Animuson, in , mentions that the script isn't really optimal on Area51 as well:      Yes, please implement this on Area 51 proposals too! Oftentimes a single user would suggest a plethora of "example" questions to their own proposal which are just terrible, yet all of everyone's votes get reversed and the question just sits there at 0. I've noticed several times that my votes have gotten reversed.    I haven't noticed it myself, but it certainly seems plausible, especially early in a proposal's life.  Mysticial found a related discussion, , but it's focused on voting patterns on main sites, where reputation is also a factor. I can understand jumping through hoops to satisfy the script on main sites where, unfortunately, there are a lot of people trying to get some cheap rep or "punish" others with their downvotes, but not on Metas, and especially not on these evaluation posts.   Voting fraud is a problem, and more often than not the script works wonderfully, but in my case it was extremely counterproductive. Critical evaluations are essential for a young Beta site, and their answers typically only get a handful of votes. I wonder how many of these votes have silently gone away...  Fix this please. How is the derivative of $\mbox{Trace}\left\{ X^T A X B\right\}$ with respect to matrix $X$ equal to $AXB + A^TXB^T$?  \begin{align}   \nabla_X \ \textrm{Trace}\left\{ X^T A X B\right\} = AXB + A^TXB^T \end{align}  where $A$ and $B$ matrices are given. Need help in the longtable with the figure Can u please help me in this table. The problem in this table that is not move to the next page in a proper way and kindly mention the size of the figure as well as the place of the figure. \begin{longtable}[c]{@{}|c|c|c|c|c|c|c|c|c|@{}} \caption{Bacteria isolates on different media} \label{tab:my-table}\\ \toprule \textbf{Sr.No} &amp;   \textbf{Reference Code} &amp;   \textbf{Sample Location} &amp;   \textbf{Colony Color} &amp;   \textbf{Colony Morphology} &amp;   \textbf{Pigmentation} &amp;   \textbf{Media} &amp;   \textbf{Predicted Name Of Strain} &amp;   \textbf{Figures} \\* \midrule \endhead % 1 &amp;   EMB(P)1 &amp;   Islamabad &amp;   Green sheen &amp;   Circular &amp;   Green Sheen &amp;   \begin{tabular}[c]{@{}c@{}}Eosin methylene\\    \\ blue agar\end{tabular} &amp;   \textit{\textbf{E.coil}} &amp;    \\* \midrule 2 &amp;   MSA(P)1 &amp;   Islamabad &amp;   Yellow &amp;   Punctiform &amp;   Yellow &amp;   Mannitol salt agar &amp;   \textit{\textbf{\begin{tabular}[c]{@{}c@{}}Staphylococcus\\    \\ Epidermidis\end{tabular}}} &amp;    \\* \midrule 3  &amp; MACC(P)1 &amp; Islamabad &amp; Off white       &amp; Circular  &amp; Off white       &amp; MacConkey agar     &amp; \textit{\textbf{Salmonella}}              &amp;  \\* \midrule 4  &amp; MSA(P)2  &amp; Islamabad &amp; White           &amp; Circular  &amp; White           &amp; Mannitol salt agar &amp; \textit{\textbf{Staphylococcus   aureus}} &amp;  \\* \midrule 5 &amp;   B.A(P)1 &amp;   Islamabad &amp;   White &amp;   Smooth &amp;   White &amp;   \begin{tabular}[c]{@{}c@{}}Blood \\    \\ Agar\end{tabular} &amp;   \textit{\textbf{Pseudomonas   aeruginosa}} &amp;    \\* \midrule 6  &amp; B.A(P)2  &amp; Islamabad &amp; White           &amp; Circular  &amp; White           &amp; Blood agar         &amp; \textit{\textbf{Lactobacilli}}            &amp;  \\* \midrule 7  &amp; MACC(P)2 &amp; Islamabad &amp; Pink            &amp; Circular  &amp; Pink            &amp; MacConkey agar     &amp; \textit{\textbf{Klebsiella}}              &amp;  \\* \midrule 8  &amp; MACC(P)3 &amp; Islamabad &amp; Purple          &amp; Irregular &amp; Purple          &amp; MacConkey agar     &amp; \textit{\textbf{pseudomonas}}             &amp;  \\* \midrule 9  &amp; MSA(P)3  &amp; Islamabad &amp; Crystal White   &amp; spherical &amp; Crystal White   &amp; Mannitol salt agar &amp; \textit{\textbf{Salmonella}}              &amp;  \\* \midrule 10 &amp; B.A(P)3  &amp; Islamabad &amp; White           &amp; Puntiform &amp; White           &amp; Blood agar         &amp; \textit{\textbf{Staphylococcus}}          &amp;  \\* \midrule 11 &amp; MACC(P)4 &amp; Islamabad &amp; Orange to amber &amp; Circular  &amp; Orange to amber &amp; MacConkey agar     &amp; \textit{\textbf{Shigella}}                &amp;  \\* \midrule 12 &amp; MSA(P)4  &amp; Islamabad &amp; Yellow          &amp; Circular  &amp; Yellow          &amp; Mannitol salt agar &amp; \textit{\textbf{S. aureus}}               &amp;  \\* \midrule 13 &amp; MACC(P)5 &amp; Islamabad &amp; Pink to purple  &amp; Circular  &amp; Pink to purple  &amp; MacConkey          &amp; \textit{\textbf{Klebisella}}              &amp;  \\* \bottomrule \end{longtable} Proof that every number ≥ $8$ can be represented by a sum of fives and threes. If I did  \setcounter{chapter}{-1} \chapter{Introduction}   then I get Chapter 0 Introduction. I just want the word Introduction, and I want it also in the contents when I use   \tableofcontents   How can I do that? Factoring $-3x^2 - 2xy + 8y^2 + 11x - 8y - 6$ Automating the scanning of graphics files for corruption Does anyone know of a way to check graphics files (particularly JPEG, GIF, and PNG) for corruption (preferably in an automated way)?    Explanation:  A few days ago, a command worked incorrectly and ended up deleting thousands of graphics files from a FAT32 volume that was practically out of space. I’ve used several different file/photo-recovery programs, but naturally, they are limited in how much they can recover (though fortunately the volume has 8KB clusters, which helps somewhat).  Anyway, some of the larger files, that were fragmented, are now corrupt. Some of them are not even real files at all (the recovery software merely dumped the clusters that were pointed to by now-overwritten directory entries), while others are broken because of fragmentation.  Moreover, because some picture formats embed a smaller version of the picture as a thumbnail, scanning the thumbnails for corruption is not reliable because it may be intact while the actual file (i.e., the picture when viewed full-size), could be corrupt.    Here are a couple of examples:      Here’s the second one. It’s so damaged that it doesn’t display anything.    (A third one wouldn’t even upload because it doesn’t even have the correct header!) Move data from regular partition to lvm I've read a bit about lvm and decided that I want to switch to using it. It seems like actually setting up lvm can be done from the debian installer, so I suppose that'll be easiest. What I'm not sure about is how to copy all of my files to the new system.   I would like to copy my whole system, not just my home directory or just my packages, I've messed around with a lot of stuff, to the point where I have no idea exactly where all of my config files live. The guides I've found on the internet seem to glaze over this step, just mentioning tools that can do it, not how to use them, i.e. use rsync. Instinct tells me I can't just rsync the root of my backup to the root of my lvm system, I'll copy over something important, like the lvm config files, but I'm not sure what exactly I need to exclude, while being sure not to exclude anything I might have changed. Any tips?  My planned steps, for clarity: I have a 1tb hdd and a 250gb ssd. I want to shrink the partition I have on the hdd, use the free space (I have enough) to make two new partitions, and dd my ssd and hdd partitions to those partitions as a backup. Then I want to wipe the ssd partition and hdd partition I'm currently using, and set up lvm on them (ideally with the debian installer for simplicity's sake, but maybe manually). And then I want to copy everything from the backup partitions to the new lvm partitions, somehow. And then wipe the backup partitions and either resize the existing lvm partitions to include the remaining space, or just make the remaining space another physical volume on lvm and add it that way. How to generate a random alpha-numeric string I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X". Why won't this command work? /summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}   I'm using this as a recycler villager, and I can't get the first trade to work. What's going on? Calculate total sum of all numbers in c:forEach loop What is information? How to run Wireshark on Ubuntu 17.10 I used to run wireshark on ubuntu 17.04 with  ~/$ sudo wireshark   but now (just after update to 17.10) when I write the same I get an error  ~/$ sudo wireshark      QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'     Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display :0 I learned that the force from a magnetic field does no work. However I was wondering how magnets can be used to pick up pieces of metal like small paperclips and stuff. I also was wondering how magnets can stick to pieces of metal like a refrigerator?