I wanted to test out the following code I had seen in an exam:  void fct(char *s, const char *t) {     while(*s++ = *t++); }   It is supposed to do the same as strcpy(), but when I ran it, it resulted in a segmentation fault at the first time the while-condition was evaluated. There was nothing apparent why it would segfault and others couldn't find the reason either.  I've compiled it with gcc 8.3.0 and gcc 7.3.0 both with the same results. I've also tried to debug with gdb which didn't bring any clarification either.  This is my testing code:  void fct(char *s, const char *t) {     while(*s++ = *t++); }  int main(int argc, char *argv[]) {     fct("hello", "world");     return 0; }   compiled with gcc -Wall -o test test.c. The same happened when the strings were in variables:  int main(int argc, char *argv[]) {     char *a = "hello";     char *b = "world";     fct(a, b);     return 0; }   int main(int argc, char *argv[]) {     char *a = malloc(sizeof(char)*6);     char *b = malloc(sizeof(char)*6);     a = "hello";     b = "world";     fct(a, b);     return 0; }
The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.
More than 9 hundred as hundreds? In German, we often use "Elfhundert" (literally, "eleven hundred") for 1100 or "neunzehnhundert" ("nineteen hundred") for 1900; but is this correct in English? The Quotation Mark character in TeXworks editor has vanished Now, my version of TeXworks is 0.4.5r.1280 and I can't have the " character on the keyboard.    I have ``  or '' instead. Why?  And It's the same with Alt+034. I'm very disappointed with that. Unable to send e-mail. Contact the site administrator if the problem persists When my web form is filled and submitted, I get redirected to a page that says:     Thank you for submitting.   but theres a red warning box there that says:     Unable to send e-mail. Contact the site administrator if the problem persists.   I think its the SMTP server, but I don't know how to fix that. C++ Struct Pointer Segfault When to use a GAM vs GLM I realize this may be a potentially broad question, but I was wondering whether there are assumptions that indicate the use of a GAM (Generalized additive model) over a GLM (Generalized linear model)? Someone recently told me that GAMs should only be used when I assume the data structure to be &quot;additive&quot;, i.e. I expect additions of x to predict y. Another person pointed out that a GAM does a different type of regression analysis than a GLM, and that a GLM is preferred when linearity can be assumed. In the past I have been using a GAM for ecological data, e.g.:  continuous time-series when the data did not have a linear shape I had multiple x to predict my y that I thought to have some nonlinear interaction that I could visualize using &quot;surface plots&quot; together with a statistical test  I obviously don't have a great understanding of what a GAM does different than a GLM. I believe it's a valid statistical test, (and I see an increase in the use GAMs, at least in ecological journals), but I need to know better when its use is indicated over other regression analyses. Commutator Subgroup of Direct Product equals the Direct Product of the Commutator Subgroups I need to prove that $(G_{1}\times G_{2})^{\prime} = G_{1}^{\prime} \times G_{2}^{\prime}$, where $G^{\prime}$ denotes the commutator subgroup of $G$ - i.e., $G^{\prime}=[G,G]$, the subgroup generated by all commutators of elements of $G$.   Recall that the commutator of two elements $x$ and $y$ in a group $G$, denoted $[x,y]$ is defined to equal $x^{-1}y^{-1}xy$.  I have posted my proof as an answer below. Could somebody please take a look at it and let me know if it's okay? If not, please let me know what I need to do in order to fix it. Thank you. :)    Edit: I have been informed that my answer given below actually shows only equality of the set of commutators, and that $G^{\prime}$ consists of products of commutators. So, this question is no longer a proof check, but I am asking specifically how to fix what I have written below in order to make it actually answer the thing I set out to prove. I am having a bit of trouble understanding some of the hints given me thus far, and am going to need more detail in any answers given in order for them to be helpful. Installing Cygwin packages from the command-line SQL Server CE in a multi user scenario - is this really, really stupid? Q&A blank in Stack Exchange Android app v1.0.95 - S10e/Android 10 How can I iterate over an enum? Group member cannot write even with write permission Wedge product and change of variables File l3backend-pdfmode.def not found when loading expl3 I updated my TeXlive distribution a couple times in the past week, and now I get this error when I include package expl3 (or any other package that includes it, such as fontspec). Before the updates it was working fine. Am I missing any package that should be installed? I tried searching for l3backend-pdfmode.def, but I found no results.  \documentclass{article} \usepackage{expl3} \begin{document} Hi \end{document}   λ lualatex a This is LuaTeX, Version 1.10.0 (TeX Live 2019)   restricted system commands enabled. (./a.tex LaTeX2e &lt;2018-12-01&gt;  luaotfload | main : initialization completed in 0.042 seconds (/opt/texlive/2019/texmf-dist/tex/latex/base/article.cls Document Class: article 2018/09/03 v1.4i Standard LaTeX document class (/opt/texlive/2019/texmf-dist/tex/latex/base/size10.clo)) (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3-code.tex)  ! LaTeX Error: File `l3backend-pdfmode.def' not found.  Type X to quit or &lt;RETURN&gt; to proceed, or enter new name. (Default extension: def)  Enter file name:  ! Emergency stop. &lt;read *&gt;   l.282   }   379 words of node memory still in use:    2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attrib ute_list, 1 write nodes    avail lists: 2:9,3:3,4:1,5:2,7:2,9:2 !  ==&gt; Fatal error occurred, no output PDF file produced! Transcript written on a.log. What did Enel do after being defeated? As shown in the Manga and the Anime, Enel survived along with the Ark.  He then Embarks to Fairy Verth      The Moon.   In the Manga it shows his adventures on the Moon.  But what happened?  I didn't understand the situation that happened.  What exactly happened on the Moon? (a) Solve the equation $yu_x+xu_y=0$  with the condition $u(0,y) = e^{-y^2}$. (b) In which region of the xy plane is the solution uniquely determined?     I did the first part but I don't understand how to do part b.  I read   But I don't understand how the argument is based. A more clear explanation is appreciated Flip x and y axes in Excel graph This should not be very difficult, but I cannot figure out how to do it.  I have a table similar to this     %low %high  0   0   12  1  13   26  ... 19  90   94 20  95  100   When I graph it, excel defaults to having the first column on the x axis and plotting the second and third column as y values. I want the first column to be on the y axis instead. I assume there is an easy way to do this, but I cannot figure it out. Most of the things I have found from searching have suggested the "Switch Row/Column" button, but that does something else.  Thanks for the help. After the top bar changes in the , when a non logged-in user click the Sign Up button, instead of navigating to the corresponding page it displays the openid related code in the screen.  Screenshots for reference: Call dynamic_sidebar but include/exclude named widgets? Is it possible to include or exclude specific named widgets that are assigned to a named dynamic_sidebar call?  For example, if I've registered a sidebar named "my_sidebar" and the user had placed a "Links" widget into it, I want to be able to include or exclude it based on a custom setting in my theme options panel.  Is this possible?  Any insights much appreciated. These androids show up day in suburban USA and start offering all their services for free - they are much better than the robot helpers that cost money - the protagonist is a salesman of the latter.   Soon, the 'helpers' are everywhere, and human beings effectively cannot do anything without these things keeping people 'safe'. Humans become infantilized and controlled.   Eventually it's discovered that one man created them, and he's been kept prisoner by them to prevent for his own safety.   This seems remarkably similar to the conclusion of the I, Robot movie. Finding $\tan t$ if $t=\sum\tan^{-1}(1/2t^2)$ I am solving this problem. If $$\sum\limits_{i=1}^{\infty} \tan^{-1}\biggl(\frac{1}{2i^{2}}\biggr)= t$$ then find the value of $\tan{t}$.   My solution is like the following: I can rewrite: \begin{align*} \tan^{-1}\biggl(\frac{1}{2i^{2}}\biggr) &amp; = \tan^{-1}\biggl[\frac{(2i+1) - (2i-1)}{1+(2i+1)\cdot (2i-1)}\biggr] \\\ &amp;= \tan^{-1}(2i+1) - \tan^{-1}(2i-1) \end{align*}  and when I take the summation the only term which remains is $-\tan^{-1}(1)$, from which I get the value of $\tan{t}$ as $-1$. But the answer appears to be $1$. Can anyone help me on this.