Passing array (member of a struct) to function
When a function has a specific-size array parameter, why is it replaced with a pointer?
It's a shame to type out an entire question, press post and then:     Sorry, you are only allowed to ask 50 questions in a 30 day period   Could you put some sort of notice on the page itself before submitting it to let you know the question won't be going through?  Or perhaps tell me how many questions I've asked in the last 30 days if it's >0?  Edit  This is not a complaint or statement about the limit, just a request that the error handling be done in a slightly better way to save people a lot of time. I've been using Ubuntu for a few years now, but I just installed Version 16.04, and I've been having a lot of issues. I'm not a command line expert, but I tried to install some software last night, and it is creating issues (and also not working properly).   When I run sudo apt-get -f install, I see the following message:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   lua-event lua-expat lua-filesystem lua-sec lua-socket lua5.1 prosody Suggested packages:   lua-zlib lua-dbi-postgresql lua-dbi-mysql lua-dbi-sqlite3 The following packages will be REMOVED:   jitsi-meet-tokens The following NEW packages will be installed:   lua-event lua-expat lua-filesystem lua-sec lua-socket lua5.1 prosody 0 upgraded, 7 newly installed, 1 to remove and 22 not upgraded. 3 not fully installed or removed. Need to get 0 B/413 kB of archives. After this operation, 2,296 kB of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 176266 files and directories currently installed.) Removing jitsi-meet-tokens (1.0.962-1) ... dpkg: error processing package jitsi-meet-tokens (--remove):  subprocess installed post-removal script returned error exit status 10 Errors were encountered while processing:  jitsi-meet-tokens E: Sub-process /usr/bin/dpkg returned an error code (1)   Can someone help me figure out what I need to do to get this resolved? I'm fine with deleting jitsi, but I'm not sure if that will correct the problem.   Currently there is a red circle with a line through it in the upper right corner that indicates there may be installed packages with unmet dependencies. How to prove $\bar{m}$ is a zero divisor in $\mathbb{Z}_n$ if and only if $m,n$ are not coprime Let us consider the ring $\mathbb{Z}_n$ where $\bar{m}\in\mathbb{Z}_n$  Could anyone help me prove that $\bar{m}$ is a zero divisor in $\mathbb{Z}_n$ if and only if $m,n$ are not coprime  So far I have:  Assume $\exists \bar{a}: \bar{m} \bar{n}=n \mathbb{Z} \Rightarrow$ for some $b\in\mathbb{Z}:am=bn$  I then assumed $n,m$ were coprime and attempted to use $\exists a&#39;,b&#39;\in \mathbb{Z}:a&#39;m+b&#39;n=1$ to come to a contradiction, however haven't found one, the most promising thing I have found so far is that  $a=n(a&#39;b+ab&#39;)$ and $b=m(a&#39;b+ab&#39;)$ $\Rightarrow n|a$ and $m|b$ Calculating the expected values of the min/max of 2 random variables A white number inside a black circle. How to make a white number inside a black circle (the picture below)? I want to change numbers inside the black circle, of course.  I use Share LaTeX. I have read some articles here but anyone are not what I would like to get. I would like to get this  (the picture below) - the sixth answer.   Thanks for help. Definite integral, quotient of logarithm and polynomial: $I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{x^2+\lambda x+\lambda ^2}\text{d}x$ I was thinking this integral : $$I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{x^2+\lambda x+\lambda ^2}\text{d}x$$ What I do is use a Reciprocal subsitution, easy to show that: $$I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{\lambda ^2x^2+\lambda x+1}\text{d}x =\frac{1}{\lambda}\int_0^{\infty}\frac{(\ln x-\ln \lambda)^2}{x^2+x+1}\text{d}x \\ =\frac{\ln ^2\lambda}{\lambda}\int_0^{\infty}\frac{1}{x^2+x+1}\text{d}x+\frac{1}{\lambda}\int_0^{\infty}\frac{\ln ^2x}{x^2+x+1}\text{d}x \\ =\frac{\ln ^2\lambda}{\lambda}\frac{2\pi}{3\sqrt{3}}+\frac{2}{\lambda}\int_0^1\frac{\ln ^2x}{x^2+x+1}\text{d}x$$ But I hav no idea on process the remaining integral:( Anyone knows how to solve it?  THX guys! I came with another method might work for this: Recall the handy GF $$\frac{1}{x^2+x+1}=\frac{2}{\sqrt{3}}\sum_{k=0}^{\infty}\sin \left(\frac{2\pi}{3}\left(k+1\right)\right)x^k$$ Then we have :  $$\int_0^1\frac{\ln ^2x}{x^2+x+1}\text{d}x=\frac{2}{\sqrt{3}}\sum_{k=0}^{\infty}\frac{2}{\left(k+1\right)^3}\sin \left(\frac{2\pi}{3}\left(k+1\right)\right)x^k$$ With $$\sum_{k=1}^{\infty}\frac{\sin (kx)}{k^3}=\frac{\pi ^2}{6}x-\frac{\pi}{4}x^2+\frac{x^3}{12}$$ What can we arrived? Navigation bar overlapped by status bar How to achieve this 3D "Card" effect Let $\mathbb{S} = \{ (X,Y,Z) \in \mathbb{R}^3 :X^2 + Y^2+Z^2=1\}$ denote the Riemann sphere. The following problem is taken from Gamelin "Complex Analysis" chapter one:     What is the image of the spherical cap $ C := \{(X,Y,Z) \in \mathbb{S} : A \leq X \leq 1\}$, where $A$ is some fixed real number between $-1$ and $1$, under the stereographic projection $ \pi(X,Y,Z) = \frac{X+iY}{1-Z}$?   Here is my work so far:  ( The case $A=1$ is trivial, so assume $A &lt;1$)  We want to find $\pi(C) = \{z \in \mathbb{C} \mid \exists(X,Y,Z) \in C: \pi(X,Y,Z) = z \}= \{z \in \mathbb{C} \mid \pi^{-1}(z) \in C\}$, where the last equality holds by $\pi$ being a bijection. Write $z=x+iy$.  Here, $ \pi^{-1}(z) \in C\iff A\leq \frac{2x}{1+x^2+y^2} \leq 1 \iff (\star) :A \leq \frac{2x}{1+x^2+y^2}$, since the inequality $2x \leq 1+x^2+y^2$ holds for all $x,y \in \mathbb{R}$.  $A=0$: $( \star)$ reduces to $ 0 \leq x$, so in this case the image is $\{z \in \mathbb{C} \mid \Re(z) \geq 0 \}$.   $A &gt;0$: Since $A \neq 0$ in $(\star)$ we have,  $ \frac{2x}{1+x^2+y^2} \geq A \iff Ax^2-2x+Ay^2+A \leq 0 \iff (x-\frac{1}{A})^2 +y^2 \leq \frac{1}{A^2}-1$. Thus the image is the interior and boundary of the circle centered at $\frac{1}{A}$ with radius $\sqrt{\frac{1}{A^2}-1}$. Note $\frac{1}{A^2}-1 \geq 0$ as $A \in (0,1)$.  $A &lt;0$ : By symmetry and the above, here the image is $ \mathbb{C} / \{ $ interior and boundary of circle centered at  $  \frac{1}{A}$ with radius $\sqrt {\frac{1}{A^2}-1} \}$.  Is my working correct? Many Thanks! I had internet connection, but when I upgraded my VGA and restarted my PC then everything for eth0 has gone.     When I used ifdown:     ifdown: interface eth0 not configured   Is there something I could do?    EDIT: Content of /etc/network/interfaces    auto lo iface lo inet loopback   When I ifconfig I don't have these lines:    inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0 inet6 addr: fe80::219:5bff:fe5e:a5e/64 Scope:Link   In the Terminal typed:  sudo gedit /etc/network/interfaces   and then added these lines in the bottom:  auto eth0 iface eth0 inet dhcp   then I typed:    sudo ifdown eth0 sudo ifup eth0   when I send the second command I received the below message:    No DHCPOFFERS received No working leases in persistent database - sleeping   Any help? Sum of reciprocals of numbers with certain terms omitted I know that the harmonic series $1 + \frac12 + \frac13 + \frac14 + \cdots$ diverges. I also know that the sum of the inverse of prime numbers $\frac12 + \frac13 + \frac15 + \frac17 + \frac1{11} + \cdots$ diverges too, even if really slowly since it's $O(\log \log n)$.  But I think I read that if we consider the numbers whose decimal representation does not have a certain digit (say, 7) and sum the inverse of these numbers, the sum is finite (usually between 19 and 20, it depends from the missing digit). Does anybody know the result, and some way to prove that the sum is finite? I'm totally new to Ubuntu/Linux, using Ubuntu Server at the moment. Just trying to  figure out something basic.   How can you tell where you are installing a program. For example I just installed Sphinx search engine by placing the tarball that I downloaded from their site to my:  /home/sphinx   directory. I created the sphinx directory to place that tarball in. Then I ran these commands:  tar xvzf sphinx-0.9.8.1.tar.gz cd sphinx-0.9.8.1/ ./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql   and then these:  make sudo make install   Now I have a lot of files sitting in the directory where I ran these commands. Is this my Spynx installation or did it install somewhere else?  In windows if you run an installer (.exe file) anywhere the program will still install in your C:\Program Files directory. Does something similar apply to linux where all programs are installed in a central place, or can you install programs anywhere on the system.  Questions   I would prefer to keep all my installed programs in one place so what is the right place for this in terms of best practice. In other words what is the Linux equivalent of C:\Program Files? And how does one always install at this location, is it just a matter of placing the tarball and running the install commands from this location? What about if I use sudo apt-get to install a package. How can I point to this location to tell apt-get to always install there? Is it possible to load some package from a .sty file only if some option is selected?  (Naive approach \DeclareOption{something}{\RequirePackage{something}} doesn't work.) Confused at + and ++ in TikZ I can't seem to figure out the difference between + and ++ relative coordinates in TikZ.   I understand ++. ++ specifies delta coordinates that are added to the last current point, the current point is then set to the new absolute current point (correct?):  \draw (0,0) -- ++(1,0) -- ++(0,1) means:  set Current Point to (0,0) add (1,0) to Current Point = (1,0) set Current Point to (1,0) add Current Point (1,0) to (0,1) = (1,1) set Current Point to (1,1)   I can't seem to figure out that + does, when I try it out it looks like the coordinates in the +(x,y) are absolute coordinates rather than delta coordinates, but the manual says otherwise In the  a line is delivered at around 1:41 where Han Solo says "a 190 years old!? You look great" and I was wondering if there is a defined concept of a year in the Star Wars universe or would Han Solo just be familiar with the duration of a  solar orbit. How can I find the possible values that $\gcd(a+b,a^2+b^2)$ can take, if $\gcd(a,b)=1$ Prove that a graph with the same number of edges and vertices contains one cycle The uniform limit of Continuous Functions is continuous.   Proof Let $\varepsilon &gt; 0$. There exists $N$ in natural numbers such that $n&gt;N$ implies  $|f_n(x)-f(x)| &lt; \frac{\varepsilon}{3}$ for all $x$ in $S$. In particular $|f_{N+1}(x)-f(x)| &lt; \frac{\varepsilon}{3}$ for all $x$ in $S$. Since $f_{N+1}$ is continuous at $x_0$ there is a $\delta&gt;0$ such that, $x$ in $S$ and $|x-x_0| &lt; \delta$ imply $|f_{N+1}(x)-f_{N+1}(x_0)|&lt; \frac{\varepsilon}{3}$ Now we conclude $x$ in $S$ and $|x-x_0| &lt; \delta$ imply $|f(x)-f(x_0)|&lt; 3 \cdot \frac{\varepsilon}{3} = \varepsilon$.  Can someone explain what is happening here? I don't follow it all. Specifying a no-indent for a list I have the following:  This is just normal text...  \begin{enumerate} \item First Item ?\\\\ This is the text of the first item \item Second Item ?\\\\ This is the text of the second item \end{enumerate}   Which renders the following:  This is just normal text...  1. First Item ?     This is the text of the first item  2. Second Item ?      This is the text of the second item   I want to specify that the text of the items has no indentation.  Basically, I want it to be rendered like such:  This is just normal text...  1. First Item ?  This is the text of the first item  2. Second Item ?   This is the text of the second item   How can I specify this form of no indentation? I found the following question about compactness:     A set $S\subseteq \mathbb{R}^n$ has the following property:   if a sequence of $S$ has exactly one accumulation point in $S$, then it converges in $S$. Prove that $S$ is compact.    We know that in $\mathbb{R}^n$ compact sets correspond to closed and bounded sets.   (1) I am trying to prove that $S$ is closed. The condition in the question says if a sequence of $S$ has an accumulation point in $S$ then it converges in $S$. I think instead the condition should be if a sequence of $S$ has an accumulation point( in $\mathbb{R}^n$, not necessarily in $S$ )then it converges in $S$.  Am I correct?  (2) How to prove that $S$ is bounded?  P.S. I have made an edit (there is exactly one accumulation point).  Source of the question:  of this problem set.